control-freak-ide/Code/davinci.js
plastic-hub-dev-node-saturn 538369cff7 latest
2021-05-12 18:35:18 +02:00

1455 lines
791 KiB
JavaScript

//>>built
require({cache:{"davinci/main":function(){define("dojo/_base/kernel dojo/_base/declare davinci/davinci davinci/ve/metadata davinci/Runtime davinci/Workbench davinci/ve/metadata davinci/ui/widgets/OutlineTree".split(" "),function(p){return p.davinci})},"davinci/ve/metadata":function(){define("require dojo/Deferred dojo/promise/all dojo/_base/lang dojo/_base/connect ../library ../model/Path ../repositoryinfo xide/types xide/utils".split(" "),function(p,n,m,h,g,f,b,e,k,d){function c(a,q){a=a||{};for(var d=
1,b=arguments.length;d<b;d++){var k=arguments[d],e,w;for(e in k)k.hasOwnProperty(e)&&(w=k[e],e in a&&("object"===typeof w||a[e]===w)?c(a[e],w):a[e]=w)}return a}function a(a,k,w){D[a.name]=a;k=new b(k);var r=a.overlays,f;for(f in r)r.hasOwnProperty(f)&&("oam"!==f&&"maqetta"!==f||c(a,r[f]));delete a.overlays;a.__metadataModuleId="maq-metadata-"+a.name;f=new b(location.href);f.path=f.path.substring(0,f.path.lastIndexOf("/"));f.path=d.removeURLParameter(f.path,"theme");f.path=""+w;r=[{name:a.__metadataModuleId,
location:w+k}];r[0].location=r[0].location.replace("index.php","");r[0].location=r[0].location.replace("?debug\x3dtrue","");r[0].location=r[0].location.replace("\x26isDesktop\x3dtrue","");r[0].location=r[0].location.replace("maqetta.html","");r[0].location=r[0].location.replace("maqettar.html","");r[0].location=r[0].location.replace("index.html","");r[0].location=r[0].location.replace("xui.php","");r[0].location=r[0].location.replace("xui.php?debug\x3dtrue","");"dojo"!==a.name&&"xide"!==a.name&&"xblox"!==
a.name&&(a.__libraryModuleId=a.name,f={name:a.__libraryModuleId,location:f.append("app/static/lib/"+a.name+"/"+a.version).toString()},"xide"!==a.__libraryModuleId&&r.push(f));var g;if(h.exists("scripts.widget_metadata",a))if("string"===typeof a.scripts.widget_metadata){var x=k.append(a.scripts.widget_metadata);g=dojo.xhrGet({url:w+x.toString()+(0<e.revision.length?"?"+e.revision:""),handleAs:"json"}).then(function(c){if(c){var d=x.getParentPath();return q(a.name,c,d,d,w)}})}else g=q(a.name,a.scripts.widget_metadata,
k,w);if(h.exists("scripts.callbacks",a)){var m=new n;p([a.scripts.callbacks],function(c){a.$callbacks=c;m.resolve()});F.push(m)}return g}function q(a,c,q,d){function b(a,c,q){"undefined"==typeof a.$providedTags[c]&&(a.$providedTags[c]=[]);a.$providedTags[c].push(q)}a||console.error("parseLibraryDescriptor: missing 'libName' arg");var k=D[a];c.$descriptorFolderPath=q.toString();c.$moduleFolderPath=d.toString();if(k)if(k.$widgets){c.widgets.forEach(function(a){k.$wm.widgets.push(a)});for(var e in c.categories)k.$wm.categories.hasOwnProperty(e)||
(k.$wm.categories[e]=c.categories[e])}else if(k.$wm)for(d=0;d<c.widgets.length;d++){e=!1;for(var r=0;!e&&r<k.$wm.widgets.length;r++)k.$wm.widgets[r].type==c.widgets[d].type&&(e=!0);e||k.$wm.widgets.push(c.widgets[d])}else k.$wm||(k.$wm=c);else D[a]={$wm:c,name:c.name,version:c.version},c.__metadataModuleId&&(D[a].__metadataModuleId=c.__metadataModuleId),k=D[a];var f=k.$wm;f.$providedTypes=f.$providedTypes||{};f.$providedTags=f.$providedTags||{};f.widgets.forEach(function(a){f.$providedTypes[a.type]=
a;if("string"==typeof a.tags)b(f,a.tags,a);else if(a.tags&&a.tags.length)for(var c=0;c<a.tags.length;c++)b(f,a.tags[c],a);a.icon&&!a.iconLocal&&(a.icon=q.append(a.icon).toString());a.iconLarge&&!a.iconLargeLocal&&(a.iconLarge=q.append(a.iconLarge).toString());a.widgetClass=f.categories[a.category].widgetClass});dojo.mixin(f,{_maqGetString:B});if(f.extend)for(var g in f.extend)f.extend.hasOwnProperty(g)&&(D[g]&&D[g].$wm?w(D[g].$wm,[f.extend[g]]):(c=N[g]||[],c.push(f.extend[g]),N[g]=c));N[a]&&w(f,N[a]);
return k}function w(a,c){var q=a.$providedTypes;c.forEach(function(a){for(var c in a)if(a.hasOwnProperty(c)){var d=a[c],k=q[c];d.mixin&&h.mixin(k,d.mixin);if(d.concat)for(var b in d.concat)if(d.concat.hasOwnProperty(b)){var e=d.concat[b];if(k[b]){var w=k,r=b;var f=k[b];"string"===typeof f?e=f+","+e:f instanceof Array?e=f.concat(e):(console.error('Unhandled type for "concat()"'),e=void 0);w[r]=e}else k[b]=e}}})}function r(a){if(a)for(var c in D)if(D.hasOwnProperty(c)){var q=D[c];if(q.$wm&&q.$wm.$providedTypes[a])return q}return null}
function B(a){J||(J=!0);return null}function y(a){if(a){if(I.hasOwnProperty(a))return I[a];var q=r(a),d;q&&(d=q.$wm.$descriptorFolderPath);if(!d)return null;var q=q.$wm,b=null,e=G.getResourceManager().getVariable(k.RESOURCE_VARIABLES.APP_URL);q.localPath?(d=a.replace(/\./g,"/").split("/"),d.shift(),d=d.join("/"),d=[q.$moduleFolderPath,"/",d,"_oam.json"].join(""),e=system.resource.findResource(d).getContentSync(),b=dojo.fromJson(e)):(d=[d,"/",a.replace(/\./g,"/"),"_oam.json"].join(""),d=e+"/lib/xideve/metadata/"+
d,dojo.xhrGet({url:d,handleAs:"json",sync:!0}).then(function(a){b=a}));if(!b)return console.error("ERROR: Could not load metadata for type: "+a),null;b.$ownproperty=dojo.mixin({},b.property);b.property=dojo.mixin({},L,b.property);b.$src=d;I[a]=b;c(b,q.$providedTypes[a].metadata);return b}}function x(a,c){if(!c)return a;dojo.every(c.split("."),function(c){if(void 0===a[c])return a=void 0,!1;a=a[c];return!0});return a}function z(a,c){var q=A.queryDescriptor(c,"allowed"+a);q||(q="Parent"===a?"ANY":"NONE");
return q.split(/\s*,\s*/)}function u(a,c){var q=A.queryDescriptor(a,c);if(!q)return null;var d=r(a);return v(d,q)}function v(a,c){return a&&c?"string"===typeof c&&"./"===c.substr(0,2)?(new b(a.__metadataModuleId)).append(c).toString():c:null}var A,C,G,D={},I={},H={},F=[],N={},L={id:{datatype:"string",hidden:!0},lang:{datatype:"string",hidden:!0},dir:{datatype:"string",hidden:!0},"class":{datatype:"string",hidden:!0},style:{datatype:"string",hidden:!0},title:{datatype:"string",hidden:!0}};dojo.subscribe("/davinci/ui/libraryChanged/start",
function(){D={};I={};H={};A.init().then(function(){dojo.publish("/davinci/ui/libraryChanged")})});var J=!1;A={prefix:"",init:function(c,q){G=c;var d=[];C=p("../Workbench");var b=G.getResourceManager().getVariable(k.RESOURCE_VARIABLES.APP_URL);q=q.replace(b,"");q=p.toUrl("xideve/metadata/");f.getUserLibs(C.getProject()).forEach(function(c){var b=c.metaRoot;(b=b.replace("app/metadata/",""))&&d.push(dojo.xhrGet({url:q+b+"/package.json?"+e.revision,handleAs:"json"}).then(function(c){return a(c,b,q)}))});
return m(d)},parseMetaData:function(a,c,d,b){return q(a,c,d,b)},getLibrary:function(a){return a?D[a]:D},getLibraryActions:function(a,c){var q=[],d;for(d in D)if(D.hasOwnProperty(d)){var b=D[d];if(b.$wm){var k=b.$wm["davinci.actionSets"];k&&dojo.forEach(k,function(d){d.id!=a||c&&d.targetID!==c||(d=dojo.clone(d.actions),dojo.forEach(d,function(a){if(a.action){var c=v(b,a.action);a.action=c}a.menu&&a.menu.forEach(function(a){if(a.action){var c=v(b,a.action);a.action=c}});q.push(a)}))})}}return q},loadThemeMeta:function(a){for(var c=
a.find({elementType:"HTMLElement",tag:"style"}),q=[],d,k=0;k<c.length;k++)for(var e=0;e<c[k].children.length;e++)"CSSImport"==c[k].children[e].elementType&&q.push(c[k].children[e]);new b(a.fileName);k=f.getThemes(C.getProject());c={};for(e=0;e<k.length;e++)if(k[e].files)for(var w=0;w<k[e].files.length;w++)c[k[e].files[w]]=k[e];for(e=0;e<q.length;e++){var k=q[e].url,r;for(r in c)if(-1<r.indexOf("claro")&&(d=r),-1<k.indexOf(r))return{themeUrl:k,themeMetaCache:f.getThemeMetadata(c[r]),theme:c[r]}}if(e=
A._loadThemeMetaDojoxMobile(a,c))return e;if(d){for(var g,e=0;e<q.length;e++)if((r=q[e].url.match(/\/([^\/]*)\.css$/))&&2==r.length&&(r=r[1],q[e].url.match(new RegExp("themes/"+r+"/"+r+".css$")))){g=r;break}if(g)return r=a.getDocumentElement(),a=r.getChildElement("head"),r=r.getChildElement("body"),(k=r.getAttribute("class"))&&r.setAttribute("class",k.replace(new RegExp("\\b"+g+"\\b","g"),"claro")),a=a.getChildElements("style"),dojo.forEach(a,function(a){dojo.forEach(a.children,function(a){"CSSImport"==
a.elementType&&(a.url=a.url.replace(new RegExp("/"+g,"g"),"/claro"))})}),k=q[e].url.replace(new RegExp("/"+g,"g"),"/claro"),q={themeUrl:k,themeMetaCache:f.getThemeMetadata(c[d]),theme:c[d]},q.themeMetaCache.usingSubstituteTheme={oldThemeName:g,newThemeName:"claro"},q}},_loadThemeMetaDojoxMobile:function(a,c){for(var q=a.find({elementType:"HTMLElement",tag:"script"}),d=0;d<q.length;d++){var b=q[d].getElementText();if(b.length){var k=b.indexOf("dojoxMobile.themeMap");if(0<k){var k=b.indexOf("\x3d",
k),e=b.indexOf(";",k);if(e>k){var b=dojo.fromJson(b.substring(k+1,e))[0][2][0],w;for(w in c)if(-1<b.indexOf(w))return{themeUrl:b,themeMetaCache:f.getThemeMetadata(c[w]),theme:c[w]}}}}}},getLibraryForType:function(a){return r(a)},getLibraryMetadataForType:function(a){return(a=r(a))?a.$wm:null},getWidgetDescriptorForType:function(a){var c=r(a);a=c?c.$wm.$providedTypes[a]:void 0;return a},getOamDescriptivePropertyForType:function(a,c){var q=y(a);return q&&q[c]?(q=q[c],"string"==typeof q?{type:"text/plain",
value:q}:"string"==typeof q.value?{type:q.type?q.type:"text/plain",value:q.value}:null):null},getWidgetsWithTag:function(a){var c=[];if(a)for(var q in D)if(D.hasOwnProperty(q)){var d=D[q];d.$wm&&d.$wm.$providedTags[a]&&(c=c.concat(d.$wm.$providedTags[a]))}return c},getLibraryBase:function(a){if(a=r(a))return a.$wm.$descriptorFolderPath},invokeCallback:function(a,c,q){var d=a;"string"===typeof a&&(d=r(type));if(d&&d.$callbacks&&(a=d.$callbacks[c]))return a.apply(d.$callbacks,q)},query:function(a,c){if(a){var q,
d;a.declaredClass?(a.metadata&&(d=a.metadata),q=a.type):q=a;if(!d){d=y(q);if(!d)return;a.declaredClass&&(a.metadata=d)}return x(d,c)}},queryDescriptorByName:function(a,c,q){c=r(c);var d;if(c){c=c.$wm.widgets;for(var b=0;b<c.length;b++)if(c[b].name==a){d=c[b];break}}return this._queryDescriptor(d,q)},queryDescriptor:function(a,c){var q=r(a),d;q&&(d=q.$wm.$providedTypes[a]);return this._queryDescriptor(d,c)},_queryDescriptor:function(a,c){if(a&&"object"===typeof a){var q=x(a,c);"resizable"===c&&(q||
(q="both"));return q}},getAllowedParent:function(a){return z("Parent",a)},getAllowedChild:function(a){return z("Child",a)},getHelper:function(a,c){var q=new n,d=a+":"+c;if(d in H)return q.resolve(H[d]),q;var b=u(a,c);b?p([b],function(a){q.resolve(a);H[d]=a}):q.resolve();return q},getSmartInput:function(a){var c=new n;if(a in E)c.resolve(E[a]);else{var q=u(a,"inlineEdit");q?"string"===typeof q?p([q],function(q){c.resolve(E[a]=new q)}):"[object Array]"===Object.prototype.toString.call(q.property)?p(["davinci/ve/input/MultiFieldSmartInput"],
function(d){d=new d;h.mixin(d,q);c.resolve(E[a]=d)}):p(["davinci/ve/input/SmartInput"],function(d){d=new d;h.mixin(d,q);c.resolve(E[a]=d)}):c.resolve(null)}return c},getDeferreds:function(){return F}};var E={};g.subscribe("/davinci/ui/libraryChanged/start",function(){E={}});return dojo.setObject("davinci.ve.metadata",A)})},"davinci/library":function(){define("dojo/_base/xhr dojo/Deferred ./Runtime ./model/Path ./ve/themeEditor/metadata/query ./workbench/Preferences dojo/_base/kernel".split(" "),function(p,
n,m,h,g,f,b){var e={_customWidgets:{}},k={},d={},c={},a={};b.subscribe("/davinci/ui/libraryChanged/start",this,function(){a={};c={}});b.subscribe("/davinci/resource/resourceChanged",this,function(a,c){var d=require("davinci/Workbench").getProject();if("deleted"==a||"renamed"==a){var b=f.getPreferences("davinci.ui.ProjectPrefs",d),b=(new h(d)).append(b.themeFolder);(new h(c.getPath())).startsWith(b)&&delete k[d]}"File"==c.elementType&&"theme"==c.extension&&"modified"==a&&c.getContent().then(function(a){a=
JSON.parse(a);a.path=[c.getPath()];a.getFile=function(){return system.resource.findResource(this.path[0])}.bind(a);for(var q=0;q<k[d].length;q++)if(k[d][q].name==a.name){k[d][q]=a;return}k[d].push(a)}.bind(this))});return e={themesChanged:function(a){k[a]=a?null:[]},getThemes:function(a,c,d){function b(){var d=[];k[a]&&(d=c?k[a].filter(function(a){return!a.getFile().isVirtual()}):k[a]);return d}d&&delete k[a];if(k[a])return b();d=f.getPreferences("davinci.ui.ProjectPrefs",a);d.themeFolder="themes";
d=(new h(a)).append(d.themeFolder);d=m.serverJSONRequest({url:m.cmdOffset+"cmd/getThemes",handleAs:"json",content:{path:"*.theme",ignoreCase:!0,workspaceOnly:!1,inFolder:d.toString()},sync:!0});d.forEach(function(a){a.getFile=function(){return system.resource.findResource(this.path[0])}.bind(a)}.bind(this));k[a]=d;return b()},getThemeMetadata:function(a){return d[a.name]?d[a.name]:null},addCustomWidgets:function(a,c,d,k){var g=f.getPreferences("davinci.ui.ProjectPrefs",a);g.widgetFolder||(g.widgetFolder=
"./lib/custom",f.savePreferences("davinci.ui.ProjectPrefs",a,g));c=c.getParentFolder().getPath();c=new h(c);d=require("davinci/ve/metadata").parseMetaData(k.name,k,c,d);e._customWidgets[a].hasOwnProperty("name")||(e._customWidgets[a].name="custom",e._customWidgets[a].metaPath=g.widgetFolder,e._customWidgets[a].localPath=!0);e._customWidgets[a]=d;b.publish("/davinci/ui/addedCustomWidget",[d]);return d},getCustomWidgets:function(c){if(!e._customWidgets||!e._customWidgets[c]){e._customWidgets||(e._customWidgets=
{});e._customWidgets[c]||(e._customWidgets[c]=[]);var d=f.getPreferences("davinci.ui.ProjectPrefs",c);d.widgetFolder||(d.widgetFolder="./lib/custom",f.savePreferences("davinci.ui.ProjectPrefs",c,d));for(var k=(new h(c)).append(d.widgetFolder).getSegments(),d=system.resource.findResource(k[0]),g=1;g<k.length;g++)var m=d.getChild(k[g]),d=m?m:d.createResource(k[g],!0);var x;d.getChildren(function(a){x=a},!0);this._customWidgetPackages=[];null==x&&(x=[]);k={};for(g=0;g<x.length;g++)if(m=x[g],"Folder"==
m.elementType){k[m.name]=m.getPath();var z="maq-lib-custom-"+m.name,u=m.getURL();require({packages:[{name:z,location:u}]});this._customWidgetPackages.push({name:m.name,location:u})}m=system.resource.findResource("*_widgets.json",!1,d);this._customWidgetDescriptors={};for(g=0;g<m.length;g++){var v=m[g],A=v.getParentFolder(),u=d.getURL(),z=A.getURL(),n=z.substr(u.length+1),u=null;try{u=b.fromJson(v.getContentSync())}catch(G){}if(u&&u.customWidgetSpec&&(n=n.split("/").shift(),u.__metadataModuleId="maq-lib-custom-"+
n,e.addCustomWidgets(c,v,k[n],u),a[c]||(a[c]={}),a[c][A.name]||(a[c][A.name]={}),a[c][A.name][u.version]=z,u&&u.widgets))for(v=0;v<u.widgets.length;v++)(A=u.widgets[v].type)&&(this._customWidgetDescriptors[A]={name:n,location:z,descriptor:u})}}return{custom:e._customWidgets[c]}},getCustomWidgetPackages:function(){return this._customWidgetPackages||[]},getCustomWidgetDescriptors:function(){return this._customWidgetDescriptors?this._customWidgetDescriptors:{}},getInstalledLibs:function(){e._serverLibs||
(e._serverLibs=m.serverJSONRequest({url:"cmd/listLibs",handleAs:"json",content:{},sync:!0})[0].userLibs);return e._serverLibs},getUserLibs:function(a){if(c.base)return c.base;c.base=m.serverJSONRequest({url:m.cmdOffset+"cmd/getUserLibs.json",handleAs:"json",content:{base:a},sync:!0})[0].userLibs;return c.base},getLibRoot:function(c,d,b){var k=new n,e=a;if(e[b]&&e[b][c]&&void 0!==e[b][c][d])return k.resolve(e[b][c][d]||"");e[b]||(e[b]={});e[b][c]||(e[b][c]={});e[c]||(e[c]={});var f=null;switch(c){case "xblox":f=
"lib/xblox";break;case "dojo":f="lib/dojo";break;case "maqetta":f="lib/maqetta";break;case "delite":f="lib/ibm-js/delite";break;case "deliteful":f="lib/ibm-js/deliteful";break;case "requirejs":f="lib/ibm-js/requirejs"}e[b][c][d]=f;return k.resolve(f||"")},modifyLib:function(a){return m.serverJSONRequest({url:"cmd/modifyLib",handleAs:"text",content:{libChanges:JSON.stringify(a)},sync:!0})},addLib:function(a,c){return m.serverJSONRequest({url:"cmd/getLibRoots",handleAs:"json",content:{libId:a,version:c},
sync:!0})[0].libRoot.root},getLibraryId:function(a,c){return{sketch:"sketch",claro:"claro"}[a]+(c||"")},getLibraryName:function(a){var c,d;for(d in a)c=d;return c}}})},"davinci/Runtime":function(){define("davinci/lang/webContent ./commands/CommandStack ./ui.plugin ./html/html.plugin ./js/js.plugin ./ve/ve.plugin".split(" "),function(p,n,m,h,g,f){var b=[m,h,f],e={plugins:[],extensionPoints:[],subscriptions:[],currentSelection:[],commandStack:new n,getUser:function(){return this._initializationInfo.userInfo},
getWorkbenchState:function(){return this._initializationInfo?this._initializationInfo.workbenchState:{activeEditor:null,editors:[],nhfo:{project1:{device:"iphone",layout:"flow",themeSet:{name:"(none)",desktopTheme:"claro",mobileTheme:[{theme:"android",device:"Android"},{theme:"blackberry",device:"BlackBerry"},{theme:"ipad",device:"iPad"},{theme:"iphone",device:"iPhone"},{theme:"iphone",device:"other"}]}}},project:"project1",id:"",Fields:[]}},getSiteConfigData:function(b){return"widgetPalette"==b?
{_COMMENT1_:"Defines site-specific organization for widget palette",name:"widgetPalette_dojo_default",_COMMENT2_:"One entry for each section (\x3d\x3dfolder) in widget palette",_COMMENT3_:"includes provides ordered list of widgets to appear in each section",_COMMENT4_:"each entry in array causes a new item to appear in that section",_COMMENT5_:"each entry in array can be either a string or an array",_COMMENT6_:"if a string, can be either a string that begins with type:, which is a particular widget type",
_COMMENT7_:"otherwise the string holds a tag, which causes all widgets that match tag to share that item",_COMMENT8_:"if an array, then it holds a list of strings, each of which can start with type: (widget type) or a tag",defs:{$XBLOXSection:{id:"xblox",name:"xblox",iconBase64:"data:image/gif;base64,R0lGODlhEAAQAKIAAFhYWtXV1v///0BAQP///wAAAAAAAAAAACH5BAEAAAQALAAAAAAQABAAAAMuSLo0w5CNIF6EM9grN2+Z82WCEGjcVJbopa5tlJ2nh4W2XH9LyCu+X/AHAPyOCQA7",subsections:["$XBLOXSection_Controls"]},$XBLOXSection_Controls:{id:"Controls",
name:"Controls",iconBase64:"data:image/gif;base64,R0lGODlhEAAQALMAAN7e4oyMjtXV1sDAwf///+Dg4MvLyzMzM////wAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAgALAAAAAAQABAAAAQ3EMlJq704a3RO2NIhBIexHYRgeFTndkQ8HmER33g60EcB/ECcYBd6wWSkDErFUs5Mms4HRK1SIwA7",includes:["RunScript","CSSState","StyleState","Script"]},$ClipartSection_Arrows:{id:"Arrows",name:"Arrows",iconBase64:"data:image/gif;base64,R0lGODlhEAAQALMAAN7e4oyMjtXV1sDAwf///+Dg4MvLyzMzM////wAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAgALAAAAAAQABAAAAQ3EMlJq704a3RO2NIhBIexHYRgeFTndkQ8HmER33g60EcB/ECcYBd6wWSkDErFUs5Mms4HRK1SIwA7",
includes:["ArrowDown","ArrowLeft","ArrowRight","ArrowUp"]},$ClipartSection_Community:{id:"Community",name:"Community",iconBase64:"data:image/gif;base64,R0lGODlhEAAQAMQAANXV1v///9HR0cXFxbm5uaKiooyMjHR0dGlpaVJSUkZGRkREREJCQkFBQT09PTo6OjMzM////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAABEALAAAAAAQABAAAAVdIJEoZGmSiTgAbOuywwgEdAAY5WyTul0gAYFCB+DRWJCAqFArDo+QRcDRgBCNu1rgueMWG4FHw4u1Maa9bg8AdqSd6/a7zEZr4U35vRw4KA5aOwkrL4UxIieJCikhADs\x3d",includes:["Facebook","Rss","Twitter"]},$ClipartSection_Devices:{id:"Devices",
name:"Devices",iconBase64:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2hpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDowMTgwMTE3NDA3MjA2ODExOTJCMEJDQTgxOTc0RDYxMiIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDo4NTQ0QUU2NjhCMzMxMUUyOTQ3N0ExRTg0NEJENzk4RiIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDo4NTQ0QUU2NThCMzMxMUUyOTQ3N0ExRTg0NEJENzk4RiIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1LjEgTWFjaW50b3NoIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6MDM4MDExNzQwNzIwNjgxMTkyQjBCQ0E4MTk3NEQ2MTIiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6MDE4MDExNzQwNzIwNjgxMTkyQjBCQ0E4MTk3NEQ2MTIiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz7l5plaAAAAIVBMVEX///8zMzP3+PnV1dZ+fn7ExMZ9fX4sKis1NTVZWVmgoKKPJ3BhAAAARElEQVR42mJgIAIwM8IBM1iAkRkO2KECTFBAiQCaoZjWsrKxcgIxEHKA+BysbGysQIKLi5OVEyjCiAYYWNAAYa8CBBgA3BQB3Pw68r4AAAAASUVORK5CYII\x3d",
includes:["Cellphone","Computer","Laptop","Server","Tablet"]},$ClipartSection_DeviceSilhouettes:{id:"DeviceSilhouettes",name:"Device Silhouettes",iconBase64:"data:image/gif;base64,R0lGODlhEAAQAKIAAGZmaNXV1v///0BAQP///wAAAAAAAAAAACH5BAEAAAQALAAAAAAQABAAAAM6SErT3iu+EF5UL4/LqPfbNQRCaVbcaJ6hRK4CKr6r7MJxu6iwvX8fHUbjSDUAFEBR5AAol0wNZzpNAAA7",includes:"Android_340x480 Android_480x800 AndroidTablet Blackberry iPad iPhone".split(" ")},$ClipartSection_Media:{id:"Media",name:"Media",iconBase64:"data:image/gif;base64,R0lGODlhEAAQALMAANXV1v////z8/Pr6+vn5+fj4+Ojo6MrKyre3t6urq4iIiHV1dUdHR0BAQDMzM////yH5BAEAAA8ALAAAAAAQABAAAARZ8MlJq6Ut36c5+E3VOGAGBEAWeif6DULghk0rB8jCLAhK2zjFoXBQIFKeW2BxSDQShwWypmQUGoZGgTEFMp1Q6U+JEBKN3RsBp+P5WJ+4HCRR2e+rjX5PiQAAOw\x3d\x3d",
includes:"Camera Chat GraphBar GraphLine GraphPie Image Map Microphone PlayControl Record StreetMap Table VideoCamera VideoPlayer".split(" ")},$ClipartSection_UserInterfaceControls:{id:"UserInterfaceControls",name:"User Interface Controls",iconBase64:"data:image/gif;base64,R0lGODlhEAAQALMAAFhYWtXV1qurrKGhooKCg/////X19TMzM////wAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAgALAAAAAAQABAAAARSEElwqrUyHxG678KRIVthDoNZhGNZBFVgsppQGId5GKtYF5dKr8X5eGiSoNKXJAie0CeBSbKprsgqMDj84XS8rAt2kHWT1gJKJS4aA1nSspKJAAA7",includes:"File Folder FormattingToolbox HScrollBar HSplit ProgressBar SpinInput VScrollBar VSplit WaitingPending".split(" ")},
$ClipartSection_UserInterfaceIcons:{id:"UserInterfaceIcons",name:"User Interface Icons",iconBase64:"data:image/gif;base64,R0lGODlhEAAQANUAANXT1vj4+eLi49/f4Nra29nZ2tbW19XV1tTU1dDQ0c3NzpCQkf////7+/vX19fLy8vDw8O/v7+zs7OTk5OPj49nZ2dHR0c/Pz87Ozs3NzczMzKWlpaOjo6KioqGhoZ6enp2dnZycnJubm5mZmY+Pj4aGhoWFhYGBgX5+fnR0dHNzc2lpaWZmZllZWVdXV1VVVVNTU1FRUU5OTk1NTUxMTEJCQkBAQDY2NjMzMzIyMi8vLyoqKiYmJiMjI////wAAACH5BAEAAD4ALAAAAAAQABAAAAa8QJ/Qd0HRdD0dDXUZDj8ykqJgKGBIso/zs9IIIoFGICLQrLREWUZSmeHetookI2ueFgIGC6fSqHAzDAILJz4yFhF6LA8MD28MEQkyPjkEAQyYjS04LAwBBDk+PAYNmQ+bLYwNBjw+OJaZGzipmA4EOD4xB4mYIzgjmREHMT4mIhSZyZgUIiZELwgSvb+YEggvTT4eKQgDEB01HRATCCkcThwuIAcEAAQHIS/nTj4WJTA3OzcwJRb0/wB9BAEAOw\x3d\x3d",
includes:"Close Copy Delete Edit Error Fatal Help Home Info Lock Mail Minus Next Paste Plus Previous Print Refresh Save Search ShoppingCart Trash Warning".split(" ")},$ClipartSection_Other:{id:"Other",name:"Other",iconBase64:"data:image/gif;base64,R0lGODlhEAAQAJEAAHx8fDMzM////wAAACH5BAEAAAIALAAAAAAQABAAAAImlI9pAYoQDGxuHpvwZY8rrH1MWAWes53oRHZUK4Rkq8Gxp4roXgAAOw\x3d\x3d",includes:["Browser","Person","ProfilePicture","X"]},$ClipartSection:{id:"Clipart",name:"Clip Art",iconBase64:"data:image/gif;base64,R0lGODlhEAAQAKIAAFhYWtXV1v///0BAQP///wAAAAAAAAAAACH5BAEAAAQALAAAAAAQABAAAAMuSLo0w5CNIF6EM9grN2+Z82WCEGjcVJbopa5tlJ2nh4W2XH9LyCu+X/AHAPyOCQA7",
subsections:"$ClipartSection_Arrows $ClipartSection_Community $ClipartSection_Devices $ClipartSection_DeviceSilhouettes $ClipartSection_Media $ClipartSection_UserInterfaceControls $ClipartSection_UserInterfaceIcons $ClipartSection_Other".split(" ")},$DrawingToolsSection:{id:"DrawingTools",name:"Drawing Tools",iconBase64:"data:image/gif;base64,R0lGODlhEAAQAKIAAL+/v5aWlmNjYzMzMxwcHBYWFv///wAAACH5BAEAAAYALAAAAAAQABAAAAMgaLrc/jBKFsBcg9g7iuaFZwlhaZrD1Ikqq35Xdc10PScAOw\x3d\x3d",includes:"Text Line Arrow Polyline PolylineArrow Circle Rectangle RoundedRectangle".split(" ")},
$ViewsSection:{id:"Views",name:"Views",_COMMENT1_:"Mobile-only view widgets, often representing a single screen of UI",iconBase64:"data:image/gif;base64,R0lGODlhEAAQANUAAC5KhTFOiPj6/jJRijRTjTRUjTdXkTdXkLrH3+Hp+OHp9zdakzZYkDdYkDlbkzlck97o+ODp+N/o9ztflj5km/L2/Pj6/T5mnD9mnT5lm0FqoENupENuo0Ruo0ZxpvL2+0l3rEl4rEh2qkl3q0l2qk6BtE1+sU+BtFCDtVCFt1CEtlSLvVOJulOHuVaOv7nW78/t+////////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAADIALAAAAAAQABAAAAaAQJlwSCwKXcikcilzxZ5QaApGVclWMUAWMFhgYiRYACGStaJoDKzyuchQr7hc3jAwGAeZCR1lKRIRLDIjWVtdXyUSEhAnMh58UCCKECEyGnOYHRsbHBwyFJBPGVQwFDIThQBcXjEOYggOMg+hMQUwFgIEsg+8vb0BwMBGw8TFQkEAOw\x3d\x3d",
includes:["ScrollableView","SwapView","View"]},$HeadingSection:{id:"Heading, Section Labels",name:"Heading",_COMMENT1_:"Mobile-only Heading widgets, often titles at top of a screen",iconBase64:"data:image/gif;base64,R0lGODlhEAAQAMQAAEh1qkd2q0d2qkh2q0h2qkt7r0t8r0+BtU6CtFGGuVGHuVSLvFaNv1WLvKzM6a3M6a3M6LfS7DJlklaOv4y64Iy635zD5J3E5KzN6azM6IK13Iy734273////////wAAACH5BAEAAB4ALAAAAAAQABAAAAVQoCeOZGmeaKqqU+u+LdN6U2Tf+D15S5ZJwIzjgXFkIJmGJ2GRtCSbTWc6vSg8hw0HCN1UKFotwlPQmM/os8FDIADcgYGAIJgD3qu8fs/nhwAAOw\x3d\x3d",
includes:["Heading","ToolBarButton"]},$ContainersSection_Dojo:{id:"ContainersSection_Dojo",name:"Dojo",iconBase64:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAgY0hSTQAAeiUAAICDAAD5/wAAgOkAAHUwAADqYAAAOpgAABdvkl/FRgAAAg9JREFUeNp8ks1rE0EYxn9bE/xqikI0lITiQW+VImoONmCQtoonUbAglFDEUtlLxdo/wUNRD0Iw1kOIEmj6D9ir2FRQi4j0lILQJoimRfJB9mNmOx42iWsT+8Iw7DwPv32feUdTSuGtyeQKaT3GZHJlGEgA40AOyKT1WL6lt0rbC2hC9IFg7/a1c5HAib5Dc+WqOb/8pVjb3K4H03os6fVqXToYHgj2RiYun34KhD1S6c27jYeb2/ViWo/lW4c9dFYiPtgfMIQTNoRDw3YwbIeGcMLxwf5AM1a7fF0A436fL15pSNAUGqCUhqYp/P4Dc0AImNoPkNvaqX8MHDn4SkOBiwA0Kg1rHoh6zd0iZD4VyrWaKUpVQ1I1bSqGpGKI0udCuQZk/gu4+XhZpfXY2amRM88vnjq2vlMz7xn2biF41L8+FAl8f5a4cFw4u/mrj3KqK0BYNkDqzv3UyR6N32uFn9H334qhtY1fhyf0lzEgVd76oQDaEKVUe43NLirP97Rnn97rG5tdRCnldrCw9EFd0TNKNEwARmayCkg1tRdAavRBVo3OZAFwpMQR8m+E12+/YjcMzW4CpBsFF7AKgG1aCNM9l4bd9vjc7FZ73gDCtDpGIw27Oc5/9R6AuzeiSFsqRwjX7DH0hYK0fiKbHSSuDyEtq/MSu63zt56o/fRuL5HWxS4srTJ1+xL71Z8BAL+kU+9a36VRAAAAAElFTkSuQmCC",
includes:[["AccordionContainer","Accordion"],"BorderContainer","Container","ContentPane","FixedSplitter","Form","GridLayout","MenuBar","Pane","RoundRect","ScrollablePane","TabContainer","TitlePane","ToolBar"]},$ContainersSection_HTML:{id:"ContainersSection_HTML",name:"HTML",iconBase64:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyBpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBXaW5kb3dzIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOjVFNUZFNTNBNTk0QjExRTBBNkY0ODEzNDdCMzkxNTdDIiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOjVFNUZFNTNCNTk0QjExRTBBNkY0ODEzNDdCMzkxNTdDIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6NUU1RkU1Mzg1OTRCMTFFMEE2RjQ4MTM0N0IzOTE1N0MiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6NUU1RkU1Mzk1OTRCMTFFMEE2RjQ4MTM0N0IzOTE1N0MiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5wB++kAAABAklEQVR42qRToQ7CMBC9LYhK5Bz9AyaHYhIHEomcYxI5iRwOOYkcDgkKWxxyuElwnSq5hpJ2tAvJXnK5vuvd60u7eUII6IOBTo67SafafH31foroQEWZR8IFVibis2/M+G3BV9NYTydkCJSGPy59WzOKtMMlYghUTwLsXsMsLQA4yIwc10GUyaBxLvusAuGigM3+BHFIJceMnFW182K/ApfbQ6jhdBnjoTLrIljjLgF9WIcu0ulgm8zgzCrID2ejATnWcV+htt3BdDzydBHOzWEaBLLGucMB4lQkXycIffivTxmBzYdsJdcqd8GHnmg5ILDfLrXHIpaHIwbz+v7ObwEGADGQtFOesBZAAAAAAElFTkSuQmCC",
includes:["\x3ca\x3e","\x3cdiv\x3e","\x3cspan\x3e","\x3ctable\x3e","\x3cstyle\x3e"]},$ContainersSection:{id:"Containers",name:"Containers",_COMMENT1_:"Desktop and mobile containers",_COMMENT2_:"Note that default desktop preset only include desktop widgets",_COMMENT3_:"and mobile preset only include mobile widgets",iconBase64:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAARJJREFUeNqkUzFuhEAMNFHqHAUEiU9Q0PKS3BNo6O9aJMQDqHkM4iG05CJdGgpgfXhvvVqyECHdSNaO7PWMsRYHEaGua+z7Hgi+7wPzLZh14kACZVniPM8yTM4xTZMOqpv8nZSEENqB+e/9DmIRJ6A6Xddd3aW8FFhcrFE/TifdaEHllymeAkQYQRBAURS7OwjDEFh2U6DrOrheLrDjDXmea64FxnHU4w7DIJt/bt+AAtVenqf36cs6/DcBc2piAUSxriszMn6DF2FNcAR45BM8z9tc5N+7lkAURZBl2a57HMe2gHxIajFt20JVVasHY06Spimcv87AfS8v0eG/sWkamUiSBJhvwawTd3bf+0E8BBgAL2nsdz3dOk4AAAAASUVORK5CYII\x3d",
subsections:["$ContainersSection_Dojo","$ContainersSection_HTML"]},$ListsSection:{id:"Lists",name:"Lists",_COMMENT1_:"Mobile-only List widgets",iconBase64:"data:image/gif;base64,R0lGODlhEAAQAMQAADlck9jf6ra/zGiKukNvpERvo/P3/Ex7r0x9sUx8r1KHuVKHuFaOv3io0bnW78jg8////////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAABEALAAAAAAQABAAAAVWYCSOZGmeptEwbNs2hmgwgWHfd8DETQD9wKAh0IgsDBBEcGlQRBLIpfTwdFiv2CsVKp1GCkhlF2IgRAaC8c8gGEQeAAFuLgA8RI8BYM/nD+4ogYKDgiEAOw\x3d\x3d",includes:"RoundRectCategory RoundRectList RoundRectDataList EdgeToEdgeCategory EdgeToEdgeList EdgeToEdgeDataList ListItem".split(" ")},
$ControlsSection_Buttons:{id:"Buttons",name:"Buttons",iconBase64:"data:image/gif;base64,R0lGODlhEAAQANUAAC5KhTFPijZXkDZYkDxhmTtimUJsouHr9/D1+0h2q0l3q7XQ7bbQ7bbQ7MLX79vo9k6AtE6Bs6TH6bbR7NLj9FKJu1OJulaNv5C95aTH6KTI6LXR7L/Z8Mje8laOv36z4X604JC95LnW77/a8Nzr9////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAACUALAAAAAAQABAAAAZiwJJwSCwaj8hk0cP0XJpQj9ByqFqvVUSlFDk4vuCw4wApKR6MxmLCbm8mj0TJQNFI7nh8hmIoFTohGIKDgyEdBCUDHCAfHyCPkI0jAiUBIpeYmZckAUIAn6ChoEqkpaanRUEAOw\x3d\x3d",
includes:[["Button","\x3cbutton\x3e"],"ComboButton","DropDownButton","ToggleButton"]},$ControlsSection_CheckboxesRadios:{id:"CheckboxesRadios",name:"Checkboxes, RadioButtons, Switch",iconBase64:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAP9JREFUeNpi/P//P8PGnQf/M5AJWGAMf3d7kjUDLUYYAAITd94kWnO+uzqqC2DAQkGAgYEDwpbg4ICLv/jxA8IAUicefMD0Agw8+ABRCNL7geEHXBwkHG4uD2avuPAAtwEQS4Cqf3DAtX8A2p5urw6Xv3DjBZzNhMuPP6Da0TUHdu5ksNCQwG0ASEO8uToYv/iAqtmxcSODAjCMBAQ48BuAHtIwzQZAmzUkBIBhzIHfCyBnIgNkzQJIMYPVAJACkDNBmghpxhoLEkD/CXBIgBUXzjzI4GCgAHE2B4GkDE8HLxDpQACq8cWHH4TzAnqgkZyZQBmDHMAIys6UAIAAAwBz81X4fS5oMgAAAABJRU5ErkJggg\x3d\x3d",
includes:["CheckBox","RadioButton","Switch","TriStateCheckBox"]},$ControlsSection_IconContainer:{id:"IconContainer",name:"IconContainer",_COMMENT1_:"Mobile-only",iconBase64:"data:image/gif;base64,R0lGODlhEAAQAMQAACVLiiVLiDlck/P2+zxhlzpppj9mnDh3xUJtokdzp3ak21ON0FCDvEp6rU6As1SKvFaOv////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAABEALAAAAAAQABAAAAVoYBRBZGmWIjSsbMtC0TMo9FzTyvBEzrD8PuBvMXBEGoODMrlUHgaNSMJFXSUiiAGgwNByvV1ExFClGiIEWw6nHhAigiBxKB8I4MynM2/Hl1t3cQFfg12FfXF/LHdwAo6PkI4ik5SVkyEAOw\x3d\x3d",
includes:["IconContainer","IconItem","IconMenu","IconMenuItem"]},$ControlsSection_Pickers:{id:"Pickers",name:"Pickers",iconBase64:"data:image/gif;base64,R0lGODlhEAAQANUAAKFMUiI5ZjxsuTlckz1jmj1jmVyL0T1kmUNvpERvpERuo0Rvo16W2jx7wEeO4Et7r0x7r26ayUt8r0x8rqrS+lGHuVKHuZXN/1aOv6u7yJypq+38++v6+aiysJ6uqWpNK5RcON6CV+esnbq2tf/X0t26tuxmXtaJhL+Zmf///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAACkALAAAAAAQABAAAAZswJRwSCwSA8YhUrlMBpbPpjEqfCarUmlRezVivmBMKgweXyIMgUGMOafXKcvog2o4LKnKvH5PTUIgIh0UECkPgIIUEikLGQAnGxoJKQiOkBoKKQUcJSYkHgUpBJyeHgcpA6mqA6irqV2wsUJBADs\x3d",
includes:"Carousel CarouselItem DataCarousel DatePicker SpinWheel SpinWheelSlot SpinWheelDatePicker SpinWheelTimePicker TimePicker ValuePicker ValuePickerSlot ValuePickerDatePicker ValuePickerTimePicker".split(" ")},$ControlsSection_Select:{id:"Select",name:"Select",iconBase64:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAVJJREFUeNpi/P//PwMlgAVEhPcf+E+RAb++fWeoz3QlqLhxxh6G+gwXBH/6bgYmEOPHp69gAVGGvwxijH8ZhP/9AbNhWJwRgn9+/AxWl5TYy/D61hOgvi8QF3z/8Akswc/JjGLjfwZGMM0IZIHY3z5ADDi4ogQs+23+XgZGUCBaRE4EByUjRBeUATOEASoANe4/0DhGqOh/aBjIm+kzfn37/n+IkxZJAbhm3zWIAX9//WHg4OVlMDBQZhD6+5doA7aceQQx4M/PnwywePRN6IVEDzsrAysnJwMHDxcDGxCDaFZODoZJqfZwA/78+AWLxh9wf+9cWkK0C359/wEx4DeQAXOBe3QPXhfAwKwsJ3D6gSckmAGHV5cT7YLf36AuADkFBmxDO4lyweJCZ7DLIbEADIz/0DA4vaGSeBcA9YETkpF/JyLNMGBJTXgAI6XZGSDAAJsyjhMJL+H/AAAAAElFTkSuQmCC",
includes:["ComboBox","DropDownButton",["DropDownSelect","\x3cselect\x3e"],"FilteringSelect","MultiSelect","Select","\x3cselect\x3e"]},$ControlsSection_SlidersSpinners:{id:"SlidersSpinners",name:"Sliders, Spinners",iconBase64:"data:image/gif;base64,R0lGODlhEAAQANUAAM7W5DdYkDteljpfloOcwUBonkBonUFonkdzqEdzp3CUv+Tt+EZzp9Xk9Njm9dvo9kx+sU1+sZ/E6K3M68re8tDh89fm9VKHuYO14pC95ZG95Z/F6KzM663N68ne8tDi89Xl9FaOv4O24pG+5aDJ6tXj76nR7v///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAACcALAAAAAAQABAAAAZZwJNwSCwaj8ikcjkMOZ/J0KJBbSxCyMtnwulMPpdiKcSIUDZoiSfCCJWEERIB8RhpMppHglCBCA0mJgoHFiIYDgYKgQVCAAGPAQIgIAOQAQBIj0ybnJ2eJ0EAOw\x3d\x3d",
includes:["HorizontalSlider","NumberSpinner","Slider","TimeSpinner","VerticalSlider"]},$ControlsSection_TextBox:{id:"TextBox",name:"TextBox",iconBase64:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAM1JREFUeNpi/P//PwMlgImBQkCxASzIHIvIif/lzfQZHp66yHBieT4jUSaAwgAZm0dM+I8uhg+DXRDefwAckqGWCmBD15x48H/18QcELV9Z6MAINuDPz98MtWmODBKcTAw9QL6NvhyDipoMXs0ts/chwuD39+9gDjfDfzgtyvAXe6hDQ+bXtx8IA94+eArmsLMywml+Bmbc4cbAyPD24VOEAX9//WLIyJ7KkBJiARZctPE0w5w1JxjoEgtM2NIBiCY2ITEO/bxAsQEAAQYAGVGarS2fPq4AAAAASUVORK5CYII\x3d",
includes:[["TextBox","\x3cinput\x3e"],"ComboBox","CurrencyTextBox","DateTextBox","DateTimeTextBox","NumberTextBox","SimpleTextarea",["Textarea","TextArea","ExpandingTextArea"],"ValidationTextBox","TimeTextBox"]},$ControlsSection_Toolbars:{id:"Toolbars",name:"Toolbars, ButtonBars",iconBase64:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAOtJREFUeNpi/P//PwMlgAVEhPcf+E+RAX9+/mKoTXMiWXPTzH0MTCDGzy9f4YIxmZOIokHg19dvDIygMHAtWPq/vjQYLPgfCHecf8ngaSTOsP0cHtpQgqGxey3ECyCT3n/9CdINNsJCTZDh/ZdfcNoSRH9G8C1UBYDqfyBcYJowg7JAlJCVYGgu9CFZc+2ErRAD/v39BxZQ4STNgL9//kBi4R+QQQ749+cvzIC/ZBoAdcFfSl3w69t3sgwA6QMb8PsfeVH4599/aCwA00Jy2QIG5n+YJv1lYgKLw+h/QBqUaCBizJCERAkACDAAug6MMt3XrLUAAAAASUVORK5CYII\x3d",
includes:["TabBar","TabBarButton","Toolbar"]},$ControlsSection_Other:{id:"Other",name:"Other",iconBase64:"data:image/gif;base64,R0lGODlhEAAQANUAADlckzthmDxhl0BonkBonUVwpUp6rU+BtU+CtFOJu1OKu1aOv/b8//n9/8/t++/6//L7/+v5/+76//X8//j9/+v6/+77/+/7//L8//b9//X9//n+//j+///ovfvcsvTKofTJofbKo/TJo/TKo+20kOegfeeffuegfuWfff///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAACkALAAAAAAQABAAAAZfwJRwSCwaj8ikUrloOp/QVIJErZIc2Kwiheh4v9dKpEI+pAyetPp6eVgsEkOq8AGNRKAQyoGB9DEFKQRWVHsTGgwaGQMpAiclJiYoJ3sNDRwbFAEpAJ2en6BLoqOkpEEAOw\x3d\x3d",
includes:["ProgressIndicator","Rating","SearchBox"]},$ControlsSection:{id:"Controls",name:"Controls",_COMMENT1_:"each section can either have an array of subsections or an array of includes",iconBase64:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyBpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBXaW5kb3dzIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOjgyQUEwNTdCNTk1MTExRTBCODIzOTk0QzIzMzdBNkNGIiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOjgyQUEwNTdDNTk1MTExRTBCODIzOTk0QzIzMzdBNkNGIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6ODJBQTA1Nzk1OTUxMTFFMEI4MjM5OTRDMjMzN0E2Q0YiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6ODJBQTA1N0E1OTUxMTFFMEI4MjM5OTRDMjMzN0E2Q0YiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz7ZOYfnAAABBUlEQVR42pRSKxCDMAztdgjkJBKJnKxETk5WIpGTlcjKykpk5SSyEolETk4iI9eRrpSud7tF5NK8vHweHHoz38cHSdmVlhFkM5lN9W2dJDTKRJDNZBgxrum5oOdynB7j9NSC+aJhXjC4VCfrHQErLO0dsN2cBUDwjosOn0fyy2y19+8JsMDWjMA3QSkRPjMCW9GJ5CFWFzllu+qW1RmsXfHoW0OlNv7oYX52XRsS+rtVCbajrdGq9EeH2/rMQfZGaRPNxYwPdivpYRo1D8W+tAo3kVJ/Q+478Bt32UH5PSAFHWFVqVllRr/ploLc0VWRCyl2nT9BBDlZ8T8hKUYE/a3SS4ABAP4rm5Sxt9t9AAAAAElFTkSuQmCC",
subsections:"$ControlsSection_Buttons $ControlsSection_CheckboxesRadios $ControlsSection_IconContainer $ControlsSection_Pickers $ControlsSection_Select $ControlsSection_SlidersSpinners $ControlsSection_TextBox $ControlsSection_Toolbars $ControlsSection_Other".split(" ")},$HTMLSection_Common:{id:"Common",name:"Common",iconBase64:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAALNJREFUeNpi/P//P4NUxvb/DGQCFhjj2QxPkjUDLWZgYqAQgA34//8fmNO74TIcwwCMjU2MAagPbADTv79wyeIAXTBG1oALMAL1gcOA8f9vgoqRDQWxIfr+QF3w9w95/v/7C+qCf78x/AezBa8XgC5gAKUDhZh5/8kBIH3QQPxNlhdALqdOOmD8+5vMQIS6gPH/X/K8ANQHDQMyoxEYC9CE9I9BI6SHdBeA9f7/T1EgAgQYAMdnhUefY5wVAAAAAElFTkSuQmCC",
includes:["\x3ca\x3e","\x3cdiv\x3e","\x3clabel\x3e","\x3cspan\x3e","\x3cstyle\x3e"]},$HTMLSection_Forms:{id:"Forms",name:"Forms",iconBase64:"data:image/png;base64,R0lGODlhEAAQAOYAAPT2/PH0+/n6/Iaavoyfwt/o+OLq+Onv+pOmxt/o9+bt+N7k7unv+e3y+sbT59/p+OLr+PD0+t/p9/D1+/f5+5DDvKfMxgBZSqfNxgJbSqjNxqjMxQZeSqjNxQZfSgpiSgphSg9mSrXSyRNrShNqSb3Vy5zKtp3Ktr3Wy5zKtZ3KtR1zSaDMtSJ3ScTYzSZ6SSZ7SSl+SSl9SSp+SSp9SaTNtCyASXt0T392ToV5TIx8SpOASKOIQ5yEReDIj97WwbSQPbCOPquLQNSyaNSyadq9fObav9Wyaf///////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAEkALAAAAAAQABAAAAeQgEmCg4SFhoeIhECLi4g2NklASEgCRECHNi40RpMURUdBgjAxMzIzKCUvSAgAPkVDQkktIrS1Ii0RExERATxJKx0bGhYdGMIrDgQDDT1JJBXQ0dAjDAwHDDtJISYnKSom3CEOCMoKOkkgHOoeLCwfCxAG8hA5hRk1HD8J+w8SBTiFLlxIcqOgwYKJEipcaCgQADs\x3d",
includes:"\x3cbutton\x3e \x3cfieldset\x3e \x3cform\x3e \x3cinput\x3e \x3cselect\x3e \x3ctextarea\x3e".split(" ")},$HTMLSection_Headers:{id:"Headers",name:"Headers",iconBase64:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAIpJREFUeNpi/P//PwMlgImBQkCxASwggtW3bzeQcgFiVx5NrT0gsS/Xr2GIwQBQbiaQSgPJkewCoOZyqGaEC4jUqASkQK5SIjcMlKC4Aoj34HLBbqBNuAy4B8TKwPC4B1TjgsuAs0D8Hso2BmJBmARIIzHRWAFUCAp1V6hhQyAhUWwA49DPTAABBgDGmykkJRol4AAAAABJRU5ErkJggg\x3d\x3d",
includes:["\x3ch1\x3e","\x3ch2\x3e","\x3ch3\x3e"]},$HTMLSection_ImagesMediaIframes:{id:"ImagesMediaIframes",name:"Images, Media, Iframes",iconBase64:"data:image/gif;base64,R0lGODlhEAAQANUAAOnn6f////7+/v39/fz8/Pr6+vn5+ff39/X19fT09PLy8vHx8e/v7+fn59/f397e3tvb29bW1sfHx8LCwsHBwby8vLq6urm5uba2trS0tLKysq2traKioqCgoJycnJSUlJKSkpGRkYuLi4qKiomJiYSEhHh4eHV1dXR0dGlpaWhoaFxcXP///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAACwALAAAAAAQABAAAAaPQBYLNAQZjcJk0mgJOBeEkXI5jEwmHMJCNC1uIBNKxzTwEJWhocPxkAQIBgY3+QFpAJTJxnRarU5KRCANVxkcFygsJIEfGAx5eQoZSFQgCQkIlwREaUsgFwdXYQIXlEJpIAWiFAEfQ4EgFQFheQEWpq8gTrsBnLBNkBO2dWhDsxTIrSydQioqKc7P0iolQkEAOw\x3d\x3d",
includes:["\x3caudio\x3e","\x3cembed\x3e","\x3cimg\x3e","\x3ciframe\x3e","\x3cvideo\x3e"]},$HTMLSection_ParagraphsFormatting:{id:"ParagraphsFormatting",name:"Paragraphs, Breaks, Rules",iconBase64:"data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAEZ0FNQQAAsY58+1GTAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAHGSURBVHjaZFLJbhNREKx+b2Yc7xs2EEVZlEgR4oKEOHLiH/gEfokP4EM4I0UcEApCkYAoIDlWGC9je2ymFw4zA9jUqaWu6up6r+nT1XWn1QDAnMEU2/BB5HxoxjAAmM4XQb/TGtzrcBprfOXC2l8ugVnHox+9w6eN7kGhdy4QVQCrZB7WjqOykYMZy9E0vXg9fPKqOzgCIKou76kZs6w2WbL6laRZkmarDXNmlfqg2xvefngzGX/NbYNimkFU3328niTrMKrA+Ua18vzRg73W4ab20iq38eimOzwBSoGamWLQaVSj0PuAnAO591/uWG2/1z46aU++X+bMPw7GgpvxLJ4tgzByPiDnyXkxNKt7+83Iygd0JR/MCjgiclTAERHBDBmriG05qGrG+uLZuUk5oIQYVou5qm4JzCCii1QlYxBgAIEAGMg7EdUdBzMTsbcXn+N5EoYR+ZCcd96z4Pygd9orvuvfDMZS7GEglBUoNzfV3Qym8I/PjjebdZ4WRCAyo2atwpLuCgDcfbvsCwfCO6GXoFUyrQfrQuCdA/Dw+CyKIsDyRXZg9xvt/rA4vp/TuagSka8PczL9JyDQbC26jKezxe8BAJ6U+/2r7MIJAAAAAElFTkSuQmCC",
includes:"\x3cb\x3e \x3cbr\x3e \x3cem\x3e \x3chr\x3e \x3ci\x3e \x3cp\x3e \x3cs\x3e \x3cstrong\x3e \x3cu\x3e".split(" ")},$HTMLSection_Tables:{id:"Tables",name:"Tables",iconBase64:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAXhJREFUeNrEUz1LA0EQnTvzO/wPYsBOrQW109ImpLPIL9DWKqQQRESEFGKjYmGwEyQggUTBRn+BIhFFTXK53Z1xZi53ulcpKdxjmXnD7Lv39iMgIhhnhDDmKKTJavXyz1KOKvNBRkCIsFWe09wxFbI1iTEy5ppB0shB69v1K18BOdTYvHvUZm1k0oi7rUwhIIkAs8VJQESfwMQxVGoXv5Le7jxAwF/yZ2aVubRxRjKYmWJrqXZyQ/3I0HtvSG8fA8Xd1z49v/ToqftJi5va/30KJhqOyGQ/WL6xCcZkCkakrMcOopyFKGKvCGLNslFrDMTGqX8hECz7AKN7YwZDnwC5uXp47XndPW17uN64zXK0zidwzsH6yozKNKxg57gFpeUi11EtHZx3YG1hKiNoNO9zx8iMcjRigWQFYuJfVAMp/jmcRf8qG90sUAWoEWUZpG8FcwRICQ7ShunSniYToiIMIb3XguXELdcKnEtM6639chD8+2v8EmAA9/wqJKl9P7kAAAAASUVORK5CYII\x3d",
includes:["\x3ctable\x3e"]},$HTMLSection:{id:"HTML",name:"HTML",iconBase64:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyBpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBXaW5kb3dzIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOjVFNUZFNTNBNTk0QjExRTBBNkY0ODEzNDdCMzkxNTdDIiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOjVFNUZFNTNCNTk0QjExRTBBNkY0ODEzNDdCMzkxNTdDIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6NUU1RkU1Mzg1OTRCMTFFMEE2RjQ4MTM0N0IzOTE1N0MiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6NUU1RkU1Mzk1OTRCMTFFMEE2RjQ4MTM0N0IzOTE1N0MiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5wB++kAAABAklEQVR42qRToQ7CMBC9LYhK5Bz9AyaHYhIHEomcYxI5iRwOOYkcDgkKWxxyuElwnSq5hpJ2tAvJXnK5vuvd60u7eUII6IOBTo67SafafH31foroQEWZR8IFVibis2/M+G3BV9NYTydkCJSGPy59WzOKtMMlYghUTwLsXsMsLQA4yIwc10GUyaBxLvusAuGigM3+BHFIJceMnFW182K/ApfbQ6jhdBnjoTLrIljjLgF9WIcu0ulgm8zgzCrID2ejATnWcV+htt3BdDzydBHOzWEaBLLGucMB4lQkXycIffivTxmBzYdsJdcqd8GHnmg5ILDfLrXHIpaHIwbz+v7ObwEGADGQtFOesBZAAAAAAElFTkSuQmCC",
subsections:"$HTMLSection_Common $HTMLSection_Forms $HTMLSection_Headers $HTMLSection_ImagesMediaIframes $HTMLSection_ParagraphsFormatting $HTMLSection_Tables".split(" ")},$AppOtherSection:{id:"Other",name:"Other",iconBase64:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAcFJREFUeNqcUj1IQlEUPjfc+llqCEKwpaCgrJZqKOhnqiChsbQhF+f2moqgpaH2rDEqiiCwBB2sRbJArYa0hohSCLTQ93rvds95710VHaIDx/P5ne+ce869j3HOAW039MCPr9PwV5sddIBntJPZLAKLV+eHCDMpY2UlnP5bvyv7V9gA6qx04bMAmbwKmZwiXIWPvAI9bY0iFikSh7m8QhrUo9nKx8IknsTFGYyXcwDvohHDgbgxhWUVDbJfijE23osIO+Fnmnw79CKKzTJswEot5Aq+uV6Ix+6FJ8HewCESjJIjTtwmKWev5xAXOCEw6o2G4jR039Y5z+WK5H/FWCdX4HppLEykMtkqrJu4vaWZML2T9R2cRtP8LJygS5wa6QYDg8BdNbChmRlwMLmCd/NUjmfhu9Qr4enlALl384Q4S4N18hJ1XYeaWNMk1rRqTcUKR4Ebwq7JPiAsnss10Q9HFyY/YfKmpmKFpY0T/v2tkrvXDig+vWX54vohRXTUYMScR2gqXqGoFEqvYI7X2tQkxv6hSBq1IHHVCoHII/cHY/QJL4w7wX8ZI94t8J7gUYYYNcSPOWFyuIPJBv+1XwEGAJJgewSkj0bcAAAAAElFTkSuQmCC",
includes:"Calendar ColorPalette GridX RichText StickyNote Tree $$AllOthers$$".split(" ")},$SketchOtherSection:{id:"Other",name:"Other",iconBase64:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAcFJREFUeNqcUj1IQlEUPjfc+llqCEKwpaCgrJZqKOhnqiChsbQhF+f2moqgpaH2rDEqiiCwBB2sRbJArYa0hohSCLTQ93rvds95710VHaIDx/P5ne+ce869j3HOAW039MCPr9PwV5sddIBntJPZLAKLV+eHCDMpY2UlnP5bvyv7V9gA6qx04bMAmbwKmZwiXIWPvAI9bY0iFikSh7m8QhrUo9nKx8IknsTFGYyXcwDvohHDgbgxhWUVDbJfijE23osIO+Fnmnw79CKKzTJswEot5Aq+uV6Ix+6FJ8HewCESjJIjTtwmKWev5xAXOCEw6o2G4jR039Y5z+WK5H/FWCdX4HppLEykMtkqrJu4vaWZML2T9R2cRtP8LJygS5wa6QYDg8BdNbChmRlwMLmCd/NUjmfhu9Qr4enlALl384Q4S4N18hJ1XYeaWNMk1rRqTcUKR4Ebwq7JPiAsnss10Q9HFyY/YfKmpmKFpY0T/v2tkrvXDig+vWX54vohRXTUYMScR2gqXqGoFEqvYI7X2tQkxv6hSBq1IHHVCoHII/cHY/QJL4w7wX8ZI94t8J7gUYYYNcSPOWFyuIPJBv+1XwEGAJJgewSkj0bcAAAAAElFTkSuQmCC",
includes:"Calendar ColorPalette GridX RichText StickyNote Tree $$AllOthers$$".split(" ")},$mobileSections:"$ViewsSection $HeadingSection $ListsSection $ControlsSection $ContainersSection $HTMLSection $ClipartSection $XBLOXSection $DrawingToolsSection $AppOtherSection $StatesSection".split(" "),$desktopSections:"$ContainersSection $ControlsSection $ViewsSection $HeadingSection $ListsSection $HTMLSection $ClipartSection $XBLOXSection $DrawingToolsSection $AppOtherSection $StatesSection".split(" "),
$sketchSections:"$DrawingToolsSection $ClipartSection $ControlsSection $ContainersSection $HTMLSection $HeadingSection $ListsSection $SketchOtherSection".split(" "),$sketchExcludes:["dojox.mobile.ScrollableView","dojox.mobile.SwapView","dojox.mobile.View"],$ALLMOBILE_Sections:"$ViewsSection $HeadingSection $ListsSection $ControlsSection $ContainersSection $HTMLSection $ClipartSection $XBLOXSection $DrawingToolsSection $AppOtherSection $StatesSection".split(" "),$ALLDESKTOP_Sections:"$ContainersSection $ControlsSection $ViewsSection $HeadingSection $ListsSection $HTMLSection $ClipartSection $XBLOXSection $DrawingToolsSection $AppOtherSection $StatesSection".split(" "),
$deliteSections:["$HTMLSection","$XBLOXSection","$DELITESection","$StatesSection"],$ALLDELITE_Sections:["$HTMLSection","$XBLOXSection","$DELITESection"],$DELITESection_Controls:{id:"delite",name:"Controls",iconBase64:"data:image/gif;base64,R0lGODlhEAAQALMAAN7e4oyMjtXV1sDAwf///+Dg4MvLyzMzM////wAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAgALAAAAAAQABAAAAQ3EMlJq704a3RO2NIhBIexHYRgeFTndkQ8HmER33g60EcB/ECcYBd6wWSkDErFUs5Mms4HRK1SIwA7",includes:"Button Slider Combobox Select Checkbox RadioButton Switch ToggleButton MediaPlayer".split(" ")},
$DELITESection_Containers:{id:"delite",name:"Containers",iconBase64:"data:image/gif;base64,R0lGODlhEAAQALMAAN7e4oyMjtXV1sDAwf///+Dg4MvLyzMzM////wAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAgALAAAAAAQABAAAAQ3EMlJq704a3RO2NIhBIexHYRgeFTndkQ8HmER33g60EcB/ECcYBd6wWSkDErFUs5Mms4HRK1SIwA7",includes:["ViewStack","Panel","TabBar","Accordion"]},$DELITESection_States:{id:"delite",name:"States",iconBase64:"data:image/gif;base64,R0lGODlhEAAQALMAAN7e4oyMjtXV1sDAwf///+Dg4MvLyzMzM////wAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAgALAAAAAAQABAAAAQ3EMlJq704a3RO2NIhBIexHYRgeFTndkQ8HmER33g60EcB/ECcYBd6wWSkDErFUs5Mms4HRK1SIwA7",
includes:["CSSState"]},$DELITESection:{id:"delite",name:"Deliteful",iconBase64:"data:image/gif;base64,R0lGODlhEAAQAKIAAFhYWtXV1v///0BAQP///wAAAAAAAAAAACH5BAEAAAQALAAAAAAQABAAAAMuSLo0w5CNIF6EM9grN2+Z82WCEGjcVJbopa5tlJ2nh4W2XH9LyCu+X/AHAPyOCQA7",subsections:["$DELITESection_Controls","$DELITESection_Containers"],includes:[]},$StatesSection:{id:"States",name:"States",iconBase64:"data:image/gif;base64,R0lGODlhEAAQAKIAAL+/v5aWlmNjYzMzMxwcHBYWFv///wAAACH5BAEAAAYALAAAAAAQABAAAAMgaLrc/jBKFsBcg9g7iuaFZwlhaZrD1Ikqq35Xdc10PScAOw\x3d\x3d",
includes:["CSS","Style"]}},_COMMENT11_:"Should have one each for mobile, desktop, sketchhifi, sketchlofi",_COMMENT12_:"For each preset, collections is list of each widget collection in order of precedence",_COMMENT13_:"and sections is the array of sections for this preset (or $desktopSections)",presets:{mobile:{collections:[{id:"dojoxmobile",show:!0},{id:"dijit",show:!1},{id:"html",show:!0},{id:"clipart",show:!0},{id:"shapes",show:!0}],sections:"$mobileSections"},desktop:{collections:[{id:"dijit",
show:!0},{id:"dojoxmobile",show:!1},{id:"html",show:!0},{id:"clipart",show:!0},{id:"xblox",show:!0},{id:"shapes",show:!0},{id:"delite",show:!0}],sections:"$desktopSections"},delite:{collections:[{id:"dijit",show:!1},{id:"dojoxmobile",show:!1},{id:"html",show:!0},{id:"xblox",show:!0},{id:"delite",show:!0},{id:"shapes",show:!0},{id:"clipart",show:!0}],sections:"$deliteSections"},sketchhifi:{collections:[{id:"shapes",show:!0},{id:"clipart",show:!1},{id:"dijit",show:!0},{id:"dojoxmobile",show:!0},{id:"html",
show:!0}],sections:"$sketchSections",exclude:"$sketchExcludes"},sketchlofi:{collections:[{id:"shapes",show:!0},{id:"clipart",show:!1},{id:"dijit",show:!0},{id:"dojoxmobile",show:!1},{id:"html",show:!0}],sections:"$sketchSections",exclude:"$sketchExcludes"},$ALLMOBILE:{_COMMENT1_:"$ALLMOBILE is a special preset which shows all widgets",_COMMENT2_:"regardless of the current composition type",_COMMENT3_:"ranking mobile widgets above desktop widgets",collections:[{id:"dojoxmobile",show:!0},{id:"dijit",
show:!0},{id:"html",show:!0},{id:"clipart",show:!0},{id:"xblox",show:!0},{id:"shapes",show:!0}],sections:"$ALLMOBILE_Sections"},$ALLDESKTOP:{_COMMENT1_:"$ALLDESKTOP is a special preset which shows all widgets",_COMMENT2_:"regardless of the current composition type",_COMMENT3_:"ranking desktop widgets above mobile widgets",collections:[{id:"dijit",show:!0},{id:"dojoxmobile",show:!0},{id:"html",show:!0},{id:"clipart",show:!0},{id:"xblox",show:!0},{id:"shapes",show:!0}],sections:"$ALLDESKTOP_Sections"},
$ALLDELITE:{_COMMENT1_:"$ALLDESKTOP is a special preset which shows all widgets",_COMMENT2_:"regardless of the current composition type",_COMMENT3_:"ranking desktop widgets above mobile widgets",collections:[{id:"dijit",show:!1},{id:"dojoxmobile",show:!1},{id:"html",show:!0},{id:"clipart",show:!0},{id:"xblox",show:!0},{id:"shapes",show:!0},{id:"delite",show:!0}],sections:"$ALLDELITE_Sections"}}}:this._initializationInfo[b]},getDefaultThemeSet:function(){return this.getSiteConfigData("defaultThemeSet")},
getUserDisplayName:function(b){b||(b=this.getUser());var d=b.userDisplayName;b.userDisplayName||(d=b.email);return d},getUserEmail:function(b){b||(b=this.getUser());return b.email},getUserDisplayNamePlusEmail:function(b){b||(b=this.getUser());var d=this.getUserDisplayName(b);d!=b.email&&(d+=" \x26lt;"+b.email+"\x26gt;");return d},loadPlugins:function(){b.forEach(function(b){var d=b.id;e.plugins[d]=b;for(var c in b){var a=b[c];"string"!=typeof a&&(a instanceof Array?a.forEach(function(a){e._addExtension(c,
a,d)}):e._addExtension(c,a,d))}})},singleUserMode:function(){return e.isLocalInstall},_stripMaqetta:!0,location:function(){var b=document.location.href.split("?")[0],b=b.replace("index.php",""),b=b.replace("maqetta.html",""),b=b.replace("xui.php",""),b=b.replace("xui.php?debug\x3dtrue",""),b=b.replace("maqettar.html",""),b=b.replace("index.html",""),b=b.replace("?",""),b=b.replace("debug\x3dtrue",""),b=b.replace("\x26isDesktop\x3dtrue","");this._stripMaqetta&&(b=b.replace("maqetta/",""));return b},
getUserWorkspaceUrl:function(){if(this.userBaseUrl)return this.userBaseUrl},run:function(){dojo.isMac&&dojo.addClass(document.documentElement,"isMac");var b=document.body.style;e.supportsCSS3Transitions=void 0!==b.WebkitTransition||void 0!==b.MozTransition||void 0!==b.OTransition||void 0!==b.transition;e.subscribe("/davinci/ui/selectionChanged",e._selectionChanged);dojo.connect(dojo.doc.documentElement,"onkeypress",function(d){8==d.charOrCode&&(window.davinciBackspaceKeyTime=Date.now())});dojo.connect(dojo.doc.documentElement,
"onkeydown",this,"_handleGlobalDocumentKeyEvent");dojo.addOnUnload(function(d){for(var c=null,a=davinci.Workbench&&davinci.Workbench.editorTabs?davinci.Workbench.editorTabs.getChildren():[],q=0,b=0;b<a.length;b++){var e=a[b];e.editor&&(e=e.editor.getOnUnloadWarningMessage())&&(c||(c=e),q++)}1<q&&(c=dojo.string.substitute(p.multipleFilesUnsaved,[c,q]));!c&&100>Date.now()-window.davinciBackspaceKeyTime&&(c=p.careful);if(c){if(d=d||window.event)d.returnValue=c;return c}})},subscribe:function(b,d){e.subscriptions.push(dojo.subscribe(b,
this,d))},destroy:function(){dojo.forEach(e.subscriptions,dojo.unsubscribe)},_addExtension:function(b,d,c){d.id&&(d.id=c+"."+d.id);e.extensionPoints[b]=e.extensionPoints[b]||[];c=e.extensionPoints[b];c.push(d);e.extensionPoints[b]=c},getExtensions:function(b,d){var c=e.extensionPoints[b];if(d){var a=d instanceof Function;if(c)return c.filter(function(c){return a&&d(c)||c.id==d})}return c},getExtension:function(b,d){return e.getExtensions(b,d)[0]},handleError:function(b){var d="welcome";e.singleUserMode()&&
(d=".");window.document.body.innerHTML=dojo.string.substitute(p.serverConnectError,{redirectUrl:d,error:b})},executeCommand:function(b){(b=e.getExtension("davinci.commands",b))&&b.run&&b.run()},_selectionChanged:function(b){e.currentSelection=b},getSelection:function(){return e.currentSelection},serverJSONRequest:function(b){var d,c={handleAs:"json"};dojo.mixin(c,b);dojo.xhrGet(c).then(function(a){a&&(d=a)});return d},registerKeyBinding:function(b,d){this._globalKeyBindings||(this._globalKeyBindings=
[]);this._globalKeyBindings.push({keyBinding:b,action:d})},handleKeyEvent:function(b){this._handleKeyEvent(b,!0)},_handleGlobalDocumentKeyEvent:function(b){this._handleKeyEvent(b)},_handleKeyEvent:function(b,d){if(this._globalKeyBindings){var c=!1;(c=dojo.some(this._globalKeyBindings,dojo.hitch(this,function(a){if(e.isKeyEqualToEvent(a.keyBinding,b))return davinci.Workbench._runAction(a.action),!0})))?dojo.stopEvent(b):d||this.currentEditor&&this.currentEditor.handleKeyEvent&&this.currentEditor.handleKeyEvent(b,
!0)}},isKeyEqualToEvent:function(b,d){var c=!0,a=d.altKey&&!dojo.isMac||dojo.isMac&&d.ctrlKey;!!b.accel!==(d.ctrlKey&&!dojo.isMac||dojo.isMac&&d.metaKey)&&(c=!1);!!b.meta!==a&&(c=!1);!!b.shift!==d.shiftKey&&(c=!1);c&&b.charOrCode&&d.which&&(c=dojo.isArray(b.charOrCode)?dojo.some(b.charOrCode,dojo.hitch(this,function(a){return this._comparecharOrCode(a,d)})):this._comparecharOrCode(b.charOrCode,d));return c},_comparecharOrCode:function(b,d){return dojo.isString(b)?b.toLowerCase()===String.fromCharCode(d.which).toLowerCase():
b===d.which}};return e})},"davinci/lang/webContent":function(){define([],function(){return{designer:"Designer,",welcome:"Welcome",loadingMaqetta:"\x26nbsp;Loading Maqetta...",startupError:"Error starting Maqetta: ${0}",logOff:"Log Out",unsupportedBrowser:"Unsupported Browser",unsupportedNote:'Maqetta supports Firefox 4, Chrome 5, and Safari 5.1 or greater. If you wish to continue with an unsupported browser, click "Continue."',buttonContinue:"Continue",pageDesignerTitle:"Maqetta Designer",maqettaUser:"Maqetta User",
localhostUser:"localhost user",sessionTimedOut:"Session timed out",sessionTimedOutMsg:"The session has timed out, please \x3ca href\x3d'${hrefLoc}'\x3elog in\x3c/a\x3e again. (Auto-redirect within 10 seconds)",devicePreviewError:"Maqetta device previewer error. Must supply URL parameter 'file\x3d'",devicePreviewPreviewing:"Previewing:",help:"Help",tutorials:"Tutorials",aboutMaqetta:"About Maqetta",review:"Review and Commenting,",reviewPageTitle:"Maqetta Review Board",careful:"Warning: You are about to leave Maqetta.",
errorLoadingPlugin:"error loading plugin ${0}, response\x3d${1}",errorLoadingPlugins:"error loading plugins",multipleFilesUnsaved:"${0} (NOTE: This is one of ${1} files with unsaved changes.)",idleSessionMessage:"Your session will timeout in ${seconds} seconds, click anywhere in the page to continue using Maqetta.",fileHasUnsavedChanges:"Save changes to ${0}?",perspectiveNotFound:"perspective not found: ${0}",scopeNotDefined:"scope not defined for action: ${0}",funcNotDefined:"function not defined for action: ${0}",
serverConnectError:"\x3ch3\x3eError connecting to the Maqetta Server.\x3c/h3\x3e\x3cbr\x3e\x3cdiv\x3ePlease click here to \x3ca href\x3d'${redirectUrl}'\x3ereturn to Maqetta\x3c/a\x3e\x3cdiv\x3e\x3cdiv\x3eError description: ${error}\x3c/div\x3e"}})},"davinci/commands/CommandStack":function(){define(["dojo/_base/declare"],function(p){return p("davinci.commands.CommandStack",null,{constructor:function(n){this._context=n;this._undoStack=[];this._redoStack=[]},execute:function(n,m){if(n){var h;h=this._context&&
"davinci.ve.themeEditor.Context"!=this._context.declaredClass?dojo.withDoc(this._context.getDocument(),"execute",n,[this._context,m]):n.execute(m);this._undoStack.push(n);this._redoStack=[];if(!h)this.onExecute(n,"execute")}},undo:function(){if(this.canUndo()){var n=this._undoStack.pop();n._runDelegate?n._runDelegate.undoDelegate(n):this._context&&"davinci.ve.themeEditor.Context"!=this._context.declaredClass?dojo.withDoc(this._context.getDocument(),"undo",n):n.undo();this._redoStack.push(n);this.onExecute(n,
"undo")}},redo:function(){if(this.canRedo()){var n=this._redoStack.pop();n._runDelegate?n._runDelegate.redoDelegate(n):this._context&&"davinci.ve.themeEditor.Context"!=this._context.declaredClass?dojo.withDoc(this._context.getDocument(),"execute",n):n.execute();this._undoStack.push(n);this.onExecute(n,"redo")}},canUndo:function(){return 0<this._undoStack.length},canRedo:function(){return 0<this._redoStack.length},getUndoCount:function(){return this._undoStack.length},getRedoCount:function(){return this._redoStack.length},
clear:function(){this._undoStack=[];this._redoStack=[]},jump:function(n,m){var h=this.getUndoCount(),g=this.getRedoCount();if(n==h)return n;if(0>n||n>h+g)return-1;h=n-h;if(m)if(0>h)for(;0>h;)this._redoStack.push(this._undoStack.pop()),h++;else for(;0<h;)this._undoStack.push(this._redoStack.pop()),h--;else if(0>h)for(;0>h;)this.undo(),h++;else for(;0<h;)this.redo(),h--;return n},onExecute:function(n,m){},undoDelegate:function(n){},redoDelegate:function(n){}})})},"davinci/ui.plugin":function(){define(["require"],
function(p){return{id:"davinci.ui","davinci.view":[{id:"navigator",title:"Files",viewClass:"davinci/workbench/Explorer",iconClass:"paletteIcon paletteIconFiles"},{id:"hierarchy",title:"Hierarchy"},{id:"devices",title:"Devices",viewClass:"davinci/workbench/DeviceTreeView",iconClass:"paletteIcon paletteIconOutline"},{id:"files",title:"XFiles",viewClass:"davinci/workbench/FileView",iconClass:"paletteIcon paletteIconOutline"},{id:"comment",title:"Comments",viewClass:"davinci/review/view/CommentView",
iconClass:"paletteIcon paletteIconComments"},{id:"scope",title:"Scope"},{id:"properties",title:"Properties",viewClass:"davinci/workbench/PropertyEditor"},{id:"console",title:"Console"},{id:"history",title:"History"},{id:"search",title:"Search"}],"davinci.preferences":[{name:"Project",id:"project",hide:!0,category:"",pageContent:"Project Settings here"},{name:"Project Settings",id:"ProjectPrefs",category:"davinci.ui.project",pane:"davinci/ui/ProjectPreferences",defaultValues:{webContentFolder:"",themeFolder:"themes",
widgetFolder:"lib/custom"}}],"davinci.perspective":{id:"main",title:"AJAX IDE",views:[{viewID:"davinci.ui.navigator",position:"left-bottom"},{viewID:"davinci.ui.outline",position:"right"},{viewID:"davinci.ui.properties",position:"right-bottom"}]},"davinci.actionSets":[{id:"editorActions",visible:!0,menu:[{__mainMenu:!0,separator:["new",!1,"open",!1]},{label:"Create",path:"new",id:"davinci.new",separator:["newApp",!0,"newSketch",!0,"newFolder",!0,"newTheme",!0,"newProject",!0,"additions",!0]},{label:"Open",
path:"open",id:"davinci.open",separator:["openFile",!0,"openTheme",!0,"openOrion",!1,"additions",!1]}],actions:[{id:"newHTMLMobile",run:function(){p(["./ui/Resource"],function(n){n.newHTMLMobile()})},iconClass:"newOpenMenuItem newMobileAppMenuItem",label:"Mobile Application...",menubarPath:"davinci.new/newApp"},{id:"newHTMLDesktop",run:function(){p(["./ui/Resource"],function(n){n.newHTMLDesktop()})},iconClass:"newOpenMenuItem newDesktopAppMenuItem",label:"Desktop Application...",menubarPath:"davinci.new/newApp"},
{id:"newHTMLSketchHiFi",run:function(){p(["./ui/Resource"],function(n){n.newHTMLSketchHiFi()})},iconClass:"newOpenMenuItem newSketchHiFiMenuItem",label:"Sketch (high-fidelity)...",menubarPath:"davinci.new/newSketch"},{id:"newHTMLSketchLoFi",run:function(){p(["./ui/Resource"],function(n){n.newHTMLSketchLoFi()})},iconClass:"newOpenMenuItem newSketchLoFiMenuItem",label:"Sketch (low-fidelity)...",menubarPath:"davinci.new/newSketch"},{id:"newFolder",run:function(){p(["./ui/Resource"],function(n){n.newFolder()})},
iconClass:"newOpenMenuItem newFolderMenuItem",label:"Folder...",menubarPath:"davinci.new/newFolder"},{id:"newCSS",run:function(){p(["./ui/Resource"],function(n){n.newCSS()})},iconClass:"newOpenMenuItem newCSSMenuItem",label:"CSS File...",menubarPath:"davinci.new/newFolder"},{id:"newJS",run:function(){p(["./ui/Resource"],function(n){n.newJS()})},iconClass:"newOpenMenuItem newJSMenuItem",label:"JavaScript File...",menubarPath:"davinci.new/newFolder"},{id:"newTheme",run:function(){p(["davinci/Workbench",
"davinci/ui/NewTheme"],function(n,m){n.showModal(new m,"New Theme",{width:300},null,!0)})},iconClass:"newOpenMenuItem newThemeMenuItem",label:"Theme...",menubarPath:"davinci.new/newTheme"},{id:"newProject",run:function(){p(["./ui/Resource"],function(n){n.newProject()})},iconClass:"newOpenMenuItem newProjectMenuItem",label:"Project...",menubarPath:"davinci.new/newProject"},{id:"openThemeEditor",run:function(){p(["davinci/Workbench","davinci/ui/OpenThemeDialog"],function(n,m){n.showModal(new m,"Open Theme",
{width:200},null,!0)})},iconClass:"newOpenMenuItem openThemeMenuItem",label:"Theme Editor...",menubarPath:"davinci.open/openTheme"},{id:"openReview",run:function(){p(["./ui/Resource"],function(n){n.openFile()})},run:function(){p(["davinci/Workbench","davinci/review/widgets/OpenReviewDialog"],function(n,m){n.showModal(new m,"Open Review",{width:350,height:250})})},iconClass:"newOpenMenuItem openReviewMenuItem",label:"Review...",menubarPath:"davinci.open/openTheme"},{id:"orionNavigator",run:function(){window.open("../navigate/table.html#",
"_blank");window.focus()},iconClass:"newOpenMenuItem orionIcon",label:"Orion Navigator",menubarPath:"davinci.open/openOrion"}]},{id:"main",visible:!0,menu:[{__mainMenu:!0,separator:["usersettings",!1,"settings",!1,"additions",!1,"help",!1]},{label:"User settings",path:"usersettings",id:"davinci.usersettings",className:"userSettingsMenu",iconClass:"userSettingsMenuIcon",showLabel:!1,separator:["username",!0,"logout",!0,"additions",!1]},{label:"Settings",path:"settings",id:"davinci.settings",className:"appSettingsMenu",
iconClass:"appSettingsMenuIcon",showLabel:!1,separator:["settings",!0,"additions",!1]},{label:"Help",path:"help",id:"davinci.help",className:"helpMenu",iconClass:"helpMenuIcon",showLabel:!1,separator:["help",!0,"about",!1,"additions",!1]}],actions:[{id:"editPreferences",run:function(){p(["davinci/workbench/Preferences"],function(n){n.showPreferencePage()})},label:"Preferences...",menubarPath:"davinci.settings/settings"},{id:"editThemeSets",run:function(){p(["davinci/ui/ThemeSetsDialog"],function(n){n()})},
label:"Theme sets...",menubarPath:"davinci.settings/settings"},{id:"showHelp",run:function(){window.open("app/docs/index.html","MaqettaDocumentation")},label:"Documentation",menubarPath:"davinci.help/help",keyBinding:{charOrCode:dojo.keys.F1}},{id:"showTutotials",run:function(){window.open("app/docs/index.html#tutorials/tutorials","MaqettaTutorials")},label:"Tutorials",menubarPath:"davinci.help/help"},{id:"showVideos",run:function(){window.open("http://www.youtube.com/user/Maqetta/","MaqettaVideos")},
label:"Videos",menubarPath:"davinci.help/help"},{id:"showCheatSheets",run:function(){window.open("app/docs/index.html#cheatsheets/cheatsheets","MaqettaCheatSheets")},label:"Cheat sheets",menubarPath:"davinci.help/help"},{id:"showHowTo",run:function(){window.open("https://www.ibm.com/search/csass/search/?sn\x3ddw\x26en\x3dutf\x26hpp\x3d20\x26dws\x3ddw\x26q\x3dmaqetta\x26Search\x3dSearch","MaqettaHowTo")},label:"How-to articles",menubarPath:"davinci.help/help"},{id:"about",run:function(){p(["davinci/ui/about"],
function(n){n.show()})},label:"About Maqetta",menubarPath:"davinci.help/about"},{id:"username",action:"davinci/actions/UserNameAction",run:function(){window.open("../settings/settings.html","_blank");window.focus()},label:"{user}",menubarPath:"davinci.usersettings/username"},{id:"logout",action:"davinci/actions/LogoutAction",label:"Logout",menubarPath:"davinci.usersettings/logout"}]},{id:"explorerActions",visible:!0,actions:[{id:"davinci.ui.rename",label:"Rename...",iconClass:"renameIcon",run:function(){p(["./ui/Resource"],
function(n){n.renameAction()})},isEnabled:function(n){return p("./ui/Resource").canModify(n)},menubarPath:"addFiles"},{id:"davinci.ui.delete",label:"Delete",iconClass:"deleteIcon",isEnabled:function(n){return p("./ui/Resource").canModify(n)},run:function(){p(["./ui/Resource"],function(n){n.deleteAction()})},menubarPath:"delete",keyBinding:{charOrCode:[dojo.keys.DELETE,dojo.keys.BACKSPACE]}},{id:"davinci.ui.download",label:"Download",iconClass:"downloadSomeIcon",action:"davinci/actions/DownloadAction",
isEnabled:function(n){return p("./ui/Resource").canModify(n)},menubarPath:"delete"}]}],"davinci.actionSetPartAssociations":[{targetID:"davinci.ui.editorActions",parts:["davinci.ui.editorMenuBar"]},{targetID:"davinci.ui.explorerActions",parts:["davinci.ui.navigator"]}],"davinci.viewActions":[{viewContribution:{targetID:"davinci.ui.problems",actions:[{id:"Copy2",iconClass:"copyIcon",run:function(){alert("view toolbar")},label:"Copy",toolbarPath:"davinci.toolbar.main/edit",menubarPath:"davinci.edit/cut"}]}},
{viewContribution:{targetID:"workbench.Explorer",actions:[{id:"davinci.ui.newfile",label:"New folder...",iconClass:"newFolderIcon",className:"FilesToolbarNewFolder",run:function(){p(["./ui/Resource"],function(n){n.newFolder()})},toolbarPath:"download"},{id:"davinci.ui.deletefile",label:"Delete file...",iconClass:"FilesToolbarDeleteFileIcon",className:"FilesToolbarDeleteFile",run:function(){p(["./ui/Resource"],function(n){n.deleteAction()})},toolbarPath:"download"},{id:"davinci.ui.renamefile",label:"Rename file...",
iconClass:"FilesToolbarRenameFileIcon",className:"FilesToolbarRenameFile",run:function(){p(["./ui/Resource"],function(n){n.renameAction()})},toolbarPath:"download"},{id:"download",iconClass:"downloadSomeIcon",className:"FilesToolbarDownloadSelected",run:function(){p(["./Workbench","./ui/DownloadSelected"],function(n,m){n.showModal(new m,"Download",{width:440})})},label:"Download Selected Files",toolbarPath:"download"},{id:"download",iconClass:"downloadAllIcon",className:"FilesToolbarDownloadAll",
run:function(){p(["./Workbench","./ui/Download"],function(n,m){n.showModal(new m,"Download",{width:440})})},label:"Download Entire Project",toolbarPath:"download"}]}}]}})},"davinci/html/html.plugin":function(){define(["require"],function(p){return{id:"davinci.html","davinci.editor":[{id:"HTMLEditor",name:"HTML Editor",extensions:"html",isDefault:!1,editorClass:"davinci/html/ui/HTMLEditor",palettePerspective:"davinci.html.htmlEditor",expandPalettes:["left"]},{id:"CSSEditor",name:"CSS Editor",extensions:"css",
isDefault:!1,editorClass:"davinci/html/ui/CSSEditor",palettePerspective:"davinci.html.htmlEditor",expandPalettes:["left"]},{id:"ImageViewer",name:"Image Viewer",extensions:"jpg,gif,jpeg,png",isDefault:!0,editorClass:"davinci/html/ui/ImageViewer",palettePerspective:"davinci.html.htmlEditor",expandPalettes:["left"]}],"davinci.editorActions":{editorContribution:{targetID:"davinci.html.CSSEditor",actions:[{id:"savecombo",className:"maqLabelButton",showLabel:!0,label:"Save",toolbarPath:"save",type:"ComboButton",
run:function(){p(["../Workbench"],function(n){p("../ui/Resource").save()})},isEnabled:function(n){return p("../Workbench").getOpenEditor()},menu:[{iconClass:"saveIcon",run:function(){p("../ui/Resource").save()},isEnabled:function(n){return p("../Workbench").getOpenEditor()},label:"Save",keyBinding:{accel:!0,charOrCode:"s",allowGlobal:!0}},{iconClass:"saveAsIcon",run:function(){p("../ui/Resource").saveAs("html")},isEnabled:function(n){return p("../Workbench").getOpenEditor()},label:"Save As",keyBinding:{accel:!0,
shift:!0,charOrCode:"s",allowGlobal:!0}}]}]}},"davinci.preferences":[{name:"HTML",id:"general",category:""}],"davinci.fileType":[{extension:"html",iconClass:"htmlFileIcon",type:"text"},{extension:"css",iconClass:"cssFileIcon",type:"text"},{extension:"jpeg",iconClass:"imageFileIcon",type:"image"},{extension:"jpg",iconClass:"imageFileIcon",type:"image"},{extension:"png",iconClass:"imageFileIcon",type:"image"},{extension:"gif",iconClass:"imageFileIcon",type:"image"}],"davinci.perspective":[{id:"htmlEditor",
title:"HTML Editor",views:[{viewID:"davinci.ve.Palette",position:"left",hidden:!0},{viewID:"davinci.ui.outline",position:"left",hidden:!0},{viewID:"davinci.ve.style",position:"right"},{viewID:"davinci.ui.comment",position:"right",hidden:!0},{viewID:"davinci.ve.states",position:"right-bottom",hidden:!0},{viewID:"davinci.ui.navigator",position:"left-bottom",selected:!0},{viewID:"davinci.review.reviewNavigator",position:"left"}]}]}})},"davinci/js/js.plugin":function(){define(["require"],function(p){return{id:"davinci.js",
"davinci.editor":[{id:"JSEditor",name:"JavaScript Editor",extensions:"js,json",isDefault:!1,editorClass:"davinci/js/ui/JavaScriptEditor",palettePerspective:"davinci.html.htmlEditor",expandPalettes:["left"]},{id:"XIDEEditor",name:"Editor",extensions:"js,json",isDefault:!0,editorClass:"davinci/xide/Editor",palettePerspective:"davinci.html.htmlEditor",expandPalettes:["left"]}],"davinci.actionSets":[{id:"jsSource",visible:!0,menu:[{label:"Source",path:"edit",id:"davinci.js.source",separator:["commentGroup",
!0,"editGroup",!0,"codeGroup",!0,"additions",!1]}],actions:[{id:"davinci.js.comment",icon:null,run:function(){alert("toggle comment")},label:"Toggle Comment",menubarPath:"davinci.js.source/commentGroup"}]},{id:"jsEdit",visible:!0,actions:[{id:"davinci.js.cut",icon:null,label:"cut",commandID:"davinci.js.cut",menubarPath:"davinci.edit/cut"},{id:"davinci.js.add",icon:null,label:"add",commandID:"davinci.js.add",menubarPath:"davinci.edit/add"},{id:"davinci.js.delete",icon:null,label:"delete",commandID:"davinci.js.delete",
menubarPath:"davinci.edit/delete"}]}],"davinci.actionSetPartAssociations":[{targetID:"davinci.js.jsEdit",parts:["davinci.ui.outline","davinci.js.JSEditor"]}],"davinci.editorActions":{editorContribution:{targetID:"davinci.js.JSEditor",actions:[{id:"savecombo",className:"maqLabelButton",showLabel:!0,label:"Save",toolbarPath:"save",type:"ComboButton",run:function(){p(["../Workbench"],function(n){p("../ui/Resource").save()})},isEnabled:function(n){return p("../Workbench").getOpenEditor()},menu:[{iconClass:"saveIcon",
run:function(){p("../ui/Resource").save()},isEnabled:function(n){return p("../Workbench").getOpenEditor()},label:"Save",keyBinding:{accel:!0,charOrCode:"s",allowGlobal:!0}},{iconClass:"saveAsIcon",run:function(){p("../ui/Resource").saveAs("html")},isEnabled:function(n){return p("../Workbench").getOpenEditor()},label:"Save As",keyBinding:{accel:!0,shift:!0,charOrCode:"s",allowGlobal:!0}}]}]}},"davinci.commands":[{id:"cut",run:function(){}},{id:"add",run:function(){}},{id:"delete",run:function(){}}],
"davinci.keyBindings":[{platform:"win",sequence:"M1+C",commandID:"davinci.js.copy",contextID:"davinci.js.JSEditor"}],"davinci.preferences":[{name:"JavaScript",id:"general",category:""},{name:"Formatting",id:"format",category:"davinci.js.general",pane:"davinci/js/ui/FormatOptions",defaultValues:{blockNewLine:!1,blockIndent:3,functionNewLine:!1,functionIndent:5,functionParamSpaceing:1,labelSpace:1,forParamSpacing:0,breakOnLabel:!0,ifStmtSpacing:0,varAssignmentSpaceing:0,switchSpacing:3,objectLitFieldSpace:1}}],
"davinci.fileType":[{extension:"js",iconClass:"jsFileIcon",type:"text"},{extension:"json",iconClass:"jsFileIcon",type:"text"}]}})},"davinci/ve/ve.plugin":function(){define(["require"],function(p){return{id:"davinci.ve","davinci.view":[{id:"Palette",title:"Palette",viewClass:"davinci/ve/palette/HtmlWidgets",iconClass:"paletteIcon paletteIconWidgets"},{id:"states",title:"Scenes",viewClass:"davinci/ve/views/StatesView",iconClass:"paletteIcon paletteIconStates"},{id:"datastores",title:"DataStores",viewClass:"davinci/ve/views/DataStoresView"},
{id:"object",title:"Object",viewClass:"davinci/ve/views/ObjectView"},{id:"style",title:"",viewClass:"davinci/ve/views/SwitchingStyleView"}],"davinci.perspective":[{id:"pageDesign",title:"Page Design",views:[{viewID:"davinci.ve.Palette",position:"left",selected:!0},{viewID:"davinci.ui.outline",position:"left"},{viewID:"davinci.ui.devices",position:"left"},{viewID:"davinci.ui.files",position:"left"},{viewID:"davinci.ve.style",position:"right"},{viewID:"davinci.ui.comment",position:"right",hidden:!0},
{viewID:"davinci.ve.states",position:"right-bottom",selected:!0},{viewID:"davinci.ui.navigator",position:"left-bottom",selected:!0},{viewID:"davinci.review.reviewNavigator",position:"left-bottom"}]}],"davinci.editor":[{id:"HTMLPageEditor",name:"HTML Visual Editor",extensions:["html","htm","php"],isDefault:!0,editorClass:"davinci/ve/PageEditor",palettePerspective:"davinci.ve.pageDesign",expandPalettes:["left"]}],"davinci.actionSets":[{id:"cutCopyPaste",visible:!0,actions:[{label:"Cut",keySequence:"M1+X",
iconClass:"editActionIcon editCutIconSmall",action:"davinci/ve/actions/CutAction",menubarPath:"davinci.edit/cut"},{label:"Copy",keySequence:"M1+C",iconClass:"editActionIcon editCopyIconSmall",action:"davinci/ve/actions/CopyAction",menubarPath:"davinci.edit/cut"},{keySequence:"M1+V",iconClass:"editActionIcon editPasteIconSmall",label:"Paste",action:"davinci/ve/actions/PasteAction",menubarPath:"davinci.edit/cut"},{keySequence:"DEL",iconClass:"editActionIcon editDeleteIconSmall",label:"Delete",action:"davinci/ve/actions/DeleteAction",
menubarPath:"davinci.edit/cut"},{iconClass:"fa-crosshairs",label:"Show in Outline",action:"davinci/ve/actions/ShowInOutline",menubarPath:"davinci.edit/cut"},{iconClass:"editActionIcon selectParentIconSmall",label:"Select parent",action:"davinci/ve/actions/SelectParentAction",menubarPath:"davinci.edit/cut"},{iconClass:"editActionIcon selectAncestorIconSmall",label:"Select ancestor...",action:"davinci/ve/actions/SelectAncestorAction",menubarPath:"davinci.edit/cut"},{iconClass:"editActionIcon unselectAllIconSmall",
label:"Unselect all",action:"davinci/ve/actions/UnselectAllAction",menubarPath:"davinci.edit/cut"},{iconClass:"editActionIcon",label:"Surround with \x26lt;A\x26gt;",action:"davinci/ve/actions/SurroundAction",surroundWithTagName:"a",menubarPath:"davinci.edit/cut"},{iconClass:"editActionIcon",label:"Surround with \x26lt;DIV\x26gt;",action:"davinci/ve/actions/SurroundAction",surroundWithTagName:"div",menubarPath:"davinci.edit/cut"},{iconClass:"editActionIcon",label:"Surround with \x26lt;SPAN\x26gt;",
action:"davinci/ve/actions/SurroundAction",surroundWithTagName:"span",menubarPath:"davinci.edit/cut"},{iconClass:"editActionIcon moveToFrontIconSmall",label:"Move to front",action:"davinci/ve/actions/MoveToFrontAction",menubarPath:"davinci.edit/cut"},{iconClass:"editActionIcon moveForwardIconSmall",label:"Move forward",action:"davinci/ve/actions/MoveForwardAction",menubarPath:"davinci.edit/cut"},{iconClass:"editActionIcon moveBackwardIconSmall",label:"Move backward",action:"davinci/ve/actions/MoveBackwardAction",
menubarPath:"davinci.edit/cut"},{iconClass:"editActionIcon moveToBackIconSmall",label:"Move to back",action:"davinci/ve/actions/MoveToBackAction",menubarPath:"davinci.edit/cut"},{iconClass:"editActionIcon",label:"Manage States...",action:"davinci/ve/actions/ManageStates",menubarPath:"davinci.edit/cut",command:"File/ManageStates",group:"View"}]}],"davinci.viewActions":[{viewContribution:{targetID:"davinci.ve.outline",actions:[{id:"design",iconClass:"designModeIcon editActionIcon",radioGroup:"displayMode",
method:"switchDisplayMode",label:"Widgets",toolbarPath:"displayMode"},{id:"source",iconClass:"sourceModeIcon editActionIcon",method:"switchDisplayMode",radioGroup:"displayMode",label:"Source",toolbarPath:"displayMode"}]}},{viewContribution:{targetID:"davinci.ve.states",actions:[{id:"addState",iconClass:"viewActionIcon addStateIcon",action:"davinci/ve/actions/AddState",label:"Add state",toolbarPath:"states1"},{id:"removeState",iconClass:"viewActionIcon removeStateIcon",action:"davinci/ve/actions/RemoveState",
label:"Remove state",toolbarPath:"states1"},{id:"modifyState",iconClass:"viewActionIcon modifyStateIcon",action:"davinci/ve/actions/ModifyState",label:"Modify state",toolbarPath:"states1"},{id:"manageStates",className:"manageStatesButton",iconClass:"viewActionIcon manageStatesIcon",action:"davinci/ve/actions/ManageStates",label:"For currently selected widgets, manage widget visibility for different states",toolbarPath:"states1",command:"File/ManageStates",group:"View"},{id:"NewWidgetsCurrentState",
className:"newWidgetsCurrentStateButton",iconClass:"viewActionIcon newWidgetsCurrentStateIcon",action:"davinci/ve/actions/NewWidgetsCurrentState",label:"Toggle whether new widgets go to Background or current state",toolbarPath:"states2"},{id:"highlightBaseWidgets",className:"highlightBaseWidgetsButton",iconClass:"viewActionIcon highlightBaseWidgetsIcon",action:"davinci/ve/actions/HighlightBaseWidgets",label:"When in custom state, highlight widgets from Background state",toolbarPath:"states2"}]}}],
"davinci.actionSetPartAssociations":[{targetID:"davinci.ve.cutCopyPaste",parts:["davinci.ve.visualEditor","davinci.ve.VisualEditorOutline"]}],"davinci.editorActions":{editorContribution:{targetID:"davinci.ve.HTMLPageEditor",actions:[{id:"savecombo",className:"maqLabelButton",showLabel:!0,label:"Save",toolbarPath:"save",type:"ComboButton",run:function(){p(["../Workbench"],function(n){p("../ui/Resource").save()})},isEnabled:function(n){return p("../Workbench").getOpenEditor()},menu:[{iconClass:"saveIcon",
run:function(){p("../ui/Resource").save()},isEnabled:function(n){return p("../Workbench").getOpenEditor()},label:"Save",keyBinding:{accel:!0,charOrCode:"s",allowGlobal:!0}},{iconClass:"saveAsIcon",run:function(){p("../ui/Resource").saveAs("html")},isEnabled:function(n){return p("../Workbench").getOpenEditor()},label:"Save As",keyBinding:{accel:!0,shift:!0,charOrCode:"s",allowGlobal:!0}},{id:"saveasdijit",iconClass:"fa-save",run:function(){return p(["davinci/de/resource"],function(n){n.createDijiFromNewDialog()})},
isEnabled:function(n){return p("../Workbench").getOpenEditor()},label:"Save As Widget",command:"File/Save As Widget",group:"File",tab:"Home"}]},{id:"undo",iconClass:"editActionIcon undoIcon",action:"davinci/actions/UndoAction",label:"Undo",toolbarPath:"undoredo",keyBinding:{accel:!0,charOrCode:"z"},command:"Edit/Undo"},{id:"redo",iconClass:"editActionIcon redoIcon",action:"davinci/actions/RedoAction",label:"Redo",toolbarPath:"undoredo",keyBinding:{accel:!0,shift:!0,charOrCode:"z"},command:"Edit/Redo"},
{id:"cut",label:"Cut",iconClass:"editActionIcon editCutIcon",action:"davinci/ve/actions/CutAction",toolbarPath:"cutcopypaste",keyBinding:{accel:!0,charOrCode:"x"}},{id:"copy",label:"Copy",iconClass:"editActionIcon editCopyIcon",action:"davinci/ve/actions/CopyAction",toolbarPath:"cutcopypaste",keyBinding:{accel:!0,charOrCode:"c"}},{id:"paste",label:"Paste",iconClass:"editActionIcon editPasteIcon",action:"davinci/ve/actions/PasteAction",toolbarPath:"cutcopypaste",keyBinding:{accel:!0,charOrCode:"v"}},
{id:"delete",iconClass:"editActionIcon editDeleteIcon",label:"Delete",action:"davinci/ve/actions/DeleteAction",toolbarPath:"delete",keyBinding:{charOrCode:[dojo.keys.DELETE,dojo.keys.BACKSPACE]}},{id:"outline",iconClass:"fa-crosshairs",label:"Show in Outline",action:"davinci/ve/actions/ShowInOutline",toolbarPath:"outline"},{id:"openBrowser",iconClass:"fa-play",className:"davinciFloatRight openBrowser",run:function(){p(["../Workbench"],function(n){(n=n.getOpenEditor())&&n.resourceFile?n.previewInBrowser():
console.error("ERROR. Cannot launch browser window. No editor info.")})},label:"Preview in Browser",toolbarPath:"undoredo",keyBinding:{accel:!0,charOrCode:"0",allowGlobal:!0},command:"File/Open In Browser",group:"File",tab:"Home"},{id:"documentSettings",iconClass:"documentSettingsIcon",className:"documentSettings davinciFloatRight",label:"Document settings",toolbarPath:"undoredo",type:"DropDownButton",menu:[{id:"theme",iconClass:"selectThemeIcon",className:"davinciFloatRight",action:"davinci/actions/SelectThemeAction",
label:"Switch theme"},{iconClass:"editActionIcon",label:"Select parent",action:"davinci/ve/actions/SelectParentAction",command:"Widget/Select/SelectParent",group:"Widget"},{iconClass:"editActionIcon",label:"Select ancestor",action:"davinci/ve/actions/SelectAncestorAction",command:"Widget/Select/SelectAnchestor",group:"Widget"},{iconClass:"editActionIcon",label:"Unselect all",action:"davinci/ve/actions/UnselectAllAction"},{iconClass:"editActionIcon moveToFrontIconSmall",label:"Move to front",action:"davinci/ve/actions/MoveToFrontAction",
command:"Widget/Move/MoveToFront",group:"Widget"},{iconClass:"editActionIcon moveForwardIconSmall",label:"Move forward",action:"davinci/ve/actions/MoveForwardAction",command:"Widget/Move/MoveToForward",group:"Widget"},{iconClass:"editActionIcon moveBackwardIconSmall",label:"Move backward",action:"davinci/ve/actions/MoveBackwardAction",command:"Widget/Move/MoveToBackward",group:"Widget"},{iconClass:"editActionIcon moveToBackIconSmall",label:"Move to back",action:"davinci/ve/actions/MoveToBackAction",
command:"Widget/Move/MoveToBack",group:"Widget"},{iconClass:"editActionIcon",label:"Surround with \x26lt;A\x26gt;",action:"davinci/ve/actions/SurroundAction",surroundWithTagName:"a",command:"Widget/SourroundWithA",group:"Widget",tab:"Tools"},{iconClass:"editActionIcon",label:"Surround with \x26lt;DIV\x26gt;",action:"davinci/ve/actions/SurroundAction",surroundWithTagName:"div",command:"Widget/SourroundWithDIV",group:"Widget",tab:"Tools"},{iconClass:"editActionIcon",label:"Surround with \x26lt;SPAN\x26gt;",
action:"davinci/ve/actions/SurroundAction",surroundWithTagName:"span",command:"Widget/SourroundWithSPAN",group:"Widget",tab:"Tools"},{iconClass:"editActionIcon",label:"Manage States...",id:"manageStates",action:"davinci/ve/actions/ManageStates",menubarPath:"davinci.edit/cut",command:"File/ManageStates",group:"States",tab:"Tools"}]},{id:"stickynote",iconClass:"stickynoteIcon",action:"davinci/actions/StickyNoteAction",label:"Add note",toolbarPath:"stickynote"},{id:"layout",className:"maqLabelButton davinciFloatRight maqLayoutDropDownButton",
showLabel:!0,label:"Flow",toolbarPath:"undoredo",type:"DropDownButton",menu:[{label:"Flow",iconClass:"flowLayoutIcon",method:"selectLayoutFlow"},{label:"Absolute",iconClass:"absoluteLayoutIcon",method:"selectLayoutAbsolute"}]},{id:"sourcecombo",className:"maqLabelButton davinciFloatRight maqSourceComboButton",showLabel:!0,label:"Source",action:"davinci/ve/actions/ViewSourceAction",toolbarPath:"undoredo",type:"ComboButton",menu:[{keyBinding:{accel:!0,charOrCode:"2",allowGlobal:!0},iconClass:"editActionIcon sourceModeIcon sourceMenuIcon",
action:"davinci/ve/actions/ViewSourceMenuAction",label:"Source only"},{keyBinding:{accel:!0,charOrCode:"3",allowGlobal:!0},iconClass:"editActionIcon splitVerticalIcon sourceMenuIcon",action:"davinci/ve/actions/ViewSplitVMenuAction",label:"Split Vertically"},{keyBinding:{accel:!0,charOrCode:"4",allowGlobal:!0},iconClass:"editActionIcon splitHorizontalIcon sourceMenuIcon",action:"davinci/ve/actions/ViewSplitHMenuAction",label:"Split Horizontally"}]},{id:"design",showLabel:!0,className:"maqLabelButton davinciFloatRight maqDesignButton",
action:"davinci/ve/actions/ViewDesignAction",label:"Design",toolbarPath:"undoredo",keyBinding:{accel:!0,charOrCode:"1",allowGlobal:!0}},{id:"closeactiveeditor",run:function(){p(["../Workbench"],function(n){n.closeActiveEditor()})},keyBinding:{accel:!0,shift:!0,charOrCode:"w",allowGlobal:!0}},{id:"showWidgetsPalette",run:function(){var n=dijit.byId("davinci.ve.Palette");if(n){var m=n.getParent();m&&m.selectChild(n)}},keyBinding:{meta:!0,charOrCode:"p",allowGlobal:!0}}]}},"davinci.preferences":[{name:"Visual Editor",
id:"editorPrefs",category:"davinci.html.general",pane:"davinci/ve/prefs/HTMLEditPreferences",defaultValues:{flowLayout:!1,snap:!0,showPossibleParents:!0,cssOverrideWarn:!0,absoluteWidgetsZindex:900,widgetPaletteLayout:"icons"}}],"davinci.dnd":[{parts:["davinci.ui.navigator"],dragSource:function(n){if("File"==n.elementType)return/gif|jpeg|jpg|png|svg|json/i.test(n.getExtension())},dragHandler:"davinci/ve/palette/ImageDragSource"}],"davinci.fileType":[{extension:"theme",iconClass:"themeFileIcon",type:"text"}],
"davinci.defaultEditorActions":{editorContribution:{actions:[{id:"save",run:function(){p("../Workbench").getOpenEditor().save()},isEnabled:function(n){return!0},className:"maqLabelButton",showLabel:!0,label:"Save",toolbarPath:"save",keyBinding:{accel:!0,charOrCode:"s"}},{id:"undo",iconClass:"editActionIcon undoIcon",action:"davinci/actions/UndoAction",label:"Undo",toolbarPath:"undoredo",keyBinding:{accel:!0,charOrCode:"z"}},{id:"redo",iconClass:"editActionIcon redoIcon",action:"davinci/actions/RedoAction",
label:"Redo",toolbarPath:"undoredo",keyBinding:{accel:!0,shift:!0,charOrCode:"z"}}]}}}})},"davinci/model/Path":function(){define(["dojo/_base/declare"],function(p){"undefined"===typeof davinci.model&&(davinci.model={});"undefined"===typeof davinci.model.Path&&(davinci.model.Path={});var n=p("davinci.model.Path",null,{constructor:function(m,h,g){m=m||".";"string"==typeof m?(this.path=m,this.getSegments()):(this.segments=m,this.hasLeading=h,this.hasTrailing=g)},endsWith:function(m){var h=dojo.clone(this.segments);
for(m=(new n(m)).getSegments();0<m.length&&0<h.length;)if(m.pop()!=h.pop())return!1;return!0},getExtension:function(){this.extension||(this.extension=this.path.substr(this.path.lastIndexOf(".")+1));return this.extension},segment:function(m){var h=this.getSegments();return h.length<m?null:h[m]},getSegments:function(){if(!this.segments){var m=this.path;this.segments=m.split("/");"/"==m.charAt(0)&&(this.hasLeading=!0);"/"==m.charAt(m.length-1)&&(this.hasTrailing=!0,this.segments.pop());this._canonicalize()}return this.segments},
isAbsolute:function(){return this.hasLeading},getParentPath:function(){if(!this._parentPath){var m=dojo.clone(this.segments);m.pop();this._parentPath=new n(m,this.hasLeading)}return dojo.clone(this._parentPath)},_clone:function(){return new n(dojo.clone(this.segments),this.hasLeading,this.hasTrailing)},append:function(m){m=m||"";"string"==typeof m&&(m=new n(m));if(m.isAbsolute())return m;var h=this.segments,g=m.getSegments(),h=h.concat(g);m=new n(h,this.hasLeading,m.hasTrailing);".."!=g[0]&&"."!=
g[0]||m._canonicalize();return m},toString:function(){var m=[];this.hasLeading&&m.push("/");for(var h=0;h<this.segments.length;h++)0<h&&m.push("/"),m.push(this.segments[h]);this.hasTrailing&&m.push("/");return m.join("")},removeRelative:function(){var m=this.getSegments();return 0<m.length&&"."==m[1]?this.removeFirstSegments(1):this},relativeTo:function(m,h){"string"==typeof m&&(m=new n(m));var g=this.segments;if(this.isAbsolute())return this;var f=m.getSegments(),b=this.matchingFirstSegments(m),
f=f.length;h&&--f;f-=b;if(0==f+g.length-b)return davinci.model.Path.EMPTY;for(var e=[],k=0;k<f;k++)e.push("..");for(k=b;k<g.length;k++)e.push(g[k]);return new n(e,!1,this.hasTrailing)},startsWith:function(m){var h=this.matchingFirstSegments(m);return m._length()==h},_length:function(m){return this.segments.length},matchingFirstSegments:function(m){var h=this.segments;m=m.getSegments();for(var g=Math.min(h.length,m.length),f=0,b=0;b<g&&h[b]==m[b];b++)f++;return f},removeFirstSegments:function(m){return new n(this.segments.slice(m,
this.segments.length),this.hasLeading,this.hasTrailing)},removeMatchingLastSegments:function(m){m=this.matchingFirstSegments(m);return this.removeLastSegments(m)},removeMatchingFirstSegments:function(m){m=this.matchingFirstSegments(m);return this._clone().removeFirstSegments(m)},removeLastSegments:function(m){m||(m=1);return new n(this.segments.slice(0,this.segments.length-m),this.hasLeading,this.hasTrailing)},lastSegment:function(){return this.segments[this.segments.length-1]},firstSegment:function(m){return this.segments[m||
0]},equals:function(m){if(this.segments.length!=m.segments.length)return!1;for(var h=0;h<this.segments.length;h++)if(m.segments[h]!=this.segments[h])return!1;return!0},_canonicalize:function(){for(var m,h=this.segments,g=0;g<h.length;g++)if("."==h[g]||".."==h[g]){m=!0;break}if(m){m=[];for(g=0;g<h.length;g++)".."==h[g]?0==m.length?this.hasLeading||m.push(h[g]):".."==m[m.length-1]?m.push(".."):m.pop():"."==h[g]&&1!=this.segments.length||m.push(h[g]);m.length!=h.length&&(this.segments=m)}}});davinci.model.Path.EMPTY=
new n("");return n})},"davinci/ve/themeEditor/metadata/query":function(){define(["dojo/_base/declare","davinci/ve/utils/URLRewrite"],function(p,n){return p("davinci.ve.themeEditor.metadata.query",null,{constructor:function(m,h){this.files=m;this.cache={};this.lastLoaded=-1;this.modules=h;this.modulePrefix=null;this.modulePrefix=".";if(h)for(var g=0;g<h.length;g++)this.modulePrefix+="/"+h[g]},getType:function(m){var h=null;m.declaredClass?h=m.type:(h=m,"html."==h.substring(0,5)&&(tagName=h.substring(5)));
return h},_loadNextFile:function(){var m=this.files[++this.lastLoaded],h=null,h=m.getURL?n.encodeURI(m.getURL()):this.modulePrefix+m,g=null;dojo.xhrGet({url:h,handleAs:"json",sync:!0,load:function(f){g=f}});return g},_fullyLoaded:function(){return this.files.length<=this.lastLoaded+1},_cacheNext:function(){var m=this._loadNextFile();dojo.mixin(this.cache,m)},getMetaData:function(m){var h=m.split(/[\.\/]/),g=0<=h.length?h[h.length-1]:h;return(h=this.cache[0<=h.length?h[0]:h])&&h[g]?h[g]:this._fullyLoaded()?
null:(this._cacheNext(),this.getMetaData(m))}})})},"davinci/ve/utils/URLRewrite":function(){define([],function(){var p=/^\s*url\s*\(\s*(\'[^\'\"]*\'|\"[^\'\"]*\"|[^\'\"]*)\s*\)\s*$/,n=/^[\'\"]?([^\'\"]*)[\'\"]?$/,m=/^(http|ftp)/;return{isAbsolute:function(h){return"string"!=typeof h?!1:(h=this.getUrl(h))?m.test(h):!1},containsUrl:function(h){return"string"!=typeof h?!1:p.test(h)},replaceUrl:function(h,g){return"string"!=typeof h||"string"!=typeof g?null:this.getUrl(h)?"url('"+g+"')":null},stripQuotes:function(h){return h.replace(n,
"$1")},encodeURI:function(h){return encodeURI(h).replace(/#/g,"%23")},getUrl:function(h){return"string"!=typeof h?null:(h=h.match(p))&&1<h.length?this.stripQuotes(h[1]):null}}})},"davinci/workbench/Preferences":function(){define("dojo/_base/declare dojo/_base/xhr dojo/_base/lang dojo/topic dojo/dom ../Runtime dijit/_WidgetBase dijit/_TemplatedMixin dijit/_WidgetsInTemplateMixin dijit/registry davinci/ui/Dialog dijit/Tree dijit/tree/ForestStoreModel dojo/data/ItemFileReadStore davinci/lang/workbench dijit/lang/_common dojo/text!davinci/workbench/templates/Preferences.html dijit/form/Button".split(" "),
function(p,n,m,h,g,f,b,e,k,d,c,a,q,w,r,B,y){var x=p([b,e,k],{templateString:y,commonStrings:B,resize:function(){this.borderContainer.resize()}}),z={_allPrefs:{},savePreferences:function(a,c,d){},_loadExtensions:function(){z._extensions||(z._extensions=f.getExtensions("davinci.preferences"))},showPreferencePage:function(){z._loadExtensions();var b=z.getPrefJson();if(b.items)for(var e=b.items.length-1;0<=e;e--){var k=b.items[e];k.hide&&b.items.splice(e,1)}if(!b||1>b.length)alert(r.noUserPref);else{this.dialog=
c.showModal(new x({}),r.preferences,{width:650,height:350});var k=new w({data:b,jsId:"prefTreeDataStore"}),e=new q({jsId:"fileModel",labelAttr:"name",store:k,rootId:"root"}),f=["root"];if(b=b.items){do k=b[0],f.push(k.id),b=k.children;while(b)}var h=d.byId("prefTree");h||(h=new a({model:e,id:"prefTree",persist:!1,query:"{type:'directory'}",label:"Preferences",labelAttr:"name",showRoot:!1,childrenAttrs:"children",openOnClick:!0,autoExpand:!0}));h.onClick=function(a){z.setPaneContent(a)};g.byId("pref.TreePane").appendChild(h.domNode);
h.startup();h.onLoadDeferred.then(function(){h.set("paths",[f]).then(function(){h.focusNode(h.selectedNode);z.setPaneContent(h.selectedItem)})})}},getPrefJson:function(){var a=z._extensions;if(!a)return[];for(var c=[],d=0;d<a.length;d++)a[d]._index=d,a[d].category?(c[a[d].category]||(c[a[d].category]=[]),c[a[d].category].push(a[d])):(c.root||(c.root=[]),c.root.push(a[d]));return{identifier:"id",items:c.root.map(function(a){return{id:a.id,name:a.name,hide:a.hide,index:a._index,children:z._getPrefJsonChildren(a.id,
c)}})}},_getPrefJsonChildren:function(a,c){var d=c[a];if(!d)return[];for(var q=[],b=0;b<d.length;b++)q[b]={id:d[b].id,name:d[b].name,index:d[b]._index},c[d[b].id]&&(q[b].children=z._getPrefJsonChildren(d[b].id,c));return q},setPaneContent:function(a){var c;delete z._currentPane;var q=z._extensions[a.index[0]],b=z.getPreferences(q.id,davinci.Workbench.getProject());q.pane?require([q.pane],function(a){a=new a;z._currentPane=a;z._currentPane._extension=q;z._currentPane.setPreferences(b);d.byId("pref.RightPane").setContent(a.domNode)}):
c=q.pageContent?document.createTextNode(q.pageContent):document.createTextNode("");c&&d.byId("pref.RightPane").setContent(c)},_save:function(a){if(z._currentPane){var c=z._currentPane.getPreferences(),d=z._currentPane._extension.id,q=davinci.Workbench.getProject();z.savePreferences(d,q,c);z._currentPane.save&&z._currentPane.save(c)}for(c=0;c<a.length;c++){try{a[c].save&&a[c].save()}catch(b){}a[c].children&&0<a[c].children.length&&z._save(a[c].children)}},save:function(){z._save(z._extensions);z.finish()},
finish:function(){z._extensions=null;z._currentPane=null;this.dialog.destroyRecursive(!1);this.dialog=null},getPreferences:function(a,c){z._allPrefs[c]||(z._allPrefs[c]={});return{version:"1.7",specVersion:"0.8",snap:!0,helper:"maq-metadata-dojo/dojox/mobile/ThemeHelper",themeSets:[{_COMMENT_:"Defines site-specific default theme sets",desktopTheme:"claro",mobileTheme:[{device:"Android",theme:"android"},{device:"BlackBerry",theme:"blackberry"},{device:"iPad",theme:"ipad"},{device:"iPhone",theme:"iphone"},
{device:"other",theme:"iphone"}],name:"site_dojo_default"}]}},getDefaultPreferences:function(a){z._loadExtensions();for(var c=0;c<z._extensions.length;c++)if(z._extensions[c].id==a)return"string"===typeof z._extensions[c].defaultValues?f.serverJSONRequest({url:z._extensions[c].defaultValues,handleAs:"json",sync:!0}).defaultValues:z._extensions[c].defaultValues}};return m.setObject("davinci.workbench.Preferences",z)})},"davinci/ui/Dialog":function(){define("dojo/_base/declare dijit/form/Button dijit/Dialog dojo/dom-geometry dojo/dom-style dojo/_base/connect dojo/window dojo/parser davinci/_common".split(" "),
function(p,n,m,h,g,f,b,e,k){var d=p(m,{contentStyle:null,buildRendering:function(){this.inherited(arguments);dojo.addClass(this.domNode,"resizableDialog");dojo.addClass(this.domNode,"ui-widget-content");this.submitOnEnter&&dojo.addClass(this.domNode,"submitOnEnter")},_setContent:function(c,a){this.inherited(arguments);var d=dojo.doc.createElement("div");this.containerNode.appendChild(d);(d=dojo.query(".dijitDialogPaneContentArea",this.containerNode)[0])?dojo.connect(d,"onkeydown",this,"_onKeyDown"):
dojo.connect(this.domNode,"onkeydown",this,"_onKeyDown")},resize:function(c){if(c){var a=g.getComputedStyle(this.containerNode),a=h.getPadExtents(this.containerNode,a),d=c.w-a.w,b=c.h-a.h,b=b-h.getMarginBox(this.titleBar).h;c=dojo.query(".dijitDialogPaneContentArea",this.containerNode)[0];a=dojo.query(".dijitDialogPaneActionBar",this.containerNode)[0];b-=h.getMarginBox(a).h;d&&dojo.style(c,"width",d+"px");b&&dojo.style(c,"height",b+"px");dojo.forEach(this.getChildren(),dojo.hitch(this,function(a){a.resize&&
a.resize({w:d,h:b})}))}},show:function(){var c=this.inherited(arguments);if(this.contentStyle){if("object"==typeof this.contentStyle){var a={};this.contentStyle.width&&(a.w=parseInt(this.contentStyle.width));this.contentStyle.height&&(a.h=parseInt(this.contentStyle.height));var d=b.getBox(this.ownerDocument);d.w*=this.maxRatio;d.h*=this.maxRatio;a.h>d.h&&(h.position(this.containerNode),Math.min(a.w,d.w),Math.min(a.h,d.h),a.h=d.h);this.resize(a)}this._size();this._position();dojo.style(this.containerNode,
"width","auto");dojo.style(this.containerNode,"height","auto")}return c},_onKeyDown:function(c){var a=c.ctrlKey&&!dojo.isMac||dojo.isMac&&c.metaKey;c.which==dojo.keys.ENTER&&(a||this.submitOnEnter)&&(c=dojo.query("input[type\x3dsubmit]",this.containerNode),0<c.length&&(c=dijit.getEnclosingWidget(c[0]),a=document.createEvent("MouseEvents"),a.initMouseEvent("click",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),c._onClick(a)))}});d._timedDestroy=function(c,a){a&&a.forEach(f.disconnect);var d=f.connect(c,
"onHide",function(){f.disconnect(d);c.destroyRecursive()});c.hide()};d.showModal=function(c,a,b,e,k,g){var h=[];a={title:a,content:c,contentStyle:b,submitOnEnter:k};g&&(a.onShow=g);var x=new d(a);g=dojo.hitch(this,function(){var a=!1;e&&(a=e());a||this._timedDestroy(x,h)});h.push(f.connect(x,"onExecute",c,g));c.onExecute&&h.push(f.connect(c,"onExecute",c,g));h.push(f.connect(c,"onClose",dojo.hitch(this,function(){this._timedDestroy(x,h)})));h.push(f.connect(x,"onCancel",dojo.hitch(this,function(){this._timedDestroy(x,
h)})));x.show();return x};d.showMessage=function(c,a,d,b,e){return this.showDialog({title:c,content:a,style:d,okCallback:b,okLabel:null,hideCancel:!0})};d.showDialog=function(c){var a=c.title,b=c.content,w=c.style,r=c.okCallback,g=c.okLabel,h=c.hideCancel,x=c.submitOnEnter,m=c.extendLabels,u=c.extendCallbacks,v,A=[];c=document.createElement("div");var C=document.createElement("div");dojo.addClass(C,"dijitDialogPaneContentArea");c.appendChild(C);var G=document.createElement("div");dojo.addClass(G,
"dijitDialogPaneActionBar");g=new n({label:g?g:k.ok,type:"submit","class":"maqPrimaryButton"});G.appendChild(g.domNode);var D=dojo.hitch(this,function(){this._timedDestroy(v,A)});if(m&&u&&0<m.length&&m.length===u.length)for(g=0;g<m.length;g++){var I=function(a){if(u[a])u[a]();v.onCancel()}.bind(this,g);G.appendChild((new n({label:m[g],onClick:I,"class":"maqSecondaryButton"})).domNode)}h||G.appendChild((new n({label:k.cancel,onClick:function(){v.onCancel()},"class":"maqSecondaryButton"})).domNode);
c.appendChild(G);v=new d({title:a,content:c,contentStyle:w,submitOnEnter:x});dojo.isString(b)?(C.innerHTML=b,e.parse(C)):b.domNode?C.appendChild(b.domNode):C.appendChild(b);A.push(f.connect(v,"onExecute",dojo.hitch(this,function(){r&&r();D()})));A.push(f.connect(v,"onCancel",dojo.hitch(this,function(){D()})));v.show();return v};return d})},"dojo/window":function(){define("./_base/lang ./sniff ./_base/window ./dom ./dom-geometry ./dom-style ./dom-construct".split(" "),function(p,n,m,h,g,f,b){n.add("rtl-adjust-position-for-verticalScrollBar",
function(e,d){var c=m.body(d),a=b.create("div",{style:{overflow:"scroll",overflowX:"visible",direction:"rtl",visibility:"hidden",position:"absolute",left:"0",top:"0",width:"64px",height:"64px"}},c,"last"),q=b.create("div",{style:{overflow:"hidden",direction:"ltr"}},a,"last"),w=0!=g.position(q).x;a.removeChild(q);c.removeChild(a);return w});n.add("position-fixed-support",function(e,d){var c=m.body(d),a=b.create("span",{style:{visibility:"hidden",position:"fixed",left:"1px",top:"1px"}},c,"last"),q=
b.create("span",{style:{position:"fixed",left:"0",top:"0"}},a,"last"),w=g.position(q).x!=g.position(a).x;a.removeChild(q);c.removeChild(a);return w});var e={getBox:function(b){b=b||m.doc;var d="BackCompat"==b.compatMode?m.body(b):b.documentElement,c=g.docScroll(b);if(n("touch")){var a=e.get(b);b=a.innerWidth||d.clientWidth;d=a.innerHeight||d.clientHeight}else b=d.clientWidth,d=d.clientHeight;return{l:c.x,t:c.y,w:b,h:d}},get:function(b){if(9>n("ie")&&e!==document.parentWindow){b.parentWindow.execScript("document._parentWindow \x3d window;",
"Javascript");var d=b._parentWindow;b._parentWindow=null;return d}return b.parentWindow||b.defaultView},scrollIntoView:function(b,d){try{b=h.byId(b);var c=b.ownerDocument||m.doc,a=m.body(c),q=c.documentElement||a.parentNode,e=n("ie"),r=n("webkit");if(b!=a&&b!=q)if(!(n("mozilla")||e||r||n("opera"))&&"scrollIntoView"in b)b.scrollIntoView(!1);else{var B="BackCompat"==c.compatMode,y=Math.min(a.clientWidth||q.clientWidth,q.clientWidth||a.clientWidth),x=Math.min(a.clientHeight||q.clientHeight,q.clientHeight||
a.clientHeight),c=r||B?a:q,z=d||g.position(b),u=b.parentNode,r=function(a){return 6>=e||7==e&&B?!1:n("position-fixed-support")&&"fixed"==f.get(a,"position").toLowerCase()};if(!r(b))for(;u;){u==a&&(u=c);var v=g.position(u),A=r(u),C="rtl"==f.getComputedStyle(u).direction.toLowerCase();if(u==c){v.w=y;v.h=x;c==q&&e&&C&&(v.x+=c.offsetWidth-v.w);if(0>v.x||!e||9<=e)v.x=0;if(0>v.y||!e||9<=e)v.y=0}else{var G=g.getPadBorderExtents(u);v.w-=G.w;v.h-=G.h;v.x+=G.l;v.y+=G.t;var D=u.clientWidth,I=v.w-D;0<D&&0<I&&
(C&&n("rtl-adjust-position-for-verticalScrollBar")&&(v.x+=I),v.w=D);D=u.clientHeight;I=v.h-D;0<D&&0<I&&(v.h=D)}A&&(0>v.y&&(v.h+=v.y,v.y=0),0>v.x&&(v.w+=v.x,v.x=0),v.y+v.h>x&&(v.h=x-v.y),v.x+v.w>y&&(v.w=y-v.x));var p=z.x-v.x,F=z.y-v.y,N=p+z.w-v.w,L=F+z.h-v.h,J,E;0<N*p&&(u.scrollLeft||u==c||u.scrollWidth>u.offsetHeight)&&(J=Math[0>p?"max":"min"](p,N),C&&(8==e&&!B||9<=e)&&(J=-J),E=u.scrollLeft,u.scrollLeft+=J,J=u.scrollLeft-E,z.x-=J);0<L*F&&(u.scrollTop||u==c||u.scrollHeight>u.offsetHeight)&&(J=Math.ceil(Math[0>
F?"max":"min"](F,L)),E=u.scrollTop,u.scrollTop+=J,J=u.scrollTop-E,z.y-=J);u=u!=c&&!A&&u.parentNode}}}catch(K){console.error("scrollIntoView: "+K),b.scrollIntoView(!1)}}};p.setObject("dojo.window",e);return e})},"davinci/_common":function(){define([],function(){return{search:"Search",filter:"Filter","new":"New",errorSavingFile:"Error saving file: ${0} details: ${1}",palette:"palette",closeAllEditors:"Close all tabs",undo:"Undo",redo:"Redo",copy:"Copy",paste:"Paste",cut:"Cut","delete":"Delete",surround:"Surround",
properties:"Properties",styles:"Styles",events:"Events",preferences:"Preferences",addPane:"Add Pane",addColumn:"Add Column",addRow:"Add Row",removeColumn:"Remove Column",removeRow:"Remove Row",joinColumn:"Join Column",joinRow:"Join Row",splitColumn:"Split Column",splitRow:"Split Row",alignLeft:"Align Left",alignRight:"Align Right",alignTop:"Align Top",alignBottom:"Align Bottom",show:"Show",hide:"Hide",addMenuItem:"Add Menu Item",addSubMenu:"Add Sub Menu",addMenuBarItem:"Add MenuBar Item",addPopupMenuBar:"Add Popup MenuBarItem",
ok:"OK",cancel:"Cancel",page:"Page",title:"Title",metaInfo:"Meta Info",httpEquiv:"HTTP Equiv",style:"Style",theme:"Theme",styleSheets:"Style Sheets",rules:"Rules",url:"URL",externalScripts:"External Scripts",modules:"Modules",name:"Name",value:"Value",add:"Add",remove:"Remove",staticOptions:"Static Options",axisOptions:"Axis Options",series:"Series",axis:"Axis",option:"Option",selected:"Selected",staticItems:"Static Items",dataStore:"Data Store",query:"Query",fields:"Fields",field:"Field",label:"Label",
width:"Width",edit:"Edit",key:"Key",rootId:"Root ID",rootLabel:"Root Label",childrenAttrs:"Children Attributes",items:"Items",type:"Type",widget:"Widget",position:"Position",size:"Size",layout:"Layout",visual:"Visual",text:"Text",border:"Border",table:"Table",list:"List",aural:"Aural",others:"Others",onLoad:"Load",onUnload:"Unload",script:"Script",methodCall:"Method Call",serviceCall:"Service Call",object:"Object",method:"Method",parameters:"Parameters",result:"Result",service:"Service",content:"Content",
source:"Source",target:"Target",property:"Property",flowLayout:"Flow Layout",snapToNearestWidget:"Snap to nearest widget",showPossibleParents:"When dragging, show possible parents",warnOnCSSOverride:"Warn on CSS Override",absoluteWidgetsZindex:"z-index for sketch mode",widgetPaletteLayout:"In Palette, display widgets as",widgetPaletteShow_Icons:"icons",widgetPaletteShow_List:"list",liveEdit:"Live Edit",zazl:"Enable \x3ca href\x3d'http://zazl.org' target\x3d'_blank'\x3eZazl Optimizer\x3c/a\x3e",selectorPrefix:"Selector Prefix",
component:"Component",alternates:"Alternates",alternateWidgets:"Alternate widgets:",howToChooseAlternate:"To choose alternate widget, click-select current widget, then click on up arrow icon.",summary:"Summary:",description:"Description:",showSuggestedWidgets:"Suggested Widgets",showAllWidgets:"All Widgets",MoreIconTitleString:"Click here to see alternative similar widgets",HelpIconTitleString:"Click here to see descriptive info about this widget",__dummy__:""}})},"dojo/data/ItemFileReadStore":function(){define("../_base/kernel ../_base/lang ../_base/declare ../_base/array ../_base/xhr ../Evented ./util/filter ./util/simpleFetch ../date/stamp".split(" "),
function(p,n,m,h,g,f,b,e,k){m=m("dojo.data.ItemFileReadStore",[f],{constructor:function(d){this._arrayOfAllItems=[];this._arrayOfTopLevelItems=[];this._loadFinished=!1;this.url=this._ccUrl=this._jsonFileUrl=d.url;this._jsonData=d.data;this.data=null;this._datatypeMap=d.typeMap||{};this._datatypeMap.Date||(this._datatypeMap.Date={type:Date,deserialize:function(c){return k.fromISOString(c)}});this._features={"dojo.data.api.Read":!0,"dojo.data.api.Identity":!0};this._itemsByIdentity=null;this._storeRefPropName=
"_S";this._itemNumPropName="_0";this._rootItemPropName="_RI";this._reverseRefMap="_RRM";this._loadInProgress=!1;this._queuedFetches=[];void 0!==d.urlPreventCache&&(this.urlPreventCache=d.urlPreventCache?!0:!1);void 0!==d.hierarchical&&(this.hierarchical=d.hierarchical?!0:!1);d.clearOnClose&&(this.clearOnClose=!0);"failOk"in d&&(this.failOk=d.failOk?!0:!1)},url:"",_ccUrl:"",data:null,typeMap:null,clearOnClose:!1,urlPreventCache:!1,failOk:!1,hierarchical:!0,_assertIsItem:function(d){if(!this.isItem(d))throw Error(this.declaredClass+
": Invalid item argument.");},_assertIsAttribute:function(d){if("string"!==typeof d)throw Error(this.declaredClass+": Invalid attribute argument.");},getValue:function(d,c,a){d=this.getValues(d,c);return 0<d.length?d[0]:a},getValues:function(d,c){this._assertIsItem(d);this._assertIsAttribute(c);return(d[c]||[]).slice(0)},getAttributes:function(d){this._assertIsItem(d);var c=[],a;for(a in d)a!==this._storeRefPropName&&a!==this._itemNumPropName&&a!==this._rootItemPropName&&a!==this._reverseRefMap&&
c.push(a);return c},hasAttribute:function(d,c){this._assertIsItem(d);this._assertIsAttribute(c);return c in d},containsValue:function(d,c,a){var q=void 0;"string"===typeof a&&(q=b.patternToRegExp(a,!1));return this._containsValue(d,c,a,q)},_containsValue:function(d,c,a,b){return h.some(this.getValues(d,c),function(c){if(null!==c&&!n.isObject(c)&&b){if(c.toString().match(b))return!0}else if(a===c)return!0})},isItem:function(d){return d&&d[this._storeRefPropName]===this&&this._arrayOfAllItems[d[this._itemNumPropName]]===
d?!0:!1},isItemLoaded:function(d){return this.isItem(d)},loadItem:function(d){this._assertIsItem(d.item)},getFeatures:function(){return this._features},getLabel:function(d){if(this._labelAttr&&this.isItem(d))return this.getValue(d,this._labelAttr)},getLabelAttributes:function(d){return this._labelAttr?[this._labelAttr]:null},filter:function(d,c,a){var q=[],e,k;if(d.query){var f;e=d.queryOptions?d.queryOptions.ignoreCase:!1;var g={};for(k in d.query)f=d.query[k],"string"===typeof f?g[k]=b.patternToRegExp(f,
e):f instanceof RegExp&&(g[k]=f);for(e=0;e<c.length;++e){var h=!0,m=c[e];if(null===m)h=!1;else for(k in d.query)f=d.query[k],this._containsValue(m,k,f,g[k])||(h=!1);h&&q.push(m)}}else for(e=0;e<c.length;++e)k=c[e],null!==k&&q.push(k);a(q,d)},_fetchItems:function(d,c,a){var b=this;if(this._loadFinished)this.filter(d,this._getItemsArray(d.queryOptions),c);else if(this._jsonFileUrl!==this._ccUrl?(p.deprecated(this.declaredClass+": ","To change the url, set the url property of the store, not _jsonFileUrl. _jsonFileUrl support will be removed in 2.0"),
this.url=this._ccUrl=this._jsonFileUrl):this.url!==this._ccUrl&&(this._ccUrl=this._jsonFileUrl=this.url),null!=this.data&&(this._jsonData=this.data,this.data=null),this._jsonFileUrl)if(this._loadInProgress)this._queuedFetches.push({args:d,filter:n.hitch(b,"filter"),findCallback:n.hitch(b,c)});else{this._loadInProgress=!0;var e=g.get({url:b._jsonFileUrl,handleAs:"json-comment-optional",preventCache:this.urlPreventCache,failOk:this.failOk});e.addCallback(function(e){try{b._getItemsFromLoadedData(e),
b._loadFinished=!0,b._loadInProgress=!1,b.filter(d,b._getItemsArray(d.queryOptions),c),b._handleQueuedFetches()}catch(k){b._loadFinished=!0,b._loadInProgress=!1,a(k,d)}});e.addErrback(function(c){b._loadInProgress=!1;a(c,d)});var k=null;d.abort&&(k=d.abort);d.abort=function(){e&&-1===e.fired&&e.cancel();k&&k.call(d)}}else if(this._jsonData)try{this._loadFinished=!0,this._getItemsFromLoadedData(this._jsonData),this._jsonData=null,b.filter(d,this._getItemsArray(d.queryOptions),c)}catch(f){a(f,d)}else a(Error(this.declaredClass+
": No JSON source data was provided as either URL or a nested Javascript object."),d)},_handleQueuedFetches:function(){if(0<this._queuedFetches.length){for(var d=0;d<this._queuedFetches.length;d++){var c=this._queuedFetches[d],a=c.args,b=c.filter,c=c.findCallback;b?b(a,this._getItemsArray(a.queryOptions),c):this.fetchItemByIdentity(a)}this._queuedFetches=[]}},_getItemsArray:function(d){return d&&d.deep?this._arrayOfAllItems:this._arrayOfTopLevelItems},close:function(d){this.clearOnClose&&this._loadFinished&&
!this._loadInProgress&&(this._arrayOfAllItems=[],this._arrayOfTopLevelItems=[],this._loadFinished=!1,this._itemsByIdentity=null,this._loadInProgress=!1,this._queuedFetches=[])},_getItemsFromLoadedData:function(d){function c(a){return null!==a&&"object"===typeof a&&(!n.isArray(a)||b)&&!n.isFunction(a)&&(a.constructor==Object||n.isArray(a))&&"undefined"===typeof a._reference&&"undefined"===typeof a._type&&"undefined"===typeof a._value&&e.hierarchical}function a(d){e._arrayOfAllItems.push(d);for(var b in d){var q=
d[b];if(q)if(n.isArray(q))for(var k=0;k<q.length;++k){var f=q[k];c(f)&&a(f)}else c(q)&&a(q)}}var b=!1,e=this;this._labelAttr=d.label;var k,f;this._arrayOfAllItems=[];this._arrayOfTopLevelItems=d.items;for(k=0;k<this._arrayOfTopLevelItems.length;++k)f=this._arrayOfTopLevelItems[k],n.isArray(f)&&(b=!0),a(f),f[this._rootItemPropName]=!0;var g={},h;for(k=0;k<this._arrayOfAllItems.length;++k)for(h in f=this._arrayOfAllItems[k],f){if(h!==this._rootItemPropName){var m=f[h];null!==m?n.isArray(m)||(f[h]=[m]):
f[h]=[null]}g[h]=h}for(;g[this._storeRefPropName];)this._storeRefPropName+="_";for(;g[this._itemNumPropName];)this._itemNumPropName+="_";for(;g[this._reverseRefMap];)this._reverseRefMap+="_";if(g=d.identifier)for(this._itemsByIdentity={},this._features["dojo.data.api.Identity"]=g,k=0;k<this._arrayOfAllItems.length;++k)if(f=this._arrayOfAllItems[k],d=f[g],d=d[0],Object.hasOwnProperty.call(this._itemsByIdentity,d)){if(this._jsonFileUrl)throw Error(this.declaredClass+": The json data as specified by: ["+
this._jsonFileUrl+"] is malformed. Items within the list have identifier: ["+g+"]. Value collided: ["+d+"]");if(this._jsonData)throw Error(this.declaredClass+": The json data provided by the creation arguments is malformed. Items within the list have identifier: ["+g+"]. Value collided: ["+d+"]");}else this._itemsByIdentity[d]=f;else this._features["dojo.data.api.Identity"]=Number;for(k=0;k<this._arrayOfAllItems.length;++k)f=this._arrayOfAllItems[k],f[this._storeRefPropName]=this,f[this._itemNumPropName]=
k;for(k=0;k<this._arrayOfAllItems.length;++k)for(h in f=this._arrayOfAllItems[k],f)for(d=f[h],g=0;g<d.length;++g)if(m=d[g],null!==m&&"object"==typeof m){if("_type"in m&&"_value"in m){var u=m._type,v=this._datatypeMap[u];if(v)if(n.isFunction(v))d[g]=new v(m._value);else if(n.isFunction(v.deserialize))d[g]=v.deserialize(m._value);else throw Error("dojo.data.ItemFileReadStore: Value provided in typeMap was neither a constructor, nor a an object with a deserialize function");else throw Error("dojo.data.ItemFileReadStore: in the typeMap constructor arg, no object class was specified for the datatype '"+
u+"'");}if(m._reference){m=m._reference;if(n.isObject(m))for(u=0;u<this._arrayOfAllItems.length;++u){var v=this._arrayOfAllItems[u],A=!0,C;for(C in m)v[C]!=m[C]&&(A=!1);A&&(d[g]=v)}else d[g]=this._getItemByIdentity(m);this.referenceIntegrity&&(m=d[g],this.isItem(m)&&this._addReferenceToMap(m,f,h))}else this.isItem(m)&&this.referenceIntegrity&&this._addReferenceToMap(m,f,h)}},_addReferenceToMap:function(d,c,a){},getIdentity:function(d){var c=this._features["dojo.data.api.Identity"];return c===Number?
d[this._itemNumPropName]:(d=d[c])?d[0]:null},fetchItemByIdentity:function(d){var c,a;if(this._loadFinished)c=this._getItemByIdentity(d.identity),d.onItem&&(a=d.scope?d.scope:p.global,d.onItem.call(a,c));else{var b=this;this._jsonFileUrl!==this._ccUrl?(p.deprecated(this.declaredClass+": ","To change the url, set the url property of the store, not _jsonFileUrl. _jsonFileUrl support will be removed in 2.0"),this.url=this._ccUrl=this._jsonFileUrl):this.url!==this._ccUrl&&(this._ccUrl=this._jsonFileUrl=
this.url);null!=this.data&&null==this._jsonData&&(this._jsonData=this.data,this.data=null);this._jsonFileUrl?this._loadInProgress?this._queuedFetches.push({args:d}):(this._loadInProgress=!0,a=g.get({url:b._jsonFileUrl,handleAs:"json-comment-optional",preventCache:this.urlPreventCache,failOk:this.failOk}),a.addCallback(function(a){var e=d.scope?d.scope:p.global;try{b._getItemsFromLoadedData(a),b._loadFinished=!0,b._loadInProgress=!1,c=b._getItemByIdentity(d.identity),d.onItem&&d.onItem.call(e,c),b._handleQueuedFetches()}catch(k){b._loadInProgress=
!1,d.onError&&d.onError.call(e,k)}}),a.addErrback(function(a){b._loadInProgress=!1;d.onError&&d.onError.call(d.scope?d.scope:p.global,a)})):this._jsonData&&(b._getItemsFromLoadedData(b._jsonData),b._jsonData=null,b._loadFinished=!0,c=b._getItemByIdentity(d.identity),d.onItem&&(a=d.scope?d.scope:p.global,d.onItem.call(a,c)))}},_getItemByIdentity:function(d){var c=null;this._itemsByIdentity?Object.hasOwnProperty.call(this._itemsByIdentity,d)&&(c=this._itemsByIdentity[d]):Object.hasOwnProperty.call(this._arrayOfAllItems,
d)&&(c=this._arrayOfAllItems[d]);void 0===c&&(c=null);return c},getIdentityAttributes:function(d){d=this._features["dojo.data.api.Identity"];return d===Number?null:[d]},_forceLoad:function(){var d=this;this._jsonFileUrl!==this._ccUrl?(p.deprecated(this.declaredClass+": ","To change the url, set the url property of the store, not _jsonFileUrl. _jsonFileUrl support will be removed in 2.0"),this.url=this._ccUrl=this._jsonFileUrl):this.url!==this._ccUrl&&(this._ccUrl=this._jsonFileUrl=this.url);null!=
this.data&&(this._jsonData=this.data,this.data=null);if(this._jsonFileUrl){var c=g.get({url:this._jsonFileUrl,handleAs:"json-comment-optional",preventCache:this.urlPreventCache,failOk:this.failOk,sync:!0});c.addCallback(function(a){try{if(!0!==d._loadInProgress&&!d._loadFinished)d._getItemsFromLoadedData(a),d._loadFinished=!0;else if(d._loadInProgress)throw Error(this.declaredClass+": Unable to perform a synchronous load, an async load is in progress.");}catch(c){throw c;}});c.addErrback(function(a){throw a;
})}else this._jsonData&&(d._getItemsFromLoadedData(d._jsonData),d._jsonData=null,d._loadFinished=!0)}});n.extend(m,e);return m})},"dojo/data/util/filter":function(){define(["../../_base/lang"],function(p){var n={};p.setObject("dojo.data.util.filter",n);n.patternToRegExp=function(m,h){for(var g="^",f=null,b=0;b<m.length;b++)switch(f=m.charAt(b),f){case "\\":g+=f;b++;g+=m.charAt(b);break;case "*":g+=".*";break;case "?":g+=".";break;case "$":case "^":case "/":case "+":case ".":case "|":case "(":case ")":case "{":case "}":case "[":case "]":g+=
"\\";default:g+=f}g+="$";return h?new RegExp(g,"mi"):new RegExp(g,"m")};return n})},"dojo/data/util/simpleFetch":function(){define(["../../_base/lang","../../_base/kernel","./sorter"],function(p,n,m){var h={};p.setObject("dojo.data.util.simpleFetch",h);h.errorHandler=function(g,f){f.onError&&f.onError.call(f.scope||n.global,g,f)};h.fetchHandler=function(g,f){var b=f.abort||null,e=!1,k=f.start?f.start:0,d=f.count&&Infinity!==f.count?k+f.count:g.length;f.abort=function(){e=!0;b&&b.call(f)};var c=f.scope||
n.global;f.store||(f.store=this);f.onBegin&&f.onBegin.call(c,g.length,f);f.sort&&g.sort(m.createSortFunction(f.sort,this));if(f.onItem)for(var a=k;a<g.length&&a<d;++a){var q=g[a];e||f.onItem.call(c,q,f)}f.onComplete&&!e&&(a=null,f.onItem||(a=g.slice(k,d)),f.onComplete.call(c,a,f))};h.fetch=function(g){g=g||{};g.store||(g.store=this);this._fetchItems(g,p.hitch(this,"fetchHandler"),p.hitch(this,"errorHandler"));return g};return h})},"dojo/data/util/sorter":function(){define(["../../_base/lang"],function(p){var n=
{};p.setObject("dojo.data.util.sorter",n);n.basicComparator=function(m,h){var g=-1;null===m&&(m=void 0);null===h&&(h=void 0);if(m==h)g=0;else if(m>h||null==m)g=1;return g};n.createSortFunction=function(m,h){function g(a,c,d,b){return function(e,k){var f=b.getValue(e,a),g=b.getValue(k,a);return c*d(f,g)}}for(var f=[],b,e=h.comparatorMap,k=n.basicComparator,d=0;d<m.length;d++){b=m[d];var c=b.attribute;if(c){b=b.descending?-1:1;var a=k;e&&("string"!==typeof c&&"toString"in c&&(c=c.toString()),a=e[c]||
k);f.push(g(c,b,a,h))}}return function(a,c){for(var d=0;d<f.length;){var b=f[d++](a,c);if(0!==b)return b}return 0}};return n})},"davinci/lang/workbench":function(){define([],function(){return{fileHasUnsavedChanges:"The file '${0}' has unsaved changes. Are you sure you want to close WITHOUT saving?",outlineNotAvailable:"An outline is not available",preferences:"Preferences",noUserPref:"no user preferences...",restoreDefaults:"Restore Defaults"}})},"davinci/repositoryinfo":function(){define({revision:"",
buildtime:"@buildtime@"})},"davinci/Workbench":function(){define("dcl/dcl dojo/_base/lang require ./Runtime ./ui/Dialog ./ve/metadata ./ve/utils/GeomUtils davinci/_WokbenchEditors davinci/_WokbenchMisc davinci/_Workbench_Menu davinci/_Workbench_Palette".split(" "),function(p,n,m,h,g,f,b,e,k,d,c){Function.prototype.bind=Function.prototype.bind||function(a){return dojo.hitch(a,this)};window.setInterval(function(){a.saveState&&a.updateWorkbenchState()},5E3);var a=new (p([e,k,d,c],{declaredClass:"davinci.Workbench",
_XX_last_member:!0,activePerspective:"",actionScope:[],_DEFAULT_PROJECT:"project1",_baseTitle:"Control-Freak ",hideEditorTabs:!0,_editorTabClosing:{},_shadowTabClosing:{},service:null,serviceClass:"XApp_XIDE_Workbench_Service",currentEditor:null,run2:function(){h.subscribe("/davinci/ui/widgetPropertiesChanges",function(){var a=h.currentEditor.visualEditor;a._objectPropertiesChange.apply(a,arguments)})},onResize:function(c){var d=c.explicitOriginalTarget?c.explicitOriginalTarget:c.srcElement;if(("resize"==
c.type||d.id&&-1<d.id.indexOf("dijit_layout__Splitter_")||d.nextSibling&&d.nextSibling.id&&-1<d.nextSibling.id.indexOf("dijit_layout__Splitter_"))&&(c=davinci&&h.currentEditor)&&c.onResize)c.onResize();a._originalOnResize&&a._originalOnResize();a._repositionFocusContainer()},showModal:function(a,c,d,b,e,k){return g.showModal(a,c,d,b,e,k)},showMessage:function(a,c,d,b,e){return g.showMessage(a,c,d,b,e)},showDialog:function(a){return g.showDialog(a)},_loadActionClass:function(a){a&&"string"==typeof a.action&&
m([a.action],function(c){try{if(c)a.action=new c,a.action.item=a;else debugger}catch(d){console.error("action class creation failed : "+a.action)}})},_toggleButton:function(c,d,b,e){c.checked&&(b.forEach(function(a){a!=c&&a.set("checked",!1)}),a._runAction(c.item,d,c.item.id))},_runAction:function(a,c,d){c&&h.currentEditor&&(c=h.currentEditor);if(a.run)a.run();else if(a.action)dojo.isString(a.action)&&this._loadActionClass(a),a.action.run(c);else if(a.method&&c&&c[a.method]instanceof Function)c[a.method](d);
else a.commandID&&h.executeCommand(a.commandID)},createPopup:function(c){var d=c.partID,b=c.domNode,e=c.context,k=c.openCallback,f=this.getActionSets(d),g=f.clonedActionSets,f=f.actionSets;try{if(0<g.length){var h=a._createMenuTree(g,!0);a._initActionsKeys(f,c);var m=a._createMenu(h,e);m&&b&&m.bindDomNode(b);m._widgetCallback=k;m._partID=d;return m}}catch(A){logError(A,"creating popup")}},getActionSets:function(a){var c=[];h.getExtension("davinci.actionSetPartAssociations",function(d){return d.parts.some(function(b){if(b==
a)return c.push(d.targetID),!0})});var d,b=[];c.length&&(d=h.getExtensions("davinci.actionSets",function(a){return c.some(function(c){return c==a.id})}),d.length&&d.forEach(function(a){var c=f.getLibraryActions(a.id);c.length&&(a=n.mixin({},a),a.actions=a.actions.concat(c));b.push(a)}));return{actionSets:d,clonedActionSets:b}},getFocusContainer:function(){var a=document.getElementById("focusContainer");a||(a=dojo.create("div",{"class":"focusContainer",id:"focusContainer"},document.body),davinci.Workbench.focusContainer=
a);return a},_repositionFocusContainer:function(){var a=dojo.byId("editorsStackContainer"),c=this.getFocusContainer();if(a&&c){var d=h.currentEditor;if(a=d&&d.getFocusContainerBounds?d.getFocusContainerBounds():b.getBorderBoxPageCoords(a))c.style.left=a.l+"px",c.style.top=a.t+"px",c.style.width=a.w+"px",c.style.height=a.h+"px",d&&d.getContext&&(c=d.getContext())&&c.updateFocusAll&&c.updateFocusAll()}},_removeFocusContainerChildren:function(){davinci.Workbench.focusContainer&&(davinci.Workbench.focusContainer.innerHTML=
"")}}));dojo.setObject("davinci.Workbench",a);return a})},"davinci/ve/utils/GeomUtils":function(){define(["dojo/_base/window","dojo/dom-geometry","dojo/dom-style","dojo/has","dojo/_base/sniff"],function(p,n,m,h,g){var f=["TABLE","TBODY","TR","TD","TH"];return{getMarginBoxPageCoords:function(b){var e;p.withDoc(b.ownerDocument,function(){var k=this.getBorderBoxPageCoords(b),d=this.getMarginExtents(b);e={l:k.l-d.l,t:k.t-d.t,w:k.w+d.l+d.r,h:k.h+d.t+d.b}}.bind(this));return e},getMarginBoxPageCoordsCached:function(b){b._maqMarginBoxPageCoords||
(b._maqMarginBoxPageCoords=this.getMarginBoxPageCoords(b));return b._maqMarginBoxPageCoords},getBorderBoxPageCoords:function(b){var e;p.withDoc(b.ownerDocument,function(){if(f.indexOf(b.tagName)){var k=b.getBoundingClientRect(),d=this.getScrollLeft(b),c=this.getScrollTop(b);e={l:k.left+d,t:k.top+c,w:k.width,h:k.height}}else{for(var k=b.offsetLeft,d=b.offsetTop,c=b.parentNode,a=b.offsetParent;c&&"BODY"!=c.tagName;){"number"==typeof c.scrollLeft&&"number"==typeof c.scrollTop&&(k-=c.scrollLeft,d-=c.scrollTop);
if(c==a)var q=n.getBorderExtents(a),k=k+(a.offsetLeft+q.l),d=d+(a.offsetTop+q.t),a=a.offsetParent;c=c.parentNode}e={l:k,t:d,w:b.offsetWidth,h:b.offsetHeight}}}.bind(this));return e},getBorderBoxPageCoordsCached:function(b){b._maqBorderBoxPageCoords||(b._maqBorderBoxPageCoords=this.getBorderBoxPageCoords(b));return b._maqBorderBoxPageCoords},getScrollLeft:function(b){b=b&&b.ownerDocument;return h("mozilla")?(b=b&&b.defaultView)?b.pageXOffset:0:(b=b&&b.body)?b.scrollLeft:0},getScrollTop:function(b){b=
b&&b.ownerDocument;return h("mozilla")?(b=b&&b.defaultView)?b.pageYOffset:0:(b=b&&b.body)?b.scrollTop:0},getMarginExtents:function(b,e){var k=e||m.getComputedStyle(b),d,c,a;k?(d=parseFloat(k.marginLeft)||0,c=parseFloat(k.marginTop)||0,a=parseFloat(k.marginRight)||0,k=parseFloat(k.marginBottom)||0):d=c=a=k=0;return{l:d,t:c,r:a,b:k,w:d+a,h:c+k}},clearGeomCache:function(b){delete b._maqBorderBoxPageCoords;delete b._maqMarginBoxPageCoords}}})},"davinci/_WokbenchEditors":function(){define(["dcl/dcl","./Runtime",
"dojo/promise/all"],function(p,n,m){return p(null,{closeAllEditors:function(){var h=dijit.byId("editors_container");h&&h.getChildren().forEach(function(g){h.closeChild(g)})},getOpenEditor:function(h){return this.currentEditor?this.currentEditor:null!=h?(h=dijit.byId(filename2id(h.getPath())))?h.editor:null:(h=dijit.byId("editors_container"))&&h.selectedChildWidget&&h.selectedChildWidget.editor?h.selectedChildWidget.editor:null},closeActiveEditor:function(){var h=dijit.byId("editors_container"),g=
dijit.byId("davinci_file_tabs");if(h&&h.selectedChildWidget&&h.selectedChildWidget.editor){var f=selectedChildWidget.id.replace(/^editor/,"shadow");h.closeChild(h.selectedChildWidget);(h=dijit.byId(f))&&g.closeChild(h)}},getAllOpenEditorIds:function(){},_showEditorTopPanes:function(){this._hideShowEditorTopPanes("block")},_hideEditorTopPanes:function(){this._hideShowEditorTopPanes("none")},_hideShowEditorTopPanes:function(h){},_editorTabClosed:function(h){if(!davinci.Workbench._editorTabClosing[h.id]){davinci.Workbench._editorTabClosing[h.id]=
!0;if(h&&h.editor&&h.editor.fileName){var g=h.id.replace(/^editor/,"shadow"),f=dijit.byId("davinci_file_tabs"),b=dijit.byId(g),e=Workbench._state.editors.indexOf(h.editor.fileName);-1!=e&&Workbench._state.editors.splice(e,1);Workbench.saveState=!0;davinci.Workbench._shadowTabClosing[g]||(f.removeChild(b),b.destroyRecursive())}dijit.byId("editors_container").getChildren().length||(Workbench._switchEditor(null),this._expandCollapsePaletteContainers(null),g=dijit.byId("editorsStackContainer"),f=dijit.byId("editorsWelcomePage"),
g&&f&&g.selectChild(f),this._hideEditorTopPanes());delete davinci.Workbench._editorTabClosing[h.id]}},openEditor:function(h,g){try{var f=h.fileName,b;"string"==typeof f?b=f.substr(f.lastIndexOf(".")+1):(b=f.getExtension(),f=f.getPath());var e=dijit.byId(filename2id(f)),k=dijit.byId("editors_container");if(e){k.selectChild(e);var d=e.editor;h.startOffset&&d.select(h)}else{var c=h.editorCreateCallback,a=n.getExtensions("davinci.editor",function(a){"string"==typeof a.extensions&&(a.extensions=a.extensions.split(","));
return dojo.some(a.extensions,function(a){return a.toLowerCase()==b.toLowerCase()})}),q=a[0];1<a.length&&dojo.some(a,function(a){q=a;return a.isDefault});Workbench._createEditor(q,f,h,g).then(function(a){c&&c.call(window,a);h.noSelect||(n.currentEditor=a)},function(a){console.error("Error opening editor for filename: "+f,a)})}}catch(w){console.error("Exception opening editor for filename: "+h&&h.fileName),console.error(w)}},_switchEditor:function(h,g){var f=n.currentEditor;n.currentEditor=h;var b=
davinci.Workbench;b._state&&(b._state.activeEditor=h?h.fileName:null);this._removeFocusContainerChildren();this._showEditorTopPanes();try{dojo.publish("/davinci/ui/editorSelected",[{editor:h,oldEditor:f}])}catch(e){console.error(e)}b._updateTitle(h);setTimeout(function(){h&&h.visualEditor&&h.visualEditor.context&&h.visualEditor.context.isActive()&&h.visualEditor.context.getTopWidgets().forEach(function(b){b.resize&&b.resize()});this._repositionFocusContainer()}.bind(this),1E3);m(this._showViewPromises).then(function(){h&&
h.focus&&h.focus();this._rearrangePalettes(h);this._expandCollapsePaletteContainers(h)}.bind(this));g||(b.saveState=!0)}})})},"davinci/_WokbenchMisc":function(){define("dcl/dcl require ./Runtime ./ui/Dialog davinci/lang/webContent ./ve/metadata dojo/_base/connect xide/manager/ServerActionBase".split(" "),function(p,n,m,h,g,f,b,e){var k=function(c,a){if(401==a.status||403==a.status)d();else if(!0===c.canceled){var b=c.ioArgs.url;(new RegExp("(^|\\.\\/|"+document.baseURI+"\\/)cmd\\/")).test(b)&&(0<=
b.indexOf("getBluePageInfo")||m.handleError(a.message))}},d=function(){var c=new h({title:g.sessionTimedOut}),a=dojo.string.substitute(g.sessionTimedOutMsg,{hrefLoc:"welcome"});c.set("content",a);dojo.connect(c,"onCancel",null,function(){window.location.href="welcome"});setTimeout(function(){window.location.href="welcome"},1E4);c.show()};return p(null,{run:function(){var c=davinci.Workbench;console.error("run ");m.run();c._initKeys();c._baseTitle=dojo.doc.title;try{c.initService()}catch(a){debugger}window.maqetta&&
maqetta.TopBanner&&maqetta.TopBanner.setup&&maqetta.TopBanner.setup();m.subscribe("/davinci/resource/resourceChanged",function(a,c){if("deleted"==a){var d;d=c.getPath();d="editor-"+encodeURIComponent(d.replace(/[\/| |\t]/g,"_")).replace(/%/g,":");var b=editorIdToShadowId(d);d=dijit.byId(d);b=dijit.byId(b);if(d&&!d._isClosing){var e=dijit.byId("editors_container"),q=dijit.byId("davinci_file_tabs");e.removeChild(d);d.destroyRecursive();q.removeChild(b);b.destroyRecursive()}}});m.subscribe("/dojo/io/error",
k);m.subscribe("/davinci/states/state/changed",function(a){var c=m.currentEditor;"davinci.ve.themeEditor.ThemeEditor"!=c.declaredClass&&"davinci.review.editor.ReviewEditor"!=c.declaredClass&&c.visualEditor.onContentChange.apply(c.visualEditor,arguments)});m.subscribe("/davinci/ui/widgetPropertiesChanges",function(){var a=m.currentEditor.visualEditor;a._objectPropertiesChange.apply(a,arguments)});b.subscribe("/davinci/states/state/changed",function(a){var c=m.currentEditor&&"davinci.ve.PageEditor"==
m.currentEditor.declaredClass&&m.currentEditor.visualEditor&&m.currentEditor.visualEditor.context;if(c){var d,b,c=c?c.getDijit():null,e=n("davinci/ve/widget");a.newState&&!a.newState.indexOf("_show:")&&(d=c.byId(a.newState.substring(6)),d=e.getWidget(d.domNode),(b=d.getHelper())&&b.popup&&b.popup(d));a.oldState&&!a.oldState.indexOf("_show:")&&(d=c.byId(a.oldState.substring(6)),d=e.getWidget(d.domNode),(b=d.getHelper())&&b.tearDown&&b.tearDown(d))}});b.subscribe("/davinci/ui/repositionFocusContainer",
function(a){c._repositionFocusContainer()});var d=this.service.serviceObject[this.serviceClass].getInfo().then(function(a){m._initializationInfo=a;a=a.userInfo;m.isLocalInstall="maqettaUser"==a.userId;m.userName=a.userId;m.userEmail=a.email;return f.init()}).then(function(){var a=m.initialPerspective||"davinci.ui.main";dojo.query(".loading").orphan();c.showPerspective(a);c._updateTitle();initializeWorkbenchState()}).otherwise(function(a){dojo.query("#load_screen").addContent(dojo.string.substitute(g.startupError,
[a.message]),"only")});c._lastAutoSave=Date.now();setInterval(dojo.hitch(this,"_autoSave"),3E4);return d},initService:function(){this.service||(this.service=new e({serviceClass:"XApp_XIDE_Workbench_Service",serviceUrl:"./xcf/xui.php?debug\x3dtrue\x26view\x3drpc",singleton:!1}),this.service.init())},findView:function(c){if(c=dijit.byId(c))return c},location:function(){return m.location()},logoff:function(c){},unload:function(){davinci.Workbench._autoSave()},singleProjectMode:function(){return!0},getProject:function(){var c=
davinci.Workbench;return c.getActiveProject()||c._DEFAULT_PROJECT},loadProject:function(c){var a=davinci.Workbench;a.setActiveProject(c);return a.updateWorkbenchState().then(function(){location.href="cmd/configProject?configOnly\x3dtrue\x26project\x3d"+encodeURIComponent(c)})},getActiveProject:function(){return"project1"},setActiveProject:function(c){var a=davinci.Workbench;a._state||(a._state={});a._state.project=c;a.saveState=!0},setActionScope:function(c,a){davinci.Workbench.actionScope[c]=a},
clearWorkbenchState:function(){var c=davinci.Workbench;c._state={};return c.updateWorkbenchState()},updateWorkbenchState:function(){delete davinci.Workbench.saveState;return null},getDefaultMount:function(){},workbenchStateCustomPropGet:function(c){var a=davinci.Workbench;if("string"==typeof c)return a._state[c]},workbenchStateCustomPropSet:function(c,a){var d=davinci.Workbench;"string"==typeof c&&("undefined"==typeof a?delete d._state[c]:d._state[c]=a,d.saveState=!0)},_autoSave:function(){var c=
davinci.Workbench,a=!1;if(this.currentEditor){var d=this.currentEditor;if(d.isReadOnly)console.error("workbench : autosave failed : isReadyOnly or is not dirty");else try{d.save(!0)}catch(b){console.error("Error while autosaving file:"+b),a=!0}}a||(c._lastAutoSave=Date.now())},_updateTitle:function(c){var a=davinci.Workbench._baseTitle||"";c&&(a+="",c.isDirty&&(a+="*"),a+=c.item.name);dojo.doc.title=a},_initActionsKeys:function(c,a){var d=davinci.Workbench,b=a.keysDomNode||a.domNode,e={},k;dojo.forEach(c,
function(a){dojo.forEach(a.actions,function(a){a.keySequence&&(e[a.keySequence]=a,k=!0)})});if(k){var f=a.context;dojo.connect(b,"onkeydown",function(a){a=d._keySequence(a);a=e[a];!a||a.action.shouldShow&&!a.action.shouldShow(f)||a.action.isEnabled(f)&&d._runAction(a,f)})}},_initKeys:function(){var c=davinci.Workbench,a={all:[]},d=m.getExtensions("davinci.keyBindings");dojo.forEach(d,function(c){var d=c.contextID||"all",b=a[d];b||(b=a[d]=[]);b[c.sequence]=c.commandID});c.keyBindings=a},handleKey:function(c){var a=
davinci.Workbench;if(a.keyBindings){c=a._keySequence(c);var d;a.currentContext&&a.keyBindings[a.currentContext]&&(d=a.keyBindings[a.currentContext][c]);d||(d=a.keyBindings.all[c]);if(d)return m.executeCommand(d),!0}},_keySequence:function(c){var a=[];window.event?(window.event.ctrlKey&&a.push("M1"),window.event.shiftKey&&a.push("M2"),window.event.altKey&&a.push("M3")):((c.ctrlKey||2==c.modifiers||3==c.modifiers||5<c.modifiers)&&a.push("M1"),(c.shiftKey||3<c.modifiers)&&a.push("M2"),c.modifiers?(c.altKey||
c.modifiers%2)&&a.push("M3"):c.altKey&&a.push("M3"));var d=String.fromCharCode(c.keyCode);/[A-Z0-9]/.test(d)||(d={46:"del",114:"f3"}[c.keyCode]||"xxxxxxxxxx");d=d.toUpperCase();" "==d&&(d="' '");a.push(d);return a.join("+")},setupGlobalKeyboardHandler:function(){var c=m.getExtensions("davinci.actionSets");dojo.forEach(c,function(a){"davinci.ui.main"!=a.id&&"davinci.ui.editorActions"!=a.id||dojo.forEach(a.actions,function(a){a.keyBinding&&m.registerKeyBinding(a.keyBinding,a)})})}})})},"davinci/_Workbench_Menu":function(){define("dcl/dcl dojo/_base/declare ./Runtime dijit/Menu dijit/MenuBar dijit/MenuItem dijit/MenuSeparator dijit/PopupMenuBarItem dijit/form/DropDownButton davinci/_WokbenchEditors davinci/_WokbenchMisc".split(" "),
function(p,n,m,h,g,f,b,e,k){var d=n(h,{menuOpened:function(c){},_openMyself:function(c){this.menuOpened(c);var a;try{var d=document.getElementById("menuOverlayDiv");d||(d=dojo.create("div",{id:"menuOverlayDiv",style:"left:0px; top:0px; width:100%; height:100%; position:absolute; z-index:10;"},document.body));if(this.adjustPosition){var b=this.adjustPosition(c);a=dijit.popup.open;dijit.popup.open=function(c){c.x+=b.x;c.y+=b.y;a.call(dijit.popup,c)}}this.onClose=function(){var a=document.getElementById("menuOverlayDiv");
a&&a.parentNode.removeChild(a)}.bind(this);this.inherited(arguments)}finally{a&&(dijit.popup.open=a)}}});return p(null,{declaredClass:"davinci.Workbench_Menu",updateMenubar:function(c,a){console.error("updateMenubar")},_updateMainMenubar:function(c,a){console.error("_updateMainMenubar")},_addItemsToMenubar:function(c,a){console.error("_addItemsToMenubar")},_createMenu:function(c,a){var b,e,k;c.menus?(b=new h({parentMenu:c}),e=c.menus,k="onOpen"):(b=new d({}),e=c,k="menuOpened");b.domNode.style.display=
"none";b.actionContext=a;this._rebuildMenu(b,e);dojo.connect(b,k,this,function(a){b._widgetCallback&&b._widgetCallback(a);this._rebuildMenu(b,e).focus()});return b},_rebuildMenu:function(c,a){dojo.forEach(c.getChildren(),function(a){c.removeChild(a);a.destroy()});c.focusedChild=null;var d,e;a.forEach(function(a,k){a.menus.length&&(a.isSeparator&&0<k&&(d=!0),a.menus.forEach(function(a){d&&e&&(c.addChild(new b({})),d=!1);e=!0;var k=a.label;a.action&&a.action.getName&&(k=a.action.getName());if(a.separator)a=
davinci.Workbench._createMenu(a),a=new f({label:k,popup:a,id:a.id+"item"}),a.actionContext=c.actionContext,c.addChild(a);else{var g=!0;a.isEnabled&&(g=m.getSelection(),g=(g=g[0]&&g[0].resource)?a.isEnabled(g):!1);if(a.action){if(a.action.shouldShow&&!a.action.shouldShow(c.actionContext,{menu:c}))return;g=a.action.isEnabled&&a.action.isEnabled(c.actionContext)}k={label:k,id:a.id,disabled:!g,onClick:dojo.hitch(this,"_runAction",a,c.actionContext)};a.iconClass&&(k.iconClass=a.iconClass);c.addChild(new f(k))}},
this))},this);return c},_createMenuTree:function(c,a){function d(a,c,e){c=(c||"additions").split("/");var q=b;davinci.Workbench._loadActionClass(a);var k=c[c.length-1];if(1<c.length)for(var f=0,g=c.length-1;f<g;f++){var r;a:{r=0;for(var h=q.length;r<h;r++)for(var m=0,x=q[r].menus.length;m<x;m++)if(c[f]==q[r].menus[m].id){r=q[r].menus[m].menus;break a}r=void 0}r&&(q=r)}f=0;for(g=q.length;f<g;f++)if(q[f].id==k){c=q[f].menus;c.push(a);if(a.separator){e=!1;c=a.menus=[];for(q=0;q<a.separator.length;q+=
2)k=a.separator[q],e="additions"==k,c.push({id:k,isSeparator:a.separator[q+1],menus:[]});e||c.push({id:"additions",isSeparator:!1,menus:[]})}return}e&&b.push({id:k,isSeparator:!1,menus:[a]})}c||(c=m.getExtensions("davinci.actionSets",function(a){return 0==m.getExtensions("davinci.actionSetPartAssociations",function(c){return c.targetID==a.id}).length}));for(var b=[],e=0,k=c.length;e<k;e++){var f=c[e];if(f.visible&&f.menu)for(var g=0,h=f.menu.length;g<h;g++){var u=f.menu[g];if(u.__mainMenu)for(var v=
0;v<u.separator.length;v+=2)b.push({id:u.separator[v],isSeparator:u.separator[v+1],menus:[]});else if(d(u,u.path,a),u.populate instanceof Function){var u=u.populate(),A;for(A in u)d(u[A],u[A].menubarPath)}}}e=0;for(k=c.length;e<k;e++)if(f=c[e],f.visible)for(g=0,h=f.actions.length;g<h;g++)A=f.actions[g],A.menubarPath&&d(A,A.menubarPath,a);return b}})})},"davinci/_Workbench_Palette":function(){define(["dcl/dcl","davinci/Runtime"],function(p,n){var m={};return p(null,{declaredClass:"davinci.Workbench_Menu",
_rearrangePalettes:function(h){var g,f,b;h?((f=n.getExtensions("davinci.editor",function(b){return h?b.id===h.editorID:!1}))&&0<f.length&&(g=f[0].palettePerspective),f=h._rightPaletteExpanded,b=h._leftPaletteExpanded):g=n.initialPerspective||"davinci.ui.main";g&&((g=n.getExtension("davinci.perspective",g))||console.error("---error"),dojo.forEach(g.views,function(b){var k=b.viewID,d=b.position;0>d.indexOf("bottom")&&(d+="-top");if(k=dijit.byId(k)){var c=k.getParent(),d=mainBody.tabs.perspective[d];
c!=d&&(c&&c.removeChild(k),b.hidden||(d.addChild(k),c=d));c&&(b.hidden?c.removeChild(k):b.selected&&(c._maqDontExpandCollapse=!0,c.selectChild(k),delete c._maqDontExpandCollapse))}}));h&&(h.hasOwnProperty("_rightPaletteExpanded")&&(h._rightPaletteExpanded=f),h.hasOwnProperty("_leftPaletteExpanded")&&(h._leftPaletteExpanded=b))},_nearlyCollapsed:function(h){h=dojo.style(h,"width");"string"==typeof h&&(h=parseInt(h));return 91>h},_expandCollapsePaletteContainer:function(h){if(h&&h.domNode&&(h=davinci.Workbench.findPaletteContainerNode(h.domNode),
h.id)){var g=h._maqExpanded,f;this._nearlyCollapsed(h)&&(g=!1,f=91<=m[h.id].expandToSize?m[h.id].expandToSize:m[h.id].initialExpandToSize);g?this.collapsePaletteContainer(h):this.expandPaletteContainer(h,{expandToSize:f})}},_expandCollapsePaletteContainers:function(h,g){var f=dijit.byId("left_mainBody"),b=dijit.byId("right_mainBody");if(h){var e=n.getExtensions("davinci.editor",function(d){return d.id===h.editorID});if(e&&0<e.length){var e=e[0].expandPalettes,k;f&&((k=h&&h.hasOwnProperty("_leftPaletteExpanded")?
h._leftPaletteExpanded:e&&0<=e.indexOf("left"))?this.expandPaletteContainer(f.domNode,g):this.collapsePaletteContainer(f.domNode,g));b&&((k=h&&h.hasOwnProperty("_rightPaletteExpanded")?h._rightPaletteExpanded:e&&0<=e.indexOf("right"))?this.expandPaletteContainer(b.domNode,g):this.collapsePaletteContainer(b.domNode,g))}}else f&&this.collapsePaletteContainer(f.domNode,g),b&&this.collapsePaletteContainer(b.domNode,g)},findPaletteContainerNode:function(h){for(var g;h&&"BODY"!=h.tagName;){if(dojo.hasClass(h,
"davinciPaletteContainer")){g=h;break}h=h.parentNode}return g},collapsePaletteContainer:function(h,g){var f=davinci.Workbench.findPaletteContainerNode(h);if(f&&f.id){var b=f.id,e=dojo.style(f,"width"),k=dijit.byNode(f),d=dojo.query("[role\x3dtablist]",f);if(k&&0<d.length){var d=dojo.marginBox(d[0]),c=k.getParent();c&&c.resize&&d&&d.w&&(this._nearlyCollapsed(f)||g&&g.dontPreserveWidth||(m[b].expandToSize=e),f.style.width=d.w+"px",c.resize(),k._isCollapsed=!0)}dojo.removeClass(f,"maqPaletteExpanded");
f._maqExpanded=!1;davinci.Workbench._repositionFocusContainer();if(b=n.currentEditor)"left_mainBody"==f.id?b._leftPaletteExpanded=!1:"right_mainBody"==f.id&&(b._rightPaletteExpanded=!1)}},expandPaletteContainer:function(h,g){var f=g&&g.expandToSize,b=davinci.Workbench.findPaletteContainerNode(h);if(b&&b.id){var e=b.id,k=dijit.byNode(b);f&&(m[e].expandToSize=f);k&&m[e].expandToSize&&(f=k.getParent())&&f.resize&&(b.style.width=m[e].expandToSize+"px",f.resize(),delete k._isCollapsed);dojo.addClass(b,
"maqPaletteExpanded");b._maqExpanded=!0;davinci.Workbench._repositionFocusContainer();if(e=n.currentEditor)"left_mainBody"==b.id?e._leftPaletteExpanded=!0:"right_mainBody"==b.id&&(e._rightPaletteExpanded=!0)}}})})},"davinci/ui/widgets/OutlineTree":function(){define(["dojo/_base/declare"],function(p){return p(null,{})})},"davinci/davinci_":function(){define("dijit/dijit ./Workbench ./ve/palette/HtmlWidgets ./ve/views/StatesView ./ve/views/SwitchingStyleView ./actions/UndoAction ./actions/SelectThemeAction ./actions/SelectLayoutAction ./actions/RedoAction ./actions/DownloadAction ./actions/StickyNoteAction ./actions/SaveAsWidget ./actions/UserNameAction ./actions/LogoutAction ./ve/actions/CopyAction ./ve/actions/CutAction ./ve/actions/DeleteAction ./ve/actions/PasteAction ./ve/actions/DuplicateAction ./ve/actions/EditValueAction ./ve/actions/EditPropertiesAction ./ve/actions/SurroundAction ./ve/actions/SelectParentAction ./ve/actions/SelectAncestorAction ./ve/actions/UnselectAllAction ./ve/actions/ArrangeAction ./ve/actions/MoveToFrontAction ./ve/actions/MoveToBackAction ./ve/actions/MoveForwardAction ./ve/actions/MoveBackwardAction ./ve/actions/OtherAction ./ve/actions/EnableApplicationStates ./ve/actions/ViewDesignAction ./ve/actions/ViewSourceAction ./ve/actions/ViewSourceMenuAction ./ve/actions/ViewSplitHMenuAction ./ve/actions/ViewSplitVMenuAction ./ve/actions/AddState ./ve/actions/RemoveState ./ve/actions/ModifyState ./ve/actions/ManageStates ./ve/actions/NewWidgetsCurrentState ./ve/actions/HighlightBaseWidgets ./ve/actions/ShowInOutline ./ve/PageEditor ./html/ui/HTMLEditor ./html/ui/ImageViewer ./ve/prefs/HTMLEditPreferences dijit/layout/LayoutContainer ./commands/OrderedCompoundCommand ./version".split(" "),
function(){})},"davinci/ve/palette/HtmlWidgets":function(){define(["dojo/_base/declare","davinci/workbench/ViewPart","davinci/ve/palette/Palette"],function(p,n,m){return p("davinci.ve.palette.HtmlWidgets",n,{constructor:function(h,g){dojo.subscribe("/davinci/ui/editorSelected",dojo.hitch(this,this._editorSelected))},_editorSelected:function(h){h.editor&&h.editor.supports("palette")?(this.setContext([h.editor.getContext()]),dojo.removeClass(this.palette.domNode,"dijitHidden")):(this.palette.domNode.scrollTop=
0,dojo.addClass(this.palette.domNode,"dijitHidden"))},postCreate:function(){this.inherited(arguments);this.attachToolbar();this.palette=new m({toolbarDiv:this.toolbarDiv});this.palette.descriptors="dijit,dojox,html,OpenAjax";this.setContent(this.palette);this.palette._loadPalette();dojo.addClass(this.palette.domNode,"dijitHidden")},setContext:function(h){this.palette.setContext(h[0])}})})},"davinci/workbench/ViewPart":function(){define(["dojo/_base/declare","./_ToolbaredContainer","../ve/States",
"../Runtime"],function(p,n,m,h){return p("davinci.workbench.ViewPart",n,{constructor:function(g,f){this.viewExt=g.view;this.subscriptions=[];this.publishing={}},startup:function(){this.inherited(arguments);this.domNode.view=this;this.viewExt.startup&&this.viewExt.startup()},subscribe:function(g,f){this.subscriptions.push(dojo.subscribe(g,this,f))},publish:function(g,f){this.publishing[g]=!0;try{dojo.publish(g,f)}catch(b){console.error(b)}delete this.publishing[g]},destroy:function(){dojo.forEach(this.subscriptions,
dojo.unsubscribe);delete this.subscriptions},_getViewActions:function(){var g=this.toolbarID||this.viewExt.id,f=[];h.getExtensions("davinci.viewActions",function(b){if(g==b.viewContribution.targetID)return f.push(b.viewContribution),!0});return f}})})},"davinci/workbench/_ToolbaredContainer":function(){define(["dojo/_base/declare","dijit/layout/_LayoutWidget","dijit/_Templated"],function(p,n,m){return p("davinci.workbench._ToolbaredContainer",[n,m],{templateString:"\x3cdiv\x3e\x3cdiv dojoAttachPoint\x3d'titleBarDiv' class\x3d'palette_titleBarDiv'\x3e\x3c/div\x3e\x3cdiv dojoAttachPoint\x3d'toolbarDiv' class\x3d'toolbaredContainer_toolbarDiv'\x3e\x3c/div\x3e\x3cdiv dojoAttachPoint\x3d'containerNode'\x3e\x3c/div\x3e\x3c/div\x3e",
gutters:!1,_toolbarCreated:{},layout:function(){var h=[{domNode:this.titleBarDiv,layoutAlign:"top"},{domNode:this.toolbarDiv,layoutAlign:"top"},{domNode:this.containerNode,layoutAlign:"client"}];dijit.layout.layoutChildren(this.domNode,this._contentBox,h);this._containerContentBox=dijit.layout.marginBox2contentBox(this.containerNode,h[2]);var g=dijit.byNode(this.containerNode);g&&g.resize&&g.resize(this._containerContentBox);dojo.marginBox(this.containerNode,h[2])},setContent:function(h){this.mainWidget=
h;h=h.domNode||h;dojo.place(h,this.containerNode,"replace");this.containerNode=h;this.toolbarCreated(this.declaredClass)||this._createToolbar(this.declaredClass);this.titleBarDiv.innerHTML='\x3cspan class\x3d"paletteCloseBox"\x3e\x3c/span\x3e\x3cspan class\x3d"titleBarDivTitle"\x3e'+this.title+"\x3c/span\x3e";h=dojo.query(".paletteCloseBox",this.titleBarDiv);0<h.length&&dojo.connect(h[0],"click",this,function(g){davinci.Workbench.collapsePaletteContainer(g.currentTarget)});this._started&&this.layout()},
removeContent:function(){var h=dojo.doc.createElement("div");dojo.place(h,this.containerNode,"replace");this.containerNode=h;this.mainWidget&&this.mainWidget.destroy();delete this.mainWidget},_getViewActions:function(){},getTopAdditions:function(){},_createToolbar:function(h){var g=require("davinci/Workbench"),f=this.getToolbarDiv(),b=this.getTopAdditions();b&&f.appendChild(b);this.toolbarMenuActionSets&&(b="m"+Date.now(),f=dojo.create("span",{id:b+"_menucontainer","class":"paletteDropdown"},f),f=
dojo.create("span",{id:b+"_menu"},f),g.updateMenubar(f,this.toolbarMenuActionSets));(f=this._getViewActions())&&f.length&&(b=dojo.create("div",{"class":"toolbaredContainer_toolbarDiv"}),b=dojo.create("span",{style:{display:"inline-block"}},b),g=g._createToolBar("toolbarPath",b,f,this._getViewContext()),dojo.style(g.domNode,{display:"inline-block","float":"left"}),this.toolbarCreated(h,g))},_getViewContext:function(){return this},getToolbarDiv:function(){return this.toolbarDiv},toolbarCreated:function(h,
g){1<arguments.length&&(this._toolbarCreated[h]=g);return this._toolbarCreated[h]},attachToolbar:function(){var h=this.toolbarCreated(this.declaredClass),g=this.getToolbarDiv();h&&h.domNode&&g&&(g.innerHTML="",g.appendChild(h.domNode))}})})},"davinci/ve/States":function(){"undefined"===typeof davinci&&(davinci={});davinci.AppStatesDontInitialize=!0;define("dojo/_base/declare dojo/_base/connect dojo/query dojo/dom-class dojo/dom-style dojo/_base/window dijit/registry davinci/Runtime davinci/Workbench davinci/maqetta/AppStates ./utils/GeomUtils ./commands/EventCommand ./commands/StyleCommand davinci/ve/utils/StyleArray davinci/workbench/Preferences davinci/lang/ve".split(" "),
function(p,n,m,h,g,f,b,e,k,d,c,a,q,w,r,B){var y=document;p=p(d,{_update:function(a,c){e.currentEditor&&"davinci.ve.PageEditor"==e.currentEditor.declaredClass&&a&&a._dvWidget&&(a._maqAppStates||!a._maqDeltas)&&this._refresh(a._dvWidget)},_refresh:function(a){var c=a.getParent();c.dijitWidget?this._refresh(c):a&&a.resize&&a.resize()},_updateEvents:function(c,d,b){if(c&&c._dvWidget){c=c._dvWidget;var e=["onclick","onmouseover","onmouseout","onfocus","onblur"],q,k;for(k in e){var f=e[k],g=c&&c.properties&&
c.properties[f];if("string"==typeof g&&0<=g.indexOf("davinci.states.setState")){var w=g,g=g.replace("'"+d+"'","'"+b+"'");g!==w&&(q=q||{},q[f]=g)}}if(d=this.getContext())q=new a(c,q),d.getCommandStack().execute(q)}},normalize:function(a,c,d,b){switch(a){case "style":var e=this.getStatesListCurrent(c);for(a=0;a<e.length;a++)e[a]="Normal";if(c=this.getStyle(c,e,d))for(a=0;a<c.length;a++)c[a][d]&&(b=c[a][d])}return b},normalizeArray:function(a,c,d,b){b=dojo.clone(b);switch(a){case "style":var e=this.getStatesListCurrent(c);
for(a=0;a<e.length;a++)e[a]="Normal";if(c=this.getStyle(c,e,d)){for(a=0;a<c.length;a++){d=c[a];for(var q in d)for(d=b.length-1;0<=d;d--){var e=b[d],k;for(k in e)if(k==q){b.splice(d,1);break}}}b=b.concat(c)}}return b},getEditor:function(){return e.currentEditor},getContext:function(){var a=this.getEditor();return a&&(a.getContext&&a.getContext()||a.context)},getDocument:function(){var a=this.getContext();return a&&a.getDocument&&a.getDocument()},resetState:function(a){if(a){var c=this.getStateContainersForNode(a);
a=this.getFocus(a.ownerDocument.body);for(var d=0;d<c.length;d++){var b=c[d],e=this.getState(b);this.setState(e,b,{focus:a&&b==a.stateContainerNode&&e==a.state,updateWhenCurrent:!0,silent:!1})}}},_updateSrcState:function(a,c){var d=a&&a._dvWidget;if(d){var b=d._srcElement.getAttribute(davinci.states.APPSTATES_ATTRIBUTE),e=d._srcElement.getAttribute(davinci.states.DELTAS_ATTRIBUTE);if(d&&d._srcElement){var q=this.serialize(a);q.maqAppStates&&q.maqAppStates.trim();q.maqAppStates?d._srcElement.addAttribute(davinci.states.APPSTATES_ATTRIBUTE,
q.maqAppStates):d._srcElement.removeAttribute(davinci.states.APPSTATES_ATTRIBUTE);q.maqDeltas&&q.maqDeltas.trim();q.maqDeltas?d._srcElement.addAttribute(davinci.states.DELTAS_ATTRIBUTE,q.maqDeltas):d._srcElement.removeAttribute(davinci.states.DELTAS_ATTRIBUTE);q=d._srcElement.getAttribute(davinci.states.APPSTATES_ATTRIBUTE);d=d._srcElement.getAttribute(davinci.states.DELTAS_ATTRIBUTE);(b!==q||e!==d)&&(b=this.getEditor())&&b._visualChanged&&b._visualChanged(c)}}},_removeStateFromNodeRecursive:function(a,
c){var d=a._dvWidget;if(a&&d&&c){this._removeStateFromNode(a,c);for(var d=d.getChildren(),b=0;b<d.length;b++)this._removeStateFromNodeRecursive(d[b].domNode,c)}},_removeStateFromNode:function(a,c){if(a&&a._maqDeltas&&a._maqDeltas[c]){delete a._maqDeltas[c];var d=!1,b;for(b in a._maqDeltas)if("undefined"!==b){d=!0;break}d||delete a._maqDeltas;this._updateSrcState(a)}},removeUnusedStates:function(a){if(a){a=a.getAllWidgets();for(var c=0;c<a.length;c++){var d=a[c].domNode;if("BODY"!==d.tagName&&d&&d._maqDeltas){var b=
this.getAllStatesForNode(d),e;for(e in d._maqDeltas)"undefined"!==e&&0>b.indexOf(e)&&this._removeStateFromNode(d,e)}}}},_getStateIndex:function(a){return a&&"Normal"!=a&&"undefined"!=a?a:"undefined"},getCurrentStateIndex:function(){return this._getStateIndex(this.getState())},getApplyToStateIndex:function(a){var c=this.getState();return this._getStateIndex("current"===a&&c&&"Normal"!=c&&"undefined"!=c?c:void 0)},getEffectiveDisplayValue:function(a,c,d,b){a=c?c.domNode:null;c="none";var e=d||"undefined";
if(b&&"string"==typeof b[e]&&"$MAQ_DELETE_PROPERTY$"!=b[e])c=b[e];else if(a){var q=!1;if(a._maqDeltas&&(!b||"$MAQ_DELETE_PROPERTY$"!=b[e])){var k=a._maqDeltas[d]&&a._maqDeltas[d].style;if(k)for(d=0;d<k.length;d++){var f=k[d],w;for(w in f)"display"==w&&(c=f[w],q=!0)}}if(!q){if(b&&"string"==typeof b.undefined)c=b.undefined;else{b=a._maqDeltas&&a._maqDeltas.undefined&&a._maqDeltas.undefined.style;e=!1;if(b)for(d=0;d<b.length;d++)for(w in f=b[d],f)"display"==w&&(c=f[w],e=!0);e||(c=g.get(a,"display"))}e=
"undefined"}if(0==a.offsetLeft&&0==a.offsetTop&&0==a.offsetWidth&&0==a.offsetHeight)c="none";else for(;a&&"BODY"!=a.tagName.toUpperCase();){if(a&&a.ownerDocument&&a.ownerDocument.defaultView&&"none"==g.get(a,"display")){c="none";break}a=a.parentNode}}else c="none";return{effectiveDisplayValue:c,effectiveState:e}},propertyDefinedForAnyCurrentState:function(a,c){var d,b=a._maqDeltas;if(b){var e=this.getStateContainersForNode(a),q=e.length-1;a:for(;0<=q;q--){var k=this.getState(e[q]),f=k&&k!=this.NORMAL?
k:"undefined";if(f=b[f]&&b[f].style)for(var g=0;g<f.length;g++)for(var w=f[g],r=0;r<c.length;r++)if(w.hasOwnProperty(c[r])){d=k;break a}}}return d},_customStateActive:function(a){return a?this.getState(a.rootNode):!1},updateStateIcons:function(a){a&&a.editor&&a.editor==e.currentEditor&&"davinci.ve.PageEditor"==a.editor.declaredClass&&f.withDoc(y,function(){var c=m(".manageStatesButton")[0],d=b.byNode(c),c=m(".manageStatesIcon")[0];d&&c&&(this.manageStatesActive(a)?(h.remove(c,"manageStatesIconDisabled"),
d.set("disabled",!1)):(h.add(c,"manageStatesIconDisabled"),d.set("disabled",!0)));var d=r.getPreferences("davinci.ve.editorPrefs",davinci.Workbench.getProject()).newWidgetsCurrentState,c=m(".newWidgetsCurrentStateButton")[0],e=b.byNode(c),c=m(".newWidgetsCurrentStateIcon")[0];e&&c&&(this.newWidgetsCurrentStateActive(a)?h.remove(c,"newWidgetsCurrentStateIconDisabled"):h.add(c,"newWidgetsCurrentStateIconDisabled"),d?(h.remove(c,"newWidgetsCurrentStateIconOff"),h.add(c,"newWidgetsCurrentStateIconOn"),
e.set("title",B.NewWidgetsCurrentStateTitleCurrentState)):(h.remove(c,"newWidgetsCurrentStateIconOn"),h.add(c,"newWidgetsCurrentStateIconOff"),e.set("title",B.NewWidgetsCurrentStateTitleBackground)))}.bind(this))},manageStatesActive:function(a){return a&&a.getSelection().length},newWidgetsCurrentStateActive:function(a){return this._customStateActive(a)},highlightBaseWidgetsActive:function(a){return this._customStateActive(a)},updateHighlightsBaseStateWidgets:function(a){},initialize:function(){this.subscribed=
!0}});davinci.ve.states=new p;davinci.ve.states.initialize();return davinci.ve.states})},"davinci/maqetta/AppStates":function(){define("dojo/_base/connect dojo/dom-style dojo/dom dojo/_base/html dojo/_base/window dojo/_base/array dojo/parser require dojo/json dojo/_base/lang".split(" "),function(p,n,m,h,g,f,b,e,k,d){n=function(){};n.prototype={NORMAL:"Normal",DELTAS_ATTRIBUTE:"data-maq-deltas",DELTAS_ATTRIBUTE_P6:"dvStates",APPSTATES_ATTRIBUTE:"data-maq-appstates",APPSTATES_ATTRIBUTE_P6:"dvStates",
reImportant:/^(.*)(!\ *important)(.*)/,isStateContainer:function(a){return!(!a||!a._maqAppStates)},getStateContainersForNode:function(a){for(var c=[];a;){a._maqAppStates&&c.splice(0,0,a);if("BODY"==a.tagName)break;a=a.parentNode}return c},getAllStateContainers:function(a){function c(a){a._maqAppStates&&d.push(a);a=b._getChildrenOfNode(a);for(var e=0;e<a.length;e++)c(a[e])}var d=[],b=this;c(a);return d},getStatesArray:function(a,c,d,b){var e=[];if(a)for(a=a.parentNode;a;){if(a._maqAppStates)if(a==
b)e.splice(0,0,{node:a,oldState:c,newState:d});else{var k=a._maqAppStates.states?a._maqAppStates.states.current:void 0;e.splice(0,0,{node:a,oldState:k,newState:k})}if("BODY"==a.tagName)break;a=a.parentNode}return e},findStateContainer:function(a,c){if(a)for(var d=a.parentNode;d;){if(d._maqAppStates&&(!c||c==this.NORMAL||d._maqAppStates.states&&0<=d._maqAppStates.states.indexOf(c)))return d;if("BODY"==d.tagName)break;d=d.parentNode}},getAllStatesForNode:function(a){var c=[this.NORMAL];if(a)for(a=a.parentNode;a;){if(a._maqAppStates&&
a._maqAppStates.states)for(var d=a._maqAppStates.states?a._maqAppStates.states:[],b=0;b<d.length;b++)c.push(d[b]);if("BODY"==a.tagName)break;a=a.parentNode}return c},getStatesListCurrent:function(a){var c=[];if(a)for(a=a.parentNode;a;){a._maqAppStates&&c.splice(0,0,a._maqAppStates.current);if("BODY"==a.tagName)break;a=a.parentNode}return c},getAllCurrentStates:function(a){a=this.getAllStateContainers(a);for(var c=[],d=0;d<a.length;d++){var b=a[d],e=this.getState(b);c.push({stateContainerNode:b,state:e})}return c},
getStates:function(a){var c=a&&a._maqAppStates;a=["Normal"];if(c)for(var c=c.states?c.states:[],d=0;d<c.length;d++){var b=c[d];"Normal"!=b&&a.push(b)}return a},_getSCNodeFromElemOrEvent:function(a,c){var d;c&&c.tagName&&c.nodeName?d=c._maqAppStates?c:this.findStateContainer(c,a):c&&c.target&&c.currentTarget?(d=c.currentTarget,d._maqAppStates||(d=this.findStateContainer(d,a))):d=this.getContainer();return d},_updateSrcState:function(a){},hasState:function(a,c){return!!(a&&a._maqAppStates&&a._maqAppStates.states&&
0<=a._maqAppStates.states.indexOf(c))},getState:function(a){return a&&a._maqAppStates&&a._maqAppStates.current},setState:function(a,c,d){var b=d?d.updateWhenCurrent:!1,e=d?d.silent:!1,k=d?d.focus:!1;(c=this._getSCNodeFromElemOrEvent(a,c))&&c._maqAppStates&&(b||c._maqAppStates.current!=a)&&(b=c._maqAppStates.current,this.isNormalState(a)?(c._maqAppStates.hasOwnProperty("current")&&delete c._maqAppStates.current,a=void 0):c._maqAppStates.current=a,k&&this._setFocus(a,c),d&&d.hasOwnProperty("initial")&&
(d.initial?c._maqAppStates.initial=a:c._maqAppStates.initial&&delete c._maqAppStates.initial),e||p.publish("/maqetta/appstates/state/changed",[{node:c,newState:a,oldState:b,stateContainerNode:c}]),this._updateSrcState(c,!a))},getInitial:function(a){return a&&a._maqAppStates&&a._maqAppStates.initial},getFocus:function(a){if(!a)return null;a=this.getAllStateContainers(a);for(var c=0;c<a.length;c++){var d=a[c]._maqAppStates;if(d&&d.hasOwnProperty("focus"))return{stateContainerNode:a[c],state:d.focus}}return null},
_setFocus:function(a,c){if(c&&c._maqAppStates){var d=c.ownerDocument&&c.ownerDocument.body;if(d){var b=this.getFocus(d);if(!b||b.stateContainerNode!=c||b.state!=a){for(var b=this.getAllStateContainers(d),e=0;e<b.length;e++)(d=b[e]._maqAppStates)&&delete d.focus;c._maqAppStates.focus=a}}}},isNormalState:function(a){0==arguments.length&&(a=this.getState());return!a||a==this.NORMAL},_styleArrayMixin:function(a,c){if(c){for(var d=0;d<c.length;d++){var b=c[d],e;for(e in b)for(b=a.length-1;0<=b;b--)a[b].hasOwnProperty(e)&&
a.splice(b,1)}for(d=0;d<c.length;d++)a.push(c[d])}},getStyle:function(a,c,d){for(var b,e=[],k=0;k<c.length;k++)if(b=c[k],b=a&&a._maqDeltas&&a._maqDeltas[b]&&a._maqDeltas[b].style,this._styleArrayMixin(e,b),2<arguments.length&&e)for(b=e.length-1;0<=b;b--){var f=e[b],g;for(g in f)if(g!=d){e.splice(b,1);break}}return e},hasStyle:function(a,c,d){if(a&&d)if(a._maqDeltas&&a._maqDeltas[c]&&a._maqDeltas[c].style)for(a=a._maqDeltas[c].style,c=0;c<a[c];c++){if(a[c].hasProperty(d))return!0}else return!1},setStyle:function(a,
c,d,b){if(a&&d){a._maqDeltas=a._maqDeltas||{};a._maqDeltas[c]=a._maqDeltas[c]||{};a._maqDeltas[c].style=a._maqDeltas[c].style||[];var e=a._maqDeltas[c].style;if(d)for(var k=0;k<d.length;k++){var f=d[k],g;for(g in f)for(f=e.length-1;0<=f;f--){var h=e[f],m;for(m in h)if(g==m){e.splice(f,1);break}}}var n;if(d)for(f=0;f<d.length;f++)for(var C in d[f])k=d[f][C],"undefined"!=typeof k&&null!==k&&("undefined"==typeof n&&(n=[]),g={},g[C]=this._getFormattedValue(C,k),n.push(g));a._maqDeltas[c].style=e&&n?e.concat(n):
e?e:n?n:void 0;b||p.publish("/davinci/states/state/style/changed",[{node:a,state:c,style:d}]);this._updateSrcState(a)}},_convertStyleName:function(a){if(0<=a.indexOf("-")){var c=a.split("-");a=c[0];for(var d=1;d<c.length;d++){var b=c[d];a+=b.charAt(0).toUpperCase()+b.substring(1)}}return a},_DYNAMIC_PROPERTIES:{width:1,height:1,top:1,right:1,bottom:1,left:1},_getFormattedValue:function(a,c){if(a in this._DYNAMIC_PROPERTIES){if("string"!=typeof c)return c+"px";var d=e("dojo/_base/lang").trim(c);/^[-+]?[0-9]*\.?[0-9]+$/.test(d)&&
(c=d+"px")}return c},_getStatesListUsingPropName:function(a,c){var d=[];if(a)for(var b=0;b<a.length;b++)d.push(a[b][c]);return d},_resetAndCacheNormalStyle:function(a,c){if(a&&c)for(var b=0;b<c.length;b++){var e=this._getStatesListUsingPropName(c,"oldState"),k=this.getStyle(a,e),e=this._getStatesListUsingPropName(c),e=this.getStyle(a,e);if(k)for(var f=0;f<k.length;f++){var g=k[f],h;for(h in g)g=this._convertStyleName(h),a.style[g]=""}if(e)for(k=0;k<e.length;k++){var f=e[k],m;for(m in f){var g=this._convertStyleName(m),
v=a.style,n=this._getFormattedValue(m,f[m])+"",C=n?n.match(this.reImportant):null;C?(n=C[1]+C[3],n=d.trim(n),v.setProperty?v.setProperty(m,n,"important"):a.style[g]=n):a.style[g]=n}}}},_update:function(a,c){if(a&&a._maqDeltas){var b=this._getStatesListUsingPropName(c,"newState"),b=this.getStyle(a,b);this._resetAndCacheNormalStyle(a,c);if(b)for(var e=0;e<b.length;e++){var k=b[e],f;for(f in k){var g=this._convertStyleName(f),h=k[f]+"",m=h?h.match(this.reImportant):null;m?(h=m[1]+m[3],h=d.trim(h),k.setProperty?
k.setProperty(f,h,"important"):a.style[g]=h):a.style[g]=h}}}},isContainer:function(a){var c=!1;if(a){var d=this.getDocument();if(a===(d&&d.body)||"BODY"==a.tagName)c=!0}return c},getContainer:function(){return document.body},add:function(a,c,d){a&&!this.hasState(a,c)&&(d=d&&d.index,a._maqAppStates=a._maqAppStates||{},a._maqAppStates.states=a._maqAppStates.states||[],"number"==typeof d&&0<=d?a._maqAppStates.states.splice(d,0,c):a._maqAppStates.states.push(c),p.publish("/davinci/states/state/added",
[{node:a,state:c}]),this._updateSrcState(a))},remove:function(a,c){if(a&&a._maqAppStates&&a._maqAppStates.states&&this.hasState(a,c)){var d=a._maqAppStates.states.indexOf(c);if(!(0>d)){var b=this.getState(a),e=this.getFocus(a.ownerDocument.body);a._maqAppStates.states.splice(d,1);d={};e&&e.stateContainerNode==a&&e.state==c&&(d.focus=!0,d.updateWhenCurrent=!0);c==b&&this.setState(void 0,a,d);p.publish("/davinci/states/state/removed",[{node:a,state:c}]);this._updateSrcState(a)}}},rename:function(a,
c){if(!c)return!1;var d=c.oldName,b=c.newName;if(!(a&&a._maqAppStates&&a._maqAppStates.states&&a._maqAppStates.states.length))return!1;var e=a._maqAppStates.states;if(0>e.indexOf(d)||0<=e.indexOf(b))return!1;e.splice(e.indexOf(d),1,b);a._maqAppStates.focus===d&&(a._maqAppStates.focus=b);a._maqAppStates.current===d&&(a._maqAppStates.current=b);e=[a];this.getState(a);for(e=e.concat(this._getChildrenOfNode(a));e.length;){var k=e.shift();k._maqDeltas&&k._maqDeltas[d]&&(k._maqDeltas[b]=k._maqDeltas[d],
delete k._maqDeltas[d]);var e=e.concat(this._getChildrenOfNode(k)),f=this.getStatesArray(k,null,b,a);this._update(k,f);this._updateSrcState(k)}p.publish("/davinci/states/state/renamed",[{node:k,oldName:d,newName:b,stateContainerNode:k}]);return!0},_isEmpty:function(a){for(var c in a)if(a.hasOwnProperty(c))return!1;return!0},stringifyWithQuotes:function(a){str=k.stringify(a);str=str.replace(/(\\)?'/g,function(a,c){return c?a:"\\'"});return str=str.replace(/"/g,"'")},serialize:function(a){var c=this,
d=function(d){var b=null;a[d]&&(d=e("dojo/_base/lang").clone(a[d]),delete d.undefined,c._isEmpty(d)||(b=this.stringifyWithQuotes(d)));return b}.bind(this),b={};if(!a)return b;var k=d("_maqAppStates");"string"==typeof k&&(b.maqAppStates=k);d=d("_maqDeltas");"string"==typeof d&&(b.maqDeltas=d);return b},deserialize:function(a,c){"string"==typeof a&&(a=a.replace(/(\\)?'/g,function(a,c){return c?"'":'"'}),a=k.parse(a),this._migrate_m4_m5(a),a=this._migrate_m6_m7(a,c&&c.isBody));return a},_migrate_m4_m5:function(a){for(var c in a){var d=
a[c];if(d){var b=d.style;if(b&&!b.length){var e=[],k;for(k in b){var f={};f[k]=b[k];e.push(f)}d.style=e}}}},_migrate_m6_m7:function(a,c){if(!a||a.states)return a;if(c){var d=[],b;for(b in a)"current"!=b&&d.push(b);if(0<d.length)return{states:d}}else return delete a.current,a},store:function(a,c,d){if(a){this.clear(a);var b="BODY"==a.tagName;c&&(a._maqAppStates=this.deserialize(c,{isBody:b}));d&&(a._maqDeltas=this.deserialize(d,{isBody:b}));p.publish("/davinci/states/stored",[])}},retrieve:function(a){if(a){var c=
a.getAttribute(this.APPSTATES_ATTRIBUTE);c||"BODY"!==a.tagName||(c=a.getAttribute(this.APPSTATES_ATTRIBUTE_P6));var d=a.getAttribute(this.DELTAS_ATTRIBUTE);d||"BODY"===a.tagName||(d=a.getAttribute(this.DELTAS_ATTRIBUTE_P6));return{maqAppStates:c,maqDeltas:d}}},clear:function(a){a&&(a._maqAppStates&&delete a._maqAppStates,a._maqDeltas&&delete a._maqDeltas)},_parseStyleValues:function(a){var c=[];a&&f.forEach(a.split(";"),function(a){var d=a.indexOf(":");if(0<d){var b=a.substring(0,d).trim();a=a.substring(d+
1).trim();d={};d[b]=a;c.push(d)}});return c},transferElementStyle:function(a,c){if(a){var d=a._maqDeltas,b=this._parseStyleValues(c);d.undefined||(d.undefined={});d.undefined.style=b}},getDocument:function(){return document},shouldInitialize:function(){return!davinci.AppStatesDontInitialize},_getChildrenOfNode:function(a){for(var c=[],d=0;d<a.childNodes.length;d++){var b=a.childNodes[d];1===b.nodeType&&c.push(b)}return c},initialize:function(){this.subscribed||(p.subscribe("/maqetta/appstates/state/changed",
this,function(a){if(!a.editorClass)for(var c=davinci.states._getChildrenOfNode(a.node);c.length;){var d=c.shift();davinci.states.isContainer(d)||(c=c.concat(davinci.states._getChildrenOfNode(d)));var b=this.getStatesArray(d,a.oldState,a.newState,a.stateContainerNode);davinci.states._update(d,b)}}),this.subscribed=!0)}};"undefined"===typeof davinci&&(davinci={});var c=davinci.states=new n;(function(){c.initialize();c.shouldInitialize()&&"undefined"!=typeof e&&e(["dojo/_base/lang","dojo/query","dojo/aspect"],
function(a,d,k){var f=0,m=!1;a=function(a){m||(k.around(a,"parse",function(a){var d={};return function(b,e){var k;(k=!e&&b&&b.rootNode?b.rootNode:b)?h.byId(k):g.body();n(d);k=a.apply(this,arguments);var f=c.getDocument(),q,m,r,w,x;for(x in d){var y;if(y="body"==x?f.body:f.querySelectorAll("."+x)[0]){var B="BODY"==y.tagName;m=r=w=null;B?q=d[x]:(q=d[x].maqAppStates,m=d[x].maqDeltas);q&&(r=c.deserialize(q,{isBody:B}));m&&(w=c.deserialize(m,{isBody:B}));r&&(r.initial?r.current=r.initial:(r.focus&&delete r.focus,
delete r.current));c.store(y,r,w);m&&davinci.states.transferElementStyle(y,d[x].style)}}x=c.getAllStateContainers(f.body);for(f=0;f<x.length;f++)q=x[f],q._maqAppStates&&"string"==typeof q._maqAppStates.current&&c.setState(q._maqAppStates.current,q,{updateWhenCurrent:!0,focus:q._maqAppStates.focus});return k}}),dojo.parser.parse=a.parse,m=!0)};try{var y=e("dojox/mobile/parser");a.apply(y)}catch(x){}y||a.call(null,b);var n=function(a){var b=c.getDocument();if(!b.body._maqAlreadyPreserved){var e=davinci.states.retrieve(b.body);
e&&e.maqAppStates&&(a.body=e.maqAppStates);b.body._maqAlreadyPreserved=!0}d("*",b).forEach(function(d){var b=d.getAttribute("class");b||(b="");if(!d._maqAlreadyPreserved&&0>b.indexOf("maqTempClass")){d._maqAlreadyPreserved=!0;var e=c.retrieve(d);if("BODY"!=d.tagName&&e&&(e.maqAppStates||e.maqDeltas)){var k="maqTempClass"+f;d.setAttribute("class",b+" "+k);f++;a[k]={};e.maqAppStates&&(a[k].maqAppStates=e.maqAppStates);e.maqDeltas&&(a[k].maqDeltas=e.maqDeltas);d.style?a[k].style=d.style.cssText:console.error("States.js _preserveStates. No value for node.style.")}}})}})})();
davinci.Workbench||"undefined"==typeof dijit||p.subscribe("/maqetta/appstates/state/changed",function(a){var c=a&&a.node&&a.node.ownerDocument&&a.node.ownerDocument.defaultView&&a.node.ownerDocument.defaultView.dijit.byId;c&&(a.newState&&!a.newState.indexOf("_show:")?(a=c(a.newState.substring(6)))&&a.show&&a.show():a.oldState&&!a.oldState.indexOf("_show:")&&(a=c(a.oldState.substring(6)))&&a.hide&&a.hide())});return n})},"davinci/ve/commands/EventCommand":function(){define(["dojo/_base/declare","davinci/ve/widget"],
function(p,n){return p("davinci.ve.commands.EventCommand",null,{name:"EventCommand",constructor:function(m,h){this._oldId=m?m.id:void 0;this._properties=h||{}},setContext:function(m){this._context=m},execute:function(){if(this._oldId&&this._properties){var m=n.byId(this._oldId);this._oldProps=m.properties||{};m.setProperties(this._properties,!0);if(m.isHtmlWidget){var h=m.domNode,g;for(g in this._properties)this._properties[g]||h.removeAttribute(g)}this._newId=this._oldId;dojo.publish("/davinci/ui/widgetPropertiesChanged",
[[m]])}},undo:function(){if(this._newId){var m=n.byId(this._newId),h=m.domNode,g=m._srcElement,f;for(f in this._properties)this._oldProps[f]||(h.removeAttribute(f),g.removeAttribute(f));m.setProperties(this._oldProps);dojo.publish("/davinci/ui/widgetPropertiesChanged",[[m]])}}})})},"davinci/ve/widget":function(){define("davinci/html/HTMLElement ../Runtime ./metadata dojo/Deferred dojo/_base/lang ./DijitWidget ./GenericWidget ./DeliteWidget ./HTMLWidget ./ObjectWidget dojo/window".split(" "),function(p,
n,m,h,g,f,b,e,k,d,c){var a={},q=function(a,c,d){for(var b=0;b<d.children.length;b++){var e=c.childNodes[b],k=d.children[b];e&&1==e.nodeType&&"HTMLElement"==k.elementType&&(e.id=a.getUniqueID(k),q(a,e,k))}},w={_dojo:function(a){a=(a=a?a.ownerDocument||a:dojo.doc)||dojo.doc;return c.get(a).dojo||dojo},_dijit:function(a){return c.get(a?a.ownerDocument||a:dojo.doc).dijit||dijit},parseStyleValues:function(a){var c=[];a&&dojo.forEach(a.split(";"),function(a){var d=a.indexOf(":");if(0<d){var b=a.substring(0,
d).trim();a=a.substring(d+1).trim();d={};d[b]=a;c.push(d)}});return c},retrieveStyleProperty:function(a,c,d){var b=d;a&&dojo.some(a,function(a){if(a.hasOwnProperty(c))return b=a[c],!0});return b},setStyleProperty:function(a,c,d){var b=!1;a&&dojo.some(a,function(a){if(a.hasOwnProperty(c))return a[c]=d,b=!0});if(!b){var e={};e[c]=d;a.push(e)}},getStyleString:function(a){var c="";dojo.forEach(a,function(a){for(var d in a)a[d]&&(c=c+d+":"+a[d]+";")});return c},getEnclosingWidget:function(a){var c=w.getEnclosingWidgetForRichText(a);
if(c)return c;for(;a;){if(a._dvWidget)return a._dvWidget;a=a.parentNode||a.domNode&&a.domNode.parentNode}},getEnclosingWidgetForRichText:function(a){if(a&&a._dvWidget)return"html.stickynote"===a._dvWidget.type||"html.richtext"===a._dvWidget.type?a._dvWidget:a.parentNode?w.getEnclosingWidgetForRichText(a.parentNode):null},getUniqueObjectId:function(a,c){if(a){for(var d=a.substring((a.lastIndexOf("/")||a.lastIndexOf("."))+1),b=1,e=d+"_"+b++,k=w._dojo(c);k.getObject(e)||k.byId(e);)e=d+"_"+b++;return e}},
_remove_prefix:function(a){if(a){for(var c=a,d="dijit/form/ dijit/layout/ dijit/ dojox/mobile/ html. html/ OpenAjax. OpenAjax/".split(" "),b=0;b<d.length;b++)if(0==a.indexOf(d[b])){c=a.substr(d[b].length);"html."==d[b]&&(c="\x26lt;"+c+"\x26gt;");break}return c}return""},_getWidgetNameText:function(a){a="\x3cspan class\x3d'propertiesTitleWidgetName'\x3e"+this._remove_prefix(a);return a+"\x3c/span\x3e"},_getWidgetClassText:function(a,c){var d="\x3cspan class\x3d'propertiesTitleClassName'\x3e";a&&(d+=
"#"+a);c&&(d+="."+c.replace(/\s+/g,"."));return d+"\x3c/span\x3e"},getLabelForNode:function(a){var c=a.getAttribute("data-dojo-type")||a.getAttribute("dojoType");c||(c=a.tagName.toLowerCase());c=c.replace(/\./g,"/");c=this._getWidgetNameText(c);a.id&&(c+=this._getWidgetClassText(a.id));return c},getLabel:function(a){var c=this._getWidgetNameText(a.type),d,b=w.getWidgetHelper(a.type);b&&b.getWidgetText&&(d=b.getWidgetText(a));b&&b.getWidgetNameText&&(c=b.getWidgetNameText(a));var e=a.domNode;if(!a.type)return"unknown type";
switch(a.type.replace(/\//g,".")){case "dijit.form.ComboBox":case "dijit.form.Button":d=a.attr("label");break;case "dijit.layout.ContentPane":d=a.attr("title");break;case "html.label":d=e.innerHTML;break;case "html.img":d=e.alt,d||(d=e.title)}d&&(c+="\x3cspan class\x3d'propertiesTitleWidgetText'\x3e"+d+"\x3c/span\x3e ");b&&b.getWidgetDescriptor&&(c+=" \x3cspan class\x3d'propertiesTitleWidgetDescriptor'\x3e"+b.getWidgetDescriptor(a)+"\x3c/span\x3e ");var k=a._srcElement;d=a.getId();k=(k=k&&k.getAttribute("class"))&&
k.trim();if(d||k)c=b&&b._getWidgetClassText?c+b._getWidgetClassText(d,k):c+this._getWidgetClassText(d,k);b&&b.getWidgetTextExtra&&(c+=b.getWidgetTextExtra(a));"html.img"==a.type&&(c+="\x3cspan\x3e"+e.src.substr(e.src.lastIndexOf("/")+1)+"\x3c/span\x3e");return c},byId:function(a,c){var d=dojo.byId(a,c&&c.body?c:void 0);if(d){if(d._dvWidget)return d._dvWidget;if((d=w.getEnclosingWidget(d))&&d.id==a)return d}if(n.currentEditor&&n.currentEditor.currentEditor&&n.currentEditor.currentEditor.context)return n.currentEditor.currentEditor.context.widgetHash[a]},
byNode:function(a){if(a._dvWidget)return a._dvWidget},createWidget:function(a,h,y){if(a&&a.type){var x=dojo.mixin({},a),n=!1;"xblox/RunScript"===x.type&&"xblox/CSSState"===x.type&&(n=!0,delete a.properties.style);x.properties&&(x.properties=dojo.mixin({},a.properties));var u=x.type,v,A,C=m.query(u);if(C){x.properties&&("content"in x.properties&&!x.properties.content&&delete x.properties.content,x.properties.theme&&(A=x.properties.theme.themeName));y&&y.metadata&&y.metadata.childOverride&&g.mixin(x.properties,
y.metadata.childOverride);a=m.queryDescriptor(u,"widgetClass");!a&&h&&h.widgetClass&&(a=h.widgetClass);if(!0===C.delite||"xblox/RunScript"===u||"xblox/CSSState"===u||"xblox/Script"===u||"xblox/StyleSate"===u)a="delite";"delite"==a?v=e:"object"==a?(v=d,C.attributes=C.attributes||{},C.attributes.dojoType=u):"html"==a?v=k:"dijit"==a?v=f:null==v&&(v=b);if(v){a=C.content.trim().replace(/\s+/g," ");c.get(dojo.doc);var G=c.get(dojo.doc).dojo._toDom(a);G.fromWidgetData&&G.fromWidgetData(x);if(11===G.nodeType){y=
0;var D=null;a=G.childNodes;for(var I=0;I<a.length&&!(8!==a[I].nodeType&&(y++,D=a[I],1<y));I++);if(1<y){console.error("ERROR: complex widget content not supported");return}G=D}if(!G)return null;var H=new p(G.tagName.toLowerCase());if(G.hasAttributes())for(a=G.attributes,y=a.length-1;0<=y;--y)n&&"style"===a[y].name||H.addAttribute(a[y].name,a[y].value);G.innerHTML&&H.addText(G.innerHTML);n=m.queryDescriptor(u,"requiresId");a=m.queryDescriptor(u,"name");n=n&&a.match(/^[A-Za-z]\w*$/)?a:void 0;G.id=x.properties&&
x.properties.id||(x.context?x.context.getUniqueID(H,n):"");if(a=x.children)dojo.isString(a)?(G.innerHTML=a,G.nodeName.toLowerCase(),n=H._getAttribute("id"),H.addText(a),a=H.getText(x.context),H.children=[],H.setText(a),n&&H.addAttribute(n.name,n.value,n.noPersist),q(x.context,G,H)):dojo.forEach(a,function(a){if(a)if(dojo.isString(a))7<a.length&&"\x3c!--"==a.substring(0,4)&&"--\x3e"==a.substring(a.length-3)?(G.appendChild(dojo.doc.createComment(a.substring(4,a.length-3))),H.addComment(a.substring(4,
a.length-3))):(G.appendChild(dojo.doc.createTextNode(a)),H.addText(a));else if(a.context=x.context,a=w.createWidget(a))G.appendChild(a.domNode),H.addChild(a._srcElement)});(n=w.getWidgetHelper(u))&&n.preProcessData&&(x=n.preProcessData(x));n={};a={};for(var F in x.properties)y=x.properties[F],null!=y&&("on"==F.substr(0,2).toLowerCase()||"a"==H.tag.toLowerCase()&&"href"==F.toLowerCase()?a[F]=y:n[F]=y);C=new v(n,G,u,C,H,u);C._srcElement=H;C.chart&&x.properties&&x.properties.theme&&(C.chart.theme.themeName=
A);x.scripts&&(C.scripts=x.scripts);x.context&&(C._edit_context=x.context);x.properties&&(C.setProperties(n),C.setProperties(a,!0));if(x.maqAppStates||x.maqDeltas)x.maqAppStates&&(C.domNode._maqAppStates=dojo.clone(x.maqAppStates)),x.maqDeltas&&(C.domNode._maqDeltas=dojo.clone(x.maqDeltas)),A=davinci.states.serialize(C.domNode),A.maqAppStates&&C._srcElement.addAttribute(davinci.states.APPSTATES_ATTRIBUTE,A.maqAppStates),A.maqDeltas&&C._srcElement.addAttribute(davinci.states.DELTAS_ATTRIBUTE,A.maqDeltas);
(n=w.getWidgetHelper(u))&&n.cleanSrcElement&&n.cleanSrcElement(C._srcElement,h);n&&n.postCreateWidget&&n.postCreateWidget(C,h);return C}}else console.error("cant get widget meta data : ",a)}},_createSrcElement:function(a){var c=new p(a.tagName.toLowerCase());if(a.hasAttributes()){a=a.attributes;for(var d=a.length-1;0<=d;--d)c.addAttribute(a[d].name,a[d].value)}return c},getWidgetHelper:function(c){return a[c]},requireWidgetHelper:function(c){var d=new h;m.getHelper(c,"helper").then(function(b){b?
d.resolve(a[c]=new b):d.resolve()});return d},getWidget:function(a,c){if(a&&1==a.nodeType){var g=w.byNode(a);if(!g){if(a){for(var g={properties:{}},q=0;q<a.attributes.length;q++){var h=a.attributes[q];if(h.specified&&h.nodeValue){var m=h.nodeName.toLowerCase();if("id"!=m&&"widgetid"!=m&&"style"!=m&&"_"!=m.charAt(0)){if((h=h.nodeValue)&&"class"==m&&(h=h.replace("HtmlWidget","").trim(),!h))continue;g.properties[m]=h}}}"script"==a.tagName.toLowerCase()&&(g.children=a.innerHTML||void 0)}else g=void 0;
if(g.properties.is||null!=a.render||-1!==a.tagName.indexOf("D-"))return g=new e(g,a);q=a.getAttribute("dvwidget");if(a.hasAttribute("widgetid")||a.hasAttribute("data-dojo-type")||a.hasAttribute("dojotype"))q=w._dijit(a).byNode(a),m=a.getAttribute("data-dojo-type")||a.getAttribute("dojotype"),g=q?new f(g,a,q,null,null,m):new d(g,a);else if(q)g=new b(g,a,q);else{if("svg"==a.nodeName)return;g=new k(g,a,c)}}return g}}};dojo.setObject("davinci.ve.widget",w);return w})},"davinci/html/HTMLElement":function(){define(["dojo/_base/declare",
"davinci/html/HTMLItem","davinci/html/HTMLText","davinci/html/HTMLComment","davinci/html/HTMLAttribute"],function(p,n,m,h,g){return p("davinci.html.HTMLElement",n,{constructor:function(f){this.elementType="HTMLElement";this.attributes=[];this.tag=f||"";this._fmChildIndent=this._fmChildLine=0},add:function(f){this.statements||(this.statements=[]);this.statements.push(f);this.onChange()},getText:function(f){f=f||{};var b;f.indent+=2;b="\x3c"+this.tag;for(var e=0;e<this.attributes.length;e++){var k=
this.attributes[e].getText(f);0<k.length&&(b=b+" "+k)}if(this.noEndTag)b+="/\x3e";else{b=b+"\x3e"+this._addWS(this._fmChildLine,this._fmChildIndent);if(this.statements)for(e=0;e<this.statements.length;e++)b+=this.statements[e].printStatement(f,this.statements[e]);else if(this.script)b+=this.script;else if(0<this.children.length)for(k="style"==this.tag,e=0;e<this.children.length;e++)if(b+=this.children[e].getText(f),k){var d=this._fmChildLine,c=this._fmChildIndent||0;e+1==this.children.length&&(d=
this._fmLine,c=this._fmIndent);b+=this._addWS(d,c)}b=b+"\x3c/"+this.tag+"\x3e"}f.indent-=2;return b+=this._addWS(this._fmLine,this._fmIndent)},_formatModel:function(f,b,e){function k(a,d,b){c+=1+a;d?(d._fmChildLine=1,d._fmChildIndent=e.indent):(b._fmLine=1,b._fmIndent=e.indent)}function d(a,b){a.startOffset=c;a.wasParsed=!0;c+=a.tag.length+2;for(var e=0;e<a.attributes.length;e++){a.attributes[e].startOffset=c;var f=a.attributes[e].getText(b);0<f.length&&(c+=1+f.length);a.attributes[e].endOffset=c-
1}a.noEndTag&&c++;a.startTagOffset=c;f="";if(a.statements)for(e=0;e<a.statements.length;e++)f+=a.statements[e].printStatement(b,a.statements[e]);else a.script&&(f=a.script);if(f)c+=f.length;else if(0<a.children.length){var g;davinci.html._noFormatElements[a.tag]||(b.indent+=2,k(b.indent,a),g=!0);for(var q,e=0;e<a.children.length;e++){f=a.children[e];switch(f.elementType){case "HTMLElement":q&&"HTMLText"!=q.elementType&&!davinci.html._noFormatElements[f.tag]&&k(b.indent,null,q);d(f,b);break;case "HTMLText":f.startOffset=
c;c+=f.value.length;break;case "HTMLComment":f.startOffset=c,c+=f.value.length,c++,f.isProcessingInstruction&&(c+=2)}q=f}g&&(b.indent-=2);q&&"HTMLText"!=q.elementType&&k(b.indent,null,q)}c+=a.tag.length+3;a.endOffset=c-1}var c=0;void 0==b&&(b=this.children.length);var a,g;this.children.length&&0!=b?(g=this.children[b-1],c=g.endOffset+1):(a=this,c=this.startTagOffset+1);var h=c;davinci.html._noFormatElements[f.tag]||(k(e.indent,a,g),f._fmLine=1,f._fmIndent=b<this.children.length?e.indent:e.indent-
2);d(f,e);return c>h?c-h:0},getElementText:function(f){f=f||{};var b="";if(0<this.children.length)for(var e=0;e<this.children.length;e++)"HTMLComment"!=this.children[e].elementType&&(b+=this.children[e].getText(f));else{if(this.script)return this.script;if(this.statements)for(e=0;e<this.statements.length;e++)b+=this.statements[e].printStatement(f,this.statements[e])}return b},getChildElements:function(f,b,e){e=e||[];for(var k=0;k<this.children.length;k++)this.children[k].tag==f&&e.push(this.children[k]),
b&&"HTMLElement"==this.children[k].elementType&&this.children[k].getChildElements(f,b,e);return e},getChildElement:function(f){for(var b=0;b<this.children.length;b++)if(this.children[b].tag==f)return this.children[b]},hasAttribute:function(f){for(var b=0;b<this.attributes.length;b++)if(this.attributes[b].name==f)return!0;return!1},getAttribute:function(f){if(f=this._getAttribute(f))return f.value},_getAttribute:function(f){for(var b=0;b<this.attributes.length;b++)if(this.attributes[b].name==f)return this.attributes[b]},
addText:function(f){this.addChild(new m(f));this.onChange()},addComment:function(f){this.addChild(new h(f));this.onChange()},getLabel:function(){return"\x3c"+this.tag+"\x3e"},addAttribute:function(f,b,e){if("textContent"==f)this.children=[],this.addText(b);else{var k,d=0<this.attributes.length?this.attributes[this.attributes.length-1].endOffset+1:this.startTagOffset-(this.noEndTag?2:1),c=this._getAttribute(f),a;c?k=b.length-c.value.length:(c=new g,a=!0,k=f.length+b.length+4,c.startOffset=d,c.endOffset=
d+k-1);c.name=f;c.setValue(b);c.noPersist=e;this.wasParsed&&!e&&0<k&&this.getHTMLFile().updatePositions(d,k);a&&this.attributes.push(c);this.onChange()}},removeAttribute:function(f){this.attributes.every(function(b,e,k){return b.name===f?(k.splice(e,1),e=this.getHTMLFile(),!b.noPersist&&e&&(k=b.getText(),e.updatePositions(b.startOffest,0-(k.length+1))),!1):!0},this);this.onChange()},setAttribute:function(f,b){this.removeAttribute(f);this.addAttribute(f,b)},getUniqueID:function(f){if(!this.getAttribute("id")){var b=
this.getHTMLFile();b.uniqueIDs||(b.uniqueIDs={});b=b.uniqueIDs.hasOwnProperty(this.tag)?++b.uniqueIDs[this.tag]:b.uniqueIDs[this.tag]=0;this.addAttribute("id",this.tag+"_"+b,f)}},findElement:function(f){var b=this.getAttribute("id");if(f==b)return this;for(b=0;b<this.children.length;b++)if("HTMLElement"==this.children[b].elementType){var e=this.children[b].findElement(f);if(e)return e}},insertBefore:function(f,b){var e=dojo.indexOf(this.children,b);0>e&&(e=void 0);this.addChild(f,e);this.onChange()},
addChild:function(f,b,e){if(!e&&this.wasParsed)if("HTMLElement"==f.elementType){var k=this._getIndent(),d;b<this.children.length&&"HTMLElement"==this.children[b].elementType?d=this.children[b]._getIndent():this.children.length?dojo.forEach(this.children,function(a){"HTMLElement"==a.elementType&&(d=a._getIndent())}):d=k+1;k=this._formatModel(f,b,{indent:d});this.getHTMLFile().updatePositions(f.startOffset,k)}else if("HTMLText"==f.elementType||"CSS"==f.elementType.substring(0,3)){var k=f.getText(),
c=this.children.length?this.children[this.children.length-1].endOffset:this.startTagOffset,a=k.length;0<a&&("HTMLText"!=f.elementType&&(a+=this._fmChildIndent+1),this.getHTMLFile().updatePositions(c+1,a));f.startOffset=c+1;f.endOffset=f.startOffset+k.length-1}n.prototype.addChild.apply(this,arguments)},removeChild:function(f){var b=dojo.indexOf(this.children,f);if(0<=b){var e=1+f.endOffset-f.startOffset;if("HTMLElement"==f.elementType)if(1==this.children.length)e+=1*this._fmChildLine+this._fmChildIndent,
this._fmChildIndent-=2;else{if(0<b&&"HTMLElement"==this.children[b-1].elementType)var k=this.children[b-1],e=e+(1*k._fmLine+k._fmIndent);b+1==this.children.length&&"HTMLElement"==this.children[b-1].elementType&&(this.children[b-1]._fmChildIndent-=2)}0<e&&this.wasParsed&&this.getHTMLFile().updatePositions(f.startOffset,0-e)}n.prototype.removeChild.apply(this,arguments)},_textModify:function(f,b){var e=f.length-b.length;0!=e&&this.wasParsed&&this.getHTMLFile().updatePositions(this.startOffset,e)},setScript:function(f){this._textModify(f,
this.script);this.script=f},_previous:function(){var f=dojo.indexOf(this.parent.children,this);if(0<f)return this.parent.children[f-1]},_getIndent:function(){var f=this._previous();return f?" HTMLText"==f.elementType?(f=f.value.split("\n"),f[f.length-1].length):f._fmIndent:this.parent._fmChildIndent},visit:function(f){if(!f.visit(this)){for(var b=0;b<this.attributes.length;b++)this.attributes[b].visit(f);for(b=0;b<this.children.length;b++)this.children[b].visit(f)}f.endVisit&&f.endVisit(this)},setText:function(f){this.script=
"";var b=this.parent;this.errors=require("davinci/html/HTMLParser").parse(f,this).errors;dojo.mixin(this,this.children[0]);this.parent=b;this.visit({visit:function(b){delete b.wasParsed},rules:[]});this.onChange()}})})},"davinci/html/HTMLItem":function(){define(["dojo/_base/declare","davinci/html/HTMLModel"],function(p,n){return p("davinci.html.HTMLItem",n,{constructor:function(){this.elementType="HTMLItem"},getLabel:function(){return this.getText({indent:0})},onChange:function(m){if(this.parent&&
m)this.parent.onChange(m)},_addWS:function(m,h){m=m||0;h=h||0;for(var g=[],f=0;f<m;f++)g.push("\n");g.push(" ".substring(0,h));return g.join("")},close:function(){for(var m=0;m<this.children.length;m++)this.children[m].close()},getID:function(){return this.parent.getID()+":"+this.startOffset+":"+this.getLabel()},getHTMLFile:function(){for(var m=this;m&&"HTMLFile"!=m.elementType;)m=m.parent;return m}})})},"davinci/html/HTMLModel":function(){define(["dojo/_base/declare",
"davinci/model/Model"],function(p,n){davinci.html||(davinci.html={});davinci.html._noFormatElements={span:!0,b:!0,it:!0};davinci.html.escapeXml=function(m){return m?m.replace(/&/g,"\x26amp;").replace(/</g,"\x26lt;").replace(/>/g,"\x26gt;").replace(/"/g,"\x26quot;"):m};davinci.html.unEscapeXml=function(m){return m&&"string"===typeof m?m.replace(/&quot;/g,'"').replace(/&gt;/g,"\x3e").replace(/&lt;/g,"\x3c").replace(/&amp;/g,"\x26"):m};return p("davinci.html.HTMLModel",n,{})})},"davinci/model/Model":function(){define(["dojo/_base/declare"],
function(p){return p("davinci.model.Model",null,{constructor:function(){this.name=this.elementType="";this.endOffset=this.startOffset=0;this.parent=null;this.children=[]},inherits:function(n){1<arguments.length?n.apply(this,Array.prototype.slice.call(arguments,1)):n.call(this)},getText:function(){},setText:function(n){},addChild:function(n,m,h){n.parent=this;void 0!=m?this.children.splice(m,0,n):this.children.push(n)},setStart:function(n){this.startOffset=n},setEnd:function(n){this.endOffset=n},getLabel:function(){return null},
getID:function(){return null},mapPositions:function(n){return{startOffset:n.startOffset,endOffset:n.endOffset}},findChildAtPosition:function(n){n.endOffset||(n.endOffset=n.startOffset);if(n.startOffset>=this.startOffset&&n.endOffset<=this.endOffset){for(var m=0;m<this.children.length;m++){var h=this.children[m].findChildAtPosition(n);if(null!=h)return h}return this}return null},removeChild:function(n){for(var m=0;m<this.children.length;m++)if(this.children[m]==n){this.children.splice(m,1);break}},
find:function(n,m){var h={visit:function(g){if(0<this.found.length&&m)return!0;var f=null;for(f in n)if(g[f]!=n[f])break;g[f]==n[f]&&this.found.push(g);return!1},found:[]};this.visit(h);return m?0<h.found.length?h.found[0]:null:h.found},setDirty:function(n){this.dirtyResource=n},isDirty:function(){return this.dirtyResource},searchUp:function(n){if(this.elementType==n)return this;for(var m=this.parent;m&&m.elementType!=n;)m=m.parent;return m},visit:function(n){if(!n.visit(this))for(var m=0;m<this.children.length;m++)this.children[m].visit(n);
n.endVisit&&n.endVisit(this)},updatePositions:function(n,m,h){visitor={visit:function(g){if(g.endOffset<m)return!0;g.startOffset>=m?(g.startOffset+=h,g.endOffset+=h):g.endOffset>=m&&(g.endOffset+=h)}};n.visit(visitor)}})})},"davinci/html/HTMLText":function(){define(["dojo/_base/declare","davinci/html/HTMLItem"],function(p,n){return p("davinci.html.HTMLText",n,{constructor:function(m){this.elementType="HTMLText";this.value=m||""},getText:function(m){return this.value},setText:function(m){if(this.wasParsed||
this.parent&&this.parent.wasParsed){var h=m.length-this.value.length;0<h&&this.getHTMLFile().updatePositions(this.startOffset+1,h)}this.value=m},getLabel:function(){return 15>this.value.length?this.value:this.value.substring(0,15)+"..."}})})},"davinci/html/HTMLComment":function(){define(["dojo/_base/declare","davinci/html/HTMLItem"],function(p,n){return p("davinci.html.HTMLComment",n,{constructor:function(m){this.elementType="HTMLComment";this.value=m||""},getText:function(m){m=this.isProcessingInstruction?
"":"--";return"\x3c!"+m+this.value+m+"\x3e"}})})},"davinci/html/HTMLAttribute":function(){define(["dojo/_base/declare","davinci/html/HTMLItem"],function(p,n){return p("davinci.html.HTMLAttribute",n,{constructor:function(){this.elementType="HTMLAttribute";this.value=this.name=""},getText:function(m){if(this.noPersist&&!m.includeNoPersist)return"";m=this.name;({checked:1,selected:1,disabled:1,readonly:1,multiple:1,ismap:1,autofocus:1,autoplay:1,controls:1,formnovalidate:1,loop:1,muted:1,required:1})[this.name.toLowerCase()]?
m=this.value&&"false"!==this.value?m+('\x3d"'+this.value+'"'):"":this.noValue||(m=m+'\x3d"'+davinci.html.escapeXml(String(this.value))+'"');return m},setValue:function(m){this.value=davinci.html.unEscapeXml(m);this.onChange()}})})},"davinci/ve/DijitWidget":function(){define("require dojo/_base/declare dojo/_base/window dojo/_base/lang dojo/dom-attr dojo/parser ./_Widget ./metadata".split(" "),function(p,n,m,h,g,f,b,e){return n("davinci.ve.DijitWidget",b,{isDijitWidget:!0,constructor:function(b,d,
c,a,e,f){if("string"===typeof c){g.get(d,"data-dojo-type")||g.get(d,"dojoType")||g.set(d,"data-dojo-type",c);e&&e.addAttribute("data-dojo-type",c);c=d.ownerDocument;e=c.defaultView;(a=c.__DijitWidgetScratchSpace)||(a=c.__DijitWidgetScratchSpace=c.createElement("div"));a.appendChild(d);c=e.require("dojo/parser").instantiate([d],b,{noStart:!0})[0];a.firstChild&&a.removeChild(a.firstChild);if(this.domNode=c.domNode)c.domNode._dvWidget=this;this.isLayoutContainer=c.isLayoutContainer}else this.type=f?
f.replace(/\./g,"/"):c.declaredClass.replace(/\./g,"/");b=davinci.ve.metadata.getAllowedChild(this.type);this.acceptsHTMLChildren="ANY"===b[0]||-1!==b.toString().toUpperCase().indexOf("HTML");this.dijitWidget=c;this.containerNode=c.containerNode;this.styleNode=c.styleNode;this.id=c.id},getParent:function(){if(this.dijitWidget&&this.dijitWidget.domNode&&this.dijitWidget.domNode.parentNode){var b=p("davinci/ve/widget"),d=this.dijitWidget;do d=b.getEnclosingWidget(d.domNode.parentNode);while(d&&d.dijitWidget&&
"_"==d.dijitWidget.declaredClass.split(".").pop().charAt(0));return d}},_getChildren:function(b){if(this.acceptsHTMLChildren)return this.inherited(arguments);var d=[];"NONE"!==davinci.ve.metadata.getAllowedChild(this.type)[0]&&(this.dijitWidget.getChildren(),this.dijitWidget.getChildren().forEach(function(c){c._maqNotDVWidget||(b?d.push(p("davinci/ve/widget").getWidget(c.domNode)):(c=c.domNode&&c.domNode._dvWidget)&&d.push(c))}));return d},_getContainerNode:function(){return this.containerNode||this.domNode},
selectChild:function(b){this.dijitWidget.selectChild&&this.dijitWidget.selectChild(b.dijitWidget)},_addChildToDom:function(b,d){if(this.acceptsHTMLChildren){this.inherited(arguments);var c=b.dijitWidget;c&&this.dijitWidget._started&&!c._started&&b.startup()}else b.dijitWidget&&this.dijitWidget.addChild?this.dijitWidget.addChild(b.dijitWidget,d):("xblox/RunScript"===b.type&&b.getHelper()&&b.getHelper().addChildToDom&&b.getHelper().addChildToDom(this.dijitWidget,b,d),this.inherited(arguments))},_removeChildFromDom:function(b){this.dijitWidget.removeChild&&
b.dijitWidget?this.dijitWidget.removeChild(b.dijitWidget):this.inherited(arguments)},_getPropertyValue:function(b){return this.dijitWidget.get(b)},startup:function(){this.dijitWidget.startup()},isLayout:function(){var b=this.getContext().getDijit();return b.layout?this.dijitWidget.isInstanceOf(b.layout._LayoutWidget):!1},resize:function(){var b=this.getHelper();b&&b.resize?b.resize(this):this.dijitWidget.resize&&this.dijitWidget.resize()},renderWidget:function(){if(this.dijitWidget.render)this.dijitWidget.render();
else if(this.dijitWidget.chart){var b=dojo.marginBox(this.dijitWidget.domNode);this.dijitWidget.resize(b)}this.domNode.parentNode._dvWidget&&this.domNode.parentNode._dvWidget.isDijitWidget&&this._refresh(this.domNode.parentNode)},_refresh:function(b){var d=b.parentNode;d._dvWidget&&d._dvWidget.isDijitWidget?this._refresh(d):b._dvWidget.resize&&b._dvWidget.resize()},_attr:function(b,d){return this.dijitWidget.get.apply(this.dijitWidget,arguments)}})})},"davinci/ve/_Widget":function(){define("davinci/ve/_Widget",
"dojo/_base/declare ./metadata ../html/CSSModel dojox/html/entities davinci/ve/utils/StyleArray davinci/ve/utils/GeomUtils xide/mixins/EventedMixin xide/mixins/ReloadMixin".split(" "),function(p,n,m,h,g,f,b,e){var k=function(d,c,a){if(d==c)return!0;if(!d||!c||d.length!=c.length)return!1;for(var b=0;b<d.length;b++)if(a){if(!a(d[b],c[b]))return!1}else if(d[b]!=c[b])return!1;return!0};return p("davinci.ve._Widget",[b,e],{isWidget:!0,acceptsHTMLChildren:!1,_skipAttrs:"id style class dir lang _children".split(" "),
constructor:function(d,c,a,b){this.domNode=c;this.id=c.id;c._dvWidget=this;this._params=dojo.mixin({},d);this.type=a;this.metadata=b},postscript:function(){var d;if(this.domNode){var c=this.domNode.ownerDocument;c.body._edit_context?d=c.body._edit_context:c.body._dvWidget&&c.body._dvWidget._edit_context&&(d=c.body._dvWidget._edit_context)}this.id&&d&&(d.widgetHash[this.id]=this);this.buildRendering();this.postCreate()},buildRendering:function(){},postCreate:function(){},getObjectType:function(){},
getContext:function(){return this._edit_context},getChildren:function(d){var c=this.getHelper();return c&&c.getChildren?c.getChildren(this,d):this._getChildren(d)},indexOf:function(d){var c=this.getHelper();return c&&c.indexOf?c.indexOf(this,d):dojo.indexOf(this.getChildren(),d)},_getChildrenForTree:function(d){d=this.getContainerNode();var c=[];d&&!d.children.length&&this.domNode.children.length&&(d=this.domNode);d&&dojo.forEach(d.children,function(a){a=dijit.registry.getEnclosingWidget(a);a!=this&&
c.push(a)});return c},_getChildren:function(d){var c=this.getContainerNode(),a=[];c&&dojo.forEach(c.children,function(c){d?a.push(require("davinci/ve/widget").getWidget(c)):(c=c._dvWidget)&&a.push(c)});return a},getContainerNode:function(){var d=this.getHelper();return d&&d.getContainerNode?d.getContainerNode(this):"NONE"!==n.getAllowedChild(this.type)[0]?this._getContainerNode():null},_getContainerNode:function(){return this.domNode},getMetadata:function(){this.metadata||(this.metadata=n.query(this));
return this.metadata},getHelper:function(){this._edit_helper||(this._edit_helper=require("davinci/ve/widget").getWidgetHelper(this.type));return this._edit_helper},attr:function(d,c){var a=this._attr.apply(this,arguments);if(1<arguments.length)c=this._stringValue(d,c),this._srcElement.addAttribute(d,c);else return a},_attr:function(d,c){},indexOf:function(d){var c=this.getHelper();return c&&c.indexOf?c.indexOf(this,d):dojo.indexOf(this.getChildren(),d)},getStyleNode:function(){return this.styleNode||
this.domNode},addChild:function(d,c){if(this.getContainerNode()){if(void 0===c||null===c||-1===c)this._srcElement.addChild(d._srcElement);else{var a=this.getChildren();c<a.length?this._srcElement.insertBefore(d._srcElement,a[c]._srcElement):this._srcElement.addChild(d._srcElement)}(a=this.getHelper())&&a.addChild?a.addChild(this,d,c):this._addChildToDom.apply(this,arguments)}},_addChildToDom:function(d,c){try{var a=d.domNode,b=this.getContainerNode();if(void 0===c||null===c||-1===c)b.appendChild(a);
else{var e=this.getChildren();c<e.length?b.insertBefore(a,e[c].domNode):b.appendChild(a)}}catch(k){debugger}},getParent:function(){return require("davinci/ve/widget").getEnclosingWidget(this.domNode.parentNode)||this.domNode.parentNode},getObjectId:function(d){d=d||this;var c=d._edit_object_id;if(c)return c;if(d.domNode)return d.domNode.getAttribute("jsId")},addClass:function(d){var c=this.getClassNames(),c=c?c.split(/\s+/):[];-1===c.indexOf(d)&&(c.push(d),this._srcElement.setAttribute("class",c.join(" ")),
dojo.addClass(this.domNode,d))},getId:function(){if(!this.id){if(!this.domNode.id||!this.type)return;var d=this.domNode.id,c=(this.isHtmlWidget?this.getTagName():this.type).replace(/\./g,"_")+"_";if(d.length>c.length&&d.substring(0,c.length)==c)return}return this._srcElement&&this._srcElement._getAttribute("id")&&this._srcElement._getAttribute("id").noPersist?void 0:this.id},setMarginBox:function(d){var c=this.getStyleNode();c&&(dojo.marginBox(c,d),this._updateSrcStyle())},getMarginBox:function(){var d=
this.domNode,c=null,c=(c=this.getHelper())&&c.getMarginBoxPageCoords?c.getMarginBoxPageCoords(this):f.getMarginBoxPageCoords(d);c.l-=f.getScrollLeft(d);c.t-=f.getScrollTop(d);c.x=c.l;c.y=c.t;return c},getStyle:function(d){return(d=this.getStyleValues(d))?this._styleText(d):""},_sortStyleValues:function(d){d=dojo.clone(d);for(var c=m.shorthand,a=0,b=0;b<c.length;b++){var e;a:{e=c[b][0];for(var k=0;k<d.length;k++)if(d[k]&&d[k].hasOwnProperty(e)){e=k;break a}e=-1}-1<e&&(k=d[e],d.splice(e,1),d.splice(a,
0,k),a++)}return d},_styleText:function(d){var c="";if(dojo.isArray(d)){d=davinci.ve.states.normalizeArray("style",this.domNode,b,d);for(var a=0;a<d.length;a++)for(var b in d[a])value=d[a][b],void 0!==value&&""!=value&&null!=value&&(c+=b+": "+d[a][b]+"; ")}else for(b in d)value=davinci.ve.states.normalize("style",this.domNode,b,d[b]),void 0!==value&&""!=value&&null!=value&&(c+=b+": "+d[b]+"; ");return c.trim()},getChildrenData:function(d){d=d||{identify:!0};var c=this.getHelper();return c&&c.getChildrenData?
c.getChildrenData.apply(c,[this,d]):this._getChildrenData(d)},_getChildrenData:function(d){return this.getChildren().map(function(c){return c.getData(d)})},getClassNames:function(){return this._srcElement.getAttribute("class")||""},_getData:function(d){var c={type:this.type,properties:{}},a=require("davinci/ve/widget");if(d.identify){this._srcElement||(this._srcElement=a._createSrcElement(this.domNode));var b=this._srcElement._getAttribute("id");b&&b.noPersist&&(c.properties.isTempID=!0);c.properties.id=
this.id}!1!==d.preserveTagName&&this.id&&(c.tagName=this._srcElement.tag);b=n.query(this,"property");this.domNode&&this.domNode.parentNode&&(a=a.getEnclosingWidget(this.domNode.parentNode),(a=n.query(a,"childProperties"))&&(b=b?dojo.mixin({},b,a):a));if(b)for(var e in b)if(-1===this._skipAttrs.indexOf(e.toLowerCase())){var a=b[e],f=this.getPropertyValue(e);f&&f.length?"array"==a.datatype?k(f,a.defaultValue)||(c.properties[e]=f):f!=a.defaultValue&&(c.properties[e]=f):"boolean"!=a.datatype&&"number"!=
a.datatype||f==a.defaultValue?a.datatype&&(0==a.datatype.indexOf("dijit")||"object"==a.datatype&&a.isData)&&(c.properties[e]=f):c.properties[e]=f}c.properties.style=this.getStyle(d);(e=this.getClassNames(d))&&(c.properties["class"]=e);c.children=this.getChildrenData(d);c.type.indexOf("delite");return c},getData:function(d){d=d||{identify:!0,preserveStates:!0};var c=this.getHelper();d=c&&c.getData?c.getData.apply(c,[this,d]):this._getData(d);d.maqAppStates=dojo.clone(this.domNode._maqAppStates);d.maqDeltas=
dojo.clone(this.domNode._maqDeltas);d.properties||(d.properties={});if(this.properties)for(var a in this.properties)a in d.properties||(d.properties[a]=this.properties[a]);a=this._srcElement;for(var c=a.attributes,b=0;b<c.length;b++){var e=c[b];"on"==e.name.substr(0,2).toLowerCase()?d.properties[e.name]=e.value:"a"==a.tag.toLowerCase()&&"href"==e.name.toLowerCase()&&(d.properties[e.name]=e.value)}return d},getPropertyValue:function(d){if("id"===d)return this.getId();if("jsId"===d)return this.getObjectId();
var c=this.getHelper();return c&&c.getPropertyValue?c.getPropertyValue(this,d):this._getPropertyValue(d)},_getPropertyValue:function(d){return this.domNode.getAttribute(d)},getTagName:function(){return this.domNode.nodeName.toLowerCase()},getStyleValues:function(){function d(a){for(var c=b.length-1;0<=c;c--)void 0!==b[c][a]&&b.splice(c,1)}var c=this.getStyleNode().style,a=this._srcElement.getAttribute("style"),b=require("davinci/ve/widget").parseStyleValues(a),a=this.getParent();c&&a&&a.dijitWidget&&
a.dijitWidget.addChild&&!a.acceptsHTMLChildren&&(d("position"),d("left"),d("top"));return b},getStyleValuesAllStates:function(){var d=this.getStyleValues(),c={undefined:d},a=this.domNode._maqDeltas;if(a)for(var b in a)a[b].style&&(c[b]="undefined"==b?g.mergeStyleArrays(d,a[b].style):a[b].style);return c},_updateSrcStyle:function(){var d=this.getStyle();d.length?this._srcElement.addAttribute("style",d):this._srcElement.removeAttribute("style")},_getStyleString:function(d){if(!d)return"";d=this._sortStyleValues(d);
return this._styleText(d)},setStyleValuesCanvas:function(d){if(d){d=this._getStyleString(d);var c=this.getStyleNode();dojo.attr(c,"style",d);this.dijitWidget&&(this.dijitWidget.style=d)}},setStyleValuesModel:function(d){d=this._getStyleString(d);0<d.length?this._srcElement.addAttribute("style",d):this._srcElement.removeAttribute("style")},setStyleValuesAllStates:function(d){this.domNode._maqDeltas=void 0;if(d)for(var c in d){var a=d[c];"undefined"===c&&(c=void 0);davinci.ve.states.setStyle(this.domNode,
c,a,!0)}},isLayout:function(){return!1},resize:function(){},refresh:function(){var d=this.getParent();d&&d.dijitWidget?d.refresh():this.resize&&this.resize()},removeChild:function(d){this._srcElement?this._srcElement.removeChild(d._srcElement):console.error("cant remove child! this._srcElement is null",this);var c=this.getHelper();c&&c.removeChild?c.removeChild(this,d):this._removeChildFromDom.apply(this,arguments)},_removeChildFromDom:function(d){(d=d.domNode)&&d.parentNode&&d.parentNode.removeChild(d)},
setProperties:function(d,c){this.properties||(this.properties={});c=c||!1;d.id&&(this._srcElement.addAttribute("id",d.id,d.isTempID),delete d.id,delete d.isTempID);d.isTempID&&delete d.isTempID;for(var a in d){var b=d[a];b||"boolean"==typeof b||"number"==typeof b?(b=this._stringValue(a,b),c||(this.properties[a]=b),this._srcElement.addAttribute(a,b)):(delete this.properties[a],this._srcElement.removeAttribute(a))}},startup:function(){this.initReload()},renderWidget:function(){},destroyWidget:function(d){(d=
this.getHelper())&&d.destroy?d.destroy(this):this.dijitWidget?this.dijitWidget.destroyRecursive():dojo.forEach(this.getChildren(),function(c){c.destroyWidget()})},destroy:function(){this.inherited(arguments);console.error("destry")},selectChild:function(d){},attach:function(){var d=this.getHelper();d&&d.create&&d.create(this,this._srcElement)},_stringValue:function(d,c){var a=this.getMetadata(),a=a.property&&a.property[d];if(!a)return c;if("object"==a.datatype)if(c.getObjectId)c=c.getObjectId();else{if(a=
c._edit_object_id)return a;if(c.domNode)return c.domNode.getAttribute("jsId")}else if("json"==a.datatype){var a=(a=this.getContext())&&a.getDojo()||dojo,b=this.getHelper();b&&b.checkValue&&(c=b.checkValue(c));a.isObject(c)&&(c=a.toJson(c))}else if("string"==a.datatype)switch(a.format){case "date":case "time":isFinite(c)&&(c=dojo.date.stamp.toISOString(c,{selector:a.format}));break;default:c=h.encode(c)}return c}})})},"davinci/html/CSSModel":function(){define({shorthand:[["border","border-width border-style border-color border-top border-left border-right border-bottom".split(" ")],
["border-width",["border-top-width","border-right-width","border-bottom-width","border-left-width"]],["border-style",["border-top-style","border-right-style","border-bottom-style","border-left-style"]],["border-color",["border-top-color","border-right-color","border-bottom-color","border-left-color"]],["border-bottom",["border-bottom-width","border-bottom-style","border-bottom-color"]],["border-top",["border-top-width","border-top-style","border-top-color"]],["border-left",["border-left-width","border-left-style",
"border-left-color"]],["border-right",["border-right-width","border-right-style","border-right-color"]],["font","font-size line-height font-weight font-style font-family line-height".split(" ")],["border-radius",["border-top-left-radius","border-top-right-radius","border-bottom-right-radius","border-bottom-left-radius"]],["-moz-border-radius",["-moz-border-radius-topleft","-moz-border-radius-topright","-moz-border-radius-bottomright","-moz-border-radius-bottomleft"]],["margin",["margin-top","margin-right",
"margin-bottom","margin-left"]],["padding",["padding-top","padding-right","padding-bottom","padding-left"]],["background",["background-color","background-image","background-repeat","background-position","background-attachment"]]]})},"davinci/ve/utils/StyleArray":function(){define([],function(){return{mergeStyleArrays:function(p,n){p||(p=[]);n||(n=[]);for(var m=dojo.clone(p),h=0;h<n.length;h++)for(var g in n[h])for(j=m.length-1;0<=j;j--){var f=m[j],b;for(b in f)if(g==b){m.splice(j,1);break}}return m.concat(n)}}})},
"davinci/ve/GenericWidget":function(){define(["dojo/_base/declare","./_Widget"],function(p,n){return p("davinci.ve.GenericWidget",n,{isGenericWidget:!0,constructor:function(m,h,g,f,b){dojo.attr(h,"dvwidget",g);b&&b.addAttribute("dvwidget",g)},buildRendering:function(){this.containerNode=this.domNode;if(this._params){for(var m in this._params)this.domNode.setAttribute(m,this._params[m]);this._params=void 0}},_getChildrenData:function(m){for(var h=[],g=this.domNode.childNodes,f=0;f<g.length;f++){var b=
g[f],e;switch(b.nodeType){case 1:(b=require("davinci/ve/widget").byNode(b))&&(e=b.getData(m));break;case 3:(e=b.nodeValue.trim())&&m.serialize&&(e=davinci.html.escapeXml(e));break;case 8:e="\x3c!--"+b.nodeValue+"--\x3e"}e&&h.push(e)}return 0===h.length?void 0:h},setProperties:function(m){var h=this.domNode,g;for(g in m)"style"===g?dojo.style(h,m[g]):m[g]?h[g]=m[g]:h.removeAttribute(g);this.inherited(arguments)},_attr:function(m,h){if(1<arguments.length)this.domNode.setAttribute(m,h);else return this.domNode.getAttribute(m)},
getTagName:function(){return this.domNode.nodeName.toLowerCase()}})})},"davinci/ve/DeliteWidget":function(){define("dojo/_base/declare ./_Widget ./widget require xide/registry xide/utils".split(" "),function(p,n,m,h,g,f){function b(b){b.declaredClass&&"davinci.ve.DeliteWidget"!==b.declaredClass?b.type=b.declaredClass:b.domNode&&b.domNode.declaredClass&&-1==b.domNode.declaredClass.indexOf("uniq")&&(b.type=b.domNode.declaredClass);if(!b.type)switch("delite/"+f.capitalize(b.domNode.baseClass.replace("d-",
""))){case "delite/Radio-button":b.type="delite/RadioButton";break;case "delite/Checkbox":b.type="delite/Checkbox";break;case "delite/Accordion-header":b.type="delite/AccordionHeader";break;case "delite/Combobox":b.type="delite/Combobox";break;case "delite/Toggle-button":b.type="delite/ToggleButton";break;case "delite/Tab-bar":b.type="delite/TabBar";break;case "delite/View-stack":b.type="delite/ViewStack";break;case "delite/MediaPlayer":b.type="delite/MediaPlayer";break;case "delite/Panel":b.type=
"delite/Panel";break;case "delite/Select":b.type="delite/Select";break;case "delite/Button":b.type="delite/Button";break;case "delite/Accordion":b.type="delite/Accordion";break;case "delite/Slider":b.type="delite/Slider"}b.type?g.add(b.domNode):console.error("have no widget type ",b)}p=p("davinci.ve.DeliteWidget",n,{isGenericWidget:!0,helper:m,getData:function(b){b=b||{identify:!0,preserveStates:!0};var k;k=(k=this.getHelper())&&k.getData?k.getData.apply(k,[this,b]):this._getData(b);var d=!1;"no_id"===
this.id&&(d=dijit.getUniqueId(this.type.replace(/\./g,"_")),d=d.replace("delite/","d-").toLowerCase(),console.error("no id! set to "+d),this.id=d,k.properties.id=d,k.properties.id=d,this.domNode.id=d,d=!0);b.identify&&!d&&g.byId(this.id);g.add(this.domNode);k.maqAppStates=dojo.clone(this.domNode._maqAppStates);k.maqDeltas=dojo.clone(this.domNode._maqDeltas);k.properties||(k.properties={});if(this.properties)for(var c in this.properties)c in k.properties||(k.properties[c]=this.properties[c]);b=this._srcElement;
for(var d=b.attributes,a=0;a<d.length;a++){var f=d[a];c=f.name;if("on"==f.name.substr(0,2).toLowerCase())k.properties[f.name]=f.value;else if("a"==b.tag.toLowerCase()&&"href"==f.name.toLowerCase())k.properties[f.name]=f.value;else if("stop"===c||"bidirectional"===c||"block"===c||"targetevent"===c)k.properties[f.name]=f.value}return k},_fixType:function(e){return b(e)},_getChildren:function(b){function k(b){dojo.forEach(b.children,function(b){(b=a.getWidget(b,!1))&&!b.type&&c._fixType(b);c.metadata&&
c.metadata.ignore&&b.type&&-1!==c.metadata.ignore.indexOf(b.type)||b&&b.type&&(-1==b.type.indexOf("html.")||c.metadata&&1==c.metadata.htmlContent)&&d.push(b)})}var d=[],c=this;b=this.container||this.domNode;b.containerNode&&null==this.domNode.render&&(b=b.containerNode);this.domNode&&null!=this.domNode.render&&(b=this.domNode);var a=h("davinci/ve/widget");b&&(k(b),0==d.length&&this.domNode.containerNode&&k(this.domNode.containerNode));return c.metadata&&c.metadata.noChildren?[]:d},getChildren:function(b){var k=
this.getHelper();return k&&k.getChildren?k.getChildren(this,b):this._getChildren(b)},constructor:function(b,k,d,c,a){this.acceptsHTMLChildren=!0},buildRendering:function(){this.containerNode=this.domNode;if(this._params){for(var b in this._params)this.domNode.setAttribute(b,this._params[b]);this._params=void 0}},_getChildrenData:function(b){var k=this.domNode;if(!k.hasChildNodes())return null;if(k&&k.getChildrenData)return k.getChildrenData();var k=[],d=this.domNode.childNodes,c=h("davinci/ve/widget");
this.metadata&&this.metadata.noChildren&&(d=[]);for(var a=0;a<d.length;a++){var f=d[a],g;switch(f.nodeType){case 1:if((f=c.byNode(f))&&f.type&&-1!==f.type.indexOf("html.")&&!0!==this.metadata.htmlContent)break;if(this.metadata&&this.metadata.ignore&&f.type&&-1!==this.metadata.ignore.indexOf(f.type))break;f&&(g=f.getData(b));break;case 3:(g=f.nodeValue.trim())&&(b.serialize||!0===this.metadata.htmlContent)&&(g=davinci.html.escapeXml(g));break;case 8:g="\x3c!--"+f.nodeValue+"--\x3e"}(g&&g.type&&-1==
g.type.indexOf("html.")||g&&!0===this.metadata.htmlContent)&&k.push(g)}return 0===k.length?void 0:k},_getPropertyValue:function(b){if(this.domNode._get){var k=this.domNode._get(b);null==k&&(k=this.domNode.getAttribute(b));return k}if(this.containerNode&&b in this.containerNode)return this.containerNode[b]},setProperties:function(b){var k=this.domNode,d;for(d in b)"style"===d?dojo.style(k,b[d]):b[d]?(k[d]=b[d],k._set&&k._set(d,b[d]),dojo.attr(k,d,b[d])):k.removeAttribute(d);this.inherited(arguments)},
_attr:function(b,k){},getTagName:function(){return this.domNode.nodeName.toLowerCase()},getParent:function(){if("xblox/RunScript"==this.type){var b=this.domNode;if(b&&b._targetReference&&b._targetReference._dvWidget)return b._targetReference._dvWidget}return this.inherited(arguments)}});p.fixType=b;return p})},"davinci/ve/HTMLWidget":function(){define(["dojo/_base/declare","./_Widget"],function(p,n){return p("davinci.ve.HTMLWidget",n,{isHtmlWidget:!0,addHTMLClasses:!0,constructor:function(m,h,g){this.type=
"html."+h.tagName.toLowerCase();this.acceptsHTMLChildren=!0;null!=g&&(this.addHTMLClasses=g)},buildRendering:function(){this.containerNode=this.domNode;if(this._params){for(var m in this._params)this.domNode.setAttribute(m,this._params[m]);this._params=void 0}try{!1!==this.addHTMLClasses&&dojo.addClass(this.domNode,"HtmlWidget")}catch(h){}},_getChildrenData:function(m){function h(b){(b=b.nodeValue.trim())&&(b=davinci.html.escapeXml(b));return b}var g=this.domNode;if(!g.hasChildNodes())return null;
if(1===g.childNodes.length&&3===g.firstChild.nodeType)return h(g.firstChild);var f=[];dojo.forEach(g.childNodes,function(b){var e;switch(b.nodeType){case 1:(b=require("davinci/ve/widget").byNode(b))&&(e=b.getData(m));break;case 3:e=h(b);break;case 8:e="\x3c!--"+b.nodeValue+"--\x3e"}e&&f.push(e)});return f},setProperties:function(m,h){var g=this.domNode;h=h||!1;for(var f in m)if("style"===f)dojo.style(g,m[f]);else if(!h){var b=m[f];b||"boolean"==typeof b||"number"==typeof b?g.setAttribute(f,b):g.removeAttribute(f)}this.inherited(arguments)},
resize:function(){this.getChildren().forEach(function(m){m.resize&&m.resize()})},_attr:function(m,h){if(1<arguments.length)this.domNode[m]=h;else return this.domNode[m]},getTagName:function(){return this.domNode.nodeName.toLowerCase()}})})},"davinci/ve/ObjectWidget":function(){define(["dojo/_base/declare","dojo/dom-attr","./_Widget"],function(p,n,m){return p("davinci.ve.ObjectWidget",m,{isObjectWidget:!0,constructor:function(h,g,f,b,e){"string"===typeof f&&(n.set(g,"data-dojo-type",f),e&&e.addAttribute("data-dojo-type",
f))},postCreate:function(){var h=this._params.jsId,g=require("davinci/ve/widget")._dojo(this.domNode),f;if(h){if(n.set(this.domNode,"jsId",h),f=this.getObjectType())if(f=g.getObject(f.replace(/\//g,".")))if(f=f.markupFactory?f.markupFactory(this._params,this.domNode,f):f.prototype&&f.prototype.markupFactory?f.prototype.markupFactory(this._params,this.domNode,f):new f(this._params,this.domNode))f._edit_object_id=h,g.setObject(h,f)}else if(h=this.getObjectId())if(f=g.getObject(h))f._edit_object_id=
h},getObjectType:function(){var h=this.domNode,h=n.get(h,"data-dojo-type")||n.get(h,"dojoType");return h=h.replace(/\./g,"/")},getObjectId:function(){return n.get(this.domNode,"jsId")},_getChildren:function(){return[]}})})},"davinci/ve/commands/StyleCommand":function(){define(["dojo/_base/declare","davinci/ve/widget","davinci/ve/utils/StyleArray"],function(p,n,m){return p("davinci.ve.commands.StyleCommand",null,{name:"style",constructor:function(h,g,f){this._newValues=g;this._id=h?h.id:void 0;this._applyToStateIndex=
f&&"Normal"!=f&&"undefined"!=f?f:"undefined"},add:function(h){h&&h._id==this._id&&h._newValues&&dojo.mixin(this._newValues,h._newValues)},execute:function(h,g){if(this._id&&this._newValues){var f=require("davinci/ve/widget").byId(this._id);if(f&&f.domNode){var b=require("davinci/ve/States"),e=f.getStyleValuesAllStates();this._oldStyleValuesAllStates=dojo.clone(e);e[this._applyToStateIndex]=e[this._applyToStateIndex]?m.mergeStyleArrays(e[this._applyToStateIndex],this._newValues):this._newValues;for(var k=
e[this._applyToStateIndex],d=k.length-1;0<=d;d--){var c=k[d],a=!1,q;for(q in c)"$MAQ_DELETE_PROPERTY$"==c[q]?delete c[q]:a=!0;a||k.splice(d,1)}f.setStyleValuesAllStates(e);k=b.getStatesListCurrent(f.domNode);c=m.mergeStyleArrays([],e.undefined);for(d=0;d<k.length;d++)e[k[d]]&&(c=m.mergeStyleArrays(c,e[k[d]]));f.setStyleValuesCanvas(c);f.setStyleValuesModel(e.undefined);f.refresh();b.resetState(f.domNode);!0!==g&&dojo.publish("/davinci/ui/widgetPropertiesChanged",[[f]])}}},undo:function(){if(this._id&&
this._oldStyleValuesAllStates){var h=require("davinci/ve/widget").byId(this._id);if(h){require("davinci/ve/States");var g=this._oldStyleValuesAllStates,f=this._applyToStateIndex;h.setStyleValuesAllStates(g);g=m.mergeStyleArrays(g.undefined,g[f]);h.setStyleValuesCanvas(g);h.setStyleValuesModel(this._oldStyleValuesAllStates.undefined);h.refresh();require("davinci/ve/States").resetState(h.domNode);dojo.publish("/davinci/ui/widgetPropertiesChanged",[[h]])}}}})})},"davinci/lang/ve":function(){define([],
function(){return{common:"Common",widgetSpecific:"Widget",events:"Events",layout:"Layout",showMinMax:"show min/max",padding:"Padding",margins:"Margins",showtrbl:"show t/r/b/l",background:"Background",border:"Border",showDetails:"show details",fontsAndText:"Fonts/Text",shapesSVG:"SVG",properties:"properties",Scenes:"Scenes",States:"States",ActiveScene:"This scene is currently visible",AppStateFocus:"This application state is the target for application-state-specific visibility or styling changes",
InitialScene:"This scene will show initially when the page runs",chooseDeviceSilhouette:"Choose a device silhouette: ",filesHasUnsavedChanges:"The file '${0}' has unsaved changes, \"Save\" changes and continue with switch device silhouette.",selectAncestorTitle:"Select ancestor",selectAncestorLabel:"Select ancestor (closest ancestor listed first):",createNewState:"Create New State",updateCurrentState:"Update Current State",createLabel:"Create",updateLabel:"Update",modifyState:"Modify State",modifyLabel:"Update",
stateLabel:"Name",enterStateName:"Please enter a state name.",stateNameExists:"State name '${name}' already exists. Please enter a different state name.",renameState:"Rename State",renameLabel:"Rename",cancelLabel:"Cancel",newStateLabel:"New name:",manageStates:"Manage Widget Visibility for Different States",manageStatesCheckLabel:"Check:",manageStatesCheckCurrentStateOnly:"Current state",manageStatesCheckAll:"All",manageStatesUncheckAll:"None",manageStatesCheckBackgroundOnly:"Background only",manageStatesAllVisibleFromBackground:"(Visible from Background)",
manageStatesSomeVisibleFromBackground:"(Some visible from Background)",manageStatesSomeVisibleSomeHidden:"(Some visible, some hidden)",initialStateCheckBoxLabel:"Initial state at document load time",EnableApplicationStates:"Enable/disable application states",EnableAsStateContainerDescription:"Setting the check box below and clicking OK will allow custom application states to be defined on the currently selected widget.",DisableAsStateContainerDescription:"Unsetting the check box below and clicking OK will disallow custom application states on the currently selected widget.",
DisableAsStateContainerDataLoss:"Any existing interactivity based on existing application states will be lost.",EnableAsStateContainerWidgetLabel:"Application states are enabled on this widget",EnableApplicationStatesCurrentWidget:"Currently selected widget",EnableApplicationStatesCurrentStates:"Current application states",EnableApplicationStatesNone:"(none)",NewWidgetsCurrentStateTitleBackground:"Toggle whether new widgets go to Background or selected state (current value: Background)",NewWidgetsCurrentStateTitleCurrentState:"Toggle whether new widgets go to Background or selected state (current value: selected state)",
richTextInputHelp:"Provides Rich Text (word processor-like) editing of HTML.",smartInputHelp1:"If you use any markup characters (\x26lt;,\x26gt;,\x26amp;), you need to specify whether the text represents literal (plain) text or HTML markup that should be parsed (using an innerHTML assignment).",smartInputHelp2:"Text represents literal (plain) text.",loading:"Loading...",htmlMarkup:"HTML markup",creatingStyleRules:"Creating Style Rules with app.css",propChangeCannotComplete:"This property change cannot be completed because the operation attempts to modify a read-only theme CSS file.",
toChangeProperty:"To change this property, one technique is to add a class to this widget (at top of Properties palette) and then open up the CSS Details pane to target a style rule within your app.css file, as described at ${0}.",errorModifyingValue:"Error modifying value",changeWillModify:"This change will modify one of the CSS style rules defined within a 'CSS theme' and will therefore probably impact other widgets on a global basis.",insteadOfChanging:"Instead of changing the theme CSS files, it is usually better to add a class to this widget (at the top of the Properties palette) and then open up the CSS Details pane to target a style rule within your app.css file, as described at ${0}.",
okToProceed:"OK to proceed with this change?",valueIsOverriden:"This value is overriden and can not be changed.",applyToWhich:"Apply to which style rule:",onlyApplyToState:" Only apply to current state (${0})",newRule:"[class: ${0} - New rule in ${1}] ",newThemeRule:"[theme: - New rule in ${0}] ",existingRule:"[class: ${0} - Existing rule in ${1}] ",line:" line: ${0})",propUndefined:"undefined",bgdType_emptystring:"",bgdType_none:"none",bgdType_url:"image",bgdType_linear:"linear gradient",bgdType_radial:"radial gradient",
bgdType_other:"other",bgdPickFile:"Choose...",bgdStop:"Stop",bgdAddStop:"Add a new gradient stop after this stop",bgdRemoveStop:"Remove this gradient stop",bgdBackgroundColor:"background-color:",bgdBackgroundImageType:"background-image type:",bgdImageUrl:"Image URL:",bgdUrl:"URL:",bgdColorStops:"Color stops:",bgdColor:"color",bgdPosition:"position",bgdOptions:"Options:",bgdAngle:"Angle:",bgdPosition2:"Position:",bgdShape:"Shape:",bgdExtent:"Extent:",bgdBackgroundRepeat:"background-repeat:",bgdBackgroundPosition:"background-position:",
bgdBackgroundSize:"background-size:",bgdBackgroundOrigin:"background-origin:",bgdBackgroundClip:"background-clip:",bgdBackgroundImageValue:"'background-image' value:",bgdTemplate:"Template:",colorPicker:"Color picker...",removeValue:"Remove Value",selectColor:"select a color",toolBarFor:"for: ",noSelection:"(no selection)",toolBarClass:"class:",toolBarId:"ID:",idAlreadyUsed:"This id is already used by another widget",noValidParents:"No valid parents at this position",willBeChildOf:"Will become a child of:",
candidateParents:"Candidate parents:",toChangePress:"To change, press numbers",vteWarningTitle:"Theme Version Warning",vteWarningMessage:"Theme version does not match Maqetta version this could produce unexpected results. We suggest recreating the custom theme using the current version of Maqetta and deleting the existing theme.",vteWarningUnsuportedBrowserTitle:"Unsupported brower",vteWarningUnsuportedBrowserMessage:"Editing mobile themes is only supported on webkit browsers, we sugguest using Chrome or Safari to customize mobile themes.",
vteWarningToolkitMessage:"Theme version does not match workspace library version this could produce unexpected results. We suggest recreating the custom theme using the current version of Maqetta and deleting the existing theme.",vteErrorTitle:"Theme Version Error",vteErrorMessage:"Theme version is not supported by this version of Maqetta. You must recreating custom theme using the current version of Maqetta and deleting the existing theme..",vteErrorSavingResourceMessage:"error saving resource\n",
"SourceComboButton-source":"Source","SourceComboButton-splitHorizontal":"Split-H","SourceComboButton-splitVertical":"Split-V","LayoutDropDownButton-flow":"Flow","LayoutDropDownButton-absolute":"Absolute"}})},"davinci/ve/palette/Palette":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/connect dojo/on dojo/query dojo/dom-class dojo/Deferred dijit/focus dijit/_WidgetBase davinci/Runtime davinci/Workbench dijit/_KeyNavContainer dijit/form/TextBox dijit/form/DropDownButton dijit/DropDownMenu dijit/MenuItem davinci/ui/dnd/DragSource davinci/ve/metadata davinci/library ./PaletteFolder ./PaletteItem davinci/_common davinci/ve/tools/CreateTool davinci/workbench/Preferences".split(" "),
function(p,n,m,h,g,f,b,e,k,d,c,a,q,w,r,B,y,x,z,u,v,A,C,G){return p("davinci.ve.palette.Palette",[k,a],{descriptors:"",_displayShowValue:"block",_presetClassNamePrefix:"maqPaletteSection_",_presetSections:{},_presetCreated:{},raisedItems:[],sunkenItems:[],moreItems:[],helpItems:[],_userWidgetSection:{id:"$$UserWidgets$$",name:"User Widgets",includes:[]},postMixInProperties:function(){this._resource=A},postCreate:function(){dojo.addClass(this.domNode,"dojoyPalette");this.refresh();m.subscribe("/davinci/ui/addedCustomWidget",
this,"addCustomWidget");m.subscribe("/davinci/preferencesChanged",this,"preferencesChanged")},addCustomWidget:function(a){if(this._loaded&&a&&a.$wm&&a.$wm.widgets&&a.$wm.widgets.length){var b=d.currentEditor.getContext().getCompType();G.getPreferences("davinci.ve.editorPrefs",c.getProject()).showAllWidgets&&(b="mobile"==b?"$ALLMOBILE":"$ALLDESKTOP");var e=a.$wm;a=a.$wm.widgets;for(var k=null,f=0;f<a.length;f++){var g=a[f],q;for(q in this._presetSections){var h=null,m=this._presetSections[q];if(m){for(var w=
0;w<m.length;w++){var r=m[w];if("$$UserWidgets$$"==r.id){h=r;break}}h||(h=dojo.clone(this._userWidgetSection),h.preset=this._presetSections[q],h.presetId=q,h.items=[],m.push(h),this._presetCreated[q]&&(this._generateCssRules([h]),this._createPalette(h),h._created=!0));m="type:"+g.type;if(0>h.includes.indexOf(m)){h.includes.push(m);g.$library=e;g.section=h;g._paletteItemGroup=this._paletteItemGroupCount++;h.items.push(g);m=null;w=this.getChildren();for(r=0;r<w.length;r++){var x=w[r];if("davinci.ve.palette.PaletteFolder"==
x.declaredClass&&x.presetId==q&&"$$UserWidgets$$"==x.section.id){m=x;break}}m&&(m.domNode.style.display="none",h={displayName:g.$library._maqGetString(g.type)||g.$library._maqGetString(g.name)||g.name,description:g.$library._maqGetString(g.type+"_description")||g.$library._maqGetString(g.name+"_description")||g.description||g.type,name:g.name,paletteId:this.id,type:g.type,data:g.data||{name:g.name,type:g.type,properties:g.properties,children:g.children},tool:g.tool,category:"custom",section:h,PaletteFolderSection:m,
PaletteFolderSubsection:null,_paletteItemGroup:g._paletteItemGroup,_paletteGroupSelected:!0},this._setIconProperties(g,h),this._createItem(h,m).domNode.style.display="none",b==q&&(k=m))}}else console.error("Palette.js:addCustomWidget - no sections for comptype\x3d"+q)}}k&&k.showHideFolderContents(!0)}},setContext:function(a){this._context=a;try{this._loadPalette()}catch(c){console.error("_loadPalette:crash "+c)}this._filter();this.updatePaletteVisibility()},refresh:function(){delete this._loaded;
this._presetSections={};this._createFolderTemplate();this._createHeader();if(this._context)try{this._loadPalette()}catch(a){console.error("_loadPalette:crash")}},_loadPalette:function(){if(!this._loaded){var a=x.getLibrary(),b={};z.getUserLibs(c.getProject()).forEach(function(c){var d;a:{d=c.id;c=c.version;for(var e in a)if(a.hasOwnProperty(e)){var k=a[e];if(k.name===d&&k.version===c){c={};c[d]=a[e];d=c;break a}}d=null}d&&dojo.mixin(b,d)});var e={},k=[],f;for(f in b)if(b.hasOwnProperty(f)){var g=
b[f].$wm;g&&dojo.forEach(g.widgets,function(a){"untested"==a.category||a.hidden||k.push(a.type)})}this._paletteItemGroupCount=0;if(this._widgetPalette=d.getSiteConfigData("widgetPalette"))if((f=this._widgetPalette.presets)&&"object"==typeof f)for(var q in f){g=k.concat();this._presetSections[q]=[];var h=f[q],m,w="string"==typeof h.sections?this._widgetPalette.defs?this._widgetPalette.defs[h.sections]:void 0:h.sections;if(w&&w.length){var r=[],n;for(n in e){var v=e[n];v.descriptor&&r.push({name:n,
value:v})}r.sort(function(a,c){var b=a.name.split("/").pop().toLowerCase(),d=c.name.split("/").pop().toLowerCase();return b<d?-1:b>d?1:0});for(var v=!1,B,y=0;y<r.length;y++){v||(n=dojo.clone(this._userWidgetSection),w=w.concat(n),v=!0,B=n.includes);var A=r[y].value.descriptor.widgets;for(n=0;n<A.length;n++)B.push("type:"+A[n].type)}for(r=0;r<w.length;r++){v=dojo.clone("string"==typeof w[r]?this._widgetPalette.defs?this._widgetPalette.defs[w[r]]:void 0:w[r]);v.preset=h;v.presetId=q;if(v.subsections&&
v.subsections.length)for(y=v.subsections,A=0;A<y.length;A++){if("string"==typeof y[A]){var u=this._widgetPalette.defs?this._widgetPalette.defs[y[A]]:void 0;u&&(y[A]=dojo.clone(u))}u=y[A];u.includes&&0<=u.includes.indexOf("$$AllOthers$$")&&(m=u);u.preset=h;u.presetId=q;this._createSectionItems(u,h,g)}else this._createSectionItems(v,h,g),v.includes&&0<=v.includes.indexOf("$$AllOthers$$")&&(m=v);this._presetSections[q].push(v)}}else console.warning("No sections defined for preset "+q+" in widgetPalette.json (in siteConfig folder)");
for(h=0;h<g.length;h++)w=g[h],m&&(w=x.getWidgetDescriptorForType(w),w=dojo.clone(w),this._prepareSectionItem(w,m,this._paletteItemGroupCount),m.items.push(w),this._paletteItemGroupCount++)}else console.warning("No presets defined in widgetPalette.json (in siteConfig folder)");else console.error("widgetPalette.json not defined (in siteConfig folder)");this._loaded=!0}},_generateCssRules:function(a){var c=dojo.doc.styleSheets[0];c&&dojo.forEach(a,function(a){a.items&&dojo.forEach(a.items,function(a){var b=
a.iconBase64||this._getIconUri(a.icon,"ve/resources/images/file_obj.gif");a="img.davinci_"+a.type.replace(/[\.\/]/g,"_");b="{background-image: url("+b+")}";dojo.isIE?c.addRule(a,b):c.insertRule(a+b,c.cssRules.length)},this)},this)},_createPaletteItemsForComponent:function(a,c){if(a.items){var b=null;dojo.forEach(a.items,function(d){if(!d.hidden){var e={displayName:d.$library._maqGetString(d.type)||d.$library._maqGetString(d.name)||d.name,description:d.$library._maqGetString(d.type+"_description")||
d.$library._maqGetString(d.name+"_description")||d.description||d.type,name:d.name,paletteId:this.id,type:d.type,data:d.data||{name:d.name,type:d.type,properties:d.properties,children:d.children},category:a.name,section:a,preset:a.preset,presetId:a.presetId,presetClassName:c.presetClassName,PaletteFolderSection:c.PaletteFolderSection,PaletteFolderSubsection:c.PaletteFolderSubsection,_paletteItemGroup:d._paletteItemGroup,_paletteGroupSelected:d._paletteItemGroup!=b,_collectionName:d.$library&&d.$library.collections&&
d.$library.collections[d.collection]&&d.$library.collections[d.collection].name,ignoreMeta:d.ignoreMeta,userData:d.userData,forceShow:d.forceShow,iconHTML:d.iconHTML};this._setIconProperties(d,e);this._createItem(e);b=d._paletteItemGroup}},this)}},_createPalette:function(a){var c=a.presetId?this._presetClassNamePrefix+a.presetId:null,d={paletteId:this.id,icon:this._getIconUri(a.icon,"ve/resources/images/fldr_obj.gif"),iconBase64:a.iconBase64,displayName:a.name,section:a,subsections:a.subsections,
subsection_container:null,preset:a.preset,presetId:a.presetId,presetClassName:c};this._createFolder(d).then(function(d){if(a.subsections&&a.subsections.length)for(var b=0;b<a.subsections.length;b++){var e=a.subsections[b],e={paletteId:this.id,icon:this._getIconUri(e.icon,"ve/resources/images/fldr_obj.gif"),iconBase64:e.iconBase64,displayName:e.name,section:a,subsection:e,subsection_container:d,preset:a.preset,presetId:a.presetId,presetClassName:c};this._createFolder(e).then(function(e){d._children.push(e);
this._createPaletteItemsForComponent(a.subsections[b],{presetClassName:c,PaletteFolderSection:d,PaletteFolderSubsection:e})}.bind(this))}else this._createPaletteItemsForComponent(a,{presetClassName:c,PaletteFolderSection:d,PaletteFolderSubsection:null})}.bind(this))},_getIconUri:function(a,d){return a?0==a.indexOf("http")?a:c.location()+a:require.toUrl("davinci/"+d)},_createFolder:function(a){var c=new b;require(["davinci/ve/palette/PaletteFolder"],function(d){d=new d(a);this.addChild(d);c.resolve(d)}.bind(this));
return c},_createFolderTemplate:function(){this.folderTemplate=dojo.create("div",{className:"dojoyPaletteCommon dojoyPaletteFolder dojoyPaletteFolderLow ui-widget-header",innerHTML:'\x3ca href\x3d"javascript:void(0)"\x3e\x3cimg border\x3d"0"/\x3e\x3c/a\x3e'})},_createHeader:function(){},_updateShowAllWidgetsPreference:function(a){var d=c.getProject(),b=G.getPreferences("davinci.ve.editorPrefs",d);b.showAllWidgets=a;G.savePreferences("davinci.ve.editorPrefs",d,b)},_updateShowAllWidgetsMenu:function(a){},
_clearFilter:function(){this.filterField&&this.filterField.set("value","");this._filter()},_filter:function(){var a=this.context.getCompType(),d=G.getPreferences("davinci.ve.editorPrefs",c.getProject());d.showAllWidgets=!0;d.showAllWidgets&&(a="mobile"==a?"$ALLMOBILE":"$ALLDESKTOP");dojo.removeClass(this.domNode,"maqWidgetsFiltered");this.toolbarDiv&&dojo.removeClass(this.toolbarDiv,"maqWidgetsToolbarFiltered");this.getChildren().forEach(function(c){"dijit.form.TextBox"!=c.declaredClass&&dojo.style(c.domNode,
"display","davinci.ve.palette.PaletteFolder"===c.declaredClass&&c.presetId==a&&0<c._children.length&&("simple"==c._type||"subsection_container"==c._type)?"block":"none")})},_hasItem:function(a){for(var c=this.getChildren(),d=0;d<c.length;d++)if(c[d].type==a)return!0;return!1},_createItem:function(a,c){if("$$UserWidgets$$"!=a.section.id){var d=x.queryDescriptor(a.type,"collection"),b;if(a.preset&&(b=a.preset.collections,!b||!b.length)){console.error("_create item : presetCollections.l\x3d0");return}if(a.preset&&
a.preset.exclude){var e="string"==typeof a.preset.exclude?this._widgetPalette.defs?this._widgetPalette.defs[a.preset.exclude]:void 0:a.preset.exclude;if(e&&0<=e.indexOf(a.type)){console.error("_create item : exclude \x3d 1");return}}e=!1;if(b&&b.length){for(var k=0;k<b.length;k++)if(b[k].id==d&&b[k].show){e=!0;break}!0===a.ignoreMeta&&(e=!0);if(!e)return}}a.icon=a.iconLarge;d=new v(a);c?c.addChild(d):this.addChild(d);a.paletteItem=d;a.PaletteFolderSubsection?(a.PaletteFolderSubsection._children.push(d),
d.domNode.style.display=a.PaletteFolderSubsection._isOpen&&d._paletteGroupSelected?this._displayShowValue:"none"):a.PaletteFolderSection&&(a.PaletteFolderSection._children.push(d),d.domNode.style.display=a.PaletteFolderSection._isOpen&&d._paletteGroupSelected?this._displayShowValue:"none");b=g(".paletteItemImageContainer",d.domNode)[0];b=new y(d.domNode,"component",d,b);b.targetShouldShowCaret=!0;b.returnCloneOnFailure=!1;this.connect(b,"onDragStart",dojo.hitch(this,function(a){this.onDragStart(a)}));
this.connect(b,"onDragEnd",dojo.hitch(this,function(a){this.onDragEnd(a)}));a.forceShow&&(d.domNode.style.display="inline-block");return d},_prepareSectionItem:function(a,c,d){var b=x.getLibraryMetadataForType(a.type);a.$library=b;a.section=c;a._paletteItemGroup=d},_createSectionItems:function(a,c,d){a.items=[];collections=c.collections;var b=a.includes;if(!b||!b.length)return console.error("No includes property for preset "+c+" in widgetPalette.json (in siteConfig folder)"),[];for(c=0;c<b.length;c++){for(var e=
b[c],k=n.isArray(e)?e:[e],e=[],f=0;f<k.length;f++){var g=k[f],q=[];if("type:"===g.substr(0,5)){var h=x.getWidgetDescriptorForType(g.substr(5));h&&q.push(h)}else q=x.getWidgetsWithTag(g);for(g=0;g<q.length;g++)h=q[g],h=dojo.clone(h),this._prepareSectionItem(h,a,this._paletteItemGroupCount),e.push(h)}k=[];if(collections&&collections.length){for(q=0;q<collections.length;q++)for(g=collections[q],f=0;f<e.length;)h=e[f],h.collection==g.id?(k.push(h),e.splice(f,1)):f++;for(f=0;f<e.length;f++)k.push(e[f])}else k=
e;for(f=0;f<k.length;f++)e=k[f],q=d.indexOf(e.type),0<=q&&d.splice(q,1),a.items.push(e);this._paletteItemGroupCount++}},updatePaletteVisibility:function(){this._clearFilter();this._updateShowAllWidgetsMenu();var a=d.currentEditor.getContext().getCompType();this._presetCreated[a]=!0;dojo.addClass(this.domNode,"paletteLayoutIcons");this._displayShowValue="inline-block";var c=this._presetSections[a];if(c)for(var b=0;b<c.length;b++){var e=c[b];e._created||(this._generateCssRules([e]),this._createPalette(e),
e._created=!0)}c=this.getChildren();b=0;for(e=c.length;b<e;b++){var k=c[b];k&&k.domNode&&k.presetId&&("davinci.ve.palette.PaletteFolder"==k.declaredClass?(k.domNode.style.display=k.presetId==a?0==k._children.length||"subsection"==k._type?"none":"block":"none","subsubsection_container"==k._type&&(k._openSubsection=null),k._isOpen=!1):k.domNode.style.display=k.forceShow?"inline-block":"none")}},preferencesChanged:function(){for(var a=G.getPreferences("davinci.ve.editorPrefs",c.getProject()),a=a.widgetPaletteLayout&&
"icons"!=a.widgetPaletteLayout?"icon":"iconLarge",d=this.getChildren(),b=0;b<d.length;b++){var e=d[b];"davinci.ve.palette.PaletteItem"==e.declaredClass&&e.updateImgSrc(e[a])}this.updatePaletteVisibility()},flattenAll:function(){for(var a=0;a<this.raisedItems.length;a++)this.raisedItems[a].flat(this.raisedItems[a].domNode);this.raisedItems=[];for(a=0;a<this.sunkenItems.length;a++){var c=this.sunkenItems[a];c._tooltipDialog&&(c.paletteItemMoreCloseCleanup(),c.paletteItemHelpCloseCleanup());c.flat(c.domNode);
c._selectionShowing=!1}this.sunkenItems=[]},removeSelectionAll:function(){try{this.flattenAll()}catch(a){console.error("flatten failed")}for(var c=g(".paletteItemSelectionContent",this.domNode),d=0;d<c.length;d++){var b=c[d];b&&b.parentNode&&(b.parentNode.innerHTML="")}},getPaletteItemsSameGroup:function(a){for(var c=[],d=a._paletteItemGroup,b;a&&a._paletteItemGroup;)if(a._paletteItemGroup==d)a=(b=a)&&a.domNode&&a.domNode.previousSibling&&a.domNode.previousSibling._paletteItem;else break;for(a=b;a&&
a._paletteItemGroup==d;)c.push(a),a=a&&a.domNode&&a.domNode.nextSibling&&a.domNode.nextSibling._paletteItem;return c},_setIconProperties:function(a,c){c.icon=a.iconBase64||a.icon&&this._getIconUri(a.icon,"ve/resources/images/file_obj.gif")||a.iconLargeBase64||a.iconLarge&&this._getIconUri(a.iconLarge,"ve/resources/images/file_obj.gif")||this._getIconUri(a.icon,"ve/resources/images/file_obj.gif");c.iconLarge=a.iconLargeBase64||a.iconLarge&&this._getIconUri(a.iconLarge,"ve/resources/images/file_obj.gif")||
a.iconBase64||this._getIconUri(a.icon,"ve/resources/images/file_obj.gif")},onDragStart:function(a){this.removeSelectionAll();this.selectedItem=null;var c=a.dragSource.data;x.getHelper(c.type,"tool").then(function(a){a=new (a||C)(dojo.clone(c.data),c.userData);this._context.setActiveTool(a)}.bind(this));this._context.blockChange(!1);a._dragClone&&(f.add(a._dragClone,"paletteDragContainer"),dojo.create("div",{className:"maqCandidateParents"},a._dragClone));this._context.setActiveDragDiv(a._dragClone);
this._dragKeyDownListener=dojo.connect(document,"onkeydown",dojo.hitch(this,function(a){var c=this._context.getActiveTool();if(c&&c.onKeyDown)c.onKeyDown(a)}));this._dragKeyUpListener=dojo.connect(document,"onkeyup",dojo.hitch(this,function(a){var c=this._context.getActiveTool();if(c&&c.onKeyUp)c.onKeyUp(a)}))},onDragEnd:function(a){this._context.setActiveTool(null);this._context.setActiveDragDiv(null);dojo.disconnect(this._dragKeyDownListener);dojo.disconnect(this._dragKeyUpListener);e.curNode&&
e.curNode.blur&&e.curNode.blur();this.removeSelectionAll();this.selectedItem=null;this.flattenAll()},onDragMove:function(a){},nop:function(){return!1},__dummy__:null})})},"davinci/ui/dnd/DragSource":function(){define(["dojo/_base/declare","dojo/fx"],function(p,n){return p("davinci.ui.dnd.DragSource",null,{disabled:!1,dragObject:null,dragClone:null,offsetParent:null,offsetParentCoords:null,parentCoords:null,refNode:null,positioning:null,useCurrentPositioning:!0,targetShouldShowCaret:!1,draggingMousePosition:"TopLeft",
data:null,returnCloneOnFailure:!0,constructor:function(m,h,g,f){this.data=g;m=dojo.byId(m);m.dragSource=this;this.domNode=m;this.dragObject=f?f:m;this.refNode=m;this.type=h;this.offsetParent=dojo.doc.body},onDragDown:function(m){this.useCurrentPositioning&&(this.positioning=dojo.style(this.refNode,"position"));this.storeMouseDownInfo(m);this.initDrag(m)},onDragStart:function(m){this.createDragClone(m);return m._dragClone=this.dragClone},onDragMove:function(m){"TopLeft"==this.draggingMousePosition?
(this.dragClone.style.top=m.pageY+4+(m.documentY||0)+"px",this.dragClone.style.left=m.pageX+4+(m.documentX||0)+"px"):"ClickedPosition"==this.draggingMousePosition&&(this.dragClone.style.top=m.pageY-this.dragOffset.y+(m.documentY||0)+"px",this.dragClone.style.left=m.pageX-this.dragOffset.x+(m.documentX||0)+"px");"none"==this.dragClone.style.display&&(this.dragClone.style.display="")},onDragEnd:function(m){"dropSuccess"!=m.dragStatus&&this.returnCloneOnFailure?"dropFailure"==m.dragStatus?this.returnClone():
console.error("DragSource#onDragEnd: internal error: e.dragStatus is not set"):this.removeClone();this.cleanupDrag()},unregister:function(){this.domNode.dragSource=null;this.cleanupDrag()},reregister:function(){this.domNode.dragSource=this;this.initDrag()},storeMouseDownInfo:function(m){this.layerX=m.layerX-1;this.layerY=m.layerY-1;this.pageX=m.pageX;this.pageY=m.pageY;this.scrollOffset=dojo._docScroll();window.__x&&window.__x.apply(this);this.dragStartPosition=dojo.position(this.refNode,!0);this.dragStartCssPosition=
{y:this.refNode.offsetTop,x:this.refNode.offsetLeft};this.dragOffset={y:m.pageY-this.dragStartPosition.y,x:m.pageX-this.dragStartPosition.x};this.offsetParentCoords=dojo.position(this.offsetParent,!0);m=dojo.position(this.domNode.parentNode,!0);this.parentCoords={y:m.y-this.offsetParentCoords.y,x:m.x-this.offsetParentCoords.x};this.fixMouseDownInfo&&this.fixMouseDownInfo(this)},initDrag:function(){},cleanupDrag:function(){},createDragClone:function(m){this.dragClone=m=m.dragSource.dragHandler&&m.dragSource.dragHandler.createDragClone?
m.dragSource.dragHandler.createDragClone():this.dragObject.cloneNode(!0);dojo.style(m,"opacity",.5);m.style.zIndex=1001E3;var h=dojo.contentBox(this.dragObject);m.style.width=h.w+"px";m.style.height=h.h+"px";m.style.top=this.dragObject.offsetTop+4+"px";m.style.left=this.dragObject.offsetLeft+4+"px";m.style.position="absolute";m.style.clear="both";m.style.display="none";this.offsetParent.appendChild(m)},setDragTarget:function(m){this.dragObject=m},cancelEvent:function(m){m.stopPropagation();m.preventDefault()},
removeClone:function(){setTimeout(dojo.hitch(this,"removeClone_1"),0)},removeClone_1:function(){try{this.dragClone.parentNode.removeChild(this.dragClone),this.dragClone=null}catch(m){logError(m)}},returnClone:function(){var m=dojo.position(this.dragClone,!0),h=this.dragStartPosition,g=this;n.slideTo({node:this.dragClone,top:m.y>h.y?h.y-10:h.y+10,left:m.x>h.x?h.x-10:h.x+10,duration:400,onEnd:function(){n.slideTo({node:g.dragClone,top:h.y,left:h.x,duration:100,onEnd:function(){g.dragClone.parentNode.removeChild(g.dragClone);
g.dragClone=null;g.onCloneReturned()}}).play()}}).play()},onCloneReturned:function(){},globalChangeCursor:function(m){var h=dojo.doc.styleSheets[0];if(h)if(m){if(this._showingCursor){if(this._showingCursor==m)return;this.globalChangeCursor(null)}this._showingCursor=m;this._ruleIndex=h.cssRules.length;h.insertRule("*{cursor:"+m+" ! important;}",h.cssRules.length)}else this._showingCursor&&(this._showingCursor=null,h.deleteRule(this._ruleIndex))}})})},"dojo/fx":function(){define("./_base/lang ./Evented ./_base/kernel ./_base/array ./aspect ./_base/fx ./dom ./dom-style ./dom-geometry ./ready require".split(" "),
function(p,n,m,h,g,f,b,e,k,d,c){m.isAsync||d(0,function(){c(["./fx/Toggler"])});m=m.fx={};d={_fire:function(a,c){this[a]&&this[a].apply(this,c||[]);return this}};var a=function(a){this._index=-1;this._animations=a||[];this._current=this._onAnimateCtx=this._onEndCtx=null;this.duration=0;h.forEach(this._animations,function(a){this.duration+=a.duration;a.delay&&(this.duration+=a.delay)},this)};a.prototype=new n;p.extend(a,{_onAnimate:function(){this._fire("onAnimate",arguments)},_onEnd:function(){this._onAnimateCtx.remove();
this._onEndCtx.remove();this._onAnimateCtx=this._onEndCtx=null;this._index+1==this._animations.length?this._fire("onEnd"):(this._current=this._animations[++this._index],this._onAnimateCtx=g.after(this._current,"onAnimate",p.hitch(this,"_onAnimate"),!0),this._onEndCtx=g.after(this._current,"onEnd",p.hitch(this,"_onEnd"),!0),this._current.play(0,!0))},play:function(a,c){this._current||(this._current=this._animations[this._index=0]);if(!c&&"playing"==this._current.status())return this;var d=g.after(this._current,
"beforeBegin",p.hitch(this,function(){this._fire("beforeBegin")}),!0),b=g.after(this._current,"onBegin",p.hitch(this,function(a){this._fire("onBegin",arguments)}),!0),e=g.after(this._current,"onPlay",p.hitch(this,function(a){this._fire("onPlay",arguments);d.remove();b.remove();e.remove()}));this._onAnimateCtx&&this._onAnimateCtx.remove();this._onAnimateCtx=g.after(this._current,"onAnimate",p.hitch(this,"_onAnimate"),!0);this._onEndCtx&&this._onEndCtx.remove();this._onEndCtx=g.after(this._current,
"onEnd",p.hitch(this,"_onEnd"),!0);this._current.play.apply(this._current,arguments);return this},pause:function(){if(this._current){var a=g.after(this._current,"onPause",p.hitch(this,function(c){this._fire("onPause",arguments);a.remove()}),!0);this._current.pause()}return this},gotoPercent:function(a,c){this.pause();var d=this.duration*a;this._current=null;h.some(this._animations,function(a){if(a.duration<=d)return this._current=a,!0;d-=a.duration;return!1});this._current&&this._current.gotoPercent(d/
this._current.duration,c);return this},stop:function(a){if(this._current){if(a){for(;this._index+1<this._animations.length;++this._index)this._animations[this._index].stop(!0);this._current=this._animations[this._index]}var c=g.after(this._current,"onStop",p.hitch(this,function(a){this._fire("onStop",arguments);c.remove()}),!0);this._current.stop()}return this},status:function(){return this._current?this._current.status():"stopped"},destroy:function(){this._onAnimateCtx&&this._onAnimateCtx.remove();
this._onEndCtx&&this._onEndCtx.remove()}});p.extend(a,d);m.chain=function(c){return new a(c)};var q=function(a){this._animations=a||[];this._connects=[];this.duration=this._finished=0;h.forEach(a,function(a){var c=a.duration;a.delay&&(c+=a.delay);this.duration<c&&(this.duration=c);this._connects.push(g.after(a,"onEnd",p.hitch(this,"_onEnd"),!0))},this);this._pseudoAnimation=new f.Animation({curve:[0,1],duration:this.duration});var c=this;h.forEach("beforeBegin onBegin onPlay onAnimate onPause onStop onEnd".split(" "),
function(a){c._connects.push(g.after(c._pseudoAnimation,a,function(){c._fire(a,arguments)},!0))})};p.extend(q,{_doAction:function(a,c){h.forEach(this._animations,function(d){d[a].apply(d,c)});return this},_onEnd:function(){++this._finished>this._animations.length&&this._fire("onEnd")},_call:function(a,c){var d=this._pseudoAnimation;d[a].apply(d,c)},play:function(a,c){this._finished=0;this._doAction("play",arguments);this._call("play",arguments);return this},pause:function(){this._doAction("pause",
arguments);this._call("pause",arguments);return this},gotoPercent:function(a,c){var d=this.duration*a;h.forEach(this._animations,function(a){a.gotoPercent(a.duration<d?1:d/a.duration,c)});this._call("gotoPercent",arguments);return this},stop:function(a){this._doAction("stop",arguments);this._call("stop",arguments);return this},status:function(){return this._pseudoAnimation.status()},destroy:function(){h.forEach(this._connects,function(a){a.remove()})}});p.extend(q,d);m.combine=function(a){return new q(a)};
m.wipeIn=function(a){var c=a.node=b.byId(a.node),d=c.style,k;a=f.animateProperty(p.mixin({properties:{height:{start:function(){k=d.overflow;d.overflow="hidden";if("hidden"==d.visibility||"none"==d.display)return d.height="1px",d.display="",d.visibility="",1;var a=e.get(c,"height");return Math.max(a,1)},end:function(){return c.scrollHeight}}}},a));var q=function(){d.height="auto";d.overflow=k};g.after(a,"onStop",q,!0);g.after(a,"onEnd",q,!0);return a};m.wipeOut=function(a){var c=(a.node=b.byId(a.node)).style,
d;a=f.animateProperty(p.mixin({properties:{height:{end:1}}},a));g.after(a,"beforeBegin",function(){d=c.overflow;c.overflow="hidden";c.display=""},!0);var e=function(){c.overflow=d;c.height="auto";c.display="none"};g.after(a,"onStop",e,!0);g.after(a,"onEnd",e,!0);return a};m.slideTo=function(a){var c=null,d=null,q=function(a){return function(){var b=e.getComputedStyle(a),f=b.position;c="absolute"==f?a.offsetTop:parseInt(b.top)||0;d="absolute"==f?a.offsetLeft:parseInt(b.left)||0;"absolute"!=f&&"relative"!=
f&&(b=k.position(a,!0),c=b.y,d=b.x,a.style.position="absolute",a.style.top=c+"px",a.style.left=d+"px")}}(a.node=b.byId(a.node));q();a=f.animateProperty(p.mixin({properties:{top:a.top||0,left:a.left||0}},a));g.after(a,"beforeBegin",q,!0);return a};return m})},"davinci/ve/palette/PaletteFolder":function(){define("dojo/_base/declare dijit/_WidgetBase dojo/dom-class dojo/fx davinci/Runtime davinci/ve/metadata".split(" "),function(p,n,m,h,g,f){return p("davinci.ve.palette.PaletteFolder",n,{icon:"",displayName:"",
paletteId:"",palette:null,preset:null,presetId:null,presetClassName:null,_type:"",_isOpen:!1,_openSubsection:null,buildRendering:function(){this.palette=dijit.byId(this.paletteId);var b=this.domNode=this.palette.folderTemplate.cloneNode(!0);this.presetClassName&&m.add(b,this.presetClassName);var e="PaletteFolder__"+this.presetId+"__"+this.section.id;this.subsection&&(e+="__"+this.subsection.id);dojo.attr(b,"selType",e);e=b.firstChild;dojo.attr(e,"tabIndex","0");e.onclick=this.palette.nop;e.firstChild.src=
this.iconBase64?this.iconBase64:this.icon;e.appendChild(dojo.doc.createTextNode(this.displayName));b._paletteFolder=this;this._type=this.subsections?"subsection_container":this.subsection?"subsection":"simple";"subsection"==this._type&&m.add(b,"PaletteFolderSubsection");this._children=[]},postCreate:function(){this.connect(this.domNode,"onmouseover","folderMouseOverHandler");this.connect(this.domNode,"onmouseout","folderMouseOutHandler");this.connect(this.domNode,"onclick","folderClickHandler")},
startup:function(){},isFocusable:function(){return!0},focus:function(){dijit.focus(this.domNode)},addChild:function(b){for(var e=this.palette.getChildren(),k=0,d=e.length;k<d;k++)if(e[k]==this)return this.palette.addChild(b,k+1),!0;return!1},_paletteItemGroupInfo:function(b,e){var k={},d=e,c=b[d],a=c._paletteItemGroup;do{c._paletteGroupSelected&&(k.selectedIndex=d);d++;if(d>=b.length)break;c=b[d]}while("davinci.ve.palette.PaletteItem"==c.declaredClass&&c._paletteItemGroup===a);"number"!=typeof k.selectedIndex&&
(k.selectedIndex=e,b[e]._paletteGroupSelected=!0);k.endIndex=d-1;return k},folderClickHandler:function(b){this.showHideFolderContents()},showHideFolderContents:function(b){for(var e=this.palette.getChildren(),k=0,d=e.length;k<d;){var c=e[k];if(c==this){"none"==this.domNode.style.display&&h.wipeIn({node:this.domNode,duration:100}).play();if("subsection_container"==this._type)for(this._isOpen="boolean"==typeof b?b:!this._isOpen,c=k+1;c<d;c++)if(k=e[c],"davinci.ve.palette.PaletteFolder"==k.declaredClass){if("subsection"!=
k._type)break;0==k._children.length?(k.domNode.style.display="none",k.isOpen=!1):this._isOpen?(h.wipeIn({node:k.id,duration:100}).play(),k._isOpen=k==k.subsection_container._openSubsection):(h.wipeOut({node:k.id,duration:100}).play(),k.isOpen=!1)}else this._isOpen&&k.PaletteFolderSubsection._isOpen?h.wipeIn({node:k.id,duration:100,onEnd:function(a){setTimeout(function(){a.style.height=""},1)}.bind(this,k.domNode)}).play():k.domNode.style.display="none";else for(this._isOpen="boolean"==typeof b?b:
!this._isOpen,"subsection"==this._type&&(this.subsection_container._openSubsection=this._isOpen?this:null),c=k+1;c<d;){k=e[c];if("davinci.ve.palette.PaletteItem"!=k.declaredClass)break;for(k=this._paletteItemGroupInfo(e,c);c<=k.endIndex;c++){var a=e[c],g=f.getWidgetDescriptorForType(a.type),m;g||(m=!0);if(g&&"custom"==g.category)m=!0;else if(g=g&&g.collection,m=!1,a.preset&&a.preset.collections)for(var r=a.preset.collections,n=0;n<r.length;n++){var y=r[n];if(y.id&&y.id===g){m=y.show;break}}c==k.selectedIndex&&
m?this._isOpen?h.wipeIn({node:a.id,duration:100,onEnd:function(a){setTimeout(function(){a.style.height=""},1)}.bind(this,a.domNode)}).play():h.wipeOut({node:a.id,duration:100}).play():a.domNode.style.display="none"}}k=c}else"davinci.ve.palette.PaletteItem"==c.declaredClass&&"none"!=c.domNode.style.display&&h.wipeOut({node:c.id,duration:100}).play(),"davinci.ve.palette.PaletteFolder"!=c.declaredClass||"simple"!=c._type&&"subsection"!=c._type||(c._isOpen=!1),"davinci.ve.palette.PaletteFolder"==c.declaredClass&&
"subsection_container"==c._type&&c!=this.subsection_container&&(c._isOpen=!1),"davinci.ve.palette.PaletteFolder"!=c.declaredClass||"subsection"!=c._type||c.subsection_container._isOpen||"none"==c.domNode.style.display||(h.wipeOut({node:c.id,duration:100}).play(),c._isOpen=!1),k++}return!1},folderMouseOverHandler:function(b){dojo.removeClass(this.domNode,"dojoyPaletteFolderLow");dojo.addClass(this.domNode,"dojoyPaletteFolderHi")},folderMouseOutHandler:function(b){dojo.removeClass(this.domNode,"dojoyPaletteFolderHi");
dojo.addClass(this.domNode,"dojoyPaletteFolderLow")}})})},"davinci/ve/palette/PaletteItem":function(){define("dojo/_base/declare dojo/on dojo/_base/event dojo/query dojo/dom-construct dojo/dom-geometry dijit/focus dijit/_WidgetBase dojo/dom-class dojox/html/entities dijit/popup dijit/Tooltip dijit/TooltipDialog davinci/ve/tools/CreateTool davinci/ui/dnd/DragManager davinci/ve/utils/GeomUtils davinci/ve/metadata davinci/_common".split(" "),function(p,n,m,h,g,f,b,e,k,d,c,a,q,w,r,B,y,x){return p("davinci.ve.palette.PaletteItem",
e,{icon:"",displayName:"",name:"",paletteId:"",type:"",data:null,tool:"",palette:null,category:"",template:'\x3ca href\x3d"javascript:void(0)"\x3e\x3cspan class\x3d"paletteItemSelectionContainer"\x3e\x3c/span\x3e\x3cspan class\x3d"paletteItemNormalContainer"\x3e\x3cspan class\x3d"paletteItemImageContainer"\x3e\x3cimg class\x3d"paletteItemImage" border\x3d"0"/\x3e\x3c/span\x3e\x3cspan class\x3d"paletteItemLabelContainer"\x3e\x3cspan class\x3d"paletteItemLabel"\x3e\x3c/span\x3e\x3c/span\x3e\x3c/span\x3e\x3c/a\x3e',
selectedWidgetTemplate:'\x3cspan class\x3d"paletteItemSelectionContent"\x3e\x3cspan class\x3d"paletteItemSelectedStrip paletteItemSelectedStripV paletteItemSelectedStripL"\x3e\x3c/span\x3e\x3cspan class\x3d"paletteItemSelectedStrip paletteItemSelectedStripV paletteItemSelectedStripR"\x3e\x3c/span\x3e\x3cspan class\x3d"paletteItemSelectedStrip paletteItemSelectedStripH paletteItemSelectedStripT"\x3e\x3c/span\x3e\x3cspan class\x3d"paletteItemSelectedStrip paletteItemSelectedStripH paletteItemSelectedStripB"\x3e\x3c/span\x3e\x3cspan class\x3d"paletteItemSelectedIcon paletteItemSelectedMoreIcon" title\x3d"'+
x.MoreIconTitleString+'"\x3e\x3c/span\x3e\x3cspan class\x3d"paletteItemSelectedIcon paletteItemSelectedHelpIcon" title\x3d"'+x.HelpIconTitleString+'"\x3e\x3c/span\x3e\x3c/span\x3e',preset:null,presetId:null,presetClassName:null,_paletteItemGroup:null,_collectionName:null,_paletteItemMoreConnects:[],_paletteItemHelpConnects:[],item:null,constructor:function(a){this.item=a},buildRendering:function(){this.palette=dijit.byId(this.paletteId);var a=this.domNode=dojo.create("div",{className:"dojoyPaletteCommon dojoyPaletteItem"});
a.innerHTML=this.template;a._paletteItem=this;this.presetClassName&&k.add(a,this.presetClassName);var c=this.type+"__"+this.presetId+"__"+this.PaletteFolderSection.section.id;this.PaletteFolderSubsection&&(c+="__"+this.PaletteFolderSubsection.subsection.id);dojo.attr(a,"selType",c);a=a.firstChild;dojo.attr(a,"tabIndex","0");a.onclick=this.palette.nop;c=a.querySelector("img");this.item&&this.item.iconHTML?(dojo.destroy(c),a.querySelector(".paletteItemImageContainer").innerHTML=this.item.iconHTML):
c.src=this.icon;a=a.querySelector(".paletteItemLabel");a.appendChild(dojo.doc.createTextNode(this.displayName));for(var c=d.encode(a.textContent),b=c.length-1;0<b;b--)0<="_-".indexOf(c[b])?(c=c.substr(0,b+1)+"\x26#8203;"+c.substr(b+1),a.innerHTML=c):c[b].toLowerCase()!=c[b]&&(c=c.substr(0,b)+"\x26#8203;"+c.substr(b),a.innerHTML=c);this.domNode.componentClassName=this.name;dojo.setSelectable(this.domNode,!1)},postCreate:function(){var a=h(".paletteItemNormalContainer",this.domNode)[0];this.connect(a,
"onmouseover","itemMouseOverHandler");this.connect(a,"onmouseout","itemMouseOutHandler");this.connect(this.domNode,"onmousedown","itemMouseDownHandler");this.connect(this.domNode,"onmouseup","itemMouseUpHandler");this.connect(this.domNode,"onkeydown","itemKeyDownHandler")},startup:function(){},isFocusable:function(){return"none"!=dojo.style(this.domNode,"display")},focus:function(){dijit.focus(this.domNode)},itemMouseOverHandler:function(a){this._mouseover=!0;a=this.domNode;this.palette.selectedItem!=
this&&this.raised(a);setTimeout(function(){if(this._mouseover&&0==this.palette.moreItems.length&&0==this.palette.helpItems.length&&this._tooltipNode!=this.domNode){this._tooltipNode&&dijit.hideTooltip(this._tooltipPos);this._tooltipNode=this.domNode;this._tooltipPos=f.position(this.domNode,!0);var a;a='\x3cdiv class\x3d"paletteTooltip"\x3e'+('\x3cdiv class\x3d"paletteTooltipCurrent"\x3e\x3cspan class\x3d"paletteTooltipCurrentWidget"\x3e'+d.encode(this.displayName)+'\x3c/span\x3e \x3cspan class\x3d"paletteTooltipCurrentLibrary"\x3e('+
this._collectionName+")\x3c/span\x3e\x3c/div\x3e");var c=this.palette.getPaletteItemsSameGroup(this);if(1<c.length){a+='\x3cdiv class\x3d"paletteTooltipAlternates"\x3e\x3cspan class\x3d"paletteTooltipAlternatesLabel"\x3e'+x.alternates+': \x3c/span\x3e\x3cspan class\x3d"paletteTooltipAlternatesLibraries"\x3e';for(var b=!1,e=0;e<c.length;e++){var k=c[e];k!=this&&(b&&(a+=", "),a+=k._collectionName,b=!0)}a=a+"\x3c/div\x3e"+('\x3cdiv class\x3d"paletteTooltipNote"\x3e'+x.howToChooseAlternate+"\x3c/div\x3e");
a+="\x3c/div\x3e"}dijit.showTooltip(a,this._tooltipPos);setTimeout(function(){dijit.hideTooltip(this._tooltipPos);this._tooltipPos=this._tooltipNode=null}.bind(this),5E3)}}.bind(this),750)},itemMouseOutHandler:function(a){this._mouseover=!1;this._tooltipPos&&(dijit.hideTooltip(this._tooltipPos),this._tooltipPos=this._tooltipNode=null);a=this.domNode;this.palette.selectedItem==this?this.sunken(a):this.flat(a)},itemMouseDownHandler:function(a){a=this.domNode;this.focus();this.sunken(a);this.palette.selectedItem&&
this.palette.selectedItem!=this&&(this.palette.removeSelectionAll(),this.flat(this.palette.selectedItem.domNode),this.palette.selectedItem=null);r.document=this.palette._context.getDocument();if(a=this.palette._context.frameNode){a=dojo.coords(a);var c=this.palette._context.getContainerNode();r.documentX=a.x-B.getScrollLeft(c);r.documentY=a.y-B.getScrollTop(c)}y.getHelper(this.type,"helper")},itemMouseUpHandler:function(a){a=this.domNode;if(this.palette.selectedItem==this)this.palette.removeSelectionAll(),
this.palette.selectedItem.flat(this.palette.selectedItem.domNode),this.palette.selectedItem=null,this.palette.sunkenItem=null,this.palette.flattenAll(),this.palette._context.setActiveTool(null),b.curNode&&b.curNode==a&&b.curNode.blur&&b.curNode.blur();else{this.palette.selectedItem&&this.palette.selectedItem!=this&&(this.palette.removeSelectionAll(),this.flat(this.palette.selectedItem.domNode),this.palette.selectedItem=null);this.palette.selectedItem=this;this.sunken(a);y.getHelper(this.type,"tool").then(function(a){a=
new (a||w)(dojo.clone(this.data),this.userData);this.palette._context.setActiveTool(a)}.bind(this));var c=function(){this.palette._contextMouseUpHandler&&(this.disconnect(this.palette._contextMouseUpHandler),this.palette._contextMouseUpHandler=null);this.palette._docMouseUpHandler&&(dojo.disconnect(this.palette._docMouseUpHandler),this.palette._docMouseUpHandler=null);this.palette.removeSelectionAll();this.palette.selectedItem=null;this.flat(this.domNode);this.palette._context.dragMoveCleanup()}.bind(this);
this.palette._contextMouseUpHandler=this.connect(this.palette._context,"onMouseUp",function(a){c()}.bind(this));setTimeout(function(){this.palette._docMouseUpHandler=dojo.connect(document,"onmouseup",function(a){var d=!1;if(this.palette.selectedItem){var b=this.palette.selectedItem.domNode;for(a=a.target;a&&"BODY"!=a.tagName;){if(a==b){d=!0;break}a=a.parentNode}}this.palette.selectedItem&&!d&&(c(),this.palette._context.setActiveTool(null))}.bind(this))}.bind(this),0)}},itemKeyDownHandler:function(a){a.keyCode==
dojo.keys.ENTER&&(this.palette.selectedItem&&(this.flat(this.palette.selectedItem.domNode),this.palette.selectedItem=null),y.getHelper(this.type,"tool").then(function(a){a=new (a||w)(dojo.clone(this.data));var c=this.palette._context;c.setActiveTool(a);a.create({target:c.getSelection()[0],position:{x:50,y:50}});c.setActiveTool(null);c.getContainerNode().focus()}),y.getHelper(this.type,"helper"))},flat:function(a){a&&(dojo.removeClass(a,"dojoyPaletteItemRaised"),dojo.removeClass(a,"dojoyPaletteItemSunken"),
dojo.addClass(a,"dojoyPaletteItemFlat"))},raised:function(a){dojo.removeClass(a,"dojoyPaletteItemFlat");dojo.removeClass(a,"dojoyPaletteItemSunken");dojo.addClass(a,"dojoyPaletteItemRaised");this.palette.raisedItems.push(this)},sunken:function(a){dojo.removeClass(a,"dojoyPaletteItemFlat");dojo.removeClass(a,"dojoyPaletteItemRaised");dojo.addClass(a,"dojoyPaletteItemSunken");this.palette.sunkenItems.push(this);this._selectionShowing=!0;h(".paletteItemSelectionContainer",this.domNode)[0].innerHTML=
this.selectedWidgetTemplate;var d=h(".paletteItemSelectedMoreIcon",a)[0],b=this.palette.getPaletteItemsSameGroup(this);1<b.length?(d.style.display="inline-block",n(d,"mousedown, mouseup",function(a){m.stop(a)}),n(d,"click",function(a){m.stop(a);this._tooltipNode&&(dijit.hideTooltip(this._tooltipPos),this._tooltipPos=this._tooltipNode=null);if(this._moreShowing)this.paletteItemMoreCloseCleanup();else{a=g.create("div",{className:"paletteItemMoreContent"});var e=g.create("span",{className:"paletteItemMoreCloseBox"},
a);g.create("div",{className:"paletteItemAlternatesLabel",innerHTML:x.alternateWidgets},a);this._paletteItemMoreConnects.push(n(e,"mousedown, mouseup",function(a){m.stop(a)}.bind(this)));this._paletteItemMoreConnects.push(n(e,"click",function(a){m.stop(a);this.paletteItemMoreCloseCleanup()}.bind(this)));for(var e=g.create("div",{className:"paletteItemAlternatesContainer"},a),k=[],f=0;f<b.length;f++){var h=b[f],r=h._collectionName,h=g.create("button",{className:"paletteItemAlternate "+(h._paletteGroupSelected?
"paletteItemMoreSelected":"paletteItemMoreUnselected"),innerHTML:r},e);k.push(h);this._paletteItemMoreConnects.push(n(h,"mousedown, mouseup",function(a){m.stop(a)}.bind(this)));this._paletteItemMoreConnects.push(n(h,"click",function(a,c){m.stop(c);for(var d,e=0;e<b.length;e++){var k=b[e];if(k._collectionName==a){d=k;break}}if(d){for(e=0;e<b.length;e++)k=b[e],k==d?(k._paletteGroupSelected=!0,k.domNode.style.display=this.palette._displayShowValue):(k._paletteGroupSelected=!1,k.domNode.style.display=
"none");d.sunken(d.domNode);y.getHelper(d.type,"tool").then(function(a){a=new (a||w)(dojo.clone(this.data));this.palette._context.setActiveTool(a)}.bind(d))}this.paletteItemMoreCloseCleanup()}.bind(this,r)))}this._tooltipDialog=new q({className:"paletteItemMorePopup",style:"width: auto; ",content:a,onShow:function(a){if(a=this._tooltipDialog.domNode.parentNode){var c=parseFloat(a.style.top);isNaN(c)||(a.style.top=c+12+"px")}}.bind(this)});c.open({popup:this._tooltipDialog,around:d,orient:["above-centered"]});
this._moreShowing=!0;this.palette.moreItems.push(this)}}.bind(this))):d.style.display="none";var e=h(".paletteItemSelectedHelpIcon",a)[0];n(e,"mousedown, mouseup",function(a){m.stop(a)}.bind(this));n(e,"click",function(a){m.stop(a);this._tooltipNode&&(dijit.hideTooltip(this._tooltipPos),this._tooltipPos=this._tooltipNode=null);if(this._helpShowing)this.paletteItemHelpCloseCleanup();else{var d=y.getOamDescriptivePropertyForType(this.type,"title"),b=y.getOamDescriptivePropertyForType(this.type,"description");
a=g.create("div",{className:"helpInnerContent"});var k=g.create("div",{className:"paletteTooltipCurrent"},a);g.create("span",{className:"paletteTooltipCurrentWidget"},k).textContent=this.name;this._collectionName&&g.create("span",{className:"paletteTooltipCurrentLibrary",innerHTML:" ("+this._collectionName+")"},k);k={container:"helpInnerContentSummary",title:"helpInnerContentSummaryTitle",content:"helpInnerContentSummaryContent"};this._createHelpSection(d,a,x.summary,k);this._createHelpSection(b,
a,x.description,k);d=g.create("div",{className:"paletteItemHelpContent"});b=g.create("span",{className:"paletteItemHelpCloseBox"},d);g.create("div",{className:"paletteItemHelpDescription"},d).appendChild(a);this._paletteItemHelpConnects.push(n(b,"mousedown, mouseup",function(a){m.stop(a)}.bind(this)));this._paletteItemHelpConnects.push(n(b,"click",function(a){m.stop(a);this.paletteItemHelpCloseCleanup()}.bind(this)));this._tooltipDialog=new q({className:"paletteItemHelpPopup",style:"width: auto; ",
content:d,onShow:function(a){if(a=this._tooltipDialog.domNode.parentNode){var c=parseFloat(a.style.top);isNaN(c)||(a.style.top=c-12+"px")}}.bind(this)});c.open({popup:this._tooltipDialog,around:e,orient:["below-centered"]});this._helpShowing=!0;this.palette.helpItems.push(this)}}.bind(this))},_createHelpSection:function(a,c,d,b){a&&a.value&&(c=g.create("div",{className:b.container},c),g.create("div",{className:b.title,innerHTML:d},c),d=g.create("div",{className:b.content},c),"text/html"==a.type?d.innerHTML=
a.value:d.textContent=a.value)},paletteItemMoreCloseCleanup:function(){if(this._moreShowing){for(var a=0;a<this._paletteItemMoreConnects.length;a++)this._paletteItemMoreConnects[a].remove();this._paletteItemMoreConnects=[];this._moreShowing=!1;index=this.palette.moreItems.indexOf(this);0<=index&&this.palette.moreItems.splice(index,1)}this._tooltipDialog&&(c.close(this._tooltipDialog),this._tooltipDialog.destroyRecursive(),this._tooltipDialog=null)},paletteItemHelpCloseCleanup:function(){if(this._helpShowing){for(var a=
0;a<this._paletteItemHelpConnects.length;a++)this._paletteItemHelpConnects[a].remove();this._paletteItemHelpConnects=[];this._helpShowing=!1;index=this.palette.helpItems.indexOf(this);0<=index&&this.palette.helpItems.splice(index,1)}this._tooltipDialog&&(c.close(this._tooltipDialog),this._tooltipDialog.destroyRecursive(),this._tooltipDialog=null)},updateImgSrc:function(a){this.domNode.querySelector(".paletteItemImage").src=a}})})},"davinci/ve/tools/CreateTool":function(){define("dojo/_base/declare dojo/dom-style ../tools/_Tool davinci/Workbench davinci/workbench/Preferences ../metadata ../widget dojo/Deferred dojo/promise/all davinci/ve/States davinci/commands/CompoundCommand ../commands/AddCommand ../commands/MoveCommand ../commands/ResizeCommand ../commands/StyleCommand".split(" "),
function(p,n,m,h,g,f,b,e,k,d,c,a,q,w,r){return p("davinci.ve.tools.CreateTool",m,{constructor:function(a,c){this._data=a;this._userData=c;if(a&&a.type){var d=f.queryDescriptor(a.type,"resizableOnCreate")||f.queryDescriptor(a.type,"resizable");"none"!==d&&(this._resizable=d);this._dropCursor=f.queryDescriptor(a.type,"dropCursor")}this._requireHelpers(a)},activate:function(a){(this._context=a)&&a.rootNode&&(this._oldCursor=a.rootNode.style.cursor);a.rootNode.style.cursor="crosshair"},deactivate:function(){this._context&&
this._context.rootNode&&(this._context.rootNode.style.cursor=this._oldCursor);this._setTarget(null);delete this._mdPosition;this._context.dragMoveCleanup()},_getContentPosition:function(a){if(a)return a.target&&(a={x:a.pageX,y:a.pageY}),a},onMouseDown:function(a){this._target=b.getEnclosingWidget(a.target);this._mdPosition=this._getContentPosition(a);this._dragRect=null},onMouseMove:function(a){var c=this._context,d=c._chooseParent;a.target!=this._lastEventTarget&&d.setProposedParentWidget(null);
this._lastEventTarget=a.target;if(this._mdPosition){if(this._resizable){c.deselect();var b=this._getContentPosition(a),e,k,f=!0,q=!0;b.x>=this._mdPosition.x?(d=this._mdPosition.x,k=b.x-this._mdPosition.x):(d=b.x,k=this._mdPosition.x-b.x,f=!1);b.y>=this._mdPosition.y?(e=this._mdPosition.y,b=b.y-this._mdPosition.y):(e=b.y,b=this._mdPosition.y-b.y,q=!1);a.shiftKey&&(k>=b?(b=k,q||(e=this._mdPosition.y-b)):(k=b,f||(d=this._mdPosition.x-k)));this._dragSizeRect||(a=c.getDocument().body,this._dragSizeRect=
dojo.create("div",{style:"border:1px dashed black;z-index:1000001;position:absolute;"},a));a=this._dragSizeRect.style;a.left=d+"px";a.top=e+"px";a.width=k+"px";a.height=b+"px"}}else d=!this.createWithFlowLayout(),this._setTarget(a.target,a),e=c.getPreference("showPossibleParents"),e=!e&&this._spaceKeyDown||e&&!this._spaceKeyDown,k={x:a.pageX,y:a.pageY},b={l:a.pageX,t:a.pageY,w:0,h:0},f=g.getPreferences("davinci.ve.editorPrefs",h.getProject()).snap&&d,q=!d,"object"==typeof this._dropCursor&&!1===this._dropCursor.show&&
(q=!1),c.dragMoveUpdate({data:this._data,position:k,absolute:d,currentParent:null,eventTarget:a.target,rect:b,doSnapLinesX:f,doSnapLinesY:f,doFindParentsXY:e,doCursor:q,beforeAfter:this._dropCursor&&this._dropCursor.beforeAfter})},onMouseUp:function(a){var c=this._context,d=c._chooseParent,e=!this.createWithFlowLayout();this._dragSizeRect&&(this._dragSizeRect.parentNode.removeChild(this._dragSizeRect),this._dragSizeRect=null);var k=c.getActiveDragDiv();k&&(k=dojo.query(".maqCandidateParents",k),1==
k.length&&(k[0].innerHTML=""));this._lastEventTarget=null;var g,q,m,w,k=this._getContentPosition(a);if(this._mdPosition){var r=!0,n=!0;this._position=dojo.mixin({},this._mdPosition);k.x<this._mdPosition.x&&(this._position.x=k.x);"height"==this._resizable?m=0:0<=k.x-this._mdPosition.x?m=k.x-this._mdPosition.x:(m=this._mdPosition.x-k.x,r=!1);k.y<this._mdPosition.y&&(this._position.y=k.y);"width"==this._resizable?w=0:0<=k.y-this._mdPosition.y?w=k.y-this._mdPosition.y:(w=this._mdPosition.y-k.y,n=!1);
a.shiftKey&&(m>=w?(w=m,n||(t=this._mdPosition.y-w)):(m=w,r||(l=this._mdPosition.x-m)))}else this._position=k;this._resizable&&this._position&&(4<m||4<w)&&(g={w:0<m?m:void 0,h:0<w?w:void 0});if(m=d.getProposedParentWidget()){if(q=m.parent,m.refChild){var p=m.parent.getChildren().indexOf(m.refChild);0<=p?m.refAfter&&p++:p=null}}else{a=this._getTarget()||b.getEnclosingWidget(a.target);var F=this._data;m=d.getAllowedTargetWidget(a,F,!0,{absolute:e});var N=dojo.isArray(F)?F[0].type:F.type,L=b.getWidgetHelper(N);
1<m.length&&L&&L.chooseParent?q=L.chooseParent(m):0<m.length&&(q=0<=m.indexOf(a)?a:m[0])}d.setProposedParentWidget(null);d=function(a){this.prototype=Error.prototype;this.name="InvalidTargetWidgetError";this.message=a?a:"The selected target is not a valid parent for the given widget."};try{F=this._data instanceof Array?this._data:[this._data];if(!q){var J=F.map(function(a){return a.type}).join(", "),E=F.map(function(a){var c=f.getAllowedParent(a.type);a=a.type;var d=f.queryDescriptor(a,"class");a=
d?d.split(/\s+/).push(a):[a];return{allowedParent:c,classList:a}});g="The selected target is not a valid parent for the given widget.";1===E.length&&E[0].allowedParent&&(g+=['The widget \x3cspan style\x3d"font-family: monospace"\x3e',J,"\x3c/span\x3e requires ",1<E[0].allowedParent.length?"one of the following parent types":"the parent type",' \x3cspan style\x3d"font-family: monospace"\x3e',E[0].allowedParent.join(", "),"\x3c/span\x3e."].join(""),N=F[0].type,(L=b.getWidgetHelper(N))&&L.isAllowedError&&
(g=L.isAllowedError({errorMsg:g,type:N,allowedParent:E[0].allowedParent,absolute:e})));debugger;throw new d(g);}for(e=0;e<F.length;e++){var K=F[e].type,M=f.getLibraryForType(K),P=M.name,N=[K,c];c._widgets.hasOwnProperty(P)||(c._widgets[P]=0);1==++c._widgets[P]&&f.invokeCallback(M,"onFirstAdd",N);f.invokeCallback(M,"onAdd",N)}this.create({target:q,index:p,directTarget:this._getTarget(),size:g,userData:this._userData})}catch(R){var O,Q;R instanceof d?(O=R.message,Q="Invalid Target"):(O="The action was interrupted by an internal error.",
Q="Error",console.error(R));h.showMessage(Q,O)}finally{this.exitCreateToolOnMouseUp()&&c.setActiveTool(null),this._cleanupActions()}},_cleanupActions:function(){var a=this._context;a.dragMoveCleanup();a.inlineEditActive()||this._context.getDocument().defaultView.focus()},onKeyDown:function(a){dojo.stopEvent(a);var c=this._context;if(a.keyCode==dojo.keys.ESCAPE)c.setActiveTool(null),this._cleanupActions();else{var d=this._context.getPreference("showPossibleParents");a.keyCode==dojo.keys.SPACE?this._spaceKeyDown=
!0:this._processKeyDown(a.keyCode);a=!d&&this._spaceKeyDown||d&&!this._spaceKeyDown;var d=this._data,d=dojo.isArray(d)?d[0].type:d.type,c=c._chooseParent,b=!this.createWithFlowLayout(),e=!b;"object"==typeof this._dropCursor&&!1===this._dropCursor.show&&(e=!1);c.dragUpdateCandidateParents({widgetType:d,showCandidateParents:a,absolute:b,doCursor:e,beforeAfter:this._dropCursor&&this._dropCursor.beforeAfter,currentParent:null})}},_processKeyDown:function(a){if(49<=a&&57>=a){var c=this._context._chooseParent,
d=c.getProposedParentsList();d&&1<d.length&&(a=d.length-(a-48),0<=a&&c.setProposedParentWidget(d[a]))}},onKeyUp:function(a){a.keyCode==dojo.keys.SPACE&&(this._spaceKeyDown=!1);dojo.stopEvent(a);a=this._context.getPreference("showPossibleParents");a=!a&&this._spaceKeyDown||a&&!this._spaceKeyDown;var c=this._data,c=dojo.isArray(c)?c[0].type:c.type,d=this._context._chooseParent,b=!this.createWithFlowLayout(),e=!b;"object"==typeof this._dropCursor&&!1===this._dropCursor.show&&(e=!1);d.dragUpdateCandidateParents({widgetType:c,
showCandidateParents:a,absolute:b,doCursor:e,beforeAfter:this._dropCursor&&this._dropCursor.beforeAfter,currentParent:null})},_requireHelpers:function(a){var c=[];if(!a||!a.type)return a instanceof Array&&a.forEach(function(a){c.concat(this._requireHelpers(a))},this),c;c.push(b.requireWidgetHelper(a.type));a.children&&!dojo.isString(a.children)&&dojo.every(a.children,function(a){return c.concat(this._requireHelpers(a))},this);return c},create:function(a){if(a&&this._data){for(var c=a.target,d,b;c&&
!(d=c.getContainerNode());)b=c,c=c.getParent();var e=a.index,f;d=!1;this._data.properties&&this._data.properties.style&&0<this._data.properties.style.indexOf("absolute")&&(d=!0);!d&&this.createWithFlowLayout()?b&&(e=c.indexOf(b)):a.position?f=a.position:this._position&&(f=this._position);this._data.context=this._context;k(this._requireHelpers(this._data)).then(function(){this._create({parent:c,index:e,position:f,size:a.size,userData:this._userData})}.bind(this))}},_create:function(d){var f=this._context,
g=[],h=new e;if(!this._loadType(this._data,g))return h.reject(),h;k(g).then(function(){var e;this.createNewWidget()?dojo.withDoc(this._context.getDocument(),function(){e=b.createWidget(this._data,this._userData,d.parent)},this):e=this._widget;e||h.reject(Error("Failed to create widget"));var k=new c;if(this.createNewWidget()){d.size=this._getInitialSize(e,d);k.add(new a(e,d.parent||this._context.getContainerNode(),d.index));var g=!0;e&&e.properties&&1==e.properties.ignorePosition&&(g=!1);e&&e.metadata&&
1==e.metadata.ignorePosition&&(g=!1);d.position&&g&&(g=f.getPreference("absoluteWidgetsZindex"),"xblox/RunScript"!==e.type&&"xblox/CSSState"!==e.type&&(k.add(new r(e,[{position:"absolute"},{"z-index":g}])),k.add(new q(e,d.position.x,d.position.y))));if(d.size){var g=d.size.w,m=d.size.h;if(null!==g&&null!==m){k.add(new w(e,g,m));var n=b.getWidgetHelper(e.type);if(n&&n.onCreateResize)n.onCreateResize(k,e,g,m)}}this.checkAddToCurrentState(k,e)}g=e.id;this.addToCommandStack&&this.addToCommandStack(k,
{widget:e});k.isEmpty()||this._context.getCommandStack().execute(k);e.isLayoutContainer&&e.resize();e=b.byId(g);this._select(e);this._widget=e;h.resolve(e);this.mouseUpProcessingCompleted()}.bind(this));return h},_loadType:function(a,c){if(!a||!a.type)return!1;c.push(this._context.loadRequires(a.type,!0));a.children&&!dojo.isString(a.children)&&dojo.forEach(a.children,function(a){this._loadType(a,c)}.bind(this));return!0},_getInitialSize:function(a,c){var d=c.size,b=a.getHelper();b&&b.initialSize&&
(b=b.initialSize(c))&&(d=b);!d&&(b=f.queryDescriptor(a.type,"initialSize"))&&(c&&!c.position?(d=c.parent,"html.body"==d.type?d="auto"==b||"auto"==b.flow?{w:"100%",h:"auto"}:this._getExplicitFlowSizeFromMetadata(b):this._isTypeContainer(d.type)?"auto"==b||"auto"==b.flow?(d=d.getData().children,d={w:"100%",h:d&&d.length?"auto":"100%"}):d=this._getExplicitFlowSizeFromMetadata(b):d=this._getExplicitFlowSizeFromMetadata(b)):d="auto"==b||"auto"==b.absolute?{w:"300px",h:"300px"}:this._getExplicitAbsoluteSizeFromMetadata(b));
return d},_getExplicitFlowSizeFromMetadata:function(a){var c=null;return c=a.flow?{w:a.flow.width?a.flow.width:"100%",h:a.flow.height?a.flow.height:"auto"}:{w:a.width?a.width:"100%",h:a.height?a.height:"auto"}},_getExplicitAbsoluteSizeFromMetadata:function(a){var c=null;return c=a.absolute?{w:a.absolute.width?a.absolute.width:"300px",h:a.absolute.height?a.absolute.height:"300px"}:{w:a.width?a.width:"300px",h:a.height?a.height:"300px"}},_isTypeContainer:function(a){return a&&("dijit/layout/ContentPane"==
a||"html.div"==a||"html.form"==a||"html.fieldset"==a)},_select:function(a){if(a)if(a.type){var c=f.getSmartInput(a.type);c&&c.then?c.then(function(c){!this._data.fileDragCreate&&c&&c.displayOnCreate?(a.inLineEdit_displayOnCreate=c.displayOnCreate,this._context.select(a,null,!0)):this._context.select(a)}.bind(this)):(console.error("create tool failed::_select smart input is null"),this._context.select(a))}else console.error("create tool failed::_select w.type is null");else console.error("create tool failed::_select w is null")},
createWithFlowLayout:function(){return f.queryDescriptor(this._data.type,"forceAbsolute")?!1:this._context.getFlowLayout()},createNewWidget:function(){return!0},exitCreateToolOnMouseUp:function(){return!0},mouseUpProcessingCompleted:function(){},checkAddToCurrentState:function(a,c){var b=d.getFocus(c._edit_context.rootNode);if(b&&b.stateContainerNode){var b=d.getState(b.stateContainerNode),e=g.getPreferences("davinci.ve.editorPrefs",h.getProject());b&&e.newWidgetsCurrentState&&(e=n.get(c.domNode,
"display"),a.add(new r(c,[{display:"none"}])),a.add(new r(c,[{display:e}],b)))}}})})},"davinci/ve/tools/_Tool":function(){define(["dojo/_base/declare","davinci/ve/widget","davinci/ve/metadata","davinci/ve/utils/GeomUtils"],function(p,n,m,h){return p("davinci.ve.tools._Tool",null,{_getTarget:function(){return this._target},_setTarget:function(g,f){this._targetOverlays||(this._targetOverlays=[]);if(!this._matchesTargetOverlay(g)){for(var b=this._context.getContainerNode(),e;g&&g!=b;)if((e=n.getEnclosingWidget(g))&&
!e.getContext())g=e.domNode.parentNode,e=null;else{e&&davinci.ve.metadata.queryDescriptor(e.type,"enablePointerEvents")?e=null:e&&e.getContainerNode()&&(davinci.ve.metadata.queryDescriptor(e.type,"isControl")||(e=null));break}e?(this._target=e,this._updateTargetOverlays(f),this._insertTargetOverlays()):(this._removeTargetOverlays(),this._target=null)}},_updateTargetOverlays:function(g){this._removeTargetOverlays();if(this._target){var f=this._target.domNode,b=this._getMaxZIndex(f);if(this._targetOverlays){var e=
this._target.getHelper();if(e&&e.getTargetOverlays&&(e=e.getTargetOverlays(this._target))&&0<e.length){dojo.forEach(e,function(a){a=this._getNewTargetOverlay(a,a.x,a.y,a.width,a.height,b);this._targetOverlays.push(a)},this);return}var e=f.offsetLeft,k=f.offsetTop,d=f.offsetWidth,c=f.offsetHeight;if(g){var a,q=h.getBorderBoxPageCoordsCached(f);g.pageX<q.l&&(a=q.l-g.pageX,e-=a,d+=a);g.pageY<q.t&&(a=q.t-g.pageY,k-=a,c+=a);g.pageX>q.l+q.w&&(a=g.pageX-(q.l+q.w),d+=a);g.pageY>q.t+q.h&&(a=g.pageY-(q.t+q.h),
c+=a)}g=this._getNewTargetOverlay(f,e,k,d,c,b);this._targetOverlays.push(g)}}},_getMaxZIndex:function(g){var f=dojo.style(g,"zIndex");dojo.query("*",g).forEach(function(b){b=dojo.style(b,"zIndex");var e=Number(b),k=Number(f);isNaN(e)||(isNaN(k)?f=b:e>k&&(f=b))});return f},_getNewTargetOverlay:function(g,f,b,e,k,d){return this._context.getDojo().create("div",{className:"editFeedback",style:{position:"absolute",opacity:.1,left:f+"px",top:b+"px",width:e+"px",height:k+"px",zIndex:d}})},_insertTargetOverlays:function(){if(this._targetOverlays&&
this._target){var g=this._target.domNode,f=g.parentNode;dojo.forEach(this._targetOverlays,function(b){f.insertBefore(b,g.nextSibling)},this)}},_removeTargetOverlays:function(){if(this._targetOverlays&&this._target)for(var g=this._targetOverlays.length-1;0<=g;g--)dojo.destroy(this._targetOverlays[g]),this._targetOverlays.pop()},_matchesTargetOverlay:function(g){return dojo.some(this._targetOverlays,function(f){return g==f},this)}})})},"davinci/commands/CompoundCommand":function(){define(["dojo/_base/declare"],
function(p){return p("davinci.commands.CompoundCommand",null,{name:"compound",_commands:[],constructor:function(n){this._commands=[];n&&(this._commands=[n])},add:function(n){if(n)if(this._commands)if("compound"==n.name)dojo.forEach(n._commands,function(f){this.add(f)},this);else{if("modify"==n.name)for(var m=n._oldId,h=0;h<this._commands.length;h++){var g=this._commands[h];if("modify"==g.name&&g._oldId==m){g.add(n);return}}this._commands.push(n)}else this._commands="compound"==n.name?n._commands:
[n]},setContext:function(n){for(var m=0;m<this._commands.length;m++)this._commands[m].setContext&&this._commands[m].setContext(n)},isEmpty:function(){return!this._commands||0===this._commands.length},execute:function(){if(this._commands)for(var n=0;n<this._commands.length;n++)this._commands[n].execute(),this._commands[n]._oldId&&this._commands[n]._newId&&(this._oldId=this._commands[n]._oldId,this._newId=this._commands[n]._newId)},undo:function(){if(this._commands)for(var n=this._commands.length-1;0<=
n;n--)this._commands[n].undo()}})})},"davinci/ve/commands/AddCommand":function(){define("dojo/_base/declare davinci/ve/commands/_hierarchyCommand davinci/ve/widget davinci/ve/utils/ImageUtils davinci/ve/States davinci/ve/commands/ModifyCommand".split(" "),function(p,n,m,h,g,f){return p("davinci.ve.commands.AddCommand",[n],{name:"add",constructor:function(b,e,k){b&&(b.domNode?this._id=b.id:this._data=b);this._parentId=e.id;this._index=k},execute:function(){var b=m.byId(this._parentId);if(b){var e=
b.getContext(),k=void 0;this._data?(this._id&&this._data.properties&&(this._data.properties.id=this._id),k=m.createWidget(this._data),this._id=k.id):this._id&&(k=m.byId(this._id,e));if(k){this._data=k.getData();this._data.properties.id=this._id;this._data.context=e;if(this._index&&"number"!=typeof this._index)if(this._index.domNode)this._index=b.indexOf(this._index);else{var d=m.byId(this._index.id,e);this._index=b.indexOf(d)}"IMG"===k.domNode.tagName&&h.ImageUpdateFocus(k,e);b.addChild(k,this._index);
e&&(e.attach(k),k.startup(),k.renderWidget(),e.widgetAddedOrDeleted(),e.widgetChanged(e.WIDGET_ADDED,k));(e=this._isRefreshOnDescendantChange(k))&&(new f(e,null,null,b._edit_context)).execute();g.resetState(k.domNode)}}},undo:function(){if(this._id&&this._parentId){var b=m.byId(this._id);if(b){var e=m.byId(this._parentId);if(e){var k=this._isRefreshOnDescendantChange(b),d=b.getContext();d&&(d.detach(b),d.deselect(b));e.removeChild(b);d.widgetChanged(d.WIDGET_REMOVED,b);b.destroyWidget();d&&d.widgetAddedOrDeleted();
k&&(new f(k,null,null,e._edit_context)).execute();g.resetState(b.domNode)}}}}})})},"davinci/ve/commands/_hierarchyCommand":function(){define(["dojo/_base/declare"],function(p){return p("davinci.ve.commands._hierarchyCommand",null,{_isRefreshOnDescendantChange:function(n){for(var m;n&&n.domNode&&"BODY"!=n.domNode.tagName;)(n=n.getParent())&&davinci.ve.metadata.queryDescriptor(n.type,"refreshOnDescendantChange")&&(m=n);return m}})})},"davinci/ve/utils/ImageUtils":function(){define([],function(){return{ImageUpdateFocus:function(p,
n){if(n&&p&&p.domNode&&"IMG"===p.domNode.tagName)var m=dojo.connect(p.domNode,"onload",function(){for(var h=n.getSelection(),g=0;g<h.length;g++)if(h[g]==p){n.updateFocus(p,g);break}dojo.disconnect(m)})}}})},"davinci/ve/commands/ModifyCommand":function(){define(["dojo/_base/declare","davinci/ve/commands/_hierarchyCommand","../widget","../utils/ImageUtils","../States"],function(p,n,m,h,g){return p("davinci.ve.commands.ModifyCommand",[n],{name:"modify",constructor:function(f,b,e,k,d){this._oldId=f?f.id:
void 0;this._properties=b=b||{};this._children=e||"string"==typeof e?e:b._children;this._context=k||f.getContext();this._scripts=d;delete this._properties._children},setContext:function(f){this._context=f},add:function(f){f&&f._oldId==this._oldId&&(f._properties&&dojo.mixin(this._properties,f._properties),f._children&&(this._children=f._children))},execute:function(){if(this._oldId&&this._properties){var f=m.byId(this._oldId),b=this._context;if(f){this._oldData=f.getData();this._oldData.context=b;
this._newData={type:this._oldData.type,properties:dojo.mixin({},this._oldData.properties,this._properties),children:this._children||"string"==typeof this._children?this._children:this._oldData.children,scripts:dojo.mixin({},this._oldData.scripts,this._scripts),maqAppStates:this._oldData.maqAppStates,maqDeltas:this._oldData.maqDeltas,context:b};for(var e in this._newData.properties)"$MAQ_MODIFYCOMMAND_DELETE_PROPERTY$"===this._newData.properties[e]&&delete this._newData.properties[e];if(this._doRefreshFromSource(f))f.setProperties(this._newData.properties,
!0),setTimeout(function(){b.visualEditor.refresh()},0);else{b&&b.detach(f);this._oldData.properties.isTempID&&!this._properties.id||delete this._newData.properties.isTempID;e=f.getParent();var k=null,d=e.indexOf(f);e.removeChild(f);f.destroyWidget();if(k=m.createWidget(this._newData)){"IMG"===k.domNode.tagName&&h.ImageUpdateFocus(k,b);e.addChild(k,d);this._newId=k.id;b&&(b.attach(k),k.startup(),k.renderWidget(),b.widgetAddedOrDeleted(),this._oldId!=this._newId&&b.widgetChanged(b.WIDGET_ID_CHANGED,
k,this._oldId),b.widgetChanged(b.WIDGET_MODIFIED,k));this.newWidget=k;dojo.publish("/davinci/ui/widget/replaced",[k,f]);g.resetState(k.domNode);var c;if(f=this._isRefreshParentOnPropChange(k))if("string"==typeof f)for(c=e;c&&c.domNode&&c.type!=f&&"BODY"!=c.domNode.tagName;){if(!c.domNode||"BODY"==c.domNode.tagName){c=null;break}c=c.getParent()}else c=e;(f=this._isRefreshOnDescendantChange(k))&&(c=f);c&&(new davinci.ve.commands.ModifyCommand(c,null,null,e._edit_context)).execute();dojo.publish("/davinci/ui/widgetPropertiesChanged",
[[k]])}}}}},_doRefreshFromSource:function(f){var b=this._properties,e,k,d=!1;for(e in b)if(b.hasOwnProperty(e)&&(k=f.metadata.property[e])&&k.refreshFromSource){d=!0;break}return d},_isRefreshParentOnPropChange:function(f){return davinci.ve.metadata.queryDescriptor(f.type,"refreshParentOnPropChange")},undo:function(){if(this._newId&&this._oldData){var f=m.byId(this._newId);if(f){var b=f.getParent();if(b){var e=b.indexOf(f);if(!(0>e)){var k=b.getContext();k&&k.detach(f);b.removeChild(f);f.destroyWidget();
if(newWidget=m.createWidget(this._oldData)){this._oldData=newWidget.getData();this._oldData.context=this._context;b.addChild(newWidget,e);k&&(k.attach(newWidget),newWidget.startup(),newWidget.renderWidget(),k.widgetAddedOrDeleted(),k.widgetChanged(k.WIDGET_MODIFIED,newWidget));dojo.publish("/davinci/ui/widget/replaced",[newWidget,f]);g.resetState(newWidget.domNode);var d;if(this._isRefreshParentOnPropChange(f))if("string"==typeof refreshParent)for(d=b;d&&d.domNode&&d.type!=refreshParent&&"BODY"!=
d.domNode.tagName;){if(!d.domNode||"BODY"==d.domNode.tagName){d=null;break}d=d.getParent()}else d=b;(f=this._isRefreshOnDescendantChange(newWidget))&&(d=f);d&&(new davinci.ve.commands.ModifyCommand(d,null,null,b._edit_context)).execute();dojo.publish("/davinci/ui/widgetPropertiesChanged",[[newWidget]])}}}}}}})})},"davinci/ve/commands/MoveCommand":function(){define("dojo/_base/declare dojo/dom-geometry davinci/ve/widget davinci/ve/States davinci/ve/utils/StyleArray davinci/ve/utils/GeomUtils".split(" "),
function(p,n,m,h,g,f){return p("davinci.ve.commands.MoveCommand",null,{name:"move",constructor:function(b,e,k,d,c,a,f){this._id=b?b.id:void 0;this._context=b.getContext();this._newBox={l:e,t:k};this._commandForXYDeltas=d;this._oldBox=c;this._applyToStateIndex=a&&"Normal"!=a&&"undefined"!=a?a:"undefined";this._disableSnapping=f},execute:function(){if(this._id){var b=m.byId(this._id);if(b&&b.domNode){var e=this._context;if(!this._oldBox){var k=b.getMarginBox();this._oldBox={l:k.l,t:k.t,w:k.w,h:k.h}}if(!b.domNode.offsetParent)console.error("maeh");
else if(dojo.position(b.domNode.offsetParent,!0)){this._commandForXYDeltas?(this._newBox.l=this._oldBox.l+this._commandForXYDeltas._deltaX,this._newBox.t=this._oldBox.t+this._commandForXYDeltas._deltaY):(!this._disableSnapping&&e&&e._snapX&&(k=this._oldBox.w,"left"==e._snapX.typeRefObj?this._newBox.l=e._snapX.x:k&&"right"==e._snapX.typeRefObj?this._newBox.l=e._snapX.x-k:k&&"center"==e._snapX.typeRefObj&&(this._newBox.l=e._snapX.x-k/2)),!this._disableSnapping&&e&&e._snapY&&(k=this._oldBox.h,"top"==
e._snapY.typeRefObj?this._newBox.t=e._snapY.y:k&&"bottom"==e._snapY.typeRefObj?this._newBox.t=e._snapY.y-k:k&&"middle"==e._snapY.typeRefObj&&(this._newBox.t=e._snapY.y-k/2)));this._deltaX=this._newBox.l-this._oldBox.l;this._deltaY=this._newBox.t-this._oldBox.t;var k=f.getBorderBoxPageCoords(b.domNode.offsetParent),d=n.getBorderExtents(b.domNode.offsetParent),c=this._newBox.l-k.l-d.l,a=this._newBox.t-k.t-d.t;e.getScrollOffset();c=[{left:c+"px"},{top:a+"px"}];e=b.getStyleValuesAllStates();this._oldStyleValuesAllStates=
dojo.clone(e);this._oldBox&&(this._oldStyleValuesAllStates[this._applyToStateIndex]=g.mergeStyleArrays(this._oldStyleValuesAllStates[this._applyToStateIndex],[{left:this._oldBox.l-k.l-d.l+"px"},{top:this._oldBox.t-k.t-d.t+"px"}]));e[this._applyToStateIndex]=e[this._applyToStateIndex]?g.mergeStyleArrays(e[this._applyToStateIndex],c):c;b.setStyleValuesAllStates(e);k=h.getStatesListCurrent(b.domNode);d=g.mergeStyleArrays([],e.undefined);for(c=0;c<k.length;c++)e[k[c]]&&(d=g.mergeStyleArrays(d,e[k[c]]));
b.setStyleValuesCanvas(d);b.setStyleValuesModel(e.undefined);b.refresh();h.resetState(b.domNode);dojo.publish("/davinci/ui/widgetPropertiesChanged",[[b]])}}else console.error("no widget")}},undo:function(){if(this._id){var b=m.byId(this._id);if(b){var e=this._oldStyleValuesAllStates,k=this._applyToStateIndex;b.setStyleValuesAllStates(e);e=g.mergeStyleArrays(e.undefined,e[k]);b.setStyleValuesCanvas(e);b.setStyleValuesModel(this._oldStyleValuesAllStates.undefined);b.refresh();davinci.ve.states.resetState(b.domNode);
dojo.publish("/davinci/ui/widgetPropertiesChanged",[[b]])}}}})})},"davinci/ve/commands/ResizeCommand":function(){define(["dojo/_base/declare","dojo/dom-geometry","davinci/ve/widget","davinci/ve/States","davinci/ve/utils/StyleArray"],function(p,n,m,h,g){return p("davinci.ve.commands.ResizeCommand",null,{name:"resize",constructor:function(f,b,e,k){this._id=f?f.id:void 0;f=/^\s*[-+]?[0-9]*\.?[0-9]+\s*$/;f.test(b)&&(b=parseFloat(b));f.test(e)&&(e=parseFloat(e));this._newBox={w:b,h:e};this._applyToStateIndex=
k&&"Normal"!=k&&"undefined"!=k?k:"undefined"},execute:function(){if(this._id&&this._newBox){var f=m.byId(this._id);if(f&&f.domNode){var b=f.domNode,e=b.ownerDocument.defaultView.getComputedStyle(b),k=n.getContentBox(b,e);this._oldBox={w:k.w,h:k.h};var k=this._newBox.w,d=this._newBox.h;this._usesBorderBox(b)&&(b=n.getPadBorderExtents(b,e),"number"==typeof k&&0<=k&&(k+=b.w),"number"==typeof d&&0<=d&&(d+=b.h));b=[{}];"number"==typeof k?b[0].width=k+"px":"string"==typeof k&&(b[0].width=k);"number"==typeof d?
b[0].height=d+"px":"string"==typeof d&&(b[0].height=d);k=f.getStyleValuesAllStates();this._oldStyleValuesAllStates=dojo.clone(k);this._oldBox&&(this._oldStyleValuesAllStates[this._applyToStateIndex]=g.mergeStyleArrays(this._oldStyleValuesAllStates[this._applyToStateIndex],[{width:this._oldBox.w+"px"},{height:this._oldBox.h+"px"}]));k[this._applyToStateIndex]=k[this._applyToStateIndex]?g.mergeStyleArrays(k[this._applyToStateIndex],b):b;f.setStyleValuesAllStates(k);d=h.getStatesListCurrent(f.domNode);
b=g.mergeStyleArrays([],k.undefined);for(e=0;e<d.length;e++)k[d[e]]&&(b=g.mergeStyleArrays(b,k[d[e]]));f.setStyleValuesCanvas(b);f.setStyleValuesModel(k.undefined);this._resize(f);h.resetState(f.domNode);dojo.publish("/davinci/ui/widgetPropertiesChanged",[[f]])}}},setContext:function(f){this._context=f},undo:function(){if(this._id){var f=m.byId(this._id);if(f){var b=this._oldStyleValuesAllStates,e=this._applyToStateIndex;f.setStyleValuesAllStates(b);b=g.mergeStyleArrays(b.undefined,b[e]);f.setStyleValuesCanvas(b);
f.setStyleValuesModel(this._oldStyleValuesAllStates.undefined);this._resize(f);h.resetState(f.domNode);dojo.publish("/davinci/ui/widgetPropertiesChanged",[[f]])}}},_usesBorderBox:function(f){var b=f.tagName.toLowerCase();(f=f.getAttribute("type"))&&(f=f.toLowerCase(f));return"table"==b||"button"==b||"input"==b&&"button"==f},_resize:function(f){var b=f.getParent();b&&b.dijitWidget&&b.dijitWidget.isLayoutContainer?b.resize():f.resize&&f.resize();f.renderWidget();f._updateSrcStyle()}})})},"davinci/ui/dnd/DragManager":function(){define(["dojo/_base/declare",
"dojo/_base/array","dojo/_base/connect","dojo/mouse"],function(p,n,m){p=p("",null,{disabled:!1,currentDragSource:null,currentDropTarget:null,dropAcceptable:!1,dropTargets:null,dragTriggered:!1,currentDomElement:null,_connectors:null,_moveConnector:null,document:null,documentX:0,documentY:0,_ABSOLUTE_THRESHOLD:3,_STATIC_THRESHOLD:40,constructor:function(){this.dropTargets=[];this._connectors=[m.connect(dojo.doc,"onkeydown",this,"onKeyDown"),m.connect(dojo.doc,"onmouseover",this,"onMouseOver"),m.connect(dojo.doc,
"onmouseout",this,"onMouseOut"),m.connect(dojo.doc,"onmousedown",this,"onMouseDown"),m.connect(dojo.doc,"onmouseup",this,"onMouseUp")]},destroy:function(){n.forEach(this._connectors,dojo.disconnect)},onKeyDown:function(g){27==g.keyCode&&this.currentDragSource&&(this.dropAcceptable=!1,this.onMouseUp(g))},onMouseDown:function(g,f){if(!(this.disabled||this.dragTriggered||!dojo.mouseButtons.isLeft(g)||g.metaKey||g.ctrlKey||this.dragTriggered)){var b=this.currentDragSource=f||this.findDragSource(g);if(b){b.onDragDown(g);
for(var b=0,e=this.dropTargets.length;b<e;b++){var k=this.dropTargets[b];if(!k.disabled)k.onDragDown(g)}g.preventDefault();this._moveConnectors=[m.connect(dojo.doc,"onmousemove",this,"onMouseMove")];this.document&&this.document!=dojo.doc&&(this._moveConnectors.push(m.connect(this.document,"onmousemove",this,"onMouseMove")),this._moveConnectors.push(m.connect(this.document,"onmouseover",this,"onMouseOver")),this._moveConnectors.push(m.connect(this.document,"onmouseout",this,"onMouseOut")),this._moveConnectors.push(m.connect(this.document,
"onmouseup",this,"onMouseUp")))}}},onMouseMove:function(g){g.preventDefault();dojo.isIE&&(g.pageX-=2,g.pageY-=2);if(g.target==this.document||g.target.ownerDocument==this.document)g.documentX=this.documentX,g.documentY=this.documentY,g.documentX-=this.document.documentElement.scrollLeft,g.documentY-=this.document.documentElement.scrollTop;var f=g.dragSource=this.currentDragSource;if(!this.dragTriggered){var b=g.pageX-f.pageX,e=g.pageY-f.pageY,b=Math.sqrt(b*b+e*e);if("absolute"==f.positioning){if(b<
this._ABSOLUTE_THRESHOLD)return}else if(b<this._STATIC_THRESHOLD)return;this.dragTriggered=!0;f.onDragStart(g);b=0;for(e=this.dropTargets.length;b<e;b++){var k=this.dropTargets[b];k.disabled||(g.dropTarget=k,k.onDragStart(g))}this.onMouseOver(g)}f.onDragMove(g);(k=this.currentDropTarget)?this.dropAcceptable&&(g.dropTarget=k,k.onDragMove(g,this.dragObjects)):this.dropAcceptable=!1},onMouseOver:function(g){this.currentDomElement=g.target;if(this.dragTriggered){var f=this.currentDragSource;if(f){g.dragSource=
f;var b=this.findDropTarget(this.currentDomElement,f);b&&f.domNode==b.domNode||(b!=this.currentDropTarget&&(this.currentDropTarget&&(g.dropTarget=this.currentDropTarget,this.currentDropTarget.onDragOut(g)),b&&(g.dropTarget=b,this.dropAcceptable=b.onDragOver(g))),this.currentDropTarget=b)}}},onMouseOut:function(g){},onMouseUp:function(g){if(!this.ignoreMouseUp){n.forEach(this._moveConnectors,dojo.disconnect);if(this.dragTriggered){for(var f=0,b=this.dropTargets.length;f<b;f++){var e=this.dropTargets[f];
e.disabled||(g.dropTarget=e,e.onDragEnd(g))}f=this.currentDragSource;b=this.currentDropTarget;g.dragSource=f;g.dropTarget=b;if(f&&(b?(b.onDropStart(g),this.dropAcceptable?(e=b.onDrop(g),b.onDragOut(g),void 0==e||g.dragStatus||(g.dragStatus=e?"dropSuccess":"dropFailure")):(b.onDragOut(g),g.dragStatus="dropFailure")):g.dragStatus="dropFailure",f.onDragEnd(g),b))b.onDropEnd(g)}this._resetStatus()}},_resetStatus:function(){this.currentDragSource=this.currentDropTarget=null;this.dragTriggered=this.dropAcceptable=
!1;this.currentDomElement=null},findDragSource:function(g){for(g=g.target;g&&g!=dojo.doc.body;g=g.parentNode)if(g.dragSource&&!g.dragSource.disabled)return g.dragSource;return null},findDropTarget:function(g,f){for(var b=null,e=g,k=null;null!=e&&e!=dojo.doc.body;e=e.parentNode){var d=e.dropTarget;if(d&&!d.disabled&&d.accepts(f)){b=d;b.nodeUnderMouse=k;break}e.dragSource&&!e.dragSource.disabled&&(k=e)}return b},registerDropTarget:function(g){this.dropTargets.push(g)},unregisterDropTarget:function(g){for(var f=
0,b=this.dropTargets.length;f<b;f++)if(this.dropTargets[f]==g){this.dropTargets.splice(f,1);break}}});var h=new p;h.Module=p;return h})},"davinci/ve/views/StatesView":function(){define("dojo/_base/declare dojo/query dojo/dom-class dojo/_base/connect dojo/aspect davinci/lang/ve/ve davinci/workbench/ViewPart dijit/layout/BorderContainer dijit/layout/ContentPane davinci/XPathUtils davinci/ve/States davinci/ve/widget davinci/ve/_Widget davinci/ve/commands/AppStateCommand dojo/data/ItemFileWriteStore dijit/tree/ForestStoreModel dijit/Tree dojo/_base/window".split(" "),
function(p,n,m,h,g,f,b,e,k,d,c,a,q,w,r,B,y,x){p(y._TreeNode,{});var z=p(y._TreeNode,{_setLabelAttr:{node:"labelNode",type:"innerHTML"}}),u="sceneId category node sceneContainerNode isCurrent isFocus isInitial".split(" ");return p("davinci.ve.views.StatesView",[b],{nextId:0,_lastSelectedId:null,postCreate:function(){this.inherited(arguments);this._themeState=null;this.container=new e({design:"headline",gutters:!1,liveSplitters:!1});this.centerPane=new k({region:"center"});this.container.addChild(this.centerPane);
this.container.layout();this.container.startup();this.setContent(this.container);this.subscribe("/davinci/ui/editorSelected",this._editorSelected.bind(this));this.subscribe("/davinci/ui/context/loaded",this._contextLoaded.bind(this));this.subscribe("/davinci/ui/context/statesLoaded",this._statesLoaded.bind(this));this.subscribe("/davinci/ui/context/pagebuilt",this._pagebuilt.bind(this));this.subscribe("/davinci/ui/context/pagerebuilt",this._pagerebuilt.bind(this));this.subscribe("/davinci/states/statesReordered",
this._statesReordered.bind(this));this.subscribe("/davinci/ui/deviceChanged",this._deviceChanged.bind(this));this.subscribe("/davinci/states/state/added",this._addState.bind(this));this.subscribe("/davinci/states/state/removed",this._removeState.bind(this));this.subscribe("/davinci/states/state/renamed",this._renameState.bind(this));this.subscribe("/davinci/states/state/changed",this._changeState.bind(this));this.subscribe("/maqetta/appstates/state/changed",this._changeState.bind(this));this.subscribe("/maqetta/appstates/state/containerChange",
this._containerChange.bind(this));this.subscribe("/davinci/ui/context/registerSceneManager",this._registerSceneManager.bind(this));this.subscribe("/davinci/scene/scenesLoaded",this._scenesLoaded.bind(this));this.subscribe("/davinci/scene/added",this._addScene.bind(this));this.subscribe("/davinci/scene/removed",this._removeScene.bind(this));this.subscribe("/davinci/scene/renamed",this._renameScene.bind(this));this.subscribe("/davinci/scene/selectionChanged",this._sceneSelectionChanged.bind(this));
dojo.subscribe("/davinci/ui/widgetPropertiesChanged",dojo.hitch(this,this._widgetPropertiesChanged));this.subscribe("/davinci/ui/widgetSelected",dojo.hitch(this,this._widgetSelectionChanged));this.attachToolbar();dojo.style(this.toolbarDiv,"display","none")},_contextLoaded:function(){},_pagebuilt:function(){this._statesLoaded.apply(this,arguments)},_pagerebuilt:function(){this._destroyTree();this._statesLoaded.apply(this,arguments)},_statesReordered:function(){this._destroyTree();this._statesLoaded.apply(this,
arguments)},_statesLoaded:function(){this._editor&&"davinci.ve.themeEditor.ThemeEditor"!=this._editor.declaredClass&&this._updateView();this._hideShowToolBar()},_deviceChanged:function(){this._updateView()},_addState:function(){this._updateView()},_removeState:function(){this._updateView()},_renameState:function(){this._updateView()},_changeState:function(a){this.isThemeEditor()?this._updateThemeSelection(a.newState):this._updateView()},_containerChange:function(){this._updateView()},_registerSceneManager:function(a){},
_scenesLoaded:function(a){this._updateView()},_addScene:function(a,c,d){this._updateView()},_removeScene:function(a,c,d){this._updateView()},_renameScene:function(a,c,d){this._updateView()},_widgetPropertiesChanged:function(){this._updateView()},_widgetSelectionChanged:function(a){this._editor&&this._editor.getContext&&this._tree&&this._sceneStore&&(a=this._editor.getContext().getSelection(),1==a.length&&(a=a[0].domNode)&&a._maqAppStates&&this._sceneStore.fetch({query:{node:a},queryOptions:{deep:!0},
onComplete:dojo.hitch(this,function(a,c){if(0<a.length){var d=this._getTreeSelectionPath(a[0]);this._tree.set("path",d)}})}))},_sceneSelectionChanged:function(a,c){a&&a.category&&c&&this._updateView()},_editorSelected:function(a){a=a.editor;this._destroyTree();this._unregisterForContextEvents();a&&a.supports("states")?(this._editor=a,dojo.style(this.container.domNode,"display","block"),"davinci.ve.themeEditor.ThemeEditor"===a.declaredClass?(this.set("title",f.States),this._updateViewForThemeEditor(),
this._themeState?this._updateThemeSelection(this._themeState):this._updateThemeSelection("Normal")):(this.set("title",f.Scenes),this._registerForContextEvents(),this._updateView()),this.container.layout()):(delete this._editor,dojo.style(this.container.domNode,"display","none"));this._hideShowToolBar()},_getRootNode:function(){var a=this._editor,c;a&&a.getContext&&(c=(a=a.getContext())&&a.rootNode);return c},_updateView:function(){if(this._editor&&this._editor.getContext&&!this.isThemeEditor()){var a=
this._editor.getContext();a&&a._statesLoaded&&x.withDoc(document,function(){this._updateList();this._updateSelection()},this)}},isThemeEditor:function(){return this._editor&&"davinci.ve.themeEditor.ThemeEditor"===this._editor.declaredClass},_updateViewForThemeEditor:function(){var a=this._editor._theme.getStatesForAllWidgets(),c={Normal:"Normal"};if(a)for(var d=0;d<a.length;d++){var b=a[d];"Normal"!=b&&(c[b]=b)}window.latestStates=c;var a=this._getScenes(),c={name:this._editor&&this._editor.getFileNameToDisplay?
this._editor.getFileNameToDisplay():this._editor&&this._editor.fileName?this._editor.fileName:"file",type:"file",category:"file",children:[]},d=[],b=[c],e;for(e in latestStates)d.push({name:e,sceneId:e,type:"AppState"});c.children=c.children.concat(d);this._compareStructures(b,a)||(this._destroyTree(),this._createTree(b))},_updateList:function(){function b(e,k){var w,r,n=e.declaredClass&&e.isInstanceOf&&e.isInstanceOf(q);n?(w=e,r=w.domNode):(w=null,r=e);var x=c.isStateContainer(r),y=!1,A;for(A in f){var B=
f[A];if(B.getSceneChildren&&B.name&&B.category&&(y=B.isSceneContainer(r)))break}if("BODY"==r.tagName||x||y){for(var z=null,u=0;u<g.length;u++)if(B=g[u],B.node==r){z=B;break}var C=null;if(!z){var p=r.parentNode;a:for(;p;){for(u=0;u<g.length;u++)if(B=g[u],B.node==p){C=B;break a}if("BODY"==p.tagName)break;p=p.parentNode}}if(z)k=z;else{var F=n?a.getLabel(w):a.getLabelForNode(r),u=d.getXPath(r),F={name:F,type:"file",category:"file",node:r,children:[]};C?(F.maqid=C.maqid+"$"+u,C.children.push(F)):(F.maqid=
k.maqid+"$"+u,k.children.push(F));g.push(F);k=F}if(x){u=c.getStates(r);B=c.getState(r);B||(B=c.NORMAL);p=c.getInitial(r);p||(p=c.NORMAL);for(var N={maqid:k.maqid+"$AppStates",name:"Application States",type:"SceneManagerRoot",category:"AppStates",sceneContainerNode:r,parentItem:k,children:[]},S=0;S<u.length;S++){var T=u[S],F=h._treeNodeContent("Normal"==T?"Background":T),x=m&&m.stateContainerNode==r&&m.state==B,C=T===B,z=T===p,F={maqid:N.maqid+"$"+T,name:F,sceneId:T,type:"AppState",isFocus:x,isCurrent:C,
isInitial:z,sceneContainerNode:r,parentItem:N};N.children.push(F);g.push(F)}k.children.push(N);g.push(N)}if(y)for(A in f)if(B=f[A],B.getSceneChildren&&B.getCurrentScene&&B.getInitialScenes&&B.name&&B.category&&(y=B.getSceneChildren(r),0<y.length)){p=B.getCurrentScene(r);N=B.getInitialScenes(r);u=d.getXPath(r);S={maqid:k.maqid+"$"+u,name:B.name,type:"SceneManagerRoot",category:B.category,parentItem:k,children:[]};for(T=0;T<y.length;T++){var V=y[T],F=n?a.getLabel(V._dvWidget):a.getLabelForNode(V),F=
h._treeNodeContent(F),x=!1,C=V===p,z=0<=N.indexOf(V),u=d.getXPath(V),F={maqid:S.maqid+"$"+u,name:F,sceneId:V.id,type:B.category,isFocus:x,isCurrent:C,isInitial:z,sceneContainerNode:r,parentItem:S,node:V,children:[]};S.children.push(F);g.push(F)}k.children.push(S);g.push(F)}}w=n?w.getChildren():c._getChildrenOfNode(r);for(r=0;r<w.length;r++)b(w[r],k)}var e=this._getScenes();if(this._editor&&e){var k=this._editor.getContext();if(k&&k.rootWidget&&k.rootNode&&k._statesLoaded){var f=k.sceneManagers,g=
[],h=this,m=c.getFocus(k.rootNode);m&&!m.state&&(m.state=c.NORMAL);var w={maqid:"root",children:[]};b(k.rootWidget,w);k=[w.children[0]];if(!this._compareStructures(k,e)){var r=null;this._tree&&this._sceneStore&&(e=this._tree.get("path"),0<e.length&&(r=e[e.length-1].maqid[0]));this._destroyTree();this._createTree(k);r&&this._tree.onLoadDeferred.then(function(){this._sceneStore.fetch({query:{maqid:r},queryOptions:{deep:!0},onComplete:dojo.hitch(this,function(a,c){if(1===a.length){var d=this._getTreeSelectionPath(a[0]);
0<d.length&&this._tree.set("path",d)}})})}.bind(this))}this._hideShowToolBar()}}},_getTreeSelectionPath:function(a){var c=[];c.splice(0,0,a.id[0]);for(a=a.parentItem&&a.parentItem[0];a;)c.splice(0,0,a.id[0]),a=a.parentItem&&a.parentItem[0];c.splice(0,0,"StoryRoot");return c},_updateSelection:function(){if(this._editor&&this._tree){var a=this._editor.getContext();a&&a._statesLoaded&&this._tree.onLoadDeferred.then(function(){var d=this._tree.get("path"),d=0<d.length?d[d.length-1].maqid[0]:null,b=a.sceneManagers,
e;for(e in b){var k=b[e];if(k.getAllSceneContainers&&k.getSceneChildren&&k.getCurrentScene){k.getAllSceneContainers();var f;this._sceneStore.fetch({query:{type:k.category},queryOptions:{deep:!0},onComplete:dojo.hitch(this,function(a,c){f=a})});for(k=0;k<f.length;k++){var g=f[k],q=this._findTreeNodeSpanByClass(g,"ScenesPaletteCurrent"),h=this._findTreeNodeSpanByClass(g,"ScenesPaletteInitial");g.isCurrent&&g.isCurrent[0]?q&&m.remove(q,"ScenesPaletteCurrentHidden"):q&&m.add(q,"ScenesPaletteCurrentHidden");
g.isInitial&&g.isInitial[0]?h&&m.remove(h,"ScenesPaletteInitialHidden"):h&&m.add(h,"ScenesPaletteInitialHidden");g.maqId&&g.maqId[0]==d&&(q=g.node&&g.node[0])&&q._maqAppStates&&(h=c.getState(q),c.setState(h,q,{focus:!0,updateWhenCurrent:!0}))}}}var w=[];this._sceneStore.fetch({query:{type:"AppState"},queryOptions:{deep:!0},onComplete:dojo.hitch(this,function(a,c){w=a})});for(k=0;k<w.length;k++)e=w[k],q=this._findTreeNodeSpanByClass(e,"ScenesPaletteCurrent"),h=this._findTreeNodeSpanByClass(e,"ScenesPaletteInitial"),
e.isCurrent&&e.isCurrent[0]?q&&m.remove(q,"ScenesPaletteCurrentHidden"):q&&m.add(q,"ScenesPaletteCurrentHidden"),e.isInitial&&e.isInitial[0]?h&&m.remove(h,"ScenesPaletteInitialHidden"):h&&m.add(h,"ScenesPaletteInitialHidden")}.bind(this))}},_updateThemeSelection:function(a){if(this._sceneStore){var c;a||(a="Normal");this._sceneStore.fetch({query:{type:"AppState",sceneId:a},queryOptions:{deep:!0},onComplete:dojo.hitch(this,function(a,d){1===a.length&&(c=a[0].sceneId[0])})});c&&this._updateSelectedScene("AppState",
c)}},_getScenes:function(){var a=[];this._sceneStore&&this._sceneStore.fetch({query:{},queryOptions:{},onComplete:dojo.hitch(this,function(c,d){function b(a,c){for(var d={name:a.name[0],type:a.type[0]},e=0;e<u.length;e++){var k=u[e];a[k]&&(d[k]=a[k][0])}c.push(d);a.children&&0<a.children.length&&(d.children=[],a.children.forEach(function(a){b(a,d.children)}))}c.forEach(function(c){b(c,a)})})});return a},_compareStructures:function(a,c){function d(a,c){if(a.length!=c.length)return!1;for(var b=0;b<
a.length;b++){var e;a:{e=a[b];for(var k=c[b],f=0;f<u.length;f++){var g=u[f];g=e[g]&&!k[g]||!e[g]&&k[g]?!1:e[g]&&e[g]!==k[g]?!1:!0;if(!g){e=!1;break a}}f=e.children&&e.children.length;g=k.children&&k.children.length;e=f&&!g||!f&&g||f&&!d(e.children,k.children)?!1:!0}if(!e)return!1}return!0}return d(a,c)},_destroyTree:function(){this._tree&&(this._tree.destroyRecursive(),this._forest.destroy(),this._tree=this._forest=this._sceneStore=null)},_createTree:function(a){require(["dijit/tree/dndSource"],function(d){d=
function(a,c,d){if(a&&c){var b,e,k;c.forInSelectedItems(function(a){if(b=a.data&&a.data.item)e=b.parentItem&&b.parentItem[0],k=e.children&&e.children.indexOf(b)});var f,g;(a=dijit.getEnclosingWidget(a).item)&&(f=a.parentItem&&a.parentItem[0])&&(g=f.children&&f.children.indexOf(a));return"over"!=d&&b&&a&&e&&f&&"AppState"==b.type[0]&&"AppState"==a.type[0]&&e==f&&0!==k&&!("before"==d&&0===g)&&!("before"==d&&k+1==g)&&!("after"==d&&k==g+1)}}.bind(this);var b=function(a,c,d){if(a.tree==this._tree){var b,
k;a.forInSelectedItems(function(a){(b=a.data&&a.data.item)&&(k=b.parentItem&&b.parentItem[0])});if((a=k.sceneContainerNode&&k.sceneContainerNode[0])&&a._maqAppStates&&a._maqAppStates.states){c=[];for(d=1;d<k.children.length;d++)c.push(k.children[d].sceneId[0]);a=new w({action:"reorder",newStatesList:c,stateContainerNode:a,context:e});e.getCommandStack().execute(a)}}}.bind(this);if(this._editor){var e=this._editor.getContext(),k=e.sceneManagers;this._sceneStore=new r({data:{identifier:"id",label:"name",
items:[]},clearOnClose:!0});this._forest=new B({store:this._sceneStore,query:{type:"file"},rootId:"StoryRoot",rootLabel:"All",childrenAttrs:["children"]});this._tree=new y({model:this._forest,persist:!1,showRoot:!1,autoExpand:!0,dndController:"dijit.tree.dndSource",dragThreshold:8,betweenThreshold:5,checkItemAcceptance:d,className:"StatesViewTree",style:"height:150px; overflow-x:hidden; overflow-y:auto;",_createTreeNode:function(a){return new z(a)},getIconClass:function(a,c){return"dijitLeaf"}});
this._tree.tree&&this._tree.tree.dndController&&g.after(this._tree.tree.dndController,"onDndDrop",b,!0);this.centerPane.domNode.appendChild(this._tree.domNode);dojo.connect(this._tree,"onClick",this,function(a){var d=this._editor,b=d?d.getContext():null,e=null,f=null,g=null;a&&a.type&&(f=a.type[0],g=a.category&&a.category[0],"AppState"==f||"SceneManagerRoot"==f&&"AppStates"==g?e=a.sceneContainerNode?a.sceneContainerNode[0]:null:a.node&&a.node[0]._maqAppStates&&(e=a.node[0]));if(this.isThemeEditor())this.publish("/davinci/states/state/changed",
[{editorClass:d.declaredClass,widget:"$all",newState:a.sceneId[0],oldState:this._themeState,context:this._editor.context}]),this._themeState=a.sceneId[0];else{b&&e&&(g="AppState"==f?a.sceneId?a.sceneId[0]:null:c.getState(e),c.setState(g,e,{focus:!0,updateWhenCurrent:!0}),"davinci.ve.PageEditor"===this._editor.declaredClass&&(b.deselectInvisible(),b.clearCachedWidgetBounds(),b.updateFocusAll()));if(a.sceneId)for(var q in k){if(d=k[q],d.selectScene&&d.selectScene({sceneId:a.sceneId[0]}))break}else a.type&&
"file"==a.type[0]&&a.node&&a.node[0]._dvWidget&&b.select(a.node[0]._dvWidget);this._updateSelection()}});var f=function(a,c){var d=dojo.mixin({},a),b=this.nextId+"";this.nextId++;d.id=b;d.parentItem=c;delete d.children;var e;e=c?this._sceneStore.newItem(d,{parent:c,attribute:"children"}):this._sceneStore.newItem(d);a.children&&a.children.forEach(function(a){f(a,e)})}.bind(this);a.forEach(function(a){f(a)});this._sceneStore.save();if(this._tree.getParent){var q=this._tree.getParent();q.resize&&window.setTimeout(function(){q.resize()},
0)}}}.bind(this))},_updateSelectedScene:function(a,c){if(this._sceneStore){for(var d=c,b=[];d;)this._sceneStore.fetch({query:{type:a,sceneId:d},queryOptions:{deep:!0},onComplete:dojo.hitch(this,function(a,c){if(1!==a.length)console.error("_sceneSelectionChanged error. currentSceneId\x3d"+d+",items.length\x3d"+a.length),d=null;else{var e=a[0];b.splice(0,0,e.id[0]);d=e.parentSceneId?e.parentSceneId[0]:null;for(e=e.parentItem&&e.parentItem[0];e;)b.splice(0,0,e.id[0]),e=e.parentItem&&e.parentItem[0]}})});
b.splice(0,0,"StoryRoot");this._tree.set("paths",[b])}},_hideShowToolBar:function(){function a(c,d){var b=c+"Disabled",e=n("."+c);e.length&&(d?m.remove(e[0],b):m.add(e[0],b))}if(this._editor){var d=this._editor.getContext&&this._editor.getContext();dojo.style(this.toolbarDiv,"display","davinci.ve.PageEditor"===this._editor.declaredClass?"block":"none");var b,e,k;b=e=k=!1;d&&d.rootNode&&((d=c.getFocus(d.rootNode))&&d.stateContainerNode&&(b=k=!0),d&&d.state&&d.state!==c.NORMAL&&(e=k=!0));a("addStateIcon",
b);a("removeStateIcon",e);a("modifyStateIcon",k)}},_treeNodeContent:function(a){var c;c=""+('\x3cspan title\x3d"'+f.InitialScene+'" class\x3d"ScenesPaletteAppStateIcon ScenesPaletteInitial"\x3e\x26#x2713;\x3c/span\x3e');c+='\x3cspan title\x3d"'+f.ActiveScene+'" class\x3d"ScenesPaletteAppStateIcon ScenesPaletteCurrent"\x3e\x3c/span\x3e';return c+("\x3cspan\x3e"+a+"\x3c/span\x3e")},_findTreeNodeSpanByClass:function(a,c){var d=this._tree.getNodesByItem(a),b=(d=d&&0<d.length?d[0]:null)?d.domNode:null;
return(d=d?dojo.query("."+c,b):[])&&0<d.length?d[0]:null},_contextEventHandler:function(){this._updateView()},_unregisterForContextEvents:function(){this._contextConnects&&(this._contextConnects.forEach(h.disconnect),this._contextConnects=null)},_registerForContextEvents:function(){var a=["widgetChanged","widgetAddedOrDeleted"];this._unregisterForContextEvents();var c=this._editor&&this._editor.getContext&&this._editor.getContext();c&&(this._contextConnects=[],a.forEach(function(a){c[a]&&this._contextConnects.push(h.connect(c,
a,this,"_contextEventHandler"))}.bind(this)))}})})},"davinci/lang/ve/ve":function(){define([],function(){return{common:"Common",widgetSpecific:"Widget",events:"Events",layout:"Layout",showMinMax:"show min/max",padding:"Padding",margins:"Margins",showtrbl:"show t/r/b/l",background:"Background",border:"Border",showDetails:"show details",fontsAndText:"Fonts/Text",shapesSVG:"SVG",properties:"properties",Scenes:"Scenes",States:"States",ActiveScene:"This scene is currently visible",AppStateFocus:"This application state is the target for application-state-specific visibility or styling changes",
InitialScene:"This scene will show initially when the page runs",chooseDeviceSilhouette:"Choose a device silhouette: ",filesHasUnsavedChanges:"The file '${0}' has unsaved changes, \"Save\" changes and continue with switch device silhouette.",selectAncestorTitle:"Select ancestor",selectAncestorLabel:"Select ancestor (closest ancestor listed first):",createNewState:"Create New State",updateCurrentState:"Update Current State",createLabel:"Create",updateLabel:"Update",modifyState:"Modify State",modifyLabel:"Update",
stateLabel:"Name",enterStateName:"Please enter a state name.",stateNameExists:"State name '${name}' already exists. Please enter a different state name.",renameState:"Rename State",renameLabel:"Rename",cancelLabel:"Cancel",newStateLabel:"New name:",manageStates:"Manage Widget Visibility for Different States",manageStatesCheckLabel:"Check:",manageStatesCheckCurrentStateOnly:"Current state",manageStatesCheckAll:"All",manageStatesUncheckAll:"None",manageStatesCheckBackgroundOnly:"Background only",manageStatesAllVisibleFromBackground:"(Visible from Background)",
manageStatesSomeVisibleFromBackground:"(Some visible from Background)",manageStatesSomeVisibleSomeHidden:"(Some visible, some hidden)",initialStateCheckBoxLabel:"Initial state at document load time",EnableApplicationStates:"Enable/disable application states",EnableAsStateContainerDescription:"Setting the check box below and clicking OK will allow custom application states to be defined on the currently selected widget.",DisableAsStateContainerDescription:"Unsetting the check box below and clicking OK will disallow custom application states on the currently selected widget.",
DisableAsStateContainerDataLoss:"Any existing interactivity based on existing application states will be lost.",EnableAsStateContainerWidgetLabel:"Application states are enabled on this widget",EnableApplicationStatesCurrentWidget:"Currently selected widget",EnableApplicationStatesCurrentStates:"Current application states",EnableApplicationStatesNone:"(none)",NewWidgetsCurrentStateTitleBackground:"Toggle whether new widgets go to Background or selected state (current value: Background)",NewWidgetsCurrentStateTitleCurrentState:"Toggle whether new widgets go to Background or selected state (current value: selected state)",
richTextInputHelp:"Provides Rich Text (word processor-like) editing of HTML.",smartInputHelp1:"If you use any markup characters (\x26lt;,\x26gt;,\x26amp;), you need to specify whether the text represents literal (plain) text or HTML markup that should be parsed (using an innerHTML assignment).",smartInputHelp2:"Text represents literal (plain) text.",loading:"Loading...",htmlMarkup:"HTML markup",creatingStyleRules:"Creating Style Rules with app.css",propChangeCannotComplete:"This property change cannot be completed because the operation attempts to modify a read-only theme CSS file.",
toChangeProperty:"To change this property, one technique is to add a class to this widget (at top of Properties palette) and then open up the CSS Details pane to target a style rule within your app.css file, as described at ${0}.",errorModifyingValue:"Error modifying value",changeWillModify:"This change will modify one of the CSS style rules defined within a 'CSS theme' and will therefore probably impact other widgets on a global basis.",insteadOfChanging:"Instead of changing the theme CSS files, it is usually better to add a class to this widget (at the top of the Properties palette) and then open up the CSS Details pane to target a style rule within your app.css file, as described at ${0}.",
okToProceed:"OK to proceed with this change?",valueIsOverriden:"This value is overriden and can not be changed.",applyToWhich:"Apply to which style rule:",onlyApplyToState:" Only apply to current state (${0})",newRule:"[class: ${0} - New rule in ${1}] ",newThemeRule:"[theme: - New rule in ${0}] ",existingRule:"[class: ${0} - Existing rule in ${1}] ",line:" line: ${0})",propUndefined:"undefined",bgdType_emptystring:"",bgdType_none:"none",bgdType_url:"image",bgdType_linear:"linear gradient",bgdType_radial:"radial gradient",
bgdType_other:"other",bgdPickFile:"Choose...",bgdStop:"Stop",bgdAddStop:"Add a new gradient stop after this stop",bgdRemoveStop:"Remove this gradient stop",bgdBackgroundColor:"background-color:",bgdBackgroundImageType:"background-image type:",bgdImageUrl:"Image URL:",bgdUrl:"URL:",bgdColorStops:"Color stops:",bgdColor:"color",bgdPosition:"position",bgdOptions:"Options:",bgdAngle:"Angle:",bgdPosition2:"Position:",bgdShape:"Shape:",bgdExtent:"Extent:",bgdBackgroundRepeat:"background-repeat:",bgdBackgroundPosition:"background-position:",
bgdBackgroundSize:"background-size:",bgdBackgroundOrigin:"background-origin:",bgdBackgroundClip:"background-clip:",bgdBackgroundImageValue:"'background-image' value:",bgdTemplate:"Template:",colorPicker:"Color picker...",removeValue:"Remove Value",selectColor:"select a color",toolBarFor:"for: ",noSelection:"(no selection)",toolBarClass:"class:",toolBarId:"ID:",idAlreadyUsed:"This id is already used by another widget",noValidParents:"No valid parents at this position",willBeChildOf:"Will become a child of:",
candidateParents:"Candidate parents:",toChangePress:"To change, press numbers",vteWarningTitle:"Theme Version Warning",vteWarningMessage:"Theme version does not match Maqetta version this could produce unexpected results. We suggest recreating the custom theme using the current version of Maqetta and deleting the existing theme.",vteWarningUnsuportedBrowserTitle:"Unsupported brower",vteWarningUnsuportedBrowserMessage:"Editing mobile themes is only supported on webkit browsers, we sugguest using Chrome or Safari to customize mobile themes.",
vteWarningToolkitMessage:"Theme version does not match workspace library version this could produce unexpected results. We suggest recreating the custom theme using the current version of Maqetta and deleting the existing theme.",vteErrorTitle:"Theme Version Error",vteErrorMessage:"Theme version is not supported by this version of Maqetta. You must recreating custom theme using the current version of Maqetta and deleting the existing theme..",vteErrorSavingResourceMessage:"error saving resource\n",
"SourceComboButton-source":"Source","SourceComboButton-splitHorizontal":"Split-H","SourceComboButton-splitVertical":"Split-V","LayoutDropDownButton-flow":"Flow","LayoutDropDownButton-absolute":"Absolute"}})},"davinci/XPathUtils":function(){define(function(){function p(m){this.node=m}p.prototype={name:function(){return this.node.nodeName},parent:function(){var m=this.node.parentNode;if(m!==this.node.ownerDocument)return new p(m)},index:function(){var m=this.node.nodeName,h=this.node.parentNode,g=!1,
f=0;h.id||(h.id="__XPATH_UTILS_TEMP_ID__"+Date.now(),g=!0);m=h.querySelectorAll("#"+h.id+"\x3e"+m);if(1<m.length)for(var b=0,e=m.length;b<e;b++)if(m[b]===this.node){f=b+1;break}g&&(h.id="");return f}};var n=/(\w+)(?:\[(\d+)\])?/;return{getXPath:function(m,h){function g(b,e){var k=e.name(),d=e.parent();if(d){var c=e.index();b=(c?k+("["+c+"]"):k+"[1]")+(b?"/"+b:"");return g(b,d)}return"/"+k+"/"+b}h=h||p;var f=new h(m);return g("",f).toLowerCase()},toCssPath:function(m){"/"===m.charAt(0)&&(m=m.substr(1));
var h="";m.split("/").forEach(function(g){g=g.match(n);var f=g[2];h+=(h?"\x3e":"")+g[1];f&&(h+=":nth-of-type("+f+")")});return h}}})},"davinci/ve/commands/AppStateCommand":function(){define("dojo/_base/declare dojo/_base/lang dojo/topic davinci/XPathUtils davinci/html/HtmlFileXPathAdapter davinci/ve/States".split(" "),function(p,n,m,h,g,f){return p("davinci.ve.commands.AppStateCommand",null,{name:"AppStateCommand",_actions:["add","remove","modify","reorder"],constructor:function(b){if(b){this._params=
n.mixin({},b);var e=b.stateContainerNode;e&&e._dvWidget&&(this._params.stateContainerId=e.id,this._params.stateContainerXpath=h.getXPath(e._dvWidget._srcElement,g));"reorder"==this._params.action&&((e=this._getStateContainerNode())&&b.newStatesList.length?(this._oldStatesList=f.getStates(e),this._oldStatesList.shift()):this._params=null)}},_validParams:function(){return this._params&&0<=this._actions.indexOf(this._params.action)&&this._params.stateContainerNode&&this._params.stateContainerId&&this._params.stateContainerXpath&&
this._params.context},_getStateContainerNode:function(){var b,e=this._params.context;if(!e)return b;var k=e.getDocument();if(!k)return b;var d=this._params.stateContainerXpath;b=k.getElementById(this._params.stateContainerId);b||(e=e.model.evaluate(d))&&(b=k.getElementById(e.getAttribute("id")));return b},execute:function(){if(this._validParams()){var b=this._params.action,e=this._params.state,k=this._getStateContainerNode();k&&("add"==b?(f.add(k,e),this._setStateAndFocus(k)):"remove"==b?(this._stateIndex=
k._maqAppStates&&k._maqAppStates.states&&k._maqAppStates.states.indexOf(e),this._preservedNodesId=[],this._preservedNodesXpath=[],this._preservedStateValues=[],this._preserveStateFromNodeRecursive(k,e),f.remove(k,e),this._setStateAndFocus(k)):"modify"==b?(this._params.newState&&(this._traverseRenameState(this._params.state,this._params.newState),m.publish("/davinci/states/state/renamed",{node:k,oldName:this._params.state,newName:this._params.newState,stateContainerNode:k})),"string"==typeof this._params.initialState&&
(this._oldInitialState=f.getInitial(k),b="undefined"==this._params.initialState?void 0:this._params.initialState,this._params.newState&&b==this._params.state&&(b=this._params.newState),f.setState(b,k,{initial:b,updateWhenCurrent:!0})),this._setStateAndFocus(k)):"reorder"==b&&k&&k._maqAppStates&&k._dvWidget&&(k._maqAppStates.states=this._params.newStatesList,b=f.stringifyWithQuotes(k._maqAppStates),k.setAttribute(f.APPSTATES_ATTRIBUTE,b),srcElement=k._dvWidget._srcElement,srcElement.setAttribute(f.APPSTATES_ATTRIBUTE,
b),m.publish("/davinci/states/statesReordered",[k,this._params.newStatesList])))}},undo:function(){if(this._validParams()){var b=this._params.action,e=this._params.state,k=this._getStateContainerNode();k&&("add"==b?(f.remove(k,e),this._setStateAndFocus(k)):"remove"==b?(f.add(k,e,{index:this._stateIndex}),this._restoreState(e),f.setState(e,k,{focus:!0}),this._setStateAndFocus(k)):"modify"==b?("string"==typeof this._params.initialState&&f.setState(this._oldInitialState,k,{initial:this._oldInitialState,
updateWhenCurrent:!0}),this._params.newState&&this._traverseRenameState(this._params.newState,this._params.state),this._setStateAndFocus(k)):"reorder"==b&&k&&k._maqAppStates&&k._dvWidget&&(k._maqAppStates.states=this._oldStatesList,b=f.stringifyWithQuotes(k._maqAppStates),k.setAttribute(f.APPSTATES_ATTRIBUTE,b),srcElement=k._dvWidget._srcElement,srcElement.setAttribute(f.APPSTATES_ATTRIBUTE,b),m.publish("/davinci/states/statesReordered",[k,this._params.newStatesList])))}},_setStateAndFocus:function(b){var e=
f.getState(b);f.setState(e,b,{focus:e,updateWhenCurrent:!0})},_preserveStateFromNodeRecursive:function(b,e){var k=b._dvWidget;if(b&&k&&e){this._preserveStateFromNode(b,e);for(var k=k.getChildren(),d=0;d<k.length;d++)this._preserveStateFromNodeRecursive(k[d].domNode,e)}},_preserveStateFromNode:function(b,e){b&&b._maqDeltas&&b._maqDeltas[e]&&b._dvWidget&&b._dvWidget._srcElement&&(this._preservedNodesId.push(b.id),this._preservedNodesXpath.push(h.getXPath(b._dvWidget._srcElement,g)),this._preservedStateValues.push(n.clone(b._maqDeltas[e])))},
_restoreState:function(b){var e=this._params.context;if(e&&this._preservedNodesId){var k=e.getDocument();if(k)for(var d=0;d<this._preservedNodesId.length;d++){var c=this._preservedNodesXpath[d],a=k.getElementById(this._preservedNodesId[d]);a||(c=e.model.evaluate(c))&&(a=k.getElementById(c.getAttribute("id")));a&&(a._maqDeltas||(a._maqDeltas={}),a._maqDeltas[b]=n.clone(this._preservedStateValues[d]),f._updateSrcState(a))}}},_traverseRenameState:function(b,e){var k=this._getStateContainerNode();if(k&&
(f.rename(k,{oldName:b,newName:e}),k=k._dvWidget&&k._dvWidget._srcElement)){var d=null,c=!1,a=/^(.*davinci.states.setState\s*\(\s*)('[^']*'|"[^"]*")([^\)]*\).*)$/,g=/^(['"])(.*)(['"])$/;k.visit({visit:dojo.hitch(this,function(k){if("HTMLElement"==k.elementType)d=k;else if("HTMLAttribute"==k.elementType){var f=k.name;if(f&&"on"==f.substr(0,2).toLowerCase()&&(k=k.value.match(a))){var h=k[2].match(g);h&&h[2]==b&&(d.setAttribute(f,k[1]+h[1]+e+h[3]+k[3]),c=!0)}}})});c&&(k=this._params&&this._params.context&&
this._params.context.editor)&&k._visualChanged()}}})})},"davinci/html/HtmlFileXPathAdapter":function(){define(function(){function p(n){this.elem=n}p.prototype={name:function(){return this.elem.tag},parent:function(){var n=this.elem.parent;if("HTMLFile"!==n.elementType)return new p(n)},index:function(){var n=this.elem.tag,m=this.elem.parent.children,h=0;if(1===m.length)return 0;m=m.filter(function(g){return g.tag===n});1<m.length&&m.some(function(g,f){if(g===this.elem)return h=f+1,!0},this);return h}};
return p})},"dojo/data/ItemFileWriteStore":function(){define("../_base/lang ../_base/declare ../_base/array ../_base/json ../_base/kernel ./ItemFileReadStore ../date/stamp".split(" "),function(p,n,m,h,g,f,b){return n("dojo.data.ItemFileWriteStore",f,{constructor:function(e){this._features["dojo.data.api.Write"]=!0;this._features["dojo.data.api.Notification"]=!0;this._pending={_newItems:{},_modifiedItems:{},_deletedItems:{}};this._datatypeMap.Date.serialize||(this._datatypeMap.Date.serialize=function(e){return b.toISOString(e,
{zulu:!0})});e&&!1===e.referenceIntegrity&&(this.referenceIntegrity=!1);this._saveInProgress=!1},referenceIntegrity:!0,_assert:function(b){if(!b)throw Error("assertion failed in ItemFileWriteStore");},_getIdentifierAttribute:function(){return this.getFeatures()["dojo.data.api.Identity"]},newItem:function(b,k){this._assert(!this._saveInProgress);this._loadFinished||this._forceLoad();if("object"!=typeof b&&"undefined"!=typeof b)throw Error("newItem() was passed something other than an object");var d=
null,c=this._getIdentifierAttribute();if(c===Number)d=this._arrayOfAllItems.length;else{d=b[c];if("undefined"===typeof d)throw Error("newItem() was not passed an identity for the new item");if(p.isArray(d))throw Error("newItem() was not passed an single-valued identity");}this._itemsByIdentity&&this._assert("undefined"===typeof this._itemsByIdentity[d]);this._assert("undefined"===typeof this._pending._newItems[d]);this._assert("undefined"===typeof this._pending._deletedItems[d]);var a={};a[this._storeRefPropName]=
this;a[this._itemNumPropName]=this._arrayOfAllItems.length;this._itemsByIdentity&&(this._itemsByIdentity[d]=a,a[c]=[d]);this._arrayOfAllItems.push(a);c=null;if(k&&k.parent&&k.attribute){var c={item:k.parent,attribute:k.attribute,oldValue:void 0},f=this.getValues(k.parent,k.attribute);if(f&&0<f.length){var g=f.slice(0,f.length);c.oldValue=1===f.length?f[0]:f.slice(0,f.length);g.push(a);this._setValueOrValues(k.parent,k.attribute,g,!1);c.newValue=this.getValues(k.parent,k.attribute)}else this._setValueOrValues(k.parent,
k.attribute,a,!1),c.newValue=a}else a[this._rootItemPropName]=!0,this._arrayOfTopLevelItems.push(a);this._pending._newItems[d]=a;for(var h in b){if(h===this._storeRefPropName||h===this._itemNumPropName)throw Error("encountered bug in ItemFileWriteStore.newItem");d=b[h];p.isArray(d)||(d=[d]);a[h]=d;if(this.referenceIntegrity)for(f=0;f<d.length;f++)g=d[f],this.isItem(g)&&this._addReferenceToMap(g,a,h)}this.onNew(a,c);return a},_removeArrayElement:function(b,k){var d=m.indexOf(b,k);return-1!=d?(b.splice(d,
1),!0):!1},deleteItem:function(b){this._assert(!this._saveInProgress);this._assertIsItem(b);var k=b[this._itemNumPropName],d=this.getIdentity(b);if(this.referenceIntegrity){var c=this.getAttributes(b);b[this._reverseRefMap]&&(b["backup_"+this._reverseRefMap]=p.clone(b[this._reverseRefMap]));m.forEach(c,function(a){m.forEach(this.getValues(b,a),function(c){this.isItem(c)&&(b["backupRefs_"+this._reverseRefMap]||(b["backupRefs_"+this._reverseRefMap]=[]),b["backupRefs_"+this._reverseRefMap].push({id:this.getIdentity(c),
attr:a}),this._removeReferenceFromMap(c,b,a))},this)},this);if(c=b[this._reverseRefMap])for(var a in c){var f=null;if(f=this._itemsByIdentity?this._itemsByIdentity[a]:this._arrayOfAllItems[a])for(var g in c[a]){var h=this.getValues(f,g)||[],n=m.filter(h,function(a){return!(this.isItem(a)&&this.getIdentity(a)==d)},this);this._removeReferenceFromMap(b,f,g);n.length<h.length&&this._setValueOrValues(f,g,n,!0)}}}this._arrayOfAllItems[k]=null;b[this._storeRefPropName]=null;this._itemsByIdentity&&delete this._itemsByIdentity[d];
this._pending._deletedItems[d]=b;b[this._rootItemPropName]&&this._removeArrayElement(this._arrayOfTopLevelItems,b);this.onDelete(b);return!0},setValue:function(b,k,d){return this._setValueOrValues(b,k,d,!0)},setValues:function(b,k,d){return this._setValueOrValues(b,k,d,!0)},unsetAttribute:function(b,k){return this._setValueOrValues(b,k,[],!0)},_setValueOrValues:function(b,k,d,c){this._assert(!this._saveInProgress);this._assertIsItem(b);this._assert(p.isString(k));this._assert("undefined"!==typeof d);
var a=this._getIdentifierAttribute();if(k==a)throw Error("ItemFileWriteStore does not have support for changing the value of an item's identifier.");var a=this._getValueOrValues(b,k),f=this.getIdentity(b);if(!this._pending._modifiedItems[f]){var g={},h;for(h in b)g[h]=h===this._storeRefPropName||h===this._itemNumPropName||h===this._rootItemPropName?b[h]:h===this._reverseRefMap?p.clone(b[h]):b[h].slice(0,b[h].length);this._pending._modifiedItems[f]=g}f=!1;if(p.isArray(d)&&0===d.length){if(f=delete b[k],
d=void 0,this.referenceIntegrity&&a){h=a;p.isArray(h)||(h=[h]);for(var n=0;n<h.length;n++)g=h[n],this.isItem(g)&&this._removeReferenceFromMap(g,b,k)}}else{f=p.isArray(d)?d.slice(0,d.length):[d];if(this.referenceIntegrity)if(a){h=a;p.isArray(h)||(h=[h]);var y={};m.forEach(h,function(a){this.isItem(a)&&(a=this.getIdentity(a),y[a.toString()]=!0)},this);m.forEach(f,function(a){if(this.isItem(a)){var c=this.getIdentity(a);y[c.toString()]?delete y[c.toString()]:this._addReferenceToMap(a,b,k)}},this);for(n in y)this._removeReferenceFromMap(this._itemsByIdentity?
this._itemsByIdentity[n]:this._arrayOfAllItems[n],b,k)}else for(n=0;n<f.length;n++)g=f[n],this.isItem(g)&&this._addReferenceToMap(g,b,k);b[k]=f;f=!0}if(c)this.onSet(b,k,a,d);return f},_addReferenceToMap:function(b,k,d){k=this.getIdentity(k);var c=b[this._reverseRefMap];c||(c=b[this._reverseRefMap]={});(b=c[k])||(b=c[k]={});b[d]=!0},_removeReferenceFromMap:function(b,k,d){k=this.getIdentity(k);var c=b[this._reverseRefMap],a;if(c){for(a in c)a==k&&(delete c[a][d],this._isEmpty(c[a])&&delete c[a]);this._isEmpty(c)&&
delete b[this._reverseRefMap]}},_dumpReferenceMap:function(){var b;for(b=0;b<this._arrayOfAllItems.length;b++);},_getValueOrValues:function(b,k){var d=void 0;this.hasAttribute(b,k)&&(d=this.getValues(b,k),d=1==d.length?d[0]:d);return d},_flatten:function(b){if(this.isItem(b))return{_reference:this.getIdentity(b)};if("object"===typeof b)for(var k in this._datatypeMap){var d=this._datatypeMap[k];if(p.isObject(d)&&!p.isFunction(d)){if(b instanceof d.type){if(!d.serialize)throw Error("ItemFileWriteStore: No serializer defined for type mapping: ["+
k+"]");return{_type:k,_value:d.serialize(b)}}}else if(b instanceof d)return{_type:k,_value:b.toString()}}return b},_getNewFileContentString:function(){var b={},k=this._getIdentifierAttribute();k!==Number&&(b.identifier=k);this._labelAttr&&(b.label=this._labelAttr);b.items=[];for(k=0;k<this._arrayOfAllItems.length;++k){var d=this._arrayOfAllItems[k];if(null!==d){var c={},a;for(a in d)if(a!==this._storeRefPropName&&a!==this._itemNumPropName&&a!==this._reverseRefMap&&a!==this._rootItemPropName){var f=
this.getValues(d,a);if(1==f.length)c[a]=this._flatten(f[0]);else for(var g=[],m=0;m<f.length;++m)g.push(this._flatten(f[m])),c[a]=g}b.items.push(c)}}return h.toJson(b,!0)},_isEmpty:function(b){var k=!0;if(p.isObject(b))for(var d in b){k=!1;break}else p.isArray(b)&&0<b.length&&(k=!1);return k},save:function(b){this._assert(!this._saveInProgress);this._saveInProgress=!0;var k=this,d=function(){k._pending={_newItems:{},_modifiedItems:{},_deletedItems:{}};k._saveInProgress=!1;b&&b.onComplete&&b.onComplete.call(b.scope||
g.global)},c=function(a){k._saveInProgress=!1;b&&b.onError&&b.onError.call(b.scope||g.global,a)};if(this._saveEverything){var a=this._getNewFileContentString();this._saveEverything(d,c,a)}this._saveCustom&&this._saveCustom(d,c);this._saveEverything||this._saveCustom||d()},revert:function(){this._assert(!this._saveInProgress);for(var b in this._pending._modifiedItems){var k=this._pending._modifiedItems[b],d=null,d=this._itemsByIdentity?this._itemsByIdentity[b]:this._arrayOfAllItems[b];k[this._storeRefPropName]=
this;for(var c in d)delete d[c];p.mixin(d,k)}var a;for(b in this._pending._deletedItems)a=this._pending._deletedItems[b],a[this._storeRefPropName]=this,k=a[this._itemNumPropName],a["backup_"+this._reverseRefMap]&&(a[this._reverseRefMap]=a["backup_"+this._reverseRefMap],delete a["backup_"+this._reverseRefMap]),this._arrayOfAllItems[k]=a,this._itemsByIdentity&&(this._itemsByIdentity[b]=a),a[this._rootItemPropName]&&this._arrayOfTopLevelItems.push(a);for(b in this._pending._deletedItems)a=this._pending._deletedItems[b],
a["backupRefs_"+this._reverseRefMap]&&(m.forEach(a["backupRefs_"+this._reverseRefMap],function(c){this._addReferenceToMap(this._itemsByIdentity?this._itemsByIdentity[c.id]:this._arrayOfAllItems[c.id],a,c.attr)},this),delete a["backupRefs_"+this._reverseRefMap]);for(b in this._pending._newItems)k=this._pending._newItems[b],k[this._storeRefPropName]=null,this._arrayOfAllItems[k[this._itemNumPropName]]=null,k[this._rootItemPropName]&&this._removeArrayElement(this._arrayOfTopLevelItems,k),this._itemsByIdentity&&
delete this._itemsByIdentity[b];this._pending={_newItems:{},_modifiedItems:{},_deletedItems:{}};return!0},isDirty:function(b){return b?(b=this.getIdentity(b),(new Boolean(this._pending._newItems[b]||this._pending._modifiedItems[b]||this._pending._deletedItems[b])).valueOf()):!this._isEmpty(this._pending._newItems)||!this._isEmpty(this._pending._modifiedItems)||!this._isEmpty(this._pending._deletedItems)},onSet:function(b,k,d,c){},onNew:function(b,k){},onDelete:function(b){},close:function(b){if(this.clearOnClose){if(this.isDirty())throw Error("dojo.data.ItemFileWriteStore: There are unsaved changes present in the store. Please save or revert the changes before invoking close.");
this.inherited(arguments)}}})})},"davinci/ve/views/SwitchingStyleView":function(){define("dojo/_base/declare dojo/_base/kernel davinci/lang/ve dijit/lang/_common xide/utils dijit/layout/ContentPane davinci/Runtime davinci/workbench/WidgetLite davinci/ve/widgets/HTMLStringUtil davinci/ve/widgets/WidgetToolBar davinci/ve/widgets/Cascade davinci/ve/widgets/CommonProperties davinci/ve/widgets/WidgetProperties davinci/ve/widgets/EventSelection xide/registry".split(" "),function(p,n,m,h,g,f,b,e,k,d,c,a,
q,w,r){return p("davinci.ve.views.SwitchingStyleView",[e],{_editor:null,_widget:null,_subWidget:null,_titleBarDiv:"\x3cdiv class\x3d'palette_titleBarDiv'\x3e\x3cspan class\x3d'paletteCloseBox'\x3e\x3c/span\x3e\x3cspan class\x3d'titleBarDivTitle'\x3e\x3c/span\x3e\x3c/div\x3e",constructor:function(a,c){},pageTemplate:[{key:"widgetSpecific",className:"maqPropertySection page_editor_only",addCommonPropertiesAtTop:!1,html:"\x3cdiv dojoType\x3d'davinci.ve.widgets.WidgetProperties'\x3e\x3c/div\x3e"},{key:"events",
className:"maqPropertySection page_editor_only",addCommonPropertiesAtTop:!1,pageTemplate:{html:"\x3cdiv dojoType\x3d'davinci.ve.widgets.EventSelection'\x3e\x3c/div\x3e"}},{key:"layout",className:"maqPropertySection",addCommonPropertiesAtTop:!0,pageTemplate:[{display:"width",type:"multi",target:["width"],values:["","auto","100%","200px","10em"]},{display:"height",type:"multi",target:["height"],values:["","auto","100%","200px","10em"]},{html:"\x26nbsp;"},{key:"showMinMax",display:"\x26nbsp;\x26nbsp;\x26nbsp;",
type:"toggleSection",pageTemplate:[{display:"min-height",type:"multi",target:["min-height"],rowClass:"propertiesSectionHidden"},{display:"max-height",type:"multi",target:["max-height"],rowClass:"propertiesSectionHidden"},{display:"min-width",type:"multi",target:["min-width"],rowClass:"propertiesSectionHidden"},{display:"max-width",type:"multi",target:["max-width"],rowClass:"propertiesSectionHidden"},{html:"\x26nbsp;",rowClass:"propertiesSectionHidden"}]},{display:"position",type:"combo",target:["position"],
values:["","absolute","fixed","relative","static"]},{display:"left",type:"multi",target:["left"],values:["","0px","1em"]},{display:"top",type:"multi",target:["top"],values:["","0px","1em"]},{display:"right",type:"multi",target:["right"],values:["","0px","1em"]},{display:"bottom",type:"multi",target:["bottom"],values:["","0px","1em"]},{display:"display",type:"combo",target:["display"],values:["","none","block","inline","inline-block"]},{display:"opacity",type:"multi",target:["opacity"],values:["0",
"0.5","1.0"]},{display:"box-shadow",type:"text",target:["box-shadow"],value:["","none","1px 1px rgba(0,0,0,.5)"]},{display:"float",type:"combo",target:["float"],values:["","none","left","right"]},{display:"clear",type:"combo",target:["clear"],values:["","none","left","right","both"]},{display:"overflow",type:"combo",target:["overflow"],values:["","visible","hidden","scroll","auto"]},{display:"z-index",type:"multi",target:["z-index"],values:" auto 0 1 100 -1 -100".split(" ")},{display:"box-sizing",
type:"combo",target:["box-sizing","-webkit-box-sizing","-ms-box-sizing","-moz-box-sizing"],values:["","content-box","border-box"]}]},{key:"padding",className:"maqPropertySection",addCommonPropertiesAtTop:!0,pageTemplate:[{display:"\x3cb\x3e(padding)\x3c/b\x3e",type:"multi",target:["padding"],values:["","0px","1em"]},{key:"showtrbl",display:"\x26nbsp;\x26nbsp;\x26nbsp;",type:"toggleSection",pageTemplate:[{display:"padding-top",type:"multi",target:["padding-top"],values:["","0px","1em"],rowClass:"propertiesSectionHidden"},
{display:"padding-right",type:"multi",target:["padding-right"],values:["","0px","1em"],rowClass:"propertiesSectionHidden"},{display:"padding-bottom",type:"multi",target:["padding-bottom"],values:["","0px","1em"],rowClass:"propertiesSectionHidden"},{display:"padding-left",type:"multi",target:["padding-left"],values:["","0px","1em"],rowClass:"propertiesSectionHidden"}]}]},{key:"margins",className:"maqPropertySection",addCommonPropertiesAtTop:!0,pageTemplate:[{display:"\x3cb\x3e(margin)\x3c/b\x3e",type:"multi",
target:["margin"],values:["","0px","1em"]},{key:"showtrbl",display:"\x26nbsp;\x26nbsp;\x26nbsp;",type:"toggleSection",pageTemplate:[{display:"margin-top",type:"multi",target:["margin-top"],values:["","0px","1em"],rowClass:"propertiesSectionHidden"},{display:"margin-right",type:"multi",target:["margin-right"],values:["","0px","1em"],rowClass:"propertiesSectionHidden"},{display:"margin-bottom",type:"multi",target:["margin-bottom"],values:["","0px","1em"],rowClass:"propertiesSectionHidden"},{display:"margin-left",
type:"multi",target:["margin-left"],values:["","0px","1em"],rowClass:"propertiesSectionHidden"}]}]},{key:"background",className:"maqPropertySection",addCommonPropertiesAtTop:!0,pageTemplate:[{display:"background-color",type:"background",target:["background-color"],colorswatch:!0},{display:"background-image",type:"background",target:["background-image"],values:["","none"]},{display:"background-repeat",type:"background",values:["","repeat","repeat-x","repeat-y","no-repeat"],target:["background-repeat"]},
{display:"background-position",type:"background",target:["background-position"],values:";0px 0px;0% 0%;left top;center center;right bottom".split(";")},{display:"background-size",type:"background",target:["background-size"],values:["","auto","contain","cover","100%"]},{display:"background-origin",type:"background",target:["background-origin"],values:["","border-box","padding-box","content-box"]},{display:"background-clip",type:"background",target:["background-clip"],values:["","border-box","padding-box",
"content-box"]}]},{key:"border",className:"maqPropertySection",addCommonPropertiesAtTop:!0,pageTemplate:[{display:"\x3cb\x3e(border)\x3c/b\x3e",type:"multi",target:["border"],values:["","none","1px solid black"]},{display:"show",type:"combo",values:["none","props","sides","all"],id:"properties_show_select",onchange:function(a){if("number"==typeof a){var c=function(a,c,b,d,e){for(;c<=b;c++){var k=n.byId(a[c].rowId);c>=d&&c<=e?n.removeClass(k,"propertiesSectionHidden"):n.addClass(k,"propertiesSectionHidden")}};
if(this.pageTemplate){a=this.pageTemplate[a];var b;a&&a.id&&(a=n.byId(a.id))&&(b=a.value);n.isString(b)&&("none"===b?c(this.pageTemplate,2,20,-1,-1):"sides"===b?c(this.pageTemplate,2,20,2,5):"props"===b?c(this.pageTemplate,2,20,6,8):"all"===b&&c(this.pageTemplate,2,20,9,20))}}}},{display:"border-top",type:"multi",target:["border-top"],values:["","none","1px solid black"],rowClass:"propertiesSectionHidden"},{display:"border-right",type:"multi",target:["border-right"],values:["","none","1px solid black"],
rowClass:"propertiesSectionHidden"},{display:"border-bottom",type:"multi",target:["border-bottom"],values:["","none","1px solid black"],rowClass:"propertiesSectionHidden"},{display:"border-left",type:"multi",target:["border-left"],values:["","none","1px solid black"],rowClass:"propertiesSectionHidden"},{display:"border-width",type:"multi",target:["border-width"],values:["","1px","1em"],rowClass:"propertiesSectionHidden"},{display:"border-style",type:"multi",target:["border-style"],values:["","none",
"solid","dotted","dashed"],rowClass:"propertiesSectionHidden"},{display:"border-color",type:"color",target:["border-color"],rowClass:"propertiesSectionHidden"},{display:"border-top-width",type:"multi",target:["border-top-width"],values:["","1px","1em"],rowClass:"propertiesSectionHidden"},{display:"border-top-style",type:"multi",target:["border-top-style"],values:["","none","solid","dotted","dashed"],rowClass:"propertiesSectionHidden"},{display:"border-top-color",type:"color",target:["border-top-color"],
rowClass:"propertiesSectionHidden"},{display:"border-right-width",type:"multi",target:["border-right-width"],values:["","1px","1em"],rowClass:"propertiesSectionHidden"},{display:"border-right-style",type:"multi",target:["border-right-style"],values:["","none","solid","dotted","dashed"],rowClass:"propertiesSectionHidden"},{display:"border-right-color",type:"color",target:["border-right-color"],rowClass:"propertiesSectionHidden"},{display:"border-bottom-width",type:"multi",target:["border-bottom-width"],
values:["","1px","1em"],rowClass:"propertiesSectionHidden"},{display:"border-bottom-style",type:"multi",target:["border-bottom-style"],values:["","none","solid","dotted","dashed"],rowClass:"propertiesSectionHidden"},{display:"border-bottom-color",type:"color",target:["border-bottom-color"],rowClass:"propertiesSectionHidden"},{display:"border-left-width",type:"multi",target:["border-left-width"],values:["","1px","1em"],rowClass:"propertiesSectionHidden"},{display:"border-left-style",type:"multi",target:["border-left-style"],
values:["","none","solid","dotted","dashed"],rowClass:"propertiesSectionHidden"},{display:"border-left-color",type:"color",target:["border-left-color"],rowClass:"propertiesSectionHidden"},{display:"border-collapse",type:"combo",target:["border-collapse"],values:["","separate","collapse"]},{display:"\x3cb\x3e(border-radius)\x3c/b\x3e",type:"multi",target:["border-radius","-moz-border-radius"],values:["","0px","6px"]},{key:"showDetails",display:"",type:"toggleSection",pageTemplate:[{display:"border-top-left-radius",
type:"multi",target:["border-top-left-radius","-moz-border-radius-topleft"],values:["","0px","6px"],rowClass:"propertiesSectionHidden"},{display:"border-top-right-radius",type:"multi",target:["border-top-right-radius","-moz-border-radius-topright"],values:["","0px","6px"],rowClass:"propertiesSectionHidden"},{display:"border-bottom-right-radius",type:"multi",target:["border-bottom-right-radius","-moz-border-radius-bottomright"],values:["","0px","6px"],rowClass:"propertiesSectionHidden"},{display:"border-bottom-left-radius",
type:"multi",target:["border-bottom-left-radius","-moz-border-radius-bottomleft"],values:["","0px","6px"],rowClass:"propertiesSectionHidden"}]}]},{key:"fontsAndText",className:"maqPropertySection",addCommonPropertiesAtTop:!0,pageTemplate:[{display:"font",type:"text",target:["font"]},{display:"font-family",type:"font",target:["font-family"]},{display:"size",type:"multi",target:["font-size"],values:["","100%","1em","10px","10pt"]},{display:"color",type:"color",target:["color"]},{display:"font-weight",
type:"combo",target:["font-weight"],values:["","normal","bold"]},{display:"font-style",type:"combo",target:["font-style"],values:["","normal","italic"]},{display:"text-decoration",type:"combo",target:["text-decoration"],values:["","none","underline","line-through"]},{display:"text-align",type:"combo",target:["text-align"],values:["","left","center","right","justify"]},{display:"vertical-align",type:"combo",target:["vertical-align"],values:["","baseline","top","middle","bottom"]},{display:"white-space",
type:"combo",target:["white-space"],values:" normal nowrap pre pre-line pre-wrap".split(" ")},{display:"text-indent",type:"multi",target:["text-indent"],values:["","0","1em","10px"]},{display:"line-height",type:"multi",target:["line-height"],values:["","normal","1.2","120%"]}]}],buildRendering:function(){this.domNode=n.doc.createElement("div");n.addClass(this.domNode,"propertiesContent");var a;a=""+this._titleBarDiv;a+="\x3cdiv class\x3d'propertiesToolBar' dojoType\x3d'davinci.ve.widgets.WidgetToolBar'\x3e\x3c/div\x3e\x3cdiv dojoType\x3d'davinci.ve.widgets.WidgetProperties'\x3e\x3c/div\x3e";
a+="\x3cdiv class\x3d'propScrollableArea'\x3e";a+="\x3ctable class\x3d'propRootDetailsContainer'\x3e";a+="\x3ctr\x3e";a+="\x3ctd class\x3d'propPaletteRoot'\x3e";for(var c=0;c<this.pageTemplate.length;c++)if(this.pageTemplate[c].title=m[this.pageTemplate[c].key]?m[this.pageTemplate[c].key]:"Key not found",this.pageTemplate[c].pageTemplate)for(var b=0;b<this.pageTemplate[c].pageTemplate.length;b++)this.pageTemplate[c].pageTemplate[b].key&&(this.pageTemplate[c].pageTemplate[b].display+=m[this.pageTemplate[c].pageTemplate[b].key]?
m[this.pageTemplate[c].pageTemplate[b].key]:"Key not found");this.domNode.innerHTML=a;this.inherited(arguments)},_widgetValuesChanged:function(a){var c=this._currentPropSection;if(c){for(var b=!1,d=0;d<this.pageTemplate.length;d++)if(this.pageTemplate[d].key==c){b=!0;break}if(b)for(c=this._getVisibleCascade(d),b=0;b<c.length;b++)c[b]._widgetValuesChanged(a)}},_getVisibleCascade:function(a){if(a)return this.pageTemplate[a].cascade;a=[];var c=this._currentPropSection;if(c)for(var b=0;b<this.pageTemplate.length;b++)if(this.pageTemplate[b].key==
c){a=a.concat(this.pageTemplate[b].cascade);break}return a},_updatePaletteValues:function(a){if(this._editor){var c=a[0];this._subwidget=(this._widget=c)&&c.subwidget;this.setReadOnly(!(this._widget||this._subwidget));for(var c=this._getVisibleCascade(),b=0;b<c.length;b++)c[b]._widgetSelectionChanged(a)}},_widgetSelectionChanged:function(a){!0!==a.isFake&&this._updatePaletteValues(a.selection)},_stateChanged:function(){this._updatePaletteValues(this._widget?[this._widget]:[])},_widgetPropertiesChanged:function(a){this._widget&&
this._widget.type!==a[0].type||this._updatePaletteValues(a)},_titlePaneOpen:function(a){a=this._getVisibleCascade(a);for(var c=0;c<a.length;c++)a[c]._editorSelected({editor:this._editor})},startup:function(){this.domNode.style.height="100%";this._editor=b.currentEditor;this.inherited(arguments);for(var a=0;a<this.pageTemplate.length;a++){var c=this.pageTemplate[a];if(c.pageTemplate)for(var d=0;d<c.pageTemplate.length;d++){var e=c.pageTemplate[d];e.onchange&&e.id&&n.connect(n.byId(e.id),"onchange",
n.hitch(c,e.onchange,d))}}for(a=0;a<this.pageTemplate.length;a++)this.pageTemplate[a].cascade=[];try{this.setReadOnly(!0)}catch(k){logError(k,"set read only crashed ! "+k)}this.onEditorSelected();this.subscribe("/davinci/ui/widgetValuesChanged",n.hitch(this,this._widgetValuesChanged));this.subscribe("/davinci/ui/widgetPropertiesChanged",n.hitch(this,this._widgetPropertiesChanged));this.subscribe("/davinci/ui/editorSelected",n.hitch(this,this._editorSelected));this.subscribe("/davinci/ui/widgetSelected",
n.hitch(this,this._widgetSelectionChanged));this.subscribe("/davinci/states/state/changed",n.hitch(this,this._stateChanged));this.subscribe("/maqetta/appstates/state/changed",n.hitch(this,this._stateChanged));this.subscribe("/davinci/ui/initialPerspectiveReady",n.hitch(this,this._initialPerspectiveReady));this.subscribe("/davinci/workbench/ready",n.hitch(this,this._workbenchReady))},setReadOnly:function(a){for(var c=0;c<this.pageTemplate.length;c++){var b=this.pageTemplate[c].pageTemplate;if(b)for(var d=
0;d<b.length;d++){var e=b[d].widget;e?e.set("readOnly",a):(e=b[d].domNode)&&n.attr(e,"disabled",a)}}},_modelEntryById:function(a){for(var c=0;c<this.pageTemplate.length;c++){var b=this.pageTemplate[c].pageTemplate;if(b)for(var d=0;d<b.length;d++)if(a==b[d].id)return b[d]}},_editorSelected:function(a){this._editor=a.editor;this.onEditorSelected(this._editor);a=this.tabContainer;this.getParent();var c=a.selectedChildWidget||a.getSelected(),b=!1,d=n.query(".maqPropertySection",a.domNode);this._editor?
"davinci.ve.PageEditor"!=this._editor.declaredClass&&"davinci.ve.themeEditor.ThemeEditor"!=this._editor.declaredClass?d.forEach(function(a){dijit.byNode(a)==c&&(b=!0)}):(d.forEach(function(a){}),"davinci.ve.themeEditor.ThemeEditor"==this._editor.declaredClass&&n.query(".page_editor_only",a.domNode).forEach(function(a){dijit.byNode(a)==c&&(b=!0)})):(d.forEach(function(a){dijit.byNode(a)}),b=!0);b&&this._selectFirstVisibleTab()},onEditorSelected:function(){this._subWidget=this._widget=null;if(this._oldClassName)if(this.domNode)n.removeClass(this.domNode.parentNode.parentNode,
this._oldClassName);else{console.error("have no dom node ! : "+this.id);return}if(this._editor)if(this._editor&&this._editor.editorID&&(this._oldClassName=this._editor.editorID.replace(/\./g,"_"),this.domNode?n.addClass(this.domNode.parentNode.parentNode,this._oldClassName):console.error("have no dom node !")),this.domNode){for(var a=this._currentPropSection,c=n.query(".propSectionButton",this.domNode),b=0;b<c.length;b++){var d=c[b];this._editor&&this._editor.supports&&this._editor.supports("propsect_"+
this.pageTemplate[b].key)?n.removeClass(d,"dijitHidden"):(n.addClass(d,"dijitHidden"),a==this.pageTemplate[b].key&&k.showRoot())}a=[];for(b=0;b<this.pageTemplate.length;b++)(c=this.pageTemplate[b].cascade)&&(a=a.concat(c));for(b=0;b<a.length;b++)c=a[b],c._editorSelected&&c._editorSelected({editor:this._editor})}else console.error("have no dom node !")},_destroyContent:function(){var a=this.containerNode||this.domNode;for(n.forEach(n.query("[widgetId]",a).map(dijit.byNode),function(a){a.destroy()});a.firstChild;)n._destroyElement(a.firstChild);
n.forEach(this._tooltips,function(a){a.destroy()});this._tooltips=void 0;this._destroyHandles()},sectionTitleFromKey:function(a){for(var c=0;c<this.pageTemplate.length;c++)if(this.pageTemplate[c].key==a)return this.pageTemplate[c].title},_initialPerspectiveReady:function(){var a=null;if(!this._alreadySplitIntoMultipleTabs){var c=this.tabContainer;n.addClass(c.domNode,"propRootDetailsContainer");n.addClass(c.domNode,"propertiesContent");for(var b=0;b<this.pageTemplate.length;b++){var a=this.pageTemplate[b].key,
d=this.pageTemplate[b].title,e=this.pageTemplate[b].className;e||(e="");var h=this._titleBarDiv,h=h+"\x3cdiv class\x3d'propertiesToolBar' dojoType\x3d'davinci.ve.widgets.WidgetToolBar'\x3e\x3c/div\x3e",h=h+("\x3cdiv class\x3d'cascadeBackButtonDiv'\x3e\x3cbutton class\x3d'btn-info' onclick\x3d'davinci.ve.widgets.HTMLStringUtil.showSection(\""+a+'","'+d+"\")'\x3e"+d+" "+m.properties+"\x3c/button\x3e\x3c/div\x3e"),a=k.generateTemplate(this.pageTemplate[b]),a=h+a;0==b?(a=this,a.set("title",d),n.addClass(a.domNode,
e)):(h=c.createTab(d,null,null,null,{"class":e,delegate:this}),a=g.addWidget(f,{title:d,content:a,"class":e,delegate:this},null,h,!1),h.cp=a,h._maqPropGroup=this.pageTemplate[b].key,h.add(a,null,!1));a._maqPropGroup=this.pageTemplate[b].key;d=n.query(".paletteCloseBox",a.domNode);0<d.length&&n.connect(d[0],"click",this,function(a){davinci.Workbench.collapsePaletteContainer(a.currentTarget)})}for(d=0;d<this.pageTemplate.length;d++)if(this.pageTemplate[d].cascade=[],e=this.pageTemplate[d].pageTemplate){for(b=
0;b<e.length;b++)h=e[b].id,(a=dijit.byId(h))?e[b].widget=a:(a=n.byId(h))&&(e[b].domNode=a);n.query("#"+this.pageTemplate[d].id+" .CascadeTop").forEach(function(a){return function(c){c=dijit.byId(c.id);a.cascade.push(c)}}(this.pageTemplate[d]))}c._on("selectChild",function(a){a._maqPropGroup&&(this._currentPropSection=a._maqPropGroup,a=(a=this._editor&&this._editor.getContext?this._editor.getContext():null)&&a.getSelection?a.getSelection():[],this._updatePaletteValues(a),k._initSection(this._currentPropSection))}.bind(this));
this._alreadySplitIntoMultipleTabs=!0}},_workbenchReady:function(){this._updateToolBars()},_updateToolBars:function(){n.query(".propertiesToolBar").forEach(function(a){this._editor&&"davinci.ve.PageEditor"==this._editor.declaredClass?(n.removeClass(a,"dijitHidden"),a.style.display=""):n.addClass(a,"dijitHidden")}.bind(this))},_selectFirstVisibleTab:function(){var a=this.getParent();if(a&&a.getChildren)for(var c=a.getChildren(),b=0;b<c.length;b++){var d=c[b];if("none"!=d.controlButton.domNode.style.display){a._maqDontExpandCollapse=
!0;a.selectChild(d);delete a._maqDontExpandCollapse;break}}}})})},"davinci/workbench/WidgetLite":function(){define(["dojo/_base/declare","dijit/_WidgetBase","dojo/parser","xide/mixins/EventedMixin"],function(p,n,m,h){return p("davinci.workbench.WidgetLite",[n,h],{buildRendering:function(){this.inherited(arguments);/dojotype/i.test(this.domNode.innerHTML||"")&&(this._startupWidgets=dojo.parser.parse(this.domNode,{noStart:!this._earlyTemplatedStartup,inherited:{dir:this.dir,lang:this.lang}}))},_destroyContent:function(){var g=
this.containerNode||this.domNode;for(dojo.forEach(dojo.query("[widgetId]",g).map(dijit.byNode),function(f){f.destroy()});g.firstChild;)dojo._destroyElement(g.firstChild);dojo.forEach(this._tooltips,function(f){f.destroy()});delete this._tooltips;this._destroyHandles()},startup:function(){dojo.forEach(this._startupWidgets,function(g){g&&!g._started&&g.startup&&g.startup()});this.inherited(arguments)}})})},"davinci/ve/widgets/HTMLStringUtil":function(){define("davinci/Runtime ./FontDataStore ./FontComboBox ./MultiInputDropDown dijit/form/ComboBox ./MetaDataStore ./ColorPicker ./Background".split(" "),
function(p,n){var m=dojo.getObject("davinci.ve.widgets.HTMLStringUtil",!0);dojo.mixin(m,{__id:0,idPrefix:"davinci_ve_widgets_properties_generated",_currentPropSection:null,animSS:null,animRuleIndex:{},getCurrentPropSection:function(){return this._currentPropSection},getId:function(){return this.idPrefix+this.__id++},injectId:function(h,g){var f=h.indexOf("\x3e");return f?h.substring(0,f)+" id\x3d'"+g+"'"+h.substring(f,h.length):"\x3cspan id\x3d'"+g+"'\x3e"+h+"\x3c/span\x3e"},getEditor:function(h){function g(b){var d=
{};d.value="undefined"!=typeof b.value&&null!==b.value?b.value:b;d.title=b.title||d.value;return d}var f=h.type,b=this.getId();h.id=b;var e=h.disabled?" disabled\x3d'true' ":"";switch(f){case "multi":return f="",h.values&&(f="data\x3d'"+dojo.toJson(dojo.map(h.values,function(b){return{value:b}}))+"'"),"\x3cdiv dojoType\x3d'davinci.ve.widgets.MultiInputDropDown' "+f+" class\x3d'propertyPaneEditablevalue' style\x3d'display:inline-block; width:100%;' id\x3d'"+b+"'"+e+"\x3e\x3c/div\x3e";case "boolean":return"\x3cinput type\x3d'checkbox' class\x3d'propertyPaneEditablevalue' style\x3d'display:inline-block;margin-left:5px' id\x3d'"+
b+"'\x3e\x3c/input\x3e";case "comboEdit":h=h.values;b="\x3cselect dojoType\x3d'dijit.form.ComboBox' autoComplete\x3d'false' style\x3d'display:inline-block; width:100%;' id\x3d'"+b+"'"+e+"\x3e";for(e=0;e<h.length;e++)f=g(h[e]),b+="\x3coption class\x3d'option' value\x3d'"+f.value+"'\x3e"+f.title+"\x3c/option\x3e";return b+="\x3c/select\x3e";case "combo":h=h.values;b="\x3cselect class\x3d'form-control input-transparent' style\x3d'display:inline-block; width:100%;' id\x3d'"+b+"'"+e+"\x3e";for(e=0;e<h.length;e++)f=
g(h[e]),b+="\x3coption class\x3d'option' value\x3d'"+f.value+"'\x3e"+f.title+"\x3c/option\x3e";return b+="\x3c/select\x3e";case "font":return b="\x3cdiv dojoType\x3d'davinci.ve.widgets.FontDataStore' jsId\x3d'"+b+"_fontStore'\x3e"+("\x3cdiv dojoType\x3d'davinci.ve.widgets.FontComboBox' value\x3d'"+n.fonts[0].value+"' store\x3d'"+b+"_fontStore' id\x3d'"+b+"' class\x3d'propertyPaneEditablevalue' style\x3d'display:inline-block; width:100%;'\x3e\x3c/div\x3e");case "state":return b="\x3cdiv dojoType\x3d'davinci.ve.widgets.MetaDataStore' jsId\x3d'davinci.properties.event"+
b+"_Store'\x3e"+("\x3cdiv dojoType\x3d'dijit.form.ComboBox' id\x3d'"+b+"'store\x3d'davinci.properties.event"+b+"_Store' class\x3d'propertyPaneEditablevalue' style\x3d'display:inline-block; width:100%;' autoComplete\x3d'false'\x3e\x3c/div\x3e");case "color":return"\x3cdiv class\x3d'propertyPaneEditablevalue' dojoType\x3d'davinci.ve.widgets.ColorPicker' id\x3d'"+b+"' \x3e\x3c/div\x3e";case "background":return f=dojo.isArray(h.values)?" data\x3d'"+dojo.toJson(h.values)+"'":"",e=" propname\x3d'"+(dojo.isArray(h.target)?
h.target[0]:h.target)+"'",b="\x3cdiv dojoType\x3d'davinci.ve.widgets.Background' id\x3d'"+b+"'"+f+e+(h.colorswatch?" colorswatch\x3d'true'":"")+"\x3e\x3c/div\x3e";case "border":case "number":case "object":case "text":case "array":case "widgetState":case "string":if("date"==h.format)return"\x3cdiv class\x3d'propertyPaneEditablevalue' dojoType\x3d'dijit.form.DateTextBox' id\x3d'"+b+"'\x3e\x3c/input\x3e";if("time"==h.format)return"\x3cdiv class\x3d'propertyPaneEditablevalue' dojoType\x3d'dijit.form.TimeTextBox' id\x3d'"+
b+"'\x3e\x3c/input\x3e";default:return b=h.data&&!0===h.data.readonly?"\x3cinput readonly type\x3d'text' class\x3d'form-control input-transparent propertyPaneEditablevalue' style\x3d'display:inline-block; width:100%;' id\x3d'"+b+"'\x3e\x3c/input\x3e":"\x3cinput type\x3d'text' class\x3d'form-control input-transparent propertyPaneEditablevalue' style\x3d'display:inline-block; width:100%;' id\x3d'"+b+"'\x3e\x3c/input\x3e"}},generateTable:function(h,g){var f=g?g.rowsOnly:!1,b=g&&g.zeroSpaceForIncrDecr?
"0px":"20px",e="";if(h.html)return h.id=this.getId(),this.injectId(h.html,h.id);var k;k="\x3ctable class\x3d'property_table_stretchable' border\x3d'0' width\x3d'100%' align\x3d'center' cellspacing\x3d'0' cellpadding\x3d'0'\x3e\x3ccolgroup\x3e\x3ccol style\x3d'width:6px;' /\x3e";k+="\x3ccol class\x3d'gap02' /\x3e";k+="\x3ccol class\x3d'gap03' /\x3e";k+="\x3ccol style\x3d'width:"+b+";' /\x3e";k+="\x3ccol style\x3d'width:6px;' /\x3e";k+="\x3c/colgroup\x3e";f||(e+=k);for(b=0;b<h.length;b++)if(h[b].widgetHtml)h[b].id=
this.getId(),h[b].rowId=this.getId(),e+="\x3ctr id\x3d'"+h[b].rowId+"'",h[b].rowClass&&(e+=" class\x3d'"+h[b].rowClass+"'"),e+="\x3e",e+="\x3ctd colspan\x3d'5' width\x3d'100%'\x3e",e+=this.injectId(h[b].widgetHtml,h[b].id),e+="\x3c/td\x3e",e+="\x3c/tr\x3e";else if(h[b].html)h[b].id=this.getId(),h[b].rowId=this.getId(),e+="\x3ctr id\x3d'"+h[b].rowId+"'",e+=" class\x3d'cssPropertySection",h[b].rowClass&&(e+=" "+h[b].rowClass),e+="'\x3e",e+="\x3ctd colspan\x3d'5' width\x3d'100%'\x3e",e+=h[b].html,e+=
"\x3c/td\x3e",e+="\x3c/tr\x3e";else if("toggleSection"==h[b].type){for(var e=e+("\x3ctr id\x3d'"+h[b].id+"' class\x3d'cssPropertySection'\x3e\x3ctd colspan\x3d'5'\x3e"),d="",c=this.generateTable(h[b].pageTemplate,{rowsOnly:!0}),a=0;a<h[b].pageTemplate.length;a++)h[b].pageTemplate[a].rowId&&(d+="dojo.toggleClass('"+h[b].pageTemplate[a].rowId+"','propertiesSectionHidden');"),h[b].pageTemplate[a].cascadeSectionRowId&&(d+="if(this.checked){dojo.removeClass('"+h[b].pageTemplate[a].cascadeSectionRowId+
"','propertiesSectionHidden');}else{{dojo.addClass('"+h[b].pageTemplate[a].cascadeSectionRowId+"','propertiesSectionHidden');}}");e+="\x3cinput type\x3d'checkbox' onclick\x3d\""+d+'"\x3e\x3c/input\x3e';e+=h[b].display;e+="\x3c/td\x3e\x3c/tr\x3e";e+=c}else h[b].display?(h[b].toggleCascade=this.getId(),h[b].cascadeSection=this.getId(),h[b].rowId=this.getId(),h[b].cascadeSectionRowId=this.getId(),e+="\x3ctr id\x3d'"+h[b].rowId+"'",e+=" class\x3d'cssPropertySection",h[b].rowClass&&(e+=" "+h[b].rowClass),
e+="'",e+=" propName\x3d'"+h[b].display+"'",e+="\x3e",e+="\x3ctd/\x3e",e+="\x3ctd class\x3d'propertyDisplayName'\x3e"+h[b].display+":\x26nbsp;\x3c/td\x3e",e+="\x3ctd class\x3d'propertyInputField propertyInputField"+h[b].type+"' \x3e"+this.getEditor(h[b])+"\x3c/td\x3e",e+="\x3ctd class\x3d'propertyExtra' nowrap\x3d'true'\x3e",e+="\x3ctd class\x3d'propertyExtra2' nowrap\x3d'true'\x3e",h[b].target&&!h[b].hideCascade&&(e+="\x3cdiv width\x3d'100%'\x3e\x3cbutton class\x3d'showCss propertyButton' id\x3d'"+
h[b].toggleCascade+"'",e+=' onClick\x3d"davinci.ve.widgets.HTMLStringUtil.showProperty(',e+="'"+h[b].rowId+"'",e+=')"\x3e\x26gt;\x3c/button\x3e',e+="\x3c/div\x3e"),e+="\x3ctd/\x3e",e+="\x3c/tr\x3e",h[b].target&&!h[b].hideCascade&&(d="{'cascadeSectionRowId':\""+h[b].cascadeSectionRowId+"\",'toggleCascade':\""+h[b].toggleCascade+'"}',e+="\x3ctr id\x3d'"+h[b].cascadeSectionRowId+"' class\x3d'cssCascadeSection cascadeRowHidden'\x3e",e+="\x3ctd colspan\x3d'5' width\x3d'100%' class\x3d'showCascadeDiv'\x3e\x3cdiv dojoType\x3d'davinci.ve.widgets.Cascade' toggleClasses\x3d"+
d+" target\x3d'"+dojo.toJson(h[b].target)+"' targetField\x3d'\""+h[b].id+"\"' id\x3d'"+h[b].cascadeSection+"'\x3e\x3c/div\x3e\x3c/td\x3e\x3c/tr\x3e")):(e+="\x3c/table\x3e",e+=this.getEditor(h[b]),e+=k);f||(e+="\x3c/table\x3e");return e},generateTemplate:function(h){var g="";h.pageTemplate?(h.key&&(h.id=this.getId(),g="\x3cdiv class\x3d'propGroup' id\x3d'"+h.id+"' propGroup\x3d'"+h.key+"'\x3e"),g+=this.generateTable(h.pageTemplate),g+="\x3c/div\x3e"):h.html?g+=h.html:h.widgetHtml&&(h.id=this.getId(),
g+=this.injectId(h.widgetHtml,h.id));return g},stylesheetHref:"propview.css",animShowSectionClass:"propRootDetailsContainer",animShowSectionClassSelector:".propRootDetailsContainer",animShowDetailsClass:"property_table_stretchable",animShowDetailsClassSelector:".property_table_stretchable",showPropAnimClasses:["propRowFadeIn","propRowFadeOut","propRowTransparent","propRowOpaque","propRowHidden"],showRoot:function(){this._hideSectionShowRoot();this._currentPropSection=null;return!1},showSection:function(h,
g){this._initSection(h);return!1},showProperty:function(h){function g(a){dojo.disconnect(B);dojo.disconnect(y);f();var c=e._findRule(e.animShowDetailsClassSelector);c?(a=c.ss,c=c.ruleIndex,a.deleteRule(c),a.insertRule(e.animShowDetailsClassSelector+" { margin-top:0px; }",c),b()):console.error("HTMLStringUtil showProperty: transEnd: rule not found")}var f=function(){for(var a=0;a<c.children.length;a++){var b=c.children[a];1==b.nodeType&&dojo.hasClass(b,"cssPropertySection")&&(b==d?e._addRemoveClasses(b,
k,[]):e._addRemoveClasses(b,k,["propRowHidden"]))}},b=function(){q&&(dojo.removeClass(q,"cascadeRowHidden"),dojo.addClass(q,"cascadeRowTransparent"),setTimeout(function(){dojo.removeClass(q,"cascadeRowTransparent");dojo.addClass(q,"cascadeRowFadeIn")},1))};dojo.addClass(dojo.byId("root"),"showingCascade");var e=this,k=this.showPropAnimClasses,d=dojo.byId(h),c=d.parentNode,a=e._searchSiblingsByTagClass(c.children[0],"TR","cssPropertySection"),q=e._searchSiblingsByTagClass(d.nextSibling,"TR","cssCascadeSection");
h=e._searchUpByTagClass(c,"TABLE",e.animShowDetailsClass);var m=e._searchUpByTagClass(d,"DIV","propGroup"),m=dojo.attr(m,"propGroup");dojo.attr(d,"propName");require("davinci/ve/views/SwitchingStyleView").prototype.sectionTitleFromKey(m);if(p.supportsCSS3Transitions){var a=dojo.marginBox(a),a=dojo.marginBox(d).t-a.t,n=e._findRule(e.animShowDetailsClassSelector);if(n){var m=n.ss,n=n.ruleIndex,B=dojo.connect(h,"webkitTransitionEnd",g),y=dojo.connect(h,"transitionend",g);m.deleteRule(n);m.insertRule(e.animShowDetailsClassSelector+
" { margin-top:-"+a+"px; opacity:.99; -webkit-transition: all .6s ease; -moz-transition: all .6s ease; }",n);h=!1;for(a=0;a<c.children.length;a++)m=c.children[a],1==m.nodeType&&dojo.hasClass(m,"cssPropertySection")&&(m==d?(e._addRemoveClasses(m,k,["propRowFadeIn"]),h=!0):h?e._addRemoveClasses(m,k,["propRowHidden"]):e._addRemoveClasses(m,k,["propRowTransparent"]))}else console.error("HTMLStringUtil showProperty: transEnd: rule not found")}else f(),b()},_initSection:function(h){for(var g=this.showPropAnimClasses,
f=this._getRootTD(),b=dojo.query(".propGroup",f),e,f=0;f<b.length;f++){var k=b[f];dojo.attr(k,"propGroup")==h?(dojo.removeClass(k,"dijitHidden"),e=k):dojo.addClass(k,"dijitHidden")}b=dojo.query(".cssPropertySection",e);for(f=0;f<b.length;f++)this._addRemoveClasses(b[f],g,[]);g=dojo.query(".cssCascadeSection",e);for(f=0;f<g.length;f++)dojo.addClass(g[f],"cascadeRowHidden");this._currentPropSection=h;dojo.removeClass(dojo.byId("root"),"showingCascade")},_hideSectionShowRoot:function(){var h=this._getRootTD();
dojo.removeClass(h,"dijitHidden")},_findRule:function(h){function g(b,k){for(var d=0;d<b.cssRules.length;d++){var c=b.cssRules[d];if(3===c.type){if(c=g(c.styleSheet,k))return c}else if(c.selectorText==k)return{ss:b,ruleIndex:d}}}if(this.animSS&&"number"==typeof this.animRuleIndex[h]){var f=this.animRuleIndex[h];if(this.animSS.cssRules[f].selectorText==h)return{ss:this.animSS,ruleIndex:f}}for(f=0;f<document.styleSheets.length;f++){var b=g(document.styleSheets[f],h);if(b)return this.animSS=b.ss,this.animRuleIndex[h]=
b.ruleIndex,b}return null},_addRemoveClasses:function(h,g,f){for(var b=[],e=0;e<g.length;e++){for(var k=!1,d=0;d<f.length;d++)if(g[e]==f[d]){k=!0;break}k||b.push(g[e])}for(e=0;e<b.length;e++)dojo.removeClass(h,b[e]);for(e=0;e<f.length;e++)dojo.addClass(h,f[e])},_searchUpByTagClass:function(h,g,f){for(;null!=h&&"BODY"!=h.nodeName;){if(h.nodeName==g&&(!f||dojo.hasClass(h,f)))return h;h=h.parentNode}return null},_searchSiblingsByTagClass:function(h,g,f){for(;null!=h;){if(h.nodeName==g&&(!f||dojo.hasClass(h,
f)))return h;h=h.nextSibling}return null},_getRootDetailsContainer:function(){this._rootDetailsContainer||(this._rootDetailsContainer=dojo.query(this.animShowSectionClassSelector)[0]);return this._rootDetailsContainer},_getRootTD:function(){var h=this._getRootDetailsContainer();this._rootTD||(this._rootTD=dojo.query(".propPaletteRoot",h)[0]);return this._rootTD}});return m})},"davinci/ve/widgets/FontDataStore":function(){define(["dojo/_base/declare","dojo/data/ItemFileReadStore","davinci/lang/ve",
"dijit/lang/_common"],function(p,n){var m=p("davinci.ve.widgets.FontDataStore",n,{_allValues:[],constructor:function(h){this.setValues(h.values||davinci.ve.widgets.FontDataStore.fonts)},setValues:function(h){this._allValues=this._allValues.concat(h);this._jsonData={label:"name",identifier:"value",items:this._allValues};this._loadFinished=!1},contains:function(h){for(var g=0;g<this._allValues.length;g++)if(this._allValues[g].value==h||this._allValues[g].name==h)return g;return!1},clearValues:function(){this._allValues=
[];this._loadFinished=!1},lookupValue:function(h){h=this.contains(h);return this._allValues[h].value[0]}});return dojo.mixin(m,{fonts:[{name:"",value:""},{name:"Arial,Helvetica,sans-serif",value:"Arial,Helvetica,sans-serif"},{name:"'Arial Black,Gadget',sans-serif",value:"'Arial Black,Gadget',sans-serif"},{name:"'Comic Sans MS',cursive",value:"'Comic Sans MS',cursive"},{name:"'Courier New',Courier,monospace",value:"'Courier New',Courier,monospace"},{name:"Geneva,Tahoma,sans-serif",value:"Geneva,Tahoma,sans-serif"},
{name:"Georgia,serif",value:"Georgia,serif"},{name:"'Helvetica,Trebuchet MS',sans-serif",value:"'Helvetica,Trebuchet MS',sans-serif"},{name:"Impact,Charcoal,sans-serif",value:"Impact,Charcoal,sans-serif"},{name:"'Lucida Console',Monaco,monospace",value:"'Lucida Console',Monaco,monospace"},{name:"'Lucida Sans Unicode','Lucida Grande',sans-serif",value:"'Lucida Sans Unicode','Lucida Grande',sans-serif"},{name:"'Lucida Console', Monaco, monospace",value:"'Lucida Console', Monaco, monospace"},{name:"'Palatino Linotype','Book Antiqua',Palatino,serif",
value:"'Palatino Linotype','Book Antiqua',Palatino,serif"},{name:"Symbol",value:"Symbol"},{name:"Tahoma,Geneva,sans-serif",value:"Tahoma,Geneva,sans-serif"},{name:"'Times New Roman',Times,serif",value:"'Times New Roman',Times,serif"},{name:"'Trebuchet MS',Helvetica,sans-serif",value:"'Trebuchet MS',Helvetica,sans-serif"},{name:"Verdana,Geneva,sans-serif",value:"Verdana,Geneva,sans-serif"},{name:"Webdings",value:"Webdings"},{name:"Wingdings, 'Zapf Dingbats'",value:"Wingdings, 'Zapf Dingbats'"},{name:"'Zapf Dingbats', Wingdings",
value:"'Zapf Dingbats', Wingdings"},{name:"sans-serif",value:"sans-serif"},{name:"serif",value:"serif"},{name:"monospace",value:"monospace"},{name:"cursive",value:"cursive"},{name:"LCD",value:"LCD"}]})})},"davinci/ve/widgets/FontComboBox":function(){define(["dojo/_base/declare","dijit/form/ComboBox","davinci/lang/ve","dijit/lang/_common"],function(p,n){return p("davinci.ve.widgets.FontComboBox",n,{_getValueAttr:function(){if(this.store)for(var m=0;m<this.store._allValues.length;m++){var h=this.store._allValues[m];
if(h.name[0]==this.value)return h.value[0]}return this.value},_setValueAttr:function(m){this.store&&m?this.store.fetch({query:{value:m},onComplete:function(h,g){1>h.length?this.inherited("_setValueAttr",[m]):(this.inherited("_setValueAttr",[h[0].name[0]]),this.item=h[0])}.bind(this),onError:function(){this.inherited("_setValueAttr",[m])}.bind(this)}):this.inherited("_setValueAttr",[m])}})})},"davinci/ve/widgets/MultiInputDropDown":function(){define("dojo/_base/declare xide/widgets/TemplatedWidgetBase xide/form/Select dcl/dcl xide/data/TreeMemory xide/data/ObservableStore dstore/Trackable xide/factory dojo/_base/lang".split(" "),
function(p,n,m,h,g,f,b,e,k){var d=h(n,{numberDelta:1,templateString:"\x3cdiv \x3e\x3c/div\x3e",insertPosition:1,declaredClass:"davinci.ve.widgets.MultiInputDropDown",data:null,divider:"---",postCreate:function(){},get:function(c){return"value"===c&&this._dropDown?this._getValueAttr():""},startup:function(){var c=dojo.doc.createElement("div");this._run={};var a=this;this.data?(this.data.push({value:d.divider}),this.data.push({label:"Remove Value",value:"Remove Value",run:function(){this.set("value",
"",!1);a._dropDown.set("value","",!0)}})):this.data=[{value:"auto"},{value:"0px"},{value:d.divider},{value:"Remove Value",run:function(){this.set("value","",!1);a._dropDown.set("value","")}},{value:d.divider},{value:"Help",run:function(){alert("help!")}}];for(var k=[],h=0;h<this.data.length;h++)k.push(this.data[h].value),this.data[h].run&&(this._run[this.data[h].value]=this.data[h].run);var n=[];_.each(this.data,function(a){n.push({label:a.label||a.value,value:a.value,run:a.run})});this._dropDown=
new m({EDITABLE_CLASS:m.TYPEAHEAD,storeClass:p("driverStore",[g,b,f],{setValues:function(a){var c=[],b=0;a&&(this._values=a);dojo.forEach(this.data,dojo.hitch(this,function(a){c.push({label:a.label,value:a.value,id:b++})}));this._jsonData={identifier:"id",items:c};this.setData(c);this.root._emit("update",{target:null})},modifyItem:function(c,b){for(var d=0;d<this.data.length;d++)this.data[d].value===c&&(this.data[d].value=b);a._dropDown.set("value",b);this.setValues()},insert:function(a,c){this.data.splice(a,
0,{value:c,label:c});this.setValues()},contains:function(a){for(var c=0;c<this.data.length;c++)if(this.data[c].value==a)return!0;return!1},findSimilar:function(a){if(a=(new RegExp(/(\D*)(-?)(\d+)(\D*)/)).exec(a)){a=new RegExp((0<a.length?a[1]:"")+"(-?)(\\d+)"+(3<a.length?a[4]:""));for(var c=0;c<this.data.length;c++)if(a.test(this.data[c].value))return this.data[c].value}},getItemNumber:function(a){return this.data[a]},clearValues:function(){this._loadFinished=!1}}),required:!1,title:"",editable:!0,
options:n,selectOptions:{container:"body",liveSearch:!0,createItem:!0,createItemText:"Create: {0}"},userData:{}});this._dropDown.startup();this._store=this._dropDown.store;this._plus=e.createButton(this._dropDown.previewNode,"fa-plus","btn-default btn-xs2",null,"");this._minus=e.createButton(this._dropDown.button0,"fa-minus","btn-default btn-xs2",null,"");k=dojo.create("div",{"class":"propInputWithIncrDecrButtons"});k.appendChild(this._dropDown.domNode);c.appendChild(k);k=dojo.doc.createElement("div");
dojo.style(k,"clear","both");c.appendChild(k);this._currentValue=this._store.data[0];dojo.connect(this._dropDown,"onKeyUp",this,"_updateSpinner");var B=this;this._dropDown._on?this._dropDown._on("change",function(a){B._onChange(a)}):dojo.connect(this._dropDown,"onChange",this,"_onChange");dojo.connect(this._plus,"onclick",this,"_plusButton",!1);dojo.connect(this._minus,"onclick",this,"_minusButton",!1);this._updateSpinner();this.domNode.appendChild(c);this.add(this._dropDown);this.add(this._store)},
_setReadOnlyAttr:function(c){this._isReadOnly=c;this._dropDown&&(this._dropDown.set("disabled",c),dojo.attr(this._plus,"disabled",c),dojo.attr(this._minus,"disabled",c))},onChange:function(c){},_getValueAttr:function(){return this._dropDown.get("value")},_setValueAttr:function(c,a){this._dropDown.set("value",c,!0);this._currentValue=this._dropDown.get("value");!1!==a&&this._onChange(this._currentValue);if(!a)this.onChange()},_changeValue:function(c,a){for(var b=c.split(" "),d="",e=0;e<b.length;e++){0<
e&&(d+=" ");var k=b[e].match(/([-\d\.]+)([a-zA-Z%]*)/);if(k)if(1==k.length)d+=k[0];else for(var f=1;f<k.length;f++)d=isNaN(k[f])||""==k[f]?d+k[f]:d+(parseFloat(k[f])+a);else d+=b[e]}return d},_plusButton:function(){var c=this._dropDown.get("value"),a=this._changeValue(c,this.numberDelta);this._store.modifyItem(c,a);this._dropDown.set("value",a);this._onChange(a)},_minusButton:function(){var c=this._dropDown.get("value"),a=this._changeValue(c,-1*this.numberDelta);this._store.modifyItem(c,a);this._dropDown.set("value",
a);this._onChange(a)},_updateSpinner:function(){var c=this._dropDown.get("value"),c=/(-?)(\d+){1}/.exec(c);this._minus.disabled=c&&c.length?this._plus.disabled=!1:this._plus.disabled=!0;return!0},_onChange:function(c){var a;c in this._run?(this._dropDown.get("value",this._store.getItemNumber(0)),dojo.hitch(this,this._run[c])()):c==d.divider?this._dropDown.get("value",this._store.getItemNumber(0)):(a=this._store.findSimilar(c))?this._store.modifyItem(a,c):this._store.contains(c)||this._store.insert(this.insertPosition,
c);this._currentValue!=this._dropDown.get("value")&&(this._currentValue=this._dropDown.get("value"),this.onChange(c));this._updateSpinner()}});d.divider="---";k.setObject("davinci.ve.widgets.MultiInputDropDown",d);return d})},"davinci/ve/widgets/MetaDataStore":function(){define(["dojo/_base/declare","dojo/data/ItemFileReadStore","davinci/lang/ve","dijit/lang/_common"],function(p,n){return p("davinci.ve.widgets.MetaDataStore",n,{_allValues:[],constructor:function(m){this.setValues(m&&m.values||[])},
setValues:function(m){dojo.mixin(this._allValues,m);var h=[];dojo.forEach(this._allValues,function(g){h.push({name:g,value:g})});this._jsonData={identifier:"name",items:h};this._loadFinished=!1},contains:function(m){return-1!=dojo.indexOf(this._allValues,m)},clearValues:function(){this._allValues=[];this._loadFinished=!1}})})},"davinci/ve/widgets/ColorPicker":function(){define(["davinci/ve/widgets/ColorPicker2","dijit/popup"],function(p){return p})},"davinci/ve/widgets/ColorPicker2":function(){define(["xide/widgets/ColorPickerWidget",
"xide/utils","dcl/dcl","xide/widgets/TemplatedWidgetBase","dojo/_base/lang"],function(p,n,m,h,g){m=m(h,{templateString:"\x3cdiv \x3e\x3c/div\x3e",numberDelta:1,insertPosition:9,data:null,_onChange:function(f){},_setValueAttr:function(f,b){if(this._dropDown&&(this._dropDown.set("value",f.replace("#",""),!0),this._currentValue=this._dropDown.get("value"),!1!==b&&this._onChange(this._currentValue),!b&&f!==this._currentValue))this.onChange()},set:function(f,b){if("value"===f&&this._dropDown)return this._setValueAttr(b)},
get:function(f){return"value"===f&&this._dropDown?this._getValueAttr():""},postCreate:function(){},startup:function(){var f=n.addWidget(p,{title:""},null,this.domNode,!0);this._dropDown=f;this._value=this._value||"";this._dropDown.set("value",this._value.replace("#",""),!0);var b=this;this._dropDown._on("change",function(e){b._value=b._getValueAttr();b.onChange(b._value)});this.add(f)},_setReadOnlyAttr:function(f){this._isReadOnly=f;this._dropDown.set("disabled",f)},onChange:function(){this._value=
this._dropDown.get("value")},_getValueAttr:function(){return this._dropDown.get("value")}});dojo.mixin(m,{divider:"---"});g.setObject("davinci.ve.widgets.ColorPicker",m);return m})},"davinci/ve/widgets/Background":function(){define("dojo/_base/declare dojo/Deferred davinci/workbench/WidgetLite davinci/ve/widgets/ColorPickerFlat davinci/ve/widgets/ColorStore davinci/ve/widgets/MutableStore dijit/form/ComboBox davinci/ve/widgets/BackgroundDialog davinci/Workbench davinci/ve/utils/URLRewrite davinci/model/Path davinci/lang/ve dijit/lang/_common davinci/ve/utils/CssUtils davinci/ve/widgets/ColorPicker xide/views/_PanelDialog xide/utils".split(" "),
function(p,n,m,h,g,f,b,e,k,d,c,a,q,w,r,B,y){var x=0;return p("davinci.ve.widgets.Background",[m],{__id:0,data:null,buildRendering:function(){this.domNode=dojo.doc.createElement("div",{style:"width:100%"});this._textFieldId="davinci_ve_widgets_properties_border_generated"+x++;this._buttonId="davinci_ve_widgets_properties_border_generated"+x++;var c=dojo.create("div",{className:"bgPropButtonDiv",style:"float:right; width:28px;"});dojo.create("button",{innerHTML:"...",id:this._buttonId,className:"bgPropButton btn-info",
style:"font-size:1em;"},c);var d=38,e=this._colorswatch="true"==this.colorswatch;if(e){var d=56,k=dojo.doc.createElement("div");dojo.addClass(k,"colorPicker");this._selectedColor=dojo.doc.createElement("div");this._selectedColor.innerHTML="\x26nbsp;";dojo.addClass(this._selectedColor,"colorPickerSelected");dojo.addClass(this._selectedColor,"colorPickerSelectedSkinny");this._colorPickerFlat=new h({})}var d=dojo.create("div",{className:"bgPropComboDiv",style:"margin-right:"+d+"px;padding:1px 0;"}),
m=dojo.isArray(this.data)?this.data:[""],q=this.langObjVE=a;if(e){this._statics=["",davinci.ve.widgets.ColorPicker.divider,q.colorPicker,q.removeValue];this._run={};this.data?(this.data.push({value:davinci.ve.widgets.ColorPicker.divider}),this.data.push({value:langObj.removeValue,run:function(){this.set("value","")}})):(this.data=[{value:this._statics[0]}],this.data.push({value:this._statics[2],run:this._chooseColorValue}),this.data.push({value:this._statics[3],run:function(){this.set("value","")}}),
this.data.push({value:this._statics[1]}),this.data.push({value:"transparent"}),this.data.push({value:"black"}),this.data.push({value:"white"}),this.data.push({value:"red"}),this.data.push({value:"green"}),this.data.push({value:"blue"}));m=[];for(q=0;q<this.data.length;q++)m.push(this.data[q].value),this.data[q].run&&(this._run[this.data[q].value]=this.data[q].run);this._store=new g({values:m,noncolors:this._statics})}else this._store=new f({values:m});this._comboBox=new b({store:this._store,id:this._textFieldId,
style:"width:100%;"});d.appendChild(this._comboBox.domNode);this.domNode.appendChild(c);e&&(this.domNode.appendChild(k),dojo.connect(k,"onclick",dojo.hitch(this,function(a){dojo.stopEvent(a);this._chooseColorValue()})),k.appendChild(this._selectedColor),this._colorPickerFlat_comboBoxUpdateDueTo="colorSwatch");this.domNode.appendChild(d);"string"==typeof this.propname&&this._comboBox&&(davinci.ve._BackgroundWidgets||(davinci.ve._BackgroundWidgets={}),davinci.ve._BackgroundWidgets[this.propname]={propPaletteWidget:this,
comboBox:this._comboBox});this.inherited(arguments)},startup:function(){this.inherited(arguments);this._button=dojo.byId(this._buttonId);dojo.connect(this._button,"onclick",this,function(){var a=this._cascade&&this._cascade._widget&&this._cascade._widget.getContext?this._cascade._widget.getContext():null,b=new e({context:a}),k=dojo.hitch(this,function(b){a||(console.error("Background.js. no context"),a={});var e=a.cascadeBatch={},k=e.propList=[],f=e.actions={},g=e.deferreds={};e.askUserResponse=void 0;
if(!b.cancel){var h=davinci.ve._BackgroundWidgets,m;for(m in h){var q=h[m];if(q.bgdWidget){var e=q.bgdWidget.get("value"),r=q.propPaletteWidget.get("value");e!==r&&(k.push(m),f[m]=dojo.hitch(this,function(a,c){a.propPaletteWidget._comboBoxUpdateDueTo="backgroundDialog";a.propPaletteWidget.set("value",c)},q,e),g[m]=new n)}}m="background-image";q=h[m];b=w.buildBackgroundImage(b.bgddata);for(e=0;e<b.length;e++)r=b[e],d.containsUrl(r)&&!d.isAbsolute(r)&&((h=d.getUrl(r))&&(r="url('"+(new c(h)).toString()+
"')"),b[e]=r);e=0==b.length?"":b[b.length-1];r=q.propPaletteWidget.get("value");e!==r&&(q.propPaletteWidget._cascade&&(q.propPaletteWidget._cascade._valueArrayNew=b),k.push(m),f[m]=dojo.hitch(this,function(a,c){q.propPaletteWidget._comboBoxUpdateDueTo="backgroundDialog";q.propPaletteWidget.set("value",c)},q,e),g[m]=new n);for(e=0;e<k.length;e++)m=k[e],g[m].then(dojo.hitch(this,function(c){(c=k[c+1])?f[c].apply():delete a.cascadeBatch},e));0<k.length&&(m=k[0],f[m].apply())}return!0},b),f=davinci.ve._BackgroundWidgets,
g;for(g in f){var h=f[g].propPaletteWidget._cascade;h&&(h._valueArrayNew=h._valueArray)}b.set("baseLocation",this._baseLocation);(new B({onOk:function(){k()},onShow:function(a,c,d){y.addChild(c,b,!0);this.add(b,null,!1);this.startDfd.resolve();return[b]}})).show()});this.connect(this._comboBox,"onChange",dojo.hitch(this,function(a){a!=davinci.ve.widgets.ColorPicker.divider&&a!=this.langObjVE.colorPicker||this._comboBox.set("value",this.value);var c=this._comboBoxUpdateDueTo;this._comboBoxUpdateDueTo=
void 0;"setAttr"!=c&&this._onChange(a)}));this.connect(this._comboBox,"onFocus",dojo.hitch(this,function(a){a=davinci.ve._BackgroundWidgets;for(var c in a){var b=a[c].propPaletteWidget._cascade;b&&(b._valueArrayNew=void 0)}(c=this._cascade&&this._cascade._widget&&this._cascade._widget.getContext?this._cascade._widget.getContext():null)&&delete c.cascadeBatch}));this._maqStartupComplete=!0},_setBaseLocationAttr:function(a){this._baseLocation=a},_setValueAttr:function(a){var c=this._comboBox.get("value");
this._colorswatch&&dojo.style(this._selectedColor,"backgroundColor",a);a=dojo.isArray(a)?0<a.length?a[a.length-1]:"":a;c!==a&&("backgroundDialog"!==this._comboBoxUpdateDueTo&&"colorSwatch"!==this._comboBoxUpdateDueTo&&(this._comboBoxUpdateDueTo="setAttr"),this._comboBox.set("value",a))},_onChange:function(a){this._colorswatch&&"string"==typeof a&&(a in this._run?dojo.hitch(this,this._run[a])():a==davinci.ve.widgets.ColorPicker.divider?this._comboBox.set("value",this._store.getItemNumber(0)):dojo.style(this._selectedColor,
"backgroundColor",a));this.value=this._comboBox.get("value");this.onChange(a)},onChange:function(a){},_getValueAttr:function(){return this._comboBox.get("value")},_setReadOnlyAttr:function(a){this._maqStartupComplete&&(this._isReadOnly=a,this._comboBox.set("disabled",a),this._button.disabled=a)},_chooseColorValue:function(){if(!this._isReadOnly){var a=this._comboBox.get("value"),c=this.isLeftToRight();davinci.ve.widgets.ColorPickerFlat.show(this._colorPickerFlat,a,this,c)}}})})},"davinci/ve/widgets/ColorPickerFlat":function(){define("dojo/_base/declare dijit/_Widget dijit/TooltipDialog dijit/form/Button dojox/widget/ColorPicker davinci/lang/ve dijit/lang/_common".split(" "),
function(p,n,m,h,g,f,b){p=p("davinci.ve.widgets.ColorPickerFlat",[n],{numberDelta:1,insertPosition:1,data:null,postCreate:function(){this.inherited(arguments);var e=dojo.doc.createElement("div");this._colorPicker=new g({});e.appendChild(this._colorPicker.domNode);var k=dojo.doc.createElement("div"),d=h({label:b.buttonOk});d.innerHtml="OK";k.appendChild(d.domNode);var c=h({label:b.buttonCancel});k.appendChild(c.domNode);e.appendChild(k);this.domNode.appendChild(e);dojo.connect(d,"onClick",this,"_onOk");
dojo.connect(c,"onClick",this,"onCancel");delete this.canceled},onClose:function(){},onCancel:function(){this._value=null;this.canceled=!0},_onOk:function(){delete this.canceled;this._value=this._colorPicker.get("value");this.onClose()},_getValueAttr:function(){return this._value},_setValueAttr:function(b){b=new dojo.Color(b);this._colorPicker.setColor(b.toHex())}});return dojo.mixin(p,{show:function(b,k,d,c){var a=new m({id:"maqetta_prop_tooltip_color_picker",title:f.selectColor,content:b});dijit.popup.moveOffScreen(a.domNode);
var g=!1,h=function(c){return function(){g&&(g=!1,dijit.popup.close(a))}}();a.connect(b,"onCancel",h);a.connect(b,"onClose",h);var n=dijit.byNode(dojo.query("[widgetId]",a.domNode)[0]);k in dojo.Color.named?(k=dojo.colorFromString(k),b.set("value",k.toHex())):b.set("value",k||"",!0);(function(b){return function(){dijit.popup.open({parent:d,popup:a,around:d.domNode,orient:c?{BL:"TL",BR:"TR",TL:"BL",TR:"BR"}:{BR:"TR",BL:"TL",TR:"BR",TL:"BL"},onClose:function(){n.canceled||(d._colorPickerFlat_comboBoxUpdateDueTo&&
(d._comboBoxUpdateDueTo=d._colorPickerFlat_comboBoxUpdateDueTo),d.get("value"),d.set("value",n.get("value")));h();a.destroy()}});g=!0;dijit.focus(a.containerNode)}})()()}})})},"davinci/ve/widgets/ColorStore":function(){define(["dojo/_base/declare","dojo/data/ItemFileReadStore","davinci/lang/ve","dijit/lang/_common"],function(p,n){return p("davinci.ve.widgets.ColorStore",n,{constructor:function(m){this.clearValues();m.noncolors&&(this.noncolors=m.noncolors);m.values&&this.setValues(m.values)},setValues:function(m){var h=
[];m&&(this._values=m);dojo.forEach(this._values,dojo.hitch(this,function(g){for(var f=!1,b=0;!f&&b<this.noncolors.length;b++)this.noncolors[b]==g&&(f=!0);f?h.push({name:g,value:g,label:g}):h.push({value:g,name:g,label:"\x3ctable\x3e\x3ctr\x3e\x3ctd style\x3d'width:10em'\x3e"+g+"\x3c/td\x3e\x3ctd style\x3d'width:10px;height:10px;background-color:"+g+"'\x3e\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e"})}));this._jsonData={identifier:"value",items:h};this._loadFinished=!1},insert:function(m,h){this._values.splice(m,
0,h);this.setValues()},contains:function(m){for(var h=0;h<this._values.length;h++)if(this._values[h]==m)return!0;return!1},getItemNumber:function(m){return this._values[m]},clearValues:function(){this._loadFinished=!1}})})},"davinci/ve/widgets/MutableStore":function(){define(["dojo/_base/declare","dojo/data/ItemFileReadStore","davinci/lang/ve","dijit/lang/_common"],function(p,n,m,h){return p("davinci.ve.widgets.MutableStore",n,{constructor:function(g){this.clearValues();g.divider&&(this.divider=g.divider);
g.values&&this.setValues(g.values)},setValues:function(g){var f=[],b=0;g&&(this._values=g);dojo.forEach(this._values,dojo.hitch(this,function(e){f.push({name:e,value:e,id:b++})}));this._jsonData={identifier:"id",items:f};this._loadFinished=!1},modifyItem:function(g,f){for(var b=0;b<this._values.length;b++)this._values[b]==g&&(this._values[b]=f);this.setValues()},insert:function(g,f){this._values.splice(g,0,f);this.setValues()},contains:function(g){for(var f=0;f<this._values.length;f++)if(this._values[f]==
g)return!0;return!1},findSimilar:function(g){if(g=(new RegExp(/(\D*)(-?)(\d+)(\D*)/)).exec(g)){g=new RegExp((0<g.length?g[1]:"")+"(-?)(\\d+)"+(3<g.length?g[4]:""));for(var f=0;f<this._values.length;f++)if(g.test(this._values[f]))return this._values[f]}},getItemNumber:function(g){return this._values[g]},clearValues:function(){this._loadFinished=!1}})})},"davinci/ve/widgets/BackgroundDialog":function(){define("dojo/_base/declare dijit/_WidgetBase dijit/_TemplatedMixin dijit/_WidgetsInTemplateMixin davinci/Runtime davinci/ve/widgets/MutableStore davinci/ve/widgets/ColorStore xide/utils dojo/text!./templates/BackgroundDialog.html davinci/ve/utils/CssUtils davinci/lang/ve dijit/lang/_common davinci/ve/utils/URLRewrite dojo/parser dojo/_base/lang davinci/model/Path dijit/form/Button davinci/ve/widgets/ColorPicker davinci/ve/widgets/ColorPickerFlat dijit/form/Textarea davinci/ui/widgets/FileFieldDialog".split(" "),
function(p,n,m,h,g,f,b,e,k,d,c,a,q,w,r){w._clearCache();var B=function(a,c){return"url('"+c+"')"};p=p("davinci.ve.widgets.BackgroundDialog",[n,m,h],{templateString:k,widgetsInTemplate:!0,_filePicker:null,context:null,veNLS:c,stopRowTemplate:"\x3ctr class\x3d'bgdGradOptRow bgdStopRow' style\x3d'display:none;'\x3e\x3ctd class\x3d'bgdCol1'\x3e\x3c/td\x3e\x3ctd class\x3d'bgdOptsLabel bdgStopLabel'\x3e"+c.bgdTemplate+"\x3c/td\x3e\x3ctd class\x3d'bgdStopColorTD'\x3e\x3cselect class\x3d'bgdColor' dojoType\x3d'dijit.form.ComboBox'\x3e\x3c/select\x3e\x3c/td\x3e\x3ctd\x3e\x3cselect class\x3d'bgdPosition' dojoType\x3d'dijit.form.ComboBox'\x3e\x3c/select\x3e\x3c/td\x3e\x3ctd class\x3d'bgdPlusMinusButtons'\x3e\x3cspan class\x3d'bgdPlusButton' dojoType\x3d'dijit.form.Button'\x3e+\x3c/span\x3e\x3cspan class\x3d'bgdMinusButton' dojoType\x3d'dijit.form.Button'\x3e-\x3c/span\x3e\x3c/td\x3e\x3c/tr\x3e",
postMixInProperties:function(){this.inherited(arguments);dojo.mixin(this,a)},postCreate:function(){this.inherited(arguments);var a=this.langObj=c;this.stoppos_store=new f({values:"0% 100% 10% 20% 30% 40% 50% 60% 70% 80% 90%".split(" ")});var e=davinci.ve._BackgroundWidgets;this._statics=["",davinci.ve.widgets.ColorPicker.divider,a.colorPicker,a.removeValue];var k=[{value:this._statics[0]}];k.push({value:this._statics[2],action:"_colorpicker"});k.push({value:this._statics[3],action:"_removevalue"});
k.push({value:this._statics[1],action:"_donothing"});k.push({value:"transparent"});k.push({value:"black"});k.push({value:"white"});k.push({value:"red"});k.push({value:"green"});k.push({value:"blue"});var g=[];this._bgcolor_action={};var h=[];this._stops_action={};for(var m=0;m<k.length;m++)g.push(k[m].value),k[m].action&&(this._bgcolor_action[k[m].value]=k[m].action),""!=k[m].value&&"_removevalue"!=k[m].action&&(h.push(k[m].value),k[m].action&&(this._stops_action[k[m].value]=k[m].action));this._bgcolor_store=
new b({values:g,noncolors:this._statics});this._stops_store=new b({values:h,noncolors:this._statics});var k=e["background-image"].comboBox.get("value"),q,w;"string"==typeof k&&0<k.length?(q=d.parseBackgroundImage(k),w=q.type):q={};this.bgddata=q;this.bgdOtherTA.set("value",k);var n=[];"emptystring url linear radial none other".split(" ").forEach(function(c){n.push({value:c,label:a["bgdType_"+c]})});this.bgdTypeSelect.addOption(n);this._updateBackgroundImageType(w);this.connect(this.bgdTypeSelect,
"onChange",dojo.hitch(this,function(){var a=this.bgdTypeSelect.get("value");this._updateBackgroundImageType(a);this._onFieldChanged()}));k=e["background-color"].comboBox.get("value");w=this.bgdColorCB;w.set("store",this._bgcolor_store);w.set("value",k);q.backgroundColor=k;this.connect(this.bgdColorCB,"onChange",dojo.hitch(this,function(a){this._onChangeColor(a,this.bgdColorCB,this._bgcolor_action)}));e["background-color"].bgdWidget=this.bgdColorCB;w=e["background-repeat"].comboBox;k=w.get("value");
g=this.bgdRepeatCB;g.set("store",w.store);g.set("regExp","repeat|repeat-x|repeat-y|no-repeat");g.set("value",k);q.backgroundRepeat=k;this.connect(this.bgdRepeatCB,"onChange",dojo.hitch(this,function(){q.backgroundRepeat=this.bgdRepeatCB.get("value");this._onFieldChanged()}));e["background-repeat"].bgdWidget=this.bgdRepeatCB;w=e["background-position"].comboBox;k=w.get("value");g=this.bgdPositionCB;g.set("store",w.store);g.set("regExp","auto|contain|cover|"+d.regstr_posn);g.set("value",k);q.backgroundPosition=
k;this.connect(this.bgdPositionCB,"onChange",dojo.hitch(this,function(){q.backgroundPosition=this.bgdPositionCB.get("value");this._onFieldChanged()}));e["background-position"].bgdWidget=this.bgdPositionCB;w=e["background-size"].comboBox;k=w.get("value");g=this.bgdSizeCB;g.set("store",w.store);g.set("regExp","auto|contain|cover|"+d.regstr_len_or_pct);g.set("value",k);q.backgroundSize=k;this.connect(this.bgdSizeCB,"onChange",dojo.hitch(this,function(){q.backgroundSize=this.bgdSizeCB.get("value");this._onFieldChanged()}));
e["background-size"].bgdWidget=this.bgdSizeCB;w=e["background-origin"].comboBox;k=w.get("value");g=this.bgdOriginCB;g.set("store",w.store);g.set("regExp","border-box|padding-box|content-box");g.set("value",k);q.backgroundOrigin=k;this.connect(this.bgdOriginCB,"onChange",dojo.hitch(this,function(){q.backgroundOrigin=this.bgdOriginCB.get("value");this._onFieldChanged()}));e["background-origin"].bgdWidget=this.bgdOriginCB;w=e["background-clip"].comboBox;k=w.get("value");g=this.bgdClipCB;g.set("store",
w.store);g.set("regExp","border-box|padding-box|content-box");g.set("value",k);q.backgroundClip=k;this.connect(this.bgdClipCB,"onChange",dojo.hitch(this,function(){q.backgroundClip=this.bgdClipCB.get("value");this._onFieldChanged()}));e["background-clip"].bgdWidget=this.bgdClipCB;e=new f({values:"to bottom;to top;to right;to left;45deg;-45deg".split(";")});this.bgdLinearAngleCB.set("store",e);this.bgdLinearAngleCB.set("regExp",d.regstr_angle);this.bgdLinearAngleCB.set("value",q&&q.angle?q.angle:"to bottom");
this.connect(this.bgdLinearAngleCB,"onChange",dojo.hitch(this,function(){q.angle=this.bgdLinearAngleCB.get("value");this._onFieldChanged()}));e=new f({values:"center;left top;center center;right bottom;0% 0%;0px 0px".split(";")});this.bgdRadialPosCB.set("store",e);this.bgdRadialPosCB.set("regExp",d.regstr_posn);this.bgdRadialPosCB.set("value",q&&q.posn?q.posn:"center");this.connect(this.bgdRadialPosCB,"onChange",dojo.hitch(this,function(){q.posn=this.bgdRadialPosCB.get("value");this._onFieldChanged()}));
e=new f({values:["circle","ellipse"]});this.bgdRadialShapeCB.set("store",e);this.bgdRadialShapeCB.set("regExp",d.regstr_shape);this.bgdRadialShapeCB.set("value",q&&q.shape?q.shape:"circle");this.connect(this.bgdRadialShapeCB,"onChange",dojo.hitch(this,function(){q.shape=this.bgdRadialShapeCB.get("value");this._onFieldChanged()}));e=new f({values:["farthest-corner","farthest-side","closest-corner","closest-side"]});this.bgdRadialExtentCB.set("store",e);this.bgdRadialExtentCB.set("regExp",d.regstr_extent);
this.bgdRadialExtentCB.set("value",q&&q.extent?q.extent:"farthest-corner");this.connect(this.bgdRadialExtentCB,"onChange",dojo.hitch(this,function(){q.extent=this.bgdRadialExtentCB.get("value");this._onFieldChanged()}));this._initializeStops(q&&q.stops&&2<=q.stops.length?q.stops:[{color:"white",pos:"0%"},{color:"black",pos:"100%"}])},startup:function(){this.inherited(arguments);var a=this.bgddata&&this.bgddata.url?this.bgddata.url:"";this._filePicker.set("value",a);this._filePicker.owner=this;this.bgddata.url=
a;this.connect(this._filePicker,"onChange",dojo.hitch(this,function(){var a=this._filePicker.get("value");this.bgddata.url=a;this._onFieldChanged()}))},_updateBackgroundImageType:function(a){var c=this.domNode;if(!a||"none"!=a&&"url"!=a&&"linear"!=a&&"radial"!=a&&"other"!=a)a="emptystring";this.bgddata.type=a;this.bgdTypeSelect.set("value",a);var b=dojo.query(".bgdOptionsLabelRow",c),d=dojo.query(".bgdImageOptRow",c),e=dojo.query(".bgdGradOptRow",c),k=dojo.query(".bgdLinearOptRow",c),f=dojo.query(".bgdRadialOptRow",
c),c=dojo.query(".bgdOtherRow",c);"url"==a?(d.concat(b).forEach(function(a){dojo.removeClass(a,"dijitHidden")}),e.concat(c).forEach(function(a){dojo.addClass(a,"dijitHidden")})):"linear"==a?(e.concat(b).forEach(function(a){dojo.removeClass(a,"dijitHidden")}),d.concat(f).concat(c).forEach(function(a){dojo.addClass(a,"dijitHidden")})):"radial"==a?(e.concat(b).forEach(function(a){dojo.removeClass(a,"dijitHidden")}),d.concat(k).concat(c).forEach(function(a){dojo.addClass(a,"dijitHidden")})):"other"==
a?(c.forEach(function(a){dojo.removeClass(a,"dijitHidden")}),d.concat(e).concat(b).forEach(function(a){dojo.addClass(a,"dijitHidden")})):d.concat(e).concat(b).concat(c).forEach(function(a){dojo.addClass(a,"dijitHidden")})},_initializeStops:function(a){var c=this.langObj;a||(a=this.bgddata.stops);for(var b=this.bgdTypeSelect.get("value"),e=dojo.query(".bgdStopRow",this.domNode),k=e.length-1;0<k;k--){var f=e[k],g=dojo.query(".bgdColor",f),g=dijit.byNode(g[0]);g.destroyRecursive();g=dojo.query(".bgdPosition",
f);g=dijit.byNode(g[0]);g.destroyRecursive();dojo.destroy(f)}k=e[0];e=k.parentNode;f=k.nextSibling;for(k=0;k<a.length;k++){var h=a[k],q=dojo.create("tr",{className:"bgdGradOptRow bgdStopRow"});q.innerHTML=this.stopRowTemplate;"linear"!=b&&"radial"!=b&&dojo.addClass(q,"dijitHidden");e.insertBefore(q,f);dojo.parser.parse(q);dojo.query(".bdgStopLabel",q)[0].innerHTML=this.langObj.bgdStop+" #"+(k+1)+":";g=dojo.query(".bgdColor",q);g=dijit.byNode(g[0]);g.set("store",this._stops_store);g.set("regExp",d.regstr_stop_color);
g.set("value",h.color);this.connect(g,"onChange",dojo.hitch(this,function(a,c){this._onChangeColor(c,a,this._stops_action)},g));g=dojo.query(".bgdPosition",q);g=dijit.byNode(g[0]);g.set("store",this.stoppos_store);h="string"==typeof h.pos&&0<h.pos.length?h.pos:0==k?"0%":"100%";g.set("regExp",d.regstr_stop_pos);g.set("value",h);this.connect(g,"onChange",dojo.hitch(this,function(){this._updateDataStructureStops();this._onFieldChanged()}));g=dojo.query(".bgdPlusButton",q)[0];g=dijit.byNode(g);g.set("title",
c.bgdAddStop);this.connect(g,"onClick",dojo.hitch(this,function(a){var c=this.bgddata.stops[a];this.bgddata.stops.splice(a+1,0,{color:c.color,pos:c.pos});this._initializeStops()},k));h=dojo.query(".bgdMinusButton",q)[0];h=dijit.byNode(h);h.set("title",c.bgdRemoveStop);this.connect(h,"onClick",dojo.hitch(this,function(a){this.bgddata.stops.splice(a,1);this._initializeStops()},k));q=dojo.query(".bgdMinusButton",this.domNode);for(g=0;g<q.length;g++)h=q[g],h=dijit.byNode(h),2>=a.length?h.set("disabled",
!0):h.set("disabled",!1)}this._updateDataStructureStops()},_onFieldChanged:function(){this._updateDialogValidity();this._updateBackgroundPreview()},_setBaseLocationAttr:function(a){this._baseLocation=a;this._filePicker.set("baseLocation",a)},_updateDialogValidity:function(){var a=this.bgddata;if(a&&a.type){var c=this.domNode,a=a.type,b=[],d=!0;"url"==a?b=dojo.query(".bgdImageOptRow",c):"linear"==a?b=dojo.query(".bgdStopRow",c).concat(dojo.query(".bgdLinearOptRow",c)):"radial"==a&&(b=dojo.query(".bgdStopRow",
c).concat(dojo.query(".bgdRadialOptRow",c)));b.forEach(function(a){dojo.query("[widgetid]",a).forEach(function(a){"function"!=typeof a.isValid||a.isValid()||(d=!1)})});this.bdgValid=d}},_updateBackgroundPreview:function(){function a(c,d){var e=k[d];"string"==typeof e&&0<e.length&&(b+=";"+c+":"+e)}var c=dojo.query(".bgdPreview",this.domNode)[0],b="",k=this.bgddata;a("background-color","backgroundColor");a("background-repeat","backgroundRepeat");a("background-position","backgroundPosition");a("background-size",
"backgroundSize");a("background-origin","backgroundOrigin");a("background-clip","backgroundClip");for(var f=d.buildBackgroundImage(this.bgddata),g=0;g<f.length;g++){var h=f[g];if(q.containsUrl(h)&&!q.isAbsolute(h)&&this.context){var m=q.getUrl(h),m=e.parse_url(m);(m=this.context.ctx.getFileManager().getImageUrl({path:m.host+m.path,mount:m.scheme},!1))&&(h=B(this._baseLocation,m))}b+=";background-image:"+h}c.setAttribute("style",b);this.bgdOtherTA.set("value",f[f.length-1])},_updateDataStructureStops:function(){var a=
this.bgddata;a.stops=[];for(var c=dojo.query(".bgdStopRow",this.domNode),b=1;b<c.length;b++){var d=c[b],e=dojo.query(".bgdColor",d),e=dijit.byNode(e[0]),d=dojo.query(".bgdPosition",d),d=dijit.byNode(d[0]);a.stops.push({color:e.get("value"),pos:d.get("value")})}},_setValueAttr:function(a){a&&this._colorPickerTargetWidget.set("value",a)},_onChangeColor:function(a,c,b){if(a=b[a])if("_removevalue"==a?c.set("value",""):c.set("value",c._currentcolorvalue),"_colorpicker"==a){a=new davinci.ve.widgets.ColorPickerFlat({});
b=c.get("value");var d=this.isLeftToRight();this._colorPickerTargetWidget=c;davinci.ve.widgets.ColorPickerFlat.show(a,b,this,d)}c._currentcolorvalue=c.get("value");this.bgddata.backgroundColor=this.bgdColorCB.get("value");this._updateDataStructureStops();this._onFieldChanged()},okButton:function(){},cancelButton:function(){this.onClose()}});p.getCSSForWorkspaceURL=B;r.setObject("davinci.ve.widgets.BackgroundDialog",p);return p})},"davinci/ve/utils/CssUtils":function(){define(["dojo/_base/Color","davinci/ve/utils/URLRewrite"],
function(p,n){var m=[],h;for(h in p.named)"transparent"!=h&&m.push(h);m.sort(function(a,c){return 0==c.indexOf(a)?1:0==a.indexOf(c)?-1:a<c?-1:1});var g=[];m.forEach(function(a){g.push(a);a=p.named[a];a="#"+(16777216+(a[0]<<16)+(a[1]<<8)+a[2]).toString(16).slice(1);g.push(a)});var f=/^\-?(?:\d*\.\d+|\d+)$/,m="(?:";for(h=0;h<g.length;h+=2)0!=h&&(m+="|"),m+=g[h];m="(?:"+(m+")")+"|\\#(?:[0-9A-Fa-f]{6}|[0-9A-Fa-f]{3})|(?:rgb|hsl)\\s*\\(\\s*(?:(?:\\d*\\.\\d+|\\d+)%?)\\s*,\\s*(?:(?:\\d*\\.\\d+|\\d+)%?)\\s*,\\s*(?:(?:\\d*\\.\\d+|\\d+)%?)\\s*\\)|(?:rgba|hsla)\\s*\\(\\s*(?:(?:\\d*\\.\\d+|\\d+)%?)\\s*,\\s*(?:(?:\\d*\\.\\d+|\\d+)%?)\\s*,\\s*(?:(?:\\d*\\.\\d+|\\d+)%?)\\s*,\\s*(?:\\d*\\.\\d+|\\d+)\\s*\\))";
h="(?:"+m+"(?:\\s+(?:\\-?(?:\\d*\\.\\d+|\\d+)(?:in|cm|mm|pt|pc|px|%)|0))?)";var b=new RegExp("(?:\\s*("+m+")\\s*((?:\\-?(?:\\d*\\.\\d+|\\d+)(?:in|cm|mm|pt|pc|px|%)|0))?\\s*,?(.*))");h="("+h+"(?:\\s*,\\s*"+h+")*)";var e=/^\s*(url)\s*\(\s*(?:\'([^\']*)\'*|\"([^\"]*)\"|([^\'\"]*))\s*\)\s*$/,k=new RegExp("^\\s*((?:-moz-linear-gradient|-webkit-linear-gradient|-ms-linear-gradient|-o-linear-gradient|linear-gradient))\\s*\\(\\s*(?:(?:to\\s+((?:\\s*left\\s*|\\s*right\\s*|\\s*top\\s*|\\s*bottom\\s*){1,2})|((?:\\s*left\\s*|\\s*right\\s*|\\s*top\\s*|\\s*bottom\\s*){1,2})|((?:\\-?(?:\\d*\\.\\d+|\\d+)deg)))\\s*,\\s*)?\\s*"+
h+"\\s*\\)\\s*$"),d=new RegExp("^\\s*((?:-moz-radial-gradient|-webkit-radial-gradient|-ms-radial-gradient|-o-radial-gradient|radial-gradient))\\s*\\(\\s*(?:\\s*(?:\\s*(\\s*(?:(?:\\-?(?:\\d*\\.\\d+|\\d+)(?:in|cm|mm|pt|pc|px|%)|0)|(?:left|center|right|top|bottom))(?:\\s*(?:(?:\\-?(?:\\d*\\.\\d+|\\d+)(?:in|cm|mm|pt|pc|px|%)|0)|(?:left|center|right|top|bottom)))?)\\s*((?:\\-?(?:\\d*\\.\\d+|\\d+)deg))\\s*|\\s*(\\s*(?:(?:\\-?(?:\\d*\\.\\d+|\\d+)(?:in|cm|mm|pt|pc|px|%)|0)|(?:left|center|right|top|bottom))(?:\\s*(?:(?:\\-?(?:\\d*\\.\\d+|\\d+)(?:in|cm|mm|pt|pc|px|%)|0)|(?:left|center|right|top|bottom)))?)\\s*|\\s*((?:\\-?(?:\\d*\\.\\d+|\\d+)deg))\\s*)\\s*,\\s*)?\\s*(?:\\s*(?:\\s*(circle|ellipse)\\s*((?:(?:closest-side|farthest-side|closest-corner|farthest-corner|contain|cover)|(?:(?:\\-?(?:\\d*\\.\\d+|\\d+)(?:in|cm|mm|pt|pc|px|%)|0)(?:\\s+(?:\\-?(?:\\d*\\.\\d+|\\d+)(?:in|cm|mm|pt|pc|px|%)|0)\\s*)?)))\\s*|\\s*((?:(?:closest-side|farthest-side|closest-corner|farthest-corner|contain|cover)|(?:(?:\\-?(?:\\d*\\.\\d+|\\d+)(?:in|cm|mm|pt|pc|px|%)|0)(?:\\s+(?:\\-?(?:\\d*\\.\\d+|\\d+)(?:in|cm|mm|pt|pc|px|%)|0)\\s*)?)))\\s*(circle|ellipse)\\s*|\\s*(circle|ellipse)\\s*|\\s*((?:(?:closest-side|farthest-side|closest-corner|farthest-corner|contain|cover)|(?:(?:\\-?(?:\\d*\\.\\d+|\\d+)(?:in|cm|mm|pt|pc|px|%)|0)(?:\\s+(?:\\-?(?:\\d*\\.\\d+|\\d+)(?:in|cm|mm|pt|pc|px|%)|0)\\s*)?)))\\s*)\\s*,\\s*)?\\s*"+
h+"\\s*\\)\\s*$"),c=/(?:\s*((?:top|bottom|left|right|center|(?:\-?(?:\d*\.\d+|\d+)%?)))\s+((?:top|bottom|left|right|center|(?:\-?(?:\d*\.\d+|\d+)%?)))\s*)/;h="("+("(?:\\s*,\\s*"+("(?:"+("(?:color-stop\\s*\\(\\s*(?:\\-?(?:\\d*\\.\\d+|\\d+)%?)\\s*,\\s*"+m+"\\s*\\)\\s*)")+"|"+("(?:from\\s*\\(\\s*"+m+"\\s*\\)\\s*)")+"|"+("(?:to\\s*\\(\\s*"+m+"\\s*\\)\\s*)")+")")+"\\s*)")+"+)";var a=new RegExp("(?:\\s*,\\s*"+("(?:"+("(?:(color-stop)\\s*\\(\\s*((?:\\-?(?:\\d*\\.\\d+|\\d+)%?))\\s*,\\s*("+m+")\\s*\\)\\s*)")+
"|"+("(?:(from)\\s*\\(\\s*("+m+")\\s*\\)\\s*)")+"|"+("(?:(to)\\s*\\(\\s*("+m+")\\s*\\)\\s*)")+")")+"\\s*)(.*)"),q=new RegExp("(?:\\s*(-webkit-gradient)\\s*\\(\\s*(linear)\\s*(?:\\s*,\\s*((?:\\s*(?:top|bottom|left|right|center|(?:\\-?(?:\\d*\\.\\d+|\\d+)%?))\\s+(?:top|bottom|left|right|center|(?:\\-?(?:\\d*\\.\\d+|\\d+)%?))\\s*))\\s*)(?:\\s*,\\s*((?:\\s*(?:top|bottom|left|right|center|(?:\\-?(?:\\d*\\.\\d+|\\d+)%?))\\s+(?:top|bottom|left|right|center|(?:\\-?(?:\\d*\\.\\d+|\\d+)%?))\\s*))\\s*)"+h+"\\s*\\)\\s*)"),
w=new RegExp("(?:\\s*(-webkit-gradient)\\s*\\(\\s*(radial)\\s*(?:(?:\\s*,\\s*((?:\\s*(?:top|bottom|left|right|center|(?:\\-?(?:\\d*\\.\\d+|\\d+)%?))\\s+(?:top|bottom|left|right|center|(?:\\-?(?:\\d*\\.\\d+|\\d+)%?))\\s*))\\s*)(?:\\s*,\\s*((?:\\d*\\.\\d+|\\d+))\\s*)(?:\\s*,\\s*((?:\\s*(?:top|bottom|left|right|center|(?:\\-?(?:\\d*\\.\\d+|\\d+)%?))\\s+(?:top|bottom|left|right|center|(?:\\-?(?:\\d*\\.\\d+|\\d+)%?))\\s*))\\s*)(?:\\s*,\\s*((?:\\d*\\.\\d+|\\d+))\\s*)?)"+h+"\\s*\\)\\s*)"),r=function(a){var c=
[];do{var d=a.match(b);d&&(c.push({color:d[1],pos:d[2]}),a=d[3])}while(d);return c},B=function(c){var b=[],d=[],e,k;do{var g=c.match(a);g&&(g[4]?e={color:g[5]}:g[6]?k={color:g[7]}:(c=g[2].match(f)?100*g[2]+"%":g[2],d.push({color:g[3],pos:c})),c=g[8])}while(g);e&&b.push(e);for(e=0;e<d.length;e++)b.push(d[e]);k&&b.push(k);return b};return{regstr_posn:"^\\s*\\s*(?:(?:\\-?(?:\\d*\\.\\d+|\\d+)(?:in|cm|mm|pt|pc|px|%)|0)|(?:left|center|right|top|bottom))(?:\\s*(?:(?:\\-?(?:\\d*\\.\\d+|\\d+)(?:in|cm|mm|pt|pc|px|%)|0)|(?:left|center|right|top|bottom)))?\\s*$",
regstr_len_or_pct:"^\\s*(?:\\-?(?:\\d*\\.\\d+|\\d+)(?:in|cm|mm|pt|pc|px|%)|0)\\s*$",regstr_angle:"^\\s*(?:to\\s+((?:\\s*left\\s*|\\s*right\\s*|\\s*top\\s*|\\s*bottom\\s*){1,2})|((?:\\-?(?:\\d*\\.\\d+|\\d+)deg)))\\s*$",regstr_shape:"^\\s*circle|ellipse\\s*$",regstr_extent:"^\\s*(?:(?:closest-side|farthest-side|closest-corner|farthest-corner|contain|cover)|(?:(?:\\-?(?:\\d*\\.\\d+|\\d+)(?:in|cm|mm|pt|pc|px|%)|0)(?:\\s+(?:\\-?(?:\\d*\\.\\d+|\\d+)(?:in|cm|mm|pt|pc|px|%)|0)\\s*)?))\\s*$",regstr_stop_color:"\\s*"+
m+"\\s*",regstr_stop_pos:"\\s*(?:\\-?(?:\\d*\\.\\d+|\\d+)(?:in|cm|mm|pt|pc|px|%)|0)\\s*",parseBackgroundImage:function(a){var b={},f=a.match(/^\s*$/);if(f)b.type="emptystring";else if(f=a.match(/^\s*none\s*$/))b.type="none";else if(f=a.match(e))b.type="url",b.func=f[1],b.url=f[2]?f[2]:f[3]?f[3]:f[4];else if(f=a.match(q)){b.type="linear";b.func=f[1];b.webkitGradType=f[2];b.webKitPosn1=f[3];b.webKitPosn2=f[4];var g=b.webKitPosn1,h=b.webKitPosn2;a=0<=g.indexOf("left");var m=0<=g.indexOf("top"),n=0<=
g.indexOf("right"),g=0<=g.indexOf("bottom"),p=0<=h.indexOf("left"),D=0<=h.indexOf("top"),I=0<=h.indexOf("right"),h=0<=h.indexOf("bottom");m&&h&&(a&&p||n&&I)?b.angle="to bottom":g&&D&&(a&&p||n&&I)?b.angle="to top":a&&I&&(m&&D||g&&h)?b.angle="to right":p&&n&&(m&&D||g&&h)?b.angle="to left":a&&m&&I&&h?b.angle="to bottom right":a&&g&&I&&D?b.angle="to top right":n&&m&&p&&h?b.angle="to bottom left":n&&g&&p&&D&&(b.angle="to top left");b.stops=B(f[5])}else if(f=a.match(w))b.type="radial",b.func=f[1],b.webkitGradType=
f[2],b.webKitPosn1=f[3],b.webKitRadius1=f[4],b.webKitPosn2=f[5],b.webKitRadius2=f[6],b.shape=b.webKitPosn1==b.webKitPosn2?"circle":"ellipse",m=b.webKitPosn1,(a=m.match(c))?(m=a[1],m.match(/^\d+$/)&&(m+="px"),a=a[2],a.match(/^\d+$/)&&(a+="px"),a=m+" "+a):a=m,b.posn=a,b.extent=b.webKitRadius2?b.webKitRadius2+"px":b.webKitRadius1?b.webKitRadius1+"px":"farthest-corner",b.stops=B(f[7]);else if(f=a.match(k))b.type="linear",b.func=f[1],b.angle=f[2]?"to "+f[2]:f[3]?"to "+f[3]:f[4],b.stops=r(f[5]);else if(f=
a.match(d))b.type="radial",b.func=f[1],b.posn=f[2]?f[2]:f[4],b.angle=f[3]?f[3]:f[5],b.shape=f[6]?f[6]:f[9]?f[9]:f[10],b.extent=f[7]?f[7]:f[8]?f[8]:f[11],b.stops=r(f[12]);f||(b.type="unknown");return b},buildBackgroundImage:function(a){var c=[];if("emptystring"==a.type)c.push("");else if("none"==a.type)c.push("none");else if("url"==a.type){if("string"==typeof a.url&&0<a.url.length){var b=n.getUrl(a.url);b||(b=n.stripQuotes(a.url));c.push("url('"+b+"')")}}else if("linear"==a.type||"radial"==a.type){for(var b=
"",d,e,k=[],f=0;f<a.stops.length;f++){var g=a.stops[f],h="string"==typeof g.pos&&0<g.pos.length?g.pos:"";0<f&&(b+=", ");b+=g.color;if(0<f&&f<a.stops.length-1||0==f&&0!=h.length&&"0%"!=h&&0!=h-0||f==a.stops.length-1&&0!=h.length&&"100%"!=h&&1!=h-0)b+=" "+h;0!=f||0!=h.length&&"0%"!=h&&0!=h-0?f!=a.stops.length-1||0!=h.length&&"100%"!=h&&1!=h-0?k.push("color-stop("+h+", "+g.color+")"):e="to("+g.color+")":d="from("+g.color+")"}g="";h=!1;d&&(g+=d,h=!0);e&&(h&&(g+=", "),g+=e,h=!0);for(f=0;f<k.length;f++)h&&
(g+=", "),g+=k[f],h=!0;if("linear"==a.type){d="(";var m=a.angle;(e="string"==typeof m&&0<m.length?m.match(/^\s*(?:to\s+((?:\s*left\s*|\s*right\s*|\s*top\s*|\s*bottom\s*){1,2})|((?:\-?(?:\d*\.\d+|\d+)deg)))\s*$/):null)||(m="to bottom");"to bottom"!=m&&(d+=m+",");a="(linear,";k=0<=m.indexOf("left");f=0<=m.indexOf("top");h=0<=m.indexOf("right");m=0<=m.indexOf("bottom");k&&f?a+=" right bottom, left top, ":k&&m?a+=" right top, left bottom, ":h&&f?a+=" left bottom, right top, ":h&&m?a+=" left top, right bottom, ":
k?a+=" right top, left top, ":h?a+=" left top, right top, ":f?a+=" left bottom, left top, ":m?a+=" left top, left bottom, ":(k=180*(90-parseFloat(e[4]))/Math.PI,e=Math.cos(k),k=Math.sin(k),0<=e&&0<=k?(a+="0% 100%,",a=Math.abs(e)>Math.abs(k)?a+("100% "+100*(1-Math.abs(k)/Math.abs(e))+"%"):a+(Math.abs(e)/Math.abs(k)*100+"% 100%")):0<=e&&0>k?(a+="0% 0%,",a=Math.abs(e)>Math.abs(k)?a+("100% "+Math.abs(-k)/Math.abs(e)*100+"%"):a+(Math.abs(e)/Math.abs(k)*100+"% 100%")):0>e&&0<=k?(a+="100% 100%,",a=Math.abs(e)>
Math.abs(k)?a+("0% "+100*(1-Math.abs(k)/Math.abs(e))+"%"):a+(Math.abs(e)/Math.abs(k)*100+"% 100%")):(a+="100% 0%,",a=Math.abs(e)>Math.abs(k)?a+("0% "+Math.abs(-k)/Math.abs(e)*100+"%"):a+(Math.abs(e)/Math.abs(k)*100+"% 100%")),a+=", ");d+=b+")";c.push("-webkit-gradient"+(a+(g+")")));c.push("-o-linear-gradient"+d);c.push("-ms-linear-gradient"+d);c.push("-moz-linear-gradient"+d);c.push("-webkit-linear-gradient"+d);c.push("linear-gradient"+d)}else d="(","center"!=a.posn&&"center center"!=a.posn&&(d+=
a.posn+", "),"circle"!=a.shape&&(d+=a.shape+", "),"farthest-corner"!=a.extent&&(d+=a.extent+", "),d+=b+")",a="(radial, center center, 10, center center, "+(g+")"),c.push("-webkit-gradient"+a),c.push("-o-radial-gradient"+d),c.push("-ms-radial-gradient"+d),c.push("-moz-radial-gradient"+d),c.push("-webkit-radial-gradient"+d),c.push("radial-gradient"+d)}return c}}})},"davinci/ui/widgets/FileFieldDialog":function(){define("dojo/_base/declare dijit/_WidgetBase dijit/_TemplatedMixin dijit/_WidgetsInTemplateMixin davinci/Workbench davinci/ui/widgets/OpenFile dijit/form/Button davinci/model/Path davinci/lang/ui dijit/lang/_common dojo/text!./templates/FileFieldDialog.html dijit/form/TextBox xide/views/_PanelDialog xide/utils xide/types xfile/views/FileGrid xfile/FileActions".split(" "),
function(p,n,m,h,g,f,b,e,k,d,c,a,q,w,r,B,y){return p("davinci.ui.widgets.FileFieldDialog",[n,m,h],{templateString:c,widgetsInTemplate:!0,_fileSelectionDialog:null,_showFileSelectionDialog:function(){var a=this;this.ctx=g.ctx;y.createFilePicker(this,"",function(c){var b=w.buildPath(c.mount,c.path,!1);a.ctx.getFileManager().getImageUrl(c,!0,{oriPath:b});a.textField.set("value",b);a._onChange()},k.selectFile,null,{mount:"workspace_user",selection:"."},null,B)},_setBaseLocationAttr:function(a){this._baseLocation=
a},_setValueAttr:function(a){this.value!=a&&(this.value=a,this.textField.set("value",a))},_setDisabledAttr:function(a){this.textField.set("disabled",a);this.button.set("disabled",a);this.inherited(arguments)},_setIntermediateChangesAttr:function(a){this.textField.set("intermediateChanges",a);this.inherited(arguments)},_onChange:function(){var a=this.textField.get("value");this.value!=a&&(this.value=a,this.textField.set("value",this.value),this.onChange(a))},onChange:function(a){},_getValueAttr:function(){return this.textField.get("value")}})})},
"davinci/ui/widgets/OpenFile":function(){define("dojo/_base/declare dijit/_Templated dijit/_Widget davinci/library system/resource davinci/workbench/Preferences davinci/Runtime davinci/Workbench dijit/Menu dijit/MenuItem davinci/model/Path dijit/form/DropDownButton davinci/lang/ui dijit/lang/_common dijit/form/Button dijit/form/TextBox dijit/form/RadioButton dijit/layout/ContentPane dijit/Tree".split(" "),function(p,n,m,h,g,f,b,e,k,d,c,a,q,w){return p("davinci.ui.widgets.OpenFile",[m,n],{widgetsInTemplate:!0,
fileDialogFileName:null,fileDialogParentFolder:null,postMixInProperties:function(){dojo.mixin(this,q);dojo.mixin(this,w);this.inherited(arguments)},postCreate:function(){this.inherited(arguments);this.fileTree.watch("selectedItem",dojo.hitch(this,this._updateFields));this._value||this._setValueAttr(this._getForcedRootAttr())},startup:function(){this.fileTree.startup()},_setValueAttr:function(a){a!=this._value&&(this._value=a,this.fileTree.set("selectedItems",[a]))},_getForcedRootAttr:function(){return this._forcedRoot||
g.findResource(e.getProject())},_setForcedRootAttr:function(a){this._forcedRoot=a},_updateFields:function(){var a=this.fileTree.get("selectedItems"),a=null!=a&&0<a.length?a[0]:null;dojo.attr(this._okButton,"disabled",!0);null!=a&&"File"==a.elementType&&dojo.attr(this._okButton,"disabled",!1)},_okButton:function(){this.value=this.fileTree.get("selectedItems")[0]},_onDblClick:function(a){this._okButton();this.onExecute()},_onKeyPress:function(a){a.which==dojo.keys.ENTER&&(this._okButton(),this.onExecute())},
_getValueAttr:function(){return this.value},_cancelButton:function(){this.onClose()},resize:function(a){this.contentpane.resize(a)},onExecute:function(){},onClose:function(){}})})},"davinci/lang/ui":function(){define([],function(){return{dontShowAgain:"Don't show again",selectFile:"Select a file",openFile:"Open File",aboutMaqetta:"About Maqetta",productVersion:"Version: ${0}",productDate:"Date: ${0}",build:"Build: ${0}",library:"Library",version:"Version",include:"Include",source:"Source",baseLocation:"Base Location",
invalidDownloadFileName:"File name may only contain letters, numbers, \x26#8216;_\x26#8216;, and \x26#8216;.\x26#8216;.",selectedFiles:"Selected Files",noFilesSelected:"No files selected!",downloadButtonLabel:"Download",themeAlreadyExists:"Theme already Exists!",invalidThemeName:"Invalid theme name",errorCreatingTheme:"Error creating theme: ",creatingTheme:"Creating theme",noUserThemes:"No user themes found in workspace. Please create a new theme before editing.",themeSetsDialog:"Manage theme sets",
renameThemeSet:"Rename theme set",themeSets:"Theme sets:",currentlySelectedThemeSet:"Currently selected theme set:",themeSetName:"Name:",desktopTheme:"Dojo desktop 1.7 theme:",mobileTheme:"Dojo mobile 1.7 theme:",android:"Android:",blackberry:"Blackberry:",ipad:"iPad:",iphone:"iPhone:",other:"Other:",selectTheme:"Select theme",themeSet:"Theme set:",themeVersionMessage:"Theme version does not match workspace version this could produce unexpected results. We suggest recreating the custom theme using the current version of Maqetta and deleting the existing theme.",
addThemeSet:"Add theme set",deleteThemeSet:"Delete theme set",workspaceLocation:"Workspace Location",savingReadonlyFile:"This file is a read-only file. Please save it to a writeable location.",create:"Create",open:"Open",save:"Save",select:"Select",update:"Update",unknown:"unknown",fileName:"File name",folderName:"Folder name",parentFolder:"Parent folder: ",newFolderLabel:"New folder",cancelButtonLabel:"Cancel",newFolderName:"Name:",createFolder:"Create Folder",createNewFile:"Create New File",createMobileApplication:"Create a Mobile Application",
createDesktopApplication:"Create a Desktop Application",createSketchHiFi:"Create a Sketch (high-fidelity)",createSketchLoFi:"Create a Sketch (low-fidelity)",createNewCSSFile:"Create New CSS File",createNewJSFile:"Create New JavaScript File",createNewFolder:"Create New Folder",saveFileAs:"Save File As",downloadFile:"Download",selectFiles:"Select Files...",selectZip:"Select ZIP file...",upload:"Upload",addFiles:"Upload",uploading:"Uploading...",completed:"completed: ${0} \n",done:"Done",explodeZipWarning:"Warning: Contents of .zip files will overwrite any conflicting files in your workspace",
mustEnterFileName:"You must enter a file name.",cannotSelect:"Cannot select ${0}. It is a folder.",fileAlreadyExistsOverwrite:"File ${0} already exists. OK to overwrite?",cannotCreate:"Cannot create ${0}. It already Exists.",fileNameSlashCharacter:"File names cannot contain a slash character (/). Your file name is: ${0}",doesNotHaveExtension:"The name ${0} does not have an extension (e.g., .html, .css or .js) and will be treated as a plain text file. OK to proceed?",areYouSureDelete:"Are you sure you want to delete ${0}?",
areYouSureDeleteProject:"Are you sure you want to delete project ${0}?",noResourcesSelected:"No resources are currently selected.",optimizeOption:"Use Dojo Web Builder (experimental)",downloadFullSource:"Download uncompressed source for selected libraries (if available)",selectAll:"All",selectNone:"None",themeToClone:"Theme to clone",newName:"New Name",selectTheme:"Select a Theme",newProject:"New Project",renameProjectDialogTitle:"Rename Project To...",deleteProjectButtonTitle:"Delete Project",renameProjectButtonTitle:"Rename Project...",
deleteOnlyProjectError:"You can't delete the only project in your workspace!",newFileShowFiles:"Show file picker",newFileHideFiles:"Hide file picker",root:"(root)",nhfoDevice:"Device:",nhfoDeviceTooltip:"Select an initial mobile device",nhfoThemeButtonLabel:"Theme...",nhfoThemeButtonTitle:"Select themes or theme set for new HTML file",renameNewLabel:"Name:",renameButtonLabel:"Rename",renameDialogTitle:"Rename To...",createProject:"New project",createProjectMenuItem:"New project...",deleteProjectMenuItem:"Delete this project...",
renameProjectMenuItem:"Rename this project...",saveAsProjectTemplateMenuItem:"Save as project template...",manageProjectTemplatesMenuItem:"Manage project templates...",modifyLibrariesMenuItem:"Modify libraries...",modifyLibraries:"Modify libraries",projectColon:"Project:",ProjectMenu:"Project menu",newProjectName:"Name:",newProjectTemplate:"Template:",newProjectUseProjectTemplate:"Use project template",newProjectCloneExistingProject:"Copy files from current project into new project",newProjectEclipseSupport:"New project should be Eclipse-compatible",
newProjectNameExists:"A project with this name already exists",saveAsProjectTemplate:"Save as project template",newProjectTemplateName:"Project template name:",newProjectTemplateShareLabel:"Share with everyone",newProjectTemplateOverwrite:"Project template {0} already exists. OK to overwrite?",newProjectTemplateCreationSuccess:"Project template {0} has been saved",newProjectTemplateCreationFailure:"Error: Project template {0} save operation failed",newProjectTemplateCancelled:"Operation cancelled",
manageProjectTemplates:"Manage project templates",ManageProjectTemplatesHeaderName:"Project template name",ManageProjectTemplatesHeaderShared:"Share with everyone?",ManageProjectTemplatesHeaderCreatedBy:"Created by",ManageProjectTemplatesHeaderCreatedOn:"Created on",ManageProjectTemplatesHeaderLastModified:"Last updated",ManageProjectTemplatesNoTemplates:"You have no project templates.",ManageProjectTemplatesDuplicateNames:"Invalid entries - two project templates have the same name",ManageProjectTemplateAboutToOccur:"The following actions are about to occur:",
ManageProjectTemplateDeletions:"project template deletions",ManageProjectTemplateModifications:"project template modifications",ManageProjectTemplateOKToProceed:"OK to proceed?",ManageProjectTemplatesInitializing:"Initializing...",modify:"Modify",User:"Account",currentProject:"Current Project:",selectProject:"Select a Project:",NoteOperationNotUndoable:"Note: this operation is not undoable."}})},"davinci/ve/widgets/WidgetToolBar":function(){define("dojo/_base/declare dijit/_Templated dijit/_Widget davinci/Runtime davinci/workbench/ViewLite davinci/ve/commands/ModifyCommand dijit/form/ComboBox dijit/form/ValidationTextBox dijit/form/TextBox dojo/store/Memory davinci/lang/ve dijit/lang/_common davinci/ve/widget dojo/text!./templates/WidgetToolBar.html".split(" "),
function(p,n,m,h,g,f,b,e,k,d,c,a,q,w){return p("davinci.ve.widgets.WidgetToolBar",[g,m,n],{templateString:w,widgetsInTemplate:!0,descNode:null,idTextBox:null,classComboBox:null,blockGroupComboBox:null,widgetDescStart:"",widgetDescUnselectEnd:"",_oldIDName:null,_oldClassName:null,_oldBlockGroup:null,veNLS:c,cssRules:null,postCreate:function(){this.idTextBox.validator=dojo.hitch(this,function(a,b){this.invalidMessage=null;if(!a||!this._widget||this.changing)return!0;var d=q.byId(a);return d&&d!==this._widget?
(this.invalidMessage=c.idAlreadyUsed,!1):!0});dojo.subscribe("/davinci/ui/widget/replaced",dojo.hitch(this,this._widgetReplaced));var a=this;this.subscribe("CSSRulesUpdated",function(c){a.cssRules=c.names;a.onWidgetSelectionChange()})},initialize:function(){if((this._editor=h.currentEditor)&&this._editor.visualEditor&&this._editor.visualEditor.context){var a=this._editor.visualEditor.context.getSelection();this._widget=0==a.length?null:a[0]}else this._widget=null;this.onWidgetSelectionChange()},cssSelect:null,
startup:function(){this.inherited(arguments);if(!this.cssSelect){this.cssSelect=$(this.cssClasses).selectize({delimiter:",",persist:!0,inputClass:"selectize-input form-control input-transparent",plugins:["restore_on_backspace"],createOnBlur:!0,dropdownParent:"body",create:function(a){return{value:a,text:a}}}).data().selectize;var a=this;this.cssSelect.on("change",function(){var c=a.cssSelect.getValue();if(a._widget&&!a.changing&&(a.context&&a.context.blockChange(!1),c=c.split(",").join(" "),c!==a._oldClassName)){a._oldClassName=
c;var b={};b["class"]=c;c=new davinci.ve.commands.ModifyCommand(a._widget,b,null);dojo.publish("/davinci/ui/widgetPropertiesChanges",[{source:a._editor.editor_id,command:c}])}})}},onEditorSelected:function(){this.initialize();this.domNode.style.display=this._editor&&"davinci.ve.HTMLPageEditor"==this._editor.editorID?"block":"none"},_widgetReplaced:function(a,c){this._widget===c&&(this._widget=a,this.onWidgetSelectionChange())},onWidgetSelectionChangeBak:function(){var a="";if(this._widget){a=q.getLabel(this._widget);
this.context=this._widget.getContext();this.classComboBox.set("disabled",!1);this.idTextBox.attr("disabled",!1);this.changing=!0;this._oldBlockGroup=this._oldClassName=this._oldIDName=null;dojo.addClass(this.domNode,"propertiesSelection");this.descNode.innerHTML=a;if(this._editor&&"davinci.ve.PageEditor"===this._editor.declaredClass&&(a=this._widget._srcElement)){var b=[],e=this._widget.getContext().getModel().getDocumentElement();if(e){var k={visit:function(a){"HTMLElement"==a.elementType&&"body"!=
a.tag&&"html"!=a.tag&&(a=a.getAttribute("class"))&&(a=dojo.trim(a).split(" "),dojo.forEach(a,dojo.hitch(this,function(a){-1==dojo.indexOf(this.classes,a)&&this.classes.push(a)})))},classes:[]};e.visit(k);dojo.forEach(k.classes,function(a){b.push({name:a})})}this.cssRules&&_.each(this.cssRules,function(a){_.find(b,{name:a})||b.push({name:a})});e=new d({data:b});this.classComboBox.set("store",e);a=(a=a.getAttribute("class"))&&dojo.trim(a)||"";this.cssSelect&&(_.each(b,function(a){this.cssSelect.addOption({value:a.name,
text:a.name})},this),this.cssSelect.setValue(a.split(" "),!0));this.classComboBox.set("value",a);this._oldClassName=a;this._oldIDName=a=(a=this._widget.getId())&&dojo.trim(a)||"";this.idTextBox.attr("value",a);this._widget.domNode&&this._widget.domNode&&((a=this._widget.domNode.blockGroup)||(a=this._widget.domNode.getAttribute("blockGroup")),this._oldBlockGroup=a)}this.changing=!1}else this.descNode.innerHTML=c.noSelection,dojo.removeClass(this.domNode,"propertiesSelection"),this.context=null,this.classComboBox.set("value",
""),this.classComboBox.set("disabled",!0),this.idTextBox.attr("value",""),this.idTextBox.attr("disabled",!0)},onWidgetSelectionChange:function(){var a="";if(this._widget){a=q.getLabel(this._widget);this.context=this._widget.getContext();this.idTextBox.attr("disabled",!1);this.cssSelect&&this.cssSelect.enable();this.changing=!0;this._oldBlockGroup=this._oldClassName=this._oldIDName=null;dojo.addClass(this.domNode,"propertiesSelection");this.descNode.innerHTML=a;if(this._editor&&"davinci.ve.PageEditor"===
this._editor.declaredClass&&(a=this._widget._srcElement)){var b=[],d=this._widget.getContext().getModel().getDocumentElement();if(d){var e={visit:function(a){"HTMLElement"==a.elementType&&"body"!=a.tag&&"html"!=a.tag&&(a=a.getAttribute("class"))&&(a=dojo.trim(a).split(" "),dojo.forEach(a,dojo.hitch(this,function(a){-1==dojo.indexOf(this.classes,a)&&this.classes.push(a)})))},classes:[]};d.visit(e);dojo.forEach(e.classes,function(a){b.push({name:a})})}this.cssRules&&_.each(this.cssRules,function(a){_.find(b,
{name:a})||b.push({name:a})});a=(a=a.getAttribute("class"))&&dojo.trim(a)||"";this.cssSelect&&(_.each(b,function(a){this.cssSelect.addOption({value:a.name,text:a.name})},this),this.cssSelect.setValue(a.split(" "),!0));this._oldClassName=a;this._oldIDName=a=(a=this._widget.getId())&&dojo.trim(a)||"";this.idTextBox.attr("value",a);this._widget.domNode&&this._widget.domNode&&((a=this._widget.domNode.blockGroup)||(a=this._widget.domNode.getAttribute("blockGroup")),this._oldBlockGroup=a)}this.changing=
!1}else this.descNode.innerHTML=c.noSelection,dojo.removeClass(this.domNode,"propertiesSelection"),this.context=null,this.cssSelect&&this.cssSelect.disable(),this.cssSelect&&this.cssSelect.setValue([]),this.idTextBox.attr("value",""),this.idTextBox.attr("disabled",!0)},_onChangeIDAttribute:function(){if(this._widget&&!this.changing){var a=this.idTextBox;if(a&&a.isValid()&&(this.context&&this.context.blockChange(!1),a=a.attr("value"),a!==this._oldIDName)){this._oldIDName=a;var c={};c.id=a;a=new f(this._widget,
c,null);dojo.publish("/davinci/ui/widgetPropertiesChanges",[{source:this._editor.editor_id,command:a}])}}},_onChangeClassAttribute:function(){if(this._widget&&!this.changing){var a=this.classComboBox;if(a&&(this.context&&this.context.blockChange(!1),a=a.attr("value"),a!==this._oldClassName)){this._oldClassName=a;var c={};c["class"]=a;a=new davinci.ve.commands.ModifyCommand(this._widget,c,null);dojo.publish("/davinci/ui/widgetPropertiesChanges",[{source:this._editor.editor_id,command:a}])}}},_onChangeBlockGroupAttribute:function(){if(this._widget&&
!this.changing){var a=this.blockGroupComboBox;if(a&&(this.context&&this.context.blockChange(!1),a=a.attr("value"),a!==this._oldBlockGroup)){this._oldBlockGroup=a;var c={};c.blockGroup=a;a=new davinci.ve.commands.ModifyCommand(this._widget,c,null);this.publish("/davinci/ui/widgetPropertiesChanges",[{source:this._editor.editor_id,command:a}])}}},_onFieldFocus:function(){this.context&&this.context.blockChange(!0)},_onFieldBlur:function(){this.context&&this.context.blockChange(!1)},_onKeyPress:function(a){a.keyCode==
dojo.keys.ENTER&&this._onChangeIDAttribute()}})})},"davinci/workbench/ViewLite":function(){define(["dojo/_base/declare","./WidgetLite","../ve/States"],function(p,n){return p("davinci.workbench.ViewLite",[n],{_editor:null,_widget:null,_subWidget:null,constructor:function(m,h){this.subscriptions=[];this.publishing={};this.subscribe("/davinci/ui/editorSelected",dojo.hitch(this,this._editorSelected));this.subscribe("/davinci/ui/widgetSelected",dojo.hitch(this,this._widgetSelectionChanged))},_widgetSelectionChanged:function(m){if(this._editor)if(m.selection){var h=
m.selection[0];if(h&&this._widget==h&&this._subwidget==h.subwidget)return!1;this._subwidget=(this._widget=h)&&h.subwidget;if(this.onWidgetSelectionChange)this.onWidgetSelectionChange(m)}else console.error("have no selection")},_editorSelected:function(m){this._editor=m.editor;if(this.onEditorSelected)this.onEditorSelected(this._editor)},_subscribe:function(m,h){this.subscriptions.push(dojo.subscribe(m,this,h))},publish:function(m,h){this.publishing[m]=!0;try{dojo.publish(m,h)}catch(g){console.error(g)}delete this.publishing[m]},
destroy:function(){dojo.forEach(this.subscriptions,dojo.unsubscribe);delete this.subscriptions;this._destroyHandles()}})})},"dojo/store/Memory":function(){define(["../_base/declare","./util/QueryResults","./util/SimpleQueryEngine"],function(p,n,m){return p("dojo.store.Memory",null,{constructor:function(h){for(var g in h)this[g]=h[g];this.setData(this.data||[])},data:null,idProperty:"id",index:null,queryEngine:m,get:function(h){return this.data[this.index[h]]},getIdentity:function(h){return h[this.idProperty]},
put:function(h,g){var f=this.data,b=this.index,e=this.idProperty,e=h[e]=g&&"id"in g?g.id:e in h?h[e]:Math.random();if(e in b){if(g&&!1===g.overwrite)throw Error("Object already exists");f[b[e]]=h}else b[e]=f.push(h)-1;return e},add:function(h,g){(g=g||{}).overwrite=!1;return this.put(h,g)},remove:function(h){var g=this.index,f=this.data;if(h in g)return f.splice(g[h],1),this.setData(f),!0},query:function(h,g){return n(this.queryEngine(h,g)(this.data))},setData:function(h){h.items?(this.idProperty=
h.identifier,h=this.data=h.items):this.data=h;this.index={};for(var g=0,f=h.length;g<f;g++)this.index[h[g][this.idProperty]]=g}})})},"dojo/store/util/QueryResults":function(){define(["../../_base/array","../../_base/lang","../../when"],function(p,n,m){var h=function(g){function f(b){g[b]||(g[b]=function(){var e=arguments;return m(g,function(k){Array.prototype.unshift.call(e,k);return h(p[b].apply(p,e))})})}if(!g)return g;g.then&&(g=n.delegate(g));f("forEach");f("filter");f("map");g.total||(g.total=
m(g,function(b){return b.length}));return g};n.setObject("dojo.store.util.QueryResults",h);return h})},"dojo/store/util/SimpleQueryEngine":function(){define(["../../_base/array"],function(p){return function(n,m){function h(f){f=p.filter(f,n);var b=m&&m.sort;b&&f.sort("function"==typeof b?b:function(e,d){for(var c,a=0;c=b[a];a++){var f=e[c.attribute],g=d[c.attribute];if(f!=g)return!!c.descending==(null==f||f>g)?-1:1}return 0});if(m&&(m.start||m.count)){var e=f.length;f=f.slice(m.start||0,(m.start||
0)+(m.count||Infinity));f.total=e}return f}switch(typeof n){default:throw Error("Can not query with a "+typeof n);case "object":case "undefined":var g=n;n=function(f){for(var b in g){var e=g[b];if(e&&e.test){if(!e.test(f[b],f))return!1}else if(e!=f[b])return!1}return!0};break;case "string":if(!this[n])throw Error("No filter function "+n+" was found in store");n=this[n];case "function":}h.matches=n;return h}})},"davinci/ve/widgets/Cascade":function(){define("dojo/_base/declare ../../workbench/WidgetLite ../../workbench/Preferences ../../Workbench ../../html/CSSModel ../../library ../../Theme ../../html/CSSRule ../States davinci/lang/ve/ve system/resource".split(" "),
function(p,n,m,h,g,f,b,e,k,d,c){p=p("davinci.ve.widgets.Cascade",[n],{target:null,targetField:null,toggleClasses:null,_regex_combinators:/[\s\~\+\>]+/,_regex_not_pseudoclass:/(.*)\:not\((.*)\)(.*)/,_regex_pseudoelement:/(.*)(\:\:[^\:\.\#\[]*)(.*)/,_regex_id:/(.*)(\#[^\:\.\#\[]*)(.*)/,_regex_class:/(.*)(\.[^\:\.\#\[]*)(.*)/,_regex_attribute:/(.*)(\[[^\]]*\])(.*)/,_regex_pseudoclass:/(.*)(\:[^\:\.\#\[]*)(.*)/,_regex_univeral:/(.*)(\*[^\:\.\#\[]*)(.*)/,delegate:null,constructor:function(a,c){this.subscriptions=
[];this.publishing={};this._radioGroupName="davinci_ve_widgets_Cascade"+davinci.ve.widgets.Cascade.__id++;this._handles=[];this._values=[];this.inherited(arguments)},buildRendering:function(){this.domNode=dojo.doc.createElement("div");this.container=dojo.doc.createElement("div");dojo.addClass(this.container,"showCascade");this.domNode.appendChild(this.container);this.topDiv=dojo.create("div",{"class":"cascadeTopDiv"},this.container);this.cascadeTableDiv=dojo.create("div",{"class":"cascadeTableDiv widget"},
this.container);dojo.removeClass(this.container,"showAllValues");dojo.isArray(this.target)||(this.target=[this.target]);dojo.addClass(this.domNode,"CascadeTop");this.inherited(arguments)},startup:function(){var a=dijit.byId(this.targetField);if(a)a._cascade=this,this._getFieldValue=function(){return a.get("value")},this._setFieldValue=function(c,b){a.set&&(this._value=c||"",this._loc=b,a._setBaseLocationAttr&&a.set("baseLocation",b&&b.getPath?b.getPath():null),a.set("value",this._value,!0))},dojo.connect(a,
"onChange",this,"_onFieldChange"),dojo.connect(a,"onFocus",this,"_onFieldFocus"),dojo.connect(a,"onBlur",this,"_onFieldBlur");else{var c=dojo.byId(this.targetField);this._getFieldValue=function(){return dojo.attr(c,"value")};this._setFieldValue=function(a,b){this._value=a||"";this._loc=b;dojo.attr(c,"value",this._value)};dojo.connect(c,"onchange",this,"_onFieldChange",!0);dojo.connect(c,"onfocus",this,"_onFieldFocus",!0);dojo.connect(c,"onblur",this,"_onFieldBlur",!0)}this._value=this._getFieldValue();
this._started=!0},_canModifyRule:function(a){return a&&a.getCSSFile?(a=a.getCSSFile())?!c.findResource(a.url).readOnly():!0:!0},_onFieldChange:function(a){function c(){k&&n&&n[k]&&n[k].resolve()}function b(a){a._value=a._getFieldValue();a._valueArray=a._valueArrayNew;var c=a._valueArray&&dojo.isArray(a._valueArray)&&0<a._valueArray.length?a._valueArray:a._value;a._changeValue(a._targetValueIndex,c)}a=function(a,c){if(!a&&!c)return!0;if(!a&&c||a&&!c||a.length!=c.length)return!1;for(var b=0;b<a.length;b++)if(a[b]!==
c[b])return!1;return!0};this.context&&this.context.blockChange(!1);if(!(this._value==this._getFieldValue()&&a(this._valueArray,this._valueArrayNew)||1>this._values.length))if("(overrides)"==this._getFieldValue())this._setFieldValue&&this._setFieldValue("(overrides)",null);else if("number"==typeof this._targetValueIndex){var e=m.getPreferences("davinci.ve.editorPrefs",h.getProject());if(this._widget&&this.target&&0<this.target.length){var k=this.target[0];a=this._widget.getContext();var f;a&&(f=a.cascadeBatch);
if(f){var g=f.askUserResponse;if(f.deferreds)var n=f.deferreds}}!1===g?(this._setFieldValue(this._value,this._loc),c()):!0===g?(b(this),c()):(g=null,this._values[this._targetValueIndex].readOnly&&"davinci.themeEdit.ThemeEditor"!=this._editor.editorID?(g=d.propChangeCannotComplete+"\x3cbr\x3e\x3cbr\x3e"+dojo.string.substitute(d.toChangeProperty,["\x3ca href\x3d'app/docs/index.html#CreatingStyleRulesWithAppCss' target\x3d'_blank'\x3e"+d.creatingStyleRules+"\x3c/a\x3e"])+"\x3cbr/\x3e\x3cbr/\x3e",davinci.Workbench.showMessage(d.errorModifyingValue,
g,{width:350},dojo.hitch(this,function(){c();return!0})),f&&(f.askUserResponse=!1),this._setFieldValue(this._value,this._loc)):("theme"==this._values[this._targetValueIndex].type||"theme"==this._values[this._targetValueIndex].proposalTarget)&&e.cssOverrideWarn&&this._editor.supports("MultiPropTarget")?require(["davinci/ve/widgets/ChangeWillModify"],dojo.hitch(this,function(a){var d=new a;a=davinci.Workbench.showDialog({title:"",content:d,style:{width:350},okCallback:dojo.hitch(this,function(){f&&
(f.askUserResponse=!0);b(this);c();d.checkbox.get("checked")&&(e.cssOverrideWarn=!1,m.savePreferences("davinci.ve.editorPrefs",null,e))}),okLabel:null,hideCancel:null,submitOnEnter:!0});dojo.connect(a,"onCancel",dojo.hitch(this,function(){f&&(f.askUserResponse=!1);this._setFieldValue(this._value,this._loc);c();d.checkbox.get("checked")&&(e.cssOverrideWarn=!1,m.savePreferences("davinci.ve.editorPrefs",null,e))}))})):(b(this),c()))}},_changeValue:function(a,c){var b=void 0;this._whichStateInputElement&&
this._whichStateInputElement.checked&&(b=this._whichState);for(var d=this._values[a],e=[],k=0;k<this.target.length;k++)if(dojo.isArray(c))for(var f=0;f<c.length;f++){var g={};g[this.target[k]]=c[f];e.push(g)}else g={},g[this.target[k]]=c,e.push(g);this._dirtyCascadeList=!0;"element.style"==d.type?("position"==this.target[0]&&1==e.length&&("absolute"==e[0].position?(d=this.context.getPreference("absoluteWidgetsZindex"),e.push({"z-index":d})):e.push({"z-index":""})),dojo.publish("/davinci/ui/styleValuesChange",
[{values:e,appliesTo:"inline",applyToWhichStates:b,cascade:this}])):dojo.publish("/davinci/ui/styleValuesChange",[{values:e,appliesTo:d,applyToWhichStates:b}])},_getAttribStyleValue:function(){return this.context.getStyleAttributeValues(this._widget)},_getShortHands:function(){if(this._shorthands)return this._shorthands;this._shorthands=[];for(var a=0;a<this.target.length;a++)this._buildShortHands(this.target[a]);return this._shorthands},_buildShortHands:function(a){for(var c=!1,b=0;b<g.shorthand.length;b++)if(a==
g.shorthand[b][0]){c=!0;break}if(c)for(a=g.shorthand[b][1],c=0;c<a.length;c++){for(var d=!1,b=0;b<this._shorthands.length&&!d;b++)this._shorthands[b]==a[c]&&(d=!0);d||this._shorthands.push(a[c]);this._buildShortHands(a[c])}return this._shorthands},_onChangeOverride:function(a){alert(d.valueIsOverriden);return!1},_getSelector:function(a,c){var b=this.context.getThemeMeta();if(!b)return[];var d=b.loader.getType(a);if(b=b.metadata.getStyleSelectors(d,"Normal"))for(var e in b)for(d=0;d<b[e].length;d++)for(var k=
0;k<c.length;k++)if(c[k]==b[e][d])return e},_getMetaTargets:function(a,c){var b=this._getSelector(a,c);return this.context.getModel().getRule(b).filter(function(a){return a.getSelectorText()==b})},_getSelectionCssRules:function(a){this.context._cssCache=this.context._cssCache||{};var c=this.context.getSelection();if(!a&&!c.length)return{rules:null,matchLevels:null};var b=a||c[0].domNode||c[0],d=b.id+"_"+b.className;if(c.length){var e=this.context._cssCache[d]=this.context.model.getMatchingRules(b,
!0);this.context.cssFiles&&this.context.cssFiles.forEach(function(a){a.getMatchingRules(b,e.rules,e.matchLevels)});e.rules.forEach(function(a){var c=dojo.hitch(a,"onChange",this,function(){delete this.context._cssCache[d];connect.unsubscribe(c)})},this);return e}return{rules:null,matchLevels:null}},_getAllRules:function(){function a(a){if(a&&a.parent&&a.parent.url)return a=a.parent.url,/^themes\//.test(a)||/\/themes\//.test(a)?"theme":"queried"}var c=[];if("davinci.themeEdit.ThemeEditor"!=this._editor.editorID){var b=
this._getDefaultSelection();if(this._editor.supports("inline-style")&&"element.style"==b){for(var b=this._getAttribStyleValue(),d=null,e=0;e<b.length;e++)for(var k=b[e],f=0;f<this.target.length;f++){var g=this.target[f];void 0!==k[g]&&(d=k[g])}c.push({rule:b,value:d,matchLevel:"element.style",type:"element.style"})}if((b=this._getSelectionCssRules(this._topWidgetDom))&&b.rules)for(f=0;f<b.rules.length;f++){d="";e=b.rules[f];for(k=0;k<e.selectors.length;k++)0!=k&&(d+=", "),d+=e.selectors[k].getLabel();
e=a(e);c.push({rule:b.rules[f],ruleString:d,matchLevel:b.matchLevels[f],type:e})}this._addDeltaRules(this._widget,c);for(var b=this._getClasses(this._widget),h=0,f=0;f<b.length;f++){var m=b[f];"string"==typeof m&&0<m.length&&this._getClassSelector(m).forEach(function(a){for(var b=!1,d=0;d<c.length;d++)if(this._compareSelectors(c[d].ruleString,a)){c[d].className=m;b=!0;break}b||(b=this._computeMatchLevelSelector(a),c.splice(h,0,{rule:null,ruleString:a,targetFile:this.targetFile,className:m,value:null,
matchLevel:b,type:"proposal"}),h++)}.bind(this))}}if("davinci.themeEdit.ThemeEditor"==this._editor.editorID){if(b=this._editor._getCssRules(this._widget,this._editor._selectedSubWidget,this._editor._currentState)){f=[];for(d=b.length-1;-1<d;--d)f.push(b[d]);b=f}}else b=this._widget?this._getMetaTargets(this._widget,this.target):[];for(f=0;f<b.length;f++){d=!1;for(e=0;!d&&e<c.length;e++)c[e].rule==b[f]&&(d=!0,c[e].type="theme");d||c.push({rule:b[f],matchLevel:"theme",type:"theme"})}return c},_buildCssRuleset:function(){var a=
this._getAllRules();this._values=[];this._hasOverride=!1;for(var c=this._getShortHands(),b=0;b<a.length;b++){var d=a[b].rule;if(d){for(var e=0;e<c.length;e++)if("element.style"!=a[b].type&&null!=a[b].rule.getProperty(c[e])){a[b].shorthand=c[e];var k=d.getProperty(c[e]);a[b].value=k&&k.value;this._hasOverride=!0}else"element.style"==a[b].type&&-1<dojo.indexOf(a[b].rule,c[e])&&(a[b].shorthand=c[e],k=dojo.indexOf(a[b].rule,c[e]),a[b].value=d[k],this._hasOverride=!0);if(!a[b].shorthand&&"element.style"!=
a[b].type)a[b].value=this._getRuleTargetValue(d);else if(!a[b].shorthand&&"element.style"==a[b].type)for(e=0;e<d.length;e++)d[e].hasOwnProperty(this.target[0])&&(a[b].value=d[e][this.target[0]])}}a=this._sortRules(a);this._addClasses(a);this._values=a},_sortRules:function(a){for(var c=[],b=0;b<a.length;b++){var d=!1;"element.style"==a[b].type&&(c.splice(0,0,a[b]),d=!0);for(var e=0;!d&&e<c.length;e++)"element.style"!=c[e].matchLevel&&c[e].matchLevel<a[b].matchLevel&&(d=!0,c.splice(e,0,a[b]));d||c.push(a[b])}return c},
_addClasses:function(a){for(var c=!1,b=0;b<a.length;b++)a[b].extraClass=[],c&&a[b].extraClass.push("cssShorthandOverRidden"),a[b].value||"element.style"!=a[b].type&&this._getRuleTargetValue(a[b].rule)?c=!0:a[b].value||"element.style"==a[b].type||a[b].extraClass.push("hiddenCascadeNode"),"element.style"!=a[b].type||a[b].value||a[b].extraClass.push("elementStyleNode"),this._canModifyRule(a[b].rule)||(a[b].extraClass.push("readOnlyRule"),a[b].readOnly=!0)},_updateCascadeList:function(){function a(a){return function(){return this._onChange({target:a})}}
function c(a){return function(){return this._onChangeRemove({target:a})}}this._setFieldValue&&this._setFieldValue("",null);if(this._widget&&this._widget.domNode){dojo.removeClass(this.container,"dijitHidden");this._buildCssRuleset();this._destroy();var b=dojo.doc.createElement("table");dojo.addClass(b,"cascadeTable");var e=null,f=null,e=dojo.doc.createElement("tr");e.className="propApplyToLabelRow";f=dojo.doc.createElement("td");f.colSpan="3";f.innerHTML=d.applyToWhich;f.className="propApplyToLabelCell";
e.appendChild(f);b.appendChild(e);this._radio=[];for(var g=0;g<this._values.length;g++){var h=this._formatRuleString(this._values[g]);this._radio.push(dojo.create("input",{type:"radio",name:this._radioGroupName}));for(var e=dojo.doc.createElement("tr"),m=0;m<this._values[g].extraClass.length;m++)dojo.addClass(e,this._values[g].extraClass[m]);f=dojo.doc.createElement("td");e.appendChild(f);dojo.addClass(f,"cascadeSpacer");f=dojo.doc.createElement("td");dojo.addClass(f,"cascadeButton");f.appendChild(this._radio[this._radio.length-
1]);e.appendChild(f);f=dojo.doc.createElement("td");dojo.addClass(f,"cascadText");f.innerHTML="\x3cdiv class\x3d'cascadeRuleText'\x3e"+h+"\x3c/div\x3e";this._values[g].shorthand?this._handles.push(dojo.connect(this._radio[this._radio.length-1],"onclick",this,"_onChangeOverride")):this._handles.push(dojo.connect(this._radio[this._radio.length-1],"onclick",this,a(g)));if(this._values[g].shorthand)f.innerHTML+="\x3cdiv\x3e"+this._values[g].shorthand+":"+this._values[g].value+";\x3c/div\x3e";else if(this._values[g].value){for(m=
0;m<this.target.length;m++);f.innerHTML+="\x3cdiv class\x3d'ruleValue'\x3e"+this.target[0]+":"+this._values[g].value+";\x3c/div\x3e"}e.appendChild(f);f=dojo.doc.createElement("td");dojo.addClass(f,"cascadRemove");h=dojo.doc.createElement("button");this._values[g].readOnly&&dojo.attr(h,"disabled","true");dojo.addClass(h,"cascadeRemoveButton");f.appendChild(h);this._handles.push(dojo.connect(h,"onclick",this,c(g)));e.appendChild(f);f=dojo.doc.createElement("td");f.className="cascadeSpacer";e.appendChild(f);
b.appendChild(e)}this._widgetState=this._whichStateInputElement=void 0;e=k.getStatesListCurrent(this._widget.domNode);for(g=0;g<e.length;g++)if(e[g]){g=e[g];e=dojo.doc.createElement("tr");e.className="propWhichStateRow";f=dojo.doc.createElement("td");f.colSpan="3";h=dojo.create("input",{type:"checkbox",checked:!1,className:"propWhichStateInput"});this._whichState=g;this._whichStateInputElement=h;f.appendChild(h);h=dojo.create("label",{className:"propWhichStateLabel"});h.innerHTML=dojo.string.substitute(d.onlyApplyToState,
[g]);f.appendChild(h);f.className="propWhichStateCell";e.appendChild(f);b.appendChild(e);break}this.cascadeTableDiv.appendChild(b);this._updateFieldValue()}else dojo.addClass(this.container,"dijitHidden")},selectRule:function(a){for(var b=0;b<this._values.length;b++)if("element.style"!=a&&this._values[b].rule==a){dojo.removeClass(this._radio[b].parentNode.parentNode,"hiddenCascadeNode");dojo.attr(this._radio[b],"checked",!0);this._onChange({target:b});break}else if("element.style"==a&&"element.style"==
this._values[b].type){dojo.removeClass(this._radio[b].parentNode.parentNode,"hiddenCascadeNode");dojo.attr(this._radio[b],"checked",!0);this._onChange({target:b});break}},selectRuleBySelector:function(a){if("element.style"==a)this._targetValueIndex=0,0<this._values.length&&(dojo.attr(this._radio[0],"checked",!0),this._values[0].shorthand?dojo.addClass(this._radio[0].parentNode.parentNode,"cssShorthandOverRidden"):(a=this._getBaseLocation(),this._setFieldValue(this._values[0].value,a)));else for(var b=
0;b<this._values.length;b++)if("element.style"!=this._values[b].type&&this._values[b].rule&&this._values[b].rule.hasSelector(a)){dojo.removeClass(this._radio[b].parentNode.parentNode,"hiddenCascadeNode");dojo.attr(this._radio[b],"checked",!0);this._onChange({target:b});break}},_isTarget:function(a){if("$std_10"===a)return!0;for(var b=0;b<this.target.length;b++)if(this.target[b]==a)return!0;return!1},_targetIsRootProperty:function(){for(var a=["left","top","right","bottom"],b=0;b<this.target.length;b++)if(-1<
a.indexOf(this.target[b]))return!0;return!1},_updateFieldValue:function(){null==this._widget&&this._setFieldValue("",this._getBaseLocation());var a=this._getDefaultSelection();this._targetValueIndex=0;for(var b=!1,c=!1,d=0;d<this._values.length;d++){var e="davinci.ve.HTMLPageEditor"==this._editor.editorID,k="davinci.themeEdit.ThemeEditor"==this._editor.editorID;this._values[d].value&&!b&&k||this._values[d].value&&!b&&e&&!this._values[d].readOnly||!b&&!c&&"element.style"!=this._values[d].type&&this._values[d].rule&&
this._values[d].rule.hasSelector(a)||"element.style"==a&&"element.style"==this._values[d].type?(this.selectRule("element.style"==this._values[d].type?"element.style":this._values[d].rule),this._values[d].value&&(b=!0),c=!0):b&&!c&&dojo.addClass(this._radio[d].parentNode.parentNode,"cssOverRidden")}b||c||!e||this.selectRuleBySelector("element.style")},_getThemeMetaDataByWidget:function(a){var c=this.context.getThemeMeta();if(!c)return null;a=c.loader.getType(a);var c=c.loader.getMetaData(a),d=!1,e=
"string"==typeof a?a.split("."):null;e&&"html"==e[0]&&(d=!0);if(!c&&this.context.cssFiles&&!d)for(d=0;d<this.context.cssFiles.length;d++)if(e=b.getThemeByCssFile(this.context.cssFiles[d]))if(c=f.getThemeMetadata(e).loader.getMetaData(a))break;return c},_getDefaultSelection:function(){var a="Normal";"davinci.themeEdit.ThemeEditor"==this._editor.editorID&&(a=a||k.getState());var b=this._getThemeMetaDataByWidget(this._widget);if(!b||!b.states||this._targetIsRootProperty())return"element.style";if(b&&
b.states[a]&&b.states[a].elements){var c=b.states[a].elements,d;for(d in c)for(var e=0;e<c[d].length;e++)if(this._isTarget(c[d][e]))return"$root"==d?"element.style":d}if(b&&b.states[a]&&(c=this.context.getThemeMeta())&&(e=c.loader.getType(this._widget),c=c.metadata.getStyleSelectors(e,a,null)))for(d in c)for(a=0;a<c[d].length;a++)if(this._isTarget(c[d][a])){if(b.rootSelectors)for(a=0;a<b.rootSelectors.length;a++)if(d==b.rootSelectors[a])return"element.style";return d}return null},_addDeltaRules:function(a,
b){var d="Normal",e=-1,f=[],g=this.context._getCssFiles(),g=g&&0<g.length?g[0].url:null,h=!1;g&&(h=(h=c.findResource(g))?h._readOnly:!0);"davinci.themeEdit.ThemeEditor"==this._editor.editorID&&(d=d||k.getState());var m=this._getThemeMetaDataByWidget(a);if(m&&m.states[d]&&m.states[d].selectors){var d=m.states[d].selectors,n;for(n in d){d=!1;for(m=0;m<b.length;m++){var v=b[m];"element.style"===v.type&&(e=m);if("theme"===v.type&&v.ruleString===n&&(v.rule.parent.relativeURL==this.context._themeUrl||v.rule.parent.url==
g)){d=!0;break}}d||(d=this._computeMatchLevelSelector(n),g&&!h&&f.push({rule:null,ruleString:n,targetFile:g,className:null,value:null,matchLevel:d,type:"proposal"}),this.context._themeUrl&&!this.context.theme.getFile().readOnly()&&f.push({rule:null,ruleString:n,targetFile:this.context._themeUrl,className:null,value:null,matchLevel:d,type:"proposal",proposalTarget:"theme"}))}}var A=e+1;f.forEach(function(a){b.splice(A++,0,a)});return b},_getRuleTargetValue:function(a){var b=null;if(a)for(var c=0;!b&&
c<this.target.length;c++)b=a.getProperties(this.target[c]);if(null!=b){if(1<b.length){a=[];for(c=0;c<b.length;c++)a.push(b[c].value);return a}if(1==b.length)return b[0].value}return null},_onChangeRemove:function(a){this._changeValue(a.target,null);this._updateCascadeList()},_onChange:function(a){var b=null;if("element.style"==this._values[a.target].type)b=this._getBaseLocation();else if("proposal"==this._values[a.target].type){var d=this.context.getModel().find({elementType:"CSSFile",relativeURL:this._values[a.target].targetFile},
!0),e=this.context._getCssFiles();d?b=c.findResource(d.url):e[0].url==this._values[a.target].targetFile&&(b=c.findResource(e[0].url))}else b=c.findResource(this._values[a.target].rule.getCSSFile().url);this._setFieldValue&&this._setFieldValue(this._values[a.target].value||"",b);this._targetValueIndex=a.target},_widgetValuesChanged:function(a){if(this._dirtyCascadeList)this._updateCascadeList(),this._dirtyCascadeList=!1;else{var b=this._getShortHands();a=a.values;for(var c in a)for(a=0;a<b.length;a++)if(b[a]==
c){this._updateCascadeList();return}}},_formatRuleString:function(a){if("element.style"==a.type)return"element.style";var b="";if("proposal"==a.type)b=a.className?b+dojo.string.substitute(d.newRule,[a.className,a.targetFile]):b+dojo.string.substitute(d.newThemeRule,[a.targetFile]),b+=a.ruleString;else{var c=a.rule;a.className?b+=dojo.string.substitute(d.existingRule,[a.className,this.targetFile]):"theme"==a.type&&(b+="["+a.type+"] ");if(a.ruleString)b+=a.ruleString;else for(var e=0;e<c.selectors.length;e++)0!=
e&&(b+=", "),b+=c.selectors[e].getLabel();(e=c.searchUp("CSSFile"))&&(b+=" ("+e.url||e.relativeURL);b=a.property?b+dojo.string.substitute(d.line,[a.property.startLine]):b+dojo.string.substitute(d.line,[c.startLine||d.propUndefined])}return b},_getWidgetTopDom:function(a,b){var c=this._getSelector(a,b),d=function(a,b){if(b.matches(a))return a;for(;0<a.children.length;)return d(a.children[0],b)};if(c){var k=new e;k.setText(c+"{}");return d(a.domNode||a,k)}return null},_widgetSelectionChanged:function(a){(this._widget=
a=a[0])?(this.context=a.getContext(),this.targetFile=this.context.getAppCssRelativeFile(),this._editor=this.context.editor,this._topWidgetDom=this._getWidgetTopDom(this._widget,this.target)||this._widget.domNode||this._widget):this._topWidgetDom=null;this._updateCascadeList()},_getBaseLocation:function(){return{}},_editorSelected:function(a){this._editor=a.editor;var b;this._editor&&this._editor.getContext&&(b=this._editor.getContext());b&&this._editor.supports("style")?(this.context=b,this.targetFile=
b.getAppCssRelativeFile(),a=b.getSelection(),0<a.length?this._widgetSelectionChanged(a):this._widgetSelectionChanged([])):(this._widget=this.context=null,this._setFieldValue&&this._setFieldValue("",null));this._updateCascadeList()},_onFieldFocus:function(){this.context&&this.context.blockChange(!0)},_destroy:function(){var a=this.cascadeTableDiv;for(dojo.forEach(dojo.query("[widgetId]",a).map(dijit.byNode),function(a){a.destroy()});a.firstChild;)dojo._destroyElement(a.firstChild);dojo.forEach(this._handles,
dojo.disconnect);this._handles=[]},_onFieldBlur:function(){this.context&&this.context.blockChange(!1)},_getClasses:function(a){a=a.getClassNames("class")||"";a=a.split(" ");for(var b=0;b<a.length;b++)for(var c=b+1;c<a.length;c++)a[c]==a[b]&&a.splice(c,1);return a},_getRelativeMetaTargetSelector:function(a){var b=this.context.getThemeMeta();if(!b)return[];var c=this.context.getSelection();if(!c.length)return[];c=c[0];c=b.loader.getType(c);return b.metadata.getRelativeStyleSelectorsText(c,"Normal",
null,a,this.context.getTheme().className)},_getClassSelector:function(a){var b=this._getRelativeMetaTargetSelector(this.target),b=b.length?b[0]:"";bodyId=this.context.model.find({elementType:"HTMLElement",tag:"body"},!0).find({elementType:"HTMLAttribute",name:"id"},!0).value;var c=this.context.getTheme(),d=[];if(!c)return d;var e=c.className;b.split(",").forEach(function(b){b=b.trim();d.push("#"+bodyId+"."+e+" ."+a+b)}.bind(this));return d},_computeMatchLevelSelector:function(a){a=a.split(this._regex_combinators);
for(var b=0,c=0;c<a.length;c++){for(var d=a[c];;){var e=d.match(this._regex_not_pseudoclass);if(null!=e)b+=this._computeMatchLevelSimpleSelector(e[2]),d=e[1]+e[3];else break}b+=this._computeMatchLevelSimpleSelector(d)}return b},_computeMatchLevelSimpleSelector:function(a){var b=0;do{var c=function(c,e){var k=a.match(c);null!=k&&(d=!0,b+=e,a=k[1]+k[3])},d=!1;c(this._regex_pseudoelement,1);d||(c(this._regex_id,100),c(this._regex_class,10),c(this._regex_attribute,10),c(this._regex_pseudoclass,10),c(this._regex_univeral,
0))}while(d);0<a.length&&(b+=1);return b},_compareSelectors:function(a,b){if(!(a&&b||a==b))return!1;var c=a.split(this._regex_combinators),d=b.split(this._regex_combinators);if(c.length!=c.length)return!1;for(var e=0;e<c.length;e++)if(c[e]!=d[e])return!1;return!0},_compareSimpleSelectors:function(a,b){}});return dojo.mixin(p,{__id:0})})},"davinci/Theme":function(){define("dojo/_base/declare dojo/promise/all ./Workbench ./Runtime ./library ./workbench/Preferences ./model/Path ./html/HTMLFile ./model/Factory system/resource".split(" "),
function(p,n,m,h,g,f,b,e,k,d){var c={TEMP_CLONE_PRE:"clone_",desktop_default:"desktop_default",mobile_default:"custom_default",default_theme:"(device-specific)",none_themeset_name:"(none)",other_device:"other",none_theme:"none",dojoMobileDefault:[{theme:"android",device:"Android"},{theme:"blackberry",device:"BlackBerry"},{theme:"ipad",device:"iPad"},{theme:"iphone",device:"iPhone"},{theme:"iphone",device:"other"}],dojoMobileCustom:[{theme:"custom",device:"Android"},{theme:"custom",device:"BlackBerry"},
{theme:"custom",device:"iPad"},{theme:"custom",device:"iPhone"},{theme:"custom",device:"other"}],isThemeHTML:function(a){return-1<a.getName().indexOf("dojo-theme-editor.html")},CloneTheme:function(a,c,e,k,f,g){function h(a){var c=[];a.forEach(function(a){a=d.findResource(A+"/"+a);a=(new b(a.getPath())).relativeTo("./"+v,!0);for(var e="..",k=0;k<a.segments.length;k++)e=e+"/"+a.segments[k];c.push(e)});return c}e=[];f.getFile();g=(new b(k)).removeLastSegments(0);g=d.findResource(g.toString());g.readOnly()&&
g.createResource();d.createResource(k,!0);var m=d.findResource(k);f.getFile().getName();var p=(new b(m.getPath())).lastSegment();k=m.createResource(p+".theme");g=m.createResource(p+".css");var v=this.getThemeLocation(),A=f.getFile().parent.getPath(),C=h(f.themeEditorHtmls),G=h(f.meta),D=" ";h(f.files).forEach(function(a){D=D+'@import url("'+a+'");'});a={className:f.className,name:a,version:c||f.version,specVersion:f.specVersion,files:[""+p+".css"],meta:G,themeEditorHtmls:C,useBodyFontBackgroundClass:f.useBodyFontBackgroundClass};
f.helper&&(a.helper=f.helper.declaredClass?f.helper.declaredClass:f.helper);f.base&&(a.base=f.base);f.type&&(a.type=f.type);if(f.conditionalFiles)for(a.conditionalFiles=f.conditionalFiles,f=h(f.conditionalFiles),c=0;c<a.conditionalFiles.length;c++)p=m.createResource(a.conditionalFiles[c]),e.push(p.setContents('@import url("'+f[c]+'");'));f=k.setContents(JSON.stringify(a));f.themeFile=k;e.push(f);e.push(g.setContents(D));return{promise:n(e),themeFile:k}},getHelper:function(a){if(a){if(a.helper&&"string"!=
typeof a.helper)return a.helper;var b=a.helper;if(b){var c=new dojo.Deferred;require([b],function(a){a.declaredClass=b;b=a;c.resolve({helper:b})});return c}}},getThemeSet:function(a){var b=c.getThemeSets(m.getProject()),d=dojo.clone(this.dojoMobileDefault),e;b||(b=this.dojoThemeSets);b=dojo.clone(b);if(a){if(e=a._getDojoJsElem().getAttribute("data-dojo-config"))e=require.eval("({ "+e+" })","data-dojo-config"),e.themeMap&&(d=c.getDojoxMobileThemesFromThemeMap(a,e.themeMap));var k=a.getTheme();if(null==
k)console.error("have no desktop theme, abort!");else for(var f=0,g=b.themeSets.length;f<g;f++)if(e=b.themeSets[f],e.desktopTheme===k.name&&this.themeSetEquals(d,e.mobileTheme))return e}k||(console.error("maq hack, restore desktop theme"),k={name:"claro"});e={name:this.none_themeset_name,desktopTheme:a?k.name:"claro",mobileTheme:d};b.themeSets.push(e);return e},getBase:function(){if(m.singleProjectMode())return m.getProject()},getThemeLocation:function(){var a=this.getBase(),c=f.getPreferences("davinci.ui.ProjectPrefs",
a);return(new b(a)).append(c.themeFolder)},getTheme:function(a,b){for(var c=g.getThemes(m.getProject(),this.workspaceOnly),d=0;d<c.length;d++)if(c[d]&&c[d].name===a)return c[d]},getThemeByCssFile:function(a){var b=g.getThemes(m.getProject(),this.workspaceOnly);a=d.findResource(a.url).getPath();for(var c=0;c<b.length;c++)for(var e=b[c].getFile().getParentFolder().getPath(),k=0;k<b[c].files.length;k++)if(e+"/"+b[c].files[k]===a)return b[c];return null},getDojoxMobileThemeMap:function(a,c){for(var d=
[],e=[".*","iphone",[]],k=0;k<c.length;k++)if(c[k].theme!=this.none_theme&&c[k].theme!=this.default_theme){var f=this.getTheme(c[k].theme);if(f){var g;f.path&&f.path[0]?(g=f.path[0].lastIndexOf("/"),g=new b(f.path[0].substring(0,g+1)+f.files[0])):g=(new b(f.getFile().parent.getPath())).append(f.files[0]);var h=a.getFullResourcePath();g=g.relativeTo(h,!0).toString();c[k].device===this.other_device?e=[".*",f.base,[g]]:d.push([c[k].device,f.base,[g]])}}d.push(e);return d},getDojoxMobileThemesFromThemeMap:function(a,
c){var d=g.getThemes(m.getProject(),this.workspaceOnly),e=[];c.forEach(function(c,k,f){for(f=0;f<d.length;f++){k=d[f];var g=(new b(k.getFile().parent.getPath())).append(k.files[0]),h=a.getFullResourcePath();if(g.relativeTo(h,!0).toString()==c[2][0]){f={};f.device=c[0];f.theme=k.name;".*"===f.device&&(f.device="other");e.push(f);break}}},this);return e},themeSetEquals:function(a,b){function c(a){var b=0,d;for(d in a)a.hasOwnProperty(d)&&b++;return b}if(typeof a!==typeof b)return!1;if("function"===
typeof a)return a.toString()===b.toString();if(a instanceof Object&&b instanceof Object){if(c(a)!==c(b))return!1;var d=!0,e;for(e in a)if(d=this.themeSetEquals(a[e],b[e]),!d)return!1;return!0}return a===b},themeMapsEqual:function(a,b){var c=JSON.stringify(a),d=JSON.stringify(b);return c===d},singleMobileTheme:function(a){for(var b=a.mobileTheme[0].theme,c=1;c<a.mobileTheme.length;c++)if(a.mobileTheme[c].theme!=b)return!1;return!0},getThemeSets:function(a){var b=h.getDefaultThemeSet(),d=null;if(b){var e=
!1;if(d=f.getPreferences("maqetta.dojo.themesets",a)){for(var k=!1,g=0;g<d.themeSets.length;g++)if(d.themeSets[g].name===b.name){k=!0;c.themeSetEquals(d.themeSets[g],b)||(d.themeSets[g]=b,e=!0);break}k||(d.themeSets.push(b),e=!0)}else d=c.dojoThemeSets,d.themeSets[0]=b,e=!0;e&&c.saveThemeSets(a,d)}return d},saveThemeSets:function(a,b){f.savePreferences("maqetta.dojo.themesets",a,b)}};c.none_themeset={name:c.none_themeset_name,desktopTheme:"claro",mobileTheme:dojo.clone(c.dojoMobileDefault)};c.default_themeset=
{name:c.desktop_default,desktopTheme:"claro",mobileTheme:dojo.clone(c.dojoMobileDefault)};c.custom_themeset={name:c.mobile_default,desktopTheme:"claro",mobileTheme:c.dojoMobileCustom};c.dojoThemeSets={version:"1.7",specVersion:"0.8",helper:"maq-metadata-dojo/dojox/mobile/ThemeHelper",themeSets:[c.custom_themeset]};return c})},"davinci/html/HTMLFile":function(){define("dojo/_base/declare davinci/html/HTMLItem davinci/html/HTMLParser davinci/html/CSSSelector davinci/html/HTMLElement davinci/html/CSSImport davinci/html/CSSFile davinci/model/Model davinci/model/Path".split(" "),
function(p,n,m,h,g,f,b,e,k){return p("davinci.html.HTMLFile",n,{constructor:function(b){this.url=this.fileName=b;this.elementType="HTMLFile";this._loadedCSS={};this._styleElem=null},save:function(b){var c,a=system.resource.findResource(this.fileName);this.getText();a?(c=this.getText(),c=a.setContents(c,b)):console.error("couldnt find file in resources : "+this.fileName);return c},getText:function(b){b=b||{};b.indent=0;for(var c="",a=0;a<this.children.length;a++){var e=this.children[a],c=c+e.getText(b);
"HTMLComment"==e.elementType&&(c+=this._addWS(e._fmLine,e._fmIndent))}return c},getDocumentElement:function(b){for(b=0;b<this.children.length;b++)if("html"==this.children[b].tag)return this.children[b]},findElement:function(b){var c=this.getDocumentElement();if(c)return c.findElement(b)},getMatchingRules:function(b,c){var a={visit:function(a){if("CSSFile"==a.elementType){var c=[];a=a.getMatchingRules(b,[],c);for(var e=0;e<a.length;e++)for(var k=0;k<this.matchLevels.length;k++)if(c[e]>this.matchLevels[k]){this.matchLevels.splice(k,
0,c[e]);this.rules.splice(k,0,a[e]);break}0==this.rules.length&&(this.rules=a,this.matchLevels=c);return!0}return!1},matchLevels:[],rules:[]};this.visit(a);return c?{rules:a.rules,matchLevels:a.matchLevels}:a.rules},getRule:function(b){if(!b)return[];var c=h.parseSelectors(b);b={visit:function(a){return"CSSFile"==a.elementType?(a=a.getRule(c),this.rules=this.rules.concat(a||[]),!0):!1},rules:[]};this.visit(b);return b.rules},setText:function(b,c){this.visit({visit:function(a){"CSSImport"==a.elementType&&
a.close()}});this.children=[];this._styleElem=null;var a=m.parse(b||"",this),e="";c||0!=a.errors.length||(e=this.getText(),this.children=[],a=m.parse(e,this));this.endOffset=a.endOffset;this.errors=a.errors;var k=this;c||this.visit({visit:function(a){"CSSImport"!=a.elementType||a.cssFile||(a.load(!0),dojo.connect(a.cssFile,"onChange",null,dojo.hitch(k,"onChange")))}});this.onChange()},hasStyleSheet:function(b){for(var c=this.find({elementType:"CSSImport"}),a=0;a<c.length;a++)if(c[a].url==b)return!0;
return!1},addStyleSheet:function(b,c,a,e,h){var m=new k(this.url||this.fileName),m=m.getParentPath().append(b),m=m.toString();a||(this._loadedCSS[m]=require("davinci/model/Factory").getModel({url:m,includeImports:!0,loader:h}));c&&this._loadedCSS[m].setText(c);this.onChange();this._styleElem||(c=this.find({elementType:"HTMLElement",tag:"head"},!0),h=c.getChildElement("style"),h||(h=new g("style"),c.addChild(h)),this._styleElem=h);c=new f;c.parent=this;c.url=b;e?this._styleElem.insertBefore(c,e):this._styleElem.addChild(c);
a||c.load(!0)},close:function(){this.visit({visit:function(b){"CSSImport"==b.elementType&&b.close()}});require("davinci/model/Factory").closeModel(this)},getLabel:function(){return"\x3c\x3e"},getID:function(){return this.fileName},updatePositions:function(b,c){(new e(this)).updatePositions(this,b,c);this.visit({visit:function(a){if(a.endOffset<b)return!0;"HTMLElement"==a.elementType&&a.startTagOffset>b&&(a.startTagOffset+=c)}})},mapPositions:function(b){var c=this.getText();b=b.getText();c=c.indexOf(b);
b=c+b.lastIndexOf("\x3e")+1;return{startOffset:c,endOffset:b}},reportPositions:function(){this.visit({visit:function(b){}})},evaluate:function(b){if("/"!==b.charAt(0))console.error("invalid XPath string");else{var c=this;b.substr(1).split("/").forEach(function(a){a=a.match(this._RE_XPATH);var b=a[1];a=a[2];var d;d=c.children.filter(function(a){return a.tag===b});!a&&1<d.length?console.error("invalid XPath string; no index specified for multiple elements"):c=a?d[a-1]:d[0]},this);return c}},_RE_XPATH:/(\w+)(?:\[(\d+)\])?/})})},
"davinci/html/HTMLParser":function(){define("dojo/_base/declare davinci/html/HTMLText davinci/html/HTMLElement davinci/html/HTMLAttribute davinci/html/HTMLComment davinci/html/PHPBlock davinci/model/parser/Tokenizer davinci/html/CSSParser".split(" "),function(p,n,m,h,g,f,b,e){var k=function(){var d={autoSelfClosers:{br:!0,img:!0,hr:!0,link:!0,input:!0,meta:!0,col:!0,frame:!0,base:!0,area:!0},doNotIndent:{pre:!0,"!cdata":!0}},c={autoSelfClosers:{},doNotIndent:{"!cdata":!0}},a=d,e=!1,k=function(){function a(b,
d){var f=b.next();if("\x3c"==f){if(b.equals("!"))return b.next(),b.equals("[")?b.lookAhead("[CDATA[",!0)?(d(e("xml-cdata","]]\x3e")),null):"xml-text":b.lookAhead("--",!0)?(d(e("xml-comment","--\x3e")),null):b.lookAhead("DOCTYPE",!0)?(b.nextWhileMatches(/[\w\._\-]/),d(e("xml-doctype","\x3e")),"xml-doctype"):"xml-text";if(b.equals("?")){b.next();if(b.lookAhead("php",!0,!1,!0))return d(k("php-block","?\x3e")),null;b.nextWhileMatches(/[\w\._\-]/);d(e("xml-processing","?\x3e"));return"xml-processing"}b.equals("/")&&
b.next();d(c);return"xml-punctuation"}if("\x26"==f){for(;!b.endOfLine()&&";"!=b.next(););return"xml-entity"}b.nextWhileMatches(/[^&<\n]/);return"xml-text"}function c(b,e){var k=b.next();if("\x3e"==k)return e(a),"xml-punctuation";if(/[?\/]/.test(k)&&b.equals("\x3e"))return b.next(),e(a),"xml-punctuation";if("\x3d"==k)return"xml-punctuation";if(/[\'\"]/.test(k))return e(d(k)),null;b.nextWhileMatches(/[^\s\u00a0=<>\"\'\/?]/);return"xml-name"}function d(a){return function(b,d){for(;!b.endOfLine();)if(b.next()==
a){d(c);break}return"xml-attribute"}}function e(b,c){return function(d,e){for(;!d.endOfLine();){if(d.lookAhead(c,!0)){e(a);break}d.next()}return b}}function k(b,c){return function(d,e){for(var k=!1;!d.endOfLine();){if(d.lookAhead(c,!0)){k=!0;e(a);break}d.next()}if(!k&&d.endOfLine())d.next();else{for(;d.lookAheadRegex(/^[\ \t]/,!0););d.endOfLine()&&d.next()}return b}}return function(c,d){return b.tokenizer(c,d||a)}}();return{make:function(b){function c(a){for(var b=a.length-1;0<=b;b--)K.push(a[b])}
function d(){c(arguments);Q=!0}function f(){c(arguments);Q=!1}function g(){E.style+=" xml-error"}function h(a){return function(b,c){c==a?d():(g(),d(arguments.callee))}}function m(b,c){var d=a.doNotIndent.hasOwnProperty(b)||O&&O.noIndent;O={prev:O,name:b,indent:P,startOfLine:c,noIndent:d}}function n(a){return function(b,c){var d=a;if(d&&d.noIndent)return c;if(e&&/<!\[CDATA\[/.test(b))return 0;d&&/^<\//.test(b)&&(d=d.prev);for(;d&&!d.startOfLine;)d=d.prev;return d?d.indent+indentUnit:0}}function p(){return f(G,
p)}function G(a,b){"\x3c"==b?d(D,F,H(1==M)):"\x3c/"==b?d(I,h("\x3e")):("xml-cdata"==a?(O&&"!cdata"==O.name||m("!cdata"),/\]\]>$/.test(b)&&(O=O.prev)):W.hasOwnProperty(a)||g(),d())}function D(a,b){"xml-name"==a?(R=b.toLowerCase(),E.style="xml-tagname",d()):(R=null,f())}function I(a,b){"xml-name"==a&&(E.style="xml-tagname",O&&b.toLowerCase()==O.name?O=O.prev:g());d()}function H(b){return function(c,e){"/\x3e"==e||"\x3e"==e&&a.autoSelfClosers.hasOwnProperty(R)?d():"\x3e"==e?(m(R,b),d()):(g(),d(arguments.callee))}}
function F(a){"xml-name"==a?(E.style="xml-attname",d(N,F)):f()}function N(a,b){"\x3d"==b?d(L):"\x3e"==b||"/\x3e"==b?f(H):f()}function L(a){"xml-attribute"==a?d(L):f()}var J=k(b),E,K=[p],M=0,P=0,R=null,O=null,Q,W={"xml-text":!0,"xml-entity":!0,"xml-comment":!0,"xml-processing":!0,"xml-doctype":!0,"php-block":!0};return{indentation:function(){return P},next:function(){E=J.next();"whitespace"==E.style&&0==M?P=E.value.length:M++;"\n"==E.content&&(P=M=0,E.indentation=n(O));if("whitespace"==E.style||"xml-comment"==
E.type||"php-block"==E.type)return E;for(;;)if(Q=!1,K.pop()(E.style,E.content),Q)return E},copy:function(){var a=K.concat([]),b=J.state,c=O,d=this;return function(e){K=a.concat([]);M=P=0;O=c;J=k(e,b);return d}}}},electricChars:"/",configure:function(b){null!=b.useHTMLKludges&&(a=b.useHTMLKludges?d:c);b.alignCDATA&&(e=b.alignCDATA)}}}();return{parse:function(d,c){function a(a,b){C=new n;C.wasParsed=!0;C.startOffset=b;A[A.length-1].addChild(C,void 0,!0);C.value=a}function q(b){b.content!=b.value&&a(b.value.substring(b.content.length),
b.offset+b.value.length)}function w(a,b){var c=a.split("\n"),d=c[c.length-1].length;b.children.length?(lastElement=b.children[b.children.length-1],lastElement._fmLine=c.length-1,lastElement._fmIndent=d):(b._fmChildLine=c.length-1,b._fmChildIndent=d)}function r(){if(null!=C&&!C.value.match(/\S/)){var a=A[A.length-1];a.children.pop();w(C.value,a)}C=null}function p(){var a=A[A.length-1];x.nextWhileMatches(/[\s\u00a0]/);var b=x.get();null!=C?(C.value+=b,r()):w(b,a);e.parse(x,a)}function y(a){for(u=z.next();a&&
"whitespace"==u.style;)u=z.next();return u}var x=b.stringStream({next:function(){if(1==++this.count)return d;throw StopIteration;},count:0,text:d}),z=k.make(x),u,v=[],A=[];A.push(c);var C,G,D;try{do switch(u=z.next(),u.style){case "xml-punctuation":r();if("\x3c"==u.content){var I=new m;I.wasParsed=!0;I.startOffset=u.offset;A[A.length-1].addChild(I,void 0,!0);y(!0);for("xml-tagname"==u.style?I.tag=u.content:v.push("expecting tag name");"xml-attname"==(u=y(!0)).style;){var H=new h;H.wasParsed=!0;I.attributes.push(H);
H.name=u.content;H.startOffset=u.offset;y(!0);if("\x3d"==u.content)if(u=z.next(),"xml-attribute"==u.style){var F=u.content;H.setValue(F.substring(1,F.length-1))}else v.push("expecting attribute value");else H.noValue=!0,H.setValue(!0);H.endOffset=u.offset-1;if(H.noValue&&"xml-attname"!=u.style)break}"xml-punctuation"!=u.style?v.push("expecting \x3e"):(I.startTagOffset=u.offset,"\x3e"==u.content?A.push(I):(I.noEndTag=!0,I=A[A.length-1]),q(u));"style"==I.tag&&p()}else if("\x3c/"==u.value){var N=I;u=
z.next();"script"==I.tag&&(I.script=I.getElementText());A.pop();I=A[A.length-1];u=z.next();N.endOffset=u.offset;q(u)}D=null;break;case "xml-text":case "whitespace":case "xml-entity":G?G.value+=u.value:D?D.value+=u.value:C?C.value+=u.value:a(u.value,u.offset);D=null;break;case "xml-comment":r();var L=new g;L.wasParsed=!0;L.startOffset=u.offset;L.value=u.content.substring(4,u.content.length-3);L.endOffset=u.offset+u.content.length;A[A.length-1].addChild(L,void 0,!0);D=null;break;case "php-block":r();
var J=new f;J.wasParsed=!0;J.startOffset=u.offset;J.value=u.content;J.endOffset=u.offset+u.content.length;A[A.length-1].addChild(J,void 0,!0);D=J;break;case "xml-doctype":G||(r(),L=new g,L.wasParsed=!0,L.startOffset=u.offset,L.value=u.value.substring(2),A[A.length-1].addChild(L,void 0,!0),L.isProcessingInstruction=!0,u=z.next());var E=u.content.length-1;"\x3e"==u.content.charAt(u.content.length-1)?(L.endOffset=u.offset+u.content.length,L.value+=u.content.substring(0,E),q(u),G=void 0):(G=L,L.value+=
u.content);D=null}while(1)}catch(K){}return{errors:v,endOffset:u?u.offset:0}}}})},"davinci/html/PHPBlock":function(){define(["dojo/_base/declare","davinci/html/HTMLItem"],function(p,n){return p("davinci.html.PHPBlock",n,{constructor:function(m){this.elementType="PHPBlock";this.value=m||""},getText:function(m){return m.excludeIgnoredContent?"":this.value}})})},"davinci/model/parser/Tokenizer":function(){define(["dojo/_base/declare","davinci/js/JSExpression"],function(p,n){return{stringStream:function(m){function h(){for(;f==
g.length;){e+=g;g="";f=0;try{g=m.next()}catch(b){if(b!=StopIteration)throw b;return!1}}return!0}var g="",f=0,b=0,e="";return{peek:function(){return h()?g.charAt(f):null},next:function(){if(!h()){if(0<e.length)throw"End of stringstream reached without emptying buffer ('"+e+"').";throw StopIteration;}return g.charAt(f++)},get:function(){var k=e;e="";0<f&&(k+=g.slice(0,f),g=g.slice(f),f=0);b+=k.length;return k},getOffset:function(){return b},push:function(e){g=g.slice(0,f)+e+g.slice(f);b-=e.length},
lookAhead:function(b,d,c,a){function h(b){return a?b.toLowerCase():b}b=h(b);var n=!1,r=e,p=f;for(c&&this.nextWhileMatches(/[\s\u00a0]/);;){c=f+b.length;var y=g.length-f;if(c<=g.length){n=b==h(g.slice(f,c));f=c;break}else if(b.slice(0,y)==h(g.slice(f))){e+=g;g="";try{g=m.next()}catch(x){if(x!=StopIteration)throw x;break}f=0;b=b.slice(y)}else break}n&&d||(g=e.slice(r.length)+g,f=p,e=r);return n},lookAheadRegex:function(b,d){if("^"!=b.source.charAt(0))throw Error("Regexps passed to lookAheadRegex must start with ^");
for(;-1==g.indexOf("\n",f);)try{g+=m.next()}catch(c){if(c!=StopIteration)throw c;}var a=g.slice(f).match(b);a&&d&&(f+=a[0].length);return a},more:function(){return null!==this.peek()},applies:function(b){var d=this.peek();return null!==d&&b(d)},nextWhile:function(b){for(var d;null!==(d=this.peek())&&b(d);)this.next()},matches:function(b){var d=this.peek();return null!==d&&b.test(d)},nextWhileMatches:function(b){for(var d;null!==(d=this.peek())&&b.test(d);)this.next()},equals:function(b){return b===
this.peek()},endOfLine:function(){var b=this.peek();return null==b||"\n"==b}}},tokenizer:function(m,h){function g(b){return"\n"!=b&&/^[\s\u00a0]*$/.test(b)}var f={state:h,take:function(b){"string"==typeof b&&(b={style:b,type:b});b.offset=m.getOffset();b.content=(b.content||"")+m.get();/\n$/.test(b.content)||m.nextWhile(g);b.value=b.content+m.get();return b},next:function(){if(!m.more())throw StopIteration;var b;if(m.equals("\n"))return m.next(),this.take("whitespace");if(m.applies(g))b="whitespace";
else for(;!b;)b=this.state(m,function(b){f.state=b});return this.take(b)}};return f}}})},"davinci/js/JSExpression":function(){define(["dojo/_base/declare","davinci/js/JSElement"],function(p,n){return p("davinci.js.JSExpression",n,{constructor:function(){this.elementType="JSExpression"},getText:function(){var m="";this.comment&&(m+=this.printNewLine(context)+this.comment.getText(context));this.label&&(m+=this.printNewLine(context)+this.label.getText(context));return m},add:function(m){}})})},"davinci/js/JSElement":function(){define(["dojo/_base/declare",
"davinci/js/JSModel"],function(p,n){var m=null,h=null;return p("davinci.js.JSElement",n,{constructor:function(){this.elementType="JSElement";null!==m&&(this.comment=m,m=null);null!==h&&(this.label=h,h=null)},printNewLine:function(g){for(var f="\n",b=0;b<g.indent;b++)f+=" ";return f},printStatement:function(g,f){return this.printNewLine(g)+f.getText(g)+(f.nosemicolon?"":";")},add:function(g){this.addChild(g)},init:function(g,f,b){},getLabel:function(){context={indent:0};return this.getText(context)},
getID:function(){return this.parent.getID()+":"+this.startLine+":"+this.getLabel()},getSyntaxPositions:function(g){function f(b,d,c,a){"undefined"!=typeof g&&g!=b||e.push({line:b,col:d,length:c,type:a})}function b(b,d,c){"undefined"!=typeof g&&g!=b[0]||e.push({line:b[0],col:b[1],length:d,type:c})}var e=[];this.visit({visit:function(e){"JSFunction"==e.elementType?(f(e.startLine,e.startCol,8,"keyword"),b(e.leftParenPos,1,"delimiter"),b(e.rightParenPos,1,"delimiter"),b(e.leftBracePos,1,"delimiter"),
b(e.rightBracePos,1,"delimiter")):"JSVariableDeclaration"==e.elementType?f(e.startLine,e.startCol,3,"keyword"):"JSVariableFragment"==e.elementType?e.equalPos?b(e.equalPos,1,"operator"):f(e.startLine,e.startCol,1,"name"):"JSNameReference"==e.elementType&&f(e.startLine,e.startCol,e.endCol-e.startCol,"name")},endVisit:function(b){return!0}});return e}})})},"davinci/js/JSModel":function(){define(["dojo/_base/declare","davinci/model/Model"],function(p,n){davinci.js||(davinci.js={});return p("davinci.js.JSModel",
n,{})})},"davinci/html/CSSParser":function(){define("dojo/_base/declare davinci/html/CSSSelector davinci/html/CSSCombinedSelector davinci/html/CSSRule davinci/html/CSSProperty davinci/html/CSSAtRule davinci/html/CSSImport davinci/model/parser/Tokenizer davinci/model/Comment".split(" "),function(p,n,m,h,g,f,b,e,k){var d=null,c=function(){function a(a,b,c){return function(d){return!a||/^\}/.test(d)?c:b?c+2*indentUnit:c+indentUnit}}var b=function(){function a(e,f){var k=e.next();if("@"==k)return e.nextWhileMatches(/[a-zA-Z0-9_-]/),
"css-at";if("/"==k&&e.equals("*"))return f(b),null;if("\x3c"==k&&e.equals("!"))return f(c),null;if("\x3d"==k)return"css-compare";if(!e.equals("\x3d")||"~"!=k&&"|"!=k){if('"'==k||"'"==k)return f(d(k)),null;if("#"==k)return e.nextWhileMatches(/[\w-]/),"css-hash";if("!"==k)return e.nextWhileMatches(/[ \t]/),e.nextWhileMatches(/\w/),"css-important";if(/\d/.test(k))return e.nextWhileMatches(/[\w.%]/),"css-unit";if(/[,.+>*\/]/.test(k))return"css-select-op";if(/[;{}:\[\]]/.test(k))return"css-punctuation";
e.nextWhileMatches(/[\w\\\-_]/);return"css-identifier"}e.next();return"css-compare"}function b(c,d){for(var e=!1;!c.endOfLine();){var f=c.next();if(e&&"/"==f){d(a);break}e="*"==f}return"css-comment"}function c(b,d){for(var e=0;!b.endOfLine();){var f=b.next();if(2<=e&&"\x3e"==f){d(a);break}e="-"==f?e+1:0}return"css-comment"}function d(b){return function(c,d){for(var e=!1;!c.endOfLine();){var f=c.next();if(f==b&&!e)break;e=!e&&"\\"==f}e||d(a);return"css-string"}}return function(b,c){return e.tokenizer(b,
c||a)}}();return{make:function(c,d){d=d||0;var e=b(c),f=!1,k=!1,g=!1,h={next:function(){var b=e.next(),c=b.style,h=b.content;"css-hash"==c&&(c=b.style=k?"css-colorcode":"css-identifier");"css-identifier"==c&&(k?b.style="css-value":f||g||(b.style="css-selector"));"\n"==h&&(b.indentation=a(f,k,d));"{"==h&&"@media"==g?g=!1:"{"==h?f=!0:"}"==h?f=k=g=!1:";"==h?k=g=!1:f&&"css-comment"!=c&&"whitespace"!=c?k=!0:f||"css-at"!=c||(g=h);return b},copy:function(){var a=f,c=k,d=e.state;return function(g){e=b(g,
d);f=a;k=c;return h}}};return h},electricChars:"}"}}();c.parse=function(a,q){function w(a){D.push(a)}function r(){var a;v=u.next();for(var b=!1;"css-comment"==v.style||"whitespace"==v.style;){if("css-comment"==v.style||b)d||(d=new k),a=v.content,0===v.content.indexOf("/*")&&(a=a.substring(2),b=!0,d.addComment("block",void 0,void 0,"")),-1<a.lastIndexOf("*/")&&a.lastIndexOf("*/")==a.length-2&&(a=a.substring(0,a.length-2),b=!1),d.appendComment(a);v=u.next()}return v}function p(){A=new n;A.startOffset=
v.offset;A.parent=H;C?(C.selectors.push(A),A.parent=C):H.selectors.push(A)}function y(){var a=A;a.endOffset=v.offset-1;C||(C=new m,C.parent=H,C.selectors.push(a),A.startOffset=a.startOffset,H.selectors[H.selectors.length-1]=C);p();C.combiners.push(G);G=" "}var x,z;"string"==typeof a?x=e.stringStream({next:function(){if(1==++this.count)return a;throw StopIteration;},count:0,text:a}):(x=a,z=!0);var u=c.make(x),v,A,C,G=" ",D=[],I=[],H,F;try{do switch(r(),v.style){case "css-selector":case "css-select-op":if(z&&
"\x3c"==v.content)throw x.push("\x3c"),StopIteration;H=new h;I.push(H);H.startOffset=v.offset;q&&q.addChild(H,void 0,!0);F=!1;C=void 0;G=" ";p();a:for(;;){switch(v.style){case "css-select-op":switch(v.content){case ",":C=void 0;p();break;case ".":F&&y();r();A.cls=A.cls?A.cls+"."+v.content:v.content;F=v.value.length>v.content.length;break;case "*":(A.element||A.cls)&&y();A.element="*";break;case "+":case "\x3e":G=v.content,y()}break;case "css-selector":"css-identifier"==v.type?((A.element||A.cls||
F)&&y(),A.element=v.content):"css-hash"==v.type&&((A.id||F)&&y(),A.id=v.content.substring(1));F=v.value.length>v.content.length;break;case "css-punctuation":if("{"==v.content)break a;else":"==v.content?(r(),":"==v.content?(r(),A.pseudoElement=v.content):(A.pseudoRule=v.content,F=!0)):"["==v.content&&(r(),A.attribute={name:v.content},r(),"\x3d"===v.content||"~\x3d"===v.content||"|\x3d"===v.content)&&(A.attribute.type=v.content,r(),A.attribute.value=v.content.substring(1,v.content.length-1),r())}r()}d&&
(H.comment=d,d=null);for(A.endOffset=v.offset-1;"}"!=r().content;){var N=v.offset,L=v.content,J=!1;"css-hash"==v.type?(r(),"css-identifier"==v.type?L+=v.content:J=!0):"css-identifier"!=v.type&&("*"!=v.content?w("expecting identifier around "+A.getText()+"{ "+E.name+": "+propery.value):(r(),L+=v.content));var E=new g;E.startOffset=N;E.parent=H;d&&(E.comment=d,d=null);H.properties.push(E);H.addChild(E,void 0,!0);E.name=L;J||":"!=r().content&&w("expecting ':' "+A.getText()+"{ "+E.name+": "+propery.value);
r();E.value=v.value;if("url"==E.value){for(;")"!=r().content;)E.value+=v.value;E.value+=v.value}for(;";"!=r().content&&"}"!=v.content;)E.value+=v.value;d&&(E.postComment=d,d=null);E.endOffset=v.offset-1;if("}"==v.content)break}d&&(E.postComment=d,d=null);H.endOffset=v.offset;break;case "css-at":var K=v.content.substring(1),M="import"==K?new b:new f;M.startOffset=v.offset;q&&q.addChild(M,void 0,!0);if("import"==K)J=M,r(),"url"==v.content&&(J.isURL=!0,r(),r()),J.url=v.content.substring(1,v.content.length-
1),J.isURL&&r(),r();else if(0<=K.indexOf("keyframes")){var P=J="",R=!1,O="\t\t";r();J=v.content;"."==J&&(r(),J+=v.content);r();M.value=v.content+"\n";r();if(0<=v.content.indexOf("from")||0<=v.content.indexOf("to")||0<=v.content.indexOf("%"))a:for(;;){M.value+="\t"+v.content+" ";r();for(M.value+=v.content+"\n";"}"!=r().content;){R&&(O="\t\t",R=!1);if(";"==v.content)P="\n",R=!0;else if(":"==v.content||")"==v.content)P=" ";M.value+=O+v.content+P;O=P=""}M.value+="\t"+v.content+"\n";r();if("}"==v.content)break a}else w("inside keyframes decl expecting from/to blocks or nn% blocks");
M.value+=v.content;M.name=K+" "+J}else for(M.name=K,M.value="";";"!=r().content;)M.value+=v.content;M.endOffset=v.offset}while(1)}catch(Q){d&&H&&(H.postComment=d,d=null)}return{errors:D,model:I}};return c})},"davinci/html/CSSSelector":function(){define(["require","dojo/_base/declare","davinci/html/CSSElement"],function(p,n,m){n=n("davinci.html.CSSSelector",m,{constructor:function(){this.elementType="CSSSelector"},matchesSelector:function(h){if(h.elementType==this.elementType&&this.id==h.id&&this.cls==
h.cls&&this.element==h.element&&this.pseudoRule==h.pseudoRule)return!0},getText:function(h){h="";this.element&&(h+=this.element);this.id&&(h=h+"#"+this.id);this.cls&&(h=h+"."+this.cls);this.pseudoRule&&(h=h+":"+this.pseudoRule);this.pseudoElement&&(h=h+"::"+this.pseudoElement);this.attribute&&(h=h+"["+this.attribute.name,this.attribute.type&&(h=h+this.attribute.type+'"'+this.attribute.value+'"'),h+="]");return h},matches:function(h,g){var f=h[g||0],b=0,e=!1;if(this.id){if(this.id!=f.id)return-1;b+=
100;e=!0}if(this.element){if("*"!=this.element){if(this.element!=f.tagName&&this.element.toUpperCase()!=f.tagName)return-1;b+=1}e=!0}if(this.cls&&f.classes){f=f.classes;if(0<=this.cls.indexOf(".")){for(var e=this.cls.split("."),k=0;k<e.length;k++){for(var d=!1,c=0;c<f.length&&!(d=f[c]==e[k]);c++);if(!d)return-1}b+=10*e.length}else{d=!1;for(c=0;c<f.length&&!(d=f[c]==this.cls&&!this.pseudoRule);c++);if(!d)return-1;b+=10}e=!0}return e?b:-1},getCSSRule:function(){return"CSSRule"==this.parent.elementType?
this.parent:this.parent.parent}});n.parseSelectors=function(h){if("string"==typeof h){h+="{}";var g=new (p("davinci/html/CSSFile"));g.setText(h);return g.children[0].selectors}return h};return n})},"davinci/html/CSSElement":function(){define(["dojo/_base/declare","davinci/model/Model"],function(p,n){return p("davinci.html.CSSElement",n,{constructor:function(){"undefined"!=typeof pushComment&&null!==pushComment&&(this.comment=pushComment,pushComment=null);this.elementType="CSSElement"},getLabel:function(){context=
{indent:0,noComments:!0};return this.getText(context)},onChange:function(m){if(this.parent)if(m)this.parent.onChange(m);else this.parent.onChange(this)},close:function(m){for(m=0;m<this.children;m++)this.children[m].close()},getCSSFile:function(){var m=this.getCSSRule();if(m)return m.parent},getCSSRule:function(){},_convertNode:function(m){if(dojo.isArray(m))return m;for(var h=[];m&&"HTML"!=m.tagName;)h.push({tagName:m.tagName,id:m.id,classes:m.className&&m.className.split(" ")}),m=m.parentNode;return h},
getID:function(){return this.parent.getID()+":"+this.startOffset+":"+this.getLabel()}})})},"davinci/html/CSSCombinedSelector":function(){define(["dojo/_base/declare","davinci/html/CSSElement"],function(p,n){return p("davinci.html.CSSCombinedSelector",n,{constructor:function(){this.selectors=[];this.combiners=[];this.elementType="CSSCombinedSelector"},matchesSelector:function(m){if(m.elementType==this.elementType&&m.selectors.length==this.selectors.length){for(var h=0;h<this.selectors.length;h++)if(this.combiners[h]!=
m.combiners[h]||!this.selectors[h].matchesSelector(m.selectors[h]))return!1;return!0}},getText:function(m){for(var h="",g=0;g<this.selectors.length-1;g++)h+=this.selectors[g].getText(m),h=" "!=this.combiners[g]?h+(" "+this.combiners[g]+" "):h+this.combiners[g];return h+=this.selectors[this.selectors.length-1].getText(m)},matches:function(m){for(var h=this.selectors.length-1,g=0,f=0;f<m.length;f++){var b;if(0<=(b=this.selectors[h].matches(m,f))&&(g+=b,h--,0>h))return g;if(0==f&&0>b)return-1}},visit:function(m){if(!m.visit(this)){for(var h=
0;h<this.children.length;h++)this.children[h].visit(m);for(h=0;h<this.selectors.length;h++)this.selectors[h].visit(m)}m.endVisit&&m.endVisit(this)},getCSSRule:function(){return this.parent}})})},"davinci/html/CSSRule":function(){define(["dojo/_base/declare","davinci/html/CSSElement","davinci/html/CSSParser","davinci/html/CSSProperty"],function(p,n,m,h){return p("davinci.html.CSSRule",n,{constructor:function(){this.elementType="CSSRule";this.selectors=[];this.properties=[]},getText:function(g){var f=
"";g=g||[];this.comment&&!g.noComments&&(f+=this.comment.getText(g));for(var f=f+this.getSelectorText(g),f=f+" {",b=0;b<this.properties.length;b++)f=f+"\n "+this.properties[b].getText(g);f+="\n}\n";this.postComment&&!g.noComments&&(f+=this.postComment.getText(g));return f},setText:function(g){require("davinci/html/CSSParser").parse(g,this);dojo.mixin(this,this.children[0]);this.startOffset=(this.parent?this.parent.endOffset:0)+1;this.setDirty(!0)},addProperty:function(g,f){var b=new h(g,f,this);
this.properties.push(b);this.setDirty(!0);this.onChange()},insertProperty:function(g,f,b){var e;(e=this.getProperty(g))&&this.removeProperty(g);e=new h(g,f,this);this.properties.splice(b,0,e);this.setDirty(!0);this.onChange()},getSelectorText:function(g){for(var f="",b=0;b<this.selectors.length;b++)0<b&&(f+=", "),f+=this.selectors[b].getText(g);return f},matches:function(g){g=this._convertNode(g);for(var f,b=0;b<this.selectors.length;b++)if(0<=(f=this.selectors[b].matches(g)))return f},visit:function(g){if(!g.visit(this)){for(var f=
0;f<this.children.length;f++)this.children[f].visit(g);for(f=0;f<this.selectors.length;f++)this.selectors[f].visit(g)}g.endVisit&&g.endVisit(this)},hasSelector:function(g){for(var f=0;f<this.selectors.length;f++)if(this.selectors[f].getLabel()==g)return!0;return!1},matchesSelectors:function(g){for(var f=0;f<g.length;f++)for(var b=0;b<this.selectors.length;b++)if(this.selectors[b].matchesSelector(g[f]))return!0;return!1},getCSSRule:function(){return this},getLabel:function(){return this.getSelectorText({})},
getProperty:function(g){for(var f=0;f<this.properties.length;f++)if(g==this.properties[f].name)return this.properties[f]},hasProperty:function(g){for(var f=0;f<this.properties.length;f++)if(g==this.properties[f].name)return!0},getProperties:function(g){for(var f=[],b=0;b<this.properties.length;b++)g&&g!=this.properties[b].name||f.push(this.properties[b]);return f},setProperty:function(g,f){var b=this.getProperty(g);f?b?b.value=f:(b=new h,b.name=g,b.value=f,this.properties.push(b),b.parent=this):this.removeProperty(g);
this.setDirty(!0);this.onChange()},removeProperty:function(g){for(var f=0;f<this.properties.length;f++)g==this.properties[f].name&&this.properties.splice(f,1);this.setDirty(!0);this.onChange()},removeAllProperties:function(){this.properties=[];this.setDirty(!0);this.onChange()},removeStyleValues:function(g){for(var f=[],b=0;b<this.properties.length;b++){for(var e,k=0;k<g.length&&!e;k++)e=g[k]==this.properties[b].name;e||(f=this.properties[b])}this.properties=f;this.setDirty(!0);this.onChange()}})})},
"davinci/html/CSSProperty":function(){define(["dojo/_base/declare","davinci/html/CSSElement"],function(p,n){return p("davinci.html.CSSProperty",n,{constructor:function(m,h,g){this.elementType="CSSProperty";this.name=m||"";this.value=h||"";this.parent=g;this.expanded=[];this.lengthValues=[]},getValue:function(){return this.value},getText:function(m){var h="";this.comment&&!m.noComments&&(h+="\n "+this.comment.getText(m));h+=this.name+" : "+this.value;this.isNotImportant&&(h+=" !important");h+=";";
this.postComment&&!m.noComments&&(h+=this.postComment.getText(m));return h},getCSSRule:function(){return this.parent},addProperty:function(m,h){var g=new CSSProperty(m,h,this);this.properties.push(g)},getURL:function(){if(this.url){var m=new davinci.model.Path(this.getCSSFile().url),m=m.getParentPath().append(this.url);return m.toString()}}})})},"davinci/html/CSSAtRule":function(){define(["dojo/_base/declare","davinci/html/CSSElement"],function(p,n){return p("davinci.html.CSSAtRule",n,{constructor:function(){this.elementType=
"CSSAtRule"},getCSSFile:function(){return this.parent},getText:function(m){s="@";return s=s+this.name+" "+this.value+"\n"}})})},"davinci/html/CSSImport":function(){define(["dojo/_base/declare","davinci/html/CSSElement","davinci/model/Path","davinci/html/CSSFile"],function(p,n,m,h){return p("davinci.html.CSSImport",n,{constructor:function(){this.elementType="CSSImport"},getCSSFile:function(){return this.parent},setUrl:function(g){this.url=g},visit:function(g){if(!g.visit(this)){for(var f=0;f<this.children.length;f++)this.children[f].visit(g);
this.cssFile&&this.cssFile.visit(g)}g.endVisit&&g.endVisit(this)},getText:function(g){s="@import ";return s=this.isURL?s+('url("'+this.url+'");'):s+('"'+this.url+'";')},close:function(g){require("davinci/model/Factory").closeModel(this.cssFile);this.connection&&dojo.disconnect(this.connection);delete this.connection},load:function(g){for(var f=this.parent;f&&!f.url&&!f.fileName;)f=f.parent;f=new m(f.url||f.fileName);f=f.getParentPath().append(this.url);f=f.toString();this.cssFile=require("davinci/model/Factory").getModel({url:f,
loader:this.parent.loader,includeImports:this.parent.includeImports||g});this.cssFile.relativeURL=this.url;this.connection=dojo.connect(this.cssFile,"onChange",this.parent,"onChange")}})})},"davinci/html/CSSFile":function(){define("dojo/_base/declare dojo/_base/lang davinci/html/CSSElement davinci/html/CSSRule davinci/html/CSSSelector system/resource davinci/Workbench".split(" "),function(p,n,m,h,g,f,b){return p("davinci.html.CSSFile",m,{constructor:function(b){this.elementType="CSSFile";n.mixin(this,
b);this.options||(this.options={xmode:"style",css:!0,expandShorthand:!1});b=null;this.url&&this.loader?b=this.loader(this.url):this.url&&"app.css"===this.url&&this.setText("BODY {background-color: red!important;}");b&&this.setText(b)},save:function(b){return f.findResourceAsync(this.url).then(function(f){return f.setContents(this.getText(),b)}.bind(this))},close:function(){this.visit({visit:function(b){"CSSImport"==b.elementType&&b.close()}});require(["dojo/_base/connect"],function(b){b.publish("davinci/model/closeModel",
[this])})},addRule:function(b){var f=new h;f.setText(b);this.addChild(f);this.setDirty(!0);return f},setText:function(b){var f=this.children;this.children=[];this.errors=require("davinci/html/CSSParser").parse(b,this).errors;0<this.errors.length&&this.errors[this.errors.length-1].isException&&(this.children=f);this.includeImports&&this.children.forEach(function(b){"CSSImport"==b.elementType&&b.load()});this.onChange()},getText:function(b){b=b||{};b.indent=0;return this.children.map(function(f){return f.getText(b)}).join("")},
getCSSFile:function(){return this},getID:function(){return this.fileName},getMatchingRules:function(b,f,d){b=this._convertNode(b);f=f||[];d=d||[];for(var c=0;c<this.children.length;c++){var a=this.children[c];if("CSSRule"==a.elementType){var g=a.matches(b);if(g){for(var h=!1,m=0;m<d.length;m++)if(g>=d[m]){f.splice(m,0,a);d.splice(m,0,g);h=!0;break}h||(f.splice(0,0,a),d.splice(0,0,g))}}else"CSSImport"==a.elementType&&a.cssFile&&a.cssFile.getMatchingRules(b,f,d)}return f},getRule:function(b){var f;
if(!b)return[];b=g.parseSelectors(b);for(var d=0;d<this.children.length;d++){var c=this.children[d];if("CSSRule"==c.elementType){if(c.matchesSelectors(b)){f=c;break}}else"CSSImport"==c.elementType&&c.cssFile&&(f=c.cssFile.getRule(b)||f)}return f},getRules:function(b){b=g.parseSelectors(b);for(var f=[],d=0;d<this.children.length;d++){var c=this.children[d];"CSSRule"==c.elementType?c.matchesSelectors(b)&&f.push(c):"CSSImport"==c.elementType&&c.cssFile&&(f=f.concat(c.cssFile.getRules(b)))}return f},
getStyleValue:function(b,f){var d=[],c=[];f=this._convertNode(f);this.getMatchingRules(f,d,c);"string"==typeof b&&(b=[b]);return b.map(function(a){for(var b=0,e,f,k=0;k<d.length;k++)(f=d[k].getProperty(a))&&c[k]>b&&(e=f,b=c[k]);return e})}})})},"davinci/model/Comment":function(){define(["dojo/_base/declare","davinci/model/Model"],function(p,n){return p("davinci.model.Comment",n,{constructor:function(){this.elementType="Comment";this.nosemicolon=!0},addComment:function(m,h,g,f){null==this.comments&&
(this.comments=[]);this.comments[this.comments.length]={commentType:m,start:h,stop:g,s:f}},appendComment:function(m){var h=this.comments[this.comments.length-1];h.s+=m;h.stop+=m.length},getText:function(m){m="";for(var h=0;h<this.comments.length;h++)"line"==this.comments[h].commentType?m+="//"+this.comments[h].s+"\n":"block"==this.comments[h].commentType&&(m+="/*"+this.comments[h].s+"*/\n");return m}})})},"davinci/model/Factory":function(){define(["../html/CSSFile","../js/JSFile","../html/HTMLFile",
"system/resource"],function(p,n,m,h){var g=[],f=[],b={getModel:function(e){var k=e.url;if(!k)return null;for(var d=0;d<f.length;d++)if(f[d].url==k)return g[d]++,this.incrementImports(f[d]),f[d];if(/\.html?$/i.test(k)||/\.cfhtml?$/i.test(k))return b.newHTML(e);if(/\.css$/i.test(k))return b.newCSS(e);if(/\.js$/i.test(k))return b.newJS(e)},closeModel:function(b){b=b.url;if(!b)return null;for(var k=0;k<f.length;k++)f[k].url==b&&(g[k]--,0===g[k]&&(f.splice(k,1),g.splice(k,1)))},newHTML:function(b){b=new m(b.url);
f.push(b);g[f.length-1]=1;return b},newCSS:function(b){b=new p(b);f.push(b);g[f.length-1]=1;return b},newJS:function(b){b=new n(b);f.push(b);g[f.length-1]=1;return b},getNewFromResource:function(b){b=b.extension;if(!b)return new m;switch(b){case "html":return new m;case "css":return new p;case "js":case "json":return new n;default:return new m}},incrementImports:function(b){var k={visit:function(b){if("CSSImport"==b.elementType){b=b.cssFile.url;for(var c=0;c<f.length;c++)f[c].url==b&&g[c]++}return!1}};
b&&b.visit(k)},log:function(){for(var b=0;b<f.length;b++);}};require(["dojo/_base/connect"],function(e){e.subscribe("davinci/model/closeModel",b,b.closeModel)});return b})},"davinci/js/JSFile":function(){define(["dojo/_base/declare","davinci/js/JSElement"],function(p,n){return p("davinci.js.JSFile",n,{constructor:function(m){this.elementType="JSFile";this.nosemicolon=!0;this._textContent="";m&&(this.origin=m)},getText:function(m){return this._textContent},setText:function(m){this._textContent=m},
getLabel:function(){return this.fileName},getID:function(){return this.fileName},visit:function(m){if(!m.visit(this))for(var h=0;h<this.children.length;h++)this.children[h].visit(m);m.endVisit&&m.endVisit(this)}})})},"davinci/ve/widgets/CommonProperties":function(){define(["dojo/_base/declare","davinci/workbench/ViewLite","davinci/ve/commands/ModifyCommand"],function(p,n,m){return p("davinci.ve.widgets.CommonProperties",[n],{buildRendering:function(){var h=["title"],g;g="\x3ctable width\x3d'100%' class\x3d'property_table_stretchable' border\x3d'0' cellspacing\x3d'0' cellpadding\x3d'0'\x3e\x3ccolgroup\x3e\x3ccol style\x3d'width:15px;' /\x3e";
g+="\x3ccol class\x3d'gap02' /\x3e";g+="\x3ccol class\x3d'gap03' /\x3e";g+="\x3ccol style\x3d'width:15px;' /\x3e";g+="\x3c/colgroup\x3e";var f=0;this._boxes={};for(var b=0;b<h.length;b++)this._boxes[h[b]]={value:""},this._boxes[h[b]].id="davinci_properties_event_"+f++ +"_combo",g+="\x3ctr\x3e",g+="\x3ctd/\x3e",g+="\x3ctd class\x3d'propertyDisplayName'\x3e",g+=h[b]+":",g+="\x3c/td\x3e",g+="\x3ctd\x3e",g+="\x3cinput type\x3d'text' id\x3d'"+this._boxes[h[b]].id+"'\x3e\x3c/input\x3e",g+="\x3c/td\x3e",
g+="\x3ctd/\x3e",g+="\x3c/tr\x3e";g+="\x3c/table\x3e";this.domNode=dojo.doc.createElement("div");this.domNode.innerHTML=g;dojo.subscribe("/davinci/ui/widgetValuesChanged",dojo.hitch(this,this.onWidgetSelectionChange));dojo.subscribe("/davinci/ui/widget/replaced",dojo.hitch(this,this._widgetReplaced));this.inherited(arguments)},onEditorSelected:function(h){this._editor&&this._editor.getContext?(this.context=this._editor.getContext(),this._setValues()):(this.context=this._widget=this._subwidget=null,
this._clearValues())},startup:function(){function h(f){return function(){return this._onChange({target:f})}}this.inherited(arguments);for(var g in this._boxes)this._boxes[g].domNode=dojo.byId(this._boxes[g].id),dojo.connect(this._boxes[g].domNode,"onchange",this,h(g)),dojo.connect(this._boxes[g].domNode,"onfocus",this,"_onFocus"),dojo.connect(this._boxes[g].domNode,"onblur",this,"_onBlur")},_onFocus:function(){this.context&&this.context.blockChange(!0)},_onBlur:function(){this.context&&this.context.blockChange(!1)},
_onChange:function(h){h=h.target;var g=dojo.attr(this._boxes[h].domNode,"value");this.context&&this.context.blockChange(!1);if(this._boxes[h].value!=g){this._boxes[h].value=g;var f={};f[h]=g;h=new m(this._widget,f,null);dojo.publish("/davinci/ui/widgetPropertiesChanges",[{source:this._editor.editor_id,command:h}])}},_widgetReplaced:function(h,g){this._widget===g&&(this._widget=h,this.onWidgetSelectionChange())},onWidgetSelectionChange:function(){this._widget?(this._setValues(),this.set("readOnly",
!1)):(this.set("readOnly",!0),this._clearValues())},_clearValues:function(){for(name in this._boxes)this._boxes[name].domNode&&dojo.attr(this._boxes[name].domNode,"value",""),this._boxes[name].value=null},_setValues:function(){if(this._widget)for(var h in this._boxes){var g=this._widget,f=this._boxes[h];f.domNode&&f.domNode.ownerDocument&&(g.getPropertyValue?(g=g.getPropertyValue(h),f.value!=g&&(f.value=g,dojo.attr(f.domNode,"value",f.value))):(f.value="",dojo.attr(f.domNode,"value","")))}}})})},
"davinci/ve/widgets/WidgetProperties":function(){define("dojo/_base/declare dojo/_base/connect davinci/workbench/ViewLite davinci/ve/metadata davinci/commands/CompoundCommand davinci/ve/commands/ModifyCommand ./HTMLStringUtil dijit/form/DateTextBox dijit/form/TimeTextBox xide/types xide/factory".split(" "),function(p,n,m,h,g,f,b,e,k,d,c){return p("davinci.ve.widgets.WidgetProperties",[m],{key:"widgetSpecific",_connects:null,buildRendering:function(){this.domNode=this.propDom=dojo.doc.createElement("div");
dojo.addClass(this.domNode,"propGroup");dojo.attr(this.domNode,"propGroup",this.key);this._connects=[];this.inherited(arguments)},onWidgetSelectionChange:function(){if(this._widget&&this._editor&&"davinci.ve.HTMLPageEditor"==this._editor.editorID){var a=davinci.ve.metadata.query(this._widget),b=this._widget.getParent();if(b&&b.isWidget&&(b=h.query(b))&&b.childProperties)if(a.$ownproperty)for(var c in b.childProperties)a.$ownproperty[c]=b.childProperties[c];else a.$ownproperty=b.childProperties;if(a&&
a.$ownproperty){this._disconnectAll();this._destroyProperties();b={};a.$ownproperty.title||(b.title={datatype:"string"});for(c in a.$ownproperty)b[c]=a.$ownproperty[c];a=this.propDom.innerHTML=this._createWidgetRows(b);-1===a.indexOf("data-dojo-type")&&-1===a.indexOf("dojoType")||dojo.parser.parse(this.propDom);this._setValues();this._connectAll()}}else this._disconnectAll(),this._destroyProperties()},onEditorSelected:function(a){if((this._editor=a)&&"davinci.ve.HTMLPageEditor"==a.editorID){if(this.context=
a.getContext())this._widget=this.context.getSelection()[0]}else this._widget=this.context=null;this.onWidgetSelectionChange()},_createWidgetRows:function(a){this._pageLayout=[];for(var c in a){var d=a[c];if(!d.hidden){var e={display:d.title||c,type:d.datatype,format:d.format,target:c,hideCascade:!0,data:d};if(d.dropdownQueryValues&&d.dropdownQueryAttribute){var f=[];dojo.forEach(d.dropdownQueryValues,dojo.hitch(this,function(a){a=dojo.query(a,this.context.rootNode);dojo.forEach(a,function(a){f.push(a.getAttribute(d.dropdownQueryAttribute))})}));
e.values=f;e.type="comboEdit"}if(dojo.isArray(d.mustHaveAncestor)){for(var k=!1,g=this._widget;!k&&g&&g.getParent()!=this.context.rootWidget;)(g=g.getParent())&&-1<dojo.indexOf(d.mustHaveAncestor,g.type)&&(k=!0);k||(e.disabled=!0)}this._pageLayout.push(e);d.option&&(this._pageLayout[this._pageLayout.length-1].values=dojo.map(d.option,function(a){return a}),this._pageLayout[this._pageLayout.length-1].type=d.unconstrained?"comboEdit":"combo")}}return b.generateTable(this._pageLayout)},_destroyProperties:function(){var a=
this.propDom;for(dojo.forEach(dojo.query("[widgetId]",a).map(dijit.byNode),function(a){a.destroy()});a.firstChild;)dojo._destroyElement(a.firstChild)},_connectAll:function(){function a(a){return function(){return this._onChange({target:a})}}for(var b=0,e=this._pageLayout.length;b<e;b++){var f=this._pageLayout[b],k=dijit.byId(f.id),g=k||dojo.byId(f.id),h=k?"onChange":"change",m=k?"onFocus":"focus",n=k?"onBlur":"blur";g?(g.pageIndex=b,this._connect(g,h,this,a(b)),this._connect(g,m,this,"_onFieldFocus"),
this._connect(g,n,this,"_onFieldBlur"),g.owner=this,g.row=b,c.publish(d.EVENTS.WIDGET_PROPERTY_RENDERED,{view:this,row:f,widget:k,node:g},this)):console.error("cant find "+f.id+" node",f)}},_connect:function(a,b,c,d,e){this._connects.push(n.connect.apply(null,arguments))},_disconnectAll:function(){this._connects.forEach(n.disconnect);this._connects=[]},_onChange:function(a){a=this._pageLayout[a.target];var b=dijit.byId(a.id),c;this.context&&this.context.blockChange(!1);b?(c=b.get("value"))&&c instanceof
Date&&(b instanceof e?c=c.toISOString().substring(0,10):b instanceof k&&(c="T"+c.toTimeString().substring(0,8))):(c=dojo.byId(a.id),c=dojo.attr(c,"checkbox"===c.type?"checked":"value"));if(a.value!=c){a.value=c;b={};b[a.target]=c;a=new g;c=new f(this._widget,b,null);a.add(c);if((b=this._widget.getHelper())&&b.onWidgetPropertyChange)b.onWidgetPropertyChange({widget:this._widget,compoundCommand:a,modifyCommand:c});dojo.publish("/davinci/ui/widgetPropertiesChanges",[{source:this._editor.editor_id,compoundCommand:a,
command:c}])}},_onFieldFocus:function(){this.context&&this.context.blockChange(!0)},_onFieldBlur:function(){this.context&&this.context.blockChange(!1)},_setValues:function(){try{for(var a=0,b=this._pageLayout.length;a<b;a++){var c=this._pageLayout[a],d=dojo.byId(c.id);if(d){var e=this._widget,f=c.target,k;k="_children"===f?(k=e.getChildrenData())&&1===k.length?k[0]:e.getPropertyValue(f):e.getPropertyValue(f);if(k&&k.toISOString){var g=e.metadata.property[f].format;g&&("date"==g?k=k.toISOString().substring(0,
10):"time"==g&&(k="T"+k.toTimeString().substring(0,8)))}if(c.value!=k){c.value=k;var h="boolean"===c.type?"checked":"value",m=dijit.byId(c.id);m?m.attr(h,c.value):dojo.attr(d,h,c.value)}}}}catch(n){debugger}}})})},"davinci/ve/widgets/EventSelection":function(){define("dojo/_base/declare dojo/_base/connect dojo/dom-class system/resource davinci/Runtime davinci/Workbench davinci/model/Path ../../workbench/Preferences ../../workbench/ViewLite ../commands/EventCommand ./HTMLStringUtil ../States xide/types".split(" "),
function(p,n,m,h,g,f,b,e,k,d,c,a,q){var w=/^State:.*/,r=/^\s*davinci\.states\.setState\s*\(\s*([\'"])((?:(?!\1).)*)\1\s*\)\s*$/,B=/^File:.*/,y=/^\s*location\.href\s*\=\s*([\'"])((?:(?!\1).)*)\1\s*$/,x=function(b){b&&a.getAllStateContainers(b);return[""]},z=function(a){a&&a.match(w)&&(a=a.substring(6),a="davinci.states.setState('"+("Background"==a?"Normal":a)+"')");a&&a.match(B)&&(a="location.href\x3d'"+a.substring(5)+"'");return a},u=function(a){var b;a&&((b=a.match(r))&&(a="State:"+b[2]),(b=a.match(y))&&
(a="File:"+b[2]));return a};p=p("davinci.ve.widgets.EventSelection",[k],{pageTemplate:[{display:"onclick",target:"onclick",type:"state",hideCascade:!0},{display:"ondblclick",target:"ondblclick",type:"state",hideCascade:!0},{display:"onmousedown",target:"onmousedown",type:"state",hideCascade:!0},{display:"onmouseup",target:"onmouseup",type:"state",hideCascade:!0},{display:"onmouseover",target:"onmouseover",type:"state",hideCascade:!0},{display:"onmousemove",target:"onmousemove",type:"state",hideCascade:!0},
{display:"onmouseout",target:"onmouseout",type:"state",hideCascade:!0},{display:"onkeypress",target:"onkeypress",type:"state",hideCascade:!0},{display:"onkeydown",target:"onkeydown",type:"state",hideCascade:!0},{display:"onkeyup",target:"onkeyup",type:"state",hideCascade:!0},{display:"onfocus",target:"onfocus",type:"state",hideCascade:!0},{display:"onblur",target:"onblur",type:"state",hideCascade:!0},{display:"onchange",target:"onchange",type:"state",hideCascade:!0}],buildRendering:function(){this.domNode=
dojo.doc.createElement("div");this.domNode.innerHTML=c.generateTable(this.pageTemplate,{zeroSpaceForIncrDecr:!0});m.add(this.domNode,"EventSelection");this.inherited(arguments)},setReadOnly:function(a){for(var b=0;b<this.pageTemplate.length;b++){var c=this.pageTemplate[b].widget;c?c.set("readOnly",a):(c=this.pageTemplate[b].domNode)&&dojo.attr(c,"disabled",a)}},startup:function(){function a(b){return function(){return this._onChange({target:b})}}this.inherited(arguments);for(var b=0;b<this.pageTemplate.length;b++){var c=
dijit.byId(this.pageTemplate[b].id);this.pageTemplate[b].widget=c;n.connect(c,"onChange",this,a(b))}this._buildSelectionValues();this.subscribe("/davinci/ui/context/loaded",dojo.hitch(this,this._buildSelectionValues));this.subscribe("/davinci/states/stored",dojo.hitch(this,this._buildSelectionValues));this.subscribe("/davinci/states/state/added",dojo.hitch(this,this._buildSelectionValues));this.subscribe("/davinci/states/state/removed",dojo.hitch(this,this._updateValues));this.subscribe("/davinci/states/state/renamed",
dojo.hitch(this,this._updateValues));this.subscribe("/davinci/ui/widgetPropertiesChanged",dojo.hitch(this,this._widgetPropertiesChanged));this.publish(q.EVENTS.ON_EVENT_SELECTION_RENDERED,{eventSelection:this,pageTemplate:this.pageTemplate});this.setReadOnly(!0)},onEditorSelected:function(){this._editor&&this._editor.supports("states")||delete this._editor;this._buildSelectionValues()},_onChange:function(a){a=a.target;var b=dijit.byId(this.pageTemplate[a].id),c=b.get("value"),c=z(c),e={};e[this.pageTemplate[a].target]=
c;e=new d(this._widget,e);dojo.publish("/davinci/ui/widgetPropertiesChanges",[{source:this._editor.editor_id,command:e}]);this.publish(q.EVENTS.ON_WIDGET_PROPERTY_CHANGED,{widget:b,editor:this._editor,eventSelection:this,pageTemplate:this.pageTemplate,widgetProperty:this.pageTemplate[a].target,value:c,target:this._widget})},_getRoot:function(){var a=this._editor,b;a&&a.getContext&&(b=(a=a.getContext())&&a.rootNode);return b},_updateValues:function(a){a&&a.node&&a.node._dvWidget&&(a=(a=a.node._dvWidget.getContext())&&
a.editor)&&a==g.currentEditor&&(this._buildSelectionValues(),this._widget&&this._setValues())},onWidgetSelectionChange:function(){this._widget?(this._setValues(),this.setReadOnly(!1)):(this.setReadOnly(!0),this._clearValues())},_clearValues:function(){for(var a=0;a<this.pageTemplate.length;a++)dijit.byId(this.pageTemplate[a].id).set("value","",!1)},_buildSelectionValues:function(){for(var a=this._getRoot(),a=x(a),b=0;b<this.pageTemplate.length;b++){var c=dijit.byId(this.pageTemplate[b].id);c.store.clearValues();
c.store.setValues(a)}},_setValues:function(){for(var a=0;a<this.pageTemplate.length;a++){var b=this.pageTemplate[a].target,c=this._widget,d="";c.properties&&c.properties[b]?d=c.properties[b]:c._srcElement&&(d=c._srcElement.getAttribute(b));d=u(d);(b=dijit.byId(this.pageTemplate[a].id))&&b.set("value",d,!1)}},_widgetPropertiesChanged:function(a){this._updateValues({widget:a[0]})}});p.getEventSelectionValues=x;p.getEventScriptFromValue=z;p.getValueFromEventScript=u;return p})},"davinci/actions/UndoAction":function(){define(["dojo/_base/declare",
"./Action","../Workbench"],function(p,n,m){return p("davinci.actions.UndoAction",n,{run:function(h){(h=m.getOpenEditor())&&h.getContext&&h.getContext().getCommandStack().undo()},isEnabled:function(h){var g=(h=m.getOpenEditor())&&h.getContext&&h.getContext();if(h&&g){if(g=g.getCommandStack().canUndo(),"davinci.ve.PageEditor"==h.declaredClass||"davinci.ve.themeEditor.ThemeEditor"==h.declaredClass)return g}else return!1}})})},"davinci/actions/Action":function(){define(["dojo/_base/declare"],function(p){return p("davinci.actions.Action",
null,{item:null,run:function(n){},isEnabled:function(n){return!0},getName:function(){return this.item.label}})})},"davinci/actions/SelectThemeAction":function(){define("dojo/_base/declare ./Action ../ui/widgets/ThemeSetSelection ../ve/commands/ChangeThemeCommand davinci/lang/actions davinci/Workbench".split(" "),function(p,n,m,h,g,f){return p("davinci.actions.SelectThemeAction",n,{run:function(b){if((b=davinci.Workbench.getOpenEditor())&&b.isDirty){var e=b.getOnUnloadWarningMessage();e||(e=dojo.string.substitute(g.filesHasUnsavedChanges,
[b.fileName]));f.showDialog({title:g.switchingThemes,content:e,style:{width:300},okCallback:dojo.hitch(this,this._okToSwitch),okLabel:g.save,hideCancel:null})}else this._okToSwitch()},_okToSwitch:function(){var b=davinci.Workbench.getOpenEditor();b.isDirty&&b.save();var e=b.getContext().getTheme(),b=b.getContext().getDojo().version.major+"."+b.getContext().getDojo().version.minor;this._themeChooser=new m({value:e,workspaceOnly:!1,dojoVersion:b});this._themeChooser.buildRendering()},_changeTheme:function(){var b=
this._themeChooser.attr("value");this._themeChooser.onClose();this._themeChooser.destroy();var e=davinci.Workbench.getOpenEditor();e&&e.getContext&&e.getContext().getCommandStack().execute(new h(b,e.getContext()))}})})},"davinci/ui/widgets/ThemeSetSelection":function(){define("dojo/_base/declare dijit/_WidgetBase dijit/_TemplatedMixin dijit/_WidgetsInTemplateMixin davinci/library system/resource davinci/workbench/Preferences davinci/Runtime davinci/Workbench davinci/ve/commands/ChangeThemeCommand davinci/ui/Dialog davinci/lang/ui dijit/lang/_common dijit/form/Button dijit/form/Select davinci/Theme dojo/text!./templates/ThemeSetSelection.html".split(" "),
function(p,n,m,h,g,f,b,e,k,d,c,a,q,w,r,B,y){p("davinci.ui.widgets.ThemeSetSelectionWidget",[n,m,h],{templateString:y,widgetsInTemplate:!0,uiNLS:a,commonNLS:q});return p("davinci.ui.widgets.ThemeSetSelection",null,{workspaceOnly:!1,_connections:[],_selectedThemeSet:null,constructor:function(a){dojo.safeMixin(this,a)},buildRendering:function(){this._dialog=new c({title:a.selectTheme,contentStyle:{width:372}});dojo.connect(this._dialog,"onCancel",this,"onClose");var b=null;this.newFile||(b=k.getOpenEditor().getContext());
(b=B.getThemeSet(b))||(b=B.dojoThemeSets.themeSets[0]);this._selectedThemeSet=b;this._dialog.attr("content",new davinci.ui.widgets.ThemeSetSelectionWidget({}));this._connections.push(dojo.connect(dijit.byId("theme_select_themeset_theme_select"),"onChange",this,"onChange"));this._connections.push(dojo.connect(dijit.byId("theme_select_desktop_theme_select"),"onChange",this,"onDesktopChange"));this._connections.push(dojo.connect(dijit.byId("theme_select_mobile_theme_select"),"onChange",this,"onMobileChange"));
this._connections.push(dojo.connect(this._dialog,"onExecute",this,"onOk"));this._connections.push(dojo.connect(dijit.byId("theme_select_cancel_button"),"onClick",this,"onClose"));this._connections.push(dojo.connect(dijit.byId("theme_select_android_select"),"onChange",this,"onAndroidThemeChange"));this._connections.push(dojo.connect(dijit.byId("theme_select_blackberry_select"),"onChange",this,"onBlackberryThemeChange"));this._connections.push(dojo.connect(dijit.byId("theme_select_ipad_select"),"onChange",
this,"oniPadThemeChange"));this._connections.push(dojo.connect(dijit.byId("theme_select_iphone_select"),"onChange",this,"oniPhoneThemeChange"));this._connections.push(dojo.connect(dijit.byId("theme_select_other_select"),"onChange",this,"onOtherThemeChange"));this.addThemeSets();dijit.byId("theme_select_themeset_theme_select").attr("value",b.name);this._dialog.show()},addThemeSets:function(){this._dojoThemeSets=B.getThemeSets(k.getProject());this._dojoThemeSets||(this._dojoThemeSets=B.dojoThemeSets);
this._dojoThemeSets=dojo.clone(this._dojoThemeSets);this._selectedThemeSet.name==B.none_themeset_name?this._dojoThemeSets.themeSets.unshift(this._selectedThemeSet):this._dojoThemeSets.themeSets.unshift(B.none_themeset);for(var a=dijit.byId("theme_select_themeset_theme_select"),b=0;b<this._dojoThemeSets.themeSets.length;b++)opt={value:this._dojoThemeSets.themeSets[b].name,label:this._dojoThemeSets.themeSets[b].name},a.addOption(opt)},addThemes:function(a){this._themeData=g.getThemes(k.getProject(),
this.workspaceOnly);var b=dijit.byId("theme_select_desktop_theme_select");b.options=[];var c=dijit.byId("theme_select_android_select");c.options=[];var d=dijit.byId("theme_select_blackberry_select");d.options=[];var e=dijit.byId("theme_select_ipad_select");e.options=[];var f=dijit.byId("theme_select_iphone_select");f.options=[];var h=dijit.byId("theme_select_other_select");h.options=[];var m=dijit.byId("theme_select_mobile_theme_select");b.options=[];m.options=[];m.addOption({value:B.default_theme,
label:B.default_theme});this._themeCount=this._themeData.length;for(var q=0;q<this._themeData.length;q++){var n={value:this._themeData[q].name,label:this._themeData[q].name};"dojox.mobile"===this._themeData[q].type?(m.addOption(n),c.addOption(n),d.addOption(n),e.addOption(n),f.addOption(n),h.addOption(n)):b.addOption(n)}b.attr("value",a.desktopTheme);for(b=0;b<a.mobileTheme.length;b++)switch(a.mobileTheme[b].device.toLowerCase()){case "android":c.attr("value",a.mobileTheme[b].theme);break;case "blackberry":d.attr("value",
a.mobileTheme[b].theme);break;case "ipad":e.attr("value",a.mobileTheme[b].theme);break;case "iphone":f.attr("value",a.mobileTheme[b].theme);break;case "other":h.attr("value",a.mobileTheme[b].theme)}B.singleMobileTheme(a)?m.attr("value",a.mobileTheme[a.mobileTheme.length-1].theme):m.attr("value",B.default_theme)},onChange:function(a){for(var b=0;b<this._dojoThemeSets.themeSets.length;b++)if(this._dojoThemeSets.themeSets[b].name==a){this.addThemes(this._dojoThemeSets.themeSets[b]);this._selectedThemeSet=
this._dojoThemeSets.themeSets[b];break}var b=dijit.byId("theme_select_mobile_theme_select"),c=dijit.byId("theme_select_desktop_theme_select"),d=dijit.byId("theme_select_android_select"),e=dijit.byId("theme_select_blackberry_select"),f=dijit.byId("theme_select_ipad_select"),k=dijit.byId("theme_select_iphone_select"),g=dijit.byId("theme_select_other_select");a===B.none_themeset_name?(b.set("disabled",!1),c.set("disabled",!1),d.set("disabled",!1),e.set("disabled",!1),f.set("disabled",!1),k.set("disabled",
!1),g.set("disabled",!1)):(b.set("disabled",!0),c.set("disabled",!0),d.set("disabled",!0),e.set("disabled",!0),f.set("disabled",!0),k.set("disabled",!0),g.set("disabled",!0))},onDesktopChange:function(a){this._selectedThemeSet.desktopTheme=a},onDeviceThemeChange:function(a,b){for(var c=0;c<this._selectedThemeSet.mobileTheme.length;c++)if(this._selectedThemeSet.mobileTheme[c].device.toLowerCase()===a.toLowerCase()){this._selectedThemeSet.mobileTheme[c].theme=b;break}},onAndroidThemeChange:function(a){this.onDeviceThemeChange("android",
a)},onBlackberryThemeChange:function(a){this.onDeviceThemeChange("blackberry",a)},oniPadThemeChange:function(a){this.onDeviceThemeChange("ipad",a)},oniPhoneThemeChange:function(a){this.onDeviceThemeChange("iphone",a)},onOtherThemeChange:function(a){this.onDeviceThemeChange("other",a)},onMobileChange:function(a){if(this._selectedThemeSet.name==B.none_themeset_name){var b=dijit.byId("theme_select_android_select"),c=dijit.byId("theme_select_blackberry_select"),d=dijit.byId("theme_select_ipad_select"),
e=dijit.byId("theme_select_iphone_select"),f=dijit.byId("theme_select_other_select");if("(device-specific)"===a&&this._selectedThemeSet.name===B.none_themeset_name)b.set("disabled",!1),c.set("disabled",!1),d.set("disabled",!1),e.set("disabled",!1),f.set("disabled",!1);else for(var k=0;k<this._selectedThemeSet.mobileTheme.length;k++){var g=this._selectedThemeSet.mobileTheme[k].device.toLowerCase();this._selectedThemeSet.mobileTheme[k].theme=a;switch(g){case "android":b.attr("value",a);b.set("disabled",
!0);break;case "blackberry":c.attr("value",a);c.set("disabled",!0);break;case "ipad":d.attr("value",a);d.set("disabled",!0);break;case "iphone":e.attr("value",a);e.set("disabled",!0);break;case "other":f.attr("value",a),f.set("disabled",!0)}}}},updateDeviceThemes:function(){for(var a=0;a<this._selectedThemeSet.mobileTheme.length;a++){var b;switch(this._selectedThemeSet.mobileTheme[a].device.toLowerCase()){case "android":b=dijit.byId("theme_select_android_select");break;case "blackberry":b=dijit.byId("theme_select_blackberry_select");
break;case "ipad":b=dijit.byId("theme_select_ipad_select");break;case "iphone":b=dijit.byId("theme_select_iphone_select");break;default:b=dijit.byId("theme_select_other_select")}this._selectedThemeSet.mobileTheme[a].theme=b.attr("value")}},_changeTheme:function(){debugger;var a=k.getOpenEditor();a&&a.getContext&&a.getContext().getCommandStack().execute(new d(newTheme,a.getContext()))},_onChange:function(){var b=this._getValueAttr();if(null!=b&&!this._blockChange){this.value=b;this._cookieName="maqetta_"+
b.name+"_"+b.version;var c=dojo.cookie(this._cookieName);if(this.dojoVersion&&b.version!==this.dojoVersion&&!c)this._warnDiv.innerHTML="\x3ctable\x3e\x3ctr\x3e\x3ctd\x3e\x3c/td\x3e\x3ctd\x3e"+a.themeVersionMessage+'\x3c/td\x3e\x3ctd\x3e\x3c/td\x3e\x3c/tr\x3e\x3ctr\x3e\x3ctd\x3e\x3c/td\x3e\x3ctd align\x3d"center"\x3e\x3cbutton data-dojo-type\x3d"dijit.form.Button" type\x3d"button" id\x3d"davinci.ui.widgets.ThemeSelection.ok"\x3e'+q.buttonOk+'\x3c/button\x3e\x3cbutton data-dojo-type\x3d"dijit.form.Button" type\x3d"button" id\x3d"davinci.ui.widgets.ThemeSelection.cancel"\x3e'+
q.buttonCancel+"\x3c/button\x3e\x3c/td\x3e\x3ctd\x3e\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e",b=dijit.byId("davinci.ui.widgets.ThemeSelection.ok"),c=dijit.byId("davinci.ui.widgets.ThemeSelection.cancel"),dojo.connect(b,"onClick",this,"_warnOk"),dojo.connect(c,"onClick",this,"_warnCancel");else this.onChange()}},_warnOk:function(){dojo.cookie(this._cookieName,"true");this._destroy();this.onChange()},_warnCancel:function(){this._destroy();this.onClose()},_destroy:function(){var a=dijit.byId("davinci.ui.widgets.ThemeSelection.ok");
dojo.disconnect(a);a.destroy();a=dijit.byId("davinci.ui.widgets.ThemeSelection.cancel");dojo.disconnect(a);a.destroy()},onOk:function(a){this.onClose(a);this.newFile||(a=k.getOpenEditor())&&a.getContext&&a.getContext().getCommandStack().execute(new d(this._selectedThemeSet,a.getContext()))},onClose:function(a){for(;connection=this._connections.pop();)dojo.disconnect(connection);this._dialog.destroyRecursive();delete this._dialog},_getTemplate:function(){return'\x3ctable style\x3d"width: 100%; margin-left:10px; margin-right:10px;"\x3e\x3ctr\x3e\x3ctd style\x3d"width: 18%;"\x3e'+
a.themeSet+'\x3c/td\x3e\x3ctd style\x3d"text-align: center;"\x3e\x3cselect dojoType\x3d"dijit.form.Select" id\x3d"theme_select_themeset_theme_select" type\x3d"text" style\x3d"width: 175px;" \x3e\x3c/select\x3e\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e\x3cdiv style\x3d"border-top: 1px solid black; top: 231px; border-top-color: #ccc; left: 429px; width: 300px; height: 11px; margin-top: 6px; margin-left:10px;"\x3e\x3c/div\x3e\x3ctable style\x3d"margin-left: 15px; width: 100%;"\x3e\x3ctr\x3e\x3ctd\x3e'+a.desktopTheme+
'\x3c/td\x3e\x3ctd\x3e\x3cselect dojoType\x3d"dijit.form.Select" id\x3d"theme_select_desktop_theme_select"type\x3d"text" style\x3d"width: 175px;" \x3e\x3c/select\x3e\x3c/td\x3e\x3c/tr\x3e\x3ctr\x3e\x3ctd\x3e'+a.mobileTheme+'\x3c/td\x3e\x3ctd\x3e\x3cselect dojoType\x3d"dijit.form.Select" id\x3d"theme_select_mobile_theme_select"type\x3d"text" style\x3d"width: 175px;" \x3e\x3c/select\x3e\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e\x3ctable id\x3d"theme_select_devices_table" style\x3d"margin-left:30px; border-collapse: separate; border-spacing: 0 0; width: 100%"\x3e\x3ctr\x3e\x3ctd style\x3d"width: 139px;"\x3e'+
a.android+'\x3c/td\x3e\x3ctd\x3e\x3cselect dojoType\x3d"dijit.form.Select" id\x3d"theme_select_android_select" type\x3d"text" style\x3d"width: 150px;"\x3e\x3c/select\x3e\x3c/td\x3e\x3c/tr\x3e\x3ctr\x3e\x3ctd\x3e'+a.blackberry+'\x3c/td\x3e\x3ctd\x3e\x3cselect dojoType\x3d"dijit.form.Select" id\x3d"theme_select_blackberry_select" type\x3d"text" style\x3d"width: 150px;"\x3e\x3c/select\x3e\x3c/td\x3e\x3c/tr\x3e\x3ctr\x3e\x3ctd\x3e'+a.ipad+'\x3c/td\x3e\x3ctd\x3e\x3cselect dojoType\x3d"dijit.form.Select" id\x3d"theme_select_ipad_select" type\x3d"text" style\x3d"width: 150px;"\x3e\x3c/select\x3e\x3c/td\x3e\x3c/tr\x3e\x3ctr\x3e\x3ctd\x3e'+
a.iphone+'\x3c/td\x3e\x3ctd\x3e\x3cselect dojoType\x3d"dijit.form.Select" id\x3d"theme_select_iphone_select" type\x3d"text" style\x3d"width: 150px;"\x3e\x3c/select\x3e\x3c/td\x3e\x3c/tr\x3e\x3ctr\x3e\x3ctd\x3e'+a.other+'\x3c/td\x3e\x3ctd\x3e\x3cselect dojoType\x3d"dijit.form.Select" id\x3d"theme_select_other_select" type\x3d"text" style\x3d"width: 150px;"\x3e\x3c/select\x3e\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e\x3ctable style\x3d"width:100%; margin-top: 10px;"\x3e\x3ctr\x3e\x3ctd style\x3d"text-align:right; width:80%;"\x3e\x3cinput type\x3d"button" dojoType\x3d"dijit.form.Button" id\x3d"theme_select_ok_button" label\x3d"'+
q.buttonOk+'"\x3e\x3c/input\x3e\x3c/td\x3e\x3ctd\x3e\x3cinput type\x3d"button" dojoType\x3d"dijit.form.Button" id\x3d"theme_select_cancel_button" label\x3d"'+q.buttonCancel+'"\x3e\x3c/input\x3e\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e'}})})},"davinci/ve/commands/ChangeThemeCommand":function(){define("dojo/_base/declare dojo/_base/lang dojo/query davinci/Theme davinci/Workbench davinci/library davinci/html/CSSImport davinci/html/HTMLElement davinci/html/HTMLText preview/silhouetteiframe davinci/model/Factory".split(" "),
function(p,n,m,h,g,f,b,e,k,d,c){return p("davinci.ve.commands.ChangeThemeCommand",null,{name:"changeTheme",constructor:function(a,b){this._newTheme=a;this._context=b;this._oldTheme=h.getThemeSet(this._context);this._oldTheme||(this._oldTheme=h.dojoThemeSets.themeSets[0])},execute:function(){this._changeTheme(this._newTheme,this._oldTheme)},undo:function(){this._changeTheme(this._oldTheme,this._newTheme)},_changeTheme:function(a,b){b.desktopTheme?this.removeThemeSet(b):this.removeTheme(b);a.desktopTheme?
this.addThemeSet(a):this.addTheme(a);var c=this._context,e=c.editor,f=c.getModel().getText();e.setContent(e.fileName,f);c.widgetAddedOrDeleted(!0);c._configDojoxMobile();e=c.getMobileDevice()||"none";"none"!=e&&(e=d.themeMap[e+".svg"]);(c=n.getObject("dojox.mobile",!0,c.getGlobal()))&&c.loadDeviceTheme&&c.loadDeviceTheme(e);window.setTimeout(function(){this._context.resizeAllWidgets()}.bind(this),50)},removeTheme:function(a){var b=h.getHelper(a);if(b&&b.removeTheme)b.removeTheme(this._context,a);
else{var c=this._context.getModel().getDocumentElement(),b=c.getChildElement("head"),c=c.getChildElement("body"),d=dojo.clone(this._context.getHeader()),e=a.files;a.conditionalFiles&&(e=e.concat(a.conditionalFiles));for(var f=0;f<e.length;f++)for(var k=e[f],g=0;g<d.styleSheets.length;g++)if(-1<d.styleSheets[g].indexOf(k)){var n=c.getAttribute("class");n&&(n=n.replace(a.className,""),d.bodyClasses=n,c.removeAttribute("class"),0<n.length&&c.addAttribute("class",n,!1));this._context.setHeader(d);for(var n=
b.find({elementType:"CSSImport"}),p=0;p<n.length;p++)if(-1<n[p].url.indexOf(k)){var A=n[p].url,C=this._context.getDocument();n[p].url="x";n[p].parent.removeChild(n[p]);n[p].close();m('link[href\x3d"'+A+'"]',C).orphan();this._context.theme=null;break}}}},addTheme:function(a){var d=h.getHelper(a);if(d&&d.addTheme)d.addTheme(this._context,a);else{var f=this._context.getModel().getDocumentElement(),d=f.getChildElement("head"),k=f.getChildElement("body"),g=dojo.clone(this._context.getHeader()),f=this._context.getFullResourcePath(),
f=(new davinci.model.Path(a.getFile().parent.getPath())).append(a.files[0]).relativeTo(f,!0).toString();g.styleSheets[g.styleSheets.length]=f;var m=k.getAttribute("class");m||(m=" ");m=m+" "+a.className;m=m.trim();g.bodyClasses=m;k.removeAttribute("class");k.addAttribute("class",m,!1);this._context.setHeader(g);k=d.getChildElement("style");k||(k=new e("style"),d.addChild(k));d=new b;d.url=f;f=c.getModel({url:h.getBase()+"/"+d.url,includeImports:!0});d.cssFile=f;k.addChild(d,0);this._context.theme=
a}},removeThemeSet:function(a){var b=f.getThemes(g.getProject(),this.workspaceOnly);if(a.desktopTheme)for(var c=0;c<b.length;c++)b[c].name===a.desktopTheme&&this.removeTheme(b[c]);a.mobileTheme&&!h.themeSetEquals(a.mobileTheme,h.dojoMobileDefault)&&(this._context.close(),this._dojoxMobileRemoveTheme(this._context))},addThemeSet:function(a){var b=f.getThemes(g.getProject(),this.workspaceOnly);if(a.desktopTheme)for(var c=0;c<b.length;c++)b[c].name===a.desktopTheme&&this.addTheme(b[c]);a.mobileTheme&&
this._dojoxMobileAddTheme(this._context,a.mobileTheme)},_dojoxMobileRemoveTheme:function(a){a._updateDojoConfig({themeMap:null,mblLoadCompatPattern:null,mblThemeFiles:null})},_dojoxMobileAddTheme:function(a,b,c){h.getThemeLocation().toString().replace(/\//g,"\\/");a._updateDojoConfig({themeMap:h.getDojoxMobileThemeMap(a,b),mblLoadCompatPattern:"''",mblThemeFiles:[]})}})})},"davinci/lang/actions":function(){define([],function(){return{select:"Select",save:"Save",selectDirectory:"Select Directory to link to",
parentFolder:"Parent Folder:",localName:"Local Name:",link:"Link",downloadResources:"Download Resources",downloadFileName:"Download File Name: ",downloadNow:"Download now",titleDownload:"Download",invalidFileName:"File names may only contain letters. numbers, and '_'.",editTheme:"Edit Theme",noEditableThemes:"No editable themes found in your workspace. Please create a new theme from one of the Read Only themes.",newWidgetsShouldUse:"New widgets should use: ",selectTheme:"Select a theme",switchingThemes:"Switching themes",
filesHasUnsavedChanges:"The file '${0}' has unsaved changes, \"Save\" changes and continue with switching themes.",abs:"Absolute positioning",flow:"Flow positioning"}})},"davinci/actions/SelectLayoutAction":function(){define(["dojo/_base/declare","./Action","../Workbench","davinci/lang/actions"],function(p,n,m,h){return p("davinci.actions.SelectLayoutAction",n,{_changeLayoutCommand:function(g){var f=dijit.byId("selectLayout");f&&f.destroyRecursive(!1);if((f=m.getOpenEditor())&&f.getContext){var b=
!0;if("absolute"===g||"Absolute positioning"===g)b=!1;f.getContext().setFlowLayout(b);f._visualChanged()}}})})},"davinci/actions/RedoAction":function(){define(["dojo/_base/declare","./Action","../Workbench"],function(p,n,m){return p("davinci.actions.RedoAction",n,{run:function(h){(h=m.getOpenEditor())&&h.getContext&&h.getContext().getCommandStack().redo()},isEnabled:function(h){var g=(h=m.getOpenEditor())&&h.getContext&&h.getContext();if(h&&g){if(g=g.getCommandStack().canRedo(),"davinci.ve.PageEditor"==
h.declaredClass||"davinci.ve.themeEditor.ThemeEditor"==h.declaredClass)return g}else return!1}})})},"davinci/actions/DownloadAction":function(){define("dojo/_base/declare ./Action ../Workbench ../ui/DownloadSelected system/resource davinci/ui/Resource davinci/lang/ui davinci/lang/actions dijit/form/ValidationTextBox".split(" "),function(p,n,m,h,g,f,b){return p("davinci.actions.DownloadAction",n,{run:function(){m.showModal(new h,b.downloadFile,{width:"400px"})},isEnabled:function(b){return(b=f.getSelectedResources())&&
0<b.length}})})},"davinci/ui/DownloadSelected":function(){define(["dojo/_base/declare","./Download","./Resource","davinci/lang/ui/ui","dojo/text!./templates/downloadSelected.html"],function(p,n,m,h,g){return p([n],{templateString:g,_buildUITable:function(){this._files=m.getSelectedResources();var f=["\x3cdiv class\x3d'downloadSelectedHeader'\x3e"+h.selectedFiles+"\x3c/div\x3e","\x3cdiv class\x3d'downloadSelectedList'\x3e"];this._files||(f.push("\x3cb\x3e"+h.noFilesSelected+"\x3c/b\x3e"),this._files=
[],dojo.attr(this._okButton,"disabled","true"));f=f.concat(this._files.map(function(b){return b.getPath()+"\x3cbr\x3e"}));f.push("\x3c/div\x3e\x3cbr\x3e\x3cbr\x3e");dojo.place(f.join(""),this._selectionDiv)},_getResources:function(){return this._files.map(function(f){return f.getPath()})},_getLibs:function(){return[]}})})},"davinci/ui/Download":function(){define("dojo/_base/declare dijit/_TemplatedMixin dijit/_WidgetBase dijit/_WidgetsInTemplateMixin davinci/library system/resource dojo/promise/all dojo/parser davinci/Workbench davinci/ve/RebaseDownload davinci/lang/ui/ui dijit/lang/_common dojo/text!./templates/download.html davinci/Theme dijit/form/Button dijit/form/ValidationTextBox dijit/form/TextBox".split(" "),
function(p,n,m,h,g,f,b,e,k,d,c,a,q,w){return p([m,n,h],{templateString:q,_fileNameValidationRegExp:"[a-zA-z0-9_.]+",_fileNameMaxLength:50,postMixInProperties:function(){this._projectName=k.getProject();dojo.mixin(this,c);dojo.mixin(this,a);this.inherited(arguments)},buildRendering:function(){this.inherited(arguments);this._buildUITable()},_buildUITable:function(){this._handles=[];this._userLibs=g.getUserLibs(this.getRoot());var a=[dojo.replace("\x3ctable cellspacing\x3d'0' cellpadding\x3d'0' width\x3d'100%' class\x3d'dwnloadLibTable'\x3e\x3ctr\x3e\x3ctd class\x3d'header'\x3e{library}\x3c/td\x3e\x3ctd class\x3d'header'\x3e{version}\x3c/td\x3e\x3ctd class\x3d'header'\x3e{include}\x3cbr\x3e{source}\x3c/td\x3e\x3ctd class\x3d'header'\x3e{baseLocation}\x3c/td\x3e\x3c/tr\x3e\x3ctr\x3e\x3ctd colspan\x3d'4'\x3e\x3chr\x3e\x3c/hr\x3e\x3c/td\x3e\x3c/tr\x3e",
c)];this.libraries={};this._userLibs.forEach(function(b,c){b.initRoot=this._getLibRoot(b.id,b.version);var d=b.id;b.initRoot&&(a.push("\x3ctr libPath\x3d'"+c+"'"),b.required&&a.push(" style\x3d'display:none'"),a.push("\x3e"),a=a.concat(["\x3ctd class\x3d'columna'\x3e"+d+"\x3c/td\x3e","\x3ctd class\x3d'columnb'\x3e"+b.version+"\x3c/td\x3e","\x3ctd class\x3d'columnc'\x3e\x3cinput type\x3d'checkbox' data-dojo-type\x3d'dijit/form/CheckBox' checked\x3e\x3c/input\x3e\x3c/td\x3e","\x3ctd class\x3d'columnd'\x3e\x3cinput type\x3d'text' data-dojo-type\x3d'dijit/form/TextBox' value\x3d'"+
b.initRoot+"'\x3e\x3c/input\x3e\x3c/td\x3e","\x3c/tr\x3e"]))},this);a.push("\x3c/table\x3e");dojo.place(a.join(""),this._tableDiv);e.parse(this._tableDiv)},_getLibRoot:function(a,b){var c=void 0;this._userLibs.some(function(d){if(d.id==a&&d.version==b)return c=d.root,!0});return c},_getLibs:function(){return dojo.query("tr[libPath]",this.domNode).map(function(a){var b=dijit.byNode(dojo.query(".dijitTextBox",a)[0]),c=dijit.byNode(dojo.query(".dijitCheckBox",a)[0]);a=parseInt(dojo.attr(a,"libPath"));
c=c.get("checked");b=b.get("value")||this._userLibs[a].root;return{id:this._userLibs[a].id,version:this._userLibs[a].version,root:b,includeSrc:c}},this)},getRoot:function(){if(k.singleProjectMode())return k.getProject()},_getResources:function(){return[k.getProject()]},_rewriteUrls:function(){var a=[];this._getResources().forEach(function(b){b=f.findResource(b);"Folder"==b.elementType?a=a.concat(f.findResource("*.html",!0,b,!0)):"html"==b.extension&&a.push(b)});var c=new d(this._getLibs()),e=a.filter(function(a){return!w.isThemeHTML(a)}).map(function(a){return c.rebuildSource(a.getContentSync(),
a).then(function(b){a.setContents(b,!0)})});return b(e)},_select:function(a){dojo.query("tr[libPath]",this.domNode).forEach(function(b){(b=dijit.byNode(dojo.query(".dijitCheckBox",b)[0]))&&b.set("checked",a)});return!1},_selectAll:function(){this._select(!0)},_selectNone:function(){this._select(!1)},okButton:function(){if(this.__fileName.isValid()){var a=dojo.attr(this.__fileName,"value");".zip"!=a.slice(-4)&&(a+=".zip");this._rewriteUrls().then(function(){var b=this._getLibs().filter(function(a){return a.includeSrc}),
c={};this.__optimize&&this.__optimize.getValue()&&(c.build="1");this.__fullSource&&this.__fullSource.getValue()&&(c.fullsource="1");setTimeout(function(){f.download(this._getResources(),a,this.getRoot(),b,c)}.bind(this),300)}.bind(this))}},cancelButton:function(){this.cancel=!0;this.onClose()}})})},"davinci/ve/RebaseDownload":function(){define(["dojo/_base/declare","./RebuildPage","../library"],function(p,n,m){return p(n,{constructor:function(h){this.libs=h},getLibraryBase:function(h,g){for(var f in this.libs){var b=
this.libs[f];if(b.id==h&&b.version==g)return f=new Deferred,f.resolve(b.root),f}return m.getLibRoot(h,g)||""}})})},"davinci/ve/RebuildPage":function(){define("dojo/_base/declare ./Context ../model/Path davinci/model/Factory dojo/Deferred dojo/promise/all davinci/ve/commands/ChangeThemeCommand".split(" "),function(p,n,m,h,g,f,b){return p(null,{constructor:function(b){dojo.mixin(this,b);this.context=new n},getPageCss:function(){return["app.css"]},getPageJs:function(){return["app.js"]},rebuildSource:function(e,
k,d,c){if(!k||!k.extension||"html"!=k.extension){var a=new g;a.resolve(e);return a}this.context.model=this.context._srcDocument=h.getNewFromResource(k);var q=new m(k?k.getPath():"");this.context.model.fileName=q.toString();this.context._srcDocument.setText(e,!0);if(null==this.context._srcDocument.find({elementType:"HTMLElement",tag:"html"},!0))return a=new g,a.resolve(e),a;var n=this.context._srcDocument.find({elementType:"HTMLElement"});e=[];e.push(this.context.loadRequires("html.body",!0,!0,!0));
for(k=0;k<n.length;k++){var p=n[k],p=p.getAttribute("data-dojo-type")||p.getAttribute("dojoType")||p.getAttribute("dvwidget");null!=p&&e.push(this.context.loadRequires(p.replace(/\./g,"/"),!0,!0,!0))}d&&this.changeThemeBase(d,q);c&&c.mobileTheme&&(new b(c,this.context))._dojoxMobileAddTheme(this.context,c.mobileTheme);n=this.getPageCss();d=this.getPageJs();c=this.context._getCurrentBasePath();q=q.getParentPath();for(k=0;k<n.length;k++)p=c.append(n[k]).relativeTo(q).toString(),this.addModeledStyleSheet(p,
n[k]);for(k=0;k<d.length;k++)n=c.append(d[k]).relativeTo(q).toString(),this.addJavaScript(n,null,null,null,d[k]);a=new g;f(e).then(function(){a.resolve(this.context._srcDocument.getText())}.bind(this));return a},addModeledStyleSheet:function(b,f){this.context._srcDocument.find({elementType:"CSSImport"}).some(function(d){if(d.url&&-1<d.url.indexOf(f))return d.setUrl(b),!0})},addJavaScript:function(b,f,d,c,a){!this.context._srcDocument.find({elementType:"HTMLElement",tag:"script"}).some(function(c){var d=
c.getAttribute("src");if(d&&-1<d.indexOf(a))return c.setAttribute("src",b),!0})&&b&&(-1<b.indexOf("dojo.js")&&this.context.addHeaderScript(b,{"data-dojo-config":"parseOnLoad: true"}),this.context.addHeaderScript(b))},changeThemeBase:function(b,f){var d=new m(b.getFile().parent.getPath()),c=function(a){var b=d.append(a).relativeTo(f,!0);this.addModeledStyleSheet(b.toString(),new m(a),!0)}.bind(this);b.files.forEach(c);b.conditionalFiles&&b.conditionalFiles.forEach(c)}})})},"davinci/ve/Context":function(){define("require dojo/_base/declare dojo/_base/lang dojo/dom-class dojo/query dojo/_base/connect xide/mixins/ReloadMixin xide/mixins/EventedMixin ./_ContextMobile ./_ContextTheme ./_ContextCSS ./_ContextJS ./_ContextDelite ./_ContextDojo ./_ContextInterface ./_ContextDocument ./_ContextWidgets ./ThemeModifier ../commands/CommandStack ./tools/SelectTool ../model/Path ../Workbench ./widget ../library ./metadata ./ChooseParent ./States dojox/html/_base".split(" "),
function(p,n,m,h,g,f,b,e,k,d,c,a,q,w,r,B,y,x,z,u,v,A,C,G,D,I,H){davinci.ve._preferences={};var F=0,N=function(a){var b=D.getLibrary();a&&dojo.filter(a.attributes,function(a){return"on"==a.nodeName.substr(0,2).toLowerCase()}).forEach(function(a){var c=!1,d;for(d in b)if(c=D.getLibrary(d),c=D.invokeCallback(c,"requiredEventAttribute",[a]))break})};return n("davinci.ve.Context",[k,d,c,a,q,w,r,B,y,x,e,b],{_scripts:[],delite:!1,WIDGET_MODIFIED:0,WIDGET_ADDED:1,WIDGET_REMOVED:2,WIDGET_REPARENTED:3,WIDGET_ID_CHANGED:4,
maqStatesClassCount:0,maqStatesClassPrefix:"maqStatesClass",maqTypesClassCount:0,maqTypesClassPrefix:"maqTypesClass",rootWidget:null,getRootWidget:function(){return this.rootWidget},constructor:function(a){a||(a={});A.location();this._contentStyleSheet=p.toUrl("davinci/ve/resources/content.css");this._id="_edit_context_"+F++;this.widgetHash={};this.delite=a.delite;m.mixin(this,a);"string"==typeof this.containerNode&&(this.containerNode=dijit.byId(this.containerNode));this._commandStack=new z(this);
this._defaultTool=new u;this._widgetIds=[];this._objectIds=[];this._widgets=[];this._loadedCSSConnects=[];this._chooseParent=new I({context:this});this.sceneManagers={};this.catchEvents=!0;this._customWidgetPackages=m.clone(G.getCustomWidgetPackages());a=D.getLibrary();for(var b in a)a=D.getLibrary(b),D.invokeCallback(a,"onDocInit",[this]);b=document.getElementById("focusContainer");b||(b=dojo.create("div",{"class":"focusContainer",id:"focusContainer"},document.body),davinci.Workbench.focusContainer=
b);this.initReload()},getVisualEditor:function(){return this.visualEditor&&this.visualEditor._pageEditor?this.visualEditor._pageEditor.delegate:null},destroy:function(){this.deactivate();this.inherited(arguments);this._loadedCSSConnects&&(this._loadedCSSConnects.forEach(f.disconnect),delete this._loadedCSSConnects)},isActive:function(){return!!this._activeTool},onReloaded:function(){},getPath:function(){return new v(this.getModel().fileName)},activate2:function(){if(!this.isActive()){this.loadStyleSheet(this._contentStyleSheet);
this._attachAll();this._restoreStates();g("*",this.rootNode).forEach(function(a){N(a);"A"==a.tagName.toUpperCase()&&a.hasAttribute("href")&&a.removeAttribute("href")});this._AppStatesActivateActions();this._statesLoaded=!0;f.publish("/davinci/ui/context/statesLoaded",[this]);this._onLoadHelpers();var a=this.getContainerNode();h.add(a,"editContextContainer");this.catchEvents?(this._connects=[f.connect(this._commandStack,"onExecute",this,"onCommandStackExecute"),f.connect(this._commandStack,"onExecute",
function(){setTimeout(this.onContentChange.bind(this),0)}.bind(this))],this._designEvents=[f.connect(this.getDocument(),"onkeydown",this,"onKeyDown"),f.connect(this.getDocument(),"onkeyup",this,"onKeyUp"),f.connect(a,"ondblclick",this,"onDblClick"),f.connect(a,"onmousedown",this,"onMouseDown"),f.connect(a,"onclick",this,"onMouseClick"),f.connect(a,"onmousemove",this,"onMouseMove"),f.connect(a,"onmouseup",this,"onMouseUp"),f.connect(a,"onmouseover",this,"onMouseOver"),f.connect(a,"onmouseout",this,
"onMouseOut")]):this._connects=[f.connect(this._commandStack,"onExecute",this,"onCommandStackExecute"),f.connect(this._commandStack,"onExecute",function(){setTimeout(this.onContentChange.bind(this),0)}.bind(this)),f.connect(this.getDocument(),"onkeydown",this,"onKeyDown"),f.connect(this.getDocument(),"onkeyup",this,"onKeyUp")];this.visualEditor&&this.visualEditor._pageEditor&&this.visualEditor._pageEditor._visualChanged&&this.visualEditor._pageEditor._visualChanged(!0);try{this.setActiveTool()}catch(b){debugger;
console.error("set active tool failed! "+b.message)}return!0}},deactivate:function(){if(this.isActive()){this._connects.forEach(f.disconnect);this._designEvents.forEach(f.disconnect);delete this._designEvents;delete this._connects;(this._focuses||[]).forEach(function(a){a._connected=!1});this._commandStack.clear();this._activeTool&&(this._activeTool.deactivate(),delete this._activeTool);var a=this.getContainerNode();this.select(null);h.remove(a,"editContextContainer");this.getTopWidgets().forEach(this.detach,
this);this.unloadStyleSheet(this._contentStyleSheet)}},_editorSelectionChange:function(a){a.editor.fileName===this.editor.fileName&&(f.unsubscribe(this._editorSelectConnection),delete this._editorSelectConnection,this._setSource(this._srcDocument))},_preserveStates:function(a,b){var c=davinci.ve.states.retrieve(a);if("BODY"!=a.tagName.toUpperCase()&&(c.maqAppStates||c.maqDeltas)){var d=this.maqStatesClassPrefix+this.maqStatesClassCount;a.className=a.className+" "+d;this.maqStatesClassCount++;b[d]=
{};c.maqAppStates&&(b[d].maqAppStates=c.maqAppStates);c.maqDeltas&&(b[d].maqDeltas=c.maqDeltas);a.style?b[d].style=a.style.cssText:console.error("Context._preserveStates: fail")}},_restoreStates:function(){},_AppStatesActivateActions:function(){if("davinci.ve.PageEditor"===this.editor.declaredClass){if(!this.rootNode._maqAppStates){this.rootNode._maqAppStates={};var a=this.rootWidget._srcElement,b=H.serialize(this.rootNode);b.maqAppStates?a.setAttribute(H.APPSTATES_ATTRIBUTE,b.maqAppStates):a.removeAttribute(H.APPSTATES_ATTRIBUTE);
this.editor._visualChanged(!0)}H.getFocus(this.rootNode)||(a=H.getState(this.rootNode),H.setState(a,this.rootNode,{updateWhenCurrent:!0,silent:!0,focus:!0}))}},getCommandStack:function(){return this._commandStack},getSelection:function(){return this._selection||[]},getPreference:function(a){return a?davinci.ve._preferences[a]:void 0},getPreferences:function(){return m.mixin({},davinci.ve._preferences)},setPreference:function(a,b){a&&(davinci.ve._preferences[a]=b,this.isActive())},setPreferences:function(a){if(a)for(var b in a)this.setPreference(b,
a[b])},_parse:function(a){var b={metas:[],scripts:[],modules:[],styleSheets:[]},c=a.getDocumentElement();a=c.getChildElement("head");var d=c.getChildElement("body");this._uniqueIDs={};if(d){d.visit({visit:dojo.hitch(this,function(a){"HTMLElement"==a.elementType&&a!=d&&this.getUniqueID(a)})});if(c=d.getAttribute("class"))b.bodyClasses=c;b.style=d.getAttribute("style");b.content=d.getElementText({includeNoPersist:!0,excludeIgnoredContent:!0});c=d.getAttribute(davinci.ve.states.APPSTATES_ATTRIBUTE);
c||(c=d.getAttribute(davinci.ve.states.APPSTATES_ATTRIBUTE_P6))&&d.setAttribute(davinci.ve.states.APPSTATES_ATTRIBUTE,c);d.removeAttribute(davinci.ve.states.APPSTATES_ATTRIBUTE_P6);b.maqAppStates=c}if(c=a.getChildElement("title"))b.title=c.getElementText();c=a.getChildElements("script");dojo.forEach(c,function(a){var c=a.getAttribute("src");c&&b.scripts.push(c);a=a.getElementText();a.length&&(a.replace(/dojo\.require\(["']([^'"]+)["']\)/g,function(a,c){b.modules.push(c)}),a.replace(/require\(\[["']([^'"]+)["']\]\)/g,
function(a,c){b.modules.push(c)}))},this);a=a.getChildElements("style");dojo.forEach(a,function(a){dojo.forEach(a.children,function(a){"CSSImport"===a.elementType&&b.styleSheets.push(a.url)})});return b},getUniqueID:function(a,b){var c=a.getAttribute("id");if(!c){for(var d=this.rootWidget?this.rootWidget.domNode.ownerDocument:null,e=b||a.tag;;)if(c=this._uniqueIDs.hasOwnProperty(e)?++this._uniqueIDs[e]:this._uniqueIDs[e]=0,c=e+"_"+c,d){if(!d.getElementById(c))break}else break;a.addAttribute("id",
c,!b)}return c},registerSceneManager:function(a){if(a&&a.id){var b=a.id;this.sceneManagers[b]||(this.sceneManagers[b]=a,f.publish("/davinci/ui/context/registerSceneManager",[a]))}},onCommandStackExecute:function(){this.clearCachedWidgetBounds();this.editor&&this.editor.editorContainer&&this.editor.editorContainer.updateToolbars&&this.editor.editorContainer.updateToolbars();H.updateHighlightsBaseStateWidgets(this)},reorderPreserveSiblingOrder:function(a){a=[].concat(a);for(var b=0;b<a.length-1;){for(var c=
a[b].getParent(),d=b+1,e=!1;d<a.length;)if(a[d].getParent()==c)e=!0,d++;else break;if(e)for(c=c.getChildren(),e=d-2;e>=b;e--)for(var f=b;f<=e;f++){var k=c.indexOf(a[f]),g=c.indexOf(a[f+1]);k>g&&(k=a[f+1],a[f+1]=a[f],a[f]=k)}b=d}return a},_updateWidgetHash:function(){this.widgetHash={};this.getAllWidgets().forEach(function(a){var b=a.id;b&&(this.widgetHash[b]=a)},this)}})})},"davinci/ve/_ContextMobile":function(){define(["require","dojo/_base/declare","../Theme","preview/silhouetteiframe","dojox/html/_base"],
function(p,n,m,h){return n(null,{getMobileDevice:function(){var g=this.getDocumentElement().getChildElement("body");if(g){var f=g.getAttribute("data-maq-device"),b=g.getAttribute("data-maqetta-device");!f&&b&&(g.removeAttribute("data-maqetta-device"),g.setAttribute("data-maq-device",b),f=b,this.editor._visualChanged());return f}},setMobileDevice:function(g){this.getGlobal().require("dojo/_base/config").mblUserAgent=h.getMobileTheme(g+".svg");var f=this.getDocumentElement().getChildElement("body");
g&&"none"!=g?f.addAttribute("data-maq-device",g):f.removeAttribute("data-maq-device",g)},setMobileTheme:function(g){(this.getMobileDevice()||"none")!=g&&this.setMobileDevice(g);this.close();try{h.getMobileTheme(g+".svg"),this._configDojoxMobile()}catch(f){}},getMobileOrientation:function(){var g=this.getDocumentElement().getChildElement("body"),f=g.getAttribute("data-maq-orientation"),b=g.getAttribute("data-maqetta-device-orientation");!f&&b&&(g.removeAttribute("data-maqetta-device-orientation"),
g.setAttribute("data-maq-orientation",b),f=b,this.editor._visualChanged());return f},setMobileOrientation:function(g){var f=this.getDocumentElement().getChildElement("body");g?f.setAttribute("data-maq-orientation",g):f.removeAttribute("data-maq-orientation")},_mobileMetaElement:{name:"viewport",content:"width\x3ddevice-width, initial-scale\x3d1.0, user-scalable\x3dno"},setMobileMeta:function(g){"none"===g?this._removeHeadElement("meta",this._mobileMetaElement):this._addHeadElement("meta",this._mobileMetaElement)},
_configDojoxMobile:function(g){try{var f=this.getGlobal().require,b=f("dojox/mobile"),e=f("dojox/mobile/deviceTheme"),k=this.getGlobal().dojo.config,d=this._getDojoJsElem().getAttribute("data-dojo-config"),c=k.mblUserAgent||"none",a,h,n,d=d?p.eval("({ "+d+" })","data-dojo-config"):{};a=d.themeMap;h=d.mblThemeFiles;n=d.mblLoadCompatPattern;delete this.themeCssFiles;delete this.cssFiles;a||(a=m.getDojoxMobileThemeMap(this,dojo.clone(m.dojoMobileDefault)),h=[],m.getThemeLocation().toString().replace(/\//g,
"\\/"),n=RegExp(""));g=!1;m.themeMapsEqual(e.themeMap,a)||(g=!1,e.themeMap=a);h?k.mblThemeFiles=h:delete k.mblThemeFiles;n?(k.mblLoadCompatPattern=n,b.loadCompatPattern=n):(delete k.mblLoadCompatPattern,b.loadCompatPattern=/\/mobile\/themes\/.*\.css$/);if(this._selection)this.onSelectionChange(this._selection);g||e.loadDeviceTheme(c)}catch(r){}}})})},"davinci/ve/_ContextTheme":function(){define("dojo/_base/declare ../Theme ../model/Path ../Workbench ../library ./metadata dojox/html/_base".split(" "),
function(p,n,m,h,g,f){return p(null,{getTheme:function(){if(!this.theme){var b=f.loadThemeMeta(this._srcDocument);b&&(this._themeUrl=b.themeUrl,this._themeMetaCache=b.themeMetaCache,this.theme=b.theme,this.theme.helper=n.getHelper(this.theme),this.theme.helper&&this.theme.helper.then&&this.theme.helper.then(function(b){b.helper&&(this.theme.helper=b.helper)}.bind(this)))}return this.theme},getThemeMeta:function(){this._themeMetaCache||this.getTheme();return this._themeMetaCache},themeChanged:function(){var b=
!0,e=this.getModel();this._themeUrl&&e.find({elementType:"CSSImport",url:this._themeUrl},!0)&&(b=!1);b&&(this._themeMetaCache=this.theme=null)},loadTheme:function(b){var e=this.getModel(),f="claro";b&&b.themeSet?f=b.themeSet.desktopTheme:b&&b.theme&&(f="deviceSpecific"==b.theme?"claro":b.theme);b=e.find({elementType:"CSSImport"});var d={},c;g.getThemes(h.getProject()).forEach(function(a){a.name==f&&(c=a);a.files&&a.files.forEach(function(b){d[b]=a})});if(null==c)return console.error("couldnt find default theme, abort!!"),
!1;if(null==c.getFile)return console.error("default theme in invalid state, abort!!"),!1;if(b.some(function(a){for(var b in d)if(-1<a.url.indexOf(b))return!0}))return!0;e.find({elementType:"HTMLElement",tag:"body"},!0).setAttribute("class",c.className);e=c.getFile();if(null==e||null==e.getPath)return console.error("default theme file in invalid state, abort!!"),!0;var a=c.getFile().getPath();c.files.forEach(function(b){b=(new m(a)).removeLastSegments(1).append(b).relativeTo(this.getPath(),!0);this.addModeledStyleSheet(b.toString(),
!0)},this)},_themeChange:function(b){b&&"CSSRule"===b.elementType&&(this.editor.setDirty(!0),this.hotModifyCssRule(b))}})})},"davinci/ve/_ContextCSS":function(){define("dojo/_base/declare dojo/dom-construct dojo/query dojo/_base/connect system/resource ../model/Path ../Workbench ./widget ./States ./utils/pseudoClass dojox/html/_base".split(" "),function(p,n,m,h,g,f,b,e,k,d){return p(null,{getStyleAttributeValues:function(b){for(var a=b?b.getStyleValues():[],d=k.getStateContainersForNode(b.domNode),
e=!0,f=0;f<d.length;f++){var g=k.getState(d[f]);if(g&&g!=k.NORMAL){e=!1;break}}if(!e&&(d=davinci.ve.states.getStatesListCurrent(b.domNode),b=davinci.ve.states.getStyle(b.domNode,d))){for(d=0;d<b.length;d++){var e=b[d],h;for(h in e)for(e=a.length-1;0<=e;e--){var f=a[e],m;for(m in f)if(h==m){a.splice(e,1);break}}}a=a.concat(b)}return a},addPseudoClassSelectors:function(b){var a=function(b){if(b){for(var c=b.cssRules,e=0,e=0;e<c.length;e++){var f=c[e];if(f.type&&f.type===CSSRule.IMPORT_RULE)a(c[e].styleSheet);
else if(c[e].type==CSSRule.STYLE_RULE){var k=c[e].selectorText;if(-1<k.indexOf(":")){k=d.replace(k);f.selectorText=k;b.deleteRule(e);b.insertRule(f.cssText,e);break}}}return!0}return!1};dojo.some(this.getDocument().styleSheets,a)},hotModifyCssRule:function(b){function a(b,c){if(b.href==c)return b;for(var d,e=b.cssRules,f=0;f<e.length&&(!e[f].type||e[f].type!==CSSRule.IMPORT_RULE||!(d=e[f].href==c?e[f].styleSheet:a(e[f].styleSheet,c)));f++);return d}dojo.some(this.getDocument().styleSheets,function(e){var f;
f=g.findResource(b.parent.url).getURL();var k=encodeURI(f);f=b.getSelectorText();-1<f.indexOf(":")&&(f=d.replace(f));f=f.replace(/^\s+|\s+$/g,"");if(e=a(e,k)){for(var h=e.cssRules,k=0;k<h.length;k++)if(h[k].type&&h[k].type==CSSRule.STYLE_RULE&&h[k].selectorText==f){e.deleteRule(k);break}b.properties.length&&(f=b.getText({noComments:!0}),-1<f.indexOf(":")&&(f=d.replace(f)),e.insertRule(f,k));f=!0}else f=!1;return f})},unloadStyleSheet:function(b){var a=this.getGlobal();a&&a.require&&a.require("dojo/query")("link").filter(function(a){return a.getAttribute("href")==
b}).forEach(n.destroy)},addModeledStyleSheet:function(b,a){a||this.loadStyleSheet(b);if(!this.model.hasStyleSheet(b)){var d=-1<b.indexOf("app.css"),e,f=this.model.find({elementType:"HTMLElement",tag:"style"},!0);if(f)for(var f=f.children,k=0;k<f.length;k++)-1<f[k].url.indexOf("app.css")&&(e=f[k]);this.model.addStyleSheet(b,void 0,void 0,d?void 0:e);for(var g in this.model._loadedCSS)this._loadedCSSConnects.push(h.connect(this.model._loadedCSS[g],"onChange",this,"_themeChange"))}},loadStyleSheet:function(b){var a=
this.getDocument(),d=this.getGlobal().require("dojo/query")("link");d.some(function(a){return a.getAttribute("href")===b})||dojo.withDoc(a,function(){var e=a.getElementsByTagName("head")[0],f=-1<b.indexOf("app.css"),k=-1<b.indexOf("content.css"),g=-1<b.indexOf("claro.css"),h=-1<b.indexOf("claro/document.css"),f=!f&&!k&&!h&&!g,m,f=!1,g=n.create("link",{rel:"stylesheet",type:"text/css",href:b});d.forEach(function(a){-1<a.href.indexOf("app.css")?m=a:a.href.indexOf("content.css")});var p;k||(p=m);f?e.appendChild(g):
p?e.insertBefore(g,p):e.appendChild(g)})},getStyle:function(){return this._header?this._header.style:void 0},setStyle:function(b){var a=e.parseStyleValues(b);if(this._header){var d=e.parseStyleValues(this._header.style);if(d)for(var f in d)a[f]||(a[f]=void 0);this._header.style=b}else this._header={style:b}},getAppCssRelativeFile:function(){this._appCssRelativeFile||(this._appCssRelativeFile=this.getRelativeFileString("app.css"));return this._appCssRelativeFile},_addCssForDevice:function(b,a,d){d=
0;for(var e=a.length;d<e;d++){var k=a[d];if(k[0]===b||".*"===k[0]){this.themeCssFiles||(this.themeCssFiles=[]);this.themeCssFiles=this.themeCssFiles.concat(k[2]);this._themePath=new f(this.visualEditor.fileName);this._getCssFiles().forEach(function(a){this._loadedCSSConnects.push(h.connect(a,"onChange",this,"_themeChange"))},this);break}}}})})},"davinci/ve/utils/pseudoClass":function(){define([],function(){return{MAQETTA_PSEUDO_CLASS:"maqettaPseudoClass",replace:function(p){return"hover link visited active focus first-letter first-line first-child before after".split(" ").reduce(function(n,
m){return n.replace(new RegExp(":"+m,"g"),".maqettaPseudoClass"+m[0].toUpperCase()+m.slice(1))},p)}}})},"davinci/ve/_ContextJS":function(){define("dojo/_base/declare dojo/_base/xhr dojo/Deferred dojo/promise/all xide/factory xide/types ../html/HTMLElement ../html/HTMLText dojox/html/_base".split(" "),function(p,n,m,h,g,f,b,e){return p(null,{_getAppJsRelativeFile:function(){this._appJsRelativeFile||(this._appJsRelativeFile=this.getRelativeFileString("app.js"));return this._appJsRelativeFile},addJavaScriptSrc:function(b,
d,c,a){var e=/\/dojo.js$/.test(b),m=[];if(!this._didDojo){if(!e&&!a){var p=this;a=(new dojo._Url(this.getDocument().baseURI,b)).toString();m.push(n.get({url:a,sync:!0}).then(function(a){p.getGlobal().eval(a)}))}if(d){a=this.getDocumentElement().getChildElement("head");d={parseOnLoad:!0,async:!0,packages:this._getLoaderPackages()};var B=this;a=a.getChildElements("script").some(function(a){var d=a.getAttribute("src");if(d&&-1<d.indexOf(c))return e&&(g.publish(f.EVENTS.ON_SET_DOJO_URL,{data:{dojoUrl:b},
context:B,editor:B.editor},this),a=a.getAttribute("src"),/\/dojo.js$/.test(a)||B.addHeaderScript(a)),!0;B.addHeaderScript(d)});d.packages=d.packages.concat(this._customWidgetPackages);a?e&&this._updateDojoConfig(d):e?(g.publish(f.EVENTS.ON_SET_DOJO_URL,{data:{dojoUrl:b},context:this,editor:this.editor},this),this.addHeaderScript(b,{"data-dojo-config":JSON.stringify(d).slice(1,-1).replace(/"/g,"'")}),m.push(this.addJavaScriptModule("dijit/dijit",!0,!0)),m.push(this.addJavaScriptModule("dojo/parser",
!0,!0)),this._didDojo=!0):this.addHeaderScript(b)}return h(m)}},addJavaScriptModule:function(b,d,c){var a=new m;c?a.resolve():this.getGlobal().require([b],function(b){a.resolve(b)});if(d){if(!this._requireHtmlElem&&!this.getDocumentElement().getChildElement("head").getChildElements("script").some(function(a){var b=a.find({elementType:"HTMLText"},!0);if(b&&this._reRequire.test(b.getText()))return this._requireHtmlElem=a,!0},this))return this._requireHtmlElem=this.addHeaderScriptText('require(["'+b+
'"]);\n'),a;d=this._requireHtmlElem.find({elementType:"HTMLText"},!0);c=d.getText();var e=c.match(this._reRequire)[1].match(this._reModuleId);-1===e.indexOf(b)&&(e.push(b),c=c.replace(this._reRequire,"require("+JSON.stringify(e,null," ")+")"),d.setText(c),d.parent.setScript(c))}return a},addJavaScriptText:function(b,d,c){if(!c)try{this.getGlobal().eval(b)}catch(a){c=b.length,console.error('eval of "'+b.substr(0,20)+(20<c?"...":"")+'" failed')}d&&this.addHeaderScriptText(b)},addHeaderScript:function(e,
d){var c=new b("script");c.addAttribute("type","text/javascript");c.addAttribute("src",e);if(d)for(var a in d)c.addAttribute(a,d[a]);this.getDocumentElement().getChildElement("head").addChild(c)},addHeaderScriptText:function(f){var d=this.getDocumentElement().getChildElement("head"),c,a=d.children,g,h;for(g=a.length-1;0<=g;g--)if(h=a[g],"HTMLElement"===h.elementType&&"script"===h.tag){c=h.find({elementType:"HTMLText"},!0);break}c||(a=new b("script"),a.addAttribute("type","text/javascript"),a.script=
"",d.addChild(a),c=new e,a.addChild(c));d=c.getText();-1===d.indexOf(f)&&(c.setText(d+"\n"+f),c.parent.setScript(d+"\n"+f));return c.parent}})})},"davinci/ve/_ContextDelite":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/xhr dojo/dom-class dojo/dom-construct dojo/dom-style dojo/query dojo/Deferred dojo/promise/all dojo/_base/connect dojo/topic dojo/window xide/utils xide/factory xide/types system/resource ../UserActivityMonitor ../Theme ./ThemeModifier ../commands/CommandStack ./commands/ChangeThemeCommand ./tools/SelectTool ../model/Path ../Runtime ../Workbench ./widget ./Focus ../library ./metadata ./ChooseParent ./Snap ./States ./HTMLWidget ../html/HTMLElement ../html/HTMLText ../workbench/Preferences ./utils/GeomUtils dojo/text!./newfile.template.html ./utils/pseudoClass dojox/html/_base".split(" "),
function(p){return p(null,{})})},"davinci/UserActivityMonitor":function(){define([],function(){return{}})},"davinci/ve/ThemeModifier":function(){define("dojo/_base/declare ../model/Path ../model/Factory ./utils/URLRewrite ./commands/ModifyRuleCommand ./commands/StyleCommand davinci/_common system/resource".split(" "),function(p,n,m,h,g,f,b,e){return p("davinci.ve.ThemeModifier",null,{_getCssFiles:function(){if(this.cssFiles)return this.cssFiles;this.cssFiles=[];if(this.themeCssFiles){var b=this._themePath.getParentPath();
this.cssFiles=this.themeCssFiles.map(function(d){return m.getModel({url:b.append(d).toString(),includeImports:!0})})}return this.cssFiles},_getThemeResource:function(b){b=this._themePath.getParentPath().append(b).toString();return system.resource.findResource(b)},getDeltaRule:function(b){var d=null,c=this.cssFiles[0],a=b.getSelectorText();this.cssFiles.forEach(function(b){var e=b.getRules(a);0<e.length&&(c=b);e.forEach(function(a){a.parent.url==b.url&&(d=a)}.bind(this))}.bind(this));!d&&c&&(d=c.addRule(a+
" {}"));return d},_markDirty:function(b,d){this._dirtyResource||(this._dirtyResource={});this._dirtyResource[b]={time:Date.now(),modelObject:d};this._srcChanged()},getCommandForStyleChange:function(b,d){var c=d||this.getSelection(),a=c.length?c[c.length-1]:void 0;1<c.length&&this.select(a);if("inline"==b.appliesTo){for(var e=[],m=new n(this.fileName),c=0;c<b.values.length;c++)for(var p in b.values[c]){if(h.containsUrl(b.values[c][p])&&!h.isAbsolute(b.values[c][p])){var B=new n(h.getUrl(b.values[c][p]));
if(B.isAbsolute){var y={};y[p]=b.values[c][p]}else B=B.relativeTo(m).toString(),h.replaceUrl(b.values[c][p],B)}else y={},y[p]=b.values[c][p];e.push(y)}a=new f(a,e,b.applyToWhichStates)}else{if("proposal"==b.appliesTo.type){a=this.model.find({elementType:"CSSFile",relativeURL:b.appliesTo.targetFile},!0);if(!a&&this.cssFiles){for(c=0;this.cssFiles.length;c++)if(this.cssFiles[c].url===b.appliesTo.targetFile){a=this.cssFiles[c];break}if(!a)return}a=a.addRule(b.appliesTo.ruleString+" {}")}else a=b.appliesTo.rule;
a=new g(a,b.values,this)}return a},saveDynamicCssFiles:function(f,d){var c=[],a={visit:function(a){"CSSFile"==a.elementType&&a.isDirty()&&c.push(a.save(d).then(function(b){d||e.findResource(a.url).removeWorkingCopy();a.dirtyResource=d;return a},function(c){console.error(dojo.string.substitute(b.errorSavingFile,[a.url,c]));return c}));return!1}};f&&f.forEach(function(b){b.visit(a)});return c},dirtyDynamicCssFiles:function(b){if(null==b)return console.error("dirtyDynamicCssFiles:invalid arg"),!1;var d=
!1,c={visit:function(a){"CSSFile"==a.elementType&&a.isDirty()&&(d=!0);return d}};b&&b.forEach(function(a){if(d)return d;a.visit(c)});return d},close:function(){this.cssFiles&&this.cssFiles.forEach(function(b){b.close();require("davinci/model/Factory").closeModel(b)}.bind(this));delete this.cssFiles},destroy:function(){this.close()}})})},"davinci/ve/commands/ModifyRuleCommand":function(){define(["dojo/_base/declare","../States","../../html/CSSModel"],function(p,n,m){var h=function(g,f){g.removeAllProperties();
f.forEach(function(b){g.addProperty(b.name,b.value)})};return p("davinci.ve.commands.ModifyRuleCommand",null,{name:"modify rule",constructor:function(g,f,b){this.cssRule=g;this.values=f;this.context=b},execute:function(g){this.context||(this.context=g);if(this.cssRule&&this.values&&this.context){this._oldValues=this.cssRule.getProperties();g=this.cssRule;var f=this.values,b,e,k=[],d=[];for(b=0;b<f.length;b++)for(var c in f[b])(e=g.getProperty(c))&&d.push(e),g.removeProperty(c);for(b=0;b<g.properties.length;b++){e=
g.properties[b];var a={};a[e.name]=e.value;k.push(a)}f=k.concat(dojo.clone(f));e=m.shorthand;for(b=k=0;b<e.length;b++){a:{for(var a=e[b][0],h=0;h<f.length;h++)if(f[h].hasOwnProperty(a)){a=h;break a}a=-1}-1<a&&(h=f[a],f.splice(a,1),f.splice(k,0,h),k++)}for(b=g.properties.length-1;0<=b;b--)if(e=g.properties[b])d.push(g.getProperty(e.name)),g.removeProperty(e.name);for(b=0;b<f.length;b++)for(c in f[b])if(f[b][c]&&""!==f[b][c])for(g.addProperty(c,f[b][c]),e=0;e<d.length;e++)if(d[e].name===c){k=g.getProperty(c,
f[b][c]);d[e].comment&&(k.comment=d[e].comment);d[e].postComment&&(k.postComment=d[e].postComment);d.splice(e,1);break}this._setDirty()}},undo:function(){this.cssRule&&this._oldValues&&this.context&&(h(this.cssRule,this._oldValues),this._setDirty())},_setDirty:function(){this.cssRule.getCSSFile().setDirty(!0);this.context.editor.setDirty(!0);n.resetState(this.context.rootNode);this.context._selection&&(this.context._forceSelectionChange=!0)}})})},"davinci/ve/tools/SelectTool":function(){define("dojo/_base/declare dojo/dom-geometry ../../Workbench ../../workbench/Preferences ./_Tool ../widget ../metadata dojo/dnd/Mover ../../XPathUtils ../../html/HtmlFileXPathAdapter ../Snap ../../commands/CompoundCommand ../commands/AddCommand ../commands/ReparentCommand ../commands/MoveCommand ../commands/ResizeCommand ../commands/ModifyCommand ../tools/CreateTool ../States ../utils/GeomUtils".split(" "),
function(p,n,m,h,g,f,b,e,k,d,c,a,q,w,r,B,y,x,z,u){return p("davinci.ve.tools.SelectTool",g,{CONSTRAIN_MIN_DIST:3,activate:function(a){this._context=a},deactivate:function(){this._setTarget(null)},onMouseDown:function(a){var c=this._context;if(!c.isFocusNode(a.target)){this._shiftKey=a.shiftKey;this._sKey=this._spaceKey=!1;this._areaSelectClear();var d=this._checkFocusXY(a.pageX,a.pageY);d&&"NONE"!==b.getAllowedChild(d.type)[0]&&(d=null);var k=this._getTarget()||f.getEnclosingWidget(a.target);for(d||
(d=k);d&&!d.getContext();)d=f.getEnclosingWidget(d.domNode.parentNode);if(d)if(dojo.isMac&&a.ctrlKey||2==a.button)c.select(d);else{for(var g=c.getSelection(),h=null,m=0;m<g.length;m++){for(var q=g[m],p=d;p&&p!=c.rootWidget;){if(p==q){h=q;break}p=p.getParent()}if(h)break}p=null;m=dojo.isMac?a.metaKey:a.ctrlKey;this._mouseDownInfo=null;if(0<=dojo.indexOf(g,d))m?c.deselect(d):(p=d,this._mouseDownInfo={widget:d,eventTargetWidget:k,pageX:a.pageX,pageY:a.pageY,dateValue:Date.now()});else if(m){if(d==c.rootWidget)return;
c.select(d,m)}else if(h)p=h,this._mouseDownInfo={widget:d,eventTargetWidget:k,pageX:a.pageX,pageY:a.pageY,dateValue:Date.now()};else{if(d==c.rootWidget){c.deselect();this._areaSelectInit(a.pageX,a.pageY);return}"NONE"===b.getAllowedChild(d.type)[0]?(c.select(d,m),p=d):(this._mouseDownInfo={widget:d,eventTargetWidget:k,pageX:a.pageX,pageY:a.pageY,dateValue:Date.now()},this._areaSelectInit(a.pageX,a.pageY))}if(p&&(d=c.getDocument(),g=d.defaultView&&d.defaultView.dojo)&&(g=g.style(p.domNode,"position"),
this._moverAbsolute="absolute"==g,g=p.getParent(),k=p.getHelper(),!(k&&k.disableDragging&&k.disableDragging(p)||g&&g.isLayout&&g.isLayout()))){this._moverWidget=p;this._moverWidgets=[p];this._moverLastEventTarget=null;c._chooseParent.setProposedParentWidget(null);g=c.getSelection();this._moverStartLocations=[];this._moverStartLocationsRel=[];for(m=0;m<g.length;m++){g[m]!=p&&this._moverWidgets.push(g[m]);h=null;h=(h=g[m].getHelper())&&h.getMarginBoxPageCoords?h.getMarginBoxPageCoords(g[m]):u.getMarginBoxPageCoordsCached(g[m].domNode);
this._moverStartLocations.push(h);if((q=g[m].domNode.offsetParent)&&"BODY"!=q.tagName)var w=u.getBorderBoxPageCoordsCached(q),r=n.getBorderExtents(q),q=h.l-(w.l+r.l),h=h.t-(w.t+r.t);else q=h.l,h=h.t;this._moverStartLocationsRel.push({l:q,t:h})}m=p.domNode;h=m.offsetWidth;g=m.offsetHeight;q=null;k&&k.getMarginBoxPageCoords?(q=k.getMarginBoxPageCoords(p),h=q.w,g=q.h):q=u.getMarginBoxPageCoordsCached(m);m=q.l;k=q.t;p=q.w;q=q.h;w=c.getScrollOffset();m+=w.x;k+=w.y;this._moverAbsolute?this._moverDragDiv=
dojo.create("div",{className:"selectToolDragDiv",style:"left:"+m+"px;top:"+k+"px;width:"+p+"px;height:"+q+"px"},c.rootNode):(p=h+10,g+=10,h=p-8,q=g-8,this._moverDragDiv=dojo.create("div",{className:"flowDragOuter",style:"left:"+(m-5)+"px;top:"+(k-5)+"px;width:"+p+"px;height:"+g+"px"},c.rootNode),dojo.create("div",{className:"flowDragInner",style:"width:"+h+"px;height:"+q+"px"},this._moverDragDiv));this._mover=new e(this._moverDragDiv,a,this);this._altKey=a.altKey;this._updateMoveCursor();(a=document.getElementById("maqetta_project_select"))&&
a.focus();d.defaultView.focus()}}}},onMouseUp:function(a){var b=this._context;if(!b.isFocusNode(a.target)){var c=1===a.which,d=Date.now();this._mouseDownInfo&&(10>=Math.abs(a.pageX-this._mouseDownInfo.pageX)&&10>=Math.abs(a.pageY-this._mouseDownInfo.pageY)&&750>=d-this._mouseDownInfo.dateValue&&(this._context.select(this._mouseDownInfo.eventTargetWidget?this._mouseDownInfo.eventTargetWidget:this._mouseDownInfo.widget),c=!1),this._mouseDownInfo=null);if(this._lastMouseUp&&10>=Math.abs(a.pageX-this._lastMouseUp.pageX)&&
10>=Math.abs(a.pageY-this._lastMouseUp.pageY)&&750>=d-this._lastMouseUp.dateValue)this.onDblClick(a);this._lastMouseUp={pageX:a.pageX,pageY:a.pageY,dateValue:d};b.getScrollOffset();this._areaSelect&&c&&this._areaSelectSelectWidgets(a.pageX,a.pageY);this._areaSelectClear()}},onDblClick:function(a){if(!this._context.isFocusNode(a.target)){for(var b="selectToolDragDiv"===a.target.getAttribute("class")?this._context.getSelection()[0]:this._getTarget()||f.getEnclosingWidget(a.target);b&&!b.getContext();)b=
f.getEnclosingWidget(b.domNode.parentNode);if(b){var c=this._context.getSelection(),d=dojo.isMac?a.ctrlKey:a.metaKey;0<=dojo.indexOf(c,b)?d&&2!==a.button?this._context.deselect(b):2!==a.button&&this._context.select(b,null,!0):this._context.select(b,d,!0)}}},onMouseMove:function(a){this._context.isFocusNode(a.target)||(this._setTarget(a.target,a),this._areaSelect&&(1===a.which?this._areaSelectUpdate(a.pageX,a.pageY):this._areaSelectClear()))},onMouseOver:function(a){try{dojo.hasClass(a.target,"editFeedback")||
dojo.hasClass(a.target,"selectToolDragDiv")||(this._onMouseOverEventTargetXPath=k.getXPath(a.target)),this._setTarget(a.target,a)}catch(b){}},onMouseOut:function(a){try{this._setTarget(a.relatedTarget,a)}catch(b){}},onExtentChange:function(c){var d=c.index,e=c.newBox,k=c.copy,g=c.oldBoxes,h=c.applyToWhichStates,m,p=this._context,y=p._chooseParent,z=p.getSelection(),J=[];if(!(z.length<=d)){var E=z[d],K=void 0;if("w"in e||"h"in e){var d=b.queryDescriptor(E.type,"resizable"),M,P;c=E.domNode;var R=c.ownerDocument.defaultView.getComputedStyle(c),
y=u.getMarginExtents(c,R),O=n.getBorderExtents(c,R);c=n.getPadExtents(c,R);"number"==typeof e.w&&(e.w-=y.w+O.w+c.w);"number"==typeof e.h&&(e.h-=y.h+O.h+c.h);switch(d){case "width":M=e.w;break;case "height":P=e.h;case "both":M=e.w,P=e.h}d=new B(E,M,P,h);K||(K=new a);K.add(d);d=dojo.style(E.domNode,"position");"l"in e&&"t"in e&&"absolute"==d&&(M=e.l,e=e.t,e=new r(E,M,e,null,null,h),K.add(e))}else if(c=E.getStyleNode(),"absolute"!=dojo.style(c,"position")){var Q=y.getProposedParentWidget();if(Q){K||
(K=new a);var W=null;c=p.reorderPreserveSiblingOrder(z);dojo.forEach(c,function(a){Q.refChild&&(null!==W?m=W+1:(m=Q.parent.getChildren().indexOf(Q.refChild),0<=m?Q.refAfter&&m++:m=null),W=m);if(k){var b,c=a.getData({identify:!1});c.context=p;dojo.withDoc(p.getDocument(),function(){b=f.createWidget(c)},this);b&&(K.add(new q(b,Q.parent,m)),x.prototype.checkAddToCurrentState(K,b),J.push(b))}else K.add(new w(a,Q.parent,m)),J.push(a)},this);p.select(null)}else console.error("SelectTool: ppw is null")}else{var X=
[],Y=[];dojo.forEach(z,function(a,b){X[b]=z[b].getParent();Y[b]=X[b].indexOf(a)});M=e.l;e=e.t;K||(K=new a);var U=(Q=y.getProposedParentWidget())?Q.parent:null;c=E.getParent();P=void 0;U&&U!=c&&(P=U);var Z=M-g[0].l,aa=e-g[0].t;k&&(c=p.reorderPreserveSiblingOrder(z),dojo.forEach(c,function(a){var b=a.getParent();if(b){for(var c=b.getChildren(),d=0;d<c.length&&c[d]!=a;d++);var e,k=a.getData({identify:!1});k.context=p;dojo.withDoc(p.getDocument(),function(){e=f.createWidget(k)},this);e&&(U?K.add(new q(e,
U,-1)):K.add(new q(e,b,d)),x.prototype.checkAddToCurrentState(K,e),J.push(e))}},this),newWidget=J[d]);var S=k?newWidget:E,T=new r(S,M,e,null,g[d],h);K.add(T);P&&(K.add(new w(S,U,"last")),K.add(new r(S,M,e,null,null,h)));dojo.forEach(z,dojo.hitch(this,function(a,b){S=k?J[b]:a;if(a!=E){var c=g[b].l+Z,d=g[b].t+aa;if("absolute"==a.getStyleNode().style.position){var e=new r(S,c,d,T,g[b],h,!0);K.add(e)}e=a.getParent();U&&U!=e&&(K.add(new w(S,U,"last")),K.add(new r(S,c,d,null,null,h,!0)))}}));k&&dojo.forEach(z,
dojo.hitch(this,function(a,b){K.add(new w(z[b],X[b],Y[b]));K.add(new r(z[b],g[b].l,g[b].t,null,g[b],h,!0))}))}K?(p.getCommandStack().execute(K),dojo.forEach(J,function(a,b){p.select(a,0<b)},this)):p.select(E)}},_updateMoveCursor:function(){var a=this._context.getDocument().body;this._moverDragDiv&&(this._altKey?dojo.addClass(a,"selectToolDragCopy"):dojo.addClass(a,"selectToolDragMove"))},onKeyDown:function(a){if(a)switch(dojo.stopEvent(a),a.keyCode){case dojo.keys.SHIFT:this._shiftKey=!0;c.clearSnapLines(this._context);
break;case dojo.keys.ALT:this._altKey=!0;this._updateMoveCursor();break;case dojo.keys.SPACE:this._spaceKey=!0;break;case 83:this._sKey=!0;break;case dojo.keys.TAB:this._moveFocus(a)&&dojo.stopEvent(a);break;case dojo.keys.RIGHT_ARROW:case dojo.keys.LEFT_ARROW:case dojo.keys.DOWN_ARROW:case dojo.keys.UP_ARROW:this._move(a)}},onKeyUp:function(a){if(a&&this._moverWidget)switch(dojo.stopEvent(a),a.keyCode){case dojo.keys.SHIFT:this._shiftKey=!1;break;case dojo.keys.ALT:this._altKey=!1;this._updateMoveCursor();
break;case dojo.keys.SPACE:this._spaceKey=!1;break;case 83:this._sKey=!1}},_move:function(b){var c=this._context.getSelection();if(0!==c.length){var d=0,e=0,f=b.shiftKey?10:1;switch(b.keyCode){case dojo.keys.RIGHT_ARROW:d=f;break;case dojo.keys.LEFT_ARROW:d=-f;break;case dojo.keys.DOWN_ARROW:e=f;break;case dojo.keys.UP_ARROW:e=-f}var k=new a;dojo.forEach(c,function(a){var b=null,b=(b=a.getHelper())&&b.getMarginBoxPageCoords?b.getMarginBoxPageCoords(a):u.getMarginBoxPageCoords(a.domNode);k.add(new r(a,
b.l+d,b.t+e))},this);k.isEmpty()||(this._context.getCommandStack().execute(k),this._updateTargetOverlays())}},_moveFocus:function(a){a=a.shiftKey?-1:1;for(var b=this._context.getSelection()[0],c=this._context.getTopWidgets(),b=b?dojo.indexOf(c,b)+a:0<a?0:c.length-1,d=c[b];d&&!d.getContext();)b+=a,d=c[b];d&&this._context.select(d);return d},onMove:function(a,b,c){this._mouseDownInfo=null;a=this._context;var d=a._chooseParent,e=a.getSelection(),f=e.indexOf(this._moverWidget);if(0>f)console.error("SelectTool.js onMove error. move widget is not selected");
else{this._selectionHideFocus();var k=!1,g=d.getProposedParentWidget();if(g&&g.parent&&g.parent.domNode){var n=g.parent.domNode;if("BODY"==g.parent.domNode.tagName)k=!0;else for(g=c.target;g&&"BODY"!=g.tagName;){if(g==n){k=!0;break}g=g.parentNode}}k&&c.target==this._moverLastEventTarget||d.setProposedParentWidget(null);this._moverLastEventTarget=c.target;this._moverBox=b;this._moverDragDiv.style.left=b.l+"px";this._moverDragDiv.style.top=b.t+"px";if(this._moverAbsolute)for(k=b.l-this._moverStartLocations[f].l,
b=b.t-this._moverStartLocations[f].t,f=Math.abs(k),n=Math.abs(b),this._shiftKey&&(f>=this.CONSTRAIN_MIN_DIST||n>=this.CONSTRAIN_MIN_DIST)&&(f>n?b=0:k=0),f=0;f<e.length;f++)n=e[f],g=this._moverStartLocationsRel[f].t,n.domNode.style.left=this._moverStartLocationsRel[f].l+k+"px",n.domNode.style.top=g+b+"px";k=this._moverWidget.type;e=this._moverWidget.getParent();(b=d.parentListDivGet())||(b=d.parentListDivCreate({widgetType:k,absolute:this._moverAbsolute,doCursor:!this._moverAbsolute,beforeAfter:null,
currentParent:e}));if(f=a.getParentIframe()){offsetTop=offsetLeft=0;for(offsetNode=f;offsetNode&&"BODY"!=offsetNode.tagName;)offsetLeft+=offsetNode.offsetLeft,offsetTop+=offsetNode.offsetTop,offsetNode=offsetNode.offsetParent;f=u.getScrollLeft(a.rootNode.parentNode);n=u.getScrollTop(a.rootNode.parentNode);b.style.left=offsetLeft+c.pageX-f+"px";b.style.top=offsetTop+c.pageY-n+"px"}b=h.getPreferences("davinci.ve.editorPrefs",m.getProject());b=!this._shiftKey&&b.snap&&this._moverAbsolute;f=a.getPreference("showPossibleParents");
f=!0;d=d.isSpaceKeyDown()||this._spaceKey;d=!f&&d||f&&!d;k={type:k};f={x:c.pageX,y:c.pageY};n=null;n=(n=this._moverWidget.getHelper())&&n.getMarginBoxPageCoords?n.getMarginBoxPageCoords(this._moverWidget):u.getMarginBoxPageCoords(this._moverWidget.domNode);a.dragMoveUpdate({widgets:this._moverWidgets,data:k,eventTarget:c.target,position:f,absolute:this._moverAbsolute,currentParent:e,rect:n,doSnapLinesX:b,doSnapLinesY:b,doFindParentsXY:d,doCursor:!this._moverAbsolute})}},onFirstMove:function(a){},
onMoveStart:function(a){},onMoveStop:function(a){a=this._context;var b=this._context._chooseParent;this._moverWidget&&this._moverWidget._srcElement&&k.getXPath(this._moverWidget._srcElement,d);var c=!0,e,f;this._moverBox&&this._moverWidget&&this._moverWidget.domNode?(f={l:this._moverBox.l,t:this._moverBox.t},e=a.getSelection().indexOf(this._moverWidget),0>e&&(c=!1)):c=!1;if(c){c=void 0;if(this._sKey)for(var g=z.getStatesListCurrent(this._moverWidget.domNode),h=0;h<g.length;h++){if(g[h]){c=g[h];break}}else c=
z.propertyDefinedForAnyCurrentState(this._moverWidget.domNode,["left","top","right","bottom"]);var m=this._getPageLeftTop(this._moverWidget.domNode.offsetParent),g=a.getScrollOffset(),h=f.t-m.t-this._moverStartLocations[e].t,m=Math.abs(f.l-m.l-this._moverStartLocations[e].l),h=Math.abs(h);this._shiftKey&&(m>=this.CONSTRAIN_MIN_DIST||h>=this.CONSTRAIN_MIN_DIST)&&(m>h?f.t=this._moverStartLocations[e].t:f.l=this._moverStartLocations[e].l);f.t-=g.y;f.l-=g.x;this.onExtentChange({index:e,newBox:f,oldBoxes:this._moverStartLocations,
copy:this._altKey,applyToWhichStates:c})}this._moverDragDiv&&((e=this._moverDragDiv.parentNode)&&e.removeChild(this._moverDragDiv),this._moverDragDiv=null);this._mover=this._moverBox=this._moverWidget=this._moverWidgets=this._moverLastEventTarget=null;this._updateMoveCursor();a.dragMoveCleanup();b.parentListDivDelete();this._selectionShowFocus();b=k.toCssPath(this._onMouseOverEventTargetXPath);a=a.getDocument();(a=b?a.querySelector(b):null)&&this._setTarget(a)},_getPageLeftTop:function(a){if(a){var b=
a.offsetLeft,c=a.offsetTop;for(a=a.offsetParent;a&&"BODY"!=a.tagName;)b+=a.offsetLeft,c+=a.offsetTop,a=a.offsetParent;return{l:b,t:c}}return{l:0,t:0}},_areaSelectInit:function(a,b){this._areaSelect={x:a,y:b,attached:!1};this._areaSelectDiv=dojo.create("div",{className:"areaSelectDiv",style:"display:none"})},_areaSelectUpdate:function(a,b){if(this._areaSelect&&this._areaSelectDiv){var c=this._getBounds(this._areaSelect.x,this._areaSelect.y,a,b),d=this._areaSelectDiv.style;d.display="block";d.left=
c.l+"px";d.top=c.t+"px";d.width=c.w+"px";d.height=c.h+"px";this._areaSelect.attached||(this._context.rootNode.appendChild(this._areaSelectDiv),this._areaSelect.attached=!0)}},_areaSelectClear:function(){this._areaSelect=null;if(this._areaSelectDiv){var a=this._areaSelectDiv.parentNode;a&&a.removeChild(this._areaSelectDiv);this._areaSelectDiv=null}},_areaSelectSelectWidgets:function(a,b){if(this._areaSelect){var c=this._getBounds(this._areaSelect.x,this._areaSelect.y,a,b),d=c.l,e=c.t,f=c.w,c=c.h,k=
this._context;k.deselect();for(var k=k.getTopWidgets(),g=0;g<k.length;g++)this._areaSelectRecursive(k[g],d,e,f,c)}},_areaSelectRecursive:function(a,b,c,d,e){if(a&&a.domNode){var f=u.getBorderBoxPageCoordsCached(a.domNode);if(f.l>=b&&f.t>=c&&f.l+f.w<=b+d&&f.t+f.h<=c+e)this._context.select(a,!0);else for(a=a.getChildren(),f=0;f<a.length;f++)this._areaSelectRecursive(a[f],b,c,d,e)}},_getBounds:function(a,b,c,d){var e={};a<=c?(e.l=a,e.w=c-a):(e.l=c,e.w=a-c);b<=d?(e.t=b,e.h=d-b):(e.t=d,e.h=b-d);return e},
_checkFocusXY:function(a,b){for(var c=this._context,d=c.getSelection(),e=0;e<d.length;e++){var f=c._focuses[e].getBounds();if(a>=f.l&&a<=f.l+f.w&&b>=f.t&&b<=f.t+f.h)return d[e]}return null},_selectionHideFocus:function(){for(var a=this._context,b=a.getSelection(),c=0;c<b.length;c++)a._focuses[c].hide()},_selectionShowFocus:function(){for(var a=this._context,b=a.getSelection(),c=0;c<b.length;c++)a._focuses[c].show(b[c],{})}})})},"dojo/dnd/Mover":function(){define("../_base/array ../_base/declare ../_base/lang ../sniff ../_base/window ../dom ../dom-geometry ../dom-style ../Evented ../on ../touch ./common ./autoscroll".split(" "),
function(p,n,m,h,g,f,b,e,k,d,c,a,q){return n("dojo.dnd.Mover",[k],{constructor:function(a,b,e){function k(a){a.preventDefault();a.stopPropagation()}this.node=f.byId(a);this.marginBox={l:b.pageX,t:b.pageY};this.mouseButton=b.button;b=this.host=e;a=a.ownerDocument;this.events=[d(a,c.move,m.hitch(this,"onFirstMove")),d(a,c.move,m.hitch(this,"onMouseMove")),d(a,c.release,m.hitch(this,"onMouseUp")),d(a,"dragstart",k),d(a.body,"selectstart",k)];q.autoScrollStart(a);if(b&&b.onMoveStart)b.onMoveStart(this)},
onMouseMove:function(a){q.autoScroll(a);var b=this.marginBox;this.host.onMove(this,{l:b.l+a.pageX,t:b.t+a.pageY},a);a.preventDefault();a.stopPropagation()},onMouseUp:function(a){(h("webkit")&&h("mac")&&2==this.mouseButton?0==a.button:this.mouseButton==a.button)&&this.destroy();a.preventDefault();a.stopPropagation()},onFirstMove:function(a){var c=this.node.style,d,f=this.host;switch(c.position){case "relative":case "absolute":d=Math.round(parseFloat(c.left))||0;c=Math.round(parseFloat(c.top))||0;break;
default:c.position="absolute";c=b.getMarginBox(this.node);d=g.doc.body;var k=e.getComputedStyle(d),h=b.getMarginBox(d,k),k=b.getContentBox(d,k);d=c.l-(k.l-h.l);c=c.t-(k.t-h.t)}this.marginBox.l=d-this.marginBox.l;this.marginBox.t=c-this.marginBox.t;if(f&&f.onFirstMove)f.onFirstMove(this,a);this.events.shift().remove()},destroy:function(){p.forEach(this.events,function(a){a.remove()});var a=this.host;if(a&&a.onMoveStop)a.onMoveStop(this);this.events=this.node=this.host=null}})})},"dojo/touch":function(){define("./_base/kernel ./aspect ./dom ./dom-class ./_base/lang ./on ./has ./mouse ./domReady ./_base/window".split(" "),
function(p,n,m,h,g,f,b,e,k,d){function c(a,b,c){return B&&c?function(a,b){return f(a,c,b)}:w?function(c,d){var e=f(c,b,d),k=f(c,a,function(a){(!D||(new Date).getTime()>D+1E3)&&d.call(this,a)});return{remove:function(){e.remove();k.remove()}}}:function(b,c){return f(b,a,c)}}function a(a){do if(a.dojoClick)return a.dojoClick;while(a=a.parentNode)}function q(b,c,e){if(x=!b.target.disabled&&a(b.target))z=b.target,u=b.touches?b.touches[0].pageX:b.clientX,v=b.touches?b.touches[0].pageY:b.clientY,A=("object"==
typeof x?x.x:"number"==typeof x?x:0)||4,C=("object"==typeof x?x.y:"number"==typeof x?x:0)||4,y||(b=function(a){d.doc.addEventListener(a,function(b){b._dojo_click||!((new Date).getTime()<=G+1E3)||"INPUT"==b.target.tagName&&h.contains(b.target,"dijitOffScreen")||(b.stopPropagation(),b.stopImmediatePropagation&&b.stopImmediatePropagation(),"click"!=a||"INPUT"==b.target.tagName&&"radio"!=b.target.type&&"checkbox"!=b.target.type||"TEXTAREA"==b.target.tagName||"AUDIO"==b.target.tagName||"VIDEO"==b.target.tagName||
b.preventDefault())},!0)},y=!0,d.doc.addEventListener(c,function(a){x=x&&a.target==z&&Math.abs((a.touches?a.touches[0].pageX:a.clientX)-u)<=A&&Math.abs((a.touches?a.touches[0].pageY:a.clientY)-v)<=C},!0),d.doc.addEventListener(e,function(a){if(x){G=(new Date).getTime();var b=a.target;"LABEL"===b.tagName&&(b=m.byId(b.getAttribute("for"))||b);setTimeout(function(){f.emit(b,"click",{bubbles:!0,cancelable:!0,_dojo_click:!0})})}},!0),b("click"),b("mousedown"),b("mouseup"))}var w=b("touch"),r=5>b("ios"),
B=navigator.msPointerEnabled,y,x,z,u,v,A,C,G,D,I;w&&(B?k(function(){d.doc.addEventListener("MSPointerDown",function(a){q(a,"MSPointerMove","MSPointerUp")},!0)}):k(function(){function a(c){var d=g.delegate(c,{bubbles:!0});6<=b("ios")&&(d.touches=c.touches,d.altKey=c.altKey,d.changedTouches=c.changedTouches,d.ctrlKey=c.ctrlKey,d.metaKey=c.metaKey,d.shiftKey=c.shiftKey,d.targetTouches=c.targetTouches);return d}I=d.body();d.doc.addEventListener("touchstart",function(a){D=(new Date).getTime();var b=I;
I=a.target;f.emit(b,"dojotouchout",{relatedTarget:I,bubbles:!0});f.emit(I,"dojotouchover",{relatedTarget:b,bubbles:!0});q(a,"touchmove","touchend")},!0);f(d.doc,"touchmove",function(b){D=(new Date).getTime();var c=d.doc.elementFromPoint(b.pageX-(r?0:d.global.pageXOffset),b.pageY-(r?0:d.global.pageYOffset));c&&(I!==c&&(f.emit(I,"dojotouchout",{relatedTarget:c,bubbles:!0}),f.emit(c,"dojotouchover",{relatedTarget:I,bubbles:!0}),I=c),f.emit(c,"dojotouchmove",a(b))||b.preventDefault())});f(d.doc,"touchend",
function(b){D=(new Date).getTime();var c=d.doc.elementFromPoint(b.pageX-(r?0:d.global.pageXOffset),b.pageY-(r?0:d.global.pageYOffset))||d.body();f.emit(c,"dojotouchend",a(b))})}));n={press:c("mousedown","touchstart","MSPointerDown"),move:c("mousemove","dojotouchmove","MSPointerMove"),release:c("mouseup","dojotouchend","MSPointerUp"),cancel:c(e.leave,"touchcancel",w?"MSPointerCancel":null),over:c("mouseover","dojotouchover","MSPointerOver"),out:c("mouseout","dojotouchout","MSPointerOut"),enter:e._eventHandler(c("mouseover",
"dojotouchover","MSPointerOver")),leave:e._eventHandler(c("mouseout","dojotouchout","MSPointerOut"))};return p.touch=n})},"dojo/dnd/common":function(){define(["../sniff","../_base/kernel","../_base/lang","../dom"],function(p,n,m,h){var g=m.getObject("dojo.dnd",!0);g.getCopyKeyState=function(f){return f[p("mac")?"metaKey":"ctrlKey"]};g._uniqueId=0;g.getUniqueId=function(){var f;do f=n._scopeName+"Unique"+ ++g._uniqueId;while(h.byId(f));return f};g._empty={};g.isFormElement=function(f){f=f.target;3==
f.nodeType&&(f=f.parentNode);return 0<=" a button textarea input select option ".indexOf(" "+f.tagName.toLowerCase()+" ")};return g})},"dojo/dnd/autoscroll":function(){define("../_base/lang ../sniff ../_base/window ../dom-geometry ../dom-style ../window".split(" "),function(p,n,m,h,g,f){var b={};p.setObject("dojo.dnd.autoscroll",b);b.getViewport=f.getBox;b.V_TRIGGER_AUTOSCROLL=32;b.H_TRIGGER_AUTOSCROLL=32;b.V_AUTOSCROLL_VALUE=16;b.H_AUTOSCROLL_VALUE=16;var e,k=m.doc,d=Infinity,c=Infinity;b.autoScrollStart=
function(a){k=a;e=f.getBox(k);a=m.body(k).parentNode;d=Math.max(a.scrollHeight-e.h,0);c=Math.max(a.scrollWidth-e.w,0)};b.autoScroll=function(a){var g=e||f.getBox(k),h=m.body(k).parentNode,n=0,p=0;a.clientX<b.H_TRIGGER_AUTOSCROLL?n=-b.H_AUTOSCROLL_VALUE:a.clientX>g.w-b.H_TRIGGER_AUTOSCROLL&&(n=Math.min(b.H_AUTOSCROLL_VALUE,c-h.scrollLeft));a.clientY<b.V_TRIGGER_AUTOSCROLL?p=-b.V_AUTOSCROLL_VALUE:a.clientY>g.h-b.V_TRIGGER_AUTOSCROLL&&(p=Math.min(b.V_AUTOSCROLL_VALUE,d-h.scrollTop));window.scrollBy(n,
p)};b._validNodes={div:1,p:1,td:1};b._validOverflow={auto:1,scroll:1};b.autoScrollNodes=function(a){for(var c,d,e,f,k,p=0,z=0,u=a.target;u;){if(1==u.nodeType&&u.tagName.toLowerCase()in b._validNodes){e=g.getComputedStyle(u);k=e.overflowX.toLowerCase()in b._validOverflow;f=e.overflowY.toLowerCase()in b._validOverflow;if(k||f)c=h.getContentBox(u,e),d=h.position(u,!0);if(k){e=Math.min(b.H_TRIGGER_AUTOSCROLL,c.w/2);k=a.pageX-d.x;if(n("webkit")||n("opera"))k+=m.body().scrollLeft;p=0;0<k&&k<c.w&&(k<e?p=
-e:k>c.w-e&&(p=e),u.scrollLeft+=p)}if(f){f=Math.min(b.V_TRIGGER_AUTOSCROLL,c.h/2);e=a.pageY-d.y;if(n("webkit")||n("opera"))e+=m.body().scrollTop;z=0;0<e&&e<c.h&&(e<f?z=-f:e>c.h-f&&(z=f),u.scrollTop+=z)}if(p||z)return}try{u=u.parentNode}catch(v){u=null}}b.autoScroll(a)};return b})},"davinci/ve/Snap":function(){define(["davinci/ve/utils/GeomUtils"],function(p){dojo.getObject("davinci.ve.Snap",!0);return davinci.ve.Snap={updateSnapLinesBeforeTraversal:function(n,m){n._snapX=null;n._snapY=null;if(n._lastSnapBox&&
n._lastSnapBox.l==m.l&&n._lastSnapBox.t==m.t&&n._lastSnapBox.w==m.w&&n._lastSnapBox.h==m.h)return!1;snapBox={l:m.l,t:m.t,w:m.w,h:m.h,c:m.l+m.w/2,r:m.l+m.w,m:m.t+m.h/2,b:m.t+m.h};n._lastSnapBox=snapBox;return!0},findSnapOpportunities:function(n,m,h,g,f){function b(b,c,d,e){e<a&&(n._snapX={type:b,typeRefObj:b,typeCurrObj:c,x:d,widget:m,delta:e},a=e,n._snapXLast=n._snapX)}function e(a,b,c,d){d<q&&(n._snapY={type:a,typeRefObj:a,typeCurrObj:b,y:c,widget:m,delta:d},q=d,n._snapYLast=n._snapY)}h=n._lastSnapBox;
var k=m.domNode;if("BODY"!=k.tagName){var d=null,c=m.getHelper(),d=c&&c.getMarginBoxPageCoords?c.getMarginBoxPageCoords(m):p.getMarginBoxPageCoordsCached(k);n.getScrollOffset();d.x=d.l;d.y=d.t;var a=n._snapX?n._snapX.delta:6,q=n._snapY?n._snapY.delta:6,k={snapRect:{l:d.x,c:d.x+d.w/2,r:d.x+d.w,t:d.y,m:d.y+d.h/2,b:d.y+d.h}};c&&c.getSnapInfo&&(k=c.getSnapInfo(m,k));var c=k.snapRect,w;if(c){if(g){g=n._snapXLast&&n._snapXLast.widget===m?Infinity:75;d=Math.abs(c.t-h.t);w=Math.abs(c.t-h.b);var r=Math.abs(c.b-
h.t),B=Math.abs(c.b-h.b);if(d<=g||w<=g||r<=g||B<=g)g=Math.abs(c.l-h.l),d=Math.abs(c.c-h.c),w=Math.abs(c.r-h.r),b("left","left",c.l,g),b("center","center",c.c,d),b("right","right",c.r,w),b("left","center",c.c,Math.abs(c.c-h.l)),b("left","right",c.r,Math.abs(c.r-h.l)),b("right","left",c.l,Math.abs(c.l-h.r)),b("right","center",c.c,Math.abs(c.c-h.r)),b("center","left",c.l,Math.abs(c.l-h.c)),b("center","right",c.r,Math.abs(c.r-h.c))}f&&(f=n._snapYLast&&n._snapYLast.widget===m?Infinity:75,g=Math.abs(c.l-
h.l),d=Math.abs(c.l-h.r),w=Math.abs(c.r-h.l),r=Math.abs(c.r-h.r),g<=f||d<=f||w<=f||r<=f)&&(g=Math.abs(c.t-h.t),d=Math.abs(c.m-h.m),w=Math.abs(c.b-h.b),e("top","top",c.t,g),e("middle","middle",c.m,d),e("bottom","bottom",c.b,w),e("top","middle",c.m,Math.abs(c.m-h.t)),e("top","bottom",c.b,Math.abs(c.b-h.t)),e("bottom","top",c.t,Math.abs(c.t-h.b)),e("bottom","middle",c.m,Math.abs(c.m-h.b)),e("middle","top",c.t,Math.abs(c.t-h.m)),e("middle","bottom",c.b,Math.abs(c.b-h.m)))}if(k=k.snapPoints)for(c=0;c<
k.length;c++)f=k[c],g=Math.abs(f.x-h.l),d=Math.abs(f.x-h.c),w=Math.abs(f.x-h.r),b("point",f.x,g),b("point",f.x,d),b("point",f.x,w),g=Math.abs(f.y-h.t),d=Math.abs(f.y-h.m),w=Math.abs(f.y-h.b),e("point",f.y,g),e("point",f.y,d),e("point",f.y,w)}},updateSnapLinesAfterTraversal:function(n){function m(b,d,c,a){c.style.display="block";a.style.display="block";g=(a=d.getHelper())&&a.getMarginBoxPageCoords?a.getMarginBoxPageCoords(d):p.getMarginBoxPageCoordsCached(d.domNode);b.getScrollOffset();g.x=g.l;g.y=
g.t;g.r=g.x+g.w;g.b=g.y+g.h;g.c=g.x+g.w/2;g.m=g.y+g.h/2;c.style.left=g.x+"px";c.style.top=g.y+"px";c.style.width=g.w+"px";c.style.height=g.h+"px";c.style.backgroundColor="rgba(255,0,255,.05)"}var h=n.getContainerNode();n._snapLinesDiv||(n._snapLinesDiv=dojo.create("div",{"class":"snaplines",style:"position:absolute;top:0px;left:0px;z-index:1000001;pointer-events:none;"},h),n._snapLinesDivWidgetX=dojo.create("div",{"class":"snaplinesWidgetX",style:"position:absolute;pointer-events:none;"},n._snapLinesDiv),
n._snapLinesDivAlignX=dojo.create("div",{"class":"snaplinesAlignX",style:"position:absolute;pointer-events:none;"},n._snapLinesDiv),n._snapLinesDivWidgetY=dojo.create("div",{"class":"snaplinesWidgetY",style:"position:absolute;pointer-events:none;"},n._snapLinesDiv),n._snapLinesDivAlignY=dojo.create("div",{"class":"snaplinesAlignY",style:"position:absolute;pointer-events:none;"},n._snapLinesDiv));n._snapLinesDiv.style.display="block";var g,h=n._snapLinesDivAlignX.style,f=n._snapLinesDivWidgetX.style;
if(n._snapX){f=n._snapX;m(n,f.widget,n._snapLinesDivWidgetX,n._snapLinesDivAlignX);var b,e;g.y<snapBox.t?(b=g.y,e=snapBox.t-g.y):(b=snapBox.t,e=g.y-snapBox.t);h.left="point"==f.typeCurrObj?n._snapX.x+"px":"left"==f.typeCurrObj?g.x+"px":"center"==f.typeCurrObj?g.c+"px":g.r+"px";h.top=b+"px";h.width="1px";h.height=e+"px";h.backgroundColor="rgba(255,0,255,.75)"}else h.display="none",f.display="none";h=n._snapLinesDivAlignY.style;f=n._snapLinesDivWidgetY.style;n._snapY?(f=n._snapY,m(n,f.widget,n._snapLinesDivWidgetY,
n._snapLinesDivAlignY),g.x<snapBox.l?(n=g.x,b=snapBox.l-g.x):(n=snapBox.l,b=g.x-snapBox.l),h.top="point"==f.type?f.y+"px":"top"==f.typeCurrObj?g.y+"px":"middle"==f.typeCurrObj?g.m+"px":g.b+"px",h.left=n+"px",h.height="1px",h.width=b+"px",h.backgroundColor="rgba(255,0,255,.75)"):(h.display="none",f.display="none")},clearSnapLines:function(n){n._snapLinesDiv&&(n._snapLinesDiv.style.display="none");n._snapX=n._snapY=null}}})},"davinci/ve/commands/ReparentCommand":function(){define(["dojo/_base/declare",
"davinci/ve/commands/_hierarchyCommand","../widget","../States","davinci/ve/commands/ModifyCommand"],function(p,n,m,h,g){return p("davinci.ve.commands.ReparentCommand",[n],{name:"reparent",constructor:function(f,b,e){this._id=f?f.id:void 0;this._newParentId=b?b.id:"myapp";this._newIndex=e},execute:function(){if(this._id&&this._newParentId){var f=m.byId(this._id);if(f){var b=f.getParent();b||(b=dojo.byId("myapp"));var e=m.byId(this._newParentId);e||(e=dojo.byId("myapp"));var k=this._isRefreshOnDescendantChange(f);
this._oldParentId||(this._oldParentId=b.id,this._oldIndex=dojo.indexOf(b.getChildren(),f),this._newIndex&&this._newIndex.domNode&&(this._newIndex=e.indexOf(this._newIndex)));b.removeChild(f);var d=e.getContext();e.addChild(f,e==b&&this._oldIndex<this._newIndex?this._newIndex-1:this._newIndex);if(d){var c=f.getHelper();c&&c.reparent&&c.reparent(f);f.startup();f.renderWidget();d.widgetChanged(d.WIDGET_REPARENTED,f,[b,e]);b=this._isRefreshOnDescendantChange(f);k&&(k=new g(k,null,null,d),k.execute());
b&&(k=new g(b,null,null,d),k.execute())}h.resetState(f.domNode)}}},undo:function(){if(this._id&&this._oldParentId&&this._newParentId){var f=m.byId(this._id);if(f){var b=m.byId(this._oldParentId);if(b){var e=m.byId(this._newParentId);if(e){var k=this._isRefreshOnDescendantChange(f),d=b.getContext();e.removeChild(f);b.addChild(f,this._oldIndex);if(d){var c=f.getHelper();c&&c.reparent&&c.reparent(f);f.startup();f.renderWidget();d.widgetChanged(d.WIDGET_REPARENTED,f,[b,e]);b=this._isRefreshOnDescendantChange(f);
k&&(k=new g(k,null,null,d),k.execute());b&&(k=new g(b,null,null,d),k.execute())}h.resetState(f.domNode)}}}}}})})},"davinci/ve/Focus":function(){define("require dojo/_base/declare dojo/query dijit/_WidgetBase dojo/dnd/Mover ../Runtime ./metadata ./States ./utils/GeomUtils".split(" "),function(p,n,m,h,g,f,b,e,k){return n(h,{nobSize:11,frameSize:6,postCreate:function(){dojo.addClass(this.domNode,"maqFocus");dojo.style(this.domNode,{position:"absolute",display:"none"});this._stdChrome=dojo.create("div",
{"class":"editFocusStdChrome"},this.domNode);this._frames=[];for(var b=0;4>b;b++){var c=dojo.create("div",{"class":"editFocusFrame"},this._stdChrome);this._frames.push(c);this.connect(c,"onmousedown","onMouseDown")}dojo.addClass(this._frames[0],"editFocusFrameLEFT");dojo.addClass(this._frames[1],"editFocusFrameRIGHT");dojo.addClass(this._frames[2],"editFocusFrameTOP");dojo.addClass(this._frames[3],"editFocusFrameBOTTOM");this._nobs=[];for(b=0;8>b;b++)c=dojo.create("div",{"class":"editFocusNob"},this._stdChrome),
this._nobs.push(c),this.connect(c,"onmousedown","onMouseDown");this._frameIndex=this._nobIndex=-1;this._custom=dojo.create("div",{"class":"editFocusCustom"},this.domNode)},resize:function(b,c){c&&(this._selectedWidget=c);this._moverCurrent=dojo.mixin({},b);this._moverCurrentConstrained=dojo.mixin({},this._moverCurrent);this._updateFocusChrome(this._moverCurrent,!0);this._contexDiv&&(this._contexDiv.style.left=b.w+10+"px",this._updateSubwidgetList());this._box=b},getBounds:function(){return this._moverCurrent},
show:function(d,c){var a=c&&c.inline;if(d){this._custom.innerHTML="";var e=b.queryDescriptor(d.type,"showStandardSelectionChrome");this._stdChrome.style.display=!1===e?"none":"block";this.domNode.style.display="block";this._selectedWidget=d;var e=d.getHelper(),f=!0;if(e&&e.onShowSelection)e.onShowSelection({widget:d,customDiv:this._custom});a&&(this.showInline(d),f=!1);f&&delete this._inline}},showInline:function(d){this._selectedWidget=d;var c=this._context,a=this;b.getSmartInput(d.type).then(function(b){if(b)if(a._inline=
b,b.useParent){if(b=d.getParent())c.deselect(d),c.select(b),c.getFocus(b).showInline(b)}else b.show&&b.show(d.id)})},inlineEditActive:function(){return this._inline&&this._inline.inlineEditActive?this._inline.inlineEditActive():!1},hide:function(b){var c=(b=this._selectedWidget)?b.getHelper():void 0;if(c&&c.onHideSelection)c.onHideSelection({widget:b,customDiv:this._custom});this.domNode.style.display="none";this._displayedWidget=this._selectedWidget=null;this._inline&&(this._inline.hide(),delete this._inline)},
allow:function(b){if(b){this._op=b;var c={},a=this._selectedWidget.getHelper();a&&a.resizeAllowWhich?(a.resizeAllowWhich(this._selectedWidget,c),this._resizeLeft=c.resizeLeft,this._resizeRight=c.resizeRight,this._resizeTop=c.resizeTop,this._resizeBottom=c.resizeBottom):(this._resizeLeft=this._resizeRight=b.resizeWidth,this._resizeTop=this._resizeBottom=b.resizeHeight);c.left=!this._resizeLeft||this._resizeTop||this._resizeBottom?"none":"block";c.right=!this._resizeRight||this._resizeTop||this._resizeBottom?
"none":"block";c.top=!this._resizeTop||this._resizeLeft||this._resizeRight?"none":"block";c.bottom=!this._resizeBottom||this._resizeLeft||this._resizeRight?"none":"block";c.left_top=this._resizeLeft&&this._resizeTop?"block":"none";c.left_bottom=this._resizeLeft&&this._resizeBottom?"block":"none";c.right_top=this._resizeRight&&this._resizeTop?"block":"none";c.right_bottom=this._resizeRight&&this._resizeBottom?"block":"none";this._nobs[0].style.display=c.left;this._nobs[1].style.display=c.right;this._nobs[2].style.display=
c.top;this._nobs[3].style.display=c.bottom;this._nobs[4].style.display=c.left_top;this._nobs[5].style.display=c.left_bottom;this._nobs[6].style.display=c.right_top;this._nobs[7].style.display=c.right_bottom;this._nobs[0].style.cursor=this._frames[0].style.cursor=this._resizeLeft?"w-resize":"auto";this._nobs[1].style.cursor=this._frames[1].style.cursor=this._resizeRight?"e-resize":"auto";this._nobs[2].style.cursor=this._frames[2].style.cursor=this._resizeTop?"n-resize":"auto";this._nobs[3].style.cursor=
this._frames[3].style.cursor=this._resizeBottom?"s-resize":"auto";this._nobs[4].style.cursor="none"!=c.left_top?"nw-resize":"auto";this._nobs[5].style.cursor="none"!=c.left_bottom?"sw-resize":"auto";this._nobs[6].style.cursor="none"!=c.right_top?"ne-resize":"auto";this._nobs[7].style.cursor="none"!=c.right_bottom?"se-resize":"auto"}},_updateFocusChrome:function(b,c){var a,e,f,g,h=this.nobSize+1,m=this.frameSize+1,n=dojo.byId("focusContainer");if(n){var n=k.getBorderBoxPageCoords(n),p=this._context.getParentIframe(),
u=k.getBorderBoxPageCoords(p);b.l+=u.l;b.t+=u.t;if(p)if(p.contentDocument)if(p.contentDocument.body){p=p.contentDocument.body;b.l-=k.getScrollLeft(p);b.t-=k.getScrollTop(p);this.domNode.style.left=b.l-n.l+"px";this.domNode.style.top=b.t-n.t+"px";var p=n=-11,u=b.w,v=b.h,A=b.w,C=b.h,G=-6,D=-6,I=b.w,H=b.h,F=b.w+4+4,N=b.h+4+4,L=this.domNode&&this.domNode.ownerDocument,J=L&&L.body;this._frames[0].style.left=this._frames[2].style.left=this._frames[3].style.left=G+"px";this._frames[0].style.top=this._frames[2].style.top=
this._frames[1].style.top=D+"px";this._frames[0].style.height=N+"px";this._frames[1].style.height=N+"px";this._frames[1].style.left=I+"px";this._frames[2].style.width=F+"px";this._frames[3].style.top=H+"px";this._frames[3].style.width=F+"px";m=Math.round(A/2-this.nobSize/2);h=Math.round(C/2-this.nobSize/2);this._nobs[0].style.left=this._nobs[4].style.left=this._nobs[5].style.left=n+"px";this._nobs[2].style.top=this._nobs[4].style.top=this._nobs[6].style.top=p+"px";this._nobs[0].style.top=h+"px";this._nobs[1].style.left=
u+"px";this._nobs[1].style.top=h+"px";this._nobs[2].style.left=m+"px";this._nobs[3].style.left=m+"px";this._nobs[3].style.top=v+"px";this._nobs[5].style.top=v+"px";this._nobs[6].style.left=u+"px";this._nobs[7].style.left=u+"px";this._nobs[7].style.top=v+"px"}else console.error("have no body");else console.error("have no contentDocument");else console.error("have no parent iframe")}},onMouseDown:function(b){this._removeKeyHandlers();if(this._selectedWidget&&this._selectedWidget.domNode&&2!==b.button&&
!b.ctrlKey&&"davinci.ve.tools.SelectTool"==this._context._activeTool.declaredClass){this._shiftKey=b.shiftKey;this._sKey=!1;this._nobIndex=dojo.indexOf(this._nobs,b.target);this._frameIndex=dojo.indexOf(this._frames,b.target);var c=b.pageX-400,a=b.pageY-400,e=null,f=this._selectedWidget.getHelper(),e=f&&f.getMarginBoxPageCoords?f.getMarginBoxPageCoords(this._selectedWidget):k.getMarginBoxPageCoords(this._selectedWidget.domNode),f=k.getBorderBoxPageCoords(this._context.getParentIframe());this._moverStart=
{moverLeft:c,moverTop:a,l:e.l+f.l,t:e.t+f.t,w:e.w,h:e.h};e=document.body;this._moverCurrent=dojo.mixin({},this._moverStart);this._moverDragDiv=dojo.create("div",{className:"focusDragDiv",style:"position:absolute;left:"+c+"px;top:"+a+"px;width:800px;height:800px"},e);this._mover=new g(this._moverDragDiv,b,this);dojo.stopEvent(b);this._mouseDownInfo={widget:this._selectedWidget,pageX:b.pageX+f.l,pageY:b.pageY+f.t,dateValue:Date.now()};this._moverMouseDownEvent=b;this._moverMouseUpEvent=null;this._moverMouseUpHandler=
dojo.connect(this._moverDragDiv,"onmouseup",dojo.hitch(this,function(a){this.onMouseUp(a)}));b=this._context.getDocument();(c=document.getElementById("maqetta_project_select"))&&c.focus();b.defaultView.focus();this._keyDownHandler=dojo.connect(b,"onkeydown",dojo.hitch(this,function(a){this.onKeyDown(a)}));this._keyUpHandler=dojo.connect(b,"onkeyup",dojo.hitch(this,function(a){this.onKeyUp(a)}))}},onMove:function(b,c,a){this._mouseDownInfo=null;this._moverDragDiv&&(this._moverDragDiv.style.left=c.l+
"px",this._moverDragDiv.style.top=c.t+"px");if(!(0===this._frameIndex&&!this._resizeLeft||1===this._frameIndex&&!this._resizeRight||2===this._frameIndex&&!this._resizeTop||3===this._frameIndex&&!this._resizeBottom)){b=this._moverStart;a=c.l-b.moverLeft;c=c.t-b.moverTop;if(0===this._frameIndex||4===this._nobIndex||0===this._nobIndex||5===this._nobIndex)this._moverCurrent.l=b.l+a,this._moverCurrent.w=b.w-a;else if(1===this._frameIndex||6===this._nobIndex||1===this._nobIndex||7===this._nobIndex)this._moverCurrent.w=
b.w+a;if(2===this._frameIndex||4===this._nobIndex||2===this._nobIndex||6===this._nobIndex)this._moverCurrent.t=b.t+c,this._moverCurrent.h=b.h-c;else if(3===this._frameIndex||5===this._nobIndex||3===this._nobIndex||7===this._nobIndex)this._moverCurrent.h=b.h+c;c=this._moverCurrent.w;b=this._moverCurrent.h;a=!1;if(this._selectedWidget&&"IMG"===this._selectedWidget.domNode.nodeName){var e=this._selectedWidget.domNode,f=e.naturalWidth,e=e.naturalHeight;"number"==typeof e&&0<e&&"number"==typeof f&&0<f&&
(a=f/e,c<a*b?c=b*a:b=c/a,a=!0)}a||(0===this._frameIndex||0===this._nobIndex||1===this._frameIndex||1===this._nobIndex?b=c:2===this._frameIndex||2===this._nobIndex||3===this._frameIndex||3===this._nobIndex?c=b:c>b?b=c:c=b);this._moverCurrentConstrained={l:this._moverCurrent.l,t:this._moverCurrent.t,w:c,h:b};if(0===this._frameIndex||0===this._nobIndex||1===this._frameIndex||1===this._nobIndex)this._moverCurrentConstrained.t-=(this._moverCurrentConstrained.h-this._moverCurrent.h)/2;if(2===this._frameIndex||
2===this._nobIndex||3===this._frameIndex||3===this._nobIndex)this._moverCurrentConstrained.l-=(this._moverCurrentConstrained.w-this._moverCurrent.w)/2;c=dojo.mixin({},this._shiftKey?this._moverCurrentConstrained:this._moverCurrent);b=k.getBorderBoxPageCoords(this._context.getParentIframe());c.l-=b.l;c.t-=b.t;this._updateFocusChrome(c,!1)}},onFirstMove:function(b){},onMoveStart:function(b){},_moverDoneCleanup:function(){var b=this._context,c=b._chooseParent;this._lastEventTarget=null;this._removeKeyHandlers();
b.dragMoveCleanup();c.parentListDivDelete();this._mover=void 0;this._frameIndex=this._nobIndex=-1},onMoveStop:function(b){if(this._moverDragDiv&&((b=this._moverDragDiv.parentNode)&&b.removeChild(this._moverDragDiv),this._moverDragDiv=null,this._moverCurrent.l!=this._moverStart.l||this._moverCurrent.t!=this._moverStart.t||this._moverCurrent.w!=this._moverStart.w||this._moverCurrent.h!=this._moverStart.h)){b=void 0;if(this._selectedWidget&&this._selectedWidget.domNode)if(this._sKey)for(var c=e.getStatesListCurrent(this._selectedWidget.domNode),
a=0;a<c.length;a++){if(c[a]){b=c[a];break}}else b=e.propertyDefinedForAnyCurrentState(this._selectedWidget.domNode,["width","height"]);c=this._shiftKey?this._moverCurrentConstrained:this._moverCurrent;c.w==this._moverStart.w&&delete c.w;c.h==this._moverStart.h&&delete c.h;"number"!=typeof c.l&&(c.l=this._moverStart.l);"number"!=typeof c.t&&(c.t=this._moverStart.t);c.l==this._moverStart.l&&c.t==this._moverStart.t&&(delete c.l,delete c.t);c=dojo.mixin({},c);c.hasOwnProperty("l")&&(a=k.getBorderBoxPageCoords(this._context.getParentIframe()),
c.l-=a.l,c.t-=a.t);this.onExtentChange(this,this._moverStart,c,b)}this._moverDoneCleanup();b=this._moverMouseUpEvent||this._moverMouseDownEvent;this._moverMouseUpEvent=this._moverMouseDownEvent=null;if(b&&b.target){c=Date.now();this._mouseDownInfo=null;if(this._lastMouseUp&&10>=Math.abs(b.pageX-this._lastMouseUp.pageX)&&10>=Math.abs(b.pageY-this._lastMouseUp.pageY)&&750>=c-this._lastMouseUp.dateValue)this.onDblClick(b);this._lastMouseUp={pageX:b.pageX,pageY:b.pageY,dateValue:c};dojo.stopEvent(b)}},
onMouseUp:function(b){this._moverMouseUpEvent=b},onDblClick:function(b){this.showInline(this._selectedWidget);b.stopPropagation()},onKeyDown:function(b){b&&this._moverDragDiv?(dojo.stopEvent(b),b.keyCode==dojo.keys.SHIFT?(this._shiftKey=!0,this._updateFocusChrome(this._shiftKey?this._moverCurrentConstrained:this._moverCurrent,!1)):83==b.keyCode&&(this._sKey=!0)):this._removeKeyHandlers()},onKeyUp:function(b){b&&this._moverDragDiv?(dojo.stopEvent(b),b.keyCode==dojo.keys.SHIFT?(this._shiftKey=!1,this._updateFocusChrome(this._shiftKey?
this._moverCurrentConstrained:this._moverCurrent,!1)):83==b.keyCode&&(this._sKey=!1)):this._removeKeyHandlers()},_removeKeyHandlers:function(){this._keyDownHandler&&(dojo.disconnect(this._keyDownHandler),this._keyDownHandler=null);this._keyUpHandler&&(dojo.disconnect(this._keyUpHandler),this._keyUpHandler=null)},onExtentChange:function(b,c,a,e){},isFocusNode:function(b){return dojo.hasClass(b,"focusDragDiv")||dojo.hasClass(b,"editFocusNob")||dojo.hasClass(b,"editFocusFrame")||dojo.hasClass(b,"maqFocus")||
dojo.hasClass(b,"editFocusStdChrome")},showContext:function(b,c){"davinci.ve.themeEditor.ThemeEditor"==this._context.editor.declaredClass&&(this._contexDiv||(this._context=b,this._createContextPopUp()),this._contexDiv.style.display="block")},hideContext:function(){"davinci.ve.themeEditor.ThemeEditor"==this._context.editor.declaredClass&&this._contexDiv&&(this._contexDiv.style.display="none")},_createContextPopUp:function(){var b=dojo.doc.createElement("div");b.id="ieb";this._contexDiv=b;this.domNode.appendChild(b)},
_createSubwidgetList:function(){var b=this._context._selectedWidget;if(b){var c=this._context.getThemeMeta().metadata,a=c.getWidgetType(b),c=(c=c.getMetadata(a))?c.subwidgets:null;this._displayedWidget=b;if(c){a=this._contexDiv;a.innerHTML="\x3cspan\x3e\x3c/span\x3e";a.style.position="absolute";a.style.left=this._box.w+10+"px";a.className="themeSubwidgetMenu";dojo.connect(a,"onmousedown",this,"stopPropagation");a.style.display="none";this._contexDiv=a;this.domNode.appendChild(a);var e=this._contexDiv.firstElementChild,
f=this._context.theme.name+"_subwidgetmenu";(a=dijit.byId(f))&&a.destroyRecursive(!1);var k=this._context.getDijit(),a=new k.Menu({id:f},e),e=!1;b.subwidget||(e=!0);e=new k.CheckedMenuItem({label:"WidgetOuterContainer",id:this._context.theme.name+"_WidgetOuterContainer",checked:e,onClick:dojo.hitch(this,"_subwidgetSelected",this._context.theme.name+"_WidgetOuterContainer")});e.domNode.children[0].children[0].setAttribute("src",e.domNode.children[0].children[0].src);a.addChild(e);this._currentItem=
e;for(var g in c)e=b.subwidget===g,c=new k.CheckedMenuItem({label:g,id:this._context.theme.name+"_"+g,checked:e,onClick:dojo.hitch(this,"_subwidgetSelected",this._context.theme.name+"_"+g)}),c.domNode.children[0].children[0].setAttribute("src",c.domNode.children[0].children[0].src),a.addChild(c),e&&(this._currentItem=c);a.startup();this._cm=a;this._updateSubwidgetListForState();this._connections=[];this._connections.push(dojo.subscribe("/davinci/ui/subwidgetSelectionChanged",dojo.hitch(this,this._subwidgetSelectedChange)));
this._connections.push(dojo.subscribe("/davinci/states/state/changed",dojo.hitch(this,this._updateSubwidgetListForState)))}else this._contexDiv.innerHTML=""}},stopPropagation:function(b){b.stopPropagation()},_subwidgetSelected:function(b,c){c.stopPropagation();var a=this._context.getDijit(),e=a.byId(b);e.checked?(this._currentItem&&e!=this._currentItem&&this._currentItem.set("checked",!1),this._currentItem=e,a=this._currentItem.label):((this._currentItem=a.byId(this._context.theme.name+"_WidgetOuterContainer"))&&
this._currentItem.set("checked",!0),a=null);c.currentTarget.id===this._context.theme.name+"_WidgetOuterContainer"&&(a=null);dojo.publish("/davinci/ui/subwidgetSelectionChanged",[{subwidget:a,origin:this.declaredClass}])},_subwidgetSelectedChange:function(b){var c=this._context.getDijit();b.origin!==this.declaredClass&&(this._currentItem&&this._currentItem.set("checked",!1),(this._currentItem=b.subwidget?c.byId(this._context.theme.name+"_"+b.subwidget):c.byId(this._context.theme.name+"_WidgetOuterContainer"))&&
this._currentItem.set("checked",!0))},_updateSubwidgetListForState:function(){if(this._context.editor==f.currentEditor)if(this._context._selectedWidget&&this._displayedWidget===this._context._selectedWidget&&this._cm){var b=f.currentEditor,c=b._theme;this._cm.getChildren().forEach(function(a){var e=a.label;"WidgetOuterContainer"===e&&(e=null);a.setDisabled(!c.isStateValid(this._displayedWidget,b._currentState,e))},this)}else this._clearList(),this._createSubwidgetList()},_updateSubwidgetList:function(){this._displayedWidget!==
this._context._selectedWidget&&(this._clearList(),this._createSubwidgetList())},_clearList:function(){if(this._cm)for(this._cm.destroyRecursive(!1),delete this._cm;connection=this._connections.pop();)dojo.unsubscribe(connection);this._currentItem=null},dojoStyle:function(b,c,a){if(b&&b.ownerDocument&&b.ownerDocument.defaultView&&b.ownerDocument.defaultView.getComputedStyle(b))return dojo.style.apply(dojo,arguments)}})})},"davinci/ve/ChooseParent":function(){define("dojo/_base/declare davinci/Runtime ./widget ./_Widget ./metadata davinci/ve/utils/GeomUtils".split(" "),
function(p,n,m,h,g,f){return p("davinci.ve.ChooseParent",null,{constructor:function(b){this._context=b.context},getAllowedTargetWidget:function(b,e,f,d){var c=m.getEnclosingWidget,a=[],n=[];e=e.length?e:[e];var p=this;e.forEach(function(a){n.push({type:a.type,allowedParent:g.getAllowedParent(a.type),classList:p.getClassList(a.type)})});do{e=b instanceof h?b.type:b._dvWidget.type;var r=this.getClassList(e);this.isAllowed(n,b,e,r,d)&&a.push(b);b=c(b)}while(b&&f);return a},isAllowed:function(b,e,f,d,
c){function a(a,b){return b.some(function(b){return-1!==a.indexOf(b)})}var h=g.getAllowedChild(f);"html.body"===f&&(h=["ANY"]);return b.every(function(b){var e="NONE"!==h[0]&&("ANY"===h[0]||"BLOCK"===h[0]||a(h,b.classList)),g="ANY"===b.allowedParent[0]||a(b.allowedParent,d),n=m.getWidgetHelper(b.type);return n&&n.isAllowed?n.isAllowed({childType:b.type,childClassList:b.classList,parentType:f,parentClassList:d,absolute:c.absolute,isAllowedChild:e,isAllowedParent:g}):e&&g})},getClassList:function(b){var e=
g.queryDescriptor(b,"class");return e?(e=e.split(/\s+/),e.push(b),e):[b]},dragUpdateCandidateParents:function(b){var e=b.widgetType,k=b.showCandidateParents,d=b.doCursor,c=b.absolute,a=b.currentParent;b=this._XYParent;this._proposedParentWidget||(this._proposedParentWidget=this._getDefaultParent(e,b,c,a));(k||d)&&this.highlightNewWidgetParent(this._proposedParentWidget);var e=this._context,c=e.getActiveDragDiv(),g;c&&(c=dojo.query(".maqCandidateParents",c),1==c.length&&(g=c[0]));if(g)if(k){k=!0;if(this._lastProposedParentWidget!=
this._proposedParentWidget)k=!1;else if("undefined"==typeof this._lastAllowedParentList||null===this._lastAllowedParentList)k=!1;else if(this._lastAllowedParentList.length!=b.length)k=!1;else for(a=0;a<b.length;a++)if(this._lastAllowedParentList[a]!=b[a]){k=!1;break}this._lastProposedParentWidget=this._proposedParentWidget;if(!k)if(k=dojo.i18n.getLocalization("davinci.ve","ve"),g.innerHTML="","undefined"==typeof b||null===b)this._lastAllowedParentList=null,a=0;else{this._lastAllowedParentList=b.slice();
var a=b.length,h=dojo.create("div",{className:"maqCandidateParentsHeader"},g),c=dojo.create("div",{className:"maqCandidateParentsList"},g);g=dojo.create("div",{className:"maqCandidateParentsHelp"},g);if(0===a)h.innerHTML=k.noValidParents;else if(1==a)h.innerHTML=k.willBeChildOf,dojo.create("div",{className:"maqCandidateListItem maqCandidateCurrent",innerHTML:m.getLabel(b[0])},c);else{h.innerHTML=k.candidateParents;for(var h="\x3ctable\x3e",a=b.length-1,p=1;0<=a;a--,p++){var B="maqCandidateListItem";
b[a]==this._proposedParentWidget&&(B+=" maqCandidateCurrent");h+='\x3ctr class\x3d"'+B+'"\x3e\x3ctd class\x3d"maqCandidateCheckedColumn"\x3e\x26rarr;\x3c/td\x3e\x3ctd class\x3d"maqCandidateNumberColumn"\x3e'+p+'\x3c/td\x3e\x3ctd class\x3d"maqCandidateParentColumn"\x3e'+m.getLabel(b[a])+"\x3c/td\x3e\x3c/tr\x3e"}c.innerHTML=h+"\x3c/table\x3e";g.innerHTML=k.toChangePress}}}else g.innerHTML="",this._lastAllowedParentList=null;if(d){for(var y,a=0;a<this._XYParent.length;a++)if(this._XYParent[a]===this._proposedParentWidget){y=
a;break}void 0!==y&&(!this._cursorSpan&&(this._cursorSpan=dojo.create("span",{className:"editCursor"}),d=e.getGlobal())&&(this._timer=d.setInterval(function(a,b){var c=n.currentEditor;(c.getContext&&c.getContext())!==b?this.cleanup():dojo.toggleClass(a,"editCursorBlink")}.bind(this),400,this._cursorSpan,e)),d=this._XYParent[y].domNode,b=(b=this._XYRefChild[y])?b.domNode:null,y=this._XYRefAfter[y],b?(y?b.nextSibling&&b.nextSibling._dvWidget?(e=f.getBorderBoxPageCoordsCached(b.nextSibling),y=e.l):(e=
f.getBorderBoxPageCoordsCached(b),y=e.l+e.w):(e=f.getBorderBoxPageCoordsCached(b),y=e.l),b=e.t,e=e.h):(e=f.getBorderBoxPageCoordsCached(d),y=e.l,b=e.t,e=16),g=this._cursorSpan.style,g.height=e+"px",g.left=y+"px",g.top=b+"px",d.ownerDocument.body.appendChild(this._cursorSpan))}},_getDefaultParent:function(b,e,f,d){var c;e&&(b=m.getWidgetHelper(b),c=1<e.length&&b&&b.chooseParent?b.chooseParent(e):0===e.length?null:f&&d?d:e[e.length-1]);return c},cleanup:function(){this._cursorSpan&&(this._cursorSpan.parentNode.removeChild(this._cursorSpan),
this._cursorSpan=null);if(this._timer){var b=this._context.getGlobal();b&&(b.clearInterval(this._timer),this._timer=null)}this.highlightNewWidgetParent(null);this._lastAllowedParentList=null},highlightNewWidgetParent:function(b){b!=this.newWidgetParent&&(this.newWidgetParent&&(this.newWidgetParent.domNode.style.outline=""),this.newWidgetParent=b)&&(b.domNode.style.outline="1px solid rgba(165,42,42,.7)")},getProposedParentWidget:function(){var b=null;if(this._XYParent){var e=this._XYParent.indexOf(this._proposedParentWidget);
0<=e&&(b={},b.parent=this._XYParent[e],b.refChild=this._XYRefChild[e],b.refAfter=this._XYRefAfter[e])}return b},setProposedParentWidget:function(b){this._proposedParentWidget=b},getProposedParentsList:function(){return this._XYParent},findParentsXYBeforeTraversal:function(b){b=b.position;this._XYParent=[];this._XYRefChild=[];this._XYRefAfter=[];"undefined"==typeof this.findParentsXYLastPosition&&(this.findParentsXYLastPosition={});var e=this.findParentsXYLastPosition;if(b.x===e.x&&b.y===e.y)return!1;
e.x=b.x;e.y=b.y;return!0},findParentsXY:function(b){var e=b.data,k=b.widget,d=b.absolute,c=b.position;b=b.beforeAfter;this._context.getScrollOffset();var a=c.x,c=c.y,g=k.getHelper(),h=null,h=g&&g.getMarginBoxPageCoords?g.getMarginBoxPageCoords(k):f.getMarginBoxPageCoordsCached(k.domNode),m=h.l,n=h.t,g=h.w,p=h.h,x;if(a>=m&&a<=m+g&&c>=n&&c<=n+p&&1===this.getAllowedTargetWidget(k,e,!1,{absolute:d}).length)if(!0===d)this._XYParent.push(k),this._XYRefChild.push(null),this._XYRefAfter.push(!0);else{d=k.getChildren();
h=[];for(e=0;e<d.length;e++)g=d[e],m=g.domNode,n=f.getBorderBoxPageCoordsCached(m),g=m.offsetWidth,p=m.offsetHeight,m=n.l,n=n.t,x=m+g,p=n+p,h.push({l:m,t:n,r:x,b:p,c:m+g/2});for(var z,u,v,e=0;e<h.length;e++){m=h[e];g=d[e];if(a>=m.l&&a<=m.r&&c>=m.t&&c<=m.b){z=g;u=a>=m.c?!0:!1;break}0===e?(z=g,u=c>m.b||a>=m.c?!0:!1,v=m.b):(c>=m.t||c>=v)&&a>=m.l?(z=g,u=c>m.b||a>=m.c?!0:!1):c>=v&&c>=m.b&&(z=g,u=!0);m.b>v&&(v=m.b)}this._XYParent.push(k);this._XYRefChild.push(z);this._XYRefAfter.push("after"===b?!0:"before"===
b?!1:u)}},findParentsXYAfterTraversal:function(b){var e=b.widgets,f=b.currentParent,d=b.eventTarget.ownerDocument.body._dvWidget;if(b.absolute&&f&&f!=d){var c=!1;this._XYParent.forEach(function(a){a==f&&(c=!0)});c||(this._XYParent.push(f),this._XYRefChild.push(e[0]),this._XYRefAfter.push(!0))}this.findParentsXYLastPosition={};for(b=0;b<this._XYRefAfter.length-1;b++)this._XYRefAfter[b]=!0},findParentsXYCleanup:function(b){this.findParentsXYLastPosition={}},parentListDivCreate:function(b){var e=b.widgetType,
f=b.absolute,d=b.doCursor,c=b.beforeAfter,a=b.currentParent;b=this._context;if(e){var g=b.getDocument();this._oldActiveElement=document.activeElement;g.defaultView.focus();this._keyDownHandler=dojo.connect(g,"onkeydown",dojo.hitch(this,function(a,b){this.onKeyDown(b,a[0],a[1],a[2],a[3],a[4])},[e,f,d,c,a]));this._keyUpHandler=dojo.connect(g,"onkeyup",dojo.hitch(this,function(a,b){this.onKeyUp(b,a[0],a[1],a[2],a[3],a[4])},[e,f,d,c,a]));e=this._parentListDiv=dojo.create("div",{className:"maqParentListDiv"},
document.body);b.setActiveDragDiv(e);dojo.create("div",{className:"maqCandidateParents"},e);return e}},parentListDivGet:function(){return this._parentListDiv},parentListDivDelete:function(){var b=this._context,e=this._parentListDiv;e&&(this._oldActiveElement&&(this._oldActiveElement.focus(),this._oldActiveElement=null),dojo.disconnect(this._keyDownHandler),dojo.disconnect(this._keyUpHandler),this._keyDownHandler=this._keyUpHandler=null,e.parentNode.removeChild(e),b.setActiveDragDiv(null),this._parentListDiv=
null)},_keyEventDoUpdate:function(b,e,f,d,c){var a=this._context.getPreference("showPossibleParents");this.dragUpdateCandidateParents({widgetType:b,showCandidateParents:!a&&this._spaceKeyDown||a&&!this._spaceKeyDown,doCursor:f,beforeAfter:d,absolute:e,currentParent:c})},onKeyDown:function(b,e,f,d,c,a){dojo.stopEvent(b);b.keyCode==dojo.keys.SPACE?this._spaceKeyDown=!0:this._processKeyDown(b.keyCode);this._keyEventDoUpdate(e,f,d,c,a)},onKeyUp:function(b,e,f,d,c,a){dojo.stopEvent(b);b.keyCode==dojo.keys.SPACE&&
(this._spaceKeyDown=!1);this._keyEventDoUpdate(e,f,d,c,a)},_processKeyDown:function(b){if(49<=b&&57>=b){var e=this.getProposedParentsList();1<e.length&&(b=e.length-(b-48),0<=b&&this.setProposedParentWidget(e[b]))}},isSpaceKeyDown:function(){return this._spaceKeyDown}})})},"davinci/ve/_ContextDojo":function(){define("require dojo/_base/declare dojo/_base/lang dojo/dom-construct dojo/query dojo/Deferred dojo/promise/all dojo/_base/connect dojo/window xide/factory xide/types ./commands/ChangeThemeCommand ../model/Path ../Runtime ../Workbench ../library ./metadata ../workbench/Preferences dojo/text!./newfile.template.html dojox/html/_base".split(" "),
function(p,n,m,h,g,f,b,e,k,d,c,a,q,w,r,B,y,x,z){return n(null,{_didDojo:!1,_reRequire:/\brequire\s*\(\s*\[\s*([\s\S]*?)\s*\]\s*\)/,_reModuleId:/[\w.\/]+/g,_bootstrapModules:"dijit/dijit,dijit/dijit-all",getDojoUrl:function(){var a=r.location();"/"==a.charAt(a.length-1)&&(a=a.substring(0,a.length-1));if(document&&document.getElementsByTagName)for(var b=document.getElementsByTagName("script"),c=/dojo(\.xd)?\.js(\W|$)/i,d=0;d<b.length;d++){var e=b[d].getAttribute("src");if(e&&e.match(c))return a+"/"+
e}},_getLoaderPackages:function(){var a=this.getBase(),b=B.getUserLibs(a),c,d=[];b.some(function(a){return"dojo"===a.id?(c=new q(a.root+"/dojo"),!0):!1});b=b.concat({id:"widgets",root:function(){var b=x.getPreferences("davinci.ui.ProjectPrefs",a);b.widgetFolder||(b.widgetFolder="WebContent/lib/custom",x.savePreferences("davinci.ui.ProjectPrefs",a,b));for(b=b.widgetFolder;1<b.length&&("."==b.charAt(0)||"/"==b.charAt(0));)b=b.substring(1);return b}()});b.forEach(function(a){var b=a.id;void 0!==a.root&&
"dojo"!==b&&"DojoThemes"!==b&&(b=(new q(a.root)).relativeTo(c).toString(),d.push({name:a.id,location:b}))});dojo.publish("onGetLoaderPackages",{context:this,packages:d,base:a});return d},_setSourcePostLoadRequires:function(b,c,d,f){f&&(f.themeSet&&(new a(f.themeSet,this))._dojoxMobileAddTheme(this,f.themeSet.mobileTheme,!0),this.addModeledStyleSheet(this.getAppCssRelativeFile(),!0),f=this._getAppJsRelativeFile(),this.addHeaderScript(f));b.find({elementType:"HTMLElement",tag:"script"}).forEach(function(a){for(var b=
0;b<a.children.length;b++)if(0<=a.children[b].getText().indexOf("dojo.require")){a.parent.removeChild(a);break}});var n=this._parse(b);if(this.frameNode)this.getGlobal(),g(".loading",this.frameNode.parentNode).orphan(),this._continueLoading(n,c,this,d);else{var p;dojo.some(n.scripts,function(a){if(-1!=a.indexOf("/dojo.js"))return p=a,!0});p=null;f=this.getBase();if(!p){var x=this;dojo.some(B.getUserLibs(f.toString()),function(a){return"dojo"===a.id?(p=(new q(this.getBase())).append(a.root).append("dojo/dojo.js").relativeTo(this.getPath(),
!0).toString(),x.addJavaScriptSrc(p,!0,"",!1),!0):!1},this);p||(p=this.getDojoUrl())}f=this.getFullResourcePath().getParentPath();var y=new q(p);f=f.append(y).getParentPath();for(var y=w.getUserWorkspaceUrl(),F=0;F<this._customWidgetPackages.length;F++){var N=this._customWidgetPackages[F],L=N.location.substr(y.length),L=new q(L);N.location=L.relativeTo(f).toString()}f=this.containerNode;f.style.overflow="hidden";f=h.create("iframe",this.iframeattrs,f);f.dvContext=this;this.frameNode=f;y=r.location()+
"/";this.baseURL&&(y=this.baseURL);var J=f.contentDocument||f.contentWindow.document,E=k.get(J),K={baseUrl:y};p&&(K.dojoUrl=p,K.id=this._id,f={packages:this._getLoaderPackages()},this._getDojoScriptValues(f,K),this._bootstrapModules&&(K.additionalModules=","+this._bootstrapModules.split(",").map(function(a){return"'"+a+"'"}).join(",")));b.themeCssFiles&&(K.themeCssFiles=b.themeCssFiles.map(function(a){return'\x3clink rel\x3d"stylesheet" type\x3d"text/css" href\x3d"'+a+'"\x3e'}).join(""));window["loading"+
this._id]=function(a,b){var e=this;try{var f=k.get(J),g=this.rootNode=J.body;if(!g){this._waiting=this._waiting||0;if(10>this._waiting++){setTimeout(window["loading"+this._id],500);return}throw"doc.body is null";}delete window["loading"+this._id];g.id="myapp";g.style.width="100%";g.style.height="100%";g.style.visibility="visible";g.style.margin="0";g._edit_context=this;-1!=this._bootstrapModules.split(",").indexOf("dijit/dijit-all")&&(f.dojo._postLoad=!0);f.require("dojo/_base/lang").isArray=f.dojo.isArray=
function(a){return a&&"[object Array]"==Object.prototype.toString.call(a)};f.require({packages:this._customWidgetPackages})}catch(h){console.error(h.stack||h),e=Error(h.message,h.fileName,h.lineNumber),m.mixin(e,h)}this._continueLoading(n,c,e,d)}.bind(this);J.open();b=m.replace(z,function(a,b){return K.hasOwnProperty(b)?K[b]:""});J.write(b);J.close();e.connect(J.documentElement,"onkeypress",function(a){8==a.charOrCode&&(window.davinciBackspaceKeyTime=E.davinciBackspaceKeyTime=Date.now())});e.connect(J.documentElement,
"onkeydown",dojo.hitch(this,function(a){this.editor.handleKeyEvent(a)}));e.connect(J.documentElement,"onkeyup",dojo.hitch(this,function(a){this.editor.handleKeyEvent(a)}))}},getLibraryBase:function(a,b){return B.getLibRoot(a,b,this.getBase())},loadRequires:function(a,c,d,e){var g=y.query(a,"require");if(!g){var k=new f;k.resolve();return k}var h=y.query(a,"library"),m={},n=this,p=function(a,b){return n.addJavaScriptSrc(b,c,b,e)},w=function(a,b){var c=new f;if(m.hasOwnProperty(a))return c.resolve(),
c;var d=y.getLibrary(a).version||b.version;return n.getLibraryBase(a,d).then(function(e){if(null==e)return console.error("No library found for name \x3d '"+a+"' version \x3d '"+d+"'"),c.reject(),c;m[a]=(new q(n.getBase())).append(e);if(b&&b.src&&".js"===b.src.substr(-3))return e=b.src.match(/((?:\.\.\/)*)(.*)/),p(a,e[2]);c.resolve();return c})},k=[],r;for(r in h)h.hasOwnProperty(r)&&k.push(w(r,h[r]));return b(k).then(function(){var f=[];g.every(function(b){b.$library&&f.push(w(b.$library,h[b.$library]));
switch(b.type){case "javascript":b.src?f.push(p(b.$library,b.src)):this.addJavaScriptText(b.$text,c||d,e);break;case "javascript-module":"amd"!==b.format&&console.error("Unknown javascript-module format");b.src?f.push(this.addJavaScriptModule(b.src,c||d,e)):console.error("Inline 'javascript-module' not handled src\x3d"+b.src);break;case "css":b.src?(b=b.src,c?this.addModeledStyleSheet(b,e):this.loadStyleSheet(b)):console.error("Inline CSS not handled src\x3d"+b.src);break;case "image":break;default:console.error("Unhandled metadata resource type\x3d'"+
b.type+"' for widget '"+a+"'")}return!0},this);return b(f)}.bind(this))},getDojo:function(){var a=this.getGlobal();return a&&a.dojo||dojo},getDijit:function(){var a=this.getGlobal();return a&&a.dijit||dijit},_getDojoJsElem:function(){if(this._dojoScriptElem||this.getDocumentElement().getChildElement("head").getChildElements("script").some(function(a){if(/\/dojo.js$/.test(a.getAttribute("src")))return this._dojoScriptElem=a,!0},this))return this._dojoScriptElem;console.error('"dojo.js" script element not found!')},
_updateDojoConfig:function(a){this.close();var b=this._getDojoJsElem(),e=b.getAttribute("data-dojo-config"),e=e?p.eval("({ "+e+" })","data-dojo-config"):{},f="";e.mblLoadCompatPattern&&(f=", mblLoadCompatPattern: "+e.mblLoadCompatPattern.toString(),delete e.mblLoadCompatPattern);for(var g in a)"mblLoadCompatPattern"==g?f=null===a[g]?"":", 'mblLoadCompatPattern': "+a[g]:null===a[g]?delete e[g]:e[g]=a[g];d.publish(c.EVENTS.ON_BUILD_DOJO_CONFIG,{data:e,context:this,editor:this.editor},this);a=JSON.stringify(e).slice(1,
-1).replace(/"/g,"'");b.setAttribute("data-dojo-config",a+f)},_preserveDojoTypes:function(a){var b=a.getAttribute("data-dojo-type")||a.getAttribute("dojoType");if(b){var c=this._loadFileDojoTypesCache,d=this.maqTypesClassPrefix+this.maqTypesClassCount;a.className=a.className+" "+d;this.maqTypesClassCount++;c[d]=b}},_getDojoScriptValues:function(a,b){var c=this._getDojoJsElem(),d=c.getAttribute("data-dojo-config"),d=d?p.eval("({ "+d+" })","data-dojo-config"):{};m.mixin(d,a,{async:!0,parseOnLoad:!1});
b.dojoConfig=JSON.stringify(d).slice(1,-1).replace(/"/g,"'");var e=[];c.attributes.forEach(function(a){var b=a.name;a=a.value;"src"!==b&&"data-dojo-config"!==b&&e.push(b+'\x3d"'+a+'"')});e.length&&(b.additionalDojoAttrs=e.join(" "))},_restoreDojoTypes:function(){var a=this._loadFileDojoTypesCache,b=this.getDocument(),c;for(c in a)if(node=b.querySelectorAll("."+c)[0])node.className=node.className.replace(" "+c,""),node.setAttribute("data-dojo-type",a[c])},_continueLoading:function(a,b,c,d){var e,f=
{};try{if(c instanceof Error)throw c;e=this._setSourceData(a).then(this.onload.bind(this),function(a){f.errorMessage='Unable to parse HTML source. See console for error. Please switch to "Display Source" mode and correct the error.';console.error(a.stack||a.message)})}catch(g){f=g}finally{b&&(e?e.then(function(){b.call(d||this,f)}.bind(this)):b.call(d||this,f))}}})})},"davinci/ve/_ContextInterface":function(){define("dojo/_base/declare dojo/dom-style dojo/_base/connect dojo/topic ../Theme ../Workbench ./Snap dojox/html/_base".split(" "),
function(p,n,m,h,g,f,b){return p(null,{_designEvents:[],_designMode:!0,isDesignMode:function(){return this._designMode},_disableDesignMode:function(){this._designEvents.forEach(m.disconnect);this._designEvents=[]},_enableDesignMode:function(){var b=this.getContainerNode();this._designEvents.forEach(m.disconnect);this._designEvents=[m.connect(this.getDocument(),"onkeydown",this,"onKeyDown"),m.connect(this.getDocument(),"onkeyup",this,"onKeyUp"),m.connect(b,"ondblclick",this,"onDblClick"),m.connect(b,
"onmousedown",this,"onMouseDown"),m.connect(b,"onclick",this,"onMouseClick"),m.connect(b,"onmousemove",this,"onMouseMove"),m.connect(b,"onmouseup",this,"onMouseUp"),m.connect(b,"onmouseover",this,"onMouseOver"),m.connect(b,"onmouseout",this,"onMouseOut")]},setDesignMode:function(b){!b&&this._designMode&&this._disableDesignMode();b&&!this._designMode&&this._enableDesignMode();this._designMode=b},getActiveDragDiv:function(){return this._activeDragDiv},setActiveDragDiv:function(b){this._activeDragDiv=
b},blockChange:function(b){this._blockChange=b},onMouseClick:function(b){this.eventHandler&&this.eventHandler.click&&this.eventHandler.click(b)},onMouseDown:function(b){if(this._activeTool&&this._activeTool.onMouseDown&&!this._blockChange)this._activeTool.onMouseDown(b);this.blockChange(!1)},onDblClick:function(b){},onMouseMove:function(b){if(this._activeTool&&this._activeTool.onMouseMove&&!this._blockChange)this._activeTool.onMouseMove(b)},onMouseUp:function(b){if(this._activeTool&&this._activeTool.onMouseUp)this._activeTool.onMouseUp(b);
this.blockChange(!1);h.publish("/davinci/ve/context/mouseup",b)},onMouseOver:function(b){if(this._activeTool&&this._activeTool.onMouseOver)this._activeTool.onMouseOver(b)},onMouseOut:function(b){if(this._activeTool&&this._activeTool.onMouseOut)this._activeTool.onMouseOut(b)},dragMoveUpdate:function(e){var f=this,d=this._chooseParent,c=e.widgets,a=e.data,g=e.position,h=e.absolute,m=e.currentParent,n=e.rect,p=e.doSnapLinesX,x=e.doSnapLinesY,z=e.doFindParentsXY,u=e.doCursor,v=e.beforeAfter,A=dojo.isArray(a)?
a[0].type:a.type,C=function(e){if(!(c&&0<=c.indexOf(e))){var m=this.getGlobal().require("dojo/dom-style").get(e.domNode);(p||x)&&b.findSnapOpportunities(this,e,m,p,x);d.findParentsXY({data:a,widget:e,absolute:h,position:g,doCursor:u,beforeAfter:v});dojo.forEach(e.getChildren(),function(a){C.apply(f,[a])})}};if(p||x)doSnapLines=b.updateSnapLinesBeforeTraversal(this,n);n=d.findParentsXYBeforeTraversal(e);C.apply(f,[this.rootWidget]);(p||x)&&b.updateSnapLinesAfterTraversal(this);d.findParentsXYAfterTraversal(e);
n&&(d.dragUpdateCandidateParents({widgetType:A,showCandidateParents:z,doCursor:u,beforeAfter:v,absolute:h,currentParent:m}),d.findParentsXYCleanup(e))},dragMoveCleanup:function(){b.clearSnapLines(this);this._chooseParent.cleanup(this)},onExtentChange:function(b,f,d,c){if(this._activeTool&&this._activeTool.onExtentChange&&!this._blockChange&&(b=dojo.indexOf(this._focuses,b),0<=b))this._activeTool.onExtentChange({index:b,oldBoxes:[f],newBox:d,applyToWhichStates:c});this.blockChange(!1)},onKeyDown:function(b){if(this._activeTool&&
this._activeTool.onKeyDown)this._activeTool.onKeyDown(b)},onKeyUp:function(b){if(this._activeTool&&this._activeTool.onKeyUp)this._activeTool.onKeyUp(b)},onContentChange:function(){this._updateWidgetHash();this.deselectInvisible();dojo.forEach(this.getSelection(),function(b,d){0===d?this.select(b):this.select(b,!0)},this);if("davinci.themeEdit.ThemeEditor"==this.editor.editorID){var b=g.getHelper(this.visualEditor.theme);if(b&&b.onContentChange)b.onContentChange(this,this.visualEditor.theme);else b&&
b.then&&b.then(function(b){if(b.helper&&b.helper.onContentChange)b.helper.onContentChange(this,this.visualEditor.theme)}.bind(this))}this._forceSelectionChange&&(this.onSelectionChange(this.getSelection()),delete this._forceSelectionChange);setTimeout(function(){f._autoSave.call(f)},0)},onSelectionChange:function(b){this._cssCache={};m.publish("/davinci/ui/widgetSelected",{selection:b,context:this})},getActiveTool:function(){return this._activeTool},setActiveTool:function(b){try{this._activeTool&&
this._activeTool.deactivate(),this._activeTool=b,this._activeTool||(this._activeTool=this._defaultTool),this._activeTool.activate(this),m.publish("/davinci/ve/activeToolChanged",[this,b])}catch(f){debugger}},inlineEditActive:function(){return this.getSelection().some(function(b,f){return this._focuses[f].inlineEditActive()},this)},select:function(b,f,d){if(b&&b!=this.rootWidget){var c,a=!1;this._selection&&(a=this._selection.some(function(a,d){return a===b?(c=d,!0):!1}));if(!a){f&&this._selection?
(c=this._selection.length,a=this._selection,a.push(b)):a=[b];var g=b.getParent();if(g){var h=g.getHelper();h&&h.selectChild?h.selectChild(g,b):g.selectChild(b)}if(!this._selection||1<this._selection.length||1<a.length||this.getSelection()!=b)if(g=this._selection,this._selection=a,this.onSelectionChange(a,f),g&&g.forEach(function(a){var b=a.getHelper();if(b&&b.onDeselect)b.onDeselect(a)},this),(f=b.getHelper())&&f.onSelect)f.onSelect(b)}this.updateFocus(b,c,d)}else f||this.deselect()},deselect:function(b){if(this._selection){b&&
(helper=b.getHelper());if(b&&this._selection.length){if(1===this._selection.length){if(this._selection[0]!=b)return;this.focus(null,0);this._selection=void 0}else{var f=dojo.indexOf(this._selection,b);if(0>f)return;this.focus(null,f);this._selection.splice(f,1)}if(helper&&helper.onDeselect)helper.onDeselect(b)}else this._selection&&this._selection.forEach(function(b){var c=b.getHelper();if(c&&c.onDeselect)c.onDeselect(b)},this),this.focus(null),this._selection=void 0;this.onSelectionChange(this.getSelection())}},
deselectInvisible:function(){function b(a){return 1==a.nodeType&&"none"==n.get(a,"display")?!0:a.parentNode?b(a.parentNode):!1}if(this._selection)for(var f=this._selection.length-1;0<=f;f--){var d=this._selection[f],c=d.domNode;if(b(c)&&"xblox/RunScript"!==d.type)this.deselect(d);else for(;c&&"BODY"!=c.tagName.toUpperCase();){if(c&&c.ownerDocument&&c.ownerDocument.defaultView&&"none"==n.get(c,"display")&&"xblox/RunScript"!==d.type){this.deselect(d);break}c=c.parentNode}}},getFlowLayout:function(){var b=
!0;b="true"===b;return b},setFlowLayout:function(b){var f=this.getDocumentElement().getChildElement("body");f&&f.addAttribute(PREF_LAYOUT_ATTR,""+b);return b}})})},"davinci/ve/_ContextDocument":function(){define("dojo/_base/declare dojo/dom-class dojo/dom-construct dojo/query dojo/_base/connect dojo/window xide/utils xide/factory xide/types ../UserActivityMonitor ../model/Path ../Workbench ./widget ./metadata ../html/HTMLElement ../workbench/Preferences dojox/html/_base".split(" "),function(p,n,m,
h,g,f,b,e,k,d,c,a,q,w,r,B){var y=function(a){var b=w.getLibrary();a&&dojo.filter(a.attributes,function(a){return"on"==a.nodeName.substr(0,2).toLowerCase()}).forEach(function(a){var c=!1,d;for(d in b)if(c=w.getLibrary(d),c=w.invokeCallback(c,"requiredEventAttribute",[a]))break})};return p(null,{hasDirtyResources:function(){return!1},getCompType:function(){var a=this.getDocumentElement().getChildElement("body"),b=a&&a.getAttribute("data-maq-comptype");a&&!b&&(b=this.getMobileDevice()?"mobile":"desktop",
a.addAttribute("data-maq-comptype",b));return b},_significantAttrs:{link:"href",meta:"name"},getContainerNode:function(){return this.rootNode},getParentIframe:function(){if(!this._parentIframeElem)for(var a=this.getDocument(),b=document.getElementsByTagName("iframe"),c=0;c<b.length;c++)if(b[c].contentDocument===a){this._parentIframeElem=b[c];break}return this._parentIframeElem},getModel:function(){return this._srcDocument},setSource:function(a,b,c,d){dojo.withDoc(this.getDocument(),"_setSource",this,
arguments);this.editor&&this.editor._setDirty()},getBase:function(){return""},getFullResourcePath:function(){if(!this._fullResourcePath){var a=this.getModel().fileName;this._fullResourcePath=new c(a)}return this._fullResourcePath},_getCurrentBasePath:function(){var b=new c(a.getProject()),d=B.getPreferences("davinci.ui.ProjectPrefs",b);null!==d.webContentFolder&&""!==d.webContentFolder&&(b=b.append(d.webContentFolder));return b},getRelativeFileString:function(a){var b=this.getFullResourcePath().getParentPath();
return this._getCurrentBasePath().append(a).relativeTo(b).toString()},_setSource:function(a,c,d,e){delete this._requireHtmlElem;delete this._dojoScriptElem;delete this.rootWidget;if(this.frameNode){var g=this.frameNode.contentDocument||this.frameNode.contentWindow&&this.frameNode.contentWindow.document;if(g)try{var k=f.get(g).require("dijit/registry")._destroyAll();k&&(k.forEach(function(a){b.destroy(a,!0)}),k._hash={})}catch(h){console.error("error cleaning registry",h)}}this._srcDocument=a;e&&(g=
a.getDocumentElement().getChildElement("body"),g.setAttribute("data-maq-device",e.device),g.setAttribute("data-maq-flow-layout",e.flowlayout),g.setAttribute("data-maq-comptype",e.comptype));this.loadRequires("html.body",!0,!1,!0).then(function(){e&&this.loadTheme(e);this._setSourcePostLoadRequires(a,c,d,e)}.bind(this))},_setSourceData:function(a){e.publish(k.EVENTS.ON_SET_SOURCE_DATA,{data:a,context:this,editor:this.editor},this);this.getGlobal();this.themeChanged();var b={title:a.title,scripts:a.scripts,
modules:a.modules,styleSheets:a.styleSheets,bodyClasses:a.bodyClasses,style:a.style};e.publish(k.EVENTS.ON_BUILD_HEADER,{data:b,context:this,editor:this.editor},this);this.setHeader(b);var c=a.content||"";if(b=this.isActive())this.select(null),this.getTopWidgets().forEach(this.detach,this);var d={},f=this.getContainerNode();a.maqAppStates&&(d.body=a.maqAppStates);this.getTopWidgets().forEach(function(a){a.getContext()&&a.destroyWidget()});var g=this.getGlobal().require("dijit/registry");g.forEach(function(a){a.destroy()});
g.forEach(function(a){a.destroy();g.remove(a.id)});var c=c.replace(/<\s*\/\s*br\s*>/gi,""),m;this.getGlobal();var n=this.getDojo();n.create||this.getGlobal().require(["dojo/dom-construct","dojo/dom-style","dojo/dom-attr","dojo/_base/html"],function(a,b,c,d){n.create=a.create;n.destroy=a.destroy;n.place=a.place;n.toDom=a.toDom});this.getGlobal().require("dojox/html/_base").set(f,c,{executeScripts:!0,onEnd:function(){m=this._code;this.executeScripts=!1;this.inherited("onEnd",arguments)}});y(f);h("*",
f).forEach(y);f.setAttribute("data-maq-ws","collapse");(a=this._srcDocument.getDocumentElement().getChildElement("body"))&&a.addAttribute("data-maq-ws","collapse");this.getGlobal();(a=this.getDocumentElement().getChildElement("body"))&&a.getAttribute("data-maq-device");var q={SCRIPT:1,STYLE:1},p=function(a){dojo.forEach(a.childNodes,function(a){3==a.nodeType?a.nodeValue=a.data.replace(/^[\f\n\r\t\v\ ]+$/g,""):1!=a.nodeType||q[a.nodeName]||p(a)})};p(f);this._loadFileStatesCache=d;this.global=this.getGlobal();
return this._processWidgets(f,b,this._loadFileStatesCache,m)},getSource:function(){return this._srcDocument.getText()},getDocumentElement:function(){return this._srcDocument.getDocumentElement()},getDocumentLocation:function(){return this._srcDocument.fileName},getHeader:function(){return this._header||{}},setHeader:function(a){var b=[],c,d,e;this._header&&(b=this._header.styleSheets||[],d=this._header.bodyClasses);if(a){c=a.styleSheets||[];e=a.bodyClasses;if(a.modules){var f=this.getGlobal().require;
a.modules.map(function(a){return[a.replace(/\./g,"/")]}).forEach(f)}if(a.className){var g=a.className.split(" ");dojo.some(g,function(a,b){g.splice(b,1);e=g.join(" ");return!0})}}d!=e&&(f=this.getContainerNode(),d&&n.remove(f,d),e&&n.add(f,e));b!=c&&(b=[].concat(b),dojo.forEach(c,function(a){var c=dojo.indexOf(b,a);0>c?this.loadStyleSheet(a):b.splice(c,1)},this),dojo.forEach(b,this.unloadStyleSheet,this));this.setStyle(a?a.style:void 0);this._header=a},onload:function(){this.getCompType();this._connects=
(this._connects||[]).concat(d.addInActivityMonitor(this.getDocument()));var a=this.getMobileDevice();a&&(this.setMobileDevice(a),this.visualEditor.setDevice(a,!0),this.visualEditor.setOrientation(this.getMobileOrientation()));this._configDojoxMobile(!0);window.setTimeout(function(){this.widgetAddedOrDeleted();g.publish("/davinci/ui/context/loaded",[this]);this._markDirtyAtLoadTime?(this.editor.setDirty(!0),delete this._markDirtyAtLoadTime,this.editor.save(!0)):this.editor.setDirty(this.hasDirtyResources());
this.addPseudoClassSelectors()}.bind(this),500)},_onLoadHelpers:function(){var a={};h("\x3e *",this.rootNode).map(q.getWidget).forEach(function(b){var c=b.getHelper();if(c&&c.onLoad){var d=a[b.type];a[b.type]=!0;c.onLoad(b,d)}},this)},_addHeadElement:function(a,b,c){var d=this.getDocumentElement().getChildElement("head");if(!c){var e=this._significantAttrs[a]||"src";if(d.getChildElements(a).some(function(a){return a.getAttribute(e)===b[e]}))return}c=new r(a);for(var f in b)b.hasOwnProperty(f)&&c.addAttribute(f,
b[f]);d.addChild(c);dojo.withGlobal(this.getGlobal(),function(){m.create(a,b,h("head")[0])})},_removeHeadElement:function(a,b){var c=this.getDocumentElement().getChildElement("head");c.getChildElements(a).some(function(a){var d=!0,e;for(e in b)if(b.hasOwnProperty(e)&&a.getAttribute(e)!==b[e]){d=!1;break}if(d)return c.removeChild(a),!0});dojo.withGlobal(this.getGlobal(),function(){var c=a,d;for(d in b)b.hasOwnProperty(d)&&(c+="["+d+'\x3d"'+b[d]+'"]');h(c).orphan()})},getDocument:function(){var a=this.getContainerNode();
return a&&a.ownerDocument},getGlobal:function(){var a=this.getDocument();return a?f.get(a):null}})})},"davinci/ve/_ContextWidgets":function(){define("dojo/_base/declare dojo/query dojo/Deferred dojo/promise/all dojo/_base/connect ../Theme ./widget ./Focus ./metadata ./States ./HTMLWidget ./utils/GeomUtils dojox/html/_base".split(" "),function(p,n,m,h,g,f,b,e,k,d,c,a){return p(null,{_processWidgets:function(a,b,c,d){var e=[];this._loadFileDojoTypesCache={};dojo.forEach(n("*",a),function(a){var b=a.getAttribute("data-dojo-type")||
a.getAttribute("dojoType")||a.getAttribute("dvwidget");b||(b="html."+a.tagName.toLowerCase());e.push(this.loadRequires((b||"").replace(/\./g,"/"),!1,!0));e.push(this._preProcess(a));this._preserveStates(a,c);this._preserveDojoTypes(a)},this);var f=new m;h(e).then(function(){this.getGlobal().require("dojo/ready")(function(){try{this.getGlobal().require("dijit/registry"),this.getGlobal().require("dojo/parser").parse(a).then(function(){this._restoreDojoTypes();f.resolve();b&&this._attachAll();if(d)try{dojox.html.evalInGlobal(d,
a)}catch(c){console.error("Error eval script in Context._setSourceData, "+c)}}.bind(this),function(a){f.reject(a)})}catch(c){console.error("error in _processWidgets",c),f.reject(c)}}.bind(this))}.bind(this));return f},_preProcess:function(a){var c=a.getAttribute("data-dojo-type")||a.getAttribute("dojoType");c||(c="html."+a.tagName.toLowerCase());return b.requireWidgetHelper((c||"").replace(/\./g,"/")).then(function(b){b&&b.preProcess&&b.preProcess(a,this)}.bind(this))},attach:function(a){if(a&&!a._edit_focus)if(a._srcElement||
(a._srcElement=this._srcDocument.findElement(a.id)),a.type||(a.type=a.isHtmlWidget?"html."+a.getTagName():a.isGenericWidget?a.domNode.getAttribute("dvwidget"):a.isObjectWidget?a.getObjectType():a.declaredClass.replace(/\./g,"/")),a.metadata=a.metadata||k.query(a.type),a._edit_context=this,a.attach(),"_"==a.type.charAt(a.type.lastIndexOf(".")+1))a.internal=!0;else{var b=a.getId();if(b){var c=this._widgetIds;-1===c.indexOf(b)&&c.push(b)}if(b=a.getObjectId(a))c=this._objectIds,-1===c.indexOf(b)&&c.push(b);
dojo.forEach(a.getChildren(!0),this.attach,this)}},_attachAll:function(){var a=this.rootWidget=new c({},this.rootNode);a._edit_context=this;a.isRoot=!0;this._srcDocument.getDocumentElement().getChildElement("body");a._srcElement=this._srcDocument.getDocumentElement().getChildElement("body");a._srcElement&&a._srcElement.setAttribute("id","myapp");this._attachChildren(this.rootNode)},_attachChildren:function(a){n("\x3e *",a).map(b.getWidget).forEach(this.attach,this)},detach:function(a){this.getGlobal();
var b=function(a,b){var c=a.indexOf(b);-1!=c&&a.splice(c,1)},c=a.getId(),d=this;c&&b(this._widgetIds,c);(c=a.getObjectId())&&b(this._objectIds,c);if(this._selection)for(b=0;b<this._selection.length;b++)this._selection[b]==a&&(this.focus(null,b),this._selection.splice(b,1));if(b=k.getLibraryForType(a.type)){var c=b.name,e=[a.type,this];k.invokeCallback(b,"onRemove",e);--this._widgets[c];0===this._widgets[c]&&k.invokeCallback(b,"onLastRemove",e)}a.getChildren();dojo.forEach(a.getChildren(),function(a){d.detach(a)},
this);delete this._containerControls},widgetChanged:function(a,b){1==a?this.widgetHash[b.id]=b:2==a&&delete this.widgetHash[b.id]},resizeAllWidgets:function(){this.getTopWidgets().forEach(function(a){a.resize&&a.resize()})},getAllWidgets:function(){var a=[],b=function(c){a.push(c);c.getChildren().forEach(function(a){b(a)})};this.rootWidget&&b(this.rootWidget);return a},widgetAddedOrDeleted:function(a){var b=f.getHelper(this.getTheme());b&&b.widgetAddedOrDeleted?b.widgetAddedOrDeleted(this,a):b&&b.then&&
b.then(function(b){b.helper&&(this.theme.helper=b.helper,b.helper.widgetAddedOrDeleted&&b.helper.widgetAddedOrDeleted(this,a))}.bind(this))},clearCachedWidgetBounds:function(){this.getAllWidgets().forEach(function(b){(b=b.domNode)&&a.clearGeomCache(b)})},updateFocus:function(c,d,e){this.editor.getDisplayMode&&"source"==this.editor.getDisplayMode()||b.requireWidgetHelper(c.type).then(function(b){if(this.editor.isActiveEditor()){var f,g,h;if(!k.queryDescriptor(c.type,"isInvisible"))switch((b=c.getHelper())&&
b.getMarginBoxPageCoords?f=b.getMarginBoxPageCoords(c):(f=c.getStyleNode(),b&&b.getSelectNode&&(f=b.getSelectNode(this)||f),f=a.getMarginBoxPageCoords(f)),h=c.getParent(),g={move:!(h&&h.isLayout&&h.isLayout())},h&&h.isLayout&&h.isLayout()?"none":k.queryDescriptor(c.type,"resizable")){case "width":g.resizeWidth=!0;break;case "height":g.resizeHeight=!0;break;case "both":g.resizeWidth=!0,g.resizeHeight=!0}this.focus({box:f,op:g,hasLayout:c.isLayout&&c.isLayout(),isChild:h&&h.isLayout&&h.isLayout()},
d,e);this._focuses[0].showContext(this,c)}}.bind(this))},updateFocusAll:function(){if(!this.editor||!this.editor.getDisplayMode||"source"!=this.editor.getDisplayMode()){var a=this._selection;if(a)for(var b=0;b<a.length;b++)this.updateFocus(a[b],b);d.updateHighlightsBaseStateWidgets(this)}},hideFocusAll:function(a){a||(a=0);var b=this.getFocusContainer();if(this._focuses)for(;a<this._focuses.length;a++){var c=this._focuses[a];c.domNode.parentNode==b&&(c.hide(),b.removeChild(c.domNode))}},getFocus:function(a){a=
this.getSelection().indexOf(a);return-1==a?null:this._focuses[a]},isFocusNode:function(a){if(this._selection&&this._selection.length&&this._focuses&&this._focuses.length>=this._selection.length)for(var b=0;b<this._selection.length;b++)if(this._focuses[b].isFocusNode(a))return!0;return!1},focus:function(a,b,c){this._focuses=this._focuses||[];var d=!1;void 0===b&&(d=!0,b=0);var f;b<this._focuses.length?f=this._focuses[b]:(dojo.withDoc(this.getDocument(),dojo.hitch(this,function(){f=new e;f._edit_focus=
!0;f._context=this})),this._focuses.push(f));var k=this.getFocusContainer();if(a){if(a.box&&a.op){f._connected||(this._connects.push(g.connect(f,"onExtentChange",this,"onExtentChange")),f._connected=!0);var h=this.getSelection();f.resize(a.box,h[0]);var m=b<h.length?b:0;f.resize(a.box,h[m]);f.allow(a.op);f.domNode.parentNode!=k&&k.appendChild(f.domNode);f.show(h[m],{inline:c})}else f.hide();b++}else d||(f.domNode.parentNode==k&&(f.hide(),k.removeChild(f.domNode)),this._focuses.splice(b,1),this._focuses.push(f));
d&&this.hideFocusAll(b)},getFocusContainer:function(){var a=document.getElementById("focusContainer");a||(a=dojo.create("div",{"class":"focusContainer",id:"focusContainer"},document.body),davinci.Workbench.focusContainer=a);return a},getTopWidgets:function(){for(var a=[],b=this.rootNode.firstChild;b;b=b.nextSibling)1==b.nodeType&&b._dvWidget&&a.push(b._dvWidget);return a}})})},"davinci/lang/ui/ui":function(){define([],function(){return{dontShowAgain:"Don't show again",selectFile:"Select a file",openFile:"Open File",
aboutMaqetta:"About Maqetta",productVersion:"Version: ${0}",productDate:"Date: ${0}",build:"Build: ${0}",library:"Library",version:"Version",include:"Include",source:"Source",baseLocation:"Base Location",invalidDownloadFileName:"File name may only contain letters, numbers, \x26#8216;_\x26#8216;, and \x26#8216;.\x26#8216;.",selectedFiles:"Selected Files",noFilesSelected:"No files selected!",downloadButtonLabel:"Download",themeAlreadyExists:"Theme already Exists!",invalidThemeName:"Invalid theme name",
errorCreatingTheme:"Error creating theme: ",creatingTheme:"Creating theme",noUserThemes:"No user themes found in workspace. Please create a new theme before editing.",themeSetsDialog:"Manage theme sets",renameThemeSet:"Rename theme set",themeSets:"Theme sets:",currentlySelectedThemeSet:"Currently selected theme set:",themeSetName:"Name:",desktopTheme:"Dojo desktop 1.7 theme:",mobileTheme:"Dojo mobile 1.7 theme:",android:"Android:",blackberry:"Blackberry:",ipad:"iPad:",iphone:"iPhone:",other:"Other:",
selectTheme:"Select theme",themeSet:"Theme set:",themeVersionMessage:"Theme version does not match workspace version this could produce unexpected results. We suggest recreating the custom theme using the current version of Maqetta and deleting the existing theme.",addThemeSet:"Add theme set",deleteThemeSet:"Delete theme set",workspaceLocation:"Workspace Location",savingReadonlyFile:"This file is a read-only file. Please save it to a writeable location.",create:"Create",open:"Open",save:"Save",select:"Select",
update:"Update",unknown:"unknown",fileName:"File name",folderName:"Folder name",parentFolder:"Parent folder: ",newFolderLabel:"New folder",cancelButtonLabel:"Cancel",newFolderName:"Name:",createFolder:"Create Folder",createNewFile:"Create New File",createMobileApplication:"Create a Mobile Application",createDesktopApplication:"Create a Desktop Application",createSketchHiFi:"Create a Sketch (high-fidelity)",createSketchLoFi:"Create a Sketch (low-fidelity)",createNewCSSFile:"Create New CSS File",createNewJSFile:"Create New JavaScript File",
createNewFolder:"Create New Folder",saveFileAs:"Save File As",downloadFile:"Download",selectFiles:"Select Files...",selectZip:"Select ZIP file...",upload:"Upload",addFiles:"Upload",uploading:"Uploading...",completed:"completed: ${0} \n",done:"Done",explodeZipWarning:"Warning: Contents of .zip files will overwrite any conflicting files in your workspace",mustEnterFileName:"You must enter a file name.",cannotSelect:"Cannot select ${0}. It is a folder.",fileAlreadyExistsOverwrite:"File ${0} already exists. OK to overwrite?",
cannotCreate:"Cannot create ${0}. It already Exists.",fileNameSlashCharacter:"File names cannot contain a slash character (/). Your file name is: ${0}",doesNotHaveExtension:"The name ${0} does not have an extension (e.g., .html, .css or .js) and will be treated as a plain text file. OK to proceed?",areYouSureDelete:"Are you sure you want to delete ${0}?",areYouSureDeleteProject:"Are you sure you want to delete project ${0}?",noResourcesSelected:"No resources are currently selected.",optimizeOption:"Use Dojo Web Builder (experimental)",
downloadFullSource:"Download uncompressed source for selected libraries (if available)",selectAll:"All",selectNone:"None",themeToClone:"Theme to clone",newName:"New Name",selectTheme:"Select a Theme",newProject:"New Project",renameProjectDialogTitle:"Rename Project To...",deleteProjectButtonTitle:"Delete Project",renameProjectButtonTitle:"Rename Project...",deleteOnlyProjectError:"You can't delete the only project in your workspace!",newFileShowFiles:"Show file picker",newFileHideFiles:"Hide file picker",
root:"(root)",nhfoDevice:"Device:",nhfoDeviceTooltip:"Select an initial mobile device",nhfoThemeButtonLabel:"Theme...",nhfoThemeButtonTitle:"Select themes or theme set for new HTML file",renameNewLabel:"Name:",renameButtonLabel:"Rename",renameDialogTitle:"Rename To...",createProject:"New project",createProjectMenuItem:"New project...",deleteProjectMenuItem:"Delete this project...",renameProjectMenuItem:"Rename this project...",saveAsProjectTemplateMenuItem:"Save as project template...",manageProjectTemplatesMenuItem:"Manage project templates...",
modifyLibrariesMenuItem:"Modify libraries...",modifyLibraries:"Modify libraries",projectColon:"Project:",ProjectMenu:"Project menu",newProjectName:"Name:",newProjectTemplate:"Template:",newProjectUseProjectTemplate:"Use project template",newProjectCloneExistingProject:"Copy files from current project into new project",newProjectEclipseSupport:"New project should be Eclipse-compatible",newProjectNameExists:"A project with this name already exists",saveAsProjectTemplate:"Save as project template",newProjectTemplateName:"Project template name:",
newProjectTemplateShareLabel:"Share with everyone",newProjectTemplateOverwrite:"Project template {0} already exists. OK to overwrite?",newProjectTemplateCreationSuccess:"Project template {0} has been saved",newProjectTemplateCreationFailure:"Error: Project template {0} save operation failed",newProjectTemplateCancelled:"Operation cancelled",manageProjectTemplates:"Manage project templates",ManageProjectTemplatesHeaderName:"Project template name",ManageProjectTemplatesHeaderShared:"Share with everyone?",
ManageProjectTemplatesHeaderCreatedBy:"Created by",ManageProjectTemplatesHeaderCreatedOn:"Created on",ManageProjectTemplatesHeaderLastModified:"Last updated",ManageProjectTemplatesNoTemplates:"You have no project templates.",ManageProjectTemplatesDuplicateNames:"Invalid entries - two project templates have the same name",ManageProjectTemplateAboutToOccur:"The following actions are about to occur:",ManageProjectTemplateDeletions:"project template deletions",ManageProjectTemplateModifications:"project template modifications",
ManageProjectTemplateOKToProceed:"OK to proceed?",ManageProjectTemplatesInitializing:"Initializing...",modify:"Modify",User:"Account",currentProject:"Current Project:",selectProject:"Select a Project:",NoteOperationNotUndoable:"Note: this operation is not undoable."}})},"davinci/ui/Resource":function(){define("system/resource ../model/Path ../Runtime ../Workbench ../workbench/Preferences ../ve/RebuildPage".split(" "),function(p,n,m,h,g){return dojo.setObject("davinci.ui.Resource",{newHTMLDialogSpecificClass:"davinci/ui/widgets/NewHTMLFileOptions",
newHTMLMobile:function(){},newHTMLDesktop:function(){},newHTMLSketchHiFi:function(){},newHTMLSketchLoFi:function(){},newHTML:function(f){},newCSS:function(){},selectResource:function(f){for(var b=dijit.byId("resourceTree"),e=[];f.parent;f=f.parent)e.unshift(f);b.set("path",e)},newFolder:function(f,b){},closeEditor:function(f,b){},save:function(){var f=h.getOpenEditor();f&&system.resource.findResourceAsync(f.fileName).then(dojo.hitch(this,function(b){b.readOnly()?this.saveAs(b.getExtension(),"save"):
f.save()}))},saveAs:function(f,b){},newJS:function(){},openFile:function(){},addFiles:function(){},addFilesZip:function(){},getNewFileName:function(f,b,e){var g,d,c=0;e||(e="");do c++,d="folder"===f?"folder"+c:"file"+c+e,g=b.getPath()+"/"+d,g=p.findResource(g);while(g);return d},canModify:function(f){return!f.readOnly()},newProject:function(){},renameAction:function(){},getResourceIcon:function(f,b){},getResourceClass:function(f){if(f.readOnly())return"readOnlyResource"},deleteAction:function(){},
getSelectedResources:function(){var f=m.getSelection();if(f[0]&&f[0].resource)return dojo.map(f,function(b){return b.resource})},alphabeticalSortFilter:{filterList:function(f){return f.sort(function(b,e){return b.name>e.name?1:b.name<e.name?-1:0})}},foldersFilter:{filterItem:function(f){if("File"==f.elementType)return!0}},openPath:function(f,b){},openResource:function(f,b){}})})},"davinci/actions/StickyNoteAction":function(){define("dojo/_base/declare ./Action ../Workbench davinci/commands/CompoundCommand ../ve/commands/AddCommand ../ve/commands/MoveCommand ../ve/commands/ResizeCommand ../ve/tools/CreateTool ../ve/widget ../ve/metadata".split(" "),
function(p,n,m,h,g,f,b,e,k,d){return p("davinci.actions.StickyNoteAction",n,{run:function(c){var a=m.getOpenEditor();if(c=davinci.ve.metadata.queryDescriptor("html.stickynote")){var n=dojo.clone(c);n.context=a.getContext();if(a&&a.getContext){var p=void 0;dojo.withDoc(a.getContext().getDocument(),function(){p=k.createWidget(n)});p&&(c=new h,a.getContext().getDocument(),a.getContext().getContainerNode(),c.add(new g(p,a.getContext().getContainerNode())),e.prototype.checkAddToCurrentState(c,p),c.add(new f(p,
50,50)),p.isLayoutContainer&&c.add(new b(p,args.size&&args.size.w,args.size&&args.size.h)),a.getContext().getCommandStack().execute(c),d.getSmartInput(p.type).then(function(b){b&&b.displayOnCreate?a.getContext().select(p,null,!0):a.getContext().select(p)}.bind(this)))}}},isEnabled:function(b){return(b=m.getOpenEditor())&&b.getContext}})})},"davinci/actions/SaveAsWidget":function(){define("dojo/_base/declare ./Action ../Workbench davinci/ui/Dialog ../ui/SaveAsWidgetForm davinci/lang/ui/common".split(" "),
function(p,n,m,h,g,f){return p("davinci.actions.SaveAsWidget",n,{run:function(b){"davinci.ve.Context"!==b.declaredClass&&(b="function"===typeof b.getContext?b.getContext():m.getOpenEditor().getContext());b=this._generateMetadata(b);this._showDialog(b)},_generateMetadata:function(b){var e={spec:"1.0",require:[],library:{}},f=b.model.find({elementType:"HTMLElement",tag:"body"},!0);e.content=dojo.trim(f.getText(b).match(/<body[^>]*>([\s\S]*)<\/body>/)[1]);this._getRequires(b.getTopWidgets(),e);return e},
_getRequires:function(b,e){function f(a,b,c){dojo.forEach(a,function(a){if(!c.hasOwnProperty(a.type)){c[a.type]=!0;dojo.forEach(a.metadata.require,function(a){this._inRequiresArray(a,b.require)||b.require.push(a)},this);for(var d in a.metadata.library)a.metadata.library.hasOwnProperty(d)&&(b.library[d]||(b.library[d]=a.metadata.library[d]))}f.call(this,a.getChildren(),b,c)},this)}var d=d||{};f.call(this,b,e,d);if(1<e.require.length){for(var d=e.require.slice(0,1),c=1;c<e.require.length;c++){var a=
e.require[c];a.$text&&d[d.length-1].$text?d[d.length-1].$text+="\n"+a.$text:d.push(a)}e.require=d}},_inRequiresArray:function(b,e){var f=b.$text?b.$text.replace(/\s/g," "):"";return dojo.some(e,function(d){return b.type===d.type&&(b.src&&d.src&&b.src===d.src&&(b.$library&&d.$library&&b.$library===d.$library||!b.$library&&!d.$library)||b.$text&&d.$text&&f===d.$text.replace(/\s/g," "))})},_showDialog:function(b){var e=new h({title:f.sawdTitle,"class":"dvSaveAsWidgetDialog",execute:dojo.hitch(this,function(b){this._saveMetadata(b.metadata)}),
onHide:function(){setTimeout(function(){e.destroyRecursive()},e.duration)}});b=new g({parentId:e.id,metadata:b});e.set("content",b);e.show()},_saveMetadata:function(b){}})})},"davinci/ui/SaveAsWidgetForm":function(){define("dojo/_base/declare dijit/_Templated dijit/_Widget davinci/lang/ui dijit/lang/_common dojo/text!./templates/SaveAsWidgetForm.html".split(" "),function(p,n,m,h,g,f){return dojo.declare("davinci.ui.SaveAsWidgetForm",[m,n],{templateString:f,widgetsInTemplate:!0,postMixInProperties:function(){this.descriptionString=
g.sawfDesc;this.nameString=g.name;this.idString=g.id;this.versionString=g.version;this.requiredString=g.required;this.saveString=g.save;this.cancelString=g.cancel;this.metadataTitle=g.sawfMetadataTitle;this.namePromptString=g.sawfNamePrompt;this.idPromptString=g.sawfIdPrompt;this.initialTextareaContent=dojo.toJson(this.metadata,!0)},postCreate:function(){this.inherited(arguments);dojo.forEach(["nameInputNode","idInputNode","versionInputNode","textareaNode"],function(b){this.connect(this[b],"onChange",
function(e){this._onChange(b,e)})},this);this.idInputNode.regExp="[a-zA-Z]+://[^\\s]+";this.connect(this.buttonCancel,"onClick",function(){dijit.byId(this.parentId).hide()})},_onChange:function(b,e){switch(b){case "nameInputNode":this.metadata.name=e;break;case "idInputNode":this.metadata.id=e;break;case "versionInputNode":this.metadata.version=e;break;case "textareaNode":try{this.metadata=dojo.fromJson(e),this._invalidMetadata=!1}catch(f){this._invalidMetadata=!0}}"textareaNode"!==b&&this.textareaNode.set("value",
dojo.toJson(this.metadata,!0));this.buttonSave.set("disabled",!this._isValid())},_isValid:function(){return this.idInputNode.isValid()&&!this._invalidMetadata}})})},"davinci/lang/ui/common":function(){define([],function(){return{save:"Save",cancel:"Cancel",discard:"Discard",sawdTitle:"Save As Widget",name:"Name",id:"ID",version:"Version",required:"required",sawfDesc:"Enter the following information to complete the custom widget metadata.",sawfMetadataTitle:"Edit full metadata for custom widget (advanced)",
sawfNamePrompt:'A unique "common" name.',sawfIdPrompt:"A unique identifier for this widget in the form of a URI."}})},"davinci/actions/UserNameAction":function(){define(["dojo/_base/declare","davinci/Runtime","./Action","davinci/lang/ui"],function(p,n,m,h){return p("davinci.actions.UserNameAction",m,{run:function(){},getName:function(){var g=n.getUserDisplayName();return h.User+": \x3ci\x3e"+g+"\x3c/i\x3e"}})})},"davinci/actions/LogoutAction":function(){define(["dojo/_base/declare","./Action","davinci/lang/ui"],
function(p,n,m){return p("davinci.actions.LogoutAction",n,{run:function(){dojo.xhrPost({url:"../logout",handleAs:"text",headers:{"Content-Type":"application/x-www-form-urlencoded","Orion-Version":"1"},postData:"",load:function(h,g){location.href="welcome"}.bind(this)})},isEnabled:function(h){return!0}})})},"davinci/ve/actions/CopyAction":function(){define(["dojo/_base/declare","./_CutCopyAction","../../Runtime"],function(p,n,m){return p("davinci.ve.actions.CopyAction",[n],{_invokeSourceEditorAction:function(h){h.htmlEditor.copyAction.run()},
_executeAction:function(h,g,f,b){b=m.clipboard;m.clipboard=f;if(!b)h.onSelectionChange(g)}})})},"davinci/ve/actions/_CutCopyAction":function(){define("dojo/_base/declare davinci/Workbench davinci/ve/actions/ContextAction davinci/commands/CompoundCommand davinci/ve/commands/RemoveCommand davinci/ve/widget".split(" "),function(p,n,m,h,g,f){return p("davinci.ve.actions.CutAction",[m],{run:function(b){if(b=this.fixupContext(b))if("davinci.ve.PageEditor"==b.declaredClass&&"source"==b._displayMode)this._invokeSourceEditorAction(b);
else{var e=this._normalizeSelection(b);if(0<e.length){var k=new h,d=[],c=b.reorderPreserveSiblingOrder(e);dojo.forEach(c,function(a){var b=a.getData({identify:!1});b&&d.push(b);var c=a.getHelper();if(c&&c.getRemoveCommand){if(a=c.getRemoveCommand(a),"compound"===a.name){for(var c=[],e=a._commands,h=e.length-1;0<h;h--){var m=e[h];"remove"===m.name&&(m=f.byId(m._id).getData({identify:!1}),c.push(m))}b.associatedCopiedWidgetData=c}}else a=new g(a);k.add(a)});this._executeAction(b,e,d,k)}}},isEnabled:function(b){b=
this.fixupContext(b);var e=n.getOpenEditor();return e&&b?(b=0<b.getSelection().length,"davinci.ve.PageEditor"==e.declaredClass?(e=e.getDisplayMode(),b&&"source"!=e):b):!1},shouldShow:function(b){return(b=(b=this.fixupContext(b))?b.editor:null)&&"davinci.ve.PageEditor"==b.declaredClass},_invokeSourceEditorAction:function(b){},_executeAction:function(b,e,f,d){}})})},"davinci/ve/actions/ContextAction":function(){define(["dojo/_base/declare","davinci/actions/Action","davinci/Runtime"],function(p,n,m){return p("davinci.ve.actions.ContextAction",
[n],{_normalizeSelection:function(h){var g=h.getSelection();if(2>g.length)return g;var f=h.rootWidget,b=[];dojo.forEach(g,function(e){for(var k=e.getParent();k&&k!=f;){for(var d=0;d<g.length;d++)if(g[d]==k){h.deselect(e);return}k=k.getParent()}b.push(e)});return b},_getContext:function(h){return h?h:(h=m.currentEditor)&&(h.getContext&&h.getContext()||h.context)},fixupContext:function(h){h=this._getContext(h);return"davinci.ve.Context"==h.declaredClass||"xideve/delite/Context"==h.declaredClass?h:"function"==
typeof h.getContext?h.getContext():null}})})},"davinci/ve/commands/RemoveCommand":function(){define(["dojo/_base/declare","davinci/ve/commands/_hierarchyCommand","davinci/ve/widget","davinci/ve/States","davinci/ve/commands/ModifyCommand"],function(p,n,m,h,g){return p("davinci.ve.commands.RemoveCommand",[n],{name:"remove",constructor:function(f){this._id=f?f.id:void 0},execute:function(){if(this._id){var f=m.byId(this._id);if(f){var b=f.getContext(),e=f.getParent()||b.getContainerNode(),k,d=f.getHelper();
d&&d.onRemove&&(k=d.onRemove(f));if(!this._data){this._index=dojo.indexOf(e.getChildren(),f);if(0>this._index)return;this._data=f.getData();this._parentId=e.id}this._data.context=b;d=this._isRefreshOnDescendantChange(f);b&&b.detach(f);e.removeChild(f);b&&b.widgetChanged(b.WIDGET_REMOVED,f);f.destroyWidget();b&&b.widgetAddedOrDeleted();d&&(new g(d,null,null,e._edit_context)).execute();h.resetState(f.domNode);k&&k()}}},undo:function(){if(this._data&&this._parentId){var f=m.byId(this._parentId);if(f){var b=
m.createWidget(this._data);if(b){f.addChild(b,this._index);var e=f.getContext();e&&(e.attach(b),b.startup(),b.renderWidget(),e.widgetAddedOrDeleted(),e.widgetChanged(e.WIDGET_ADDED,b),(e=this._isRefreshOnDescendantChange(b))&&(new g(e,null,null,f._edit_context)).execute(),h.resetState(b.domNode))}}}}})})},"davinci/ve/actions/CutAction":function(){define(["dojo/_base/declare","./_CutCopyAction","../../Runtime"],function(p,n,m){return p("davinci.ve.actions.CutAction",[n],{_invokeSourceEditorAction:function(h){h.htmlEditor.cutAction.run()},
_executeAction:function(h,g,f,b){m.clipboard=f;h.select(null);h.getCommandStack().execute(b)}})})},"davinci/ve/actions/DeleteAction":function(){define(["dojo/_base/declare","davinci/Workbench","davinci/ve/actions/ContextAction","davinci/commands/CompoundCommand","davinci/ve/commands/RemoveCommand"],function(p,n,m,h,g){return p("davinci.ve.actions.DeleteAction",[m],{run:function(f){if(f=this.fixupContext(f)){var b=this._normalizeSelection(f);if(0<b.length){var e=void 0;if(1===b.length)var b=b[0],k=
b.getHelper(),e=k&&k.getRemoveCommand?k.getRemoveCommand(b):new g(b);else e=new h,dojo.forEach(b,function(b){var c=b.getHelper();b=c&&c.getRemoveCommand?c.getRemoveCommand(b):new g(b);e.add(b)});f.select(null);f.getCommandStack().execute(e)}}},isEnabled:function(f){f=this.fixupContext(f);var b=n.getOpenEditor();return b&&f?(f=0<f.getSelection().length,"davinci.ve.PageEditor"==b.declaredClass?(b=b.getDisplayMode(),f&&"source"!=b):f):!1},shouldShow:function(f){return(f=(f=this.fixupContext(f))?f.editor:
null)&&"davinci.ve.PageEditor"==f.declaredClass}})})},"davinci/ve/actions/PasteAction":function(){define(["dojo/_base/declare","../../Workbench","./ContextAction","../tools/PasteTool","../../Runtime"],function(p,n,m,h,g){return p("davinci.ve.actions.PasteAction",[m],{shortcut:{keyCode:86,ctrlKey:!0},run:function(f){if(f=this.fixupContext(f))if("davinci.ve.PageEditor"==f.declaredClass&&"source"==f._displayMode)f.htmlEditor.pasteAction.run();else{var b=g.clipboard;b&&f.setActiveTool(new h(b))}},isEnabled:function(f){f=
this.fixupContext(f);var b=n.getOpenEditor();return b&&f?"davinci.ve.PageEditor"==b.declaredClass?(f=b.getDisplayMode(),g.clipboard&&"source"!=f):g.clipboard:!1},shouldShow:function(f){return(f=(f=this.fixupContext(f))?f.editor:null)&&"davinci.ve.PageEditor"==f.declaredClass}})})},"davinci/ve/tools/PasteTool":function(){define("dojo/_base/declare ./CreateTool ../widget ../metadata ../../commands/CompoundCommand ../commands/AddCommand ../commands/MoveCommand ../commands/StyleCommand dojo/Deferred dojo/promise/all".split(" "),
function(p,n,m,h,g,f,b,e,k,d){return p("davinci.ve.tools.PasteTool",n,{constructor:function(b){this.inherited(arguments);this._position_prop=null;var a=b[0];a&&a.properties&&(a=m.parseStyleValues(a.properties.style),this._position_prop=m.retrieveStyleProperty(a,"position",""))},_create:function(c){var a=c.index,n,p,r=new g,B,y=[],x=new k,z=this._data.map(function(g){var v=new k,A=[];if(!this._loadType(g,A))return v.reject(),v;d(A).then(function(){var d=m.parseStyleValues(g.properties&&g.properties.style);
if("absolute"==this._position_prop){var k=parseInt(m.retrieveStyleProperty(d,"left","0px")),d=parseInt(m.retrieveStyleProperty(d,"top","0px"));n?p={x:k+n.x,y:d+n.y}:c.position?(p=c.position,n={x:c.position.x-k,y:c.position.y-d}):(p={x:k,y:d},n={x:0,y:0})}dojo.withDoc(this._context.getDocument(),function(){var d=function(c){void 0!==a&&0<=a&&a++;y.push(c);if(p){var d=this._context.getPreference("absoluteWidgetsZindex");r.add(new e(c,[{position:"absolute"},{"z-index":d}]));c=new b(c,p.x,p.y,B,null,
null,B);B||(B=c);r.add(c)}v.resolve()}.bind(this);g.context=this._context;h.getHelper(g.type,"tool").then(function(b){var e;b&&(e=new b(g));if(e&&e.addPasteCreateCommand)b={parent:c.parent||this._context.getContainerNode(),position:p,index:a},e.addPasteCreateCommand(r,b).then(function(a){if(!a)return v.reject(),v;d(a)});else{e=m.createWidget(g);if(!e)return v.reject(),v;r.add(new f(e,c.parent||this._context.getContainerNode(),a));this.checkAddToCurrentState(r,e);d(e)}}.bind(this))}.bind(this))}.bind(this));
return v}.bind(this));d(z).then(function(){r.isEmpty()||(this._context.getCommandStack().execute(r),setTimeout(function(){y.forEach(function(a,b){this._context.select(a,0<b)}.bind(this))}.bind(this),0));x.resolve()}.bind(this));return x},createWithFlowLayout:function(){return"absolute"!=this._position_prop}})})},"davinci/ve/actions/DuplicateAction":function(){define("dojo/_base/declare dojo/dom-style davinci/ve/actions/ContextAction davinci/commands/CompoundCommand davinci/ve/commands/AddCommand davinci/ve/commands/MoveCommand davinci/ve/tools/CreateTool davinci/ve/widget davinci/ve/utils/GeomUtils".split(" "),
function(p,n,m,h,g,f,b,e,k){return p("davinci.ve.actions.DuplicateAction",[m],{run:function(d){if((d=this.fixupContext(d))&&"davinci.ve.Context"===d.declaredClass&&"davinci/delite/Context"===d.declaredClass){var c=this._normalizeSelection(d);if(this.selectionSameParent(c)){var a=[];if(0<c.length){var m=new h;dojo.forEach(c,function(c){var h,p=c.getData({identify:!1});p&&(p.context=d,dojo.withDoc(d.getDocument(),function(){h=e.createWidget(p)},this),h&&(m.add(new g(h,c.getParent(),void 0)),b.prototype.checkAddToCurrentState(m,
h),a.push(h),"absolute"==(c&&c.domNode?n.get(c.domNode,"position"):null)&&(c=k.getMarginBoxPageCoords(c.domNode),c.l+=25,m.add(new f(h,c.l,c.t,void 0,void 0,void 0,!0)))))});d.getCommandStack().execute(m);dojo.forEach(a,function(a,b){d.select(a,0<b)},this)}}}},isEnabled:function(b){b=(b=this.fixupContext(b))&&b.getSelection?b.getSelection():[];return 0===b.length?!1:this.selectionSameParent(b)},shouldShow:function(b){return(b=(b=this.fixupContext(b))?b.editor:null)&&"davinci.ve.PageEditor"==b.declaredClass},
selectionSameParent:function(b){if(0===b.length)return!1;for(var c=b[0].getParent(),a=0;a<b.length;a++)if(b[a].getParent()!=c)return!1;return!0}})})},"davinci/ve/actions/EditValueAction":function(){define(["dojo/_base/declare","davinci/ve/actions/ContextAction"],function(p,n){return p("davinci.ve.actions.EditValueAction",[n],{run:function(m){if((m=this.fixupContext(m))&&"davinci.ve.Context"===m.declaredClass&&"davinci/delite/Context"===m.declaredClass){var h=m.getSelection();1===h.length&&m.select(h[0],
!1,!0)}},isEnabled:function(m){return(m=this.fixupContext(m))&&0<m.getSelection().length},shouldShow:function(m){return(m=(m=this.fixupContext(m))?m.editor:null)&&"davinci.ve.PageEditor"==m.declaredClass}})})},"davinci/ve/actions/EditPropertiesAction":function(){define(["dojo/_base/declare","davinci/ve/actions/ContextAction"],function(p,n){return p("davinci.ve.actions.EditPropertiesAction",[n],{run:function(m){(m=this.fixupContext(m))&&m.editor&&m.editor.editorContainer&&m.editor.editorContainer.hideShowProperties&&
m.editor.editorContainer.hideShowProperties()},isEnabled:function(m){this.fixupContext(m);return!0}})})},"davinci/ve/actions/SurroundAction":function(){define("dojo/_base/declare dojo/_base/array dojo/dom-style davinci/ve/actions/ContextAction davinci/commands/CompoundCommand davinci/ve/commands/AddCommand davinci/ve/commands/StyleCommand davinci/ve/commands/MoveCommand davinci/ve/commands/ResizeCommand davinci/ve/commands/ReparentCommand davinci/ve/tools/CreateTool davinci/ve/widget davinci/ve/utils/GeomUtils".split(" "),
function(p,n,m,h,g,f,b,e,k,d,c,a,q){return p("davinci.ve.actions.SurroundAction",[h],{run:function(h){h=this.fixupContext(h);var p,B,y,x,z=[],u,v=this.item.surroundWithTagName;if(v){dojo.withDoc(h.getDocument(),function(){u=a.createWidget({type:"html."+v,properties:{},children:[],context:h})});var A=new g,C=[].concat(h.getSelection()),G=C[0],D=G.getParent();q.getMarginBoxPageCoords(D.domNode);C.sort(function(a,b){return D.indexOf(a)-D.indexOf(b)});var I=h.getDocument(),H=I.defaultView&&I.defaultView.dojo;
H.style||(H.style=m);(I=n.every(C,function(a){if(H)return position_prop=H.style(a.domNode,"position"),"absolute"==position_prop}))&&n.forEach(C,function(a,b){z.push(q.getMarginBoxPageCoordsCached(a.domNode));A.add(new e(a,z[b].l,z[b].t,null,z[b]))});A.add(new f(u,D,D.indexOf(G)));c.prototype.checkAddToCurrentState(A,u);I&&(A.add(new b(u,[{position:"absolute"}])),n.forEach(C,function(a,b){var c=z[b].l+z[b].w,d=z[b].t+z[b].h;if(0==b||z[b].l<p)p=z[b].l;if(0==b||z[b].t<B)B=z[b].t;if(0==b||c>y)y=c;if(0==
b||d>x)x=d}),A.add(new e(u,p,B)),A.add(new k(u,y-p,x-B)));n.forEach(C,function(a){A.add(new d(a,u,"last"))});I&&n.forEach(C,function(a,b){A.add(new e(a,z[b].l,z[b].t,null,z[b]))});h.getCommandStack().execute(A);h.select(u)}else console.error("missing surroundWithTagName")},isEnabled:function(a){if((a=this.fixupContext(a))&&a.getSelection().length){var b=a.getSelection()[0].getParent(),c=[];if(!b||!b.length)return!1;if(n.every(a.getSelection(),function(a){var d=a.getParent();if(!d)return!1;c.push(b.indexOf(a));
return b.id==d.id})){c.sort();var d;for(a=c.shift();c.length;a=d)if(d=c.shift(),d!=a+1)return!1;return!0}}return!1}})})},"davinci/ve/actions/SelectParentAction":function(){define(["dojo/_base/declare","davinci/ve/actions/_SelectAncestorAction"],function(p,n){return p("davinci.ve.actions.SelectParentAction",[n],{run:function(m){var h=(m=this.fixupContext(m))&&m.getSelection();this.selectionSameParentNotBody(h)&&m.select(h[0].getParent())},isEnabled:function(m){m=(m=this.fixupContext(m))&&m.getSelection();
return this.selectionSameParentNotBody(m)}})})},"davinci/ve/actions/_SelectAncestorAction":function(){define(["dojo/_base/declare","davinci/ve/actions/ContextAction"],function(p,n){return p("davinci.ve.actions._SelectAncestorAction",[n],{shouldShow:function(m){return(m=this.fixupContext(m))&&m.editor&&"davinci.ve.HTMLPageEditor"==m.editor.editorID},selectionSameParentNotBody:function(m){if(!m||0===m.length)return!1;var h=m[0].getParent();if(!h||!h.domNode)return!1;for(var g=0;g<m.length;g++)if(m[g].getParent()!=
h)return!1;return!0}})})},"davinci/ve/actions/SelectAncestorAction":function(){define(["dojo/_base/declare","davinci/ve/actions/_SelectAncestorAction","davinci/Workbench","davinci/lang/ve"],function(p,n,m,h){return p("davinci.ve.actions.SelectAncestorAction",[n],{run:function(g){var f=(g=this.fixupContext(g))&&g.getSelection();if(this.selectionSameParentNotBody(f)){for(var b=[],f=f[0].getParent();"BODY"!=f.domNode.tagName;)b.push(f),f=f.getParent();for(var f='\x3cdiv class\x3d"SelectAncestorLabel"\x3e'+
h.selectAncestorLabel+'\x3c/div\x3e\x3cselect dojoType\x3d"dijit.form.Select" id\x3d"SelectAncestor" name\x3d"SelectAncestor" style\x3d"width:12em;"\x3e\x3coption value\x3d"-1"\x3e\x3c/option\x3e',e=0;e<b.length;e++)var k=require("davinci/ve/widget").getLabel(b[e]),f=f+('\x3coption value\x3d"'+e+'"\x3e'+k+"\x3c/option\x3e");m.showMessage(h.selectAncestorTitle,f+"\x3c/select\x3e\x3cbr/\x3e");f=dijit.byId("SelectAncestor");f._selectAncestor=this._selectAncestor;dojo.connect(f,"onChange",function(d){g.select(b[d])})}},
isEnabled:function(g){g=(g=this.fixupContext(g))&&g.getSelection();return this.selectionSameParentNotBody(g)}})})},"davinci/ve/actions/UnselectAllAction":function(){define(["dojo/_base/declare","davinci/ve/actions/ContextAction"],function(p,n){return p("davinci.ve.actions.SelectParentAction",[n],{run:function(m){m=this.fixupContext(m);0<(m&&m.getSelection()).length&&m.deselect()},isEnabled:function(m){return(m=(m=this.fixupContext(m))&&m.getSelection())&&0<m.length}})})},"davinci/ve/actions/ArrangeAction":function(){define(["dojo/_base/declare",
"./_ReorderAction","davinci/commands/CompoundCommand","davinci/ve/commands/ReparentCommand"],function(p,n,m,h){return p("davinci.ve.actions.ArrangeAction",[n],{run:function(g){},isEnabled:function(g){return!0},shouldShow:function(g){return(g=(g=this.fixupContext(g))?g.editor:null)&&"davinci.ve.PageEditor"==g.declaredClass}})})},"davinci/ve/actions/_ReorderAction":function(){define(["dojo/_base/declare","dojo/_base/array","dojo/dom-style","davinci/ve/actions/ContextAction"],function(p,n,m,h){return p("davinci.ve.actions._ReorderAction",
[h],{shouldShow:function(g){return(g=this.fixupContext(g))&&g.editor&&"davinci.ve.HTMLPageEditor"==g.editor.editorID},selectionSameParentAllAbsolute:function(g){if(0===g.length)return!1;var f=g[0].getParent();if(!f)return!1;for(var b=0;b<g.length;b++){var e=g[b];if(e.getParent()!=f||"absolute"!=(e&&e.domNode?m.get(e.domNode,"position"):null))return!1}return!0},selectionSameParentAllAbsoluteAdjacent:function(g){if(!g||0===g.length||!this.selectionSameParentAllAbsolute(g))return!1;var f=g[0].getParent();
if(!f||!f.length)return!1;for(var f=f.getChildren(),b=Number.MAX_VALUE,e=Number.MIN_VALUE,k=0;k<f.length;k++)0<=g.indexOf(f[k])&&(b=k<b?k:b,e=k>e?k:e);return e-b+1===g.length},getAbsoluteSiblings:function(g){g=g&&g.getParent&&g.getParent();return g?(g=g.getChildren&&g.getChildren())?n.filter(g,function(f){return"absolute"==(f&&f.domNode?m.get(f.domNode,"position"):null)}):[]:[]}})})},"davinci/ve/actions/MoveToFrontAction":function(){define(["dojo/_base/declare","./_ReorderAction","davinci/commands/CompoundCommand",
"davinci/ve/commands/ReparentCommand"],function(p,n,m,h){return p("davinci.ve.actions.MoveToFrontAction",[n],{name:"MoveToFront",iconClass:"editActionIcon editMoveToFrontIcon",run:function(g){if(g=this.fixupContext(g)){var f=g&&g.getSelection?g.getSelection():[];if(0!==f.length&&this.selectionSameParentAllAbsolute(f)){for(var b=f[0].getParent(),e=this.getAbsoluteSiblings(f[0]),k=new m,d=0;d<e.length;d++){var c=e[d];0<=f.indexOf(c)&&k.add(new h(c,b,null))}g.getCommandStack().execute(k)}}},isEnabled:function(g){g=
(g=this.fixupContext(g))&&g.getSelection?g.getSelection():[];if(0===g.length||!this.selectionSameParentAllAbsolute(g))return!1;for(var f=this.getAbsoluteSiblings(g[0]),b=0;b<g.length;b++)if(f.indexOf(g[b])<f.length-g.length)return!0;return!1}})})},"davinci/ve/actions/MoveToBackAction":function(){define(["dojo/_base/declare","./_ReorderAction","davinci/commands/CompoundCommand","davinci/ve/commands/ReparentCommand"],function(p,n,m,h){return p("davinci.ve.actions.MoveToBackAction",[n],{name:"MoveToBack",
iconClass:"editActionIcon editMoveToBackIcon",run:function(g){if(g=this.fixupContext(g)){var f=g&&g.getSelection?g.getSelection():[];if(0!==f.length&&this.selectionSameParentAllAbsolute(f)){for(var b=f[0].getParent(),e=this.getAbsoluteSiblings(f[0]),k=new m,d=e.length-1;0<=d;d--){var c=e[d];0<=f.indexOf(c)&&k.add(new h(c,b,0))}g.getCommandStack().execute(k)}}},isEnabled:function(g){g=(g=this.fixupContext(g))&&g.getSelection?g.getSelection():[];if(0===g.length||!this.selectionSameParentAllAbsolute(g))return!1;
for(var f=this.getAbsoluteSiblings(g[0]),b=0;b<g.length;b++)if(f.indexOf(g[b])>g.length-1)return!0;return!1}})})},"davinci/ve/actions/MoveForwardAction":function(){define(["dojo/_base/declare","./_ReorderAction","davinci/commands/CompoundCommand","davinci/ve/commands/ReparentCommand"],function(p,n,m,h){return p("davinci.ve.actions.MoveForwardAction",[n],{name:"MoveForward",iconClass:"editActionIcon editMoveForwardIcon",run:function(g){if(g=this.fixupContext(g)){var f=g&&g.getSelection?g.getSelection():
[];if(0!==f.length&&this.selectionSameParentAllAbsoluteAdjacent(f)){for(var b,e=f[0].getParent(),k=e.getChildren(),d=this.getAbsoluteSiblings(f[0]),c=new m,a=f.slice(0),n=0;n<d.length;n++){b=d[n];var p=a.indexOf(b);if(0<=p)a.splice(p,1);else if(0===a.length)break}k=k.indexOf(b)+1;for(a=0;a<d.length;a++)b=d[a],0<=f.indexOf(b)&&c.add(new h(b,e,k));g.getCommandStack().execute(c)}}},isEnabled:function(g){g=(g=this.fixupContext(g))&&g.getSelection?g.getSelection():[];if(0===g.length||!this.selectionSameParentAllAbsoluteAdjacent(g))return!1;
for(var f=this.getAbsoluteSiblings(g[0]),b=0;b<g.length;b++)if(f.indexOf(g[b])<f.length-g.length)return!0;return!1}})})},"davinci/ve/actions/MoveBackwardAction":function(){define(["dojo/_base/declare","./_ReorderAction","davinci/commands/CompoundCommand","davinci/ve/commands/ReparentCommand"],function(p,n,m,h){return p("davinci.ve.actions.MoveBackwardAction",[n],{name:"MoveBackward",iconClass:"editActionIcon editMoveBackwardIcon",run:function(g){if(g=this.fixupContext(g)){var f=g&&g.getSelection?
g.getSelection():[];if(0!==f.length&&this.selectionSameParentAllAbsoluteAdjacent(f)){for(var b,e=f[0].getParent(),k=e.getChildren(),d=this.getAbsoluteSiblings(f[0]),c=new m,a=f.slice(0),n=d.length-1;0<=n;n--){b=d[n];var p=a.indexOf(b);if(0<=p)a.splice(p,1);else if(0===a.length)break}k=k.indexOf(b);for(a=d.length-1;0<=a;a--)b=d[a],0<=f.indexOf(b)&&c.add(new h(b,e,k));g.getCommandStack().execute(c)}}},isEnabled:function(g){g=(g=this.fixupContext(g))&&g.getSelection?g.getSelection():[];if(0===g.length||
!this.selectionSameParentAllAbsoluteAdjacent(g))return!1;for(var f=this.getAbsoluteSiblings(g[0]),b=0;b<g.length;b++)if(f.indexOf(g[b])>g.length-1)return!0;return!1}})})},"davinci/ve/actions/OtherAction":function(){define(["dojo/_base/declare","./_ReorderAction","davinci/commands/CompoundCommand","davinci/ve/commands/ReparentCommand"],function(p,n,m,h){return p("davinci.ve.actions.OtherAction",[n],{run:function(g){},isEnabled:function(g){return!0},shouldShow:function(g){return(g=(g=this.fixupContext(g))?
g.editor:null)&&"davinci.ve.PageEditor"==g.declaredClass}})})},"davinci/ve/actions/EnableApplicationStates":function(){define("dojo/_base/declare dojo/_base/connect dojo/dom-class dijit/_WidgetBase dijit/_TemplatedMixin dijit/_WidgetsInTemplateMixin davinci/Runtime davinci/Workbench davinci/ve/metadata davinci/ve/widget davinci/ve/States davinci/actions/Action davinci/lang/ve dijit/lang/_common dojo/text!./templates/EnableApplicationStates.html dijit/form/TextBox".split(" "),function(p,n,m,h,g,f,
b,e,k,d,c,a,q,w,r){var B=function(){if(b.currentEditor&&b.currentEditor.currentEditor&&b.currentEditor.currentEditor.context){context=b.currentEditor.currentEditor.context;var a=context.getSelection();if(1==a.length)return"ANY"==k.getAllowedChild(a[0].type)}return!1};p("davinci.ve.actions.EnableApplicationStatesWidget",[h,g,f],{templateString:r,widgetsInTemplate:!0,veNls:q,commonNls:w,oldValue:null,widget:null,postCreate:function(){if(b.currentEditor&&b.currentEditor.currentEditor&&b.currentEditor.currentEditor.context){editor=
this.editor=b.currentEditor;context=this.context=b.currentEditor.currentEditor.context;var a=context.getSelection();if(0<a.length){var a=this.widget=a[0],e=d.getLabel(a);this.widgetLabel.innerHTML=e;this.oldValue=c.isStateContainer(a.domNode);this.checkBoxWidget.set("checked",this.oldValue);this.oldValue?(a=c.getStates(a.domNode),1<a.length?(a.splice(0,1),this.statesListDiv.innerHTML=q.EnableApplicationStatesCurrentStates+": "+a.join(", ")):this.statesListDiv.innerHTML=q.EnableApplicationStatesCurrentStates+
": "+q.EnableApplicationStatesNone,this.description.innerHTML=q.DisableAsStateContainerDescription):(this.description.innerHTML=q.EnableAsStateContainerDescription,this.statesListDiv.innerHTML="")}this.okButton.connect(this.okButton,"onClick",dojo.hitch(this,function(a){this.onOk(a)}));this.cancelButton.connect(this.cancelButton,"onClick",dojo.hitch(this,function(a){this.onCancel(a)}))}},_onKeyPress:function(a){if(a.keyCode==dojo.keys.ENTER)this.onOk()},onOk:function(){var a=this.checkBoxWidget.get("checked");
if(a!=this.oldValue){var b=this.widget.domNode;a?(b._maqAppStates={},a=c.serialize(b),this.widget._srcElement.addAttribute(c.APPSTATES_ATTRIBUTE,a.maqAppStates)):(delete b._maqAppStates,this.widget._srcElement.removeAttribute(c.APPSTATES_ATTRIBUTE),c.removeUnusedStates(this.context));this.editor._visualChanged();n.publish("/maqetta/appstates/state/containerChange",[])}this.onClose()},onCancel:function(){this.onClose()}});return p("davinci.ve.actions.EnableApplicationStates",[a],{run:function(){if(B()&&
b.currentEditor&&b.currentEditor.currentEditor&&b.currentEditor.currentEditor.context){var a=new davinci.ve.actions.EnableApplicationStatesWidget;e.showModal(a,q.EnableApplicationStates,{width:"370px"})}},isEnabled:function(){return B()}})})},"davinci/ve/actions/ViewDesignAction":function(){define(["dojo/_base/declare","davinci/ve/actions/ContextAction"],function(p,n){return p("davinci.ve.actions.ViewDesignAction",[n],{run:function(m){(m=this.fixupContext(m))&&m.editor&&m.editor.switchDisplayModeDesign&&
m.editor.switchDisplayModeDesign()},updateStyling:function(){var m=davinci.Workbench.getOpenEditor();if(m&&m.getDisplayMode){var m=m.getDisplayMode(),h=dojo.query(".maqDesignButton")[0];h&&("design"==m?dojo.addClass(h,"maqLabelButtonSelected"):dojo.removeClass(h,"maqLabelButtonSelected"))}}})})},"davinci/ve/actions/ViewSourceAction":function(){define(["dojo/_base/declare","davinci/ve/actions/ContextAction","davinci/lang/ve"],function(p,n,m){return p("davinci.ve.actions.ViewSourceAction",[n],{run:function(h){(h=
this.fixupContext(h))&&h.editor&&h.editor.switchDisplayModeSourceLatest&&(editor=h.editor,editor.switchDisplayModeSourceLatest())},updateStyling:function(){var h=davinci.Workbench.getOpenEditor();if(h&&h.getDisplayMode){var g=h.getDisplayMode(),h=h.getSourceDisplayMode(),f=dojo.query(".maqSourceComboButton")[0];if(f){var b=dijit.byNode(f);b&&b.set("label",m["SourceComboButton-"+h]);"design"==g?dojo.removeClass(f,"maqLabelButtonSelected"):dojo.addClass(f,"maqLabelButtonSelected")}}}})})},"davinci/ve/actions/ViewSourceMenuAction":function(){define(["dojo/_base/declare",
"davinci/ve/actions/ContextAction"],function(p,n){return p("davinci.ve.actions.ViewSourceMenuAction",[n],{run:function(m){(m=this.fixupContext(m))&&m.editor&&m.editor.switchDisplayModeSource&&m.editor.switchDisplayModeSource()}})})},"davinci/ve/actions/ViewSplitHMenuAction":function(){define(["dojo/_base/declare","davinci/ve/actions/ContextAction"],function(p,n){return p("davinci.ve.actions.ViewSplitHMenuAction",[n],{run:function(m){(m=this.fixupContext(m))&&m.editor&&m.editor.switchDisplayModeSplitHorizontal&&
m.editor.switchDisplayModeSplitHorizontal()}})})},"davinci/ve/actions/ViewSplitVMenuAction":function(){define(["dojo/_base/declare","davinci/ve/actions/ContextAction"],function(p,n){return p("davinci.ve.actions.ViewSplitVMenuAction",[n],{run:function(m){(m=this.fixupContext(m))&&m.editor&&m.editor.switchDisplayModeSplitVertical&&m.editor.switchDisplayModeSplitVertical()}})})},"davinci/ve/actions/AddState":function(){define("dojo/_base/declare davinci/Runtime davinci/Workbench davinci/workbench/Preferences davinci/ve/States davinci/actions/Action davinci/lang/ve davinci/ve/actions/_AddManageStatesWidget".split(" "),
function(p,n,m,h,g,f,b,e){return p("davinci.ve.actions.AddState",[f],{run:function(){var e;n.currentEditor&&n.currentEditor.currentEditor&&n.currentEditor.currentEditor.context&&(e=n.currentEditor.currentEditor.context,(e=g.getFocus(e.rootNode))&&e.stateContainerNode&&(e=new davinci.ve.actions._AddManageStatesWidget({node:e.stateContainerNode}),e._calledBy="AddState",m.showModal(e,b.createNewState,null,null,!0),e.okButton.set("disabled",!0)))}})})},"davinci/ve/actions/_AddManageStatesWidget":function(){define("dojo/_base/declare dojo/dom-style dojo/_base/event dijit/_WidgetBase dijit/_TemplatedMixin dijit/_WidgetsInTemplateMixin davinci/Runtime davinci/Workbench davinci/workbench/Preferences davinci/ve/States davinci/commands/CompoundCommand davinci/ve/commands/StyleCommand davinci/ve/commands/AppStateCommand davinci/actions/Action davinci/lang/ve dijit/lang/_common dojo/text!./templates/AddState.html dijit/form/TextBox dijit/form/Select dijit/form/CheckBox dijit/form/Button".split(" "),
function(p,n,m,h,g,f,b,e,k,d,c,a,q,w,r,B,y,x,z,u,v){return p("davinci.ve.actions._AddManageStatesWidget",[h,g,f],{templateString:y,widgetsInTemplate:!0,veNls:r,commonNls:B,_isValid:function(){var a=this.domNode.querySelector(".addStateNameDiv");if(a&&"none"==n.get(a,"display"))return!0;a=this.input.get("value");return a?davinci.ve.states.hasState(this.node,a)?(alert(dojo.string.substitute(r.stateNameExists,{name:a})),!1):!0:!1},_onKeyPress:function(a){a.keyCode!=dojo.keys.ENTER&&(this._isValid()?
this.okButton.set("disabled",!1):this.okButton.set("disabled",!0))},onOk:function(){var a;if(b.currentEditor&&b.currentEditor.currentEditor&&b.currentEditor.currentEditor.context){if(a=b.currentEditor.currentEditor.context,(a=d.getFocus(a.rootNode))&&a.stateContainerNode){d.getState(a.stateContainerNode);var e=this.input.get("value");if(e)if(b.currentEditor&&b.currentEditor.currentEditor&&b.currentEditor.currentEditor.context){a=b.currentEditor.currentEditor.context;var f=new c;e&&f.add(new q({action:"add",
state:e,stateContainerNode:this.node,context:a}));a.getCommandStack().execute(f)}else console.error("AddState.js - cannot determine context.")}}else console.error("_AddManageStatesWidget.js (from "+this._calledBy+" - cannot determine context.")},onCancel:function(){this.onClose()}})})},"davinci/ve/actions/RemoveState":function(){define("dojo/_base/declare davinci/Runtime davinci/ve/States davinci/actions/Action davinci/commands/CompoundCommand davinci/ve/commands/AppStateCommand".split(" "),function(p,
n,m,h,g,f){return p("davinci.ve.actions.RemoveState",[h],{run:function(){var b;if(n.currentEditor&&n.currentEditor.currentEditor&&n.currentEditor.currentEditor.context){b=n.currentEditor.currentEditor.context;var e=m.getFocus(b.rootNode);if(e&&e.state&&e.state!==m.NORMAL){var e=e.stateContainerNode,k=k=davinci.ve.states.getState(e);if(k){var d=new g;d.add(new f({action:"remove",state:k,stateContainerNode:e,context:b}));b.getCommandStack().execute(d)}}}}})})},"davinci/ve/actions/ModifyState":function(){define("dojo/_base/declare dojo/Deferred dojo/_base/connect dijit/_WidgetBase dijit/_TemplatedMixin dijit/_WidgetsInTemplateMixin dijit/popup dijit/focus davinci/ve/States davinci/ui/Dialog davinci/Runtime davinci/Workbench davinci/actions/Action davinci/lang/ve dijit/lang/_common dojo/text!./templates/ModifyState.html dijit/form/TextBox dijit/form/ValidationTextBox davinci/commands/CompoundCommand davinci/ve/commands/AppStateCommand".split(" "),
function(p,n,m,h,g,f,b,e,k,d,c,a,q,w,r,B,y,x,z,u){var v=null;p("davinci.ve.actions.ModifyStateWidget",[h,g,f],{templateString:B,widgetsInTemplate:!0,veNls:w,commonNls:r,isNormalState:!1,newName:null,oldInitialStateOn:null,postCreate:function(){this._connections=[];dijit.byId("state_rename_tooltip_dialog");v.then(function(){this._statesFocus.state&&this._statesFocus.state!==k.NORMAL||(this.isNormalState=!0);var a=dojo.byId("modify_state_old_name");a&&(this._statesFocus&&this._statesFocus.state&&!this.isNormalState?
a.innerHTML=this._statesFocus.state:(a.innerHTML="\x3ci\x3e"+k.NORMAL+"\x3c/i\x3e",this.renameButton.set("disabled",!0)));this.oldInitialStateOn=a=k.getInitial(this._statesFocus.stateContainerNode)===this._statesFocus.state;this.initialState.set("checked",a);a&&this.isNormalState&&this.initialState.set("disabled",!0);this._dialog.connect(this._dialog,"hide",function(a){this.onClose()}.bind(this));this.okButton.connect(this.okButton,"onClick",dojo.hitch(this,function(a){this.onOk(a)}));this.cancelButton.connect(this.cancelButton,
"onClick",dojo.hitch(this,function(a){this.onCancel(a)}));if(a=dijit.byId("state_rename_tooltip_dialog"))a.connect(a,"onShow",function(a){this.renameStateShowTooltipDialog(a)}.bind(this)),a.connect(a,"onHide",function(a){this.renameStateHideTooltipDialog(a)}.bind(this))}.bind(this))},renameStateShowTooltipDialog:function(a){a=dojo.byId("modify_state_old_name");var c=dojo.byId("state_rename_new_name"),d=dijit.byId("state_rename_new_name");a&&d&&d.set("value",a.innerText);e.focus(c);a=dijit.byId("state_rename_do_it");
c=dijit.byId("state_rename_cancel");a.connect(a,"onMouseDown",function(a){a.stopPropagation()});c.connect(a,"onMouseDown",function(a){a.stopPropagation()});a.connect(a,"onClick",function(a){this.renameStateDoIt(a)}.bind(this));c.connect(c,"onClick",function(a){a=dijit.byId("state_rename_tooltip_dialog");b.close(a)}.bind(this))},renameStateDoIt:function(a){a=dojo.byId("modify_state_old_name");var c=dijit.byId("state_rename_new_name"),c=c?c.get("value"):null,d=dijit.byId("state_rename_tooltip_dialog");
a&&c&&(this.newName=a.innerHTML=c);d&&b.close(d)},renameStateHideTooltipDialog:function(a){},onOk:function(a){if(c.currentEditor&&c.currentEditor.currentEditor&&c.currentEditor.currentEditor.context){a=c.currentEditor.currentEditor.context;var b=k.getFocus(a.rootNode);if(b&&b.stateContainerNode){var d;this.newName&&this.newName!==this._statesFocus.state&&(d=this.newName);var e,f=this.initialState.get("checked");f!==this.oldInitialStateOn&&(e=b.state?b.state:"undefined",e=f?e:null);if(d||e)f=new z,
f.add(new u({action:"modify",state:b.state,stateContainerNode:b.stateContainerNode,context:a,newState:d,initialState:e})),a.getCommandStack().execute(f);this.onClose()}}},onCancel:function(){this.onClose()},onClose:function(a){for(;a=this._connections.pop();)m.disconnect(a)}});return p("davinci.ve.actions.ModifyState",[q],{run:function(){var b;if(c.currentEditor&&c.currentEditor.currentEditor&&c.currentEditor.currentEditor.context&&(b=c.currentEditor.currentEditor.context,b=k.getFocus(b.rootNode))){v=
new n;var d=new davinci.ve.actions.ModifyStateWidget,e=a.showModal(d,w.modifyState);this._dialog=d._dialog=e;d._statesFocus=b;v.resolve()}}})})},"davinci/ve/actions/ManageStates":function(){define("dojo/_base/declare davinci/Runtime davinci/Workbench davinci/ve/actions/ContextAction davinci/workbench/Preferences dijit/registry davinci/ve/States davinci/actions/Action davinci/lang/ve davinci/ve/actions/_ManageStatesWidget".split(" "),function(p,n,m,h,g,f,b,e,k,d){return p("davinci.ve.actions.ManageStates",
[h],{run:function(){var c;n.currentEditor&&n.currentEditor.currentEditor&&n.currentEditor.currentEditor.context&&(c=n.currentEditor.currentEditor.context,(c=b.getFocus(c.rootNode))&&c.stateContainerNode&&(c=new davinci.ve.actions._ManageStatesWidget({node:c.stateContainerNode}),c._calledBy="ManageStates",c.okButton.set("label",k.updateLabel),c.updateDialog(),m.showModal(c,k.manageStates,{width:400},null,!0)))},isEnabled:function(b){b=this.fixupContext(b);var a=m.getOpenEditor();return a&&b?"davinci.ve.PageEditor"==
a.declaredClass?0<b.getSelection().length:!1:!1},shouldShow:function(b){return(b=(b=this.fixupContext(b))?b.editor:null)&&"davinci.ve.PageEditor"==b.declaredClass}})})},"davinci/ve/actions/_ManageStatesWidget":function(){define("dojo/_base/declare dojo/dom-construct dojo/on dojo/dom-style dojo/dom-class dojo/_base/event dijit/_WidgetBase dijit/_TemplatedMixin dijit/_WidgetsInTemplateMixin davinci/Runtime davinci/Workbench davinci/workbench/Preferences davinci/ve/States davinci/commands/CompoundCommand davinci/ve/commands/StyleCommand davinci/actions/Action davinci/lang/ve dijit/lang/_common dojo/text!./templates/ManageStates.html dijit/form/Button".split(" "),
function(p,n,m,h,g,f,b,e,k,d,c,a,q,w,r,B,y,x,z,u){return p("davinci.ve.actions._ManageStatesWidget",[b,e,k],{templateString:z,widgetsInTemplate:!0,anyCheckBoxChanges:!1,_states:[],_stateContainers:[],_checkBoxes:[],_overrideDisplayValue:[],_notes:[],_handlers:[],veNls:y,commonNls:x,constructor:function(){this.handlers=[]},postCreate:function(){if(this._getContext()){var a=this.domNode.querySelector(".manageStatesStatesListDiv");if(a){var b=this._getAllStatesInDoc();this._states=b.states;this._stateContainers=
b.stateContainers;if(b=this.domNode.querySelector(".manageStatesCheckAcceleratorsTable"))b.style.width="100%";if(b=this.domNode.querySelector(".manageStatesCheckCurrentStateOnlyCell"))b.style.textAlign="left";if(b=this.domNode.querySelector(".manageStatesCheckAllCell"))b.style.textAlign="center";if(b=this.domNode.querySelector(".manageStatesUncheckAllCell"))b.style.textAlign="right";for(var c,a=n.create("table",{"class":"manageStatesStatesListTable",style:"width:100%",border:0,cellspacing:0,cellpadding:3},
a),d=0;d<this._states.length;d++)b=n.create("tr",{},a),c=n.create("td",{"class":"manageStatesCheckboxCell"},b),this._checkBoxes[d]=n.create("div",{id:"manageStatesCheckBox_"+d,"class":"manageStatesCheckbox"},c),this._handlers.push(m(this._checkBoxes[d],"click",function(a,b){var c=this._checkBoxes[a];this.anyCheckBoxChanges=!0;g.remove(c,"manageStatesCheckboxNoneVisible");g.remove(c,"manageStatesCheckboxAllVisible");g.remove(c,"manageStatesCheckboxAllVisibleBackgroundAll");g.remove(c,"manageStatesCheckboxAllVisibleBackgroundSome");
g.remove(c,"manageStatesCheckboxSomeVisible");1==c._checkValue?(c._checkValue=0,g.add(c,"manageStatesCheckboxNoneVisible"),this._overrideDisplayValue[a]="none"):(c._checkValue=1,g.add(c,"manageStatesCheckboxAllVisible"),this._overrideDisplayValue[a]="");this.updateDialog()}.bind(this,d))),this._overrideDisplayValue[d]=null,c=this._states[d],n.create("td",{"class":"manageStatesStateNameCell",innerHTML:"Normal"==c?"Background":c},b),c=n.create("td",{"class":"manageStatesNotesCell"},b),this._notes[d]=
n.create("span",{"class":"manageStatesNotesSpan"},c)}(a=this.domNode.querySelector(".manageStatesCheckCurrentStateOnly"))&&this._handlers.push(m(a,"click",function(a){f.stop(a);this._acceleratorClicked("current")}.bind(this)));(a=this.domNode.querySelector(".manageStatesCheckAll"))&&this._handlers.push(m(a,"click",function(a){f.stop(a);this._acceleratorClicked("all")}.bind(this)));(a=this.domNode.querySelector(".manageStatesUncheckAll"))&&this._handlers.push(m(a,"click",function(a){f.stop(a);this._acceleratorClicked("none")}.bind(this)));
(a=this.domNode.querySelector(".manageStatesCheckBackgroundOnly"))&&this._handlers.push(m(a,"click",function(a){f.stop(a);this._acceleratorClicked("background")}.bind(this)));this.anyCheckBoxChanges=!1;setTimeout(function(){this.okButton.focus()}.bind(this),500)}},_acceleratorClicked:function(a){var b=this._getContext();if(b&&(b=q.getFocus(b.rootNode))&&b.stateContainerNode){for(var c=q.getState(b.stateContainerNode),d=0;d<this._states.length;d++){var e=this._states[d];if("undefined"==e||e==q.NORMAL)e=
void 0;var f=this._checkBoxes[d];g.remove(f,"manageStatesCheckboxNoneVisible");g.remove(f,"manageStatesCheckboxAllVisible");g.remove(f,"manageStatesCheckboxAllVisibleBackgroundAll");g.remove(f,"manageStatesCheckboxAllVisibleBackgroundSome");g.remove(f,"manageStatesCheckboxSomeVisible");"current"==a?e==c&&b.stateContainerNode==this._stateContainers[d]?(f._checkValue=1,g.add(f,"manageStatesCheckboxAllVisible"),this._overrideDisplayValue[d]=""):(f._checkValue=0,g.add(f,"manageStatesCheckboxNoneVisible"),
this._overrideDisplayValue[d]="none"):"all"==a?(f._checkValue=1,g.add(f,"manageStatesCheckboxAllVisible"),this._overrideDisplayValue[d]=""):"none"==a?(f._checkValue=0,g.add(f,"manageStatesCheckboxNoneVisible"),this._overrideDisplayValue[d]="none"):"background"==a&&(f._checkValue=1,g.add(f,"manageStatesCheckboxAllVisible"),this._overrideDisplayValue[d]=0==d?"":"$MAQ_DELETE_PROPERTY$")}this.anyCheckBoxChanges=!0;this.updateDialog()}},_isValid:function(){return!0},_onKeyPress:function(a){a.keyCode!=
dojo.keys.ENTER&&(this._isValid()?this.okButton.set("disabled",!1):this.okButton.set("disabled",!0))},_getAllStatesInDoc:function(){var a;if(d.currentEditor&&d.currentEditor.currentEditor&&d.currentEditor.currentEditor.context){a=d.currentEditor.currentEditor.context;var b=[],c=[];if(a=q.getAllStateContainers(a.rootNode))for(var e=0;e<a.length;e++)for(var f=q.getStates(a[e]),g=0;g<f.length;g++)b.push(f[g]),c.push(a[e]);return{states:b,stateContainers:c}}console.error("_ManageStatesWidget.js (from "+
this._calledBy+" - cannot determine context.")},_getContext:function(){var a;d.currentEditor&&d.currentEditor.currentEditor&&d.currentEditor.currentEditor.context?a=d.currentEditor.currentEditor.context:console.error("_ManageStatesWidget.js (from "+this._calledBy+" - cannot determine context.");return a},_getAllEffectedWidgets:function(){var a=this._getContext();if(!a)return[];var b=q.getFocus(a.rootNode);if(b&&b.stateContainerNode)return a.getSelection().slice(0)},updateDialog:function(){var a=this._getContext();
if(a){var b=q.getFocus(a.rootNode);if(b&&b.stateContainerNode)for(var b=this._getAllEffectedWidgets(),c=this._overrideDisplayValue[0],d=0;d<this._states.length;d++){var e=this._states[d];if(e==q.NORMAL||"undefined"==e)e=void 0;for(var f=0,k=0,h=0;h<b.length;h++){var m=b[h],n={undefined:c};n[void 0===e?"undefined":e]=this._overrideDisplayValue[d];m=q.getEffectiveDisplayValue(a,m,e,n);0!=m.effectiveDisplayValue.indexOf("none")&&(f++,e||"undefined"!=m.effectiveState?e&&m.effectiveState==e&&k++:k++)}e=
this._checkBoxes[d];h=this._notes[d];g.remove(e,"manageStatesCheckboxNoneVisible");g.remove(e,"manageStatesCheckboxAllVisible");g.remove(e,"manageStatesCheckboxAllVisibleBackgroundAll");g.remove(e,"manageStatesCheckboxAllVisibleBackgroundSome");g.remove(e,"manageStatesCheckboxSomeVisible");h.innerHTML="";0==f?(e._checkValue=0,g.add(e,"manageStatesCheckboxNoneVisible")):f==b.length?(e._checkValue=1,k==b.length?g.add(e,"manageStatesCheckboxAllVisible"):0<k?(g.add(e,"manageStatesCheckboxAllVisibleBackgroundSome"),
h.innerHTML=y.manageStatesSomeVisibleFromBackground):(g.add(e,"manageStatesCheckboxAllVisibleBackgroundAll"),h.innerHTML=y.manageStatesAllVisibleFromBackground)):(e._checkValue=2,g.add(e,"manageStatesCheckboxSomeVisible"),h.innerHTML=y.manageStatesSomeVisibleSomeHidden)}}},onOk:function(){if(this.anyCheckBoxChanges){var a=this._getContext();if(a){for(var b,c=this._getAllEffectedWidgets(),d=0;d<this._states.length;d++){var e=this._states[d];if(e==q.NORMAL||"undefined"==e)e=void 0;var f=this._checkBoxes[d]._checkValue;
if(0===f||1===f)for(var g=0;g<c.length;g++){var k=c[g];b||(b=new w);b.add(new r(k,[{display:this._overrideDisplayValue[d]?this._overrideDisplayValue[d]:1==f?"":"none"}],e))}}b&&a.getCommandStack().execute(b)}}},onCancel:function(){this.onClose()},destroy:function(){this.inherited(arguments);for(var a=0;a<this._handlers.length;a++)this._handlers[a].remove();this._handlers=[]}})})},"davinci/ve/actions/NewWidgetsCurrentState":function(){define("dojo/_base/declare davinci/Runtime davinci/Workbench davinci/ve/States davinci/actions/Action davinci/workbench/Preferences".split(" "),
function(p,n,m,h,g,f){return p("davinci.ve.actions.NewWidgetsCurrentState",[g],{run:function(){var b;if(n.currentEditor&&n.currentEditor.currentEditor&&n.currentEditor.currentEditor.context){b=n.currentEditor.currentEditor.context;var e=m.getProject(),g=f.getPreferences("davinci.ve.editorPrefs",e);g.newWidgetsCurrentState=g.newWidgetsCurrentState?!1:!0;f.savePreferences("davinci.ve.editorPrefs",e,g);h.updateStateIcons(b)}}})})},"davinci/ve/actions/HighlightBaseWidgets":function(){define("dojo/_base/declare davinci/Runtime davinci/Workbench davinci/ve/States davinci/actions/Action davinci/workbench/Preferences".split(" "),
function(p,n,m,h,g,f){return p("davinci.ve.actions.HighlightBaseWidgets",[g],{run:function(){var b;if(n.currentEditor&&n.currentEditor.currentEditor&&n.currentEditor.currentEditor.context){b=n.currentEditor.currentEditor.context;var e=m.getProject(),g=f.getPreferences("davinci.ve.editorPrefs",e);g.highlightBaseWidgets=g.highlightBaseWidgets?!1:!0;f.savePreferences("davinci.ve.editorPrefs",e,g);b.updateFocusAll()}}})})},"davinci/ve/actions/ShowInOutline":function(){define(["dojo/_base/declare","davinci/Runtime",
"davinci/Workbench","davinci/ve/actions/ContextAction"],function(p,n,m,h){return p("davinci.ve.actions.ManageStates",[h],{run:function(){var g=n.currentEditor;g&&g.delegate.showInOutline()},isEnabled:function(g){g=this.fixupContext(g);var f=m.getOpenEditor();return f&&g?"davinci.ve.PageEditor"==f.declaredClass?0<g.getSelection().length:!1:!1},shouldShow:function(g){return(g=(g=this.fixupContext(g))?g.editor:null)&&"davinci.ve.PageEditor"==g.declaredClass}})})},"davinci/ve/PageEditor":function(){define("require dojo/_base/declare ../ui/ModelEditor dojo/dnd/Moveable ../Runtime ../commands/CommandStack ../html/ui/HTMLEditor ./VisualEditor ./VisualEditorOutline ./widget ./States ../XPathUtils ../html/HtmlFileXPathAdapter ./utils/GeomUtils davinci/model/Factory xide/mixins/EventedMixin xide/mixins/ReloadMixin xide/utils xide/types xide/factory xideve/views/BlocksFileEditor xide/widgets/_Widget xide/views/_LayoutMixin xdocker/Docker2 xdocker/types wcDocker/iframe".split(" "),
function(p,n,m,h,g,f,b,e,k,d,c,a,q,w,r,B,y,x,z,u,v,A,C,G,D){n=n("davinci.ve.PageEditor",[m,A,B,y,C],{_latestSourceMode:"source",_latestLayoutMode:"flow",item:null,delegate:null,template:null,bottomTabContainer:null,textEditorPane:null,didBlockViews:!1,_propCP:null,createTab:function(a,b){var c=z.DOCKER;return this._docker.addTab(a||"DefaultTab",x.mixin({icon:!1,closeable:!0,moveable:!0,tabOrientation:c.TAB.TOP,location:c.DOCK.STACKED},b))},createLayout:function(){},constructor:function(a,b,c,d,g,
k){function h(a){setTimeout(function(){var a=m.getContext();a&&a.frameNode&&$(a.frameNode).css("pointer-events","initial")},a||4E3)}b=z.DOCKER;this.item=c;this.template=g;var m=this;this._commandStack=new f(this);this.savePoint=0;this._docker=G.createDefault(a,{});this.domNode=this._docker.$container[0];this._designCP=this.createTab(null,{title:"Design",icon:"fa-eye"});this._docker.on(z.DOCKER.EVENT.BEGIN_RESIZE,function(a){(a=m.getContext())&&a.frameNode&&$(a.frameNode).css("pointer-events","none");
h()});this._docker.on(z.DOCKER.EVENT.MOVE_STARTED,function(a){(a=m.getContext())&&a.frameNode&&$(a.frameNode).css("pointer-events","none");h()});this._docker.on(z.DOCKER.EVENT.MOVE_ENDED,function(a){h(1)});this._docker.on(z.DOCKER.EVENT.END_RESIZE,function(a){h(1)});this._docker.on(z.DOCKER.EVENT.BEGIN_FLOAT_RESIZE,function(a){a=m.getContext();$(a.frameNode).css("pointer-events","none");h()});this._docker.on(z.DOCKER.EVENT.END_FLOAT_RESIZE,function(a){h(1)});this._designCP.$container[0].domNode=this._designCP.$container[0];
this._designCP.domNode=this._designCP.$container[0];this._designCP.minSize(400,400);this.currentEditor=this.visualEditor=new e(this._designCP.$container[0],this,this.template);this.currentEditor._commandStack=this._commandStack;this.initReload();try{this._propCP=this.createTab(null,{title:"Props",icon:"fa-cogs",tabOrientation:b.TAB.TOP,location:b.TAB.RIGHT,target:this._designCP});this._propCP.maxSize(400);this._propCP.minSize(350);a=null;k.length?this._srcCP=a=this.createTab(null,{title:"HTML",icon:"fa-code",
tabOrientation:b.TAB.TOP,location:b.TAB.BOTTOM}):console.error("have no editors, ");k=null;try{k=this.htmlEditor=d(a)}catch(n){debugger}this.model=k.model;k._on(z.EVENTS.ON_FILE_CONTENT_CHANGED,function(a){m.delegate.onEditorContentChanged(a)});this._displayMode="design";this._connect(this.visualEditor,"onContentChange","_visualChanged");this.subscribe("/davinci/ui/styleValuesChange",this._stylePropertiesChange);this.subscribe("/davinci/ui/widgetSelected",this._widgetSelectionChange);this.subscribe("/davinci/ui/selectionChanged",
this._modelSelectionChange);this.subscribe("/davinci/ui/editorSelected",this._editorSelected.bind(this));this.subscribe("/davinci/ui/context/loaded",this._contextLoaded.bind(this));this.subscribe("/davinci/ui/deviceChanged",this._deviceChanged.bind(this));this._designCP.getSplitter().pos(.5);setTimeout(function(){m._srcCP.getSplitter().pos(.5);m._propCP.maxSize(500)},1500);this.resize()}catch(p){this.visualEditor._connectCallback(p),console.error("page editor crash : "+p)}this.add(this._docker)},
getPropertyPane:function(){return this._propCP},getDesignPane:function(){return this._designCP},getSourcePane:function(){return this._srcCP},getVisualEditor:function(){return this.visualEditor},getBlocksPane:function(){return this._blocksTab},onSceneBlocksLoaded:function(a,b){if(0!=b.showBlocks&&!this.didBlockViews){this.didBlockViews=!0;var c=a.blockScopes,d=a.ctx,e=z.DOCKER;this._blocksTab=this.createTab(null,{title:"Blocks",icon:"fa-eye",target:this._srcCP,tabOrientation:e.TAB.TOP,location:e.DOCK.STACKED});
c=c[0];e=this._blocksTab;d=x.addWidget(v,{style:"height:inherit;width:inherit;padding:0px;",ctx:d,pageEditor:this,visualEditor:b,editorContext:this.getContext(),item:{path:c.path,mount:c.mount}},this,e,!0);d.initWithScope(c);e.add(d);this._blockEditor=d;(d=b.getItem())&&this._blockEditor._widgetSelectionChanged({selection:[d]})}},getBlockEditor:function(){return this._blockEditor},setRootElement:function(a){this._rootElement=a},supports:function(a){return a.match(/^palette|properties|style|states|inline-style|MultiPropTarget|propsect_common|propsect_widgetSpecific|propsect_events|propsect_layout|propsect_paddingMargins|propsect_background|propsect_border|propsect_fontsAndText|propsect_shapesSVG$/)},
focus:function(){},_editorSelected:function(a){var b=this.getContext();b&&(this==a.oldEditor&&b.hideFocusAll(),a.editor&&a.editor.editorContainer&&("davinci.ve.PageEditor"==a.editor.declaredClass||"davinci.ve.themeEditor.ThemeEditor"==a.editor.declaredClass)&&this==a.editor&&(a=b.getFlowLayout()?"flow":"absolute",this._updateLayoutDropDownButton(a),b.clearCachedWidgetBounds()))},_contextLoaded:function(){},_deviceChanged:function(){if(g.currentEditor==this&&this.editorContainer){var a=this.getContext();
a&&a.updateFocusAll&&setTimeout(function(){a.updateFocusAll()},1E3)}},_updateLayoutDropDownButton:function(a){(a=dojo.query(".maqLayoutDropDownButton"))&&a[0]&&dijit.byNode(a[0])},_selectLayout:function(a){this._latestLayoutMode=a;p(["davinci/actions/SelectLayoutAction"],function(b){b=new b;b._changeLayoutCommand(a)});this._updateLayoutDropDownButton(a)},selectLayoutFlow:function(){this._selectLayout("flow")},selectLayoutAbsolute:function(){this._selectLayout("absolute")},getDisplayMode:function(){return this._displayMode},
getSourceDisplayMode:function(){return this._latestSourceMode},_switchDisplayModeSource:function(a){this._latestSourceMode=a;this.switchDisplayMode(a)},switchDisplayModeSource:function(){this._switchDisplayModeSource("source")},switchDisplayModeSplitVertical:function(){this._switchDisplayModeSource("splitVertical")},switchDisplayModeSplitHorizontal:function(){this._switchDisplayModeSource("splitHorizontal")},switchDisplayModeSourceLatest:function(){this.switchDisplayMode(this._latestSourceMode)},
switchDisplayModeDesign:function(){this.switchDisplayMode("design")},switchDisplayMode:function(a){},hidePropertyPane:function(a){this.getPropertyPane()},_modelSelectionChange:function(a){if("source"!=this._displayMode&&p("davinci/Runtime").currentEditor===this&&(this._selectionCssRules=null,a.length&&(a=a[0].model)&&"HTMLElement"==a.elementType&&(a=a.getAttribute("id"))&&"source"!=this._displayMode)){a=d.byId(a,this.visualEditor.context.getDocument());var b=w.getMarginBoxPageCoords(a.domNode);this.getContext().getGlobal().scroll(b.l,
b.t);this.visualEditor.context.select(a)}},_widgetSelectionChange:function(a){!0===a.isFake||!this.visualEditor.context||a&&a.length&&a[0]._edit_context!=this.visualEditor.context||(a=this.visualEditor.context.getSelection())&&a.length&&"design"!=this._displayMode&&this.htmlEditor.selectModel([{model:a[0]._srcElement}])},_stylePropertiesChange:function(a){if(!(a&&a.cascade&&a.cascade._widget&&1==a.cascade._widget.isFake)){this.visualEditor._stylePropertiesChange(a);var b=this.visualEditor.context.getSelection();
if(b&&b[0]&&(b=x.getNode(b[0]))&&b.onChanged)b.onChanged();a=a.cascade._topWidgetDom;$(a).attr("style");this.getContext().updateBackground(a)}},_setDirty:function(){this.setDirty(!0)},setDirty:function(a){if(this.isDirty=a)this.lastModifiedTime=Date.now();this.editorContainer&&this.editorContainer.setDirty(a)},_visualChanged:function(a){this.delegate.shouldUpdateTextEditor()&&(a||this._setDirty(),this.htmlEditor.set("value",this.model.getText(),!0),this.getContext().visualEditorChanged())},_srcChanged:function(){dojo.withDoc(window.document,
function(){this.htmlEditor.isTyping&&(this.visualEditor.skipSave=!0);var a=this.visualEditor.context,b=a&&this._getStatesScenes(a);this.visualEditor.setContent(this.fileName,this.htmlEditor.model);this.editorContainer.updateToolbars();dojo.publish("/davinci/ui/context/pagerebuilt",[a]);b&&this._setStatesScenes(a,b);delete this.visualEditor.skipSave;this._setDirty()},this)},_getStatesScenes:function(a){return[]},_setStatesScenes:function(a,b){},getContext:function(){return this.visualEditor.context},
getOutline:function(){this.outline||(this.outline=new k(this));return this.outline},getPropertiesView:function(){return this.currentEditor.getPropertiesView()},setContent:function(a,b,c){this.fileName=a;this.htmlEditor.setContent(a,b);this.visualEditor.setContent(a,this.htmlEditor.model,c);this._connect(this.htmlEditor.model,"onChange","_themeChange")},_themeChange:function(a){a&&"CSSRule"===a.elementType&&(this.setDirty(!0),this.visualEditor.context.hotModifyCssRule(a))},getDefaultContent:function(){this._isNewFile=
!0;return this.visualEditor.getDefaultContent()},selectModel:function(a,b){if(!(this.publishingSelect||b&&this!=b)){var c=a&&a[0];c&&(c.elementType?this.htmlEditor.selectModel(a):c.model&&c.model.isWidget&&this.visualEditor.context.select(c.model,c.add))}},save:function(a){if(this.delegate&&this.delegate.save){var b=this.visualEditor.context.getModel(),c=b.getText();this.delegate.save(this,this.visualEditor,b,c)}else this.savePoint=this._commandStack.getUndoCount(),(b=this.visualEditor.save(a))&&
b.then&&b.then(function(b){this.isDirty=a;this.editorContainer&&this.editorContainer.domNode&&this.editorContainer.setDirty(a)}.bind(this),function(a){})},removeWorkingCopy:function(){},previewInBrowser:function(){this.visualEditor.previewInBrowser()},destroy:function(){this.inherited(arguments);this.visualEditor.destroy();this.htmlEditor.destroy();x.destroy(this.bottomTabContainer)},getText:function(){return this.htmlEditor.getText()},onResize:function(){for(var a=this.getContext(),b=a.getSelection(),
c=0;c<b.length;c++)a.select(b[c],0!=c)},handleKeyEvent:function(a){},getFocusContainerBounds:function(){if("source"==this._displayMode)return{l:0,t:0,w:0,h:0};var a=w.getBorderBoxPageCoords(this._designCP.domNode);a.l-=8;a.t-=8;"none"==(this.visualEditor&&this.visualEditor.getDevice?this.visualEditor.getDevice():"none")?(a.w+="splitVertical"==this._displayMode?8:16,a.h+="splitHorizontal"==this._displayMode?8:16):(a.w+=8,a.h+=8);return a},getCommandStack:function(){return this.getContext().getCommandStack()}});
n.__test="asd2f";return n})},"davinci/ui/ModelEditor":function(){define(["dojo/_base/declare","../Runtime","./TextEditor","../commands/SourceChangeCommand"],function(p,n,m,h){return p(m,{constructor:function(g,f){this.subscribe("/davinci/ui/selectionChanged",this.selectModel)},colorize:function(g){return null},setContent:function(g,f){this.inherited(arguments);this.model.fileName=g;this.model.setText(f)},getHoverText:function(g,f){var b=this.convertMouseToLine(g,f);return this.model.findChildAtPosition({startOffset:b.row,
endOffset:b.col}).getLabel()},handleChange:function(g){this.inherited(arguments);var f=this.model.getText(),b=n.currentEditor;b&&b.getCommandStack?(b=b.getCommandStack(),f=new h({model:this.model,oldText:f,newText:g}),b.execute(f)):(this.model.setText(g),dojo.publish("/davinci/ui/modelChanged",[{newModel:this.model}]))},selectModel:function(g,f){if(!(this.publishingSelect||f&&this!=f)&&g.length&&g[0].model){var b=g[0].model;b.elementType&&(b=this.model.mapPositions(b),this.select(b))}},selectionChange:function(g){var f=
this.model.mapPositions(this.model),f=this.model.endOffset-f.endOffset,f=this.model.findChildAtPosition({startOffset:g.startOffset+f,endOffset:g.endOffset+f-1});g.model=f;if(f!=this._selectedModel)try{this.publishingSelect=!0,dojo.publish("/davinci/ui/selectionChanged",[[g],this])}finally{this.publishingSelect=!1}this._selectedModel=f},getSyntaxPositions:function(g,f){this.model.setText(g);if(this.model.getSyntaxPositions)return this.model.getSyntaxPositions(f).sort(function(b,e){return b.line!=e.line?
b.line-e.line:b.col-e.col})},save:function(){this.model.setText(this.getText());this.inherited(arguments)},getErrors:function(){return this.model.errors||[]}})})},"davinci/ui/TextEditor":function(){define(["dojo/_base/declare","./Editor","../Runtime"],function(p,n,m){return p(n,{constructor:function(h,g){this.subscriptions=[];this._handles=[]},isActiveEditor:function(){return m.currentEditor==this},handleChange:function(h){this.editorContainer&&this.editorContainer.setDirty(!0);this.isDirty=!0;this.lastModifiedTime=
Date.now()},_onKey:function(h){davinci.Workbench.currentContext=this.editorID;return davinci.Workbench.handleKey(h)},subscribe:function(h,g){this.subscriptions.push(dojo.subscribe(h,this,g))},destroy:function(){this.inherited(arguments);this.subscriptions.forEach(dojo.unsubscribe);this._handles.forEach(dojo.disconnect)},getDefaultContent:function(){return null},getErrors:function(){return[]},save:function(h){var g=this.getText();if(this.resourceFile){this.resourceFile.clearMarkers();for(var f=this.getErrors(),
b=0;b<f.length;b++){var e;switch(f[b].id){case "(error)":e="error";break;case "(warning)":e="warning"}e&&this.resourceFile.addMarker(e,f[b].line+1,f[b].reason)}this.resourceFile.setContents(g,h);this.editorContainer&&this.editorContainer.setDirty(h);this.isDirty=!1;this.lastModifiedTime=0}},supports:function(h){return!1},_connect:function(h,g,f){this._handles.push(dojo.connect(h,g,this,f))}})})},"davinci/ui/Editor":function(){define(["../commands/CommandStack","dojo/_base/declare"],function(p,n,m){var h=
function(g){this._progSelect||this.selectionChange({startOffset:g.newValue.start,endOffset:g.newValue.end})};return n(null,{constructor:function(g,f,b){this.contentDiv=g;this.commandStack=new p;this._existWhenVisible=b;this._isVisible=!b},setContent:function(g,f){this.editor||this._existWhenVisible&&!this._isVisible||this._createEditor();this._textModel||(this._textModel=this.editor?this.editor.getModel():new mProjectionTextModel.ProjectionTextModel(new mTextModel.TextModel));this.fileName=g;this.setValue(f,
!0);this._textModel&&(dojo.disconnect(this._textModelConnection),this._textModelConnection=dojo.connect(this._textModel,"onChanged",this,onTextChanged))},setVisible:function(g){g!=this._isVisible&&this._existWhenVisible&&(g&&this._existWhenVisible?(this._createEditor(),this._updateStyler()):(this.editor.getTextView().removeEventListener("Selection",dojo.hitch(this,h)),delete this.editor));this._isVisible=g},setValue:function(g,f){this._dontNotifyChange=f;this.editor?this.editor.setText(g):this._textModel.setText(g)},
_createEditor:function(){},_updateStyler:function(){},selectionChange:function(g){},destroy:function(){},select:function(g){if(this.editor)try{this._progSelect=!0,this.editor.setSelection(g.endOffset,g.startOffset)}finally{delete this._progSelect}},getText:function(){return this._textModel.getText(0)},getOnUnloadWarningMessage:function(){return null}})})},"davinci/commands/SourceChangeCommand":function(){define(["dojo/_base/declare","davinci/Runtime"],function(p,n){return p("davinci.commands.SourceChangeCommand",
null,{name:"SourceChange",constructor:function(m){this._model=m.model;this._oldText=m.oldText;this._newText=m.newText},incrementalUpdate:function(m){this._newText=m.newText},execute:function(){this._model.setText(this._newText);dojo.publish("/davinci/ui/modelChanged",[{newModel:this._model}]);var m=n.currentEditor;"davinci.ve.PageEditor"==m.declaredClass&&m.handleChange&&require(["davinci/ve/PageEditor"],function(h){h.prototype._srcChanged.call(m,this._newText)}.bind(this));if(!this.established)return this.established=
!0},undo:function(){this._model.setText(this._oldText);dojo.publish("/davinci/ui/modelChanged",[{newModel:this._model}]);var m=n.currentEditor;"davinci.ve.PageEditor"==m.declaredClass&&m.handleChange&&require(["davinci/ve/PageEditor"],function(h){h.prototype._srcChanged.call(m,this._oldText)}.bind(this))}})})},"dojo/dnd/Moveable":function(){define("../_base/array ../_base/declare ../_base/lang ../dom ../dom-class ../Evented ../on ../topic ../touch ./common ./Mover ../_base/window".split(" "),function(p,
n,m,h,g,f,b,e,k,d,c,a){return n("dojo.dnd.Moveable",[f],{handle:"",delay:0,skip:!1,constructor:function(a,d){this.node=h.byId(a);d||(d={});this.handle=d.handle?h.byId(d.handle):null;this.handle||(this.handle=this.node);this.delay=0<d.delay?d.delay:0;this.skip=d.skip;this.mover=d.mover?d.mover:c;this.events=[b(this.handle,k.press,m.hitch(this,"onMouseDown")),b(this.handle,"dragstart",m.hitch(this,"onSelectStart")),b(this.handle,"selectstart",m.hitch(this,"onSelectStart"))]},markupFactory:function(a,
b,c){return new c(b,a)},destroy:function(){p.forEach(this.events,function(a){a.remove()});this.events=this.node=this.handle=null},onMouseDown:function(a){if(!this.skip||!d.isFormElement(a)){if(this.delay)this.events.push(b(this.handle,k.move,m.hitch(this,"onMouseMove")),b(this.handle.ownerDocument,k.release,m.hitch(this,"onMouseUp"))),this._lastX=a.pageX,this._lastY=a.pageY;else this.onDragDetected(a);a.stopPropagation();a.preventDefault()}},onMouseMove:function(a){if(Math.abs(a.pageX-this._lastX)>
this.delay||Math.abs(a.pageY-this._lastY)>this.delay)this.onMouseUp(a),this.onDragDetected(a);a.stopPropagation();a.preventDefault()},onMouseUp:function(a){for(var b=0;2>b;++b)this.events.pop().remove();a.stopPropagation();a.preventDefault()},onSelectStart:function(a){this.skip&&d.isFormElement(a)||(a.stopPropagation(),a.preventDefault())},onDragDetected:function(a){new this.mover(this.node,a,this)},onMoveStart:function(b){e.publish("/dnd/move/start",b);g.add(a.body(),"dojoMove");g.add(this.node,
"dojoMoveItem")},onMoveStop:function(b){e.publish("/dnd/move/stop",b);g.remove(a.body(),"dojoMove");g.remove(this.node,"dojoMoveItem")},onFirstMove:function(){},onMove:function(a,b){this.onMoving(a,b);var c=a.node.style;c.left=b.l+"px";c.top=b.t+"px";this.onMoved(a,b)},onMoving:function(){},onMoved:function(){}})})},"davinci/html/ui/HTMLEditor":function(){define(["dojo/_base/declare","davinci/ui/ModelEditor","davinci/model/Factory","davinci/html/ui/HTMLOutline"],function(p,n,m,h){return p("davinci.html.ui.HTMLEditor",
n,{constructor:function(g,f){this.model=this.htmlFile=m.getModel({url:f});this._handle=dojo.connect(this.htmlFile.getDocumentElement(),"onkeydown",this,"onKeyDown")},destroy:function(){this.htmlFile.close();dojo.disconnect(this._handle);this.inherited(arguments)},getOutline:function(){this.outline||(this.outline=new h(this.model));return this.outline},getDefaultContent:function(){return"\x3chtml\x3e\n \x3chead\x3e\x3c/head\x3e\n \x3cbody\x3e\x3c/body\x3e\n\x3c/html\x3e"},onKeyDown:function(g){}})})},
"davinci/html/ui/HTMLOutline":function(){define(["dojo/_base/declare","davinci/html/ui/HTMLOutlineModel"],function(p,n){return p("davinci/html/ui/HTMLOutline",null,{constructor:function(m){this._htmlModel=m},getModel:function(){return this._model=new n(this._htmlModel)}})})},"davinci/html/ui/HTMLOutlineModel":function(){define(["dojo/_base/declare"],function(p){return p("davinci.html.ui.HTMLOutlineModel",null,{constructor:function(n){this.root=n;this.subscription=dojo.subscribe("/davinci/ui/modelChanged",
this,this._modelChanged)},getRoot:function(n,m){n(this.root)},getIdentity:function(n){return n.getID()},getLabel:function(n){return n.getLabel().replace("\x3c","\x26lt")},_getChildren:function(n){var m=[];"HTMLFile"!=n.elementType&&"HTMLElement"!=n.elementType||dojo.forEach(n.children,function(h){"HTMLElement"==h.elementType&&m.push(h)});return m},mayHaveChildren:function(n){return 0<n.children.length},getChildren:function(n,m,h){m(this._getChildren(n))},_modelChanged:function(){this.onChildrenChange(this.root,
this._getChildren(this.root))},destroy:function(){dojo.unsubscribe(this.subscription)}})})},"davinci/ve/VisualEditor":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/connect dojo/dom-class dojo/dom-construct dojo/promise/all dojo/text!./template.html ../Runtime ../Workbench ../model/Path ./metadata ./Context preview/silhouetteiframe preview/loadIndicator ../workbench/Preferences ./widget ../XPathUtils ../html/HtmlFileXPathAdapter ./utils/GeomUtils xide/utils xide/registry".split(" "),
function(p,n,m,h,g,f,b,e,k,d,c,a,q,w,r,B,y,x,z,u,v){return p("davinci.ve.VisualEditor",null,{deviceName:"none",_orientation:"portrait",_subscriptions:[],delite:!1,context:null,getContext:function(){return this.context},template:{},constructor2:function(a,b,d){this._pageEditor=b;this.template=d||{};this.contentPane=dijit.getEnclosingWidget(a)||v.byId(a.id);this.loadingDiv=g.create("div",{className:"loading",innerHTML:dojo.replace("\x3ctable\x3e\x3ctr\x3e\x3ctd\x3e\x3cspan\x3e\x26nbsp;\x26nbsp;\x26nbsp;\x26nbsp;\x26nbsp;\x3c/span\x3e\x26nbsp;{0}\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e",
["Loading..."])},this.contentPane.domNode.parentNode,"first");h.add(this.contentPane.domNode,"fullPane");a=g.create("div",{className:"silhouette_div_container"},this.contentPane.domNode);g.create("span",{className:"silhouetteiframe_object_container"},a);this.silhouetteiframe=new q({rootNode:a,margin:20});var e=this;this.contentPane.connect(this.contentPane,"resize",function(a){var b=dojo.query(".designCP iframe",this._pageEditor.domNode)[0];b&&b.contentDocument&&b.contentDocument.body&&(e._resizeBody(b.contentDocument.body,
a),setTimeout(function(){var a=e.getContext();a.clearCachedWidgetBounds();a.updateFocusAll();e._registerScrollHandlers()},100))}.bind(this));this._pageEditor.deferreds=f(c.getDeferreds());this._subscriptions.push(dojo.subscribe("/davinci/ui/editorSelected",this._editorSelected.bind(this)));this._subscriptions.push(dojo.subscribe("/davinci/ui/context/loaded",this._contextLoaded.bind(this)))},_setContentRaw:function(b,c,f){this.fileName=b;this.basePath=new d(b);if(this.initialSet)this.context.setSource(c,
this.context._restoreStates,this.context);else{var g=e.getUserWorkspaceUrl();0==b.indexOf("./")&&(b=b.substring(2,b.length));b=g+b;b=g;this._handles=[];g=dojo.query(".silhouette_div_container",this.contentPane.containerNode)[0];$(this.contentPane.containerNode).find(".silhouette_div_container");g={editor:this._pageEditor,visualEditor:this,containerNode:g,model:c,template:this.template,baseURL:b,iframeattrs:{"class":"silhouetteiframe_iframe"},ctx:this._pageEditor.ctx};this.context=this.template&&this.template.contextClass?
new (u.getObject(this.template.contextClass))(g):new a(g);this.context._commandStack=this._commandStack;this._commandStack._context=this.context;try{this._handles.push(dojo.connect(this.context,"activate",this,this.update))}catch(k){debugger}this._handles.push(dojo.connect(this.context,"onContentChange",this,this.onContentChange));this._handles.push(dojo.connect(this.context,"onSelectionChange",this,this.onContentChange));this.title=dojo.doc.title;this.context._setSource(c,this._connectCallback,this,
f);this.context.getFlowLayout();this.initialSet=!0}},constructor:function(a,b,d){this._pageEditor=b;this.template=d||{};this.contentPane=dijit.getEnclosingWidget(a)||v.byId(a.id);a=this.contentPane.containerNode;this.loadingDiv=g.create("div",{className:"loading",innerHTML:dojo.replace("\x3ctable\x3e\x3ctr\x3e\x3ctd\x3e\x3cspan\x3e\x26nbsp;\x26nbsp;\x26nbsp;\x26nbsp;\x26nbsp;\x3c/span\x3e\x26nbsp;{0}\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e",["Loading..."])},a.parentNode,"first");h.add(a,"fullPane");a=
g.create("div",{className:"silhouette_div_container"},a);g.create("span",{className:"silhouetteiframe_object_container"},a);this.silhouetteiframe=new q({rootNode:a,margin:20});this._pageEditor.deferreds=f(c.getDeferreds());this._subscriptions.push(dojo.subscribe("/davinci/ui/editorSelected",this._editorSelected.bind(this)));this._subscriptions.push(dojo.subscribe("/davinci/ui/context/loaded",this._contextLoaded.bind(this)))},getDevice:function(){return this.deviceName},setDevice:function(a,b){this.deviceName=
a;var c=this.getContext();c.setMobileMeta(a);b||c.setMobileTheme(a);this.silhouetteiframe.setSVGFilename("none"==a?null:"app/preview/images/"+a+".svg");c.clearCachedWidgetBounds();dojo.publish("/davinci/ui/deviceChanged",[a]);dojo.publish("/davinci/ui/repositionFocusContainer",[])},toggleOrientation:function(){"none"!=this.deviceName&&this.setOrientation("landscape"==this._orientation?"portrait":"landscape");this.getContext().clearCachedWidgetBounds()},getOrientation:function(a){return this._orientation},
setOrientation:function(a){if("none"!=this.deviceName&&this._orientation!=a){this._orientation=a;a=k.getOpenEditor();a.editorContainer&&a.editorContainer.updateToolbars&&a.editorContainer.updateToolbars();var b=this.getContext();b.setMobileOrientation(this._orientation);this.silhouetteiframe.setOrientation(this._orientation);a._visualChanged();setTimeout(function(){b.clearCachedWidgetBounds();b.updateFocusAll()},100)}},_objectPropertiesChange:function(a){if(this.isActiveEditor()){var b=this.getContext(),
c=a.command;b.getCommandStack().execute(a.compoundCommand||c);c._newId?(a=B.byId(c._newId,b.getDocument()),b.select(a)):(c=b.getSelection(),a=c.length?c[c.length-1]:void 0,1<c.length&&b.select(a));this._srcChanged()}},isActiveEditor:function(){var a=e.currentEditor;return a&&"davinci.ve.PageEditor"==a.declaredClass&&a.visualEditor==this},_stylePropertiesChange:function(a){if(this.isActiveEditor()){var b=this.getContext().getCommandForStyleChange(a);b&&(this.getContext().getCommandStack().execute(b),
b._newId&&(b=B.byId(b._newId,context.getDocument()),this.context.select(b)),this._srcChanged(),dojo.publish("/davinci/ui/widgetValuesChanged",[a]))}},_srcChanged:function(){this.isDirty=!0},getTemplate:function(){return b},destroy:function(){this._handles&&(this._focusPopup&&this._focusPopup.destroyRecursive(),delete this._focusPopup,this.context.destroy(),this._handles.forEach(dojo.disconnect),this._iframeScrollHandler&&(dojo.disconnect(this._iframeScrollHandler),delete this._iframeScrollHandler),
this._designCPScrollHandler&&(dojo.disconnect(this._designCPScrollHandler),delete this._designCPScrollHandler),this._subscriptions.forEach(dojo.unsubscribe),this._subscriptions=[])},setContent:function(a,b,c){this._onloadMessages=[];this._setContent(a,b,c)},saveAs:function(a,b,c){this._setContent(a,c)},_setContent:function(a,b,c){this._setContentRaw(a,b,c)},_connectCallback:function(a){try{if(a instanceof Error)throw a;var b=this.context,c;this.savePoint=0;try{b.activate2()}catch(d){console.error("crash in context activation! : "+
d),logError(d,"crash in context activation! : ")}c=k.createPopup({partID:"davinci.ve.visualEditor",domNode:b.getContainerNode(),keysDomNode:b.getDocument(),context:b});b.getDocument();c&&(c.adjustPosition=function(a){var c=dojo.position(b.frameNode);dojo.withDoc(b.getDocument(),function(){var a=dojo.docScroll();c.x-=a.x;c.y-=a.y});return c});this._focusPopup=k.createPopup({partID:"davinci.ve.visualEditor",domNode:b.getFocusContainer(),keysDomNode:b.getDocument(),context:b});b.getTopWidgets().forEach(function(a){a.resize&&
a.resize()});b.anyDojoxMobileWidgets=void 0;dojo.publish("/davinci/ui/context/pagebuilt",[b])}catch(e){a=e}finally{a.errorMessage?(this.loadingDiv.innerHTML=a.errorMessage||"(unknown)",console.error("error! ",a.errorMessage)):a instanceof Error?(this.loadingDiv.parentNode&&this.loadingDiv.parentNode.removeChild(this.loadingDiv),delete this.loadingDiv,dojo.publish("/davinci/ui/context/pagebuilt",[b]),console.error("error! ",a)):(this.loadingDiv.parentNode&&this.loadingDiv.parentNode.removeChild(this.loadingDiv),
delete this.loadingDiv)}},getSelectedWidget:function(){var a=this.getContext(),b=a.getSelection(),c=b.length?b[b.length-1]:void 0;1<b.length&&a.select(c);return c},getSelectedSubWidget:function(){return this._selectedSubWidget},save:function(a){if(this.context){var b=[],c=this.context.getModel();c.getText();c.setDirty(!0);c.visit({visit:function(c){"HTMLFile"!=c.elementType&&"CSSFile"!=c.elementType||!c.isDirty()||b.push(c.save(a));return!1}});b=b.concat(this.getContext().saveDynamicCssFiles(this.context.cssFiles,
a));b.length?this.savePromise=f(b):delete this.savePromise;return this.savePromise}},removeWorkingCopy:function(){},getDefaultContent:function(){return this.getTemplate()},previewInBrowser:function(){var a=this.deviceName,b=k.getOpenEditor().resourceFile.getURL(),c=[];"none"!=a&&(c=["preview\x3d1","device\x3d"+encodeURIComponent(a),"file\x3d"+encodeURIComponent(b)],b=k.location(),b+="/maqetta/preview.html?","landscape"==this._orientation&&c.push("orientation\x3d"+this._orientation));this.context.getPreference("zazl")&&
c.push("zazl\x3dtrue");c.length&&(b+="?"+c.join("\x26"));a=function(){var a=window.open(b,"preview_"+b);w(a,e.location()+require.toUrl("dojox/image/resources/images/loading.gif"),"gray")};this.savePromise?this.savePromise.then(a):a()},refresh:function(){var a=this.context,b=y.getXPath(a.getSelection()[0]._srcElement,x);a.setSource(a.model);var b=a.model.evaluate(b).getAttribute("id"),c=B.byId(b,a.getDocument());setTimeout(function(){a.select(c)},0)},_contextLoaded:function(a){a==this.getContext()&&
this._registerScrollHandlers()},_editorSelected:function(a){var b=this.getContext(),b=b?b.getFocusContainer():null;a.oldEditor==this._pageEditor&&b&&this._focusPopup&&this._focusPopup.unBindDomNode(b);a.editor==this._pageEditor&&(this._registerScrollHandlers(),b&&this._focusPopup&&this._focusPopup.bindDomNode(b));if(b=document.getElementById("visualEditorBorder"))b.style.display=a.editor&&"davinci.ve.PageEditor"==a.editor.declaredClass?"block":"none"},_resizeBody:function(a,b){var c=z.getScrollLeft(a),
d=z.getScrollTop(a);a.style.width=0<c?b.w+c+"px":"100%";a.style.height=0<d?b.h+d+"px":"100%"},_scrollHandler:function(a){(a=dojo.query(".designCP iframe",this._pageEditor.domNode)[0])&&a.contentDocument&&a.contentDocument.body&&(this._resizeBody(a.contentDocument.body,{w:dojo.style(this.contentPane.domNode,"width"),h:dojo.style(this.contentPane.domNode,"height")}),setTimeout(function(){var a=this.getContext();a.clearCachedWidgetBounds();a.updateFocusAll()}.bind(this),100))},_registerScrollHandlers:function(){if(!this._iframeScrollHandler){var a=
dojo.query(".designCP iframe",this._pageEditor.domNode)[0];a&&a.contentDocument&&a.contentDocument.body&&(this._iframeScrollHandler=dojo.connect(a.contentDocument.body.ownerDocument,"onscroll",this,this._scrollHandler))}!this._designCPScrollHandler&&(a=dojo.query(".designCP",this._pageEditor.domNode)[0])&&(this._designCPScrollHandler=dojo.connect(a,"onscroll",this,this._scrollHandler))}})})},"davinci/ve/VisualEditorOutline":function(){define("dojo/_base/declare dojo/_base/connect ./commands/ReparentCommand ./commands/StyleCommand ./widget ./States ../Runtime xide/factory xide/types".split(" "),
function(p,n,m,h,g,f,b,e,k){var d=p(null,{toggleMode:!0,betweenThreshold:4,showRoot:!0,dndController:"dijit.tree.dndSource",onChange:function(b){},constructor:function(b){this._context=b;this._handles=[];this._connect("activate","_rebuild");this._connect("widgetChanged","_widgetChanged")},getRoot:function(b,a){b(this._context.rootWidget||{id:"myapp",label:"application"})},getLabel:function(b){if("myapp"==b.id)return this._context.model.fileName;var a="",d=this._getWidget(b);if("xblox/RunScript"===
b.type&&d)return(a=d.domNode)&&a.script?"XBlox::"+a.script:"XBlox::"+d.dijitWidget.targetEvent;if(d.isWidget)return a=g.getLabel(d);if(a=d.type){b=this.useRichTextLabel?"\x26lt;":"\x3c";var e=this.useRichTextLabel?"\x26gt;":"\x3e",a=0===a.indexOf("html.")?b+a.substring(5)+e:0===a.indexOf("OpenAjax.")?b+a.substring(9)+e:0<a.indexOf(".")?a.substring(a.lastIndexOf(".")+1):d.label||a;(d=g.byId(d.id,this._context.getDocument()))&&(d=d.getId())&&(a+=" id\x3d"+d);return a}},_getChildren:function(b){var a=
[];this._context.rootWidget||console.error("editor context has no root widget yet!");if(!this._context.rootWidget||!b||"state"==b.type||"html.stickynote"==b.type||"html.richtext"==b.type)return[];if("myapp"==b.id||b===this._context.rootNode)a=this._context.getTopWidgets();else{var d=this._getWidget(b);d&&d.getChildren&&(a=this._getWidget(b).getChildren())}return a.filter(function(a){return"xblox/RunScript"==a.type||"xblox/CSSState"==a.type||"xblox/StyleState"==a.type?!0:a&&a.getContext&&a.getContext()&&
!a.internal&&a._srcElement}).map(this._buildItem)},__getChildren:function(b){var a=[];b&&"dijit/form/Button"==b.type&&b.dijitWidget&&dojo.forEach(b.dijitWidget.domNode.children,function(b){(b=davinci.ve.widget.getWidget(b))&&"xblox/RunScript"==b.type&&a.push(b)});return a},mayHaveChildren:function(b){return(b=this._getWidget(b))&&b.type&&0===b.type.indexOf("OpenAjax.")?!1:0<this._getChildren(b).length},getIdentity:function(b){return b?b.id:null},getChildren:function(b,a,d){a(this._getChildren(b))},
put:function(b,a){var d=this._getWidget(b),e=d.getParent();this.onChildrenChange(e,this._getChildren(e));return this.getIdentity(d)},add:function(b,a){(a=a||{}).overwrite=!1;return this.put(b,a)},onDelete:function(b){},remove:function(b){this.onDelete(b)},newItem:function(b,a){},pasteItem:function(b,a,d,e,f,g){b&&d&&a&&(d="myapp"==d.id?this._context.rootWidget:this._getWidget(d),a="myapp"==a.id?this._context.rootWidget:this._getWidget(a),b=this._getWidget(b),a!=d||e||dojo.indexOf(a.getChildren(),
b)<f&&f++,b=new m(b,d,f),this._context.getCommandStack().execute(b))},checkItemAcceptance:function(b,a,d){switch(d){case "before":case "after":return!0;default:return b=dijit.getEnclosingWidget(b).item,b=this.tree.model._getWidget(b),b.getContainerNode&&b.getContainerNode()||"myapp"==b.id}},onChildrenChange:function(b,a){},_rebuild:function(){if(!this._skipRefresh){var b=this._context.rootNode;if(b)this.onChildrenChange(this._buildItem(b),this._getChildren(b))}},_widgetChanged:function(b,a,d){try{b===
this._context.WIDGET_ADDED?this.add(a):b===this._context.WIDGET_REMOVED?this.remove(a):b===this._context.WIDGET_MODIFIED?(this.onChange(a),this.onChildrenChange(a,this._getChildren(a))):b===this._context.WIDGET_REPARENTED?(this.remove(a),this.put(a,{overwrite:!0,parent:d[1]})):b===this._context.WIDGET_ID_CHANGED&&(this.remove({id:d}),this.add(a))}catch(f){console.error("VisualEditorOutline._widgetChanged: e \x3d "+f)}e.publish(k.EVENTS.ON_WIDGET_CHANGED,{type:b,widget:a,args:d},this)},toggle:function(b,
a,d){b=this._getWidget(b);var e=b.getHelper(),f=!0;e&&e.onToggleVisibility&&(f=e.onToggleVisibility(b,a));return f?(this._toggle(b,a,d),!0):!1},_toggle:function(b,a,d){a=a?"none":"";var e;if(d=f.getFocus(b.domNode.ownerDocument.body))e=d.state;else{d=f.getStatesListCurrent(b.domNode);for(var g=0;g<d.length;g++)if(d[g]){e=d[g];break}}b=new h(b,[{display:a}],e);this._context.getCommandStack().execute(b)},shouldShowElement:function(b,a){return"toggleNode"==b?"states"!=a.type&&"myapp"!=a.id:!0},_getToggledItemsAttr:function(){var b=
[],a;for(a in this.toggledItems)b.push(a);return b},isToggleOn:function(b){b=this._getWidget(b);var a=b.getHelper();return a&&a.isToggleOn?a.isToggleOn(b):"none"===b.domNode.style.display},_getWidget:function(b){return b?g.byId(b.id):null},_buildItem:function(b){if(b)return{id:b.id,type:b.type}},_connect:function(b,a){this._handles.push(n.connect(this._context,b,this,a))},destroy:function(){this._handles.forEach(n.disconnect)}});return p("davinci.ve.VisualEditorOutline",null,{toolbarID:"davinci.ve.outline",
_outlineMode:"design",constructor:function(c){this._editor=c;this._context=c.visualEditor.context;this._handles=[];this._connect("onSelectionChange","onSelectionChange");this._connect("deselect","deselect");this._widgetModel=new d(this._context);n.subscribe("/maqetta/appstates/state/changed/end",this,function(a){if("davinci.themeEditor.ThemeEditor"!==("undefined"!==typeof davinci&&b.currentEditor&&b.currentEditor.declaredClass)&&this._tree&&(a=a&&a.node&&a.node._dvWidget))for(a=a.getChildren();a.length;){var c=
a.shift();if(c){var d="none"!==c.domNode.style.display;this._tree&&this._tree.toggleNode(c,!d);a=a.concat(c.getChildren())}}})},getActionsID:function(){if("design"===this._outlineMode)return"davinci.ve.VisualEditorOutline"},_connect:function(b,a){this._handles.push(n.connect(this._context,b,this,a))},switchDisplayMode:function(b){this._outlineMode=b;this._outlineView.createTree()},getModel:function(){switch(this._outlineMode){case "design":this._model=this._widgetModel;break;case "source":this._model=
this._srcModel}return this._model},getSelectedItem:function(){return this._tree&&this._tree._getSelectedItemAttr()},onSelectionChange:function(b,a){"design"==this._outlineMode&&(b=b||this._context.getSelection())&&this._tree&&this._tree.selectNode(b,a)},deselect:function(){this._tree&&this._tree&&this._tree.deselectAll()},getIconClass:function(b,a){var d=b.type;return d?"xblox/RunScript"==d?"fa fa-play-circle-o":a?"fa fa-circle-thin":"fa fa-circle":a?"fa fa-circle-thin":"fa fa-circle"}})})},"davinci/html/ui/ImageViewer":function(){define([],
function(){var p=function(n){this.element=n};p.prototype={isReadOnly:!0,save:function(){},getDefaultContent:function(){},supports:function(n){return!1},setContent:function(n,m){this.fileName=n;this.element.innerHTML="\x3cdiv style\x3d'overflow:auto'\x3e\x3cimg src\x3d'"+encodeURI(this.resourceFile.getURL())+"'/\x3e\x3c/div\x3e";this.dirty=!1},destroy:function(){},getOnUnloadWarningMessage:function(){return null}};return p})},"davinci/ve/prefs/HTMLEditPreferences":function(){define("dojo/_base/declare dijit/layout/ContentPane dijit/_TemplatedMixin dijit/form/CheckBox dijit/form/TextBox dijit/form/Select davinci/lang/ve/common dojo/text!./HtmlEditPreferences.html".split(" "),
function(p,n,m,h,g,f,b,e){return p([n,m],{templateString:e,postMixInProperties:function(){this._loc=b},postCreate:function(){this._snap=new h({},this.snapNode);this._showPossibleParents=new h({},this.showPossibleParentsNode);this._cssOverrideWarn=new h({},this.cssOverrideWarn);this._absoluteWidgetsZindex=new g({},this.absoluteWidgetsZindex);this._zazl=new h({},this.zazl);this.containerNode||(this.containerNode=this.domNode)},getDefaults:function(){},setDefaults:function(){},doApply:function(){},getPreferences:function(){return{snap:this._snap.checked,
showPossibleParents:this._showPossibleParents.checked,cssOverrideWarn:this._cssOverrideWarn.checked,absoluteWidgetsZindex:this._absoluteWidgetsZindex.value,zazl:this._zazl.checked}},setPreferences:function(b){b=b||{};this._check(this._snap,!!b.snap);this._check(this._showPossibleParents,!!b.showPossibleParents);this._check(this._cssOverrideWarn,!!b.cssOverrideWarn);this._absoluteWidgetsZindex.set("value",b.absoluteWidgetsZindex);this._check(this._zazl,!!b.zazl)},_check:function(b,d){b.set("checked",
d)},save:function(b){davinci.ve._preferences=b}})})},"davinci/lang/ve/common":function(){define([],function(){return{search:"Search",filter:"Filter","new":"New",errorSavingFile:"Error saving file: ${0} details: ${1}",palette:"palette",closeAllEditors:"Close all tabs",undo:"Undo",redo:"Redo",copy:"Copy",paste:"Paste",cut:"Cut","delete":"Delete",surround:"Surround",properties:"Properties",styles:"Styles",events:"Events",preferences:"Preferences",addPane:"Add Pane",addColumn:"Add Column",addRow:"Add Row",
removeColumn:"Remove Column",removeRow:"Remove Row",joinColumn:"Join Column",joinRow:"Join Row",splitColumn:"Split Column",splitRow:"Split Row",alignLeft:"Align Left",alignRight:"Align Right",alignTop:"Align Top",alignBottom:"Align Bottom",show:"Show",hide:"Hide",addMenuItem:"Add Menu Item",addSubMenu:"Add Sub Menu",addMenuBarItem:"Add MenuBar Item",addPopupMenuBar:"Add Popup MenuBarItem",ok:"OK",cancel:"Cancel",page:"Page",title:"Title",metaInfo:"Meta Info",httpEquiv:"HTTP Equiv",style:"Style",theme:"Theme",
styleSheets:"Style Sheets",rules:"Rules",url:"URL",externalScripts:"External Scripts",modules:"Modules",name:"Name",value:"Value",add:"Add",remove:"Remove",staticOptions:"Static Options",axisOptions:"Axis Options",series:"Series",axis:"Axis",option:"Option",selected:"Selected",staticItems:"Static Items",dataStore:"Data Store",query:"Query",fields:"Fields",field:"Field",label:"Label",width:"Width",edit:"Edit",key:"Key",rootId:"Root ID",rootLabel:"Root Label",childrenAttrs:"Children Attributes",items:"Items",
type:"Type",widget:"Widget",position:"Position",size:"Size",layout:"Layout",visual:"Visual",text:"Text",border:"Border",table:"Table",list:"List",aural:"Aural",others:"Others",onLoad:"Load",onUnload:"Unload",script:"Script",methodCall:"Method Call",serviceCall:"Service Call",object:"Object",method:"Method",parameters:"Parameters",result:"Result",service:"Service",content:"Content",source:"Source",target:"Target",property:"Property",flowLayout:"Flow Layout",snapToNearestWidget:"Snap to nearest widget",
showPossibleParents:"When dragging, show possible parents",warnOnCSSOverride:"Warn on CSS Override",absoluteWidgetsZindex:"z-index for sketch mode",widgetPaletteLayout:"In Palette, display widgets as",widgetPaletteShow_Icons:"icons",widgetPaletteShow_List:"list",liveEdit:"Live Edit",zazl:"Enable \x3ca href\x3d'http://zazl.org' target\x3d'_blank'\x3eZazl Optimizer\x3c/a\x3e",selectorPrefix:"Selector Prefix",component:"Component",alternates:"Alternates",alternateWidgets:"Alternate widgets:",howToChooseAlternate:"To choose alternate widget, click-select current widget, then click on up arrow icon.",
summary:"Summary:",description:"Description:",showSuggestedWidgets:"Suggested Widgets",showAllWidgets:"All Widgets",MoreIconTitleString:"Click here to see alternative similar widgets",HelpIconTitleString:"Click here to see descriptive info about this widget",__dummy__:""}})},"davinci/commands/OrderedCompoundCommand":function(){define(["dojo/_base/declare","davinci/commands/CompoundCommand"],function(p,n){return p("davinci.commands.OrderedCompoundCommand",n,{undo:function(){if(this._commands)for(var m=
0;m<this._commands.length;m++)this._commands[m].undo()}})})},"davinci/version":function(){define([],"10")},"davinci/model/resource/Folder":function(){define(["dojo/_base/declare","dojo/_base/xhr","davinci/Runtime","davinci/model/resource/Resource","davinci/model/resource/File"],function(p,n,m,h,g){var f=p("davinci.model.resource.Folder",h,{serviceClass:"XIDE_Directory_Service",workspaceMount:"/ws/",constructor:function(b,e){this.elementType="Folder";this.name=b;this.parent=e},reload:function(){this._isLoaded=
!1},createResource:function(b,e,k,d){var c;null!=b?c=e?new f(b,this):new g(b,this):(c=this,e="Folder"==this.elementType);var a=this;if(!k){k=""+this.getPath();"."==k&&(k=""+this.workspaceMount);k=k.replace("./",this.workspaceMount);k=this.serviceClass;e=e?"mkDir":"mkFile";if(!this.serviceObject[k][e])return console.error("_createResource : server doesnt support :"+e),this;this.serviceObject[k][e](this.workspaceMount,c.getPath()).then(function(e){if(!0===e&&null!=b||"The file already exists"===e)return a.children.push(c),
delete c.libraryId,delete c.libVersion,delete c._readOnly,dojo.publish("/davinci/resource/resourceChanged",["created",c]),d&&d(c),c;if("OK"!=e)throw"Folder.createResource failed: name\x3d"+b+"response\x3d"+e;delete c.libraryId;delete c.libVersion;delete c._readOnly;d(a);if(!d)debugger})}},getChildren2:function(b,e){if(this._isLoaded)b(this.children);else if(this._loadingCallbacks)this._loadingCallbacks.push(b);else{this._loadingCallbacks=[];this._loadingCallbacks.push(b);var f=""+this.getPath();"."==
f&&(f="/ws/");var d=this.serviceClass;if(!this.serviceObject)debugger;if(!this.serviceObject[d])debugger;this.serviceObject.sync=!0;this.serviceObject[d].ls(this.workspaceMount,f).then(function(b){this.setChildrenSync(b);dojo.forEach(this._loadingCallbacks,function(a){a(this.children)},this);delete this._loadingCallbacks}.bind(this),e)}},getChildren:function(b,e){if(this._isLoaded)b.call(null,this.children);else if(this._loading)this._loading.then(function(){b.call(null,this.children)}.bind(this),
e);else{console.error("list files : "+this.getPath());var f=""+this.getPath();"."==f&&(f="/ws/");f=f.replace("./",this.workspaceMount);this.serviceObject[this.serviceClass].ls(f).then(function(d){this.setChildren(d);this._isLoaded=!0;b.call(null,this.children);delete this._loading}.bind(this),e)}},getChildrenSync:function(b,e){if(this._isLoaded)b(this.children);else if(this._loadingCallbacks)this._loadingCallbacks.push(b);else{this._loadingCallbacks=[];this._loadingCallbacks.push(b);console.error("list files : "+
this.getPath());var f=this.getPath();"./project1"===f&&console.error("gotcha");f=""+f;"."==f&&(f="/ws/");f=f.replace("./","/ws/");m.serverJSONRequest({url:"cmd/listFiles.php",content:{path:this.getPath(),basePath:"./"},sync:e,load:dojo.hitch(this,function(b,c){this.setChildrenSync(b);dojo.forEach(this._loadingCallbacks,function(a){a(this.children)},this);delete this._loadingCallbacks})})}},setChildren:function(b){this.children=[];this._appendFiles(b)},setChildrenSync:function(b){this.children=[];
this._appendFiles(b,!0)},_appendFiles:function(b,e){b.forEach(function(b){var d=e?this.getChildSync(b.name):this._getChild(b.name),c=null!=d;b.isDir||b.isLib?(c||(d=new f(b.name,this)),b.isLib&&(d.isLibrary=!0)):c||(d=new g(b.name,this));d.link=b.link;d.isNew=b.isNew;d._readOnly=b.readOnly;d.setDirty(b.isDirty);b.libraryId&&(d.libraryId=b.libraryId,d.libVersion=b.libVersion);c||this.children.push(d)},this);this._isLoaded=!0},getMarkers:function(b,e){var f=[];this.visit({visit:function(d){if("File"==
d.elementType)markers=d.getMarkers(b),f.concat(markers);else if(!e)return!0}},!0);return f},getChildSync:function(b){if(!this._isLoaded||1>this.children.length)this._isLoaded=!1,this.getChildrenSync(function(b){this.children=b},!0);return this._getChild(b)},getChild:function(b){if(!this._isLoaded||1>this.children.length)this._isLoaded=!1,this.getChildren2(function(b){this.children=b},!0);return this._getChild(b)},_getChild:function(b){if(!this.__CASE_SENSITIVE){if(!b||null==b.toLowerCase)debugger;
b=b.toLowerCase()}var e;this.children.some(function(f){var d=f.getName();this.__CASE_SENSITIVE||(d=d.toLowerCase());(d=d==b)&&(e=f);return d});return e}});return f})},"davinci/model/resource/Resource":function(){define("dojo/_base/declare dojo/_base/xhr dojo/_base/connect dojo/Deferred davinci/Runtime davinci/model/Model davinci/model/Path xide/manager/ServerActionBase".split(" "),function(p,n,m,h,g,f,b,e){return p("davinci.model.resource.Resource",[f,e],{singleton:!0,sync:!1,workspaceMount:"/ws/",
_initService:function(){var b=this.findServiceUrl(this.declaredClass);b&&(this.serviceUrl=b);this.inherited(arguments)},constructor:function(){this.elementType="Resource";this.name="";this.parent=null;this._id=dijit.getUniqueId("maqFileResource");this.init()},getName:function(){return this.name},getPath:function(){return this.parent?this.parent.getPath()+"/"+this.name:this.name},readOnly:function(){return this.hasOwnProperty("_readOnly")?this._readOnly||null!=this.parent&&this.parent.readOnly():this.parent?
this.parent.readOnly():!1},getURL:function(){var b=this.getPath();0==b.indexOf("./")&&(b=b.substring(2,b.length));return g.getUserWorkspaceUrl()+b},rename:function(e){var d=(new b(this.getPath())).removeLastSegments().append(e);return n.get({url:"cmd/rename",handleAs:"text",content:{oldName:this.getPath(),newName:d.toString()}}).then(function(){this.name=e;m.publish("/davinci/resource/resourceChanged",["renamed",this])}.bind(this))},getParentFolder:function(){return"File"==this.elementType?this.parent:
this},isVirtual:function(){return!!this.libraryId},visit:function(b,d){var c=b.visit(this);this._isLoaded||"Folder"!=this.elementType||d?this.children&&!c&&dojo.forEach(this.children,function(a){a.visit(b,d)}):this.getChildren(dojo.hitch(this,function(){dojo.forEach(this.children,function(a){a.visit(b,d)})}))},deleteResource:function(b){var d=""+this.getPath();"."==d&&(d=""+this.workspaceMount);var d=d.replace("./",this.workspaceMount),c=this.serviceClass,a="Folder"==this.elementType?"deleteDirectory":
"deleteFile",e=function(){var a=this.getName();this.parent.children.some(function(b,c,d){if(b.getName()==a)return d.splice(c,1),!0});m.publish("/davinci/resource/resourceChanged",["deleted",this])}.bind(this);b?(b=new h,e(),b.resolve()):b=this.serviceObject[c][a](d).then(e,function(){});return b},getId:function(){return this._id}})})},"davinci/model/resource/File":function(){define("dojo/_base/declare davinci/Runtime davinci/model/resource/Resource davinci/model/resource/Marker davinci/ve/utils/URLRewrite xide/utils".split(" "),
function(p,n,m,h,g,f){return p("davinci.model.resource.File",m,{serviceClass:"XIDE_Directory_Service",mount:"/ws/",getMountPoint:function(){return this.mount},constructor:function(b,e){this.elementType="File";this.name=b;this.parent=e;this.markers=[];this.extension=b.substr(b.lastIndexOf(".")+1)},getExtension:function(){return this.extension},clearMarkers:function(){this.markers=[]},addMarker:function(b,e,f){this.markers.push(new h(this,b,e,f))},getMarkers:function(b){var e=[];if(this.markers)for(var f=
0;f<this.markers.length;f++){var d=this.markers[f];b?"string"==typeof b?d.type==b&&e.push(d):dojo.forEach(b,function(b){b==d.type&&e.push(d)}):e.push(d)}return e},setContents:function(b,e){this.isNew&&!e&&(this.isNew=!1);var f=(e=!1,""),d=encodeURI(this.getPath()+f);return this.serviceObject[this.serviceClass].set(this.getMountPoint(),d,b).then(function(b){this.dirtyResource=e;dojo.publish("/davinci/resource/resourceChanged",["modified",this]);return this}.bind(this),function(b){console.error("An error occurred: davinci.model.resource.File.prototype.setContents "+
b+" : "+d);return b})},getContentSync:function(){return n.serverJSONRequest({url:g.encodeURI(this.getURL()),handleAs:"text",sync:!0})},getContent:function(){return this.serviceObject[this.serviceClass].get(f.buildPath(this.getMountPoint(),encodeURI(this.getPath())),!1,!1)},removeWorkingCopy:function(){n.serverJSONRequest({url:n.cmdOffset+"cmd/removeWorkingCopy",handleAs:"text",content:{path:this.getPath()},sync:!0});this.isNew&&this.deleteResource(!0)}})})},"davinci/model/resource/Marker":function(){define(["dojo/_base/declare",
"davinci/model/resource/Resource"],function(p,n){return p("davinci.model.resource.Marker",n,{constructor:function(m,h,g,f){this.resource=m;this.type=h;this.line=g;this.text=f}})})},"davinci/ve/input/SmartInput":function(){define("dojo/_base/declare dojo/dom-geometry davinci/ve/commands/ModifyRichTextCommand dijit/layout/ContentPane dojox/html/entities davinci/lang/ve dijit/lang/_common xide/registry".split(" "),function(p,n,m,h,g,f,b,e){return p("davinci.ve.input.SmartInput",null,{property:null,_X_MOVE_RANGE:10,
_Y_MOVE_RANGE:10,_POINTER_TOP_OFFSET:-13,multiLine:"false",displayOnCreate:"true",_connection:[],getHelpText:function(){return this.helpText?this.helpText:this.isHtmlSupported()?f.smartInputHelp1:f.smartInputHelp2},isHtmlSupported:function(){this.supportsHTML||("html"==this._widget.type.match("^html")?this.supportsHTML="true":this.supportsHTML="false");return"boolean"===typeof this.supportsHTML?this.supportsHTML:"true"===this.supportsHTML},parse:function(b){return b},parseItems:function(b){this.trim&&
(b=dojo.trim(b));return b.match(/[^\\][\r\n]/)?this.parseItemsInRows(b):this.parseItemsInColumns(b)},parseItemsInRows:function(b){b=this.splitRows(b);for(var d=b.length,c=0;c<d;c++){var a=b[c],a=this.parseItem(a);b[c]=a}return b},parseItemsInColumns:function(b){b=this.splitColumns(b);for(var d=b.length,c=0;c<d;c++){var a=b[c],a=this.parseItem(a);b[c]=a}return b},parseGrid:function(b){b=this.splitRows(b);for(var d=b.length,c=0;c<d;c++){var a=this.parseItemsInColumns(b[c]);b[c]=a}return b},parseItem:function(b){var d=
null,c=b,a=b.match(/^([-~!>|(*)[+\]]*) ?(.*)$/);a&&(d=a[1],c=a[2]);var a=0,e=!1,f=!1;if(d)for(var g=0;g<d.length;g++)switch(d[g]){case "-":case "~":case "!":e=!0;break;case "\x3e":a++;break;case "*":case "+":f=!0}return{original:b,specialChars:d,text:c,indent:a,disabled:e,selected:f}},splitRows:function(b){var d=[],c,a="",e=!1;for(c=0;c<b.length;c++){var f=b.charAt(c);switch(f){case "\\":e&&(a+=f);e=!e;break;case "r":e?(a+="\r",e=!1):a+=f;break;case "n":e?(a+="\n",e=!1):a+=f;break;case "\r":case "\n":e?
(a+=f,e=!1):(this.trim&&(a=dojo.trim(a)),d.push(a),a="");break;default:a+=f,e=!1}}a&&(this.trim&&(a=dojo.trim(a)),d.push(a));return d},splitColumns:function(b){var d=[],c,a="",e=!1;for(c=0;c<b.length;c++){var f=b.charAt(c);switch(f){case "\\":e&&(a+=f);e=!e;break;case "r":e?(a+="\r",e=!1):a+=f;break;case "n":e?(a+="\n",e=!1):a+=f;break;case ",":e?(a+=f,e=!1):(this.trim&&(a=dojo.trim(a)),d.push(a),a="");break;default:a+=f,e=!1}}a&&(this.trim&&(a=dojo.trim(a)),d.push(a));return d},serializeItems:function(b){return"columns"==
this.format?this.serializeColumns(b):this.serializeRows(b)},serializeColumns:function(b){for(var d=0;d<b.length;d++){var c=b[d],c=c.replace(/\\/g,"\\\\");b[d]=c.replace(/,/g,"\\,")}return b.join(", ")},serializeRows:function(b){for(var d=0;d<b.length;d++){var c=b[d],c=c.replace(/\\/g,"\\\\");b[d]=c.replace(/\n/g,"\\\n")}return b.join("\n")},inlineEditActive:function(){return!(!this._inline||"none"==this._inline.style.display||!this._inline.eb)},show:function(b){this._widget=davinci.ve.widget.byId(b);
this._inline||this._createInline();b=dojo.hitch(this,function(a){this._inline.style.display="block";this.setFormat(a);a=g.decode(a,[["\x26","amp"],['"',"quot"],["\x3c","lt"],["\x3e","gt"]]);this._inline.eb.set("value",String(a));this.updateFormats();this.help(!1);dijit.selectInputText(this._inline.eb.textbox);this.updateSimStyle();this._inline.eb.textbox.focus()});var d=this._node(this._widget),c=this.property,a="maq_innerText"===c?"innerHTML":c,e;c&&(d?e=dojo.attr(d,a):"innerHTML"===a||"textContent"==
a?(e=this._widget._srcElement.getElementText(this._context),e=e.replace(/\s+/g," ")):e=this._widget.attr(c));this.serialize?this.serialize(d||this._widget,b,e):c&&b(e)},_createInline:function(){if(this.multiLine&&"false"!=this.multiLine){this._loading(115,200);var b=this._getTemplate()}else this._loading(85,200),b=this._getTemplate();this._inline.set("content",b);this._inline.eb=dijit.byId("davinciIleb");this._connection.push(dojo.connect(this._inline.eb,"onMouseDown",this,"stopEvent"));this._connection.push(dojo.connect(this._inline.eb,
"onKeyDown",this,"stopEvent_Intercept_Enter"));this._connection.push(dojo.connect(this._inline.eb,"onKeyUp",this,"handleEvent"));"true"==this.multiLine&&(this._connection.push(dojo.connect(this._inline.eb,"onBlur",this,"onBlur")),this._connectSimDiv());b=this._widget._srcElement.getElementText(this._context);this._inline.eb.setValue(b);this._loadingDiv.style.backgroundImage="none";this._inline._setStyleAttr({display:"block"});this._connectHelpDiv();window.setTimeout(function(){this._inline&&this._inline.eb&&
this._inline.eb.textbox&&this._inline.eb.textbox.focus();this._connection.push(dojo.connect(this._inline,"onBlur",this,"onOk"))}.bind(this),500);this.resize(null)},_connectHelpDiv:function(){var b=dojo.byId("davinci.ve.input.SmartInput_img_help");this._connection.push(dojo.connect(b,"onclick",this,"toggleHelp"));this._connection.push(dojo.connect(dijit.byId("davinci.ve.input.SmartInput_ok"),"_onSubmit",this,"onOk"));this._connection.push(dojo.connect(dijit.byId("davinci.ve.input.SmartInput_cancel"),
"onClick",this,"onCancel"))},_findSmartInputContainer:function(b){return document.body},_loading:function(b,d){this._widget&&this._widget._edit_context||console.error("have no widget");var c=this._widget._edit_context.frameNode,a=c.ownerDocument,f=a.createElement("div"),g=this._findSmartInputContainer(c);if(g){g.appendChild(f);this._loadingDiv=f;dojo.addClass(f,"smartInputLoading");f=a.createElement("div");f.id="ieb";dojo.addClass(f,"inlineEdit dijitTooltipContainer");a=a.createElement("div");a.id=
"iebPointer";this._inline=f;g.appendChild(f);g.appendChild(a);var m=new dojo.dnd.Moveable("ieb");this._connection.push(dojo.connect(m,"onMoveStart",this,"onMoveStart"));this._connection.push(dojo.connect(m,"onMoveStop",this,"onMoveStop"));this._inline=new h({},f);f=e.byId("editorsStackContainer").domNode;e.byId("editorsStackContainer");f=n.position(f);this._loadingDiv.style.position="absolute";this._loadingDiv.style.left=f.x+"px";this._loadingDiv.style.top=f.y+"px";this._loadingDiv.style.width=f.w+
"px";this._loadingDiv.style.height=f.h+"px";var f=this._widget.getMarginBox(),m=dojo.position(c),p=dojo.position(g),c=m.x-p.x+g.scrollLeft-1,m=m.y-p.y+g.scrollTop-1,y=g.clientWidth,p=26,x=0;f.y+b+26<g.clientHeight?(p=f.y+26,dojo.addClass(a,"inlineEditConnectorBelow")):0<f.y-b?(p=f.y-b,x=b+12):p=26;g="0";f.x+d+20<y?g=f.x:f.x+d>y&&(g=f.x-d+f.w,0>g&&(g=0));g+=c;p+=m;this._inline._setStyleAttr({display:"block",top:p+"px",left:g+"px",padding:"1px",overflow:"hidden",backgroundImage:"none"});this._startTop=
p;this._startLeft=g;dojo.style(a,"left",f.x+20+c+"px");dojo.style(a,"top",p+x+this._POINTER_TOP_OFFSET+"px")}},handleEvent:function(b){switch(b.keyCode){case 13:var d=this.multiLine;if(!d||"false"==d||13==this._lastKeyCode||b.ctrlKey)this.onOk();else if(b.which==dojo.keys.ENTER&&b.ctrlKey)this.onOk();break;case 27:this.onCancel();break;default:this.updateFormats()}this._lastKeyCode=b.keyCode;this.updateSimStyle()},onOk:function(b){this.hide()},onCancel:function(b){this.hide(!0)},onMoveStart:function(b){dojo.style("iebPointer",
"display","none")},onMoveStop:function(b){var d=dojo.style("ieb","left");b=dojo.style("ieb","top");d=this._startLeft-d;b-=this._startTop;b<this._Y_MOVE_RANGE&&b>-this._Y_MOVE_RANGE?(dojo.style("iebPointer","display",""),dojo.style("iebPointer","top",this._startTop+this._POINTER_TOP_OFFSET+b+"px"),d<this._X_MOVE_RANGE&&d>-this._X_MOVE_RANGE?dojo.style("iebPointer","display",""):dojo.style("iebPointer","display","none")):dojo.style("iebPointer","display","none")},stopEvent:function(b){b.stopPropagation();
this.updateSimStyle()},stopEvent_Intercept_Enter:function(b){this.stopEvent(b);13!=b.keyCode||this.multiLine||b.preventDefault()},_node:function(){var b,d=this.path,c=this.selector;if(d||c)b=this._widget.domNode,d&&(b=dojo.getObject(d,!1,this._widget)),c&&(b=dojo.query(c,b)[0]);return b},updateWidget:function(b){if(!this._widget._destroyed){this.parse&&(b=this.parse(b));var d=this._node(this._widget),c=this._widget.getContext(),a=this.property,e="maq_innerText"===a?"innerHTML":a;if(this.update){if(b=
this.update(d||this._widget,b,a))this._widget=b;c.select(this._widget,null,!1)}else if(a){if(d)dojo.attr(d,e,b);else{d={};b&&"string"==typeof b&&(b=b.replace(/\n/g,""));var f=null;"textContent"==a?f=b:d[a]=b;"innerHTML"===e?(d.richText=d[a],delete d[a],b=new m(this._widget,d,null,c)):b=new davinci.ve.commands.ModifyCommand(this._widget,d,f,c);this._widget._edit_context.getCommandStack().execute(b);this._widget=b.newWidget;this._widget._edit_context._focuses[0]._selectedWidget=this._widget}c.select(this._widget,
null,!1)}}},hide:function(b){if(this._inline){for(var d;connection=this._connection.pop();)connection&&dojo.disconnect(connection);var c=this._findSmartInputContainer(this._widget._edit_context.frameNode);if(c&&(this._loadingDiv&&c.removeChild(this._loadingDiv),"none"!=this._inline.style.display&&this._inline.eb)){this._value=d=this._inline.eb.get("value");this._format=this.getFormat();this._inline.style.display="none";this._inline.eb&&(this._inline.eb.destroyRecursive(),delete this._inline.eb);this._inline.destroyRecursive();
delete this._inline;var a=c.ownerDocument.getElementById("iebPointer");c.removeChild(a);null==d||b||(this.disableEncode||"text"!==this._format||(d=g.encode(d)),this.updateWidget(d));this._widget.getContext().getDocument().defaultView.focus()}}},getFormat:function(){var b=dijit.byId("davinci.ve.input.SmartInput_radio_html"),d="text";b&&b.checked&&(d="html");return d},containsHtmlMarkUp:function(b){return 0<dojo.create("div",{innerHTML:b}).children.length},toggleHelp:function(){var b=dojo.byId("davinci.ve.input.SmartInput_img_help");
dojo.hasClass(b,"inlineEditHelpSelected")?this.help(!1):this.help(!0);dojo.toggleClass(b,"inlineEditHelpSelected")},setFormat:function(b){var d=dijit.byId("davinci.ve.input.SmartInput_radio_html"),c=dijit.byId("davinci.ve.input.SmartInput_radio_text");b=dojo.create("div",{innerHTML:b}).children.length?"html":"text";"html"===b?(d.set("checked",!0),c.set("checked",!1)):(d.set("checked",!1),c.set("checked",!0));this._format=b},help:function(b){var d=dojo.byId("davinci.ve.input.SmartInput_div_help");
dojo.byId("davinci.ve.input.SmartInput_radio_div");b?dojo.style(d,"display",""):dojo.style(d,"display","none")},updateFormats:function(){var b=this._inline.eb.get("value"),d=!0;this.containsHtmlMarkUp(b)&&(d=!1);this._widget.getContext().getDojo();var c=dojo.byId("davinci.ve.input.SmartInput_radio_text_width_div"),b=g.encode(b);c.innerHTML='\x3cdiv class\x3d"dojoxEllipsis"\x3e'+dojo.replace("Plain text ({0})",[b])+"\x3c/div\x3e";b=dojo.byId("davinci.ve.input.SmartInput_radio_html_width_div");b.innerHTML=
'\x3cdiv id\x3d"davinci.ve.input.SmartInput_radio_html_div" class\x3d"dojoxEllipsis"\x3e'+f.htmlMarkup+"\x3c/div\x3e";var a=dijit.byId("davinci.ve.input.SmartInput_radio_html"),e=dijit.byId("davinci.ve.input.SmartInput_radio_text"),h=dojo.byId("davinci.ve.input.SmartInput_table");a.setDisabled(d);e.setDisabled(d);d?(dojo.addClass(c,"inlineEditDisabled"),dojo.addClass(b,"inlineEditDisabled"),a.set("checked",!1),e.set("checked",!0)):(dojo.removeClass(c,"inlineEditDisabled"),dojo.removeClass(b,"inlineEditDisabled"));
!d&&this.isHtmlSupported()?(dojo.style(e.domNode,"display",""),dojo.style(a.domNode,"display",""),dojo.style(b,"display",""),dojo.style(c,"display",""),dojo.style(h,"display","")):(dojo.style(e.domNode,"display","none"),dojo.style(a.domNode,"display","none"),dojo.style(b,"display","none"),dojo.style(c,"display","none"),dojo.style(h,"display","none"))},resize:function(b){b=dojo.byId("iedResizeDiv");var d=dijit.byId("davinciIleb"),c=b.clientWidth-5,a=b.clientHeight-6,e=b.clientWidth-10,c=b.clientWidth-
8,a=b.clientHeight-20,e=b.clientWidth-9,f=dojo.byId("smartInputSim");dojo.style(f,"width",c+10+"px");this.updateSimStyle();d&&(d._setStyleAttr({width:c+"px",height:a+"px",maxHeight:a+"px"}),d._setStyleAttr({width:b.clientWidth+"px"}));d=dojo.byId("davinci.ve.input.SmartInput_radio_div");dojo.style(d,"width",e+2+"px");d=dojo.byId("davinci.ve.input.SmartInput_radio_text_width_div");dojo.style(d,"width",b.clientWidth-50+"px");d=dojo.byId("davinci.ve.input.SmartInput_radio_html_width_div");dojo.style(d,
"width",b.clientWidth-50+"px")},onBlur:function(b){this.updateSimStyle(b)},updateSimStyle:function(b){var d=dijit.byId("davinciIleb");if(b=dojo.byId("smartInputSim"))d=dojo.style(d.domNode),dojo.style(b,"borderColor",d.borderTopColor),dojo.style(b,"backgroundColor",d.backgroundColor)},_getTemplate:function(){var e='\x3cdiv id\x3d"iedResizeDiv" class\x3d"iedResizeDiv" \x3e\x3ctextarea dojoType\x3d"dijit.form.SimpleTextarea" name\x3d"davinciIleb" trim\x3d"true" id\x3d"davinciIleb" class\x3d"smartInputTextArea" \x3e\x3c/textarea\x3e\x3cdiv id\x3d"smartInputSim" class\x3d"smartInputSim" \x3e\x3c/div\x3e\x3c/div\x3e';
"true"===this.multiLine&&(e='\x3cdiv id\x3d"iedResizeDiv" class\x3d"iedResizeDiv" \x3e\x3ctextarea dojoType\x3d"dijit.form.SimpleTextarea" name\x3d"davinciIleb" trim\x3d"true" id\x3d"davinciIleb" class\x3d"smartInputTextAreaMulti" \x3e\x3c/textarea\x3e\x3cdiv id\x3d"smartInputSim" class\x3d"smartInputSim" \x3e\x3c/div\x3e\x3c/div\x3e');return""+e+'\x3cdiv id\x3d"davinci.ve.input.SmartInput_div" class\x3d"davinciVeInputSmartInputDiv" \x3e\x3cdiv id\x3d"davinci.ve.input.SmartInput_radio_div" class\x3d"smartInputRadioDiv" \x3e\x3ctable id\x3d"davinci.ve.input.SmartInput_table"\x3e \x3ctbody\x3e\x3ctr\x3e \x3ctd class\x3d"smartInputTd1" \x3e \x3cinput id\x3d"davinci.ve.input.SmartInput_radio_text" showlabel\x3d"true" type\x3d"radio" dojoType\x3d"dijit.form.RadioButton" disabled\x3d"false" readOnly\x3d"false" intermediateChanges\x3d"false" checked\x3d"true"\x3e \x3c/input\x3e \x3c/td\x3e \x3ctd class\x3d"smartInputTd2" \x3e\x3cdiv id\x3d"davinci.ve.input.SmartInput_radio_text_width_div" class\x3d"smartInputRadioTextDiv"\x3e\x3c/div\x3e\x3c/td\x3e \x3c/tr\x3e\x3ctr\x3e \x3ctd class\x3d"smartInputTd1"\x3e \x3cinput id\x3d"davinci.ve.input.SmartInput_radio_html" showlabel\x3d"true" type\x3d"radio" dojoType\x3d"dijit.form.RadioButton"\x3e \x3c/input\x3e \x3c/td\x3e \x3ctd class\x3d"smartInputTd2"\x3e\x3cdiv id\x3d"davinci.ve.input.SmartInput_radio_html_width_div" class\x3d"smartInputRadioTextDiv"\x3e\x3c/div\x3e\x3c/td\x3e \x3c/tr\x3e \x3c/tbody\x3e\x3c/table\x3e \x3cdiv class\x3d"smartInputHelpDiv" \x3e \x3cspan id\x3d"davinci.ve.input.SmartInput_img_help" title\x3d"Help" class\x3d"inlineEditHelp" \x3e \x3c/span\x3e\x3cspan class\x3d"smartInputSpacerSpan" \x3e\x3cbutton id\x3d"davinci.ve.input.SmartInput_ok" dojoType\x3d"dijit.form.Button" type\x3d"submit" class\x3d"inlineEditHelpOk" \x3e'+
b.buttonOk+'\x3c/button\x3e \x3cbutton id\x3ddavinci.ve.input.SmartInput_cancel dojoType\x3d"dijit.form.Button" class\x3d"inlineEditHelpCancel"\x3e '+b.buttonCancel+'\x3c/button\x3e \x3c/span\x3e \x3c/div\x3e \x3cdiv id\x3d"davinci.ve.input.SmartInput_div_help" style\x3d"display:none;" class\x3d"smartInputHelpTextDiv" \x3e \x3cdiv dojoType\x3d"dijit.layout.ContentPane" class\x3d"smartInputHelpTextDivContentPane "style\x3d"padding:0;" \x3e'+this.getHelpText()+'\x3c/div\x3e \x3cdiv style\x3d"text-align: left; padding:0; height:2px;" \x3e\x3c/div\x3e \x3c/div\x3e \x3c/div\x3e\x3c/div\x3e '},
_connectResizeHandle:function(){},_connectSimDiv:function(){this._connection.push(dojo.connect(this._inline.eb,"onFocus",this,"updateSimStyle"));this._connection.push(dojo.connect(this._inline.eb,"onMouseOver",this,"updateSimStyle"));this._connection.push(dojo.connect(this._inline.eb,"onMouseOut",this,"updateSimStyle"));this._connection.push(dojo.connect(dojo.byId(" davinci.ve.input.SmartInput_div"),"onclick",this,"updateSimStyle"))}})})},"davinci/ve/commands/ModifyRichTextCommand":function(){define(["dojo/_base/declare"],
function(p){return p("davinci.ve.commands.ModifyRichTextCommand",null,{name:"modify",constructor:function(n,m,h,g){this._oldId=n?n.id:void 0;this._properties=m=m||{};m.richText?(this._richText=!0,this._children=this._newText=m.richText,delete m.richText):this._children=m._children;this._context=g||n.getContext()},setContext:function(n){this._context=n},add:function(n){n&&n._oldId==this._oldId&&(n._properties&&dojo.mixin(this._properties,n._properties),n._children&&(this._children=n._children))},execute:function(){if(this._oldId&&
this._properties){var n=require("davinci/ve/widget"),m=n.byId(this._oldId);if(m){this._parentWidget=m.getParent();this._oldText||(this._oldText=m._srcElement.getElementText(this._context))&&"string"==typeof this._oldText&&(this._oldText=this._oldText.replace(/\n/g,""));this._oldData||(this._oldData=m.getData(),this._oldData.context=this._context,this._newData={type:this._oldData.type,properties:dojo.mixin({},this._oldData.properties,this._properties),children:this._newText,maqStates:this._oldData.maqStates,
maqDeltas:this._oldData.maqDeltas,context:this._context},this._oldData={type:this._oldData.type,properties:dojo.mixin({},this._oldData.properties,this._properties),children:this._oldText,maqStates:this._oldData.maqStates,maqDeltas:this._oldData.maqDeltas,context:this._context});var h=this._context;h&&h.detach(m);this._properties.id&&delete this._newData.properties.isTempID;this._newId_isTempID||(this._newId_isTempID=this._newData.properties.isTempID);this._oldId_isTempID||(this._oldId_isTempID=this._oldData.properties.isTempID);
var g=null,f=this._parentWidget.indexOf(m);this._parentWidget.removeChild(m);m.destroyWidget();this._newId&&(this._newData.properties.id=this._newId);this._newId_isTempID&&(this._newData.properties.isTempID=this._newId_isTempID);if(g=n.createWidget(this._newData))this._parentWidget.addChild(g,f),this._newId=g.id,this._context&&this._refresh(g),h&&(h.widgetAddedOrDeleted(),this._oldId!=this._newId&&h.widgetChanged(h.WIDGET_ID_CHANGED,g,this._oldId),h.widgetChanged(h.WIDGET_MODIFIED,g)),this.newWidget=
g,dojo.publish("/davinci/ui/widget/replaced",[g,m]),require("davinci/ve/States").resetState(g.domNode)}}},undo:function(){if(this._newId&&this._oldData){var n=require("davinci/ve/widget"),m=n.byId(this._newId);if(m){var h=dojo.indexOf(this._parentWidget.getChildren(),m);if(!(0>h)){var g=this._parentWidget.getContext();g&&g.detach(m);this._parentWidget.removeChild(m);m.destroyWidget();this._oldData.children=this._oldText;this._oldData.properties.id=this._oldId;n=n.createWidget(this._oldData);this._parentWidget.addChild(n,
h);g&&this._refresh(n);g.widgetAddedOrDeleted();g.widgetChanged(g.WIDGET_MODIFIED,n);dojo.publish("/davinci/ui/widget/replaced",[n,m]);require("davinci/ve/States").resetState(n.domNode)}}}},_refresh:function(n){var m=n.getContainerNode();m&&this._context.getGlobal().require("dojo/parser").parse(m);this._context.attach(n);n.startup();n.renderWidget();m&&this._context._attachChildren(m)}})})},"url:davinci/workbench/templates/Preferences.html":"\x3cdiv style\x3d'width:100%; height: 100%'\x3e\n\t\x3cdiv class\x3d\"dijitDialogPaneContentArea\"\x3e\n\t\t\x3cdiv dojoType\x3d'dijit.layout.BorderContainer' dojoAttachPoint\x3d\"borderContainer\" style\x3d'width:100%; height: 100%' gutters\x3d'false' liveSplitters\x3d'true' id\x3d'preferencesContainer'\x3e\n\t\t\t\x3cdiv dojoType\x3d'dijit.layout.ContentPane' id\x3d'pref.TreePane' splitter\x3d'true' region\x3d'leading' style\x3d'width: 200px;' minSize\x3d'100' maxSize\x3d'300'\x3e\x3c/div\x3e\n\t\t\t\x3cdiv dojoType\x3d'dijit.layout.ContentPane' region\x3d'center' id\x3d'pref.RightPane'\x3e\x3c/div\x3e\n\t\t\x3c/div\x3e\n\t\x3c/div\x3e\n\t\x3cdiv class\x3d\"dijitDialogPaneActionBar\"\x3e\n\t\t\x3c!-- FIXME: we don't have logic to yet implement restoreDefaults() yet. See #627\n\t\t\x3cbutton dojoType\x3ddijit.form.Button type\x3d\"button\" onclick\x3d\"davinci.workbench.Preferences.restoreDefaults();\"\x3e\x3c/button\x3e--\x3e\n\t\t\x3cbutton dojoType\x3d\"dijit.form.Button\" type\x3d\"button\" onclick\x3d\"davinci.workbench.Preferences.save();\" class\x3d\"maqPrimaryButton\" type\x3d\"submit\"\x3e${commonStrings.buttonSave}\x3c/button\x3e\n\t\t\x3cbutton dojoType\x3d\"dijit.form.Button\" type\x3d\"button\" onclick\x3d\"davinci.workbench.Preferences.finish();\" class\x3d\"maqSecondaryButton\"\x3e${commonStrings.buttonCancel}\x3c/button\x3e\n\t\x3c/div\x3e\n\x3c/div\x3e\n\n\n",
"url:davinci/ve/widgets/templates/BackgroundDialog.html":"\x3cdiv class\x3d\"backgroundDialog\" style\x3d\"position:relative\" dojoAttachPoint\x3d\"_fileDialog\"\x3e\n\t\x3cstyle type\x3d\"text/css\"\x3e\n\t\t.backgroundDialog {\n\t\t\twidth:31em;\n\t\t}\n\t\t.bgdTopDiv {\n\t\t\tmargin-top: 4px;\n\t\t\tpadding-left: .75em;\n\t\t}\n\t\t.bgdTopTable {\n\t\t\twidth:100%;\n\t\t\tborder-collapse:collapse;\n\t\t}\n\t\t.bgdTopLabel, .bgdTopField, .bgdTopPreview {\n\t\t\twidth:1px;\n\t\t\twhite-space:nowrap;\n\t\t}\n\t\t.bgdTopLabel {\n\t\t\ttext-align:right;\n\t\t\tpadding-right:6px;\n\t\t}\n\t\t.bgdTopTable .dijitSelect .dijitButtonContents {\n\t\t\twidth:8em;\n\t\t}\n\t\t.bgdTopTable .dijitTextBox {\n\t\t\twidth: 9.8em;\n\t\t}\n\t\t.bgdPreview {\n\t\t\tdisplay:inline-block;\n\t\t\twidth: 6em;\n\t\t\theight: 2.8em;\n\t\t\tmargin-left:12px;\n\t\t\tborder:1px solid gray;\n\t\t\tvertical-align: middle;\n\t\t}\n\t\t.bgdOptionsDiv {\n\t\t\tmargin:0.3em 0em 1em 1em;\n\t\t}\n\t\t.bgdOptionsDiv \x3e table {\n\t\t\twidth:27em;\n\t\t}\n\t\t.bgdSection {\n\t\t\tbackground-color:#d8d8d8;\n\t\t}\n\t\tdiv.bgdSection, .bgdSection td, .bgdSection.bgdUrlSectionLabel {\n\t\t\tpadding:2px 5px;\n\t\t}\n\t\t.bgdBeforeStopsLabel {\n\t\t\theight:6px;\n\t\t}\n\t\t.bgdStopsLabel {\n\t\t\tmargin-top:1em;\n\t\t}\n\t\t.bgdAfterStopsLabel {\n\t\t\theight:0px;\n\t\t}\n\t\t.bgdBeforeOptionsLabel {\n\t\t\theight:16px;\n\t\t}\n\t\t.bgdOptionsLabel {\n\t\t\tmargin-top:1em;\n\t\t}\n\t\t.bgdAfterOptionsLabel {\n\t\t\theight:4px;\n\t\t}\n\t\t.bgdCol1 {\n\t\t\twidth:10px;\n\t\t}\n\t\t.bgdPlusMinusButtons {\n\t\t\twhite-space:nowrap;\n\t\t\twidth:51px;\n\t\t}\n\t\t.bgdOptionsDiv th {\n\t\t\ttext-align:center;\n\t\t\tfont-style:italic;\n\t\t}\n\t\t.bgdOptsLabel {\n\t\t\ttext-align:right;\n\t\t\tpadding-right: 6px;\n\t\t\twhite-space:nowrap;\n\t\t}\n\t\t.bgdColor.dijitTextBox {\n\t\t\twidth:9em;\n\t\t}\n\t\t.bgdOptionsDiv .bgdPosition.dijitTextBox {\n\t\t\twidth:5em;\n\t\t}\n\t\t.bgdOptionsDiv .dijitTextBox {\n\t\t\twidth:10.6em;\n\t\t}\n\t\t.bgdStopColorTD .dijitTextBox {\n\t\t\twidth:14em;\n\t\t}\n\t\t.bgdOptionsDiv .dijitSelect {\n\t\t\tmargin:0;\n\t\t}\n\t\t.bgdOptionsDiv .dijitSelect .dijitButtonContents {\n\t\t\twidth:9em;\n\t\t}\n\t\t.bgdUrlContainerOuter {\n\t\t\tmargin-top:1em;\n\t\t\tmargin-left:1em;\n\t\t}\n\t\t.bgdUrlContainerInner {\n\t\t\tmargin:0 1em;\n\t\t}\n\t\t.bgdUrlSectionLabel {\n\t\t\tmargin:1em 0 .25em;\n\t\t}\n\t\t.bgdFileTreeContainer {\n\t\t\tmargin: 0 0 0 3px;\n\t\t\tborder: 1px solid #26A;\n\t\t}\n\t\t.bgdFileTreeContainer .dijitTree {\n\t\t\theight:125px;\n\t\t}\t\t\n\t\t.backgroundDialog .fileNameRow {\n\t\t\tmargin:8px 0 .4em;\n\t\t}\n\t\t.backgroundDialog .fileNameRow label {\n\t\t\tvertical-align:middle;\n\t\t\tmargin-right:4px;\n\t\t}\n\t\t.backgroundDialog .fileNameRow .dijitTextBox {\n\t\t\twidth:16em;\n\t\t}\n\t\t.bgdOptionsDiv .bgdOtherRow .dijitTextBox {\n\t\t\twidth:15em;\n\t\t}\n\t\t\n\t\x3c/style\x3e\n\n\t\x3cdiv class\x3d\"dijitDialogPaneContentArea\"\x3e\n\t\t\x3cdiv class\x3d'bgdTopDiv'\x3e\n\t\t\t\x3ctable class\x3d'bgdTopTable'\x3e\n\t\t\t\t\x3ctr\x3e\n\t\t\t\t\t\x3ctd class\x3d'bgdTopLabel'\x3e\x3clabel class\x3d'bgdTypeDivTypeLabel'\x3e${veNLS.bgdBackgroundColor}\x3c/label\x3e\x3c/td\x3e\n\t\t\t\t\t\x3ctd class\x3d'bgdTopField'\x3e\n\t\t\t\t\t\t\x3cselect dojoType\x3d\"dijit.form.ComboBox\" dojoAttachPoint\x3d'bgdColorCB'\x3e\n\t\t\t\t\t\t\t\x3c!-- values added dynamically --\x3e\n\t\t\t\t\t\t\x3c/select\x3e\n\t\t\t\t\t\x3c/td\x3e\n\t\t\t\t\t\x3ctd rowspan\x3d'2' class\x3d'bgdTopPreview' style\x3d'border-collapse:collapse'\x3e\x3cspan class\x3d'bgdPreview'\x3e\x3c/span\x3e\x3c/td\x3e\n\t\t\t\t\t\x3ctd class\x3d'bgdTopExpando'\x3e\x26nbsp;\x3c/td\x3e\n\t\t\t\t\x3c/tr\x3e\n\t\t\t\t\x3ctr\x3e\n\t\t\t\t\t\x3ctd class\x3d'bgdTopLabel'\x3e\x3clabel class\x3d'bgdTypeDivTypeLabel'\x3e${veNLS.bgdBackgroundImageType}\x3c/label\x3e\x3c/td\x3e\n\t\t\t\t\t\x3ctd class\x3d'bgdTopField'\x3e\n\t\t\t\t\t\t\x3cselect dojoType\x3d'dijit.form.Select' value\x3d'linear' dojoAttachPoint\x3d'bgdTypeSelect'\x3e\n\t\t\t\t\t\t\t\x3c!-- values added dynamically --\x3e\n\t\x3c!-- FIXME: Add plain text type-in box if unrecognized syntax --\x3e\n\t\t\t\t\t\t\x3c/select\x3e\n\t\t\t\t\t\x3c/td\x3e\n\t\t\t\t\t\x3ctd class\x3d'bgdTopExpando'\x3e\x26nbsp;\x3c/td\x3e\n\t\t\t\t\x3c/tr\x3e\n\t\t\t\x3c/table\x3e\n\t\t\x3c/div\x3e\n\t\t\n\t\t\x3cdiv class\x3d\"bgdUrlContainerOuter bgdImageOptRow\"\x3e\n\t\t\t\x3cdiv class\x3d\"bgdSection bgdOptionsLabel\"\x3e${veNLS.bgdImageUrl}\x3c/div\x3e\n\t\t\t\x3cdiv class\x3d\"bgdUrlContainerInner\"\x3e\n\t\t\t\t\x3cdiv class\x3d'fileNameRow'\x3e\n\t\t\t\t\t\x3ctd class\x3d\"fileDialogLabelCell\"\x3e\n\t\t\t\t\t\x3clabel\x3e${veNLS.bgdUrl}\x3c/label\x3e\n\t\t\t\t\t\x3c/td\x3e\n\t\t\t\t\t\x3ctd\x3e\n\t\t\t\t\t\x3cdiv dojoType\x3d'davinci.ui.widgets.FileFieldDialog' dojoAttachPoint\x3d\"_filePicker\"\x3e\x3c/div\x3e\n\t\t\t\t\t\x3c/td\x3e\n\t\t\t\t\x3c/div\x3e\n\t\t\t\x3c/div\x3e\n\t\t\x3c/div\x3e\n\t\t\x3cdiv class\x3d\"bgdOptionsDiv\"\x3e\n\t\t\t\x3ctable\x3e\n\t\t\t\t\x3ctr class\x3d\"bgdGradOptRow bgdBeforeStopsLabel\"\x3e\x3c/tr\x3e\n\t\t\t\t\x3ctr class\x3d\"bgdGradOptRow bgdSection bgdStopsLabel\"\x3e\n\t\t\t\t\t\x3ctd colspan\x3d\"5\"\x3e${veNLS.bgdColorStops}\x3c/td\x3e\n\t\t\t\t\x3c/tr\x3e\n\t\t\t\t\x3ctr class\x3d\"bgdGradOptRow bgdAfterStopsLabel\"\x3e\x3c/tr\x3e\n\t\t\t\t\x3ctr class\x3d'bgdGradOptRow bgdStopRow'\x3e\n\t\t\t\t\t\x3cth\x3e\x3c/th\x3e\x3cth\x3e\x3c/th\x3e\x3cth\x3e${veNLS.bgdColor}\x3c/th\x3e\x3cth\x3e${veNLS.bgdPosition}\x3c/th\x3e\x3cth\x3e\x3c/th\x3e\n\t\t\t\t\x3c/tr\x3e\n\t\t\t\t\x3c!-- gradient stop rows added dynamically --\x3e\n\t\t\t\t\x3ctr class\x3d\"bgdBeforeOptionsLabel bgdOptionsLabelRow\"\x3e\x3c/tr\x3e\n\t\t\t\t\x3ctr class\x3d\"bgdSection bgdOptionsLabel bgdOptionsLabelRow\"\x3e\n\t\t\t\t\t\x3ctd colspan\x3d\"5\"\x3e${veNLS.bgdOptions}\x3c/td\x3e\n\t\t\t\t\x3c/tr\x3e\n\t\t\t\t\x3ctr class\x3d\"bgdAfterOptionsLabel bgdOptionsLabelRow\"\x3e\x3c/tr\x3e\n\t\t\t\t\x3ctr class\x3d\"bgdGradOptRow bgdLinearOptRow\"\x3e\t\n\t\t\t\t\t\x3ctd class\x3d'bgdCol1'\x3e\x3c/td\x3e\n\t\t\t\t\t\x3ctd class\x3d'bgdOptsLabel'\x3e\x3clabel\x3e${veNLS.bgdAngle}\x3c/label\x3e\x3c/td\x3e\n\t\t\t\t\t\x3ctd colspan\x3d'3'\x3e\n\t\t\t\t\t\t\x3cselect dojoType\x3d\"dijit.form.ComboBox\" dojoAttachPoint\x3d'bgdLinearAngleCB'\x3e\n\t\t\t\t\t\t\t\x3c!-- values added dynamically --\x3e\n\t\t\t\t\t\t\x3c/select\x3e\n\t\t\t\t\t\x3c/td\x3e\n\t\t\t\t\x3c/tr\x3e\n\t\t\t\t\x3ctr class\x3d\"bgdGradOptRow bgdRadialOptRow\"\x3e\t\n\t\t\t\t\t\x3ctd class\x3d'bgdCol1'\x3e\x3c/td\x3e\n\t\t\t\t\t\x3ctd class\x3d'bgdOptsLabel'\x3e${veNLS.bgdPosition2}\x3c/td\x3e\n\t\t\t\t\t\x3ctd colspan\x3d'3'\x3e\n\t\t\t\t\t\t\x3cselect dojoType\x3d\"dijit.form.ComboBox\" dojoAttachPoint\x3d'bgdRadialPosCB'\x3e\n\t\t\t\t\t\t\t\x3c!-- values added dynamically --\x3e\n\t\t\t\t\t\t\x3c/select\x3e\n\t\t\t\t\t\x3c/td\x3e\n\t\t\t\t\x3c/tr\x3e\n\t\t\t\t\x3ctr dojoAttachPoint\x3d\"bgdShapeRow\" class\x3d\"bgdGradOptRow bgdRadialOptRow\"\x3e\t\n\t\t\t\t\t\x3ctd class\x3d'bgdCol1'\x3e\x3c/td\x3e\n\t\t\t\t\t\x3ctd class\x3d'bgdOptsLabel'\x3e\x3clabel\x3e${veNLS.bgdShape}\x3c/label\x3e\x3c/td\x3e\n\t\t\t\t\t\x3ctd colspan\x3d'3'\x3e\n\t\t\t\t\t\t\x3cselect dojoType\x3d\"dijit.form.ComboBox\" dojoAttachPoint\x3d'bgdRadialShapeCB'\x3e\n\t\t\t\t\t\t\t\x3c!-- values added dynamically --\x3e\n\t\t\t\t\t\t\x3c/select\x3e\n\t\t\t\t\t\x3c/td\x3e\n\t\t\t\t\x3c/tr\x3e\n\t\t\t\t\x3ctr dojoAttachPoint\x3d\"bgdExtentRow\" class\x3d\"bgdGradOptRow bgdRadialOptRow\"\x3e\t\n\t\t\t\t\t\x3ctd class\x3d'bgdCol1'\x3e\x3c/td\x3e\n\t\t\t\t\t\x3ctd class\x3d'bgdOptsLabel'\x3e\x3clabel\x3e${veNLS.bgdExtent}\x3c/label\x3e\x3c/td\x3e\n\t\t\t\t\t\x3ctd colspan\x3d'3'\x3e\n\t\t\t\t\t\t\x3cselect dojoType\x3d\"dijit.form.ComboBox\" dojoAttachPoint\x3d'bgdRadialExtentCB'\x3e\n\t\t\t\t\t\t\t\x3c!-- values added dynamically --\x3e\n\t\t\t\t\t\t\x3c/select\x3e\n\t\t\t\t\t\x3c/td\x3e\n\t\t\t\t\x3c/tr\x3e\n\t\t\t\t\x3ctr dojoAttachPoint\x3d\"bgdRepeatRow\" class\x3d\"bgdImageOptRow\"\x3e\t\n\t\t\t\t\t\x3ctd class\x3d'bgdCol1'\x3e\x3c/td\x3e\n\t\t\t\t\t\x3ctd class\x3d'bgdOptsLabel'\x3e\x3clabel\x3e${veNLS.bgdBackgroundRepeat}\x3c/label\x3e\x3c/td\x3e\n\t\t\t\t\t\x3ctd colspan\x3d'3'\x3e\n\t\t\t\t\t\t\x3cselect dojoType\x3d\"dijit.form.ComboBox\" dojoAttachPoint\x3d'bgdRepeatCB'\x3e\n\t\t\t\t\t\t\t\x3c!-- values added dynamically --\x3e\n\t\t\t\t\t\t\x3c/select\x3e\n\t\t\t\t\t\x3c/td\x3e\n\t\t\t\t\x3c/tr\x3e\n\t\t\t\t\x3ctr dojoAttachPoint\x3d\"bgdPositionRow\" class\x3d\"bgdImageOptRow\"\x3e\t\n\t\t\t\t\t\x3ctd class\x3d'bgdCol1'\x3e\x3c/td\x3e\n\t\t\t\t\t\x3ctd class\x3d'bgdOptsLabel'\x3e${veNLS.bgdBackgroundPosition}\x3c/td\x3e\n\t\t\t\t\t\x3ctd colspan\x3d'3'\x3e\n\t\x3c!-- FIXME: regExp, invalidMessage --\x3e\n\t\t\t\t\t\t\x3cselect dojoType\x3d\"dijit.form.ComboBox\" dojoAttachPoint\x3d'bgdPositionCB'\x3e\n\t\t\t\t\t\t\t\x3c!-- values added dynamically --\x3e\n\t\t\t\t\t\t\x3c/select\x3e\n\t\t\t\t\t\x3c/td\x3e\n\t\t\t\t\x3c/tr\x3e\n\t\t\t\t\x3ctr dojoAttachPoint\x3d\"bgdSizeRow\" class\x3d\"bgdImageOptRow\"\x3e\t\n\t\t\t\t\t\x3ctd class\x3d'bgdCol1'\x3e\x3c/td\x3e\n\t\t\t\t\t\x3ctd class\x3d'bgdOptsLabel'\x3e${veNLS.bgdBackgroundSize}\x3c/td\x3e\n\t\t\t\t\t\x3ctd colspan\x3d'3'\x3e\n\t\x3c!-- FIXME: regExp, invalidMessage --\x3e\n\t\t\t\t\t\t\x3cselect dojoType\x3d\"dijit.form.ComboBox\" dojoAttachPoint\x3d'bgdSizeCB'\x3e\n\t\t\t\t\t\t\t\x3c!-- values added dynamically --\x3e\n\t\t\t\t\t\t\x3c/select\x3e\n\t\t\t\t\t\x3c/td\x3e\n\t\t\t\t\x3c/tr\x3e\n\t\t\t\t\x3ctr dojoAttachPoint\x3d\"bgdOriginRow\" class\x3d\"bgdImageOptRow\"\x3e\t\n\t\t\t\t\t\x3ctd class\x3d'bgdCol1'\x3e\x3c/td\x3e\n\t\t\t\t\t\x3ctd class\x3d'bgdOptsLabel'\x3e\x3clabel\x3e${veNLS.bgdBackgroundOrigin}\x3c/label\x3e\x3c/td\x3e\n\t\t\t\t\t\x3ctd colspan\x3d'3'\x3e\n\t\t\t\t\t\t\x3cselect dojoType\x3d\"dijit.form.ComboBox\" dojoAttachPoint\x3d'bgdOriginCB'\x3e\n\t\t\t\t\t\t\t\x3c!-- values added dynamically --\x3e\n\t\t\t\t\t\t\x3c/select\x3e\n\t\t\t\t\t\x3c/td\x3e\n\t\t\t\t\x3c/tr\x3e\n\t\t\t\t\x3ctr dojoAttachPoint\x3d\"bgdClipRow\" class\x3d\"bgdImageOptRow\"\x3e\t\n\t\t\t\t\t\x3ctd class\x3d'bgdCol1'\x3e\x3c/td\x3e\n\t\t\t\t\t\x3ctd class\x3d'bgdOptsLabel'\x3e\x3clabel\x3e${veNLS.bgdBackgroundClip}\x3c/label\x3e\x3c/td\x3e\n\t\t\t\t\t\x3ctd colspan\x3d'3'\x3e\n\t\t\t\t\t\t\x3cselect dojoType\x3d\"dijit.form.ComboBox\" dojoAttachPoint\x3d'bgdClipCB'\x3e\n\t\t\t\t\t\t\t\x3c!-- values added dynamically --\x3e\n\t\t\t\t\t\t\x3c/select\x3e\n\t\t\t\t\t\x3c/td\x3e\n\t\t\t\t\x3c/tr\x3e\n\t\t\t\t\x3ctr dojoAttachPoint\x3d\"bgdOtherTypeInRow\" class\x3d\"bgdOtherRow\"\x3e\t\n\t\n\t\t\t\t\t\x3ctd class\x3d'bgdCol1'\x3e\x3c/td\x3e\n\t\t\t\t\t\x3ctd class\x3d'bgdOptsLabel'\x3e\x3clabel\x3e${veNLS.bgdBackgroundImageValue}\x3c/label\x3e\x3c/td\x3e\n\t\t\t\t\t\x3ctd colspan\x3d'3'\x3e\n\t\t\t\t\t\t\x3ctextarea dojoType\x3d\"dijit.form.Textarea\" dojoAttachPoint\x3d'bgdOtherTA'\x3e\x3c/textarea\x3e\n\t\t\t\t\t\x3c/td\x3e\n\t\n\t\t\t\t\x3c/tr\x3e\n\t\n\t\t\t\x3c/table\x3e\n\t\t\x3c/div\x3e\n\t\x3c/div\x3e\n\n\t\x3c!--div class\x3d\"dijitDialogPaneActionBar\"\x3e\n\t\t\x3cspan dojoType\x3d'dijit.form.Button' dojoAttachPoint\x3d\"_okButton\" dojoAttachEvent\x3d'onClick:okButton' label\x3d'${buttonOk}' class\x3d\"maqPrimaryButton\" type\x3d\"submit\"\x3e\x3c/span\x3e \n\t\t\x3cspan dojoType\x3d'dijit.form.Button' dojoAttachEvent\x3d'onClick:cancelButton' label\x3d'${buttonCancel}' class\x3d\"maqSecondaryButton\"/\x3e\x3c/span\x3e \n\t\x3c/div--\x3e\n\x3c/div\x3e\n",
"url:davinci/ui/widgets/templates/FileFieldDialog.html":"\x3cdiv\x3e\n\t\x3cdiv style\x3d'float:right;'\x3e\n\t\t\x3cbutton type\x3d'button' style\x3d'font-size:.75em;float:right;' dojoType\x3d\"dijit.form.Button\" dojoAttachPoint\x3d\"button\" dojoAttachEvent\x3d\"onClick:_showFileSelectionDialog\"\x3e...\x3c/button\x3e\n\t\x3c/div\x3e\n\t\x3cdiv style\x3d'margin-right:35px;'\x3e\n\t\t\x3cinput style\x3d'width:100%;' type\x3d'text' dojoType\x3d\"dijit.form.TextBox\" dojoAttachPoint\x3d\"textField\" dojoAttachEvent\x3d\"onChange:_onChange\"\x3e\x3c/input\x3e\n\t\x3c/div\x3e\n\x3c/div\x3e\n\n",
"url:davinci/ve/widgets/templates/WidgetToolBar.html":'\x3cdiv class\x3d"propertiesTitleBar ui-widget-content" style\x3d"display: none"\x3e\n \x3cdiv class\x3d\'propertiesWidgetDescription\'\x3e\n \x3cspan class\x3d\'propertiesWidgetDescriptionFor\'\x3e${veNLS.toolBarFor}\x3c/span\x3e\n \x3cspan data-dojo-attach-point\x3d"descNode"\x3e${veNLS.noSelection}\x3c/span\x3e\n \x3c/div\x3e\n \x3cdiv class\x3d"propertiesTitleBarPropertiesContainer"\x3e\n \x3ctable width\x3d"100%" cellspacing\x3d"0" cellpadding\x3d"0" border\x3d"0" align\x3d"center"\n class\x3d"propertiesTitleBarProperties property_table_stretchable"\x3e\n \x3ccolgroup\x3e\n \x3ccol style\x3d"width:10px;"\x3e\n \x3ccol class\x3d"gap02"\x3e\n \x3ccol class\x3d"gap03"\x3e\n \x3ccol style\x3d"width:10px;"\x3e\n \x3ccol style\x3d"width:6px;"\x3e\n \x3c/colgroup\x3e\n \x3ctbody\x3e\n \x3c!--tr class\x3d"cssPropertySection"\x3e\n \x3ctd\x3e\x3c/td\x3e\n \x3ctd class\x3d"propertyDisplayName"\x3e${veNLS.toolBarClass}\x26nbsp;\x3c/td\x3e\n \x3ctd class\x3d"propertyInputField"\x3e\n \x3cinput data-dojo-type\x3d"dijit.form.ComboBox" data-dojo-attach-point\x3d"classComboBox" label\x3d"" data-dojo-attach-event\x3d"onChange:_onChangeClassAttribute,onFocus:_onFieldFocus,onBlur:_onFieldBlur" style\x3d"width: 100%" searchAttr\x3d"name"/\x3e\n \x3c/td\x3e\n \x3ctd nowrap\x3d"true" class\x3d"propertyExtra"\x3e\x3c/td\x3e\n \x3ctd\x3e\x3c/td\x3e\n \x3c/tr--\x3e\n \x3ctr class\x3d"cssPropertySection"\x3e\n \x3ctd\x3e\x3c/td\x3e\n \x3ctd class\x3d"propertyDisplayName"\x3e${veNLS.toolBarId}\x26nbsp;\x3c/td\x3e\n \x3ctd class\x3d"propertyInputField"\x3e\n \x3cinput class\x3d"form-control input-transparent" data-dojo-type\x3d"dijit.form.ValidationTextBox" data-dojo-attach-point\x3d"idTextBox" label\x3d"" data-dojo-attach-event\x3d"onChange:_onChangeIDAttribute,onKeyPress:_onKeyPress,onFocus:_onFieldFocus,onBlur:_onFieldBlur" style\x3d"width: 100%"/\x3e\n \x3c/td\x3e\n \x3ctd nowrap\x3d"true" class\x3d"propertyExtra"\x3e\x3c/td\x3e\n \x3ctd\x3e\x3c/td\x3e\n \x3c/tr\x3e\n\n \x3ctr class\x3d"cssPropertySection"\x3e\n \x3ctd\x3e\x3c/td\x3e\n \x3ctd class\x3d"propertyDisplayName"\x3eClass\x3c/td\x3e\n \x3ctd class\x3d"propertyInputField"\x3e\n \x3cinput data-dojo-attach-point\x3d"cssClasses" type\x3d"text" class\x3d"" value\x3d"" style\x3d"width: 100%"\x3e\n \x3c/td\x3e\n \x3ctd nowrap\x3d"true" class\x3d"propertyExtra"\x3e\x3c/td\x3e\n \x3ctd\x3e\x3c/td\x3e\n \x3c/tr\x3e\n \x3c!--tr class\x3d"cssPropertySection"\x3e\n \x3ctd\x3e\x3c/td\x3e\n \x3ctd class\x3d"propertyDisplayName"\x3eBlock Group\x26nbsp;\x3c/td\x3e\n \x3ctd class\x3d"propertyInputField"\x3e\n \x3cinput data-dojo-type\x3d"dijit.form.ComboBox" data-dojo-attach-point\x3d"blockGroupComboBox" label\x3d"" data-dojo-attach-event\x3d"onChange:_onChangeBlockGroupAttribute,onFocus:_onFieldFocus,onBlur:_onFieldBlur" style\x3d"width: 100%" searchAttr\x3d"name"/\x3e\n \x3c/td\x3e\n \x3ctd nowrap\x3d"true" class\x3d"propertyExtra"\x3e\x3c/td\x3e\n \x3ctd\x3e\x3c/td\x3e\n \x3c/tr--\x3e\n \x3c/tbody\x3e\n \x3c/table\x3e\n \x3c/div\x3e\n\x3c/div\x3e\n',
"url:davinci/ui/widgets/templates/ThemeSetSelection.html":'\x3cdiv\x3e\n \x3cdiv class\x3d"dijitDialogPaneContentArea"\x3e\n\t\t\x3ctable style\x3d"width: 100%; padding-left:10px; padding-right:10px;"\x3e\n\t\t\t\x3ctr\x3e\n\t\t\t\t\x3ctd style\x3d"" NOWRAP\x3e${uiNLS.themeSet}\x3c/td\x3e\n\t\t\t\t\x3ctd style\x3d"width: 100%; text-align: center;"\x3e\x3cselect dojoType\x3d"dijit.form.Select" id\x3d"theme_select_themeset_theme_select" type\x3d"text" style\x3d"width: 175px;" \x3e\x3c/select\x3e\x3c/td\x3e\n\t\t\t\x3c/tr\x3e\n\t\t\x3c/table\x3e\n\t\n\t\t\x3cdiv style\x3d"border-top: 1px solid black; top: 231px; border-top-color: #ccc; left: 429px; width: 300px; height: 11px; margin-top: 6px; padding-left:10px;"\x3e\x3c/div\x3e\n\t\t\x3ctable style\x3d"padding-left: 15px; width: 100%;"\x3e\n\t\t\t\x3ctr\x3e\x3ctd style\x3d"width: 139px;"\x3e${uiNLS.desktopTheme}\x3c/td\x3e\x3ctd\x3e\x3cselect dojoType\x3d"dijit.form.Select" id\x3d"theme_select_desktop_theme_select"type\x3d"text" style\x3d"width: 175px;" \x3e\x3c/select\x3e\x3c/td\x3e\x3c/tr\x3e\n\t\t\t\x3ctr\x3e\x3ctd\x3e${uiNLS.mobileTheme}\x3c/td\x3e\x3ctd\x3e\x3cselect dojoType\x3d"dijit.form.Select" id\x3d"theme_select_mobile_theme_select"type\x3d"text" style\x3d"width: 175px;" \x3e\x3c/select\x3e\x3c/td\x3e\x3c/tr\x3e\n\t\t\x3c/table\x3e\n\t\t\x3ctable id\x3d"theme_select_devices_table" style\x3d"padding-left:30px; border-collapse: separate; border-spacing: 0 0; width: 100%"\x3e\n\t\t\t\x3ctr\x3e\x3ctd style\x3d"width: 139px;"\x3e${uiNLS.android}\x3c/td\x3e\x3ctd\x3e\x3cselect dojoType\x3d"dijit.form.Select" id\x3d"theme_select_android_select" type\x3d"text" style\x3d"width: 150px;"\x3e\x3c/select\x3e\x3c/td\x3e\x3c/tr\x3e\n\t\t\t\x3ctr\x3e\x3ctd\x3e${uiNLS.blackberry}\x3c/td\x3e\x3ctd\x3e\x3cselect dojoType\x3d"dijit.form.Select" id\x3d"theme_select_blackberry_select" type\x3d"text" style\x3d"width: 150px;"\x3e\x3c/select\x3e\x3c/td\x3e\x3c/tr\x3e\n\t\t\t\x3ctr\x3e\x3ctd\x3e${uiNLS.ipad}\x3c/td\x3e\x3ctd\x3e\x3cselect dojoType\x3d"dijit.form.Select" id\x3d"theme_select_ipad_select" type\x3d"text" style\x3d"width: 150px;"\x3e\x3c/select\x3e\x3c/td\x3e\x3c/tr\x3e\n\t\t\t\x3ctr\x3e\x3ctd\x3e${uiNLS.iphone}\x3c/td\x3e\x3ctd\x3e\x3cselect dojoType\x3d"dijit.form.Select" id\x3d"theme_select_iphone_select" type\x3d"text" style\x3d"width: 150px;"\x3e\x3c/select\x3e\x3c/td\x3e\x3c/tr\x3e\n\t\t\t\x3ctr\x3e\x3ctd\x3e${uiNLS.other}\x3c/td\x3e\x3ctd\x3e\x3cselect dojoType\x3d"dijit.form.Select" id\x3d"theme_select_other_select" type\x3d"text" style\x3d"width: 150px;"\x3e\x3c/select\x3e\x3c/td\x3e\x3c/tr\x3e\n\t\t\x3c/table\x3e\n\t\x3c/div\x3e\n\n\t\x3cdiv class\x3d"dijitDialogPaneActionBar"\x3e\n\t\t\x3cbutton dojoType\x3d"dijit.form.Button" id\x3d"theme_select_ok_button" label\x3d"${uiNLS.select}" class\x3d"maqPrimaryButton" type\x3d"submit"\x3e\x3c/button\x3e\n\t\t\x3cbutton dojoType\x3d"dijit.form.Button" id\x3d"theme_select_cancel_button" label\x3d"${commonNLS.buttonCancel}" class\x3d"maqSecondaryButton"\x3e\x3c/button\x3e\n\t\x3c/div\x3e\n\x3c/div\x3e\n',
"url:davinci/ve/newfile.template.html":'\x3c!DOCTYPE html\x3e\n\x3c!--\n\tTODO: margin:0 is a temporary hack. In previous releases, we always included dojo.css\n\twhich set margin:0, but we now only include dojo.css with the first Dojo widget\n\tadded to the page. That causes scrollbars when page was loaded initially,\n\twhich went want when first Dojo widget was added.\n\tNeed to rethink this whole business of width:100%;height:100%;margin:0\n--\x3e\n\x3chtml style\x3d"height: 100%; width: 100%; margin: 0;"\x3e\n\t\x3chead\x3e\n\t\t\x3cbase href\x3d"{baseUrl}"/\x3e\n\t\t\x3cmeta charset\x3d"utf-8"/\x3e\n\t\t\x3cscript src\x3d"{dojoUrl}" data-dojo-config\x3d"{dojoConfig}" {additionalDojoAttrs}\x3e\x3c/script\x3e\n\t\t\x3cscript\x3e\n\t\t\t// base dependencies needed for VE\n\t\t\trequire([\n\t\t\t\t\'dojo/parser\',\n\t\t\t\t\'dojox/html/_base\',\n\t\t\t\t\'dojo/domReady!\'\n\t\t\t\t{additionalModules}\n\t\t\t], top.loading{id});\n\t\t\x3c/script\x3e\n\t\t{themeHeadImports}\n\t\t{themeCssFiles}\n\t\x3c/head\x3e\n\t\x3cbody\x3e\n\t\x3c/body\x3e\n\x3c/html\x3e\n',
"url:davinci/ui/templates/download.html":'\x3cdiv class\x3d\'downloadDialog\'\x3e\t \n\t\x3cdiv class\x3d"dijitDialogPaneContentArea"\x3e\n\t\t\x3cdiv style\x3d"margin-bottom: 20px"\x3e\n\t\t ${fileName}: \x3cinput data-dojo-type\x3d\'dijit/form/ValidationTextBox\' type\x3d"text" maxLength\x3d\'${_fileNameMaxLength}\' data-dojo-attach-point\x3d"__fileName" value\x3d\'${_projectName}.zip\' data-dojo-props\x3d"regExp:\'${_fileNameValidationRegExp}\', required:true, invalidMessage:\'${invalidDownloadFileName}\'"\x3e\x3c/input\x3e\n\t\t\x3c/div\x3e\n\t\t\n\t\t\x3cdiv data-dojo-attach-point\x3d"_selectionDiv"\x3e\x3c/div\x3e\n\t\t\x3cdiv data-dojo-attach-point\x3d"_tableDiv"\x3e\x3c/div\x3e\n\n\t\t\x3cdiv style\x3d"margin-top: 8px"\x3e\n\t\t Select: \x3ca href\x3d"javascript:;" data-dojo-attach-event\x3d"onclick: _selectAll"\x3e${selectAll}\x3c/a\x3e / \x3ca href\x3d"javascript:;" data-dojo-attach-event\x3d"onclick: _selectNone"\x3e${selectNone}\x3c/a\x3e\n\t\t\x3c/div\x3e\n\n\t\t\x3cdiv style\x3d"margin-top: 20px"\x3e\n\t\t\t\x3cinput data-dojo-type\x3d\'dijit/form/CheckBox\' type\x3d"text" data-dojo-attach-point\x3d"__fullSource" data-dojo-props\x3d""\x3e\x3c/input\x3e\x3cspan style\x3d\'padding-left: 3px;\'\x3e${downloadFullSource}\x3c/span\x3e\n\t\t\t\x3cbr\x3e\n\t\t\t\x3cinput data-dojo-type\x3d\'dijit/form/CheckBox\' type\x3d"text" data-dojo-attach-point\x3d"__optimize" data-dojo-props\x3d""\x3e\x3c/input\x3e\x3cspan style\x3d\'padding-left: 3px;\'\x3e${optimizeOption}\x3c/span\x3e\n\t\t\x3c/div\x3e\n \x3c/div\x3e\n\t\x3cdiv class\x3d"dijitDialogPaneActionBar"\x3e\n\t\t\x3cbutton data-dojo-type\x3d\'dijit/form/Button\' data-dojo-attach-point\x3d"_okButton" data-dojo-attach-event\x3d\'onClick:okButton\' label\x3d\'${downloadButtonLabel}\' class\x3d"maqPrimaryButton" type\x3d"submit"\x3e\x3c/button\x3e\n\t\t\x3cbutton data-dojo-type\x3d\'dijit/form/Button\' data-dojo-attach-event\x3d\'onClick:cancelButton\' label\x3d\'${buttonCancel}\' class\x3d"maqSecondaryButton"\x3e\x3c/button\x3e\n\t\x3c/div\x3e\n\x3c/div\x3e',
"url:davinci/ui/templates/downloadSelected.html":"\x3cdiv class\x3d'downloadDialog'\x3e\t \n\t\x3cdiv class\x3d\"dijitDialogPaneContentArea\"\x3e\n\t\t\x3cdiv style\x3d\"margin-bottom: 20px\"\x3e\n\t\t ${fileName}: \x3cinput data-dojo-type\x3d'dijit/form/ValidationTextBox' type\x3d\"text\" maxLength\x3d'${_fileNameMaxLength}' data-dojo-attach-point\x3d\"__fileName\" value\x3d'${_projectName}.zip' data-dojo-props\x3d\"regExp:'${_fileNameValidationRegExp}', required:true, invalidMessage:'${invalidDownloadFileName}'\"\x3e\x3c/input\x3e\n\t\t\x3c/div\x3e\n\t\t\n\t\t\x3cdiv data-dojo-attach-point\x3d\"_selectionDiv\"\x3e\x3c/div\x3e\n\n \x3c/div\x3e\n\t\x3cdiv class\x3d\"dijitDialogPaneActionBar\"\x3e\n\t\t\x3cbutton data-dojo-type\x3d'dijit/form/Button' data-dojo-attach-point\x3d\"_okButton\" data-dojo-attach-event\x3d'onClick:okButton' label\x3d'${downloadButtonLabel}' class\x3d\"maqPrimaryButton\" type\x3d\"submit\"\x3e\x3c/button\x3e\n\t\t\x3cbutton data-dojo-type\x3d'dijit/form/Button' data-dojo-attach-event\x3d'onClick:cancelButton' label\x3d'${buttonCancel}' class\x3d\"maqSecondaryButton\"\x3e\x3c/button\x3e\n\t\x3c/div\x3e\n\x3c/div\x3e",
"url:davinci/ui/templates/SaveAsWidgetForm.html":'\x3cdiv class\x3d\'dvSaveAsWidgetForm\'\x3e\n\t\x3cdiv class\x3d"dijitDialogPaneContentArea"\x3e\n\t\t\x3cp class\x3d"dvSawfDesc"\x3e${descriptionString}\x3c/p\x3e\n\t\t\x3cp\x3e\n\t\t\t\x3cspan class\x3d"dvSawfLabel"\x3e${nameString}:\x3c/span\x3e\n\t\t\t\x3cinput dojoType\x3d\'dijit.form.ValidationTextBox\' dojoAttachPoint\x3d"nameInputNode" trim\x3d"true"\n\t\t\t\t\tpromptMessage\x3d"${namePromptString}"\x3e\x3c/input\x3e\n\t\t\x3c/p\x3e\n\t\t\x3cp\x3e\n\t\t\t\x3cspan class\x3d"dvSawfLabel"\x3e\x3cspan class\x3d"dvRequired"\x3e*\x3c/span\x3e${idString}:\x3c/span\x3e\n\t\t\t\x3cinput dojoType\x3d\'dijit.form.ValidationTextBox\' dojoAttachPoint\x3d"idInputNode" trim\x3d"true"\n\t\t\t\t\trequired\x3d"true" intermediateChanges\x3d"true" promptMessage\x3d"${idPromptString}"\x3e\x3c/input\x3e\n\t\t\x3c/p\x3e\n\t\t\x3cp\x3e\n\t\t\t\x3cspan class\x3d"dvSawfLabel"\x3e${versionString}:\x3c/span\x3e\n\t\t\t\x3cinput dojoType\x3d\'dijit.form.ValidationTextBox\' dojoAttachPoint\x3d"versionInputNode"\n\t\t\t\t\ttrim\x3d"true"\x3e\x3c/input\x3e\n\t\t\x3c/p\x3e\n\t\t\x3ch4 class\x3d"dvRequired"\x3e*${requiredString}\x3c/h4\x3e\n\t\n\t\t\x3cdiv dojoType\x3d"dijit.TitlePane" title\x3d"${metadataTitle}" open\x3d"false"\x3e\n\t\t\t\x3ctextarea dojoType\x3d"dijit.form.SimpleTextarea" dojoAttachPoint\x3d"textareaNode" name\x3d"metadata"\n\t\t\t\t\trows\x3d"15" cols\x3d"50" intermediateChanges\x3d"true"\x3e${initialTextareaContent}\x3c/textarea\x3e\n\t\t\x3c/div\x3e\n\t\x3c/div\x3e\n \x3cdiv class\x3d"dijitDialogPaneActionBar"\x3e\n \x3cbutton dojoType\x3d"dijit.form.Button" dojoAttachPoint\x3d"buttonSave" class\x3d"maqPrimaryButton" type\x3d"submit" disabled\x3d"true"\x3e${saveString}\x3c/button\x3e\n \x3cbutton dojoType\x3d"dijit.form.Button" dojoAttachPoint\x3d"buttonCancel" type\x3d"button" class\x3d"maqSecondaryButton"\x3e${cancelString}\x3c/button\x3e\n \x3c/div\x3e\n\x3c/div\x3e\n',
"url:davinci/ve/actions/templates/EnableApplicationStates.html":"\x3cdiv\x3e\n\t\x3cdiv class\x3d\"dijitDialogPaneContentArea\"\x3e\n\t\t\x3cdiv class\x3d'EnableAsStateContainerWidgetDiv'\x3e\n\t\t\t${veNls.EnableApplicationStatesCurrentWidget}:\n\t\t\t\x3cspan class\x3d'EnableAsStateContainerWidgetLabel' dojoAttachPoint\x3d'widgetLabel'\x3e\x3c/span\x3e\n\t\t\x3c/div\x3e\n\t\t\x3cdiv class\x3d'EnableAsStateContainerStatesDiv' dojoAttachPoint\x3d'statesListDiv'\x3e\n\t\t\t//Filled in by JavaScript logic\n\t\t\x3c/div\x3e\n\t\t\x3cdiv class\x3d'EnableAsStateContainerDescriptionDiv' dojoAttachPoint\x3d'description'\x3e\n\t\t\t//Filled in by JavaScript logic\n\t\t\x3c/div\x3e\n\t\t\x3cdiv class\x3d'EnableAsStateContainerCheckBoxDiv'\x3e\n\t\t\t\x3cinput dojoAttachPoint\x3d\"checkBoxWidget\" dojoType\x3d\"dijit.form.CheckBox\" dojoAttachEvent\x3d\"onKeyUp:_onKeyPress\" type\x3d\"text\"\x3e\x3c/input\x3e\n\t\t\t${veNls.EnableAsStateContainerWidgetLabel}\n\t\t\x3c/div\x3e\n\t\x3c/div\x3e\n\t\t\t\t\n\t\x3cdiv class\x3d\"dijitDialogPaneActionBar\"\x3e\n\t\t\x3cbutton dojoType\x3d'dijit.form.Button' dojoAttachPoint\x3d'okButton' label\x3d'${commonNls.buttonOk}' class\x3d\"maqPrimaryButton\"\x3e\x3c/button\x3e\n\t\t\x3cbutton dojoType\x3d'dijit.form.Button' dojoAttachPoint\x3d'cancelButton' label\x3d'${commonNls.buttonCancel}' class\x3d\"maqSecondaryButton\"\x3e\x3c/button\x3e\n\t\x3c/div\x3e\n\x3c/div\x3e\n",
"url:davinci/ve/actions/templates/AddState.html":'\x3cdiv\x3e\n\t\x3cdiv class\x3d"dijitDialogPaneContentArea"\x3e\n\t\t\x3cdiv class\x3d\'addStateNameDiv\'\x3e\n\t\t\t\x3clabel\x3e${veNls.stateLabel}:\x3c/label\x3e\x3cinput dojoAttachPoint\x3d"input" dojoType\x3d"dijit.form.TextBox" dojoAttachEvent\x3d"onKeyUp:_onKeyPress" type\x3d"text"\x3e\x3c/input\x3e\n\t\t\x3c/div\x3e\n\t\x3c/div\x3e\n\t\x3cdiv class\x3d"dijitDialogPaneActionBar"\x3e\n\t\t\x3cbutton dojoType\x3d\'dijit.form.Button\' dojoAttachPoint\x3d"okButton" dojoAttachEvent\x3d\'onClick:onOk\' label\x3d\'${veNls.createLabel}\' class\x3d"maqPrimaryButton" type\x3d"submit"\x3e\x3c/button\x3e\n\t\t\x3cbutton dojoType\x3d\'dijit.form.Button\' dojoAttachEvent\x3d\'onClick:onCancel\' label\x3d\'${commonNls.buttonCancel}\' class\x3d"maqSecondaryButton"\x3e\x3c/button\x3e\n\t\x3c/div\x3e\n\x3c/div\x3e\n',
"url:davinci/ve/actions/templates/ModifyState.html":'\x3cdiv\x3e\n\t\x3cdiv class\x3d"dijitDialogPaneContentArea"\x3e\n\t\t\x3cdiv class\x3d\'modify_state_container\'\x3e\n\t\t\t\x3cdiv data-dojo-type\x3d"dijit.form.DropDownButton" label\x3d\'${veNls.renameLabel}\' dojoAttachPoint\x3d"renameButton" class\x3d"modify_state_rename_button"\x3e\n\t\t\t\t\t\x3cdiv data-dojo-type\x3d"dijit.TooltipDialog" class\x3d\'modify_state_rename_container\' id\x3d\'state_rename_tooltip_dialog\'\x3e\n\t\t\t\t\t\t\x3cdiv\x3e\n\t\t\t\t\t\t\t\x3clabel for\x3d"state_rename_new_name"\x3e${veNls.newStateLabel}\x3c/label\x3e\n\t\t\t\t\t\t\t\x3cinput data-dojo-type\x3d"dijit.form.ValidationTextBox" id\x3d"state_rename_new_name" name\x3d"state_rename_new_name"\x3e\x3c/input\x3e\n\t\t\t\t\t\t\x3c/div\x3e\n\t\t\t\t\t\t\x3cdiv\x3e\n\t\t\t\t\t\t\t\x3cbutton id\x3d"state_rename_do_it" dojoType\x3d\'dijit.form.Button\' label\x3d\'${veNls.renameLabel}\'\x3e\x3c/button\x3e\n\t\t\t\t\t\t\t\x3cbutton id\x3d"state_rename_cancel" dojoType\x3d\'dijit.form.Button\' label\x3d\'${veNls.cancelLabel}\'\x3e\x3c/button\x3e\n\t\t\t\t\t\t\x3c/div\x3e\n\t\t\t\t\t\x3c/div\x3e\n\t\t\t\t\x3c/div\x3e\n\t\t\t${veNls.stateLabel}: \x3cspan id\x3d\'modify_state_old_name\'\x3eaaa\x3c/span\x3e\n\t\t\x3c/div\x3e\n\t\t\x3cdiv class\x3d\'initial_state_row\'\x3e\n\t\t\t\x3cinput data-dojo-type\x3d"dijit.form.CheckBox" dojoAttachPoint\x3d"initialState" id\x3d"modify_state_initial_state" name\x3d"modify_state_initial_state"\x3e\x3c/input\x3e\n\t\t\t\x3clabel for\x3d\'modify_state_initial_state\'\x3e${veNls.initialStateCheckBoxLabel}\x3c/label\x3e\n\t\t\x3c/div\x3e\n\t\x3c/div\x3e\n\t\t\t\t\n\t\x3cdiv class\x3d"dijitDialogPaneActionBar"\x3e\n\t\t\x3cbutton dojoType\x3d\'dijit.form.Button\' dojoAttachPoint\x3d"okButton" label\x3d\'${veNls.modifyLabel}\' class\x3d"maqPrimaryButton"\x3e\x3c/button\x3e\n\t\t\x3cbutton dojoType\x3d\'dijit.form.Button\' dojoAttachPoint\x3d"cancelButton" label\x3d\'${commonNls.buttonCancel}\' class\x3d"maqSecondaryButton"\x3e\x3c/button\x3e\n\t\x3c/div\x3e\n\x3c/div\x3e\n',
"url:davinci/ve/actions/templates/ManageStates.html":"\x3cdiv\x3e\n\t\x3cdiv class\x3d\"dijitDialogPaneContentArea\"\x3e\n\t\t\x3cdiv class\x3d\"addStateDialogOptions\"\x3e\n\t\t\t\x3cdiv class\x3d'manageStatesStatesListDiv'\x3e\n\t\t\t\t\x3c!-- Filled in by JavaScript --\x3e\n\t\t\t\x3c/div\x3e\n\t\t\t\x3cdiv class\x3d'manageStatesCheckAcceleratorsDiv'\x3e\n\t\t\t\t${veNls.manageStatesCheckLabel}\n\t\t\t\t\x3ca href\x3d'' class\x3d'manageStatesCheckCurrentStateOnly'\x3e${veNls.manageStatesCheckCurrentStateOnly}\x3c/a\x3e\n\t\t\t\t/\n\t\t\t\t\x3ca href\x3d'' class\x3d'manageStatesCheckAll'\x3e${veNls.manageStatesCheckAll}\x3c/a\x3e\n\t\t\t\t/\n\t\t\t\t\x3ca href\x3d'' class\x3d'manageStatesUncheckAll'\x3e${veNls.manageStatesUncheckAll}\x3c/a\x3e\n\t\t\t\t/\n\t\t\t\t\x3ca href\x3d'' class\x3d'manageStatesCheckBackgroundOnly'\x3e${veNls.manageStatesCheckBackgroundOnly}\x3c/a\x3e\n\t\t\t\x3c/div\x3e\n\t\t\t\n\t\t\x3c/div\x3e\t\n\t\x3c/div\x3e\n\t\x3cdiv class\x3d\"dijitDialogPaneActionBar\"\x3e\n\t\t\x3cbutton dojoType\x3d'dijit.form.Button' dojoAttachPoint\x3d\"okButton\" dojoAttachEvent\x3d'onClick:onOk' label\x3d'${veNls.createLabel}' class\x3d\"maqPrimaryButton\" type\x3d\"submit\"\x3e\x3c/button\x3e\n\t\t\x3cbutton dojoType\x3d'dijit.form.Button' dojoAttachEvent\x3d'onClick:onCancel' label\x3d'${commonNls.buttonCancel}' class\x3d\"maqSecondaryButton\"\x3e\x3c/button\x3e\n\t\x3c/div\x3e\n\x3c/div\x3e\n",
"url:davinci/ve/template.html":'\n\x3c!DOCTYPE html\x3e\n\x3chtml\x3e\n\x3chead\x3e\n\x3cmeta charset\x3d"utf-8" /\x3e\n\x3cmeta http-equiv\x3d"X-UA-Compatible" content\x3d"IE\x3dedge" /\x3e\n\x3ctitle\x3eUntitled\x3c/title\x3e\n\x3c/head\x3e\n\x3cbody\x3e\n\x3c/body\x3e\n\x3c/html\x3e\n',"url:davinci/ve/prefs/HtmlEditPreferences.html":"\x3cdiv\x3e\n\t\x3ctable style\x3d'margin: 4px;' cellspacing\x3d'4'\x3e\n\t\t\x3ctbody\x3e\n\t\t\t\x3c!--\n\t\t\t\x3ctr\x3e\n\t\t\t\t\x3ctd\x3e${_loc.flowLayout}:\x3c/td\x3e\n\t\t\t\t\x3ctd\x3e\n\t\t\t\t\t\x3cdiv dojoAttachPoint\x3d'flowBoxNode'\x3e\x3c/div\x3e\n\t\t\t\t\x3c/td\x3e\n\t\t\t\x3c/tr\x3e\n\t\t\t--\x3e\n\t\t\t\x3ctr\x3e\n\t\t\t\t\x3ctd\x3e${_loc.snapToNearestWidget}:\x3c/td\x3e\n\t\t\t\t\x3ctd\x3e\n\t\t\t\t\t\x3cdiv dojoAttachPoint\x3d'snapNode'\x3e\x3c/div\x3e\n\t\t\t\t\x3c/td\x3e\n\t\t\t\x3c/tr\x3e\n\t\t\t\x3ctr\x3e\n\t\t\t\t\x3ctd\x3e${_loc.showPossibleParents}:\x3c/td\x3e\n\t\t\t\t\x3ctd\x3e\n\t\t\t\t\t\x3cdiv dojoAttachPoint\x3d'showPossibleParentsNode'\x3e\x3c/div\x3e\n\t\t\t\t\x3c/td\x3e\n\t\t\t\x3c/tr\x3e\n\t\t\t\x3ctr\x3e\n\t\t\t\t\x3ctd\x3e${_loc.warnOnCSSOverride}:\x3c/td\x3e\n\t\t\t\t\x3ctd\x3e\n\t\t\t\t\t\x3cdiv dojoAttachPoint\x3d'cssOverrideWarn'\x3e\x3c/div\x3e\n\t\t\t\t\x3c/td\x3e\n\t\t\t\x3c/tr\x3e\n\t\t\t\x3ctr\x3e\n\t\t\t\t\x3ctd\x3e${_loc.absoluteWidgetsZindex}:\x3c/td\x3e\n\t\t\t\t\x3ctd\x3e\n\t\t\t\t\t\x3cdiv dojoAttachPoint\x3d'absoluteWidgetsZindex'\x3e\x3c/div\x3e\n\t\t\t\t\x3c/td\x3e\n\t\t\t\x3c/tr\x3e\n\t\t\t\x3c!-- FIXME: Disabled for now. Ultimately, UI for this option should go to widget palette\n\t\t\t\x3ctr\x3e\n\t\t\t\t\x3ctd\x3e${_loc.widgetPaletteLayout}:\x3c/td\x3e\n\t\t\t\t\x3ctd\x3e\n\t\t\t\t\t\x3cdiv dojoAttachPoint\x3d'widgetPaletteLayout'\x3e\x3c/div\x3e\n\t\t\t\t\x3c/td\x3e\n\t\t\t\x3c/tr\x3e\n\t\t\t--\x3e\n\t\t\t\x3ctr\x3e\n\t\t\t\t\x3ctd\x3e${_loc.zazl}:\x3c/td\x3e\n\t\t\t\t\x3ctd\x3e\n\t\t\t\t\t\x3cdiv dojoAttachPoint\x3d'zazl'\x3e\x3c/div\x3e\n\t\t\t\t\x3c/td\x3e\n\t\t\t\x3c/tr\x3e\n\t\t\x3c/tbody\x3e\n\t\x3c/table\x3e\n\x3c/div\x3e"}});
define("davinci/davinci",[],function(){});
//# sourceMappingURL=davinci.js.map