dojo.provide("portalclient.nls.rest_utils_en");dojo.provide("com.ibm.bundles.nls.Resolver");com.ibm.bundles.nls.Resolver._built=true;dojo.provide("com.ibm.bundles.nls.Resolver.en");com.ibm.bundles.nls.Resolver.en={"errorNoPocHandler":"No handler is registered for prefix ${0}","errorDataFormat":"Data format is invalid","errorInit":"An error occurred when initializing the resolver store.","errorWriteNotLoaded":"Item must be loaded before attempting to write to it","errorInvalidString":"${0} is not a string","errorReadOnlyPrefs":"Cannot write to read-only preference attribute with key ${0}","errorNullPrefsKey":"The preferences key cannot be null","errorNotInModel":"Item is not in this model","errorInvalidItem":"${0} is not an item in this store"}; /** Licensed Materials - Property of IBM, 5724-E76 and 5724-E77, (C) Copyright IBM Corp. 2009, 2010, 2011 - All Rights reserved. **/ dojo.i18n._preloadLocalizations("portalclient.nls.rest_utils",["ROOT","ar","ca","cs","da","de","el","en","es","fi","fr","he","hr","hu","it","ja","kk","ko","nl","no","pl","pt","pt-br","ro","ru","sk","sl","sv","th","tr","uk","xx","zh","zh-tw"]);if(!dojo._hasResource["com.ibm.lang.DeferredQueue"]){dojo._hasResource["com.ibm.lang.DeferredQueue"]=true;dojo.provide("com.ibm.lang.DeferredQueue");dojo.declare("com.ibm.lang.DeferredQueue",null,{constructor:function(_1){this.curDef=_1;this.firstDef=_1;},_addCallbacks:function(_2,_3){_2.addCallbacks(function(_4){_3.callback(_4);return _4;},dojo.hitch(this,function(_5){try{if(!_5._raised){this.raiseError(_5);_5._raised=true;}}catch(err2){}_3.callback(_5);return _5;}));},addBefore:function(_6){if(!this.firstDef){this.firstDef=_6;}else{var _7=this.firstDef;this.firstDef=_6;this._addCallbacks(_6,_7);}},add:function(_8){if(!this.firstDef){this.firstDef=_8;}if(this.curDef){var _9=this.curDef;this.curDef=_8;this._addCallbacks(_9,_8);}else{this.curDef=_8;}return this;},fire:function(_a){if(this.firstDef){this.firstDef.callback(_a);}return this;},raiseError:function(_b){},destroy:function(){delete this.firstDef;delete this.curDef;delete this.raiseError;}});}if(!dojo._hasResource["com.ibm.xml.xpath"]){dojo._hasResource["com.ibm.xml.xpath"]=true;dojo.provide("com.ibm.xml.xpath");com.ibm.xml.xpath=ibm.portal.xml.xpath;if(dojo.isIE){com.ibm.xml.xpath.evaluate=function(_c,_d,_e,_f){var _10=null;if(_e){var ns="";for(var _11 in _e){ns+="xmlns:"+_11+"='"+_e[_11]+"' ";}if(_d.ownerDocument){_d.ownerDocument.setProperty("SelectionNamespaces",ns);}else{_d.setProperty("SelectionNamespaces",ns);}}if(!_f){_10=_d.selectNodes(_c);var _12=[];for(var i=0;i<_10.length;i++){if(_10[i]){_12.push(_10[i]);}}return _12;}else{return _d.selectSingleNode(_c);}};}else{com.ibm.xml.xpath.evaluate=function(_13,_14,_15,_16){var _17=null;var _18=_14;if(!_18.evaluate){_18=_14.ownerDocument;}try{_17=_18.evaluate(_13,_14,function(_19){return _15[_19]||null;},_16?XPathResult.FIRST_ORDERED_NODE_TYPE:XPathResult.ORDERED_NODE_ITERATOR_TYPE,null);}catch(err){throw new Error("Error with xpath expr: "+_13+" - "+err);}if(!_16){var _1a;var _1b=new Array();var len=0;do{_1a=_17.iterateNext();if(_1a){_1b[len]=_1a;len++;}}while(_1a);return _1b;}else{return _17.singleNodeValue;}};}}if(!dojo._hasResource["com.ibm.xml.XmlNodeList"]){dojo._hasResource["com.ibm.xml.XmlNodeList"]=true;dojo.provide("com.ibm.xml.XmlNodeList");(function(){var _1c=function(_1d,ctx,_1e){return com.ibm.xml.xpath.evaluate.call(this,_1d,ctx,this.ns,_1e);};var _1f=function(arr,ns){arr.constructor=com.ibm.xml.XmlNodeList;dojo._mixin(arr,com.ibm.xml.XmlNodeList.prototype);arr.ns=ns;return arr;};com.ibm.xml.XmlNodeList=function(){var ret=_1f(Array.apply(null,arguments),null);return ret;};var xnl=com.ibm.xml.XmlNodeList,_20=xnl.prototype,d=dojo,dom=com.ibm.domUtilities;xnl.fromArray=function(arr,ns){return _1f(arr,ns);};var _21=function(arr,ctr){if(arr&&(arr instanceof Array||typeof arr=="array")){var _22=ctr?new ctr():[];d.forEach(arr,function(_23){_22=_22.concat(_21(_23,ctr));});return _22;}else{return arr;}};var _24=function(def,_25){return dom.createFromJson(_25.ownerDocument,def,this.ns,_25);};d.extend(xnl,{map:function(_26,_27){var ret=d.map(this,_26,_27,xnl);ret.ns=this.ns;return ret;},indexOf:function(_28,_29,_2a){var _2b=this.length||0,_2c=1,i=0;if(_2a){_2c=_2b=-1;i=this.length-1;}if(_29!=undefined){i=_29;}if(!d.isFunction(_28)){while((_2a&&i>_2b)||i<_2b){if(_28==this[i]){return i;}i+=_2c;}}else{while((_2a&&i>_2b)||i<_2b){if(_28(this[i])){return i;}i+=_2c;}}return -1;},lastIndexOf:function(_2d,_2e){return this.indexOf(_2d,_2e,true);},forEach:function(_2f,_30){d.forEach(this,_2f,_30);return this;},removeProp:function(_31){switch(_31){case "childNodes":this.prop(_31).forEach(function(_32){_32.remove();});return this;case "firstChild":case "lastChild":case "parentNode":case "nextSibling":case "previousSibling":this.prop(_31).remove();return this;case "text":case "textContent":case "xml":case "innerXML":return this.prop(_31,"");case "localName":case "baseName":return this;default:this.forEach(function(_33){delete _33[_31];},this);return this;}},removeAttr:function(_34){this.forEach(function(_35){com.ibm.domUtilities.removeAttribute(_35,_34,this.ns);},this);return this;},prop:function(_36,_37){var _38=false,f=null,ns=this.ns;if(arguments.length<2){switch(_36){case "childNodes":f=function(_39){var ret=xnl.apply(null,dojo._toArray(_39[_36]));ret.ns=ns;return ret;};_38=true;break;case "firstChild":case "lastChild":case "parentNode":case "nextSibling":case "previousSibling":f=function(_3a){return _3a[_36];};_38=true;break;case "text":case "textContent":f=function(_3b){return dom.textContent(_3b);};break;case "xml":case "innerXML":f=function(_3c){return dom.innerXML(_3c);};break;case "localName":case "baseName":_36=[d.isIE?"baseName":"localName"];default:f=function(_3d){return _3d[_36];};}var _3e=d.map(this,f,this);if(_38){_3e=xnl.apply(_3e,_3e);_3e.ns=ns;}return _3e;}else{var _3f=_37;switch(_36){case "text":case "textContent":f=function(_40){dojox.data.dom.textContent(_40,_3f);};break;default:f=function(_41){_41[_36]=_3f;};}if(dojo.isArrayLike(_37)){var sf=f,idx=0;f=function(_42){_3f=_37[idx++];if(_3f!==undefined){sf(_42);}};}d.map(this,f,this);return this;}},attr:function(_43,_44){var ns=this.ns;if(arguments.length<2){return d.map(this,function(_45){if(!dom.hasAttribute(_45,_43,ns)){return;}return dom.getAttribute(_45,_43,ns);},this);}else{if(_44==null){return this.removeAttr(_43);}var _46=_44;var f=function(_47){dom.setAttribute(_47,_43,_46,ns);};if(dojo.isArrayLike(_44)){var sf=f,idx=0;f=function(_48){_46=_44[idx++];if(_46!==undefined){sf(_48);}};}d.map(this,f,this);return this;}},hasAttr:function(_49){return d.map(this,function(_4a){return dom.hasAttribute(_4a,_49,this.ns);},this);},every:function(_4b,_4c){return d.every(this,_4b,_4c);},some:function(_4d,_4e){return d.some(this,_4d,_4e);},filter:function(_4f){var _50=this,a=arguments,_51=0;if(d.isString(_4f)){_50=_50.select(".["+_4f+"]");_51=1;}if(a.length>1){_50=xnl.apply(_50,d.filter(_50,a[_51],a[_51+1]));_50.ns=this.ns;}return _50;},select:function(_52,_53){if(!_52){return this;}var _54=[];this.forEach(function(_55){_54=_54.concat(_1c.call(this,_52,_55,_53)||[]);},this);_54=_1f(_54,this.ns);return _54;},remove:function(){return this.forEach(function(_56){if(_56.parentNode){_56.parentNode.removeChild(_56);}},this);},replace:function(_57){for(var i=0;i<_57.length&&i=_7f){_7f=_80+1;}}else{_80=this._insStep(pre,map);if(_80<=_7f){_7f++;}else{_7f=_80+1;}}}this.orderedSteps.splice(_7f,0,_7e);map[_7e.name]=_7e;return _7f;}},orderSteps:function(){this.orderedSteps=[],map={};for(var _81 in this.steps){this._insStep(this.steps[_81],map);}return this;},insertStep:function(_82){if(!_82.name){_82.name=this._genName();}if(!this.steps[_82.name]){this.steps[_82.name]=_82;}return this;},_reset:function(){delete this.groupList;},replan:function(){this._reset();this.orderSteps();return this;},_insertIntoGroupList:function(_83,_84){for(var j=_83.length-1;j>=0;j--){if(!_83[j].hasPreStepOf(_84)){if(j>0){continue;}else{_83[j].addStep(_84);}}else{if(j<_83.length-1){_83[j+1].addStep(_84);return;}else{_83.push(new com.ibm.planner.SimplePOStepGroup([_84]));return;}}}},size:function(){return this.orderedSteps.length;},getList:function(){return this.orderedSteps;},filter:function(_85){this.orderedSteps=dojo.filter(this.orderedSteps,_85);return this;},getGroupList:function(){if(!this.groupList){var _86=[],_87=this.getList();if(_87.length>0){_86.push(new com.ibm.planner.SimplePOStepGroup([_87[0]]));}for(var i=1,st;st=_87[i],i<_87.length;i++){this._insertIntoGroupList(_86,st);}this.groupList=_86;}return this.groupList;}});dojo.declare("com.ibm.planner.SimplePOStep",null,{constructor:function(_88,_89){this.name=_88;this.contents=_89;this.preSteps=[];},destroy:function(){delete this.preSteps;delete this.contents;delete this.name;},isPreStepOf:function(_8a){return _8a.hasPreStep(this);},hasPreStep:function(_8b){return dojo.indexOf(this.preSteps,_8b)>-1;},addPreStep:function(_8c){this.preSteps.push(_8c);},toString:function(){return "";}});dojo.declare("com.ibm.planner.SimplePOStepGroup",null,{constructor:function(_8d){this.steps=_8d?_8d.slice():[];},destroy:function(){delete this.steps;},getSteps:function(){return this.steps;},addStep:function(_8e){this.steps.push(_8e);},hasPreStepOf:function(_8f){for(var i=0,st;st=this.steps[i],i";}});}if(!dojo._hasResource["com.ibm.data.DependencyManager"]){dojo._hasResource["com.ibm.data.DependencyManager"]=true;dojo.provide("com.ibm.data.DependencyManager");dojo.declare("com.ibm.data.DependencyManager",null,{constructor:function(_90){this._st=_90;this._rels={};},destroy:function(){delete this._st;delete this._rels;},_initItemDep:function(id){var r=this._rels;if(!r[id]){r[id]=[{}];for(var t in com.ibm.data.DependencyManager.types){r[id].push({});}}return this;},updateDependencyId:function(_91,_92){var r=this._rels;if(r[_91]){r[_92]=r[_91];delete r[_91];}for(var id in r){for(var i=0,_93;_93=r[id],i"+""+""});})();}if(!dojo._hasResource["com.ibm.lang.Tokenizer"]){dojo._hasResource["com.ibm.lang.Tokenizer"]=true;dojo.provide("com.ibm.lang.Tokenizer");dojo.declare("com.ibm.lang.Tokenizer",null,{splitter:/[ ]/g,constructor:function(_bc){if(_bc){if(dojo.isString(_bc)){_bc=new RegExp(_bc,"g");}this.splitter=_bc;}},tokenize:function(str){var _bd=null,_be=[],_bf=0;while((_bd=this.splitter.exec(str))!=null){if(_bf<_bd.index){_be.push(str.substring(_bf,_bd.index));}_bf=_bd.index;}if(_bf>>i)&_c5);}return _c4;}else{return _c3;}},pushBits:function(_c6,len){while(len){var n=Math.min(len,this.rem),v=(_c6>>>(len-=n))&((1<this.rem){this.pushBitArray(arr.splice(0,this.rem));}var v=0,s=0,_c8=0,end=this.bsize,_c9=arr.slice();while(arr.length>0){v<<=1;v|=(arr.shift()?1:0);if(++s==this.bsize){this.pushBits(v,s);v=0,s=0,_c8=end,end+=this.bsize;}}this.pushBits(v,s);},getBlocks:function(_ca){var b=this.buf.slice(),rem=this.rem;if(this.rem0){var buf=_cd.splice(0,3);for(var i=0;i_cf;c--){_ce.push(abc[64]);}}return _ce.join("");},decode:function(str,_d0){var s=str.split(""),abc=_d0.split("");var _d1=s.indexOf(abc[64]);var bs6=new com.ibm.stream.BitStream(6);var buf=[];for(var i=0;i_d1){_d2.pop();}buf=buf.concat(_d2);bs6.init();}return buf;},encodeBits:function(val,_d3,_d4){var bs8=new com.ibm.stream.BitStream(8,_d4);bs8.pushBitArray(val);var _d5=bs8.getBlocks().blocks;return b64.encode(_d5,_d3);},_encodeStream:function(_d6,_d7){var bs6=_d6.toBitStream(6),_d8=bs6.getBlocks().blocks,out=[];for(var j=0;j<_d8.length;j++){out.push(_d7[_d8[j]]);}return out;},_decodeStream:function(_d9,_da){var bs8=_d9.toBitStream(8),_db=bs8.getBlocks().blocks,out=[];for(var j=0;j<_db.length;j++){out.push(_db[j]);}return out;}};})();}if(!dojo._hasResource["com.ibm.encoding.huffman"]){dojo._hasResource["com.ibm.encoding.huffman"]=true;dojo.provide("com.ibm.encoding.huffman");(function(){var _dc=/[\/\. ]/g,b64=com.ibm.encoding.base64,_dd=function(arr){return b64.encode(arr,b64.alphabets.url);},_de=function(str){return b64.decode(str,b64.alphabets.url);},_df=function(str){return encodeURIComponent(str.replace(/Z/g,"Z5A")).replace(/%/g,"Z").replace(/~/g,"Z7E");},_e0=function(str){decodeURIComponent(str.replace(/Z7E/g,"~").replace(/Z/g,"%")).replace(/Z5A/g,"Z");};var _e1=com.ibm.encoding.huffman={encodeUrlByRegexp:function(url,_e2){return _e1.encodeUrlByTokens((new com.ibm.lang.Tokenizer(_e2||_dc)).tokenize(url));},encodeUrlByTokens:function(_e3){var _e4=_e1.getTree(_e3),url=_dd(_e4.encodedTree.getBlocks().blocks);for(var i=0;i<_e4.alphTokens.length;i++){url+="/"+_df(_e4.alphTokens[i]);}url+="/"+_dd(_e4.encodedData.getBlocks().blocks);window.tree=_e4;return url;},getTree:function(_e5){return new com.ibm.encoding.huffman.Tree(_e5);},decodeUrl:function(url){}};})();dojo.declare("com.ibm.encoding.huffman.Tree",null,{parts:[],root:null,encodedData:null,alphTokens:[],codes:{},encodedTree:null,constructor:function(_e6,_e7){this.parts=_e6;this._nid=0;if(!_e7){this._buildTree();}},_initTreeCodes:function(){this.codes={};this.alphTokens=[];this.encodedTree=new com.ibm.stream.BitStream(8,true);this._walk(this.root,[]);this._encodeParts();},_walk:function(_e8,_e9){if(_e8[0] instanceof Array||typeof _e8[0]=="array"){this.encodedTree.pushBits(1,1);this._walk(_e8[0][0],_e9.concat(0));this._walk(_e8[0][1],_e9.concat(1));}else{this.encodedTree.pushBits(0,1);this.codes[_e8[0]]=_e9;this.alphTokens.push(_e8[0]);}},_buildTree:function(){var _ea=this._getSortedParts();while(_ea.length>1){var l=_ea.shift(),r=_ea.shift();_ea.push([[l,r],l[1]+r[1]]);_ea.sort(this._compareFrequency);}this.root=_ea[0];this._initTreeCodes();},_encodeParts:function(){this.encodedData=new com.ibm.stream.BitStream(8,true);for(var i=0;i=0;i--){if(p in _eb){_eb[p]++;}else{_eb[p]=1;}}var _ed=[];for(var p in _eb){_ed.push([p,_eb[p]]);}return _ed.sort(this._compareFrequency);},_compareFrequency:function(p1,p2){return p1[1]-p2[1];}});}if(!dojo._hasResource["com.ibm.data.ItemsLoader"]){dojo._hasResource["com.ibm.data.ItemsLoader"]=true;dojo.provide("com.ibm.data.ItemsLoader");dojo.declare("com.ibm.data.ItemsLoader",null,{store:null,query:null,queryOptions:null,cacheContext:null,cacheProperty:null,preload:true,fetchOnReload:false,resultSet:null,status:0,constructor:function(_ee){dojo.mixin(this,_ee);if(!this.queryOptions){this.queryOptions={};}this._lastModified=(new Date()).getTime();if(this.preload){setTimeout(dojo.hitch(this,"_load"),1);}},filter:function(_ef){return _ef;},_getResultSet:function(){if(this._lastModified==this.resultSet._lastModified){return this.resultSet;}else{this.resultSet=this.filter(this.resultSet);this._lastModified=this.resultSet._lastModified=(new Date()).getTime();if(this.cacheContext&&this.cacheProperty){this.cacheContext[this.cacheProperty]=this.resultSet;}return this.resultSet;}},_load:function(){if(!this._def){this._def=new dojo.Deferred();if(this.cacheContext&&this.cacheProperty){this.resultSet=this.cacheContext[this.cacheProperty];if(this.resultSet){if(!this.status){this.status=200;}this.resultSet.loaded=true;this._def.callback();return this._def;}}this._fetch();}return this._def;},_getFetchArgs:function(){return {query:this.query,queryOptions:this.queryOptions,onBegin:function(_f0,_f1){this.totalSize=_f0;this._request=_f1;this.status=_f1.xhr.status;},onComplete:function(_f2){_f2.loaded=true;this.resultSet=_f2;this._def.callback();},onError:function(err,_f3){this._request=_f3;this._def.errback(err);},scope:this};},_fetch:function(){this._request=this.store.fetch(this._getFetchArgs());},addOnLoad:function(_f4){this._load().addCallback(this._wrap(_f4));return this;},addOnError:function(_f5){this._load().addErrback(this._wrap(_f5,true));return this;},addOnResult:function(_f6){return this.addOnLoad(_f6).addOnError(_f6);},_wrap:function(f,_f7){if(f){return dojo.hitch(this,function(res){try{f(_f7?res:this._getResultSet());}catch(err){this.raiseError(err);}});}},raiseError:function(err){console.error(err);},reload:function(){if(this._def){this._def.cancel();}delete this._def;if(this.fetchOnReload&&this.cacheContext&&this.cacheProperty){delete this.cacheContext[this.cacheProperty];}this._load();return this;}});}if(!dojo._hasResource["com.ibm.data.PagedItemsLoader"]){dojo._hasResource["com.ibm.data.PagedItemsLoader"]=true;dojo.provide("com.ibm.data.PagedItemsLoader");dojo.declare("com.ibm.data.PagedItemsLoader",com.ibm.data.ItemsLoader,{pageSize:0,constructor:function(_f8){this._pages=[];this._pageDfd=new dojo.Deferred();this.resultSet=[];},_load:function(){if(!this._def){this._def=new dojo.Deferred();if(this.cacheContext&&this.cacheProperty){this._orphanItems=this.cacheContext[this.cacheProperty];if(this._orphanItems){this.query=this._orphanItems.query;}}}return this._def;},hasNext:function(){return (this._orphanItems&&this._orphanItems.length>0)||new Boolean(this.query)==true;},next:function(){if(this.hasNext()){if(!this._curPage){this._makePage();}if(this._curPage&&!this._curPage.loading){this._curPage.load();}}return this;},end:function(){this.addOnPageLoad(dojo.hitch(this,"next"));this.next();return this;},_makePage:function(){var pg=this._curPage=new com.ibm.data.ItemsPage({store:this.store,query:this.query,size:this.pageSize,filter:this.filter});dojo.connect(pg,"onFull",dojo.hitch(this,"_pageFull"));dojo.connect(pg,"onError",dojo.hitch(this,"_pageError"));this._pages.push(pg);if(this._orphanItems){pg.fill(this._orphanItems);}return pg;},_pageFull:function(_f9,_fa,_fb){this.resultSet.push.apply(this.resultSet,_f9);dojo.mixin(this.resultSet,{_lastModified:this._lastModified=(new Date()).getTime(),query:this.query=_fb});this._orphanItems=_fa;delete this._curPage;this._copyDfd().callback(_f9);if(!_fb&&(!_fa||_fa.length==0)){this.resultSet.push.apply(this.resultSet,this._orphanItems);delete this._orphanItems;this._def.callback();}},_pageError:function(err,_fc){this._copyDfd().errback(err);this.resultSet=this.resultSet.concat(this._orphanItems);delete this._orphanItems;this._def.errback(err);},_copyDfd:function(){var df=new dojo.Deferred();df.chain=this._pageDfd.chain.slice();return df;},addOnPageLoad:function(_fd){this._pageDfd.addCallback(this._wrapPage(_fd));return this;},addOnPageError:function(_fe){this._pageDfd.addErrback(this._wrapPage(_fe));return this;},addOnPageResult:function(_ff){return this.addOnPageLoad(_ff).addOnPageError(_ff);},_wrapPage:function(f){if(f){return dojo.hitch(this,function(res){try{f(res);}catch(err){this.raiseError(err);}});}}});dojo.declare("com.ibm.data.ItemsPage",null,{store:null,query:null,items:[],size:50,constructor:function(args){this.items=[];dojo.mixin(this,args);this.full=false;this.loading=false;},filter:function(_100){return _100;},_makeLdr:function(){this._ldr=new com.ibm.data.ItemsLoader({query:this.query,store:this.store,preload:false,filter:this.filter});},load:function(){if(!this.loading&&!this.full){this.loading=true;this._load();}},_load:function(){if(this.query){if(!this._ldr){this._makeLdr();}this._startLoader();}else{this.onFull(this.items,[],null);}},_startLoader:function(){this._ldr.addOnLoad(dojo.hitch(this,"_onLoadFill")).addOnError(dojo.hitch(this,"error"));},_onLoadFill:function(_101){this.query=this._ldr._request.nextQuery;this.fill(_101);},fill:function(_102){var dif=this.size-this.items.length;if(dif>0){this.items.push.apply(this.items,_102.slice(0,dif));if(this.items.length==this.size){this.onFull(this.items,_102.slice(dif),this.query);}else{if(this.loading){this._load();}}}},error:function(err){this.onError(err,this.items);},onFull:function(_103,_104,_105){this.full=true;},onError:function(err,_106){this.full=true;this.err=err;}});}if(!dojo._hasResource["com.ibm.data.Resolver"]){dojo._hasResource["com.ibm.data.Resolver"]=true;dojo.provide("com.ibm.data.Resolver");dojo.require("dojo.DeferredList");dojo.require("dojo.i18n");(function(){var _107={};com.ibm.data.Resolver={register:function(_108,cntr){if(!_107[_108]){_107[_108]=cntr;}},getHandler:function(_109){return _107[_109];},getStore:function(args){return new com.ibm.data.ResolverStore(args);},_flagDigestUpdate:function(){dojo.cookie("DigestTracker",(new Date()).getTime(),{path:"/"});},TOPICS:{UpdateDigest:"/resolver/UpdateDigest"}};dojo.subscribe(com.ibm.data.Resolver.TOPICS.UpdateDigest,com.ibm.data.Resolver._flagDigestUpdate);})();dojo.declare("com.ibm.data.ResolverStore",null,{tunnel:false,states:{"new":0,"dirty":1,"deletedExpl":2,"deletedImpl":3,"deleted":4,"loaded":5,"saving":6},_features:{"dojo.data.api.Read":true,"dojo.data.api.Write":true,"dojo.data.api.Identity":true,"dojo.data.api.Notification":true,"com.ibm.data.api.ServerGenerated":true},namespaces:{},headers:{"DIGEST":"X-Request-Digest","STATUS":"X-Status-Code","URI":"Content-ID","CONTENT_TYPE":"Content-Type","METHOD":"X-Method-Override","AUTH_OVERRIDE":"X-IBM-XHR"},URL_LIMIT:2000,_huffmanTokenizer:/[\/ ]/g,_digest:"",url:"",isAuthenticated:false,saveWait:1,fetchWait:1,constructor:function(args){dojo.mixin(this,args);this._handlers={};this._cachedItems={};this._itemLoaders={};this._cidMap={};this._ioOutQueue=this._getDeferredQueue(new dojo.Deferred()).fire();this._fetchQueue=[];this._laundryQueue=[];this._cidCntr=Math.floor(Math.random()*10000001);this._etagMap={};this._notifyOn=true;this.multiPart=true;var qi=this.url.indexOf("?");if(qi>-1){this.multiPartUrl=this.url.substr(0,qi)+"?uri=mashup:multiplex&"+this.url.substr(qi+1);}else{this.multiPartUrl=this.url+"?uri=mashup:multiplex";}this._auth=dojo.getObject("com.ibm.ajax.auth");this._depMgr=new com.ibm.data.DependencyManager(this);this._messages=dojo.i18n.getLocalization("com.ibm.bundles","Resolver");this._faultFactory=new com.ibm.data.resolver.FaultFactory();dojo.addOnWindowUnload(dojo.hitch(this,function(){this.destroy();}));},destroy:function(){for(var id in this._cachedItems){var item=this._cachedItems[id];try{if(this._isItem(item)){this._getHandlerByItem(item).uninitialize(item);}for(var p in item){delete item[p];}}catch(err){}}delete this._cachedItems;for(var _10a in this._handlers){var h=this._getHandlerByScheme(_10a);h.destroy();delete h._$;}delete this._handlers;delete this._itemLoaders;this._depMgr.destroy();delete this._depMgr;delete this._ioOutQueue;delete this._laundryQueue;delete this._messages;},getNamespaces:function(){return this.namespaces;},applyHandlerStrategy:function(_10b,_10c){var h=this._getHandlerByScheme(_10b);return com.ibm.strategy.Strategy.applyStrategy(h,_10c);},unapplyHandlerStrategy:function(adv){com.ibm.strategy.Strategy.removeStrategy(adv);},_initStoreMeta:function(item,_10d){if(item._$==null){item._$={states:[],store:this};}item._$=dojo.mixin(item._$,_10d);return item;},_getDeferredQueue:function(dfd){var dfdq=new com.ibm.lang.DeferredQueue(dfd);dfdq.raiseError=dojo.hitch(this,"raiseError");return dfdq;},_getSchemeFromUri:function(uri){if(!uri){var err=new Error(this.fmt("errorNoPocHandler",[uri]));this.raiseError(err);throw err;}return uri.split(":")[0];},_getHandlerByScheme:function(_10e){if(!this._handlers[_10e]){var h=com.ibm.data.Resolver.getHandler(_10e);if(!h){var err=new Error(this.fmt("errorNoPocHandler",[_10e]));this.raiseError(err);throw err;}var inst=new h(this,this._depMgr);this._handlers[_10e]=inst;inst._$={stateLists:[[],[],[]]};}return this._handlers[_10e];},_getHandlerByItem:function(item){this._assertItem(item);return this._getHandlerByScheme(item._$.scheme);},_getHandlerByUri:function(uri){return this._getHandlerByScheme(this._getSchemeFromUri(uri));},raiseError:function(_10f){console.error(_10f);},urlToQuery:function(url,_110){return new com.ibm.data.resolver.Query({url:url,scheme:_110});},fmt:function(key,map){return dojo.string.substitute(this._messages[key],map,function(_111,_112){if(_111===null){return "null";}if(_111===undefined){return "undefined";}return _111;});},_isItem:function(_113){return _113&&_113._$&&_113._$.scheme&&_113._$.store===this;},_assertItem:function(_114){if(!this._isItem(_114)){var err=new Error(this.fmt("errorInvalidItem",[_114]));this.raiseError(err);throw err;}return true;},_assertString:function(_115){if(!dojo.isString(_115)){var err=new Error(this.fmt("errorInvalidString",[_115]));this.raiseError(err);throw err;}return true;},_getDigestFromResponse:function(_116,_117){var _118=_117.xhr.getResponseHeader(this.headers.DIGEST);if(_118){if(this._digest){this.url=this.url.replace(this._digest,_118);}this._digest=_118;}},_flagDigestUpdate:function(){dojo.publish(com.ibm.data.Resolver.TOPICS.UpdateDigest);},_queryToHeader:function(_119){return dojo.objectToQuery(_119).replace(/&/mg,"; ");},_isResponseError:function(_11a,xhr){var s=xhr.status;if((s>=200&&s<300)||s==302||s==1223){return false;}return true;},_multiPartContentHandler:function(_11b,xhr,_11c){var _11d=xhr.getResponseHeader(this.headers.STATUS);xhr.status=_11d?_11d-0:200;var _11e=xhr.responseText;if(this._isResponseError(_11b,xhr)){if(xhr.getResponseHeader(this.headers.CONTENT_TYPE)=="application/soap+xml"){_11e=this._faultFactory.getFaultError(_11e,new Error());}else{_11e=new Error(_11e);}}else{_11e=_11c(_11b,xhr);}return _11e;},_createIOMPartDfd:function(_11f,_120){var dfd=new dojo.Deferred(),_121;var _122=_120.method.toUpperCase();switch(_122){case "GET":case "PROPFIND":delete _120.query.digest;_121=_11f.inboundQueue;break;default:if(!_120.headers){_120.headers={};}_120.headers[this.headers.METHOD]=_122;var _123=null;if(dojo.isString(_120.query)){_120.headers[this.headers.URI]="res:/"+_120.query;}else{_120.headers[this.headers.URI]=_120.query.uri;delete _120.query.uri;var _123=this._queryToHeader(_120.query);if(_123.length>0){_120.headers[this.headers.URI]+="; "+_123;}}delete _120.query;_121=_11f.outboundQueue;break;}var _124=_120.error;_120.error=function(_125,args){try{if(_124){_124.call(_120,_125,args);}}catch(err){}};var _126=_120.handle;_120.handle=function(_127,args){try{if(_126){_126.call(_120,_127,args);}}catch(err){}if(_127 instanceof Error){dfd.errback(_127);}else{dfd.callback(_127);}};_121.push(_120);return dfd;},_getSiteMap:function(_128){var sm=new com.ibm.data.resolver.SiteMap();var q;for(var i=0;i<_128.length;i++){q=_128[i].query;if(dojo.isString(q)){q={uri:"res:/"+q};}sm.addEntry(q);}return sm;},_encodeSiteMap:function(sm){return com.ibm.encoding.huffman.encodeUrlByRegexp(sm.serialize(),this._huffmanTokenizer);},_exceedsURLLimit:function(url){return (url.length+window.location.protocol.length+window.location.hostname.length+window.location.port.length+3)>this.URL_LIMIT;},_sendHuffmanRequest:function(_129){if(_129&&_129.length>0){var sm=this._getSiteMap(_129),_12a=this._encodeSiteMap(sm);var _12b;var qi=this.url.indexOf("?");if(qi>-1){_12b=this.url.substr(0,qi)+"mashup/mashup:huffman/"+_12a+"?"+this.url.substr(qi+1);}else{_12b=this.url+"mashup/mashup:huffman/"+_12a;}if(this._exceedsURLLimit(_12b)){this._sendHuffmanRequest(_129.slice(0,_129.length/2));this._sendHuffmanRequest(_129.slice(_129.length/2,_129.length));}else{var hdrs={};hdrs[this.headers.AUTH_OVERRIDE]="true";dojo.xhrGet({headers:hdrs,partContentHandler:dojo.hitch(this,"_multiPartContentHandler"),url:_12b,load:dojo.hitch(this,function(_12c,args){if(!this._authHandler(_12c,args)){return;}this._getDigestFromResponse(_12c,args);com.ibm.utilities.handleMultiPartResponse(_129,_12c,args);}),error:function(err,args){dojo.forEach(_129,function(obj){if(obj.error){try{obj.error(err,args);}catch(e){}}if(obj.handle){try{obj.handle(err,args);}catch(e){}}},this);}});}}},_io:function(_12d){var _12e=null,_12f=null;if(this.multiPart&&_12d.length>1){var _130=[],_131={inboundQueue:[],outboundQueue:[]};_12e=dojo.partial(this._createIOMPartDfd,_131);_12f=dojo.hitch(this,function(){var hdrs={};hdrs[this.headers.AUTH_OVERRIDE]="true";if(_131.outboundQueue.length>0){com.ibm.utilities.multiPartXhr("POST",{headers:hdrs,url:this.multiPartUrl,partContentHandler:dojo.hitch(this,"_multiPartContentHandler"),preHandle:dojo.hitch(this,function(_132,args){if(!this._authHandler(_132,args)){return;}this._getDigestFromResponse(_132,args);})},_131.outboundQueue);}if(_131.inboundQueue.length>0){this._sendHuffmanRequest(_131.inboundQueue);}});}else{var _133=[];_12e=function(_134){if(dojo.isString(_134.query)){_134.url=_134.query;}else{var _135=dojo.objectToQuery(_134.query);if(this.url.indexOf("?")>-1){_134.url=this.url+"&"+_135;}else{_134.url=this.url+"?"+_135;}}delete _134.query;_134.method=_134.method.toLowerCase();if(_134.method=="put"||_134.method=="post"){_134[_134.method+"Data"]=_134.data;}if(!_134.headers){_134.headers={};}_134.headers[this.headers.AUTH_OVERRIDE]="true";if(this.tunnel&&_134.method!="post"&&_134.method!="get"){_134.headers[this.headers.METHOD]=_134.method.toUpperCase();_134.method="post";}var _136=_134.handle;_134.handle=dojo.hitch(this,function(_137,args){if(!this._authHandler(_137,args)){return;}if(_136){_136.call(args,_137,args);}});var _138=_134.load;_134.load=dojo.hitch(this,function(_139,args){this._getDigestFromResponse(_139,args);if(_138){_138.call(args,_139,args);}});var _13a=new dojo.Deferred();_133.push(function(){return dojo.xhr(_134.method,_134,true).addCallbacks(function(resp){return _13a.callback(resp);},function(err){return _13a.errback(err);});});return _13a;};_12f=function(){dojo.forEach(_133,function(_13b){_13b();});};}var dfds=dojo.map(_12d,_12e,this),dfdl=new dojo.DeferredList(dfds);dfdl.addCallback(function(_13c){return dojo.map(_13c,function(res){return res[1];});});return {start:function(res){_12f();return dfdl;},deferredList:dfdl};},_authHandler:function(_13d,args){if(this._auth){if(this._auth.isAuthenticationRequired(_13d,args)){this._auth.authenticationHandler();return false;}}return true;},_ioOut:function(_13e){if(!_13e||_13e.length==0){var _13f=new dojo.Deferred();_13f.callback([]);return _13f;}var _140=this._io(_13e);this._flagDigestUpdate();return _140.start();},_ioIn:function(_141){var _142=this._io(_141);return _142.start();},_fromCache:function(id){return this._cachedItems[id];},_toCache:function(id,item){this._cachedItems[id]=item;},getValue:function(item,_143,_144){this._assertString(_143);return this._getHandlerByItem(item).getValue(item,_143,_144);},getValues:function(item,_145){this._assertString(_145);return this._getHandlerByItem(item).getValues(item,_145);},getAttributes:function(item){return this._getHandlerByItem(item).getAttributes(item);},hasAttribute:function(item,_146){this._assertString(_146);return this._getHandlerByItem(item).hasAttribute(item,_146);},containsValue:function(item,_147,_148){this._assertString(_147);return this._getHandlerByItem(item).containsValue(item,_147,_148);},isItem:function(_149){return this._isItem(_149)&&!this._hasState(_149,this.states["deleted"]);},isItemLoaded:function(_14a){return this.isItem(_14a)&&this._hasState(_14a,this.states["loaded"]);},loadItem:function(_14b){var it=_14b.item;if(this.isItemLoaded(it)){return;}var ldr=this._getItemLoader(it);if(_14b.onItem){ldr.addOnLoad(dojo.hitch(_14b.scope,_14b.onItem));}if(_14b.onError){ldr.addOnError(dojo.hitch(_14b.scope,_14b.onError));}},getLoader:function(_14c){var _14d=dojo.delegate(_14c,{store:this,preload:false}),cls;if(_14c.pageSize!=null){cls=com.ibm.data.PagedItemsLoader;}else{cls=com.ibm.data.ItemsLoader;}return new cls(_14d);},fetch:function(_14e){if(!_14e){_14e={};}_14e.aborted=false;if(!_14e.scope){_14e.scope=dojo.global;}if(!_14e.queryOptions){_14e.queryOptions={};}var _14f=_14e.queryOptions.preventCache;_14e=this._prepareQuery(_14e);var _150=_14e.scheme,_151=this._getHandlerByScheme(_150),_152=_151.definition.handleAs;var _153=dojo.hitch(this,function(_154,_155){try{if(_14e.aborted){return;}if(dojo.isIE&&_152=="xml"){_154=com.ibm.domUtilities.docFromString(_154);}this.processResponse(_154,_14e,_150,_155);}catch(err){this.raiseError(err);}});var _156=function(_157,_158){if(_14e.onError){_14e.onError.call(_14e.scope,_157,_14e);}};if(_14e.url){_14e.query=_14e.url+"?"+dojo.objectToQuery(_14e.query);delete _14e.url;}var sync=_14e.sync||_14e.queryOptions.sync;var args={method:"GET",preventCache:_14f,content:{},query:_14e.query,handleAs:"text",headers:{"X-IBM-XHR":"true"},load:_153,error:_156};if(_152){if(!dojo.isIE||_152!="xml"){args.handleAs=_152;}}if(_14e.queryOptions.timeout!=null){args.timeout=_14e.queryOptions.timeout;}else{if(this.timeout){args.timeout=this.timeout;}}_14e.abort=function(){_14e.aborted=true;};args=this.modifyRequestArgs(args,_14e);if(this._fetchQueue.length==0){setTimeout(dojo.hitch(this,"_flushFetchQueue"),this.fetchWait);}var _159=/opera/i.test(navigator.userAgent);if(sync||_14e.queryOptions.bypassBatch||_159){args.sync=sync;this._ioIn([args]);}else{this._fetchQueue.push([args]);}this._lastRequest=_14e;return _14e;},_flushFetchQueue:function(){try{var q=[],fq=this._fetchQueue.splice(0,this._fetchQueue.length);for(var i=0;i-1&&(_15d=0&&_15e.query.digest&&_15e.query.digest!=this._digest)){_15e.query.digest=this._digest;}}},_prepareQuery:function(_15f){var q=_15f.query,_160,_161;if(!q){q={};}else{if(q.declaredClass=="com.ibm.data.resolver.Query"){_15f.scheme=q.scheme;q=q.url;}}if(dojo.isString(q)){_161=this._splitUrlParts(q);}else{_161={query:q};}if(!_15f.scheme){_15f.scheme=this._getSchemeFromUri(_161.query.uri);}_160=this._getHandlerByUri(_15f.scheme);var _162=dojo.mixin({},_15f);dojo.forEach(["onBegin","onItem","onComplete","onError","scope","query","scheme"],function(p){delete _162[p];});_161.query=_160.modifyFetchQuery(_161.query,_162);this._attachDigestToQuery(_161);_15f.query=_161.query;_15f.url=_161.path;return this.prepareQuery(_15f);},prepareQuery:function(_163){return _163;},_buildUrl:function(_164,_165){var ret="";var _164=this._prepareQuery(_164);var _166=dojo.objectToQuery(_164.query);if(_165.indexOf("?")>-1){ret=_165+"&"+_166;}else{ret=_165+"?"+_166;}return (this.modifyUrl(_164,ret));},modifyUrl:function(_167,url){return url;},processFetchedItems:function(_168,meta,_169,_16a,_16b){var _16c=(_169.queryOptions&&_169.queryOptions.preventClientCache);var _16d=(_169.queryOptions&&_169.queryOptions.replaceCache);for(var i=0;i<_168.length;i++){this._initStoreMeta(_168[i],{scheme:_16a,pocHandler:_16b});this._addState(_168[i],_16b,this.states["loaded"]);this._toCache(this.getIdentity(_168[i]),_168[i]);}return _168;},processResponse:function(data,_16e,_16f,_170){_16e.xhr=_170.xhr;if(_16e.aborted){return;}var _171=this._getHandlerByScheme(_16f);var _172=_171.processFetch(data,_16e);items=this.processFetchedItems(_172.items,_172.meta,_16e,_16f,_171);if(_16e.onBegin){_16e.onBegin.call(_16e.scope,_172.meta.resultSize,_16e);}if(_16e.aborted){return;}if(_16e.onItem){for(var i=0;i0){_1ad="onError";}else{_1ad="onComplete";}if(kw[_1ad]){try{kw[_1ad].call(kw.scope?kw.scope:dojo.global,_1ab);}catch(err){this.raiseError(err);}}},this);},_launder:function(){var _1ae=[],_1af=[],_1b0=[],pile;var _1b1=new com.ibm.data.SaveList({store:this});while((pile=this._laundryQueue.shift())!=null){_1ae=_1ae.concat(pile.dirtyList);_1af=_1af.concat(pile.delList);if(pile.keywordArgs){_1b0.push(pile.keywordArgs);}}var _1b2=this._getDeferredQueue(),_1b3=this._getDeferredQueue();dojo.forEach(_1b0,function(_1b4){if(_1b4.onComplete){_1b2.add((new dojo.Deferred()).addCallback(dojo.hitch(_1b4.scope?_1b4.scope:dojo.global,_1b4.onComplete,_1b1)));}if(_1b4.onError){_1b3.add((new dojo.Deferred()).addCallback(dojo.hitch(_1b4.scope?_1b4.scope:dojo.global,_1b4.onError,_1b1)));}},this);var _1b5=this._depMgr.getPlan(_1ae,com.ibm.data.DependencyManager.types["create"]).orderSteps().filter(dojo.hitch(this,function(step){var item=this.byId(step.name);ret=this.isDirty(item);if(ret){_1b1.addItem(item);}return ret;})),_1b6=_1b5.getGroupList();dojo.forEach(_1b6,function(pile){var map={};var _1b7=dojo.map(pile.steps,function(step){var item=this.byId(step.name);map[step.name]=item;return item;},this);var _1b8=this._depMgr.getPlan(_1b7,com.ibm.data.DependencyManager.types["order"]).orderSteps().filter(dojo.hitch(this,function(step){return map[step.name]!=null;}));pile.steps=_1b8.orderedSteps;},this);_1af=dojo.map(_1af,function(item){_1b1.addItem(item);var args={query:{uri:this.getIdentity(item),rep:"empty"},method:"DELETE",load:dojo.hitch(this,function(){var h=this._getHandlerByItem(item);dojo.forEach(["dirty","deletedExpl","deletedImpl","deleted","saving"],function(_1b9){this._removeState(item,h,this.states[_1b9]);},this);h.uninitialize(item);for(var p in item){delete item[p];}})};var _1ba=args.error;args.error=dojo.hitch(this,function(err,_1bb){_1b1.setError(item,err);if(_1ba){_1ba.call(args,err,_1bb);}_1ba=null;return err;});return args;},this);var _1bc=_1b6.shift(),_1bd=new dojo.Deferred();_1bd.addCallback(dojo.hitch(this,function(){var _1be;if(_1bc!=null){_1be=dojo.map(_1bc.steps,function(step){return this._planStepsMapper(step,_1b1);},this);}else{_1be=[];}var _1bf=_1be.concat(_1af);var _1c0=dojo.hitch(this,function(res){if((_1bc=_1b6.shift())!=null){try{_1bc.steps=this._filterUnmetDependencies(_1bc.steps,com.ibm.data.DependencyManager.types["create"],_1b1);_1bf=dojo.map(_1bc.steps,function(step){return this._planStepsMapper(step,_1b1);},this);return this._ioOut(_1bf).addCallback(_1c0);}catch(err){this.raiseError(err);}}else{var _1c1=_1b1.getErrors();if(_1c1.length==0){_1b2.fire(_1b1);}if(_1c1.length>0){_1b3.fire(_1b1,new Error());}this.onSaveComplete(_1b1);_1b1.destroy();}return res;});return this._ioOut(_1bf).addCallback(_1c0);}));this._ioOutQueue.add(_1bd);},revert:function(){for(var pre in this._handlers){this.revertHandler(this._handlers[pre]);}},revertHandler:function(_1c2){var h=this._handlers[_1c2];if(h){var _1c3=["dirty","deletedExpl","new"];dojo.forEach(_1c3,function(_1c4){var list=this._getHandlerStateList(h,this.states[_1c4]);dojo.forEach(list,function(item){this._revertHandlerItem(item,h);},this);},this);}},revertItem:function(item){var h=this._getHandlerByItem(item);if(h){this._revertHandlerItem(item,h);}},_revertHandlerItem:function(item,_1c5){if(this._hasState(item,this.states["new"])){this._removeState(item,_1c5,this.states["new"]);_1c5.uninitialize(item);}else{this._removeState(item,_1c5,this.states["dirty"]);this._removeState(item,_1c5,this.states["deletedExpl"]);_1c5.restore(item);}},_changeState:function(item,_1c6,_1c7){if(this._hasState(item,_1c7)){return;}switch(_1c7){case this.states["new"]:if(this._hasState(item,this.states["dirty"])||this._hasState(item,this.states["deleted"])){return;}this._addState(item,_1c6,_1c7);return;case this.states["dirty"]:if(this._hasState(item,this.states["new"])||this._hasState(item,this.states["deleted"])){return;}this._addState(item,_1c6,_1c7);break;case this.states["deletedExpl"]:case this.states["deletedImpl"]:this._addState(item,_1c6,_1c7);_1c7=this.states["deleted"];case this.states["deleted"]:this._removeState(item,_1c6,this.states["dirty"]);this._removeState(item,_1c6,this.states["new"]);this._addState(item,_1c6,_1c7);var _1c8=this._depMgr.getTargetsByType(this.getIdentity(item),com.ibm.data.DependencyManager.types["delete"]);dojo.forEach(_1c8,function(_1c9){var _1ca=this.byId(_1c9);this._changeState(_1ca,this._getHandlerByItem(_1ca),this.states["deletedImpl"]);},this);break;case this.states["loaded"]:default:this._addState(item,_1c6,_1c7);}},_removeState:function(item,_1cb,_1cc,_1cd){if(!this._hasState(item,_1cc)){return;}delete item._$.states[_1cc];if(!_1cd){var list=this._getHandlerStateList(_1cb,_1cc);if(list){for(var i=0;i0)||(l=this._getHandlerStateList(h,this.states["deleted"])&&l.length>0)||(l=this._getHandlerStateList(h,this.states["new"])&&l.length>0)){return true;}}return false;}},isCreated:function(item){this._assertItem(item);return !this._hasState(item,this.states["new"]);},_fireCreated:function(item){if(item._$.onCreateDefQueue){item._$.onCreateDefQueue.fire(item);item._$.onCreateDefQueue.destroy();delete item._$.onCreateDefQueue;}},addOnCreate:function(item,_1da){this._assertItem(item);if(!item._$.onCreateDefQueue){_1da(item);}else{item._$.onCreateDefQueue.add((new dojo.Deferred()).addCallback(_1da));}},getUniqueCId:function(){return "cid:"+this._cidCntr++;},registerCId:function(cid,item){this._cidMap[cid]=item;item._$.cid=cid;this.addOnCreate(item,dojo.hitch(this,function(item){var id=this.getIdentity(item);this._toCache(id,item);this._depMgr.updateDependencyId(cid,id);}));},getCId:function(item){this._assertItem(item);return item._$.cid;},byCId:function(cid){return this._cidMap[cid];},seedStore:function(_1db,_1dc){if(_1db.id&&!_1db.scheme){_1db.scheme=this._getSchemeFromUri(_1db.id);}var h=this._getHandlerByScheme(_1db.scheme);_1db._$seeded=true;var item=this._createItemFromProps(_1db,_1dc,h);this._toCache(h.getIdentity(item),item);return item;},onDelete:function(_1dd){return _1dd;},onNew:function(_1de,_1df){return {newItem:_1de,parentInfo:_1df};},onSet:function(item,_1e0,_1e1,_1e2){return {item:item,attribute:_1e0,oldValue:_1e1,newValue:_1e2};}});dojo.declare("com.ibm.data.resolver.Query",null,{url:null,params:null,scheme:"",constructor:function(args){dojo.mixin(this,args);if(this.url){var qi=this.url.indexOf("?");if(qi>-1){this.params=dojo.queryToObject(this.url.substr(qi+1));}}else{this.url="?"+dojo.objectToQuery(this.params);}},param:function(name,_1e3){if(arguments.length>1){this.params[name]=_1e3;this._updateUrl();}else{return this.params[name];}},_updateUrl:function(){var qi=this.url.indexOf("?");if(qi>-1){this.url=this.url.substring(0,qi+1)+dojo.objectToQuery(this.params);}},toString:function(){return this.url;}});dojo.declare("com.ibm.data.SaveList",null,{store:null,list:null,constructor:function(args){this.list=[];dojo.mixin(this,args);},addItem:function(item){var id=this.store.getIdentity(item);if(!this.list[id]){var inf=[item,null];this.list.push(inf);this.list[id]=inf;}},removeItem:function(item){var id=this.store.getIdentity(item);if(this.list[id]){delete this.list[id];for(var i=0,inf;inf=this.list[i],i-1&&end>_1f9){var _1fa=_1f8.substring(0,_1f9)+"$";var _1fb=_1f8.substring(_1f9+1,end).split(",");return {key:_1fa,parameters:_1fb};}}return {key:_1f8,parameters:null};},getByRule:function(data,rule,_1fc){return data;},setByRule:function(data,rule,_1fd,_1fe){if(this.isReadOnly(rule)){return false;}return true;},unsetByRule:function(data,rule,_1ff){if(this.isReadOnly(rule)){return false;}return true;}});}if(!dojo._hasResource["com.ibm.data.resolver.QueryRulePocHandler"]){dojo._hasResource["com.ibm.data.resolver.QueryRulePocHandler"]=true;dojo.provide("com.ibm.data.resolver.QueryRulePocHandler");dojo.declare("com.ibm.data.resolver.QueryRulePocHandler",null,{definition:{scheme:"",handleAs:"text",features:{}},queryRules:{},bodyQueryRules:{},customAttributes:{},queryEngineClass:"com.ibm.query.QueryRuleEngine",types:{"Item":{to:function(_200){if(_200){return this.resolver.byId(_200);}return null;},from:function(_201){if(this.resolver.isItem(_201)){return this.resolver.getIdentity(_201);}else{return _201;}}},"decodedURI":{to:function(_202){return decodeURI(_202);},from:function(_203){return encodeURI(_203);}},"QueryURL$":{to:function(_204,_205){return new com.ibm.data.resolver.Query({url:_204,scheme:_205[0]});},from:function(_206,_207){return _206?_206.url:"";}},"QueryURL":{to:function(_208){return this.types["QueryURL$"].to(_208,[this.handler.definition.scheme]);},from:function(_209){return this.types["QueryURL$"].from(_209,[this.handler.definition.scheme]);}}},constructor:function(_20a,_20b){this.resolver=_20a;this.depMgr=_20b;this.engine=this.buildEngine();},buildEngine:function(){var cls=dojo.getObject(this.queryEngineClass);return new cls({queryRules:this.queryRules,types:this.types,resolver:this.resolver,handler:this});},_getValue:function(item,_20c,_20d,_20e){if(item._unsetAttrs[_20c]){return _20d;}var rule=this.engine.getQuery(_20c,this.customAttributes,_20e);if(rule){return this.customAttributes[_20c].get.call(this,item,_20e,rule.parameters);}else{if(item.data){rule=this.engine.getQuery(_20c,this.queryRules,_20e);if(!rule){return _20d;}var res=this.engine.getByRule(item.data,rule,_20e);if(!res.found){if(item._backupData){res=this.engine.getByRule(item._backupData,rule,_20e);if(res.found){return res.value;}}return _20d;}return res.value;}}return _20d;},getValue:function(item,_20f,_210){return this._getValue(item,_20f,_210,false);},getValues:function(item,_211){return this._getValue(item,_211,[],true);},getAttributes:function(item){var _212=[];for(var x in this.queryRules){_212.push(x);}for(var y in this.customAttributes){_212.push(y);}return _212;},hasAttribute:function(item,_213){if(item._unsetAttrs[_213]){return false;}var rule=this.engine.getQuery(_213,this.queryRules);if(!rule){rule=this.engine.getQuery(_213,this.customAttributes);if(rule){return this.customAttributes[_213].get.call(this,item,false,rule.parameters)!==undefined;}return false;}var res=this.engine.getByRule(item.data,rule);if(!res.found){return false;}return true;},containsValue:function(item,_214,_215){return dojo.some(this.getValues(item,_214),function(val){if(val==_215){return true;}return false;},this);},getLabel:function(item){var arr=this.getLabelAttributes(item);var str="";for(var i=0;i0){this.attr(_268[0],_264,_265);}else{_267.attributes[_264]=_265;this.createFromJson(data,_267);}}return true;};_262.category.setter=dojo.partial(_263,"term");_262.categoryScheme.setter=dojo.partial(_263,"scheme");_262.categoryLabel.setter=dojo.partial(_263,"label");})();if(!dojo.isIE){com.ibm.query.rules.Atom.namespaces["xml"]="http://www.w3.org/XML/1998/namespace";}}if(!dojo._hasResource["com.ibm.data.resolver.AtomPocHandler"]){dojo._hasResource["com.ibm.data.resolver.AtomPocHandler"]=true;dojo.provide("com.ibm.data.resolver.AtomPocHandler");dojo.declare("com.ibm.data.resolver.AtomPocHandler",com.ibm.data.resolver.XmlPocHandler,{queryRules:dojo.mixin({},com.ibm.query.rules.Atom.syndication.common,com.ibm.query.rules.Atom.syndication.entry),bodyQueryRules:dojo.mixin({},com.ibm.query.rules.Atom.syndication.common),namespaces:{"atom":"http://www.w3.org/2005/Atom"},mergeItems:function(_269,_26a){if(this.resolver.isDirty(_26a)){_26a._backupData=_269.data;}else{_26a.data=_269.data;}return _26a;},processEntryData:function(_26b){var _26c=this.dataToItem(_26b);var _26d=this.getIdentity(_26c);var _26e=this.resolver._fromCache(_26d);if(_26e){_26c=this.mergeItems(_26c,_26e);}return _26c;},parseFeed:function(_26f,_270){var _271=[],root=null,_272=this.engine.evaluate("/atom:feed",_270,true);if(_272.length==0){_272=this.engine.evaluate("/atom:entry",_270);if(_272.length==0){throw new Error(this.resolver.fmt("errorDataFormat"));}else{root=_272[0];_271.push(this.processEntryData(root));}}else{root=_272[0];_272=this.engine.evaluate("./atom:entry",root);dojo.forEach(_272,function(_273){_271.push(this.processEntryData(_273));},this);}return {items:_271,root:root};},processFetch:function(_274,_275){var _276=this.parseFeed(_275,_274),meta={root:_276.root,resultSize:_276.items.length};if(!this._nsSynced){this.syncNamespaces(_276.root);this._nsSynced=true;}dojo.forEach(_276.items,function(item){item._cachedMeta.requestMeta=meta;},this);return {items:_276.items,meta:meta};},processSave:function(item){this.inherited(arguments);var args={data:this._serializeSaveData(item),headers:{},handleAs:this.definition.handleAs};args.headers[this.resolver.headers.CONTENT_TYPE]="application/atom+xml";if(!this.resolver.isCreated(item)){args.load=dojo.hitch(this,function(_277,_278){var _279=this.engine.evaluate("//atom:entry",_277);var cid=this.getIdentity(item);if(_279&&_279.length>0){item.data=_279[0];item.cid=item.id;delete item.id;var _27a=this.getIdentity(item);}return _277;});}args.query=this.getSaveQuery(item);return args;},_serializeSaveData:function(item){return com.ibm.domUtilities.stringFromDoc(item.data);},getSaveQuery:function(item){var q={uri:this.getIdentity(item)};if(this.resolver.isCreated(item)){q.mode="merge";}return q;},getLabel:function(item){return this.getValue(item,"title");},getLabelAttributes:function(item){return ["title"];},getIdentity:function(item){if(!item.id){item.id=this.getValue(item,"id");}return item.id;},getIdentityAttributes:function(item){return ["id"];},instantiateTemplate:function(_27b,args,_27c){var _27d=this.inherited(arguments);var _27e=this.engine.evaluate("//atom:entry",_27d);if(_27e&&_27e.length>0){_27d=_27e[0];}return _27d;}});(function(){var prot=com.ibm.data.resolver.AtomPocHandler.prototype;prot.queryRules.selfLink=dojo.mixin({},prot.queryRules.selfLink,{type:"QueryURL"});})();}if(!dojo._hasResource["com.ibm.query.rules.OpenSearch"]){dojo._hasResource["com.ibm.query.rules.OpenSearch"]=true;dojo.provide("com.ibm.query.rules.OpenSearch");com.ibm.query.rules.OpenSearch={namespaces:dojo.mixin({},com.ibm.query.rules.Atom.namespaces,{"os":"http://a9.com/-/spec/opensearch/1.1/"}),common:{nextLink:{selector:"./atom:link[@rel='next']",field:"@href"},startIndex:{selector:"./os:startIndex",field:"$textContent",type:"Number"},itemsPerPage:{selector:"./os:itemsPerPage",field:"$textContent",type:"Number"},totalResults:{selector:"./os:totalResults",field:"$textContent",type:"Number"},query:{selector:"./os:Query",type:"Node"}}};}if(!dojo._hasResource["com.ibm.data.resolver.OpenSearchPocHandler"]){dojo._hasResource["com.ibm.data.resolver.OpenSearchPocHandler"]=true;dojo.provide("com.ibm.data.resolver.OpenSearchPocHandler");dojo.declare("com.ibm.data.resolver.OpenSearchPocHandler",com.ibm.data.resolver.AtomPocHandler,{bodyQueryRules:dojo.mixin({},com.ibm.data.resolver.AtomPocHandler.prototype.bodyQueryRules,com.ibm.query.rules.OpenSearch.common),namespaces:dojo.mixin({},com.ibm.data.resolver.AtomPocHandler.prototype.namespaces,com.ibm.query.rules.OpenSearch.namespaces),processFetch:function(_27f,_280){var _281=this.inherited(arguments);_281.meta.resultSize=this.engine.getByRule(_281.meta.root,this.bodyQueryRules["totalResults"]).value;_280.nextQuery=_281.meta.nextURL=this.engine.getByRule(_281.meta.root,this.bodyQueryRules["nextLink"]).value;_280.startIndex=_281.meta.startIndex=this.engine.getByRule(_281.meta.root,this.bodyQueryRules["startIndex"]).value;_280.itemsPerPage=_281.meta.itemsPerPage=this.engine.getByRule(_281.meta.root,this.bodyQueryRules["itemsPerPage"]).value;return _281;}});(function(){var prot=com.ibm.data.resolver.OpenSearchPocHandler.prototype;prot.bodyQueryRules.nextLink=dojo.mixin({},prot.bodyQueryRules.nextLink,{type:"QueryURL"});})();}if(!dojo._hasResource["com.ibm.data.resolver.ResolverQueryRules"]){dojo._hasResource["com.ibm.data.resolver.ResolverQueryRules"]=true;dojo.provide("com.ibm.data.resolver.ResolverQueryRules");com.ibm.data.resolver.ResolverQueryRules={namespaces:dojo.mixin({},com.ibm.query.rules.OpenSearch.namespaces,{"xsl":"http://www.w3.org/1999/XSL/Transform","thr":"http://purl.org/syndication/thread/1.0","xhtml":"http://www.w3.org/1999/xhtml","service":"http://www.ibm.com/xmlns/prod/sw/model/service/1.0","ac":"http://www.ibm.com/xmlns/prod/lotus/access-control/v1.0","trc":"http://www.ibm.com/xmlns/prod/websphere/portal/v7.0/portal-tag-rate-comment","cp":"http://www.ibm.com/xmlns/prod/websphere/portal/v7.0/portal-contextual-portal","um":"http://www.ibm.com/xmlns/prod/websphere/um.xsd","xs":"http://www.w3.org/2001/XMLSchema-datatypes","stats":"http://www.ibm.com/xmlns/prod/websphere/portal/v7.0.5/statistics","asa":"http://www.ibm.com/xmlns/prod/websphere/portal/v8.0/site-analytics","cm":"http://coremetrics.com/dataapi","portal":"http://www.ibm.com/xmlns/prod/websphere/portal/v6.0.1/portal-model","xsi":"http://www.w3.org/2001/XMLSchema-instance"}),atom:{modelExt:{modelNodeType:{selector:"./atom:content/*",field:"$localName",readOnly:true}},uniqueNameExt:{uniqueName:{selector:"./atom:id",field:"@ext:uniquename",setter:function(data,rule,_282){this.createFromJson(data,{name:"atom:id",attributes:{"ext:uniquename":_282}});return true;}}},threadExt:{parent:{selector:"./thr:in-reply-to",field:"@ref",type:"Item"},parentId:{selector:"./thr:in-reply-to",field:"@ref"},parentURI:{selector:"./thr:in-reply-to",field:"@href",type:"QueryURL"}},treeExt:{childrenURI:{selector:"./atom:link[@rel='replies']",field:"@href",readOnly:true,type:"QueryURL"},next:{selector:"./atom:link[@rel='next']",field:"@ext:uri",type:"Item",unset:"!"},nextId:{selector:"./atom:link[@rel='next']",field:"@ext:uri",unset:"!"},nextURI:{selector:"./atom:link[@rel='next']",field:"@href",unset:"!",type:"QueryURL"}},L10nExt:{localizedTitle$:{selector:"./atom:content/*[model:title]/model:title/base:nls-string["+(dojo.isIE?"@xml:lang = '${0}'":"lang('${0}')")+"]",field:"$textContent",locale:"${0}"},localizedDescription$:{selector:"./atom:content/*[model:description]/model:description/base:nls-string["+(dojo.isIE?"@xml:lang = '${0}'":"lang('${0}')")+"]",field:"$textContent",locale:"${0}"}},acExt:{userOwned:{selector:"./atom:content/*/ac:allowed-access",field:"@ac:user-owned",readOnly:true},isPrivate:{selector:"./atom:content/*/ac:allowed-access",field:"@ac:private",readOnly:true},accessLevel:{selector:"./atom:content/*/ac:allowed-access/ac:access-level",field:"@ac:type"},accessLevel$:{selector:"./atom:content/*/ac:allowed-access/ac:access-level[@ac:type='${0}']",field:"@ac:type",acType:"${0}"}},operationsExt:{contextMenu:{selector:"./atom:link[@ext:rel='contextMenu']",field:"@ext:uri",readOnly:true},contextMenuURI:{selector:"./atom:link[@ext:rel='contextMenu']",field:"@href",readOnly:true}},contentExt:{layoutURI:{selector:"./atom:link[@ext:rel='layout']",field:"@href",type:"QueryURL[lm]$",readOnly:true},theme:{selector:"./atom:link[@ext:rel='theme']",field:"@ext:uri",setter:function(data,rule,_283){this.createFromJson(data,{name:"atom:link",attributes:{"ext:rel":"theme","ext:uri":_283,"href":_283}});return true;}}},cpExt:{cpScope:{selector:"./atom:id",field:"@cp:scope"},preferredLocale:{selector:"./atom:content/cp:tagspace/cp:preferredLocale",field:"$textContent"},preferredLocaleDir:{selector:"./atom:content/cp:tagspace/cp:preferredLocaleDir",field:"$textContent"},resource:{selector:"./atom:link[@portal:rel]",field:"@href",setter:null},uri:{selector:"./atom:link",field:"@portal:uri"},count:{selector:"./atom:link",field:"@thr:count"},isMine:{selector:"./atom:link",field:"@thr:isMine"},deleteLink:{selector:"./atom:link[@ext:rel='tagfeed']",field:"@href"},deleteAllLink:{selector:"./atom:link[@portal:rel='managerDelete']",field:"@href"}},metaExt:{metadata$:{selector:"./atom:content/*/model:metadata[@name='${0}']/base:value",field:"@value",mdname:"${0}",deferSet:true,setter:function(data,rule,_284,_285){var _286={name:"base:value",attributes:{"xsi:type":"base:String"}};var _287=this.select("./atom:content/*",data,true);var _288=_287.select("model:metadata[@name='"+rule.mdname+"']",true);if(_288.length==0){_287.createFromJson({name:"model:metadata",attributes:{"name":rule.mdname}});}_288=_287.select("model:metadata[@name='"+rule.mdname+"']",true);_288.select("*").destroy();if(_285){dojo.forEach(_284,function(val){_286.attributes.value=val;_288.createFromJson(_286);},this);}else{_286.attributes.value=_284;_288.createFromJson(_286);}return true;}}},arExt:{subTitle:{selector:"./atom:content/office:document-content/office:body/*/chart:chart/chart:subtitle",field:"$textContent",readOnly:true},mainTitle:{selector:"./atom:content/office:document-content/office:body/*/chart:chart/chart:title",field:"$textContent",readOnly:true},published:{selector:"./atom:published",field:"$textContent",readOnly:true},backendLink:{selector:"./atom:link",field:"@href",readOnly:true},multipleDataItemKey:{selector:"./atom:content/office:document-content/office:body/*/chart:chart/table:table/table:table-header-rows/*/table:table-cell",field:"$textContent",readOnly:true},multipleDataItemValue:{selector:"./atom:content/office:document-content/office:body/*/chart:chart/table:table/table:table-rows/*/table:table-cell",field:"$textContent",readOnly:true},singleDataItemKey:{selector:"./atom:content/stats:dataItem",field:"@key",readOnly:true},singleDataItemValue:{selector:"./atom:content/stats:dataItem",field:"@value",readOnly:true},reportApplicability:{selector:"./atom:category",field:"@term",readOnly:true},reportApplicabilityType:{selector:"./atom:category",field:"@scheme",readOnly:true},errorMessage:{selector:"./atom:content/cm:Response/cm:message",field:"$textContent",readOnly:true},errorCode:{selector:"./atom:content/cm:Response/*/cm:errorCode",field:"@errorCode",readOnly:true}},atExt:{tagValue:{selector:"./atom:content/*/base:value",field:"@value",readOnly:true},resourceUriLinks:{selector:"./atom:link",type:"Node",deferMultiValued:true}}}};(function(){var _289=com.ibm.data.resolver.ResolverQueryRules.atom;var _28a=function(data,rule,_28b,_28c){var _28d=this.select(rule.selector,data,false);if(_28d.length==0){this.createFromJson(data,{name:"thr:in-reply-to",attributes:{"ext:uri":_28b,"type":"application/atom+xml","ref":_28b,"href":_28b}});}else{_28d.attr("ext:uri",_28b).attr("ref",_28b).attr("href",_28b);}return true;};_289.threadExt.parent.setter=_28a;_289.threadExt.parentId.setter=_28a;_289.threadExt.parentURI.setter=_28a;_289.threadExt.parent.deferSet=true;_289.threadExt.parentId.deferSet=true;_289.threadExt.parentURI.deferSet=true;var _28e=function(data,rule,_28f){var _290={"ext:uri":_28f,"rel":"next","type":"application/atom+xml"};_290[rule.field.substr(1)]=_28f;this.createFromJson(data,{name:"atom:link",attributes:_290});return true;};_289.treeExt.next.setter=_28e;_289.treeExt.nextId.setter=_28e;_289.treeExt.nextURI.setter=_28e;var _291=function(_292,data,rule,_293){var _294=this.select("./atom:content/*",data,true);var _295=_294.select("model:title",true);var _296={name:"base:nls-string",attributes:{"xml:lang":rule.locale},children:[_293]};if(_295.length==0){_294.createFromJson({name:_292,children:[_296]});}else{_295.createFromJson(_296);}return true;};_289.L10nExt.localizedTitle$.setter=dojo.partial(_291,"model:title");_289.L10nExt.localizedDescription$.setter=dojo.partial(_291,"model:description");var _297=function(_298,data,rule,_299,_29a){var _29b={};_29b[rule.field.substr(1)]=_299;this.createFromJson(item.data,{name:_298,attributes:_29b});return true;};_289.cpExt.cpScope.setter=dojo.partial(_297,"atom:id");_289.cpExt.uri.setter=dojo.partial(_297,"atom:link");_289.cpExt.count.setter=dojo.partial(_297,"atom:link");_289.cpExt.isMine.setter=dojo.partial(_297,"atom:link");var _29c=function(_29d,data,rule,_29e,_29f){this.select(rule.selector,data,false).remove();var _2a0={"rel":"related","type":"application/atom+xml"};if(!_29f){_29e=[_29e];}dojo.forEach(_29e,function(val){_2a0["portal:uri"]=val;this.createFromJson(data,{name:_29d,attributes:_2a0});},this);return true;};_289.atExt.resourceUriLinks.setter=dojo.partial(_29c,"atom:link");}());}if(!dojo._hasResource["com.ibm.data.resolver.UMPocHandler"]){dojo._hasResource["com.ibm.data.resolver.UMPocHandler"]=true;dojo.provide("com.ibm.data.resolver.UMPocHandler");dojo.declare("com.ibm.data.resolver.UMPocHandler",[com.ibm.data.resolver.OpenSearchPocHandler],{namespaces:dojo.mixin({},com.ibm.data.resolver.OpenSearchPocHandler.prototype.namespaces,com.ibm.data.resolver.ResolverQueryRules.namespaces),_secureRegx:null,constructor:function(){this._secureRegx=new RegExp(this.definition.scheme+":secure/");},_createTemplates:function(){var _2a1=[];for(var _2a2 in this.namespaces){_2a1.push("xmlns:",_2a2,"=\"",this.namespaces[_2a2],"\" ");}dojo.mixin(this,{userTemplate:{templateString:""+""+""+"IBM WebSphere Portal/6.1"+""+"IBM WebSphere Portal Model Feed"+""+""+"${tagname}"+"${id}"+""+""+"",templateProps:{id:"",tagname:"",title:"",resourceURI:""}},groupTemplate:{templateString:""+""+""+"IBM WebSphere Portal/6.1"+""+"IBM WebSphere Portal Model Feed"+""+""+"${tagname}"+"${id}"+""+""+"",templateProps:{id:"",tagname:"",title:"",resourceURI:""}}});},getTemplate:function(args,_2a3){return this.tagTemplate;},getSaveQuery:function(item){var q=this.inherited(arguments);if(this.resolver.isCreated(item)){q.rep="empty";}else{q.uri=this._newTagURI;}return q;},modifyFetchQuery:function(_2a4,_2a5){var uri=_2a4.uri,_2a6=uri.match(this._secureRegx),sch=this.definition.scheme;if(_2a6!=null&&!this.resolver.isAuthenticated){_2a4.uri=sch+":"+uri.substr(_2a6[0].length);}else{if(_2a6==null&&this.resolver.isAuthenticated){_2a4.uri=sch+":secure/"+uri.substr(sch.length+1);}}return _2a4;}});(function(){var r=com.ibm.data.resolver;var _2a7=r.ResolverQueryRules.atom;var r=com.ibm.data.resolver,_2a8=r.UMPocHandler,prot=_2a8.prototype,def=prot.definition,_2a7=r.ResolverQueryRules.atom;def=dojo.mixin({},def,{scheme:"um"});prot.definition=def;var _2a9=function(data,name,type){var _2aa=this.engine.select("./atom:content/um:profile/um:attribute[@name='"+name+"']",data,true);if(_2aa.length>0){return _2aa;}else{var _2ab=this.engine.select("./atom:content/um:profile",data,true);if(_2ab.length>0){return _2ab.createFromJson({name:"um:attribute",attributes:{"name":name,"type":type?type:"xs:string","multivalued":"false"}}).select("./um:attribute[@name='"+name+"']",true);}else{return null;}}},_2ac=function(_2ad,_2ae){_2ad.createFromJson({name:"um:attributeValue",children:[_2ae]});};dojo.extend(_2a8,{queryRules:dojo.mixin({},r.OpenSearchPocHandler.prototype.queryRules,{umType:{selector:"./atom:content/um:profile",field:"@type",readOnly:true},umIdentifier:{selector:"./atom:content/um:profile",field:"@identifier",readOnly:true},groupMembershipURL:{selector:"./atom:link[@rel='related']",field:"@href",readOnly:true},umAttrIsMultivalued$:{selector:"./atom:content/um:profile/um:attribute[@name='${0}']",field:"@multiValued"},umAttrType$:{selector:"./atom:content/um:profile/um:attribute[@name='${0}']",field:"@type",attrName:"${0}",deferSet:true,setter:function(data,rule,_2af,_2b0){var _2b1=_2a9.call(this,data,rule.attrName,_2af);if(_2b1.length>0){_2b1.attr("type",_2af);return true;}else{return false;}}},umAttrValue$:{selector:"./atom:content/um:profile/um:attribute[@name='${0}']/um:attributeValue",field:"$textContent",attrName:"${0}",deferSet:true,setter:function(data,rule,_2b2,_2b3){var _2b4=_2a9.call(this,data,rule.attrName,_2b2);if(_2b4.length>0){_2b4.select("um:attributeValue").destroy();if(_2b3){dojo.forEach(_2b2,dojo.hitch(this,_2ac,_2b4));}else{_2ac.call(this,_2b4,_2b2);}return true;}else{return false;}}},umAttributes:{selector:"./atom:content/um:profile/um:attribute",field:"@name",readOnly:true}})});com.ibm.data.Resolver.register(def.scheme,_2a8);})();}if(!dojo._hasResource["com.ibm.data.resolver.PrivateAtomModelExt"]){dojo._hasResource["com.ibm.data.resolver.PrivateAtomModelExt"]=true;dojo.provide("com.ibm.data.resolver.PrivateAtomModelExt");dojo.declare("com.ibm.data.resolver.PrivateAtomModelExt",null,{_privacyNodeSelector:"./atom:content/*",modifyNewItemArgs:function(args,_2b5){this.inherited("modifyNewItemArgs",arguments);if(args.isPrivate!=null){if(dojo.isString(args.isPrivate)){args.isPrivate=args.isPrivate.toLowerCase();switch(args.isPrivate){case "true":case "yes":args.isPrivate="true";break;default:args.isPrivate="false";}}else{if(args.isPrivate==true){args.isPrivate="true";}else{args.isPrivate="false";}}}return args;},fillInProperties:function(_2b6,_2b7,_2b8,_2b9){this._initItemPrivacy(_2b6,_2b8);return this.inherited("fillInProperties",arguments);},_initItemPrivacy:function(item,_2ba){if(_2ba.isPrivate!=null){this.engine.select(this._privacyNodeSelector,item.data,true).attr("creationcontext:private",_2ba.isPrivate);}delete _2ba.isPrivate;}});}if(!dojo._hasResource["com.ibm.data.resolver.TMPocHandler"]){dojo._hasResource["com.ibm.data.resolver.TMPocHandler"]=true;dojo.provide("com.ibm.data.resolver.TMPocHandler");dojo.declare("com.ibm.data.resolver.TMPocHandler",[com.ibm.data.resolver.OpenSearchPocHandler,com.ibm.data.resolver.PrivateAtomModelExt],{_newTagURI:"tm:all",_newIdPrefix:"tm:name:",_privacyNodeSelector:".",namespaces:dojo.mixin({},com.ibm.data.resolver.OpenSearchPocHandler.prototype.namespaces,com.ibm.data.resolver.ResolverQueryRules.namespaces),_createTemplates:function(){var _2bb=[];for(var _2bc in this.namespaces){_2bb.push("xmlns:",_2bc,"=\"",this.namespaces[_2bc],"\" ");}this._nsDeclString=_2bb.join("");dojo.mixin(this,{tagTemplate:{templateString:""+""+""+"IBM WebSphere Portal/7.0"+""+"IBM WebSphere Portal Model Feed"+""+""+"${title}"+"${id}"+""+""+"",templateProps:{id:"",title:"",resourceURI:"",locale:dojo.locale.replace(/-/g,"_")}}});},_serializeSaveData:function(item){return ""+""+""+"IBM WebSphere Portal/7.0"+""+"WebSphere Portal Server TagSpace Feed"+"tm:ts:empty"+""+com.ibm.domUtilities.stringFromDoc(item.data)+"";},getTemplate:function(args,_2bd){return this.tagTemplate;},getSaveQuery:function(item){var q=this.inherited(arguments);if(this.resolver.isCreated(item)){q.rep="empty";}else{q.uri=this._newTagURI;}return q;}});(function(){var r=com.ibm.data.resolver;var _2be=r.ResolverQueryRules.atom;var r=com.ibm.data.resolver,_2bf=r.TMPocHandler,prot=_2bf.prototype,def=prot.definition,_2be=r.ResolverQueryRules.atom;def=dojo.mixin({},def,{scheme:"tm"});prot.definition=def;dojo.extend(_2bf,{queryRules:dojo.mixin({},r.OpenSearchPocHandler.prototype.queryRules,_2be.uniqueNameExt,_2be.L10nExt,_2be.modelExt,_2be.cpExt,{tagScope:_2be.cpExt.cpScope})});com.ibm.data.Resolver.register(def.scheme,_2bf);})();}if(!dojo._hasResource["com.ibm.data.resolver.RTMPocHandler"]){dojo._hasResource["com.ibm.data.resolver.RTMPocHandler"]=true;dojo.provide("com.ibm.data.resolver.RTMPocHandler");dojo.declare("com.ibm.data.resolver.RTMPocHandler",[com.ibm.data.resolver.OpenSearchPocHandler,com.ibm.data.resolver.PrivateAtomModelExt],{_newRatingURI:"rtm:all",_privacyNodeSelector:".",namespaces:dojo.mixin({},com.ibm.data.resolver.OpenSearchPocHandler.prototype.namespaces,com.ibm.data.resolver.ResolverQueryRules.namespaces),_createTemplates:function(){var _2c0=[];for(var _2c1 in this.namespaces){_2c0.push("xmlns:",_2c1,"=\"",this.namespaces[_2c1],"\" ");}this._nsDeclString=_2c0.join("");dojo.mixin(this,{ratingTemplate:{templateString:""+""+""+"IBM WebSphere Portal/7.0"+""+"IBM WebSphere Portal Model Feed"+""+""+"${rating}"+"${id}"+""+""+"",templateProps:{id:"",rating:"",title:"",resourceURI:"",isPrivate:""}}});},_serializeSaveData:function(item){return ""+""+""+"IBM WebSphere Portal/7.0"+""+"WebSphere Portal Server RatingSpace Feed"+"rtm:rs:empty"+""+com.ibm.domUtilities.stringFromDoc(item.data)+"";},getTemplate:function(args,_2c2){return this.ratingTemplate;},getSaveQuery:function(item){var q=this.inherited(arguments);if(this.resolver.isCreated(item)){q.rep="empty";}else{q.uri=this._newRatingURI;}return q;}});(function(){var r=com.ibm.data.resolver;var _2c3=r.ResolverQueryRules.atom;var r=com.ibm.data.resolver,_2c4=r.RTMPocHandler,prot=_2c4.prototype,def=prot.definition,_2c3=r.ResolverQueryRules.atom;def=dojo.mixin({},def,{scheme:"rtm"});prot.definition=def;dojo.extend(_2c4,{queryRules:dojo.mixin({},r.OpenSearchPocHandler.prototype.queryRules,_2c3.uniqueNameExt,_2c3.L10nExt,_2c3.modelExt,_2c3.cpExt,{ratingScope:_2c3.cpExt.cpScope})});com.ibm.data.Resolver.register(def.scheme,_2c4);})();}if(!dojo._hasResource["com.ibm.data.resolver.ARPocHandler"]){dojo._hasResource["com.ibm.data.resolver.ARPocHandler"]=true;dojo.provide("com.ibm.data.resolver.ARPocHandler");dojo.declare("com.ibm.data.resolver.ARPocHandler",[com.ibm.data.resolver.PrivateAtomModelExt,com.ibm.data.resolver.OpenSearchPocHandler],{namespaces:dojo.mixin({},com.ibm.data.resolver.ResolverQueryRules.namespaces)});(function(){var r=com.ibm.data.resolver,_2c5=r.ARPocHandler,prot=_2c5.prototype,def=prot.definition,_2c6=r.ResolverQueryRules.atom;def=dojo.mixin({},def,{scheme:"ar"});prot.definition=def;dojo.extend(_2c5,{queryRules:dojo.mixin({},r.OpenSearchPocHandler.prototype.queryRules,_2c6.uniqueNameExt,_2c6.L10nExt,_2c6.modelExt,_2c6.arExt)});com.ibm.data.Resolver.register(def.scheme,_2c5);})();}if(!dojo._hasResource["com.ibm.data.resolver.ATPocHandler"]){dojo._hasResource["com.ibm.data.resolver.ATPocHandler"]=true;dojo.provide("com.ibm.data.resolver.ATPocHandler");dojo.declare("com.ibm.data.resolver.ATPocHandler",[com.ibm.data.resolver.PrivateAtomModelExt,com.ibm.data.resolver.OpenSearchPocHandler],{_newAnalyticsTagURI:"at:all",_newIdPrefix:"at:name:",_privacyNodeSelector:".",namespaces:dojo.mixin({},com.ibm.data.resolver.OpenSearchPocHandler.prototype.namespaces,com.ibm.data.resolver.ResolverQueryRules.namespaces),_createTemplates:function(){var _2c7=[];for(var _2c8 in this.namespaces){_2c7.push("xmlns:",_2c8,"=\"",this.namespaces[_2c8],"\" ");}this._nsDeclString=_2c7.join("");dojo.mixin(this,{analyticsTagTemplate:{templateString:""+""+"IBM WebSphere Portal Model Feed"+""+""+"${name}"+"${id}"+""+""+""+""+""+""+""+"",templateProps:{id:"",title:"",name:"",value:"",resourceURI:""}}});},_serializeSaveData:function(item){return ""+""+"WebSphere Portal Server Analytics Tag Feed"+"at:all"+""+com.ibm.domUtilities.stringFromDoc(item.data)+"";},getTemplate:function(args,_2c9){return this.analyticsTagTemplate;},getSaveQuery:function(item){var q=this.inherited(arguments);if(this.resolver.isCreated(item)){q.update="delete";q.rep="empty";}else{q.uri=this._newAnalyticsTagURI;}return q;}});(function(){var r=com.ibm.data.resolver,_2ca=r.ATPocHandler,prot=_2ca.prototype,def=prot.definition,_2cb=r.ResolverQueryRules.atom;def=dojo.mixin({},def,{scheme:"at"});prot.definition=def;dojo.extend(_2ca,{queryRules:dojo.mixin({},r.OpenSearchPocHandler.prototype.queryRules,_2cb.uniqueNameExt,_2cb.L10nExt,_2cb.modelExt,_2cb.atExt)});com.ibm.data.Resolver.register(def.scheme,_2ca);})();}if(!dojo._hasResource["com.ibm.strategy.Strategy"]){dojo._hasResource["com.ibm.strategy.Strategy"]=true;dojo.provide("com.ibm.strategy.Strategy");dojo.require("dojox.lang.aspect");dojo.declare("com.ibm.strategy.Strategy",null,{extensions:[],extensionsMap:{},strategyInit:function(obj){},getStrategyContext:function(){return dojox.lang.aspect.getContext();},around:function(){var _2cc=this.getStrategyContext().joinPoint.targetName;if(this.extensionsMap[_2cc]){return this[this.extensionsMap[_2cc]].apply(this,arguments);}else{if(this[_2cc]){return this[_2cc].apply(this,arguments);}else{return this.proceed(arguments);}}},proceed:function(args){return dojox.lang.aspect.proceed.apply(null,args);}});com.ibm.strategy.Strategy.applyStrategy=function(obj,_2cd){_2cd.strategyInit(obj);var adv=dojox.lang.aspect.advise(obj,_2cd.extensions,_2cd);return adv;};com.ibm.strategy.Strategy.removeStrategy=function(adv){dojox.lang.aspect.unadvise(adv);};}if(!dojo._hasResource["com.ibm.data.resolver.strategy.PocHandlerStrategy"]){dojo._hasResource["com.ibm.data.resolver.strategy.PocHandlerStrategy"]=true;dojo.provide("com.ibm.data.resolver.strategy.PocHandlerStrategy");dojo.declare("com.ibm.data.resolver.strategy.PocHandlerStrategy",com.ibm.strategy.Strategy,{handler:null,around:function(){this.handler=this.getStrategyContext().instance;var ret=this.inherited(arguments);this.handler=this.getStrategyContext().instance;return ret;}});}if(!dojo._hasResource["com.ibm.data.resolver.strategy.UpdateStrategy"]){dojo._hasResource["com.ibm.data.resolver.strategy.UpdateStrategy"]=true;dojo.provide("com.ibm.data.resolver.strategy.UpdateStrategy");dojo.declare("com.ibm.data.resolver.strategy.UpdateStrategy",com.ibm.data.resolver.strategy.PocHandlerStrategy,{extensions:["setValue","setValues"],extensionsMap:{"setValue":"_setValue","setValues":"_setValue"},_setValue:function(item,_2ce,_2cf){return this.proceed(arguments);}});}if(!dojo._hasResource["com.ibm.data.resolver.tree.TreeModeledHandler"]){dojo._hasResource["com.ibm.data.resolver.tree.TreeModeledHandler"]=true;dojo.provide("com.ibm.data.resolver.tree.TreeModeledHandler");dojo.declare("com.ibm.data.resolver.tree.TreeModeledHandler",null,{parentMgmtStrategy:"com.ibm.data.resolver.tree.ParentDependencyStrategy",siblingMgmtStrategy:"com.ibm.data.resolver.tree.SiblingDependencyStrategy",cacheContext:"_cachedMeta",childrenCacheKey:"children",constructor:function(){this.customAttributes=dojo.mixin({},this.customAttributes,{mayHaveChildren:{get:function(item,_2d0){var _2d1=item[this.cacheContext][this.childrenCacheKey];if(_2d1&&_2d1.loaded){return _2d1.length>0;}if(item[this.cacheContext].mayHaveChildren==true){return true;}return this.getValue(item,"childrenURI")!=null;},set:function(item,_2d2,_2d3){if(_2d2===1){item[this.cacheContext].mayHaveChildren=true;}return false;}},children:{get:function(item,_2d4){if(!item._cachedMeta.childrenLoader){var _2d5=this.getChildrenQuery(item);item._cachedMeta.childrenLoader=new com.ibm.data.ItemsLoader({store:this.resolver,query:_2d5,fetchOnReload:true,cacheContext:item[this.cacheContext],cacheProperty:this.childrenCacheKey,filter:dojo.hitch(this,"filterChildren",item)});}return _2d4?[item._cachedMeta.childrenLoader]:item._cachedMeta.childrenLoader;},set:function(item,_2d6,_2d7){if(dojo.isArray(_2d6)&&_2d7&&_2d6.preloaded){item[this.cacheContext][this.childrenCacheKey]=_2d6.slice();}return false;}},treeModel:{get:function(item,_2d8){if(!item._cachedMeta.treeModel){item._cachedMeta.treeModel=new com.ibm.data.resolver.tree.PocTreeModel({root:item,handler:this,resolver:this.resolver});}return _2d8?[item._cachedMeta.treeModel]:item._cachedMeta.treeModel;},set:function(item,_2d9,_2da){return false;}}});com.ibm.strategy.Strategy.applyStrategy(this,new (dojo.getObject(this.parentMgmtStrategy))());com.ibm.strategy.Strategy.applyStrategy(this,new (dojo.getObject(this.siblingMgmtStrategy))());},updateReferences:function(item){this.inherited(arguments);var _2db=this.getValue(item,"parentId");if(_2db){var _2dc=this.resolver.byId(_2db);if(_2dc){this.setValue(item,"parentId",this.resolver.getIdentity(_2dc));}}},modifyChildren:function(_2dd){_2dd._lastModified=(new Date()).getTime();},getChildrenQuery:function(item){return this.getValue(item,"childrenURI",{uri:this.getIdentity(item),levels:2,mode:"download"});},filterChildren:function(_2de,_2df){var id=this.getIdentity(_2de);_2df=dojo.filter(_2df,function(item){return id==this.resolver.getValue(item,"parentId");},this);_2df.loaded=true;return _2df;}});dojo.declare("com.ibm.data.resolver.tree.ParentDependencyStrategy",com.ibm.data.resolver.strategy.UpdateStrategy,{extensions:com.ibm.data.resolver.strategy.UpdateStrategy.prototype.extensions.concat(["processFetch","newItem","createStub"]),extensionsMap:dojo.mixin({},com.ibm.data.resolver.strategy.UpdateStrategy.prototype.extensionsMap,{"newItem":"updateNewItem","createStub":"updateNewItem"}),_setValue:function(item,_2e0,_2e1){var _2e2=false;if(_2e0=="parent"||_2e0=="parentId"||_2e0=="parentURI"){var _2e3=this.getStrategyContext().joinPoint.targetName=="setValues";var _2e4=this.handler[_2e3?"getValues":"getValue"](item,_2e0),_2e5=_2e1;_2e2=this.proceed(arguments);if(_2e2){if(_2e3){_2e4=_2e4?_2e4[0]:null;_2e5=_2e5?_2e5[0]:null;}if(_2e0=="parent"){if(_2e4){_2e4=this.handler.getIdentity(_2e4);}if(_2e5){_2e5=this.handler.getIdentity(_2e5);}}this._changeDependencies(item,this.handler.getIdentity(item),_2e5,_2e4);}}else{_2e2=this.proceed(arguments);}return _2e2;},_checkAndUpdateDependencies:function(item){var pId=this.handler.getValue(item,"parentId");if(pId){this._changeDependencies(item,this.handler.getIdentity(item),pId);}},updateNewItem:function(){var item=this.proceed(arguments);this._checkAndUpdateDependencies(item);return item;},processFetch:function(){var map=this.proceed(arguments);dojo.forEach(map.items,function(item){this._checkAndUpdateDependencies(item);},this);return map;},_changeDependencies:function(_2e6,_2e7,_2e8,_2e9){if(_2e9==_2e8){return;}if(_2e9){this.handler.depMgr.removeDependency(_2e9,_2e7,com.ibm.data.DependencyManager.types["delete"]);this.handler.depMgr.removeDependency(_2e7,_2e9,com.ibm.data.DependencyManager.types["create"]);}if(_2e8){this.handler.depMgr.addDependency(_2e8,_2e7,com.ibm.data.DependencyManager.types["delete"]);this.handler.depMgr.addDependency(_2e7,_2e8,com.ibm.data.DependencyManager.types["create"]);}}});dojo.declare("com.ibm.data.resolver.tree.AtomParentDependencyStrategy",com.ibm.data.resolver.tree.ParentDependencyStrategy,{cdepType:com.ibm.data.DependencyManager.types["create"],_changeDependencies:function(_2ea,_2eb,_2ec,_2ed){this.inherited(arguments);var _2ee=this.handler.depMgr.getSourcesByType(_2ed,this.cdepType);var _2ef=this.handler.getValue(_2ea,"nextId")||null;dojo.forEach(_2ee,function(_2f0){if(this.handler.resolver._getHandlerByUri(_2f0)==this.handler){var item=this.handler.resolver.byId(_2f0);if(this.handler.getValue(item,"nextId")==_2eb){this.handler._setValue(item,"nextId",_2ef);}}},this);}});dojo.declare("com.ibm.data.resolver.tree.SiblingDependencyStrategy",com.ibm.data.resolver.strategy.UpdateStrategy,{extensions:com.ibm.data.resolver.strategy.UpdateStrategy.prototype.extensions.concat(["processSave","unsetAttribute"]),blocked:false,odepType:com.ibm.data.DependencyManager.types["order"],cdepType:com.ibm.data.DependencyManager.types["create"],processSave:function(item){this.blocked=true;this.handler.setValue(item,"nextId",this._getEffectiveNextId(item));this.blocked=false;return this.proceed(arguments);},_getEffectiveNextId:function(item){if(!item){return null;}var next=this.handler.getValue(item,"next");if(next){if(!this.handler.resolver.isCreated(next)||this._isPendingPosition(next)){return this._getEffectiveNextId(next);}else{return this.handler.getIdentity(next);}}else{return null;}},_isPendingPosition:function(item){return dojo.some(item._writeLog,function(op){switch(op.attribute){case "next":case "nextId":case "parent":case "parentId":return true;default:return false;}},this);},unsetAttribute:function(item,_2f1){var _2f2=this.handler.getValue(item,_2f1);if(_2f1=="next"){if(_2f2){_2f2=this.handler.getIdentity(_2f2);}}var _2f3=this.proceed(arguments);if(_2f3){this._changeDependencies(item,this.handler.getIdentity(item),null,_2f2);}},_setValue:function(item,_2f4,_2f5){var _2f6=false;if(!this.blocked&&(_2f4=="next"||_2f4=="nextId")){var _2f7=this.getStrategyContext().joinPoint.targetName=="setValues";var _2f8=this.handler[_2f7?"getValues":"getValue"](item,_2f4),_2f9=_2f5;_2f6=this.proceed(arguments);if(_2f6){if(_2f7){_2f8=_2f8?_2f8[0]:null;_2f9=_2f9?_2f9[0]:null;}if(_2f4=="next"){if(_2f8){_2f8=this.handler.getIdentity(_2f8);}if(_2f9){_2f9=this.handler.getIdentity(_2f9);}}this._changeDependencies(item,this.handler.getIdentity(item),_2f9,_2f8);}}else{_2f6=this.proceed(arguments);}return _2f6;},_changeDependencies:function(item,id,_2fa,_2fb){if(_2fb==_2fa){return;}this._remove(id);this._insert(id,_2fa);},_remove:function(id){var _2fc=this.handler.depMgr.getTargetsByType(id,this.odepType);var _2fd=this.handler.depMgr.getSourcesByType(id,this.odepType);dojo.forEach(_2fc,function(_2fe){dojo.forEach(_2fd,function(_2ff){this.handler.depMgr.addDependency(_2ff,_2fe,this.odepType);},this);this.handler.depMgr.removeDependency(id,_2fe,this.odepType);},this);dojo.forEach(_2fd,function(_300){this.handler.depMgr.removeDependency(_300,id,this.odepType);},this);},_insert:function(id,_301){if(!_301){var _302=this.handler.depMgr.getSourcesByType(this.handler.getValue(this.handler.resolver.byId(id),"parentId"),this.cdepType);dojo.forEach(_302,function(_303){if(_303!=id&&this.handler.resolver._getHandlerByUri(_303)==this.handler){var item=this.handler.resolver.byId(_303);if(!this.handler.getValue(item,"nextId")){this.handler.depMgr.addDependency(id,_303,this.odepType);}}},this);}else{var _304=this.handler.depMgr.getTargetsByType(_301,this.odepType);dojo.forEach(_304,function(_305){this.handler.depMgr.removeDependency(_301,_305,this.odepType);this.handler.depMgr.addDependency(id,_305,this.odepType);},this);this.handler.depMgr.addDependency(_301,id,this.odepType);}}});dojo.declare("com.ibm.data.resolver.tree.AtomSiblingDependencyStrategy",com.ibm.data.resolver.tree.SiblingDependencyStrategy,{_changeDependencies:function(item,id,_306,_307){this.inherited(arguments);this.blocked=true;_307=_307||null;var _308=this.handler.depMgr.getSourcesByType(this.handler.getValue(item,"parentId"),this.cdepType);dojo.forEach(_308,function(_309){if(this.handler.resolver._getHandlerByUri(_309)==this.handler){var item=this.handler.resolver.byId(_309);if(this.handler.getValue(item,"nextId")==id){this.handler._setValue(item,"nextId",_307);}}},this);this.blocked=false;}});dojo.declare("com.ibm.data.resolver.tree.AtomModelTreeStrategy",com.ibm.data.resolver.strategy.UpdateStrategy,{extensions:com.ibm.data.resolver.strategy.UpdateStrategy.prototype.extensions.concat(["processFetch","processSave"]),_setValue:function(item,_30a,_30b){var _30c=false;switch(_30a){case "next":case "nextId":if(!_30b){_30c=this.handler.unsetAttribute(item,_30a);}else{_30c=this.proceed(arguments);}if(_30c){var _30d=this.handler.getValue(item,"parentId");if(_30d){this.handler.setValue(item,"parentId",_30d);}}break;default:_30c=this.proceed(arguments);}return _30c;},processChildren:function(map,_30e,_30f){if(_30e>1||_30e=="all"){var _310={};dojo.forEach(map.items,function(item){var id=this.handler.getIdentity(item),_311;_310[id]={item:item};if(id!=_30f){_311=this.handler.getValue(item,"parentId");if(_310[_311]){_310[id].level=_310[_311].level+1;if(_310[_311].children){_310[_311].children.push(item);}}}else{_310[id].level=1;}if(_30e=="all"||_310[id].level<_30e){if(!item._cachedMeta.children){_310[id].children=item._cachedMeta.children=[];}item._cachedMeta.children.loaded=true;}},this);}},processFetch:function(_312,_313){var map=this.proceed(arguments);var _314=_313.query.levels;if(dojo.isString(_314)){_314=_314.toLowerCase();}this.processChildren(map,_314,_313.query.uri);return map;},processSave:function(item){var _315=dojo.some(item._writeLog,function(op){switch(op.attribute){case "next":case "nextId":case "parent":case "parentId":return true;default:return false;}},this);var ret=this.proceed(arguments);if(!_315){this.handler.engine.select(this.handler.queryRules.parentId.selector+" | "+this.handler.queryRules.nextId.selector,item.data).destroy();ret.data=this.handler._serializeSaveData(item);}return ret;}});}if(!dojo._hasResource["com.ibm.data.resolver.tree.PocTreeModel"]){dojo._hasResource["com.ibm.data.resolver.tree.PocTreeModel"]=true;dojo.provide("com.ibm.data.resolver.tree.PocTreeModel");dojo.declare("com.ibm.data.resolver.tree.PocTreeModel",null,{root:null,resolver:null,handler:null,deferWrites:true,listening:true,constructor:function(args){dojo.mixin(this,args);this._dirtyItems={};this._allItems={};this._ancLoaders={};if(this.root){this._allItems[this.getIdentity(this.root)]=this.root;}this._connections=[].concat([dojo.connect(this.resolver,"onNew",this,"_onNew"),dojo.connect(this.resolver,"onSet",this,"_onSet"),dojo.connect(this.resolver,"onDelete",this,"_onDelete")]);if(dojo.isIE){dojo.addOnWindowUnload(dojo.hitch(this,function(){this.destroy();}));}},assertRelevance:function(item){if(!this.inModel(item)){throw new Error(this.resolver.fmt("errorNotInModel"));}},destroy:function(){dojo.forEach(this._connections,dojo.disconnect);delete this._connections;delete this._allItems;delete this._dirtyItems;delete this._ancLoaders;delete this.root;},getRoot:function(_316,_317){if(this.store.isItemLoaded(this.root)){_316(this.root);}else{this.store.loadItem({item:this.root,onItem:_316,onError:_317});}},mayHaveChildren:function(item){return this.handler.getValue(item,"mayHaveChildren");},getChildren:function(_318,_319,_31a){this.handler.getValue(_318,"children").addOnLoad(dojo.hitch(this,function(_31b){dojo.forEach(_31b,function(item){this._allItems[this.getIdentity(item)]=item;},this);if(_319){_319(this.filterChildren(_318,_31b.slice()));}})).addOnError(dojo.hitch(this,function(_31c){if(_31a){_31a(_31c);}}));},filterChildren:function(_31d,_31e){return _31e;},getIdentity:function(item){return this.handler.getIdentity(item);},getLabel:function(item){return this.handler.getLabel(item);},getAncestors:function(item,_31f,_320){this.assertRelevance(item);var id=this.getIdentity(item);if(this._ancLoaders[id]){this._ancLoaders[id].addOnLoad(_31f).addOnError(_320);}else{var _321=null,_322=true,_323=[];while(this.resolver.isItemLoaded(item)){this._allItems[this.getIdentity(item)]=item;_323.push(item);_321=this.getParent(item);if(!_321){break;}item=_321;_322=false;}if(!_321&&_31f&&!_322){_31f(_323);}else{this._ancLoaders[id]=(new com.ibm.data.ItemsLoader({store:this.resolver,query:this.getAncestorQuery(item),filter:function(_324){return _323.concat(_324);}})).addOnResult(dojo.hitch(this,function(_325){delete this._ancLoaders[id];dojo.forEach(_325,function(item){this._allItems[this.getIdentity(item)]=item;},this);})).addOnLoad(_31f).addOnError(_320);}}},getAncestorQuery:function(item){return {uri:this.getIdentity(item),levels:"-all"};},getParent:function(item){return this.handler.getValue(item,"parent");},newItem:function(args,_326){var _327={parent:_326,attribute:"parent"};var item=this.store.newItem(args,_327);this.store.save({onComplete:args.onComplete,onError:args.onError,scope:args.scope});return item;},isCreated:function(item){return this.resolver.isCreated(item);},addOnCreate:function(item,_328){return this.resolver.addOnCreate(item,_328);},pasteItem:function(_329,_32a,_32b,_32c,pos){var chId=this.getIdentity(_329),_32d=this.getIdentity(_32a),_32e=this.getIdentity(_32b),_32f=this.listening;if(chId==_32e){return;}else{this._dirtyItems[chId]=_329;if(_32d!=_32e){this.listening=false;this.resolver.setValue(_329,"parentId",_32e);this.listening=_32f;}this.getChildren(_32b,dojo.hitch(this,function(_330){this.listening=false;var _331=null;if(pos!=null){if(typeof (pos)=="number"){if(_330.length=_334.length){_334.push(item);}else{_334.splice(pos,0,item);}this.handler.modifyChildren(_334);return true;},_removeChildItem:function(_335,item){var _336=_335._cachedMeta.children;if(!_336||!_336.loaded){return false;}var id=this.getIdentity(item);for(var i=0;i<_336.length;i++){if(this.getIdentity(_336[i])==id){_336.splice(i,1);break;}}this.handler.modifyChildren(_336);return true;},inModel:function(obj){return true;},loadedInModel:function(obj){if(!dojo.isString(obj)){obj=this.getIdentity(obj);}return !!this._allItems[obj];},_onNew:function(_337,_338){if(!this.listening||!_338||!_338.item){return;}if(this.handler!=this.resolver._getHandlerByItem(_337)){return;}var _339=_338.item;if(this.loadedInModel(_339)){this._dirtyItems[this.handler.getIdentity(_337)]=_337;var _33a=this.handler.getValue(_337,"next");this._insertChildItem(_339,_337,_33a);this.onTreeChange(_337,null,_339,_33a);this.getChildren(_339,dojo.hitch(this,"onChildrenChange",_339));}},_onDelete:function(_33b){if(!this.listening){return;}if(this.loadedInModel(_33b)){this._dirtyItems[this.handler.getIdentity(_33b)]=_33b;var _33c=this.getParent(_33b);this._removeChildItem(_33c,_33b);this.onTreeChange(_33b,_33c);this.onDelete(_33b);}},_onSet:function(item,_33d,_33e,_33f){if(!this.listening){return;}if(this.loadedInModel(item)){switch(_33d){case "parentId":_33f=this.resolver.byId(_33f);case "parent":this.pasteItem(item,this.handler.getValue("parent"),_33f,false,this.handler.getValue("next"));break;case "nextId":_33f=this.resolver.byId(_33f);case "next":var _340=this.handler.getValue("parent");this.pasteItem(item,_340,_340,false,_33f);break;default:this.onChange(item);}}},onDelete:function(item){},onChange:function(item){},onChildrenChange:function(_341,_342){},onTreeChange:function(_343,_344,_345,_346){},toString:function(){return "[PocTreeModel of {"+this.handler+"}]";}});}if(!dojo._hasResource["com.ibm.data.resolver.tree.PocGlobalTreeModel"]){dojo._hasResource["com.ibm.data.resolver.tree.PocGlobalTreeModel"]=true;dojo.provide("com.ibm.data.resolver.tree.PocGlobalTreeModel");dojo.declare("com.ibm.data.resolver.tree.PocGlobalTreeModel",com.ibm.data.resolver.tree.PocTreeModel,{scheme:"",refItem:null,getRoot:function(_347,_348){if(this.root){_347(this.root);}else{this.getAncestors(this.refItem,dojo.hitch(this,function(_349){if(!this.root){this.root=_349[_349.length-1];this._allItems[this.getIdentity(this.root)]=this.root;}if(_347){_347(this.root);}}),_348);}}});}if(!dojo._hasResource["com.ibm.data.resolver.NMPocHandler"]){dojo._hasResource["com.ibm.data.resolver.NMPocHandler"]=true;dojo.provide("com.ibm.data.resolver.NMPocHandler");dojo.declare("com.ibm.data.resolver.NMPocHandler",[com.ibm.data.resolver.OpenSearchPocHandler,com.ibm.data.resolver.tree.TreeModeledHandler],{category:"navigation",_globalTreeModel:null,parentMgmtStrategy:"com.ibm.data.resolver.tree.AtomParentDependencyStrategy",siblingMgmtStrategy:"com.ibm.data.resolver.tree.AtomSiblingDependencyStrategy",namespaces:dojo.mixin({},com.ibm.data.resolver.OpenSearchPocHandler.prototype.namespaces,com.ibm.data.resolver.ResolverQueryRules.namespaces),constructor:function(){this.customAttributes.treeModel.get=function(item,_34a){if(!this._globalTreeModel){this._globalTreeModel=new com.ibm.data.resolver.tree.PocGlobalTreeModel({refItem:item,handler:this,resolver:this.resolver,scheme:this.definition.scheme});}return _34a?[this._globalTreeModel]:this._globalTreeModel;};com.ibm.strategy.Strategy.applyStrategy(this,new com.ibm.data.resolver.tree.AtomModelTreeStrategy());},_createTemplates:function(){var _34b=[];for(var _34c in this.namespaces){_34b.push("xmlns:",_34c,"=\"",this.namespaces[_34c],"\" ");}dojo.mixin(this,{nodeTemplate:{templateString:""+""+""+"IBM WebSphere Portal/6.1"+""+"IBM WebSphere Portal Model Feed"+""+""+"${title}"+"${id}"+""+""+""+"${title}"+""+""+""+""+"",templateProps:{id:"",title:"",locale:dojo.local}}});},getSaveQuery:function(item){var q=this.inherited(arguments);if(this.resolver.isCreated(item)){q.rep="empty";}else{q.uri=this.getValue(item,"parentId");}return q;},fillInProperties:function(_34d,_34e,_34f,_350){if(_34f.metadata){for(var key in _34f.metadata){_34f["metadata["+key+"]$"]=_34f.metadata[key];}delete _34f.metadata;}if(_34f.friendlyName){_34f["metadata[com.ibm.portal.friendly.name]$"]=_34f.friendlyName;delete _34f.friendlyName;}return this.inherited(arguments);},getTemplate:function(args,_351){return this.nodeTemplate;},instantiateTemplate:function(_352,args,_353){var _354=this.inherited(arguments);if(!args.parentId){this.engine.select("./thr:in-reply-to",_354).destroy();}return _354;},_makeModifiable:function(item){this.engine.select("atom:content/*/* | thr:in-reply-to | atom:link",item.data).destroy();this.inherited(arguments);}});(function(){var r=com.ibm.data.resolver,_355=r.NMPocHandler,prot=_355.prototype,def=prot.definition,_356=r.ResolverQueryRules.atom;def=dojo.mixin({},def,{scheme:"nm"});def.features=dojo.mixin({},def.features,{"TreeModeled":true});prot.definition=def;dojo.extend(_355,{queryRules:dojo.mixin({},r.OpenSearchPocHandler.prototype.queryRules,_356.threadExt,_356.treeExt,_356.uniqueNameExt,_356.L10nExt,_356.acExt,_356.modelExt,_356.operationsExt,_356.contentExt,_356.metaExt,{contentNode:{selector:"./atom:link[@ext:class='content-node']",field:"@ext:uri",type:"Item"},contentNodeId:{selector:"./atom:link[@ext:class='content-node']",field:"@ext:uri"},contentNodeType:{selector:"./atom:link[@ext:class='content-node']",field:"@ext:rel"}})});var _357=function(data,rule,_358){var _359={"ext:class":"content-node","type":"application/atom+xml"};_359[rule.field.substr(1)]=_358;this.createFromJson(data,{name:"atom:link",attributes:_359});return true;};prot.queryRules.contentNode.setter=_357;prot.queryRules.contentNodeId.setter=_357;prot.queryRules.contentNodeType.setter=_357;com.ibm.data.Resolver.register(def.scheme,_355);})();}if(!dojo._hasResource["com.ibm.data.resolver.strategy.AspectsStrategy"]){dojo._hasResource["com.ibm.data.resolver.strategy.AspectsStrategy"]=true;dojo.provide("com.ibm.data.resolver.strategy.AspectsStrategy");dojo.declare("com.ibm.data.resolver.strategy.AspectsStrategy",com.ibm.data.resolver.strategy.PocHandlerStrategy,{extensions:["modifyFetchQuery"],constructor:function(_35a){this._aspects=_35a||[];},modifyFetchQuery:function(_35b){if(!_35b.aspect){_35b.aspect=[];}_35b.aspect=_35b.aspect.concat(this._aspects);return this.proceed(arguments);}});}if(!dojo._hasResource["com.ibm.data.resolver.strategy.MetadataStrategy"]){dojo._hasResource["com.ibm.data.resolver.strategy.MetadataStrategy"]=true;dojo.provide("com.ibm.data.resolver.strategy.MetadataStrategy");dojo.declare("com.ibm.data.resolver.strategy.MetadataStrategy",com.ibm.data.resolver.strategy.PocHandlerStrategy,{extensions:["modifyFetchQuery"],constructor:function(keys){this._keys=keys||[];},modifyFetchQuery:function(_35c){if(!_35c.mdname){_35c.mdname=[];}else{if(!dojo.isArray(_35c.mdname)){_35c.mdname=[_35c.mdname];}}_35c.mdname=_35c.mdname.concat(this._keys);return this.proceed(arguments);}});}(function(){ibmPortalConfig.resolver=com.ibm.data.Resolver.getStore({url:ibmPortalConfig.contentHandlerURI,namespaces:{"ext":"http://www.ibm.com/xmlns/prod/websphere/portal/v6.0.1/portal-model","creationcontext":"http://www.ibm.com/xmlns/prod/websphere/portal/v6.1.0/portal-creation-context","base":"http://www.ibm.com/xmlns/prod/websphere/portal/v6.0/ibm-portal-composite-base","model":"http://www.ibm.com/xmlns/prod/websphere/portal/v6.0.1/portal-model-elements"},tunnel:ibmConfig["tunnel.mode"],isAuthenticated:!ibmConfig.anonymousUser});})(); (function(){ // register module paths to enabler and builder ibmConfig = ibmCfg.enablerConfig; dojo.registerModulePath("com.ibm.mm", ibmCfg.enablerConfig["com.ibm.mashups.contextroot.enabler"] + "/js/com/ibm/mm"); dojo.registerModulePath("com.ibm.mashups", ibmCfg.enablerConfig["com.ibm.mashups.contextroot.enabler"] + "/js/com/ibm/mashups"); dojo.registerModulePath("com.ibm.mm.builder", ibmCfg.enablerConfig["com.ibm.mashups.contextroot.builder"] + "/js/com/ibm/mm/builder"); dojo.registerModulePath("com.ibm.mashups.builder", ibmCfg.enablerConfig["com.ibm.mashups.contextroot.builder"] + "/js/com/ibm/mashups/builder"); })();/** Licensed Materials - Property of IBM, 5724-U69, (C) Copyright IBM Corp. 2008, 2010 - All Rights reserved. **/ dojo.provide("com.ibm.mm.enabler.extreg");if(typeof (ExtensionRegistry)=="undefined"){this.ExtensionRegistry=function(_1){var _2=window;var _3={root:document.body,enabled:false,_queue:[],debug:function(_4){if(this.enabled){}},log:function(_5){if(this.enabled){}},_flushQueueIfNecessary:function(){var _6=(this._queue.length>0);while(this._queue.length>0){this.root.appendChild(this._queue.shift());}if(_6){this.log("----------------- END STMTS EXECUTED BEFORE ONLOAD ---------------");}}};var _7=function(_8){var _9=_8.split(".");var _a=null;var _b=window;var _c=null;for(var i=0;(i<_9.length&&_b);i++){_a=_b;_c=_9[i];_b=_a[_9[i]];}return [{object:_a,method:_c}];};if(!_1){_1=_7;}function forInLoop(_d,_e){for(var _f in _d){if(Object.prototype.hasOwnProperty.call(_d,_f)){_e(_f,_d[_f]);}}};function isArray(obj){return (obj&&obj.length&&typeof (obj.length)=="number");};function applyToObjectOrArray(obj,_10){if(isArray(obj)){for(var i=0;i [ "+arguments+" ]");_3.log("handler to execute: "+_15.toString());_3.debug(_15);_3.log("next function in the chain (executor parameter): "+fn.toString());_3.debug(fn);}var me=this;var _16=_15.call(this,function(_17){return fn.apply(me,_17);},arguments);if(_3.enabled){_3.log("around advice exit ==> "+_16);}return _16;});};ExtensionPointController.prototype.execute=function(_18,_19){if(_3.enabled){_3.log("ExtensionPointController.execute entry ==> [ "+_18+", "+_19+" ] ");_3.debug(_18);_3.debug(_19);}function argumentsToArray(_1a){var arr=[];for(var i=0;i<_1a.length;i++){arr.push(_1a[i]);}return arr;};var _1b=null;if(_3.enabled){_3.log("Executing extensions for \""+this.name+"\"...");}var _1c=this.extensions;var _1d=this.fnDescriptor;function doExecution(_1e){if(_3.enabled){_3.log("doExecution entry ==> "+_1e);_3.debug(_1e);}if(_1e){_1e=argumentsToArray(_1e);}var _1f=null;var _20=_1d.getMethod();_1d.revert();var _21=_1c.before;if(_3.enabled){_3.log("Executing "+_21.length+" before advice extensions.");}for(var i=0;i<_21.length;i++){if(_3.enabled){_3.log("beforeAdvice["+i+"] = "+_21[i].toString());_3.debug(_21[i]);}_1e=_21[i].call(this,_1e);}if(_3.enabled){_3.log("Executing the original function: "+_1d.getMethod().toString());}_1f=_1d.getMethod().apply(this,_1e);var _22=_1c.after;if(_3.enabled){_3.log("Executing "+_22.length+" after advice extensions.");}if(_1e){for(var j=0;j<_22.length;j++){if(_3.enabled){_3.log("afterAdvice["+j+"] = "+_22[j].toString());_3.debug(_22[j]);_3.log("Return value: "+_1f);_3.debug(_1f);}_1f=_22[j].call(this,_1f,_1e);}}_1d.setMethod(_20);if(_3.enabled){_3.log("doExecution exit ==> "+_1f);}return _1f;};_1b=doExecution.apply(_18,[_19]);if(_3.enabled){_3.log("ExtensionPointController.execute exit ==> "+_1b);}return _1b;};if(!ExtensionRegistry.prototype.extensionPointControllers){ExtensionRegistry.prototype.extensionPointControllers={};}function getExtensionPointController(_23,_24){if(_3.enabled){_3.log("ExtensionRegistry.getExtensionPointController entry ==> [ "+_23+", "+_24+" ]");}var _25=ExtensionRegistry.prototype.extensionPointControllers[_23];if(!_25){_25={};ExtensionRegistry.prototype.extensionPointControllers[_23]=_25;}var _26=_25[_24.id];if(!_26){_26=new ExtensionPointController(_23,_24);ExtensionRegistry.prototype.extensionPointControllers[_23][_24.id]=_26;_24.setMethod(function(){if(_3.enabled){_3.log(_23+" entry ==> "+arguments);}var _27=_26.execute(this,arguments);if(_3.enabled){_3.log(_23+" exit ==> "+_27);}return _27;});}if(_3.enabled){_3.log("ExtensionRegistry.getExtensionPointController exit ==> "+_26);}return _26;};function processExtensionDefinition(_28,_29){if(_3.enabled){_3.log("processExtensionDefinition entry ==> [ "+_28+", "+_29+" ]");_3.log("Extension: "+_28+"; extension: { type: \""+_29.type+"\", handler: "+_29.handler+" }");}var _2a=_1(_28);_2a=_2a||null;if(_2a===null){_2a=_7(_28);}if(_3.enabled){_3.log("impls="+_2a);}for(var i=0;i<_2a.length;i++){var _2b=_2a[i];var md=new MethodDescriptor(_2b.object,_2b.method);if(md.originalValue){var _2c=getExtensionPointController(_28,md);if(_3.enabled){_3.log("Extension Point (after mapping function): "+md);}switch(_29.type){case "before":if(_3.enabled){_3.log("wrapping in a before extension");}_2c.extensions.before.push(_29.handler);break;case "after":if(_3.enabled){_3.log("wrapping in an after extension");}_2c.extensions.after.push(_29.handler);break;case "around":if(_3.enabled){_3.log("wrapping in an around extension");}_2c.addAroundAdvice(_29.handler);break;default:if(_3.enabled){_3.log("Unrecognized extension type: "+_29.type);}}}else{if(console&&console.log){console.log("WARNING! \""+_28+"\" does not exist! The provided extension will be ignored!");}}}if(_3.enabled){_3.log("processExtensionDefinition exit");}};function removeExtensionDefinition(_2d){if(_3.enabled){_3.log("removeExtensionDefinition entry ==> [ "+_2d+" ]");}var _2e=ExtensionRegistry.prototype.extensionPointControllers[_2d];forInLoop(_2e,function(_2f,_30){_30.fnDescriptor.revert();});delete ExtensionRegistry.prototype.extensionPointControllers[_2d];if(_3.enabled){_3.log("removeExtensionDefinition exit");}};this.process=function(_31){if(_3.enabled){_3.log("ExtensionRegistry.process entry ==>"+_31);}applyToObjectOrArray(_31,function(_32){forInLoop(_32,function(_33,_34){applyToObjectOrArray(_34,function(obj){processExtensionDefinition(_33,obj);});});});if(_3.enabled){_3.log("ExtensionRegistry.process exit");}};this.disconnect=function(_35){if(_3.enabled){_3.log("ExtensionRegistry.disconnect entry ==>"+_35);}removeExtensionDefinition(_35);if(_3.enabled){_3.log("ExtensionRegistry.disconnect exit");}};this.enableTracking=function(_36){var _37=new ImplementationTracker(true);var _38={"dojo.declare":{type:"before",handler:function(_39){_37.add(_39[0],_39[1]);return _39;}}};this.process(_38);var _3a=function(_3b){return _37.getImpls(_3b);};dojo.addOnLoad(function(){if(_36&&_36.extensions&&_36.extensions.length>0){var _3c={};function forInLoop(obj,_3d){for(var _3e in obj){if(obj.hasOwnProperty(_3e)){_3d(_3e,obj[_3e]);}}};for(var i=0;i<_36.extensions.length;i++){forInLoop(_36.extensions[i],function(_3f,_40){_3c[_3f]=_40;});}var _41=new ExtensionRegistry(_3a);_41.process(_36.extensions);}});};this.disableTracking=function(){this.disconnect("dojo.declare");};};}if(typeof ImplementationTracker=="undefined"){this.ImplementationTracker=function(_42){var _43={enabled:false,log:function(msg){if(this.enabled){}},debug:function(obj){if(this.enabled){}}};function forInLoop(obj,_44){for(var _45 in obj){if(Object.prototype.hasOwnProperty.call(obj,_45)){_44(_45,obj[_45]);}}};function getMethodImpl(_46){var _47=_46.split(".");var _48=null;var _49=window;var _4a=null;for(var i=0,l=_47.length;(i "+[_53,_54]);}if(!_4b[_53]){if(_54&&typeof _54=="function"){_54=[_54];}var _55=new ObjectInfo(_53);_4b[_53]=_55;for(var i=0,l=_54?_54.length:0;i "+_58);}var _59=_58.substring(0,_58.lastIndexOf("."));var _5a=_58.substring(_58.lastIndexOf(".")+1);if(_43.enabled){_43.log("className = "+_59+"; methodName = "+_5a);}var _5b=getMethodImpl(_58);_5b=_5b||null;if(!_4b[_59]||_5b===null){if(_43.enabled){_43.log("ImplementationTracker.getImpls exit ==> null ");}return null;}var _5c=_4b[_59].implementors;if(_43.enabled){_43.log("impls = "+_5c);}var _5d=[];for(var i=0,l=_5c.length;i "+_5d);}return _5d;};};}(function() { var implTracker = new ImplementationTracker(true); var DojoExtensions = { "dojo.declare": { type: "before", handler: function ( fnArgs ) { implTracker.add( fnArgs[0], fnArgs[1] ); return fnArgs; } } }; var registry = new ExtensionRegistry(); registry.process( DojoExtensions ); ibmConfig.mappingFunction = function ( name ) { return implTracker.getImpls( name ); }; })();dojo.provide("com.ibm.mm.enabler.nls.enabler_en");dojo.provide("com.ibm.mm.enabler.nls.modelMessages");com.ibm.mm.enabler.nls.modelMessages._built=true;dojo.provide("com.ibm.mm.enabler.nls.modelMessages.en");com.ibm.mm.enabler.nls.modelMessages.en={"E_COMNODE_NOTFOUND_1":"BMWMF0011E: The following node cannot be found: ${0}.","E_WIDGETDEF_MUST_BE_IDENTIFIABLE_0":"BMWMF0018E: The widget definition cannot be identified.","E_INVALID_PARAM_TYPE_0":"BMWMF0021E: The parameter ${num} is invalid. The value must be of type ${type}.","E_LAYOUTNODE_NEXT_CAN_NOT_BE_ITSELF_0":"BMWMF0027E: The inserted node can not be inserted next to itself.","E_LAYOUTNODE_NOTFOUND_1":"BMWMF0015E: The following layout node cannot be found: ${0}.","E_INVALID_DOCUMENT_0":"BMWMF0022E: The document cannot be null.","E_XHR_REQUEST_FAILED_2":"BMWMF0025E: The server failed to respond to the HTTP request. The request returned with status '${0}' and response data '${1}'.","E_PARAM_ISNULL_0":"BMWMF0014E: The parameter value cannot be null.","E_PARAM_IS_SMALLER_ZERO_0":"BMWMF0016E: Parameter values must be greater than or equal to zero.","E_PARAM_ISNULL_OR_UNDEFINED_3":"BMWMF0024E: The parameter '${0}' in function '${1}.${2}' cannot be null or undefined.","E_INVALID_CONTEXT_MISSING_TYPE_0":"BMWMF0019E: The context must contain a type.","E_INVALID_CONTEXT_SPECIFIED_0":"BMWMF0017E: The widget context is undefined.","E_CATNODE_NOTFOUND_1":"BMWMF0010E: The following catalog entry cannot be found: ${0}.","E_NODE_NOTFOUND_1":"BMWMF0004E: The system cannot find the following node: ${0}.","E_NODE_ISNULL_0":"BMWMF0001E: An error occurred because the node is null.","E_INVALID_XPATH_EXPR_0":"BMWMF0023E: The XPath expression cannot be empty.","E_ELEMENT_NOT_FOUND_2":"BMWMF0013E: Element ${0} cannot be found in ${1}.","E_INVALID_PARAM_COUNT_0":"BMWMF0020E: The number of parameters is not valid.","E_UNSUPPORTED_OP_0":"BMWMF0003E: This operation is not supported.","E_OBJECT_DISPOSED_0":"BMWMF0026E: The object has been disposed.","E_CCATNODE_NOTFOUND_1":"BMWMF0012E: The following catalog category cannot be found: ${0}.","E_WIDGET_NOTFOUND_1":"BMWMF0002E: The following widget could not be loaded: ${0}."};dojo.provide("com.ibm.mm.data.nls.dataTypeStrings");com.ibm.mm.data.nls.dataTypeStrings._built=true;dojo.provide("com.ibm.mm.data.nls.dataTypeStrings.en");com.ibm.mm.data.nls.dataTypeStrings.en={"countrycode":"Country Code","languagecode":"Language Code","date":"Date","boolean":"Boolean","json":"JSON","table":"Table","rss":"RSS","email":"E-mail","image":"Image","any":"Any Data","text":"Text","html":"HTML","modeldata":"Model Data","time":"Time","phone":"Phone","url":"URL","currency":"Currency","address":"Address","postalcode":"Postal Code","xml":"XML","timestamp":"Timestamp","person":"Person","number":"Number","atom":"Atom"};dojo.provide("com.ibm.mm.enabler.nls.iwStr");com.ibm.mm.enabler.nls.iwStr._built=true;dojo.provide("com.ibm.mm.enabler.nls.iwStr.en");com.ibm.mm.enabler.nls.iwStr.en={"I_NO_PREVIEW_SUPPORT_0":"BMWIS0001I: This item does not support preview.","ALL_AUTH":"All Authenticated Users","LOAD":"Loading.....","I_ONEUI_INFORMATION_0":"Information","I_ONEUI_INFORMATION_1":"Information:","WIDGET_NOT_INSTALLED":"Widget Not Available","ERROR":"Error","WARNING":"Warning","ALL_PORTAL":"All Portal Users","ANON":"Anonymous","INFO":"Info","WIDGET_NOT_INSTALLED_SUB":"This widget is not enabled or is not available for use."};dojo.provide("com.ibm.mm.enabler.nls.iwMessages");com.ibm.mm.enabler.nls.iwMessages._built=true;dojo.provide("com.ibm.mm.enabler.nls.iwMessages.en");com.ibm.mm.enabler.nls.iwMessages.en={"E_WIDGET_DISPLAY_FAIL_2":"BMWIW0006E: The widget ${0} cannot display correctly. Error details: ${1}.","W_STANDALONECLASS_MISSING_1":"BMWIW0013W: The widget ${0} is missing the iw-Standalone class.","E_IWIDGETDEF_NOTAVAILABLE_1":"BMWIW0001E: The ${0} widget is unavailable. Check your network connection, or contact your administrator to confirm that the widget is still available on the requested server.","W_API_DEPRECATED_1":"BMWIW0008W: The method used is no longer supported. Use ${0} instead.","E_NODISPLAY_UNSECUREWIDGET_1":"BMWIW0010E: The nontrusted widget ${0} could not be displayed.","E_RESOURCE_LOAD_FAIL_2":"BMWIW0011E: The resource ${0} : ${1} could not be loaded.","E_SUBDOMAIN_NOTAVAILABLE_2":"BMWIW0003E: The nontrusted widget ${0} could not be loaded because the number of subdomains has exceeded its limit of ${1}. Mark another widget on the page as trusted to make another subdomain available.","E_SUBDOMAIN_NOTAVAILABLE1_2":"BMWIW0009E: The nontrusted widget ${0} could not be loaded because the number of subdomains has exceeded its limit of ${1}.","E_WIDGET_EVENT_FAIL_3":"BMWIW0007E: The system is unable to handle event ${0} for widget ${1} . Error details: ${2}.","E_WIDGETS_UNLOAD_FAIL_1":"BMWIW0004E: The widgets did not load correctly because the browser window is not completely refreshed. Error details: ${0}.","W_DEPRECATE_2":"BMWIW0012W: The function: ${0} has been deprecated. Use ${1} instead.","E_WIDGET_UNLOAD_FAIL_2":"BMWIW0005E: The widget ${0} did not load correctly. Error details: ${1}.","E_IWIDGETDEF_CONTENTNOTAVAILABLE_1":"BMWIW0002E: The system is unable to find the content for the following mode: ${0}.","E_WIDGET_INCORRECTCONFIG_1":"BMWIW0014E: The widget ${0} is not configured correctly."};/** Licensed Materials - Property of IBM, 5724-U69, (C) Copyright IBM Corp. 2008, 2010 - All Rights reserved. **/ dojo.provide("com.ibm.mm.enabler.portal");dojo.i18n._preloadLocalizations("com.ibm.mm.enabler.nls.enabler",["ROOT","ar","ca","cs","da","de","de-de","el","en","en-gb","en-us","es","es-es","fi","fi-fi","fr","fr-fr","he","he-il","hr","hu","it","it-it","ja","ja-jp","kk","ko","ko-kr","nb","nl","nl-be","nl-nl","no","pl","pt","pt-br","pt-pt","ro","ro-ro","ru","sk","sl","sv","th","tr","uk","xx","zh","zh-cn","zh-tw"]);(function(){var _1="3.0.0.20131016-1758".split(".");var _2="enabler";var _3="3.0.0.1-CF3";if(_2){_2="_"+_2;}if(_1.length==4){dojo.setObject("com.ibm.mashups.enabler.version",{major:_1[0],minor:_1[1],patch:_1[2],"projectName":_3,"flag":_2,revision:_1[3],toString:function(){return this.major+"."+this.minor+"."+this.patch+(this.flag||"")+" ("+this.revision+")"+(this.projectName?"["+this.projectName+"]":"");}});}})();if(!dojo._hasResource["com.ibm.mashups.enabler.Deferred_API"]){dojo._hasResource["com.ibm.mashups.enabler.Deferred_API"]=true;dojo.provide("com.ibm.mashups.enabler.Deferred_API");dojo.provide("com.ibm.mashups.enabler.Deferred");dojo.declare("com.ibm.mashups.enabler.Deferred",null,{setFinishedCallback:function(_4,_5,_6){},start:function(_7){}});}if(!dojo._hasResource["com.ibm.mashups.enabler.logging.LogLevel"]){dojo._hasResource["com.ibm.mashups.enabler.logging.LogLevel"]=true;dojo.provide("com.ibm.mashups.enabler.logging.LogLevel");dojo.declare("com.ibm.mashups.enabler.logging.LogLevel",null,{TRACE:500,INFO:800,WARNING:900,SEVERE:1000});com.ibm.mashups.enabler.logging.LogLevel=new com.ibm.mashups.enabler.logging.LogLevel();}if(!dojo._hasResource["com.ibm.mashups.enabler.logging.LogHandler"]){dojo._hasResource["com.ibm.mashups.enabler.logging.LogHandler"]=true;dojo.provide("com.ibm.mashups.enabler.logging.LogHandler");dojo.require("com.ibm.mashups.enabler.logging.LogLevel");dojo.declare("com.ibm.mashups.enabler.logging.LogHandler",null,{constructor:function(){},getHandlerID:function(){return null;},getLogLevel:function(){return null;},log:function(_8,_9,_a,_b){}});}if(!dojo._hasResource["com.ibm.mashups.enabler.logging.Logger_API"]){dojo._hasResource["com.ibm.mashups.enabler.logging.Logger_API"]=true;dojo.provide("com.ibm.mashups.enabler.logging.Logger_API");dojo.provide("com.ibm.mashups.enabler.logging.Logger");dojo.require("com.ibm.mashups.enabler.logging.LogLevel");dojo.declare("com.ibm.mashups.enabler.logging.Logger",null,{constructor:function(){},getLogger:function(_c){return null;},addHandler:function(_d){},removeHandler:function(_e){},entering:function(_f,_10){},exiting:function(_11,_12){},info:function(_13,_14,_15){},warning:function(_16,_17,_18){},severe:function(_19,_1a,_1b){},trace:function(_1c,_1d,_1e){},log:function(_1f,_20,_21,_22){},isLoggable:function(_23){return false;}});}if(!dojo._hasResource["com.ibm.mm.enabler.logging.ConsoleHandler"]){dojo._hasResource["com.ibm.mm.enabler.logging.ConsoleHandler"]=true;dojo.provide("com.ibm.mm.enabler.logging.ConsoleHandler");dojo.declare("com.ibm.mm.enabler.logging.ConsoleHandler",[com.ibm.mashups.enabler.logging.LogHandler],{constructor:function(){this.handlerID="com.ibm.mm.enabler.logging.ConsoleHandler";this.logLevel=com.ibm.mashups.enabler.logging.LogLevel.TRACE;},getHandlerID:function(){return this.handlerID;},getLogLevel:function(){return this.logLevel;},log:function(_24,_25,_26,_27){if(_25==com.ibm.mashups.enabler.logging.LogLevel.SEVERE){console.error(_24+" "+_26+": "+_27);}else{if(_25==com.ibm.mashups.enabler.logging.LogLevel.WARNING){console.warn(_24+" "+_26+": "+_27);}else{if(_25==com.ibm.mashups.enabler.logging.LogLevel.INFO){console.info(_24+" "+_26+": "+_27);}else{if(_25==com.ibm.mashups.enabler.logging.LogLevel.TRACE){console.debug(_24+" "+_26+": "+_27);}}}}}});}if(!dojo._hasResource["com.ibm.mm.enabler.logging.LoggerImpl"]){dojo._hasResource["com.ibm.mm.enabler.logging.LoggerImpl"]=true;dojo.provide("com.ibm.mm.enabler.logging.LoggerImpl");dojo.declare("com.ibm.mm.enabler.logging.LoggerImpl",[com.ibm.mashups.enabler.logging.Logger],{BASE_TOPIC:"com.ibm.mm.enabler.logging.",constructor:function(_28,_29){this.loggers={};this.handlers={};this.name=_28?_28:null;this.parentLogger=_29?_29:null;if(!this.parentLogger){if(ibmConfig&&ibmConfig.traceConfig){this._setTraceConfig(ibmConfig.traceConfig);}else{this._setTraceConfig();}}},getLogger:function(_2a){if(this.parentLogger){return this.parentLogger.getLogger(_2a);}if(!this.loggers[_2a]){this.loggers[_2a]=new com.ibm.mm.enabler.logging.LoggerImpl(_2a,this);}return this.loggers[_2a];},addHandler:function(_2b){if(this.parentLogger){return this.parentLogger.addHandler(_2b);}this.handlers[_2b.handlerID]={};var _2c=this.handlers[_2b.handlerID];_2c.handler=_2b;var _2d=_2b.getLogLevel();var _2e="log";_2c.severeHandle=dojo.subscribe(this.BASE_TOPIC+com.ibm.mashups.enabler.logging.LogLevel.SEVERE,_2b,_2e);if(_2d<=com.ibm.mashups.enabler.logging.LogLevel.WARNING){_2c.warningHandle=dojo.subscribe(this.BASE_TOPIC+com.ibm.mashups.enabler.logging.LogLevel.WARNING,_2b,_2e);}if(_2d<=com.ibm.mashups.enabler.logging.LogLevel.INFO){_2c.infoHandle=dojo.subscribe(this.BASE_TOPIC+com.ibm.mashups.enabler.logging.LogLevel.INFO,_2b,_2e);}if(_2d<=com.ibm.mashups.enabler.logging.LogLevel.TRACE){_2c.traceHandle=dojo.subscribe(this.BASE_TOPIC+com.ibm.mashups.enabler.logging.LogLevel.TRACE,_2b,_2e);}},removeHandler:function(_2f){var _30;var _31;if(dojo.isString(_2f)){if(!_2f in this.handlers){return;}_30=this.handlers[_2f];_31=_2f;}else{if(dojo.isObject(_2f)){_30=this.handlers[_2f.getHandlerID()];_31=_2f.getHandlerID();}else{return;}}if(_30){if(_30.severeHandle){dojo.unsubscribe(_30.severeHandle);}if(_30.warningHandle){dojo.unsubscribe(_30.warningHandle);}if(_30.infoHandle){dojo.unsubscribe(_30.infoHandle);}if(_30.traceHandle){dojo.unsubscribe(_30.traceHandle);}if(_30.handler){delete _30.handler;}}delete this.handlers[_31];},entering:function(_32,_33){var _34=com.ibm.mashups.enabler.logging.LogLevel.TRACE;if(this.isLoggable(_34)){var msg=this._getMessageString(_33);this._log(this.name,_34,_32,"ENTRY"+(msg?" "+msg:""));}},exiting:function(_35,_36){var _37=com.ibm.mashups.enabler.logging.LogLevel.TRACE;if(this.isLoggable(_37)){var msg=this._getMessageString(_36);this._log(this.name,_37,_35,"RETURN"+(msg?" "+msg:""));}},info:function(_38,_39,_3a){var _3b=com.ibm.mashups.enabler.logging.LogLevel.INFO;this.log(_3b,_38,_39,_3a);},warning:function(_3c,_3d,_3e){var _3f=com.ibm.mashups.enabler.logging.LogLevel.WARNING;this.log(_3f,_3c,_3d,_3e);},severe:function(_40,_41,_42){var _43=com.ibm.mashups.enabler.logging.LogLevel.SEVERE;this.log(_43,_40,_41,_42);},trace:function(_44,_45,_46){var _47=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.log(_47,_44,_45,_46);},log:function(_48,_49,_4a,_4b){if(!this.parentLogger){this._log("com.ibm.mashups.enabler.logging.Logger",com.ibm.mashups.enabler.logging.LogLevel.WARNING,"{log|info|warning|severe|trace|entering|exiting}","You must not use the RootLogger (com.ibm.mashups.enabler.logging.Logger). Create your own logger for each class.");}if(this.isLoggable(_48)){this._log(this.name,_48,_49,_4a,_4b);}},isLoggable:function(_4c){if(_4c!=com.ibm.mashups.enabler.logging.LogLevel.TRACE){return true;}if(!(ibmConfig&&ibmConfig.isDebug)){return false;}var _4d=this._getRegExp();if(_4d&&_4d.exec(this.name)){return true;}return false;},_log:function(_4e,_4f,_50,_51,_52){if((_52&&!dojo.isArray(_52))||_52===false){_52=[_52];}var _53=_52?dojo.string.substitute(_51.toString(),_52):_51;dojo.publish(this.BASE_TOPIC+_4f,[_4e,_4f,_50,_53]);},_getMessageString:function(_54){var _55=0;var msg="";if(_54||_54===false){msg+="[ ";if(dojo.isArray(_54)){for(var i=0;i<_54.length;++i){var arg=_54[i];if(msg.length>2){msg+=", ";}if(typeof arg=="undefined"){msg+="undefined";}if(arg&&arg.toString){msg+=arg.toString();}else{if(arg===null){msg+="null";}else{msg+="n/a";}}}}else{if(_54&&_54.toString){msg+=_54.toString();}else{if(_54===null){msg+="null";}else{msg+="n/a";}}}msg+=" ]";}return msg;},_setTraceConfig:function(_56){if(dojo.isString(_56)&&_56.length>0&&_56=="*"){this._log("RootLogger",com.ibm.mashups.enabler.logging.LogLevel.TRACE,"_setTraceConfig","Invalid traceConfig specified: *");}else{if((dojo.isArray(_56)||dojo.isString(_56))&&_56.length>0){this._log("RootLogger",com.ibm.mashups.enabler.logging.LogLevel.TRACE,"_setTraceConfig","Changing traceConfig: "+_56);var _57=dojo.isArray(_56)?_56.join("|"):_56;if(_57.length>0){this.regExp=new RegExp(_57);return;}}}this.regExp=null;},_disableTraceConfig:function(){this.regExp=null;},_getRegExp:function(){if(this.parentLogger){return this.parentLogger._getRegExp();}return this.regExp;}});com.ibm.mashups.enabler.logging.Logger=new com.ibm.mm.enabler.logging.LoggerImpl();com.ibm.mashups.enabler.logging.Logger.addHandler(new com.ibm.mm.enabler.logging.ConsoleHandler());}if(!dojo._hasResource["com.ibm.mashups.enabler.logging.Logger"]){dojo._hasResource["com.ibm.mashups.enabler.logging.Logger"]=true;dojo.provide("com.ibm.mashups.enabler.logging.Logger");}if(!dojo._hasResource["com.ibm.mm.enabler.DeferredImpl"]){dojo._hasResource["com.ibm.mm.enabler.DeferredImpl"]=true;dojo.provide("com.ibm.mm.enabler.DeferredImpl");dojo.declare("com.ibm.mm.enabler.DeferredImpl",[com.ibm.mashups.enabler.Deferred],{_chainedDeferred:null,_sync:false,_previous:null,constructor:function(_58,_59,_5a){this.context=_58;this.startfn=_59;this.params=_5a;this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);},addErrorCallback:function(_5b,_5c){dojo.deprecated("com.ibm.mashups.enabler.Deferred.addErrorCallback()","use com.ibm.mashups.enabler.Deferred.setFinishedCallback() instead");this.errorCallback=_5b;this.errorCallbackParameters=_5c;},addFinishedCallback:function(_5d,_5e){dojo.deprecated("com.ibm.mashups.enabler.Deferred.addFinishedCallback()","use com.ibm.mashups.enabler.Deferred.setFinishedCallback() instead");this.finishedCallback=_5d;this.finishedCallbackParameters=_5e;},setFinishedCallback:function(_5f,_60,_61){if(_61===true){this._isVerboseFinish=true;}this.finishedCallback2=_5f;this.finishedCallbackParameters2=_60;return this;},start:function(_62,_63){this._sync=(_62||typeof (_62)=="undefined");var ret=null;if(dojo.isFunction(this.startfn)){ret=dojo.hitch(this.context||null,this.startfn)(this,this._sync,this.params,_63||null);}return ret;},getFinishedCallback:function(){return this.finishedCallback2;},getFinishedCallbackParameters:function(){return this.finishedCallbackParameters2;},setChainedDeferred:function(_64){this._chainedDeferred=_64;},getChainedDeferred:function(){return this._chainedDeferred;},getPrevious:function(){return this._previous;},_setPreviousDeferred:function(_65,_66,_67){this._previous={deferred:_65,result:_66,status:_67};},removeChainedDeferred:function(){this._chainedDeferred=null;},finish:function(_68,_69,_6a){try{if(dojo.isFunction(this.getFinishedCallback())){if(this._isVerboseFinish){var _6b={resource:_68,parameter:this.getFinishedCallbackParameters()};_6b.statusCode=_69;if(this._verboseOperationResults){_6b.operations=this._verboseOperationResults||[];}else{_6b.request=_6a||{statusCode:_69};}dojo.partial(this.getFinishedCallback())(_6b);}else{dojo.partial(this.getFinishedCallback())(_68,_69,this.getFinishedCallbackParameters());}}else{if(dojo.isFunction(this.finishedCallback)&&(""+_69).indexOf("2")===0){dojo.partial(this.finishedCallback)(_68,this.finishedCallbackParameters);}else{if(dojo.isFunction(this.errorCallback)&&_69>=400){dojo.partial(this.errorCallback)(_68,this.errorCallbackParameters);}}}}catch(e){this.LOGGER.warning("finish","Callback failed to execute; skipping. Reason: "+e.message);}if(this._chainedDeferred){this._chainedDeferred._setPreviousDeferred(this,_68,_69);this._chainedDeferred.start(this._sync);}}});}if(!dojo._hasResource["com.ibm.mashups.enabler.Deferred"]){dojo._hasResource["com.ibm.mashups.enabler.Deferred"]=true;dojo.provide("com.ibm.mashups.enabler.Deferred");}if(!dojo._hasResource["com.ibm.mashups.enabler.context.LocalizedContext_API"]){dojo._hasResource["com.ibm.mashups.enabler.context.LocalizedContext_API"]=true;dojo.provide("com.ibm.mashups.enabler.context.LocalizedContext_API");dojo.provide("com.ibm.mashups.enabler.context.LocalizedContext");dojo.declare("com.ibm.mashups.enabler.context.LocalizedContext",null,{getPreferredLocale:function(){},getDefaultLocale:function(){},getLocale:function(_6c){},getDisplayLocale:function(_6d){},getTitle:function(_6e){},getDescription:function(_6f){}});}if(!dojo._hasResource["com.ibm.mashups.enabler.xml.XPath_API"]){dojo._hasResource["com.ibm.mashups.enabler.xml.XPath_API"]=true;dojo.provide("com.ibm.mashups.enabler.xml.XPath_API");dojo.provide("com.ibm.mashups.enabler.xml.XPath");dojo.declare("com.ibm.mashups.enabler.xml.XPath",null,{evaluateXPath:function(_70,doc,_71){},evaluateEntry:function(_72,doc,_73){},evaluateBoolean:function(_74,doc,_75){},evaluateString:function(_76,doc,_77){},evaluateNumber:function(_78,doc,_79){}});}if(!dojo._hasResource["com.ibm.mm.enabler.utils.Dom"]){dojo._hasResource["com.ibm.mm.enabler.utils.Dom"]=true;dojo.provide("com.ibm.mm.enabler.utils.Dom");com.ibm.mm.enabler.utils.Dom={getAttributeWithNS:function(_7a,_7b,_7c,_7d){if(!_7a){return null;}if(!_7b){return null;}if(!_7c){return null;}if(!_7d){return null;}var _7e=null;if(dojo.isIE){_7e=_7a.getAttribute(_7b);if(_7e===null||_7e==""){var _7f=_7a.attributes;for(var i=_7f.length;i>0;i--){if(_7f[i-1].baseName==_7c&&_7f[i-1].namespaceURI==_7d){_7e=_7f[i-1].value;break;}}}}else{_7e=_7a.getAttributeNS(_7d,_7c);}return _7e;},setAttributeWithNS:function(dom,_80,_81,_82,_83,_84){if(!dojo.isObject(_80)){throw new Error("element must be a DOMNode");}if(dojo.isIE){var _85=dom.createNode(2,_81,_83);if(_84===null||_84===undefined){_84="";}_85.nodeValue=_84;_80.setAttributeNode(_85);}else{_80.setAttributeNS(_83,_81,_84);}},textContent:function(_86,_87){if(!_86){return "";}if(arguments.length>1){var doc=_86.ownerDocument;var _88=doc.createTextNode(_87||"");com.ibm.mm.enabler.utils.Dom.replaceChildren(_86,_88);return;}else{var tc=dojox.xml.parser.textContent(_86);if(tc){return tc;}return dojo.map(_86.childNodes||[],function(_89){return (_89.nodeType>0&&_89.nodeType<4)?_89.nodeValue:"";}).join("");}},createElement:function(dom,_8a,ns){var _8b;if(dojo.isIE){if(ns){_8b=dom.createNode(1,_8a,ns);}else{_8b=dom.createElement(_8a);}}else{_8b=dom.createElementNS(ns,_8a);}return _8b;},destroyNode:function(_8c){var _8d=dojo.byId("IELeakGarbageBin");if(!_8d){_8d=dojo.create("div",{id:"IELeakGarbageBin",style:{display:"none"}},dojo.body());}dojo.place(_8c,_8d);dojo.attr(_8d,"innerHTML","");if(_8c.nodeType!=3){if(dojo.isIE){dojo.attr(_8c,"outerHTML","");}}},createDocument:function(_8e,_8f){if(dojo.isIE>=9&&typeof ActiveXObject!="undefined"){var _90=["Msxml2.DOMDocument.6.0","Msxml2.DOMDocument.3.0"];for(var i=0;i<_90.length;i++){try{oXml=new ActiveXObject(_90[i]);if(oXml){break;}}catch(e){if(i==_90.length){console.warn("Error creating Msxml.DOMDocument; reason: ",e);}}}oXml.async=false;if(_8e){oXml.loadXML(_8e);if(oXml.parseError.errorCode!=0){var _91=oXml.parseError;console.warn("Error parsing XML data. Reason: '"+_91.reason+"'; data: '"+_8e+"'.");}}return oXml;}else{return dojox.xml.parser.parse(_8e,_8f);}},replaceChildren:function(_92,_93){return dojox.xml.parser.replaceChildren(_92,_93);},innerXML:function(_94){return _94?dojox.xml.parser.innerXML(_94):null;},removeChildren:function(_95){return dojox.xml.parser.removeChildren(_95);},copyChildren:function(_96,_97,_98){var _99=_96.cloneNode(true);return this.moveChildren(_99,_97,_98);},moveChildren:function(_9a,_9b,_9c){var _9d=0;if(_9c){while(_9a.hasChildNodes()&&_9a.firstChild.nodeType==3){_9a.removeChild(_9a.firstChild);}while(_9a.hasChildNodes()&&_9a.lastChild.nodeType==3){_9a.removeChild(_9a.lastChild);}}while(_9a.hasChildNodes()){_9b.appendChild(_9a.firstChild);_9d++;}return _9d;},getLocalName:function(_9e){if(!_9e){return null;}switch(_9e.nodeType){case 3:return "#text";case 1:return _9e.localName||com.ibm.mm.enabler.utils.Dom.removeNodeNS(_9e.nodeName);}return null;},getNodeNSPrefix:function(_9f){var tN=""+_9f;var _a0=tN.indexOf(":");return (_a0!=-1)?tN.substring(0,_a0):null;},removeNodeNS:function(_a1){var tN=""+_a1;var _a2=tN.indexOf(":");return (_a2!=-1)?tN.substring(1+_a2):_a1;},lookupNamespaceURI:function(_a3,_a4){if(!dojo.isIE){return _a3.lookupNamespaceURI(_a4);}var _a5=_a3;while(_a5&&_a5.nodeType!=9){var _a6=_a5.getAttribute("xmlns:"+_a4);if(_a6){return _a6;}_a5=_a5.parentNode;}return null;}};}if(!dojo._hasResource["com.ibm.mm.enabler.xml.xpath._Generic"]){dojo._hasResource["com.ibm.mm.enabler.xml.xpath._Generic"]=true;dojo.provide("com.ibm.mm.enabler.xml.xpath._Generic");dojo.declare("com.ibm.mm.enabler.xml.xpath._Generic",null,{constructor:function(){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger("com.ibm.mm.enabler.xml.xpath._Generic");},_evaluateXPath:function(_a7,doc,_a8){if(dojo.isSafari){return this._safariEvaluateXPath(_a7,doc,_a8);}else{if(dojo.isIE){return this._ieEvaluateXPath(_a7,doc,_a8);}else{return this._geckoEvaluateXPath(_a7,doc,_a8);}}},_transformNode:function(_a9,_aa){if(typeof XPathResult!="undefined"&&_a9 instanceof XPathResult){return this._xpathResultValue(_a9,_aa);}else{if(_aa==com.ibm.mm.enabler.xml.xpath._Generic.ANY_TYPE){return _a9;}else{if(_aa==com.ibm.mm.enabler.xml.xpath._Generic.NUMBER_TYPE){return parseFloat(com.ibm.mm.enabler.utils.Dom.textContent(_a9));}else{if(_aa==com.ibm.mm.enabler.xml.xpath._Generic.STRING_TYPE){return com.ibm.mm.enabler.utils.Dom.textContent(_a9);}else{if(_aa==com.ibm.mm.enabler.xml.xpath._Generic.BOOLEAN_TYPE){return !!_a9;}}}}}return null;},_xpathResultValue:function(_ab,_ac){if(_ac==com.ibm.mm.enabler.xml.xpath._Generic.ANY_TYPE){return _ab;}else{if(_ac==com.ibm.mm.enabler.xml.xpath._Generic.NUMBER_TYPE){return _ab.numberValue;}else{if(_ac==com.ibm.mm.enabler.xml.xpath._Generic.STRING_TYPE){return _ab.stringValue;}else{if(_ac==com.ibm.mm.enabler.xml.xpath._Generic.BOOLEAN_TYPE){return _ab.booleanValue;}}}}return null;},_evaluateXPathSingle:function(_ad,doc,_ae,_af){_af=_af||com.ibm.mm.enabler.xml.xpath._Generic.ANY_TYPE;var _b0;if(dojo.isSafari){_b0=this._safariEvaluateXPathRaw(_ad,doc,_ae,_af);if(XPathResult&&_b0 instanceof XPathResult){if(_af==com.ibm.mm.enabler.xml.xpath._Generic.ANY_TYPE){return _b0.iterateNext();}return this._transformNode(_b0,_af);}else{if(_b0){return this._transformNode(_b0[0],_af);}}}else{if(dojo.isIE){_b0=this._ieEvaluateXPathRawSingle(_ad,doc,_ae);if(_b0||_b0===null){return this._transformNode(_b0,_af);}}else{_b0=this._geckoEvaluateXPathRaw(_ad,doc,_ae,_af);if(_b0&&_af==com.ibm.mm.enabler.xml.xpath._Generic.ANY_TYPE){return _b0.iterateNext();}else{return this._transformNode(_b0,_af);}}}return _b0||null;},_geckoEvaluateXPath:function(_b1,doc,_b2){var _b3=this._geckoEvaluateXPathRaw(_b1,doc,_b2,com.ibm.mm.enabler.xml.xpath._Generic.ANY_TYPE);var _b4=[];if(_b3){var _b5;while((_b5=_b3.iterateNext())){_b4.push(_b5);}}return _b4;},_geckoEvaluateXPathRaw:function(_b6,doc,_b7,_b8){var _b9=doc;if(doc.nodeType!=9){_b9=doc.ownerDocument;}return _b9.evaluate(_b6,doc,function(_ba){return _b7[_ba]?_b7[_ba].toString():null;},_b8,null);},_ieEvaluateXPath:function(_bb,doc,_bc){var _bd=this._ieEvaluateXPathRaw(_bb,doc,_bc);return _bd||[];},_setIeNamespaces:function(doc,_be){if(_be){var ns=[];var _bf;for(var _c0 in _be){_bf=_be[_c0];if(_c0!="xml"){ns.push("xmlns:",_c0,"='",_bf,"' ");}}var _c1=doc.ownerDocument||doc;_c1.setProperty("SelectionNamespaces",ns.join(""));_c1.setProperty("SelectionLanguage","XPath");}},_ieEvaluateXPathRaw:function(_c2,doc,_c3){this._setIeNamespaces(doc,_c3);return doc.selectNodes(_c2);},_ieEvaluateXPathRawSingle:function(_c4,doc,_c5){this._setIeNamespaces(doc,_c5);return doc.selectSingleNode(_c4);},_safariEvaluateXPath:function(_c6,doc,_c7){var _c8=this._safariEvaluateXPathRaw(_c6,doc,_c7,com.ibm.mm.enabler.xml.xpath._Generic.ANY_TYPE);if(XPathResult&&_c8 instanceof XPathResult){var _c9=[];var _ca;while((_ca=_c8.iterateNext())){_c9.push(_ca);}return _c9;}return _c8||[];},_safariEvaluateXPathRaw:function(_cb,doc,_cc,_cd){if(typeof XPathResult!="undefined"){return document.evaluate(_cb,doc,function(_ce){return _cc[_ce]?_cc[_ce].toString():null;},_cd,null);}else{if(doc.selectNodes){return doc.selectNodes(_cb);}}}});com.ibm.mm.enabler.xml.xpath._Generic.ANY_TYPE=0;com.ibm.mm.enabler.xml.xpath._Generic.NUMBER_TYPE=1;com.ibm.mm.enabler.xml.xpath._Generic.STRING_TYPE=2;com.ibm.mm.enabler.xml.xpath._Generic.BOOLEAN_TYPE=3;}if(!dojo._hasResource["com.ibm.mm.enabler.xml.XPathImpl"]){dojo._hasResource["com.ibm.mm.enabler.xml.XPathImpl"]=true;dojo.provide("com.ibm.mm.enabler.xml.XPathImpl");dojo.declare("com.ibm.mm.enabler.xml.XPathImpl",[com.ibm.mashups.enabler.xml.XPath,com.ibm.mm.enabler.xml.xpath._Generic],{modelMessages:null,constructor:function(){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger("com.ibm.mm.enabler.xml.XPath");this.modelMessages=dojo.i18n.getLocalization("com.ibm.mm.enabler","modelMessages");},ANY_TYPE:com.ibm.mm.enabler.xml.xpath._Generic.ANY_TYPE,NUMBER_TYPE:com.ibm.mm.enabler.xml.xpath._Generic.NUMBER_TYPE,STRING_TYPE:com.ibm.mm.enabler.xml.xpath._Generic.STRING_TYPE,BOOLEAN_TYPE:com.ibm.mm.enabler.xml.xpath._Generic.BOOLEAN_TYPE,evaluateXPath:function(_cf,doc,_d0){var _d1="evaluateXPath(xpathExpr, doc, namespaces)";var _d2=this.LOGGER.isLoggable(com.ibm.mashups.enabler.logging.LogLevel.TRACE);if(_d2){this.LOGGER.entering(_d1,[_cf,doc,_d0]);}if(!dojo.isString(_cf)||_cf.length===0){throw new Error(this.modelMessages.E_INVALID_XPATH_EXPR_0);}if(!doc){throw new Error(this.modelMessages.E_INVALID_DOCUMENT_0);}var ret=this._evaluateXPath(_cf,doc,_d0);if(_d2){this.LOGGER.exiting(_d1,ret);}return ret;},evaluateSingle:function(_d3,doc,_d4,_d5){if(!dojo.isString(_d3)||_d3.length===0){throw new Error(this.modelMessages.E_INVALID_XPATH_EXPR_0);}if(!doc){throw new Error(this.modelMessages.E_INVALID_DOCUMENT_0);}return this._evaluateXPathSingle(_d3,doc,_d4,_d5);},evaluateEntry:function(_d6,doc,_d7){return this.evaluateSingle(_d6,doc,_d7,com.ibm.mashups.enabler.xml.XPath.ANY_TYPE);},evaluateBoolean:function(_d8,doc,_d9){return this.evaluateSingle(_d8,doc,_d9,com.ibm.mashups.enabler.xml.XPath.BOOLEAN_TYPE);},evaluateString:function(_da,doc,_db){return this.evaluateSingle(_da,doc,_db,com.ibm.mashups.enabler.xml.XPath.STRING_TYPE);},evaluateNumber:function(_dc,doc,_dd){return this.evaluateSingle(_dc,doc,_dd,com.ibm.mashups.enabler.xml.XPath.NUMBER_TYPE);},createXPath:function(_de,_df,_e0){var _e1=_de.split("/");var _e2=_e1[0];var _e3=_e2.split(":");var _e4,_e5;if(_e3.length>1){_e5=_e3[0];_e4=_e3[1];}else{_e4=_e3[0];}var _e6=com.ibm.mashups.enabler.xml.XPath.evaluateXPath((_e5?_e5+":":"")+_e4,_df,_e0);var _e7;if(_e6&&_e6.length>0){_e7=_e6[0];}else{_e7=com.ibm.mm.enabler.utils.Dom.createElement(_df.ownerDocument,(_e5?_e5+":":"")+_e4,_e5?_e0[_e5]:null);_df.appendChild(_e7);}if(_e1.length>1){_e7=com.ibm.mashups.enabler.xml.XPath.createXPath(_de.substr(_de.indexOf("/")+1),_e7,_e0);}return _e7;}});com.ibm.mashups.enabler.xml.XPath=new com.ibm.mm.enabler.xml.XPathImpl();com.ibm.mm.enabler.xml.xpath.evaluateXPath=function(_e8,doc,_e9){var _ea=com.ibm.mashups.enabler.logging.Logger.getLogger("com.ibm.mm.enabler.xml.xpath");var _eb="evaluateXPath";_ea.warning(_eb,"This method must not be used directly. Use com.ibm.mashups.enabler.xml.XPath.evaluateXPath instead.");dojo.deprecated("com.ibm.mm.enabler.xml.xpath.evaluateXPath","The method com.ibm.mm.enabler.xml.xpath.evaluateXPath is deprecated, please use com.ibm.mashups.enabler.xml.XPath.evaluateXPath instead");return com.ibm.mm.enabler.xml.xpath._Generic.evaluateXPath.apply(null,arguments);};}if(!dojo._hasResource["com.ibm.mashups.enabler.xml.XPath"]){dojo._hasResource["com.ibm.mashups.enabler.xml.XPath"]=true;dojo.provide("com.ibm.mashups.enabler.xml.XPath");}if(!dojo._hasResource["com.ibm.mm.enabler.utils.LocaleHelper"]){dojo._hasResource["com.ibm.mm.enabler.utils.LocaleHelper"]=true;dojo.provide("com.ibm.mm.enabler.utils.LocaleHelper");com.ibm.mm.enabler.utils.LocaleHelper={LOG_LEVEL:com.ibm.mashups.enabler.logging.LogLevel.TRACE,LOGGER:com.ibm.mashups.enabler.logging.Logger.getLogger("com.ibm.mm.enabler.utils.LocaleHelper"),getLocale:function(_ec,_ed,_ee){com.ibm.mm.enabler.utils.LocaleHelper.LOGGER.warning("com.ibm.mm.enabler.utils.LocaleHelper.getLocale","Deprecated. Use com.ibm.mashups.enabler.context.Factory.getLocalizedContext().getLocale() instead.");if(typeof _ec=="undefined"||_ec===null){return null;}var _ef=_ec.getLocales();if(typeof _ef=="undefined"||_ef===null||!dojo.isArray(_ef)){return null;}if(_ef.length===0){return null;}var _f0=null;if(_ef.length===1){_f0=_ef[0];}var arr={};for(var i in _ef){if(Object.prototype.hasOwnProperty.call(_ef,i)){var _f1=_ef[i];arr[_f1]=_f1;}}var _f2;if(_f0===null){if(typeof _ed!="undefined"&&_ed!==null){_f0=this.findMatchLocale(arr,_ed);if(_f0===null){_f2=_ed.split(/-|_/);if(_f2.length==2){var _f3=_f2[0];if(typeof arr[_f3]!="undefined"&&arr[_f3]!==null){_f0=_f3;}}}}}if(_f0===null){var _f4=(dojo.isIE?navigator.userLanguage:navigator.language).toLowerCase();if(typeof ibmConfig!="undefined"&&ibmConfig&&typeof (ibmConfig.locale)!="undefined"&&ibmConfig.locale){_f4=ibmConfig.locale;}if(_f4!==null){_f0=this.findMatchLocale(arr,_f4);if(_f0===null){_f2=_f4.split(/-|_/);if(_f2.length==2){var _f5=_f2[0];if(typeof arr[_f5]!="undefined"&&arr[_f5]!==null){_f0=_f5;}}}}}if(_f0===null){if(_ee){_f0=_ee;}}if(_f0===null){if(arr.en){_f0="en";}}if(_f0===null){_f0=_ef[0];}return _f0;},findMatchLocale:function(arr,_f6){com.ibm.mm.enabler.utils.LocaleHelper.LOGGER.warning("com.ibm.mm.enabler.utils.LocaleHelper.findMatchLocale","Deprecated. Use com.ibm.mm.enabler.utils.LocaleHelper.matchLocale() instead.");var _f7=null;if(arr[_f6]){_f7=_f6;}var _f8=this.toServerLocale(_f6);if(_f7===null&&arr[_f8]){_f7=_f8;}var _f9=_f8.toLowerCase();if(_f7===null&&arr[_f9]){_f7=_f9;}return _f7;},matchLocale:function(_fa,_fb){return com.ibm.mm.enabler.utils.LocaleHelper._matchLocale(com.ibm.mm.enabler.utils.LocaleHelper._getLocaleObj(_fa),com.ibm.mm.enabler.utils.LocaleHelper.normalizeLocale(_fb));},_matchLocale:function(_fc,_fd,_fe){var _ff=_fc;var _100=null;var _101=dojo.some(_fd,function(item){if(item==com.ibm.mm.enabler.utils.LocaleHelper.normalizeLocale(_fc.toString())){_100=item;return true;}});if(_101&&_100){return _100;}if(_fc.variant){_fc.variant=null;return com.ibm.mm.enabler.utils.LocaleHelper._matchLocale(_fc,_fd);}if(_fc.country){_fc.country=null;return com.ibm.mm.enabler.utils.LocaleHelper._matchLocale(_fc,_fd);}if(!_fe){_fc=_ff;switch(_fc.language){case "he":_fc.language="iw";break;case "iw":_fc.language="he";break;}return com.ibm.mm.enabler.utils.LocaleHelper._matchLocale(_fc,_fd,true);}return null;},toServerLocale:function(_102){com.ibm.mm.enabler.utils.LocaleHelper.LOGGER.warning("com.ibm.mm.enabler.utils.LocaleHelper.normalizeLocale","Deprecated. Use com.ibm.mm.enabler.utils.LocaleHelper.normalizeLocale() instead.");if(!_102){return null;}if(_102.indexOf("-")<0){return _102;}_102=_102.replace(/-/,"_");var _103=_102.split("_");var lang=_103[0];var _104=_103[1].toUpperCase();var _105=lang+"_"+_104;return _105;},_getLocaleObj:function(_106){if(dojo.isArray(_106)){return dojo.map(_106,function(item){return com.ibm.mm.enabler.utils.LocaleHelper._getLocaleObj(item);});}else{if(dojo.isString(_106)&&dojo.string.trim(_106).length>0){var _107={language:null,country:null,variant:null,toString:function(){return (this.language?this.language+(this.country?"_"+this.country+(this.variant?"_"+this.variant:""):""):"");},isValid:function(){return !!this.language;}};var _108=dojo.string.trim(_106).replace(/-/g,"_").split("_");switch(_108.length){case 3:_107.variant=_108[2];case 2:_107.country=_108[1].toUpperCase();case 1:_107.language=_108[0].toLowerCase();break;}return _107;}else{return null;}}},normalizeLocale:function(_109){if(dojo.isArray(_109)){return dojo.map(_109,function(item){return com.ibm.mm.enabler.utils.LocaleHelper.normalizeLocale(item);});}else{if(_109&&dojo.isString(_109)){return _109.replace(/_/g,"-").toLowerCase();}else{return null;}}}};}if(!dojo._hasResource["com.ibm.mm.enabler.model.NameSpaceFactory"]){dojo._hasResource["com.ibm.mm.enabler.model.NameSpaceFactory"]=true;dojo.provide("com.ibm.mm.enabler.model.NameSpaceFactory");dojo.declare("com.ibm.mm.enabler.model.NameSpaceFactoryImpl",null,{constructor:function(){this.NS_APP="app";this.NS_ATOM="atom";this.NS_THR="thr";this.NS_UM="um";this.NS_XHTML="xhtml";this.NS_XML="xml";this.NS_XSI="xsi";this.NS_OPENSEARCH="opensearch";this.NS_CM="cm";this.NS_CA="ca";this.NS_AC="ac";this.NS_EVENT_DATATYPES="event-datatypes";this.NS_XMLNS="xmlns";this.NS_XSD="xsd";this.NS_JS="js";this.NS_ENV="env";this.namespaces={};this.namespaces[this.NS_APP]="http://www.w3.org/2007/app";this.namespaces[this.NS_ATOM]="http://www.w3.org/2005/Atom";this.namespaces[this.NS_THR]="http://purl.org/syndication/thread/1.0";this.namespaces[this.NS_UM]="http://www.ibm.com/xmlns/prod/websphere/um.xsd";this.namespaces[this.NS_XHTML]="http://www.w3.org/1999/xhtml";this.namespaces[this.NS_XML]="http://www.w3.org/XML/1998/namespace";this.namespaces[this.NS_XSI]="http://www.w3.org/2001/XMLSchema-instance";this.namespaces[this.NS_XMLNS]="http://www.w3.org/2000/xmlns/";this.namespaces[this.NS_OPENSEARCH]="http://a9.com/-/spec/opensearch/1.1/";this.namespaces[this.NS_CM]="http://www.ibm.com/xmlns/prod/composite-applications/v1.0";this.namespaces[this.NS_CA]="http://www.ibm.com/xmlns/prod/composite-applications/v1.0";this.namespaces[this.NS_AC]="http://www.ibm.com/xmlns/prod/lotus/access-control/v1.0";this.namespaces[this.NS_EVENT_DATATYPES]="http://www.ibm.com/xmlns/prod/lotus/mashups/event-datatypes";this.namespaces[this.NS_XSD]="http://www.w3.org/2001/XMLSchema";this.namespaces[this.NS_JS]="text/javascript";this.namespaces[this.NS_ENV]="http://www.w3.org/2003/05/soap-envelope";},getNameSpaces:function(_10a){var _10b={};var len=_10a.length;for(var i=0;i").replace(/</g,"<");if(_121){this.LOGGER.exiting(_120,[dojo.doc.title]);}}});com.ibm.mm.enabler.context.PageContext=new com.ibm.mm.enabler.context.PageContextImpl();}if(!dojo._hasResource["com.ibm.mashups.enabler.context.PageContext"]){dojo._hasResource["com.ibm.mashups.enabler.context.PageContext"]=true;dojo.provide("com.ibm.mashups.enabler.context.PageContext");}if(!dojo._hasResource["com.ibm.mashups.enabler.context.Factory_API"]){dojo._hasResource["com.ibm.mashups.enabler.context.Factory_API"]=true;dojo.provide("com.ibm.mashups.enabler.context.Factory_API");dojo.provide("com.ibm.mashups.enabler.context.Factory");dojo.declare("com.ibm.mashups.enabler.context.Factory",null,{getLocalizedContext:function(){},getLocalizedContext:function(_122,_123){},getPageContext:function(){}});}if(!dojo._hasResource["com.ibm.mm.enabler.context.FactoryImpl"]){dojo._hasResource["com.ibm.mm.enabler.context.FactoryImpl"]=true;dojo.provide("com.ibm.mm.enabler.context.FactoryImpl");dojo.declare("com.ibm.mm.enabler.context.FactoryImpl",[com.ibm.mashups.enabler.context.Factory],{constructor:function(){},getLocalizedContext:function(_124,_125){return new com.ibm.mm.enabler.context.LocalizedContextImpl(_124,_125);},getPageContext:function(){return new com.ibm.mm.enabler.context.PageContextImpl();}});com.ibm.mashups.enabler.context.Factory=new com.ibm.mm.enabler.context.FactoryImpl();}if(!dojo._hasResource["com.ibm.mashups.enabler.context.Factory"]){dojo._hasResource["com.ibm.mashups.enabler.context.Factory"]=true;dojo.provide("com.ibm.mashups.enabler.context.Factory");}if(!dojo._hasResource["com.ibm.mashups.enabler.services.ConfigConstants"]){dojo._hasResource["com.ibm.mashups.enabler.services.ConfigConstants"]=true;dojo.provide("com.ibm.mashups.enabler.services.ConfigConstants");dojo.declare("com.ibm.mashups.enabler.services.ConfigConstants",null,{PROXY_URL:"com.ibm.mashups.proxy.url",HUB_URL:"com.ibm.mashups.hub.url",LOGIN_URL:"com.ibm.mashups.url.login",LOGOUT_URL:"com.ibm.mashups.url.logout",CONTEXT_ROOT:"com.ibm.mashups.contextroot",CONTEXT_ROOT_ENABLER:"com.ibm.mashups.contextroot.enabler",CONTEXT_ROOT_BUILDER:"com.ibm.mashups.contextroot.builder",CONTENTHANDLER_PUBLIC:"com.ibm.mashups.contenthandler.public",CONTENTHANDLER_PRIVATE:"com.ibm.mashups.contenthandler.private",EMBEDDING_PUBLIC:"com.ibm.mashups.embedding.public",EMBEDDING_PRIVATE:"com.ibm.mashups.embedding.private",THEMES_FEEDS_EXPIRATION:"themes.feed.expiration",AVAILABLE_LOCALES:"availableLocales",DEFAULT_LOCALE:"default.locale",DISPLAY_LOCALE:"displayLocale",TUNNEL_MODE:"tunnel.mode",CLIENT_IS_DEBUG:"isDebug",CLIENT_IS_BIDI:"isBidi",WIDGETDEFID_SANDBOX_DISABLED:"com.ibm.mashups.sandbox.force.disable",TRACE_CONFIG:"traceConfig",CLIENT_POPUP_CONSOLE:"popupConsole",CLIENT_ALLOW_PUBLISH_LOGGING:"allowPublishLogging",CLIENT_ALLOW_PUBLISH_TRACING:"allowPublishTracing",CLIENT_ADDITIONAL_SERVICES:"additionalServices",CLIENT_DEFAULT_THEME_ID:"com.ibm.mashups.theme.defaultThemeId",CLIENT_PAGE_SOURCE_READ_ONLY:"pageSourceReadOnly",CLIENT_AUTO_ACCEPT_SHARED_GROUPNAME:"autoAcceptSharedGroupName",AUTO_WIRING_DEFAULT_ENABLED:"autoWiringDefaultEnabled",CLIENT_USER_ID_KEY:"userIdKey",CLIENT_GROUP_CN_KEY:"groupCNKey",SERVICE_DOCUMENT_URL:"serviceDocumentUrl",MULTIPART_ENABLED:"com.ibm.mashups.multipart.enabled",MULTIPART_CORRELATE_HOSTS:"com.ibm.mashups.multipart.correlatehosts",MULTIPART_CACHE_QUERIES:"com.ibm.mashups.multipart.cachequeries",ENDPOINTS:"endpointIDs",ENDPOINT_CONFIG_PROVIDER:"Endpoints",ANONYMOUS_USER:"anonymousUser",NAVIGATION_HIDDEN:"com.ibm.mashups.navigation.hidden",SPACE_HIDDEN:"com.ibm.mashups.space.hidden",USER:"user",SUBDOMAINS:"subdomains",SERVERDOMAIN:"serverdomain",SANDBOXENABLED:"sandboxenabled",SUBDOMAINREUSE:"subdomainreuse",NAVSTATE_PERSISTENCE_URL:"navstate.persistence.url",NAVSTATE_PERSISTENCE_PSTORE:"navstate.persistence.pstore",NAVSTATE_PERSISTENCE_URL_LIMIT:"navstate.persistence.url.limit",NAVSTATE_PERSISTENCE_URL_SPLIMIT:"navstate.persistence.url.splimit",NAVSTATE_HUFFMANNENCODE_ENABLED:"navstate.huffmannencode.enabled",LOADING_HTML:"loadingHTML",PAGE_LOAD_OPTIMIZATION:"pageLoadOptimization",PAGE_LOAD_OPTIMIZATION_THEME:"pageLoadOptimizationTheme",PAGE_LOAD_OPTIMIZATION_APP_WIDGETS:"pageLoadOptimizationAppWidgets",ANONYMOUS_ALLOW_CREATE:"com.ibm.mashups.anonymous.allow.create",DEFAULT_USER_DISPLAY_PROP:"com.ibm.mashups.default.user.display.prop",PRODUCT_NAME:"com.ibm.mashups.productname",DEFAULT_GROUP_DISPLAY_PROP:"com.ibm.mashups.default.group.display.prop",WELCOME_SPACE_ID:"com.ibm.mashups.welcome.space.name",BUILDER_TITLE_FILTER_REGEXP:"com.ibm.mashups.builder.filter.title.regexp",ANON_VIRTUAL_USER_ID:"com.ibm.mashups.anonUserId",ALL_AUTH_VIRTUAL_GROUP_ID:"com.ibm.mashups.allAuthGroupId",SERVER_TYPE:"com.ibm.mashups.server",SERVER_TYPE_MASHUPS:"Lotus_Mashups",SERVER_TYPE_PORTAL:"WebSphere_Portal",SERVER_TYPE_BSPACE:"Business_Space",ANON_MODE_ENABLED:"com.ibm.mashups.anonymous.mode",AUTO_WILDCARD_DISABLED:"com.ibm.mashups.autoWildcardSearchDisabled",CONTEXT_MENU_NAME:"com.ibm.mashups.contextmenu.name",WIDGET_BUILDER_ENABLED:"com.ibm.mashups.widgetBuilder.enabled",CREATE_SPACE_TEMPLATE_MODE:"createSpaceOnTemplateMode",FAVORITE_SPACES_MAXIMUM_NUMBER:"favorite.spaces.maximum.number",RECENT_SPACES_MAXIMUM_NUMBER:"recent.spaces.maximum.number",REGISTER_LOADEDRESOURCES:"register.loadedresources",PERSISTENCE_MODE:"com.ibm.mashups.enabler.icontext.persistence.mode",PERSISTENCE_MODE_EVENTS:"com.ibm.mashups.enabler.icontext.persistence.mode.events",PERSISTENCE_MODE_EVENTS_MODIFIABLE:"com.ibm.mashups.enabler.icontext.persistence.mode.events.modifiable",PERSISTENCE_MODE_WIRES:"com.ibm.mashups.enabler.icontext.persistence.mode.wires",PERSISTENCE_MODE_WIRES_MODIFIABLE:"com.ibm.mashups.enabler.icontext.persistence.mode.wires.modifiable",PERSISTENCE_MODE_ATTRIBUTES:"com.ibm.mashups.enabler.icontext.persistence.mode.attributes",PERSISTENCE_MODE_ATTRIBUTES_MODIFIABLE:"com.ibm.mashups.enabler.icontext.persistence.mode.attributes.modifiable",PERSISTENCE_MODE_ATTRIBUTES_JSON_INJECTXML:"com.ibm.mashups.enabler.icontext.attributes.json.injectxml",ICONTEXT_AUTO_COMMIT:"com.ibm.mashups.enabler.icontext.autocommit",ID_PREFIX:"com.ibm.mashups.iWidget.idPrefix",API_ENFORCEMENT_MODE:"com.ibm.mashups.enabler.enforcement",API_ENFORCEMENT_MODE_WARN:"warning",API_ENFORCEMENT_MODE_ERROR:"error",NON_PREVIEWABLE_WIDGET_LOCATION:"com.ibm.mashups.enabler.layout.widget.NonPreviewableContentWidget.location",LIMIT_PAGE_DESCRIPTION:"com.ibm.mashups.persistence.page.description.limit",WIDGET_PERSONALIZE_ENABLED:"com.ibm.mashups.widget.attributes.personalize.enabled",SPACEMANAGER_PAGE_QUERYCOUNT:"com.ibm.mashups.spacemanager.page.queryCount",SPACEMANAGER_PAGE_QUERYKEYWORD:"com.ibm.mashups.spacemanager.page.queryKeyword",SPACEMANAGER_SPACE_QUERYCOUNT:"com.ibm.mashups.spacemanager.spacetemplate.queryCount",SPACEMANAGER_SPACE_QUERYKEYWORD:"com.ibm.mashups.spacemanager.spacetemplate.queryKeyword",LOCALAPPS_REGEX:"com.ibm.mashups.multipart.localapps.regex",SERVER_OBJECT_ID_FORMAT:"com.ibm.mashups.server.oid.format",LOGOUT_VERIFICATION_REGEXP:"com.ibm.mashups.logout.verification.regexp",MULTIPART_SPLIT_PUBLIC:"com.ibm.mashups.multipart.splitPublic",MULTIPART_SPLIT_TRANSACTIONS:"com.ibm.mashups.multipart.splitTransactions",QUEUE_RENDERING:"com.ibm.mashups.queueRendering",MULTIPART_USE_SINK:"com.ibm.mashups.multipart.useSinkForModRequests",NAVIGATION_CREATION_NOOP:"com.ibm.mashups.navigation.creation.noop",ALL_PORTAL_VIRTUAL_GROUP_ID:"com.ibm.mashups.allPortalGroupId"});com.ibm.mashups.enabler.services.ConfigConstants=new com.ibm.mashups.enabler.services.ConfigConstants();}if(!dojo._hasResource["com.ibm.mashups.enabler.services.ConfigObject_API"]){dojo._hasResource["com.ibm.mashups.enabler.services.ConfigObject_API"]=true;dojo.provide("com.ibm.mashups.enabler.services.ConfigObject_API");dojo.provide("com.ibm.mashups.enabler.services.ConfigObject");dojo.declare("com.ibm.mashups.enabler.services.ConfigObject",null,{getValue:function(name){return null;},getValueDeferred:function(name){return null;}});}if(!dojo._hasResource["com.ibm.mm.enabler.services.ConfigObjectDefaultImpl"]){dojo._hasResource["com.ibm.mm.enabler.services.ConfigObjectDefaultImpl"]=true;dojo.provide("com.ibm.mm.enabler.services.ConfigObjectDefaultImpl");dojo.declare("com.ibm.mm.enabler.services.ConfigObjectDefaultImpl",[com.ibm.mashups.enabler.services.ConfigObject],{constructor:function(_126,_127){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.provider=_126;this.configService=_127;this.ns={};this.ns.app="http://www.w3.org/2007/app";this.ns.atom="http://www.w3.org/2005/Atom";},getPreferenceValue:function(name){if(this.provider=="all"){return this.configService.getValue(name);}else{return this._getValue(this.provider,name);}return null;},getValue:function(name){if(this.provider=="all"){return this.configService.getValue(name,internal);}else{return this._getValue(this.provider,name);}return null;},_getValue:function(_128,name){return null;},getValueDeferred:function(name){if(this.provider=="all"){return new com.ibm.mm.enabler.DeferredImpl(this,function(_129,sync,name){var _12a=_129.getFinishedCallback();var _12b=this.configService.getValue(name,internal);if(_12b&&_12a){_12a(_12b,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK,_129.getFinishedCallbackParameters());}return _12b;});}else{return this._getValueDeferred(this.provider,name);}},_getValueDeferred:function(_12c,name){return null;}});if((ibmConfig.enablerLayerModules)&&(dojo.indexOf(ibmConfig.enablerLayerModules,"Base")>=0)){dojo["require"]("com.ibm.mm.enabler.services.ConfigObjectExtendedImpl");}}if(!dojo._hasResource["com.ibm.mashups.enabler.services.ConfigObject"]){dojo._hasResource["com.ibm.mashups.enabler.services.ConfigObject"]=true;dojo.provide("com.ibm.mashups.enabler.services.ConfigObject");}if(!dojo._hasResource["com.ibm.mashups.enabler.services.ConfigService_API"]){dojo._hasResource["com.ibm.mashups.enabler.services.ConfigService_API"]=true;dojo.provide("com.ibm.mashups.enabler.services.ConfigService_API");dojo.provide("com.ibm.mashups.enabler.services.ConfigService");dojo.declare("com.ibm.mashups.enabler.services.ConfigService",null,{SERVICE_NAME:"configService",getValue:function(name){return null;},getConfigObject:function(name){return null;},getConfigProviderNames:function(){return null;}});com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME="configService";}if(!dojo._hasResource["com.ibm.mashups.services.ServiceManager_API"]){dojo._hasResource["com.ibm.mashups.services.ServiceManager_API"]=true;dojo.provide("com.ibm.mashups.services.ServiceManager_API");dojo.provide("com.ibm.mashups.services.ServiceManager");dojo.declare("com.ibm.mashups.services.ServiceManager",null,{constructor:function(){},getService:function(_12d){}});}if(!dojo._hasResource["com.ibm.mashups.services.ServiceManager"]){dojo._hasResource["com.ibm.mashups.services.ServiceManager"]=true;dojo.provide("com.ibm.mashups.services.ServiceManager");}if(!dojo._hasResource["com.ibm.mm.services.ServiceManagerImpl"]){dojo._hasResource["com.ibm.mm.services.ServiceManagerImpl"]=true;dojo.provide("com.ibm.mm.services.ServiceManagerImpl");dojo.declare("com.ibm.mm.services.ServiceManagerImpl",com.ibm.mashups.services.ServiceManager,{constructor:function(){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this._serviceEntries={};ibmConfig=ibmConfig||{};ibmConfig.additionalServices=ibmConfig.additionalServices||null;if(ibmConfig.additionalServices){var _12e=dojo.fromJson(ibmConfig.additionalServices);for(var i in _12e){if(Object.prototype.hasOwnProperty.call(_12e,i)){var _12f=_12e[i];this._serviceEntries[_12f.name]=_12f;}}}},getService:function(_130){var _131=this._serviceEntries[_130];_131=_131||null;if(_131!==null){var _132=_131.serviceHandler;_132=_132||null;if(_132===null){_132=this._createService(_131);_132=_132||null;if(_132===null){this._loadScript(_131);}else{this._serviceEntries[_130].serviceHandler=_132;}}}return this._serviceEntries[_130].serviceHandler;},setService:function(_133,_134){_134=_134||null;if(_134===null){return null;}var _135=this._serviceEntries[_133];_135=_135||null;if(_135!==null){delete this._serviceEntries[_133];}if(!this._serviceEntries[_133]){this._serviceEntries[_133]={};}if(dojo.isString(_134)){this._serviceEntries[_133].baseClass=_134;}else{this._serviceEntries[_133].serviceHandler=_134;}},_loadScript:function(_136){var me=this;dojo.xhrGet({url:_136.path,ibmMultipart:{context:com.ibm.mashups.enabler.io.XHRMultipartFactory.CONTEXT_ENABLER},handleAs:"text",sync:true,load:function(_137){dojo.eval(_137);var _138=me._createService(_136);if(typeof _138!="undefined"&&_138!==null){var _139=_136.name;_136.serviceHandler=_138;}},error:function(data,_13a){this.LOGGER.severe("_loadScript","error loading service:"+_136.name,data);}});},_createService:function(_13b){var _13c=null;try{_13c=new (dojo.getObject(_13b.baseClass))();}catch(err){}return _13c;}});com.ibm.mashups.services.ServiceManager=new com.ibm.mm.services.ServiceManagerImpl();}if(!dojo._hasResource["com.ibm.mm.enabler.services.AbstractConfigServiceImpl"]){dojo._hasResource["com.ibm.mm.enabler.services.AbstractConfigServiceImpl"]=true;dojo.provide("com.ibm.mm.enabler.services.AbstractConfigServiceImpl");dojo.declare("com.ibm.mm.enabler.services.AbstractConfigServiceImpl",com.ibm.mashups.enabler.services.ConfigService,{constructor:function(){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);},getPreferenceValue:function(name){return this.getValue(name);},getValue:function(name,_13d){if(typeof _13d=="undefined"){this.LOGGER.warning("com.ibm.mm.enabler.services.ConfigService.getValue","This method must not be used directly. Use com.ibm.mashups.enabler.services.ConfigService.getValue instead. name: ${0}",[name]);}var _13e=ibmConfig[name];return _13e;},getConfigObject:function(_13f){return null;},getConfigProviderNames:function(){return null;}});}if(!dojo._hasResource["com.ibm.mm.enabler.services.ConfigServiceDefaultImpl"]){dojo._hasResource["com.ibm.mm.enabler.services.ConfigServiceDefaultImpl"]=true;dojo.provide("com.ibm.mm.enabler.services.ConfigServiceDefaultImpl");dojo.declare("com.ibm.mm.enabler.services.ConfigServiceDefaultImpl",[com.ibm.mm.enabler.services.AbstractConfigServiceImpl],{constructor:function(){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger("com.ibm.mm.enabler.services.ConfigServiceDefaultImpl");},_getConfigObject:function(_140){if(!ibmConfig["CO_"+_140]){var co=new com.ibm.mm.enabler.services.ConfigObjectDefaultImpl(_140,this);ibmConfig["CO_"+_140]=co;}return ibmConfig["CO_"+_140];},_getConfigProviderNames:function(){var ret=[];ret.push("all");return ret;},getValue:function(name){var _141="getValue(name)";var _142=this.LOGGER.isLoggable(com.ibm.mashups.enabler.logging.LogLevel.TRACE);if(_142){this.LOGGER.entering(_141,name);}var ret=this.inherited(arguments,[name,true]);if(_142){this.LOGGER.exiting(_141,ret);}return ret;},getConfigObject:function(name){var _143="getConfigObject(name)";var _144=this.LOGGER.isLoggable(com.ibm.mashups.enabler.logging.LogLevel.TRACE);if(_144){this.LOGGER.entering(_143,name);}var ret=this._getConfigObject(name);if(_144){this.LOGGER.exiting(_143,ret);}return ret;},getConfigProviderNames:function(){var _145="getConfigProviderNames()";var _146=this.LOGGER.isLoggable(com.ibm.mashups.enabler.logging.LogLevel.TRACE);if(_146){this.LOGGER.entering(_145,name);}var ret=this._getConfigProviderNames();if(_146){this.LOGGER.exiting(_145,ret);}return ret;}});com.ibm.mashups.services.ServiceManager.setService("configService","com.ibm.mm.enabler.services.ConfigServiceDefaultImpl");if((ibmConfig.enablerLayerModules)&&(dojo.indexOf(ibmConfig.enablerLayerModules,"Base")>=0)){dojo["require"]("com.ibm.mm.enabler.services.ConfigServiceExtendedImpl");}}if(!dojo._hasResource["com.ibm.mashups.enabler.services.ConfigService"]){dojo._hasResource["com.ibm.mashups.enabler.services.ConfigService"]=true;dojo.provide("com.ibm.mashups.enabler.services.ConfigService");}if(!dojo._hasResource["com.ibm.mashups.enabler.utils.EndpointHelper_API"]){dojo._hasResource["com.ibm.mashups.enabler.utils.EndpointHelper_API"]=true;dojo.provide("com.ibm.mashups.enabler.utils.EndpointHelper_API");dojo.provide("com.ibm.mashups.enabler.utils.EndpointHelper");dojo.declare("com.ibm.mashups.enabler.utils.EndpointHelper",null,{resolve:function(url){return null;}});}if(!dojo._hasResource["com.ibm.mm.enabler.EndpointUtils"]){dojo._hasResource["com.ibm.mm.enabler.EndpointUtils"]=true;dojo.provide("com.ibm.mm.enabler.EndpointUtils");dojo.declare("com.ibm.mm.enabler.EndpointUtilsDefaultImpl",null,{constructor:function(){},checkForEndpoints:function(url){return null;}});com.ibm.mm.enabler.EndpointUtils=new com.ibm.mm.enabler.EndpointUtilsDefaultImpl();if((ibmConfig.enablerLayerModules)&&(dojo.indexOf(ibmConfig.enablerLayerModules,"iWidget")>=0)){dojo["require"]("com.ibm.mm.enabler.EndpointUtilsExtendedImpl");}}if(!dojo._hasResource["com.ibm.mm.enabler.utils.EndpointHelperImpl"]){dojo._hasResource["com.ibm.mm.enabler.utils.EndpointHelperImpl"]=true;dojo.provide("com.ibm.mm.enabler.utils.EndpointHelperImpl");dojo.declare("com.ibm.mm.enabler.utils.EndpointHelperImpl",null,{resolve:function(url){if(!url){return url;}var url2=com.ibm.mm.enabler.EndpointUtils.checkForEndpoints(url);if(url2){return url2;}return url;}});com.ibm.mashups.enabler.utils.EndpointHelper=new com.ibm.mm.enabler.utils.EndpointHelperImpl();}if(!dojo._hasResource["com.ibm.mashups.enabler.utils.EndpointHelper"]){dojo._hasResource["com.ibm.mashups.enabler.utils.EndpointHelper"]=true;dojo.provide("com.ibm.mashups.enabler.utils.EndpointHelper");}if(!dojo._hasResource["com.ibm.mashups.enabler.utils.URLHelper_API"]){dojo._hasResource["com.ibm.mashups.enabler.utils.URLHelper_API"]=true;dojo.provide("com.ibm.mashups.enabler.utils.URLHelper_API");dojo.provide("com.ibm.mashups.enabler.utils.URLHelper");dojo.declare("com.ibm.mashups.enabler.utils.URLHelper",null,{rewriteURL:function(_147){return null;}});}if(!dojo._hasResource["com.ibm.mm.enabler.utils.Misc"]){dojo._hasResource["com.ibm.mm.enabler.utils.Misc"]=true;dojo.provide("com.ibm.mm.enabler.utils.Misc");com.ibm.mm.enabler.utils.Misc={LOG_LEVEL:com.ibm.mashups.enabler.logging.LogLevel.TRACE,LOGGER:com.ibm.mashups.enabler.logging.Logger.getLogger("com.ibm.mm.enabler.utils.Misc"),forIn:function(obj,func,_148){if(!obj||typeof obj!="object"){return;}_148=_148||null;var item;for(var idx in obj){if(Object.prototype.hasOwnProperty.call(obj,idx)){item=obj[idx];dojo.hitch(_148,func)(item,idx,obj);}}},encodePath:function(path,_149){if(path.length===0){return path;}var _14a=path.split("/");for(var i=0;i<_14a.length;++i){_14a[i]=_149?com.ibm.mm.enabler.utils.Misc._pathPartUnescape(_14a[i]):com.ibm.mm.enabler.utils.Misc._pathPartEscape(com.ibm.mm.enabler.utils.Misc._pathPartUnescape(_14a[i]));}return _14a.join("/");},_pathPartUnescape:function(_14b){_14b=decodeURIComponent(_14b);return _14b;},_pathPartEscape:function(_14c){_14c=encodeURIComponent(_14c);_14c=_14c.replace(/%3a/g,":");_14c=_14c.replace(/%3A/g,":");return _14c;},inStringArray:function(str,_14d){var rc=false;for(var i in _14d){if(Object.prototype.hasOwnProperty.call(_14d,i)){var _14e=_14d[i];if(_14e==str){rc=true;break;}}}return rc;},isEmpty:function(_14f){if(_14f===null||typeof _14f=="undefined"){return true;}else{if(dojo.isString(_14f)){return _14f.length===0;}else{for(var i in _14f){if(Object.prototype.hasOwnProperty.call(_14f,i)){return false;}}return true;}}},encodeModelID4Uri:function(uri){var pos=uri.indexOf(":");if(pos!=-1){var _150=uri.slice(0,pos+1);var end=uri.slice(pos+1);uri=_150+encodeURIComponent(end);}return encodeURIComponent(uri);},preloadImage:function(path,_151,_152){var _153=(_151&&_152)?new Image(_151,_152):new Image();_153.src=path;return _153;},isInstanceOf:function(obj1,obj2){if(obj1&&obj2){if(typeof obj1.isInstanceOf=="function"){if(obj1.isInstanceOf(obj2)){return true;}}return (obj1 instanceof obj2);}return false;},isPocUrl:function(_154){var _155={http:"http",https:"https",file:"file",endpoint:"endpoint"};var rc=false;if(_154.indexOf(":")>0){if(_154.indexOf("/")===0){return false;}if(_154.indexOf("?")===0){return false;}var _156=_154.substring(0,_154.indexOf(":"));if(!_155[_156]){rc=true;}}return rc;},_transferURLParameter:function(_157,_158){var _159=_158.getParameters();var _15a=_157.getParameters();var c=com.ibm.mm.enabler.model.url.ModelUrlConstants;for(var s in _15a){if(_159[s]){if(s==c.PARAMETER_MDNAME||s==c.PARAMETER_ASPECT){var sv=_15a[s];var _15b=dojo.filter(dojo.isArray(sv)?sv:[sv],function(v){if(dojo.isArray(_159[s])){return dojo.indexOf(_159[s],v)==-1;}else{return _159[s]!=v;}},this);dojo.forEach(_15b,function(v){_158.addParameter(s,v);},this);}}else{_158.setParameter(s,_15a[s]);}}return _158;}};}if(!dojo._hasResource["com.ibm.mm.enabler.utils.HttpUrl"]){dojo._hasResource["com.ibm.mm.enabler.utils.HttpUrl"]=true;dojo.provide("com.ibm.mm.enabler.utils.HttpUrl");dojo.declare("com.ibm.mm.enabler.utils.HttpUrl",null,{constructor:function(_15c,_15d){if(_15d!==false){var _15e=com.ibm.mm.enabler.EndpointUtils.checkForEndpoints(_15c);if(_15e){_15c=_15e;}}this.pocurl=this._resolvePocUrl(_15c);if(!this.pocurl){this.scheme=this._extractScheme(_15c);this.server=this._extractServer(_15c);this.port=this._extractPort(_15c);this.path=this._extractPath(_15c);this.parameters=this._extractQuery(_15c);this.anchor=this._extractAnchor(_15c);}},_resolvePocUrl:function(_15f){var rv=null;if(com.ibm.mm.enabler.utils.Misc.isPocUrl(_15f)){var _160=this._getPrefix();_15f=escape(unescape(_15f));rv=_160.concat(_15f);}return rv;},_getPrefix:function(){var cs=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME);var _161=cs.getValue(com.ibm.mashups.enabler.services.ConfigConstants.CONTEXT_ROOT);var _162=cs.getValue(com.ibm.mashups.enabler.services.ConfigConstants.ANONYMOUS_USER);var _163;if(_162){_163=cs.getValue(com.ibm.mashups.enabler.services.ConfigConstants.CONTENTHANDLER_PUBLIC);}else{_163=cs.getValue(com.ibm.mashups.enabler.services.ConfigConstants.CONTENTHANDLER_PRIVATE);}var rv=_161.concat(_163).concat("?uri=");return rv;},addParameter:function(name,_164){if(dojo.isString(this.parameters[name])){this.parameters[name]=[this.parameters[name],_164];}else{if(dojo.isArray(this.parameters[name])){this.parameters[name].push(_164);}else{this.parameters[name]=_164;}}},setParameter:function(name,_165){if(!this.parameters){this.parameters={};}this.parameters[name]=_165;},getParameter:function(name){if(!this.parameters){return false;}return this.parameters[name];},getParameters:function(){return this.parameters;},isProxyNeeded:function(){var loc=document.location;if(loc.protocol!=this.scheme){return true;}if(!this._equalsServer(loc.hostname)){return true;}if(loc.port==this.port){return false;}var _166;if(this.scheme=="http:"){_166="80";if((loc.port==""&&this.port==_166)||(loc.port==_166&&this.port=="")){return false;}}if(this.scheme=="https:"){_166="443";if((loc.port==""&&this.port==_166)||(loc.port==_166&&this.port=="")){return false;}}return true;},toServerRelativeString:function(_167){if(this.pocurl){return this.pocurl;}var str="";if(this.path!=""){str+="/"+com.ibm.mm.enabler.utils.Misc.encodePath(this.path,_167);}if(!com.ibm.mm.enabler.utils.Misc.isEmpty(this.parameters)){str+="?"+(_167?this._parametersToQuery(this.parameters):dojo.objectToQuery(this.parameters));}if(this.anchor!=""){str+="#"+this.anchor;}return str;},toProxifiedString:function(){if(this.pocurl){return this.pocurl;}if(typeof ibmConfig=="undefined"){return this.toString();}var _168=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME).getValue(com.ibm.mashups.enabler.services.ConfigConstants.PROXY_URL);if(!_168){return this.toString();}_168+="/";if(window.location.protocol==this.scheme&&this._equalsServer(window.location.hostname)){if(window.location.port==this.port){return this.toString();}else{if(this.scheme=="http:"&&window.location.port==""&&this.port=="80"){return this.toString();}else{if(this.scheme=="https:"&&window.location.port==""&&this.port=="443"){return this.toString();}else{if(this.scheme=="http:"&&window.location.port=="80"&&this.port==""){return this.toString();}else{if(this.scheme=="https:"&&window.location.port=="443"&&this.port==""){return this.toString();}}}}}}if(this.scheme=="https:"){_168+="https/"+this.server+((this.port!="443"&&this.port!="")?":"+this.port:"");}else{_168+="http/"+this.server+((this.port!="80"&&this.port!="")?":"+this.port:"");}_168+="/";if(this.path!=""){_168+=com.ibm.mm.enabler.utils.Misc.encodePath(this.path);}if(!com.ibm.mm.enabler.utils.Misc.isEmpty(this.parameters)){_168+="?"+dojo.objectToQuery(this.parameters);}if(this.anchor!=""){_168+="#"+this.anchor;}return _168;},getPath:function(){return "/"+this.path;},toString:function(_169){if(this.pocurl){return this.pocurl;}var str="";if(this.server!=""){str+=this.scheme+"//"+this.server;if(this.port!=""){if(this.scheme=="http:"&&this.port=="80"){str+="";}else{if(this.scheme=="https:"&&this.port=="443"){str+="";}else{str+=":"+this.port;}}}}str+="/";if(this.path!=""){str+=com.ibm.mm.enabler.utils.Misc.encodePath(this.path,_169);}if(!com.ibm.mm.enabler.utils.Misc.isEmpty(this.parameters)){str+="?"+(_169?this._parametersToQuery(this.parameters):dojo.objectToQuery(this.parameters));}if(this.anchor!=""){str+="#"+this.anchor;}return str;},_parametersToQuery:function(_16a){var str="";var fn=function(_16b){str+=k+"="+_16b+"&";};for(var k in _16a){if(dojo.isArray(_16a[k])){dojo.forEach(_16a[k],fn);}else{fn(_16a[k]);}}if(str.lastIndexOf("&")===str.length-1){str=str.substr(0,str.length-1);}return str;},_isAbsolute:function(){return this._absoluteURL;},_extractScheme:function(_16c){var _16d=_16c.indexOf("/")===0;if(_16d){return window.location.protocol;}var _16e=_16c.indexOf("://");if(_16e==-1){this._absoluteURL=false;return window.location.protocol;}this._absoluteURL=true;return _16c.substring(0,_16e+1);},_extractServer:function(_16f){var _170=_16f.indexOf(this.scheme);var _171="";if(_170===0){var _172;var _173=_16f.indexOf("/",_170+this.scheme.length+2);if(_173!=-1){_172=_16f.substring(_170+this.scheme.length+2,_173);}else{_172=_16f.substring(_170+this.scheme.length+2);}_171=_172.split(":")[0];}else{var _174=window.location.hostname;_171=this._isIPv6(_174)?"["+_174+"]":_174;}return _171;},_extractPort:function(_175){var _176=_175.indexOf("/")===0;if(_176){return window.location.port;}var _177=_175.indexOf(this.scheme);if(_177>0){return window.location.port;}var _178=_175.indexOf(this.server);if(_178>=0){var _179;var _17a=_175.indexOf("/",_178);if(_17a!=-1){_179=_175.substring(_178,_17a);}else{_179=_175.substring(_178);}var _17b=_179.split(":");if(_17b.length>1){return _17b[1];}}return "";},_extractPath:function(_17c){var _17d=_17c.indexOf(this.scheme);var _17e=0;if(_17d===0){_17e=this.scheme.length+2;}var _17f="";var _180=_17c.indexOf("/",_17e);var _181=_17c.indexOf("?");var _182=_17c.lastIndexOf("#");if(_181>=0){_17f=_17c.substring(_180+1,_181);}else{if(_182>=0&&_180!=-1){_17f=_17c.substring(_180+1,_182);}else{if(_180!=-1){_17f=_17c.substring(_180+1);}}}return _17f;},_extractQuery:function(_183){var _184={};var _185=_183.split("?");if(_185.length>1){_184=dojo.queryToObject(_185[1].split("#")[0]);}return _184;},_extractAnchor:function(_186){var _187="";var _188=_186.split("#");if(_188.length>1){_187=_188[_188.length-1];}return _187;},_isIPv6:function(_189){return _189.indexOf(":")!=-1;},_equalsServer:function(_18a){return this.server.toLowerCase()==(this._isIPv6(_18a)?"["+_18a+"]":_18a).toLowerCase();}});}if(!dojo._hasResource["com.ibm.mm.enabler.utils.URLHelper"]){dojo._hasResource["com.ibm.mm.enabler.utils.URLHelper"]=true;dojo.provide("com.ibm.mm.enabler.utils.URLHelper");dojo.declare("com.ibm.mm.enabler.utils.URLHelperImpl",com.ibm.mashups.enabler.utils.URLHelper,{rewriteURL:function(_18b){var _18c=new com.ibm.mm.enabler.utils.HttpUrl(_18b);return _18c.toProxifiedString();}});com.ibm.mashups.enabler.utils.URLHelper=new com.ibm.mm.enabler.utils.URLHelperImpl();com.ibm.mm.enabler.utils.URLHelper=com.ibm.mashups.enabler.utils.URLHelper;}if(!dojo._hasResource["com.ibm.mashups.enabler.utils.URLHelper"]){dojo._hasResource["com.ibm.mashups.enabler.utils.URLHelper"]=true;dojo.provide("com.ibm.mashups.enabler.utils.URLHelper");}if(!dojo._hasResource["com.ibm.mm.enabler.services.ConfigObjectExtendedImpl"]){dojo._hasResource["com.ibm.mm.enabler.services.ConfigObjectExtendedImpl"]=true;dojo.provide("com.ibm.mm.enabler.services.ConfigObjectExtendedImpl");dojo.declare("com.ibm.mm.enabler.services.ConfigObjectExtendedImpl",[com.ibm.mm.enabler.services.ConfigObjectDefaultImpl],{constructor:function(_18d,_18e){this.valuesArray=null;this.provider=_18d;this.configService=_18e;},_getValue:function(_18f,name){if(!this.valuesArray){this._loadConfigData(_18f);}return this.valuesArray[name];},_getValueDeferred:function(_190,name){return new com.ibm.mm.enabler.DeferredImpl(this,function(_191,sync,name){var _192=_191.getFinishedCallback();if(!this.valuesArray){dojo["require"]("com.ibm.mashups.enabler.xml.XPath");dojo["require"]("com.ibm.mashups.enabler.model.url.ModelUrlFactory");dojo["require"]("com.ibm.mm.enabler.services.ModelRestServiceRequest");var _193="ConfigProvider."+_190;var _194=ibmConfig[_193];if((typeof _194!="undefined")||(_194!==null)){_190=_194;}var _195=com.ibm.mashups.enabler.model.url.ModelUrlFactory.createModelURL(com.ibm.mashups.enabler.model.url.ModelUrlFactory.CONFIG_URL,this);_195.setSchemeSpecificPart("/"+_190+"/*");var _196=new com.ibm.mm.enabler.services.ModelRestServiceRequest(_195,null,null,false,sync);var me=this;_196.read(function(type,data,xhr,args){if(!me.valuesArray){me.valuesArray={};}var _197=com.ibm.mashups.enabler.xml.XPath.evaluateXPath("//atom:entry/atom:content/preferences/root/node/map/*",data,me.ns);if(_197&&_197.length>0){for(var i=0,l=_197.length;i0){for(var i=0;i<_19e.length;i++){var name=_19e[i].getAttribute("key");var _19f=_19e[i].getAttribute("value");ret[name]=_19f;}}});this.valuesArray=ret;}});}if(!dojo._hasResource["com.ibm.mashups.enabler.strategy.Strategy"]){dojo._hasResource["com.ibm.mashups.enabler.strategy.Strategy"]=true;dojo.provide("com.ibm.mashups.enabler.strategy.Strategy");dojo.declare("com.ibm.mashups.enabler.strategy.Strategy",null,{});}if(!dojo._hasResource["com.ibm.mashups.enabler.model.Model_API"]){dojo._hasResource["com.ibm.mashups.enabler.model.Model_API"]=true;dojo.provide("com.ibm.mashups.enabler.model.Model_API");dojo.provide("com.ibm.mashups.enabler.model.Model");dojo.declare("com.ibm.mashups.enabler.model.Model",null,{setStrategy:function(_1a0){},getStrategies:function(){},getStrategy:function(_1a1){},addStrategy:function(_1a2){},removeStrategy:function(_1a3){}});}if(!dojo._hasResource["com.ibm.mashups.enabler.model.Model"]){dojo._hasResource["com.ibm.mashups.enabler.model.Model"]=true;dojo.provide("com.ibm.mashups.enabler.model.Model");}if(!dojo._hasResource["com.ibm.mashups.enabler.strategy.NoCacheStrategy"]){dojo._hasResource["com.ibm.mashups.enabler.strategy.NoCacheStrategy"]=true;dojo.provide("com.ibm.mashups.enabler.strategy.NoCacheStrategy");dojo.declare("com.ibm.mashups.enabler.strategy.NoCacheStrategy",com.ibm.mashups.enabler.strategy.Strategy,{_apply:function(_1a4){_1a4.setHeader("Pragma","no-cache");_1a4.setHeader("Cache-Control","no-cache");_1a4.setHeader("If-Modified-Since","Thu, 1 Jan 1970 00:00:00 GMT");}});}if(!dojo._hasResource["com.ibm.mm.enabler.model.ModelImpl"]){dojo._hasResource["com.ibm.mm.enabler.model.ModelImpl"]=true;dojo.provide("com.ibm.mm.enabler.model.ModelImpl");dojo.declare("com.ibm.mm.enabler.model.ModelImpl",com.ibm.mashups.enabler.model.Model,{strategy:null,constructor:function(){this.modelMessages=dojo.i18n.getLocalization("com.ibm.mm.enabler","modelMessages");},setStrategy:function(_1a5){if(_1a5===null||typeof _1a5=="undefined"){this.strategy=null;}else{if(com.ibm.mm.enabler.utils.Misc.isInstanceOf(_1a5,Array)){if(_1a5.length>0){this.strategy=[];dojo.forEach(_1a5,function(item,idx,arr){this.strategy.push(item);this._preprocessStrategy(item);},this);}}else{this.strategy=[_1a5];this._preprocessStrategy(_1a5);}}},getStrategies:function(){return this.strategy||[];},addStrategy:function(_1a6){if(_1a6===null||typeof _1a6=="undefined"){throw new Error(this.modelMessages.E_PARAM_ISNULL_0);}if(null===this.strategy){this.strategy=[];}this._preprocessStrategy(_1a6);for(var i=0,l=this.strategy.length;i=0)){this.strategy.splice(s,1+s);}},getStrategy:function(s){if(!this.strategy){return null;}else{if(dojo.isString(s)){return this._findStrategyByType(s);}else{if(!isNaN(s)&&(s=0)){return this.strategy[s];}else{return null;}}}},_findStrategyByType:function(type){var i=this._getIndexOfStrategyByType(type);return i>=0?this.strategy[i]:null;},_getIndexOfStrategyByType:function(type){if(this.strategy){for(var i=0,l=this.strategy.length;i=0){me._doLogin();return;}if(dojo.isIE){data=com.ibm.mm.enabler.utils.Dom.createDocument(xhr.responseText);}_1ad(com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_LOAD,data,xhr,_1ae);},error:function(_1b2,_1b3){var xhr=_1b3.xhr;var _1b4=xhr.status;if(_1b4==401){me._doLogin();return;}_1ad(com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_ERROR,null,xhr,_1ae);},sync:this._sync,postData:feed.toString(),handleAs:this._handleAs};dojo.rawXhrPost(args);},read:function(_1b5,_1b6){if(this._textOnly){this._retrieveRawFeed(_1b5,_1b6);}else{this._retrieve(_1b5,_1b6);}},update:function(feed,_1b7,_1b8){this._updateCookie();var me=this;var args={url:this._feedURI,ibmMultipart:{context:com.ibm.mashups.enabler.io.XHRMultipartFactory.CONTEXT_ENABLER},load:function(_1b9,_1ba){var xhr=_1ba.xhr;var xrd=xhr.getResponseHeader("X-Request-Digest");if(xrd!==null){com.ibm.mm.enabler.services.ModelRestServiceRequestStatic.setXRequestDigest(xrd);}var _1bb=xhr.getResponseHeader("Content-Type");if(typeof _1bb!="undefined"&&_1bb!==null&&_1bb.indexOf("text/html")>=0){me._doLogin();return;}dojo.partial(_1b7)(com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_LOAD,_1b9,xhr,_1b8);},error:function(_1bc,_1bd){var xhr=_1bd.xhr;var _1be=xhr.status;if(_1be==401){me._doLogin();return;}dojo.partial(_1b7)(com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_ERROR,null,xhr,_1b8);},sync:this._sync,handleAs:this._handleAs};var _1bf={"Content-Type":"application/atom+xml; charset=utf-8","X-IBM-XHR":"true"};var _1c0=com.ibm.mashups.enabler.io.XHRMultipartFactory.create();var _1c1=_1c0.isTransaction();if(com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME).getValue(com.ibm.mashups.enabler.services.ConfigConstants.TUNNEL_MODE)===true&&(!_1c1||this._sync)){_1bf[this.POST_ACTION_HEADER]=this.REQUEST_METHOD_PUT;args.headers=_1bf;args.postData=feed;dojo.rawXhrPost(args);}else{args.putData=feed;args.headers=_1bf;dojo.rawXhrPut(args);}},remove:function(_1c2,_1c3){this._updateCookie();var me=this;var args={url:this._feedURI,ibmMultipart:{context:com.ibm.mashups.enabler.io.XHRMultipartFactory.CONTEXT_ENABLER},load:function(_1c4,_1c5){var type=com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_LOAD;var data=_1c4;var xhr=_1c5.xhr;var xrd=xhr.getResponseHeader("X-Request-Digest");if(xrd!==null){com.ibm.mm.enabler.services.ModelRestServiceRequestStatic.setXRequestDigest(xrd);}var _1c6=xhr.getResponseHeader("Content-Type");if(typeof _1c6!="undefined"&&_1c6!==null&&_1c6.indexOf("text/html")>=0){me._doLogin();return;}if(dojo.isIE){data=com.ibm.mm.enabler.utils.Dom.createDocument(xhr.responseText);}_1c2(type,data,xhr,_1c3);},error:function(_1c7,_1c8){var xhr=_1c8.xhr;var _1c9=xhr.status;if(_1c9==401){me._doLogin();return;}_1c2(com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_ERROR,null,xhr,_1c3);},sync:this._sync,handleAs:this._handleAs};var _1ca={"Content-Type":"application/atom+xml","X-IBM-XHR":"true"};if(com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME).getValue(com.ibm.mashups.enabler.services.ConfigConstants.TUNNEL_MODE)===true){_1ca[this.POST_ACTION_HEADER]=this.REQUEST_METHOD_DELETE;args.headers=_1ca;dojo.rawXhrPost(args);}else{args.headers=_1ca;dojo.xhrDelete(args);}},_retrieveRawFeed:function(_1cb,_1cc){var _1cd=this._headers;_1cd["X-IBM-XHR"]=true;var me=this;dojo.xhrGet({url:this._feedURI,headers:_1cd,ibmMultipart:{context:com.ibm.mashups.enabler.io.XHRMultipartFactory.CONTEXT_ENABLER},load:function(data,_1ce){var xhr=_1ce.xhr;var xrd=xhr.getResponseHeader("X-Request-Digest");if(xrd!==null){com.ibm.mm.enabler.services.ModelRestServiceRequestStatic.setXRequestDigest(xrd);}if((me.logoutVerificationForRaw)&&(xhr.responseText)){var _1cf=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME).getValue(com.ibm.mashups.enabler.services.ConfigConstants.LOGOUT_VERIFICATION_REGEXP);if(_1cf){var _1d0=new RegExp(_1cf);if(_1d0&&(xhr.responseText.match(_1d0))){me._doLogin();return;}}}_1cb(com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_LOAD,data,_1ce.xhr,_1cc);},error:function(data,_1d1){var xhr=_1d1.xhr;var _1d2=xhr.status;if(_1d2==401){me._doLogin();return;}_1cb(com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_ERROR,data,_1d1.xhr,_1cc);},sync:this._sync,handleAs:this._handleAs});},_retrieve:function(_1d3,_1d4,_1d5,_1d6){var _1d7={};var mt="xml";if(dojo.isIE){mt="text";}var _1d8=this._headers;_1d8["X-IBM-XHR"]=true;var me=this;var args={url:this._feedURI,content:_1d7,headers:_1d8,ibmMultipart:{context:com.ibm.mashups.enabler.io.XHRMultipartFactory.CONTEXT_ENABLER},load:function(_1d9,_1da){var data=_1d9;var xhr=_1da.xhr;var xrd=xhr.getResponseHeader("X-Request-Digest");if(xrd!==null){com.ibm.mm.enabler.services.ModelRestServiceRequestStatic.setXRequestDigest(xrd);}var _1db=xhr.getResponseHeader("Content-Type");if(typeof _1db!="undefined"&&_1db!==null&&_1db.indexOf("text/html")>=0){me._doLogin();return;}if(dojo.isIE){var doc=com.ibm.mm.enabler.utils.Dom.createDocument(data);_1d3(com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_LOAD,doc,xhr,_1d4);}else{_1d3(com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_LOAD,data,xhr,_1d4);}},error:function(_1dc,_1dd){var data=_1dc;var xhr=_1dd.xhr;var _1de=xhr.status;if(_1de==401){me._doLogin();return;}if(dojo.isIE){var doc=null;try{if(data){doc=com.ibm.mm.enabler.utils.Dom.createDocument(data);}}catch(e){}_1d3(com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_ERROR,doc,xhr,_1d4);}else{_1d3(com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_ERROR,data,xhr,_1d4);}},sync:this._sync,handleAs:mt};var _1df="Get";if(this._formNode){args.form=this._formNode;_1df="Post";}if(this._formFilter){args.formFilter=this._formFilter;}dojo["xhr"+_1df](args);},_updateCookie:function(){var dt=new Date();var _1e0={};_1e0.path=this._config.getValue(com.ibm.mashups.enabler.services.ConfigConstants.CONTEXT_ROOT);dojo.cookie(this.MODIFICATION_COOKIE,dt.getTime(),_1e0);},_doLogin:function(){dojo["require"]("com.ibm.mashups.enabler.model.state.NavigationStateModelFactory");dojo["require"]("com.ibm.mashups.enabler.model.state.UrlGeneratorFactory");var pid=null;var url=document.location.href;var cb=function(url){if(url){top.location.href=url;}};var _1e1=com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel();com.ibm.mashups.enabler.model.state.UrlGeneratorFactory.getURLGenerator().getUrl(_1e1,cb,{nohash:"true"});},toString:function(){return this._feedURI;}});com.ibm.mm.enabler.services.ModelRestServiceRequestStatic={xRequestDigest:null,getXRequestDigest:function(){if((null===this.xRequestDigest)&&(ibmConfig["com.ibm.resolver.digest"])){this.xRequestDigest=ibmConfig["com.ibm.resolver.digest"];}return this.xRequestDigest;},setXRequestDigest:function(_1e2){this.xRequestDigest=_1e2;},invalidateXRequestDigest:function(){var dt=new Date();var _1e3=dt.getTime();this.setXRequestDigest(_1e3);var _1e4={};var cs=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME);_1e4.path=cs.getValue(com.ibm.mashups.enabler.services.ConfigConstants.CONTEXT_ROOT);dojo.cookie("modified.id",_1e3,_1e4);}};com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_LOAD="load";com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_ERROR="error";}if(!dojo._hasResource["com.ibm.mm.enabler.endpoints.XHREndpointExtensionImpl"]){dojo._hasResource["com.ibm.mm.enabler.endpoints.XHREndpointExtensionImpl"]=true;dojo.provide("com.ibm.mm.enabler.endpoints.XHREndpointExtensionImpl");dojo.declare("com.ibm.mm.enabler.endpoints.XHREndpointExtensionImpl",null,{LOG_LEVEL:com.ibm.mashups.enabler.logging.LogLevel.TRACE,constructor:function(){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_METHOD="dojo.xhrGet()";this.bIsLoggable=this.LOGGER.isLoggable(this.LOG_LEVEL);this.originalDojoXHR=dojo.xhr;dojo.xhr=dojo.hitch(this,function(_1e5,args,_1e6){if(this.bIsLoggable){this.LOGGER.entering(this.LOG_METHOD,[args]);}var url=args.url;var url2=com.ibm.mm.enabler.EndpointUtils.checkForEndpoints(url);url2=url2||null;if(url2!==null){args.url=url2;}var ret=this.originalDojoXHR(_1e5,args,_1e6);if(this.bIsLoggable){this.LOGGER.exiting(this.LOG_METHOD);}return ret;});}});com.ibm.mm.enabler.endpoints.XHREndpointExtension=new com.ibm.mm.enabler.endpoints.XHREndpointExtensionImpl();}if(!dojo._hasResource["com.ibm.mm.enabler.services.ConfigServiceExtendedImpl"]){dojo._hasResource["com.ibm.mm.enabler.services.ConfigServiceExtendedImpl"]=true;dojo.provide("com.ibm.mm.enabler.services.ConfigServiceExtendedImpl");dojo.declare("com.ibm.mm.enabler.services.ConfigServiceExtendedImpl",[com.ibm.mm.enabler.services.ConfigServiceDefaultImpl],{constructor:function(){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger("com.ibm.mm.enabler.services.ConfigServiceExtendedImpl");},_getConfigObject:function(_1e7){if(!ibmConfig["CO_"+_1e7]){var co=new com.ibm.mm.enabler.services.ConfigObjectExtendedImpl(_1e7,this);ibmConfig["CO_"+_1e7]=co;}return ibmConfig["CO_"+_1e7];},_getConfigProviderNames:function(){dojo["require"]("com.ibm.mashups.enabler.model.url.ModelUrlFactory");var ret=[];ret.push("all");var _1e8=com.ibm.mashups.enabler.model.url.ModelUrlFactory.createModelURL(com.ibm.mashups.enabler.model.url.ModelUrlFactory.CONFIG_URL,this);_1e8.setSchemeSpecificPart("/*");_1e8.setParameter("rep","compact");var _1e9=new com.ibm.mm.enabler.services.ModelRestServiceRequest(_1e8,null,null,false,true);var me=this;_1e9.read(function(type,data,xhr,args){var _1ea=com.ibm.mashups.enabler.xml.XPath.evaluateXPath("//atom:entry/atom:id",data,me.ns);if(_1ea&&_1ea.length>0){for(var i=0,l=_1ea.length;i0){var _1fc=[];for(var ii=0,ll=_1fb.length;ii0){var _205=[];for(var ii=0,ll=_204.length;iithis.max_version)){_209=-1000;}_207[i]=_209;}var _20b=-1;var _20c=1000;for(i=0,scl=_207.length;i_20c){_20b=i;_20c=_207[i];}}if(_20b==-1){return null;}return this.cache[_20b];},_processCollection:function(i,node){var ret={};var _20d="app:categories//atom:category[@term]";var _20e=com.ibm.mashups.enabler.xml.XPath.evaluateXPath(_20d,node,this.ns);var _20f=[];if(_20e){for(var jj=0,ll=_20e.length;jj0;i--){if(fn===this._dirtyCallbacks[i-1].fn){this._dirtyCallbacks.splice(i-1,1);break;}}}}});}if(!dojo._hasResource["com.ibm.mashups.enabler.DirtyFlagProvider"]){dojo._hasResource["com.ibm.mashups.enabler.DirtyFlagProvider"]=true;dojo.provide("com.ibm.mashups.enabler.DirtyFlagProvider");}if(!dojo._hasResource["com.ibm.mashups.enabler.Discardable_API"]){dojo._hasResource["com.ibm.mashups.enabler.Discardable_API"]=true;dojo.provide("com.ibm.mashups.enabler.Discardable_API");dojo.provide("com.ibm.mashups.enabler.Discardable");dojo.declare("com.ibm.mashups.enabler.Discardable",null,{discard:function(node){}});}if(!dojo._hasResource["com.ibm.mashups.enabler.Discardable"]){dojo._hasResource["com.ibm.mashups.enabler.Discardable"]=true;dojo.provide("com.ibm.mashups.enabler.Discardable");}if(!dojo._hasResource["com.ibm.mashups.enabler.Identifiable"]){dojo._hasResource["com.ibm.mashups.enabler.Identifiable"]=true;dojo.provide("com.ibm.mashups.enabler.Identifiable");dojo.declare("com.ibm.mashups.enabler.Identifiable",null,{getID:function(){},getUniqueName:function(){}});}if(!dojo._hasResource["com.ibm.mashups.enabler.Invalidatable_API"]){dojo._hasResource["com.ibm.mashups.enabler.Invalidatable_API"]=true;dojo.provide("com.ibm.mashups.enabler.Invalidatable_API");dojo.provide("com.ibm.mashups.enabler.Invalidatable");dojo.declare("com.ibm.mashups.enabler.Invalidatable",null,{invalidate:function(node){}});}if(!dojo._hasResource["com.ibm.mashups.enabler.Invalidatable"]){dojo._hasResource["com.ibm.mashups.enabler.Invalidatable"]=true;dojo.provide("com.ibm.mashups.enabler.Invalidatable");}if(!dojo._hasResource["com.ibm.mashups.enabler.Locator"]){dojo._hasResource["com.ibm.mashups.enabler.Locator"]=true;dojo.provide("com.ibm.mashups.enabler.Locator");dojo.declare("com.ibm.mashups.enabler.Locator",null,{find:function(id){}});}if(!dojo._hasResource["com.ibm.mashups.enabler.ListModel"]){dojo._hasResource["com.ibm.mashups.enabler.ListModel"]=true;dojo.provide("com.ibm.mashups.enabler.ListModel");dojo.declare("com.ibm.mashups.enabler.ListModel",[com.ibm.mashups.enabler.model.Model,com.ibm.mashups.enabler.Locator],{iterator:function(){}});}if(!dojo._hasResource["com.ibm.mashups.enabler.ListModelController"]){dojo._hasResource["com.ibm.mashups.enabler.ListModelController"]=true;dojo.provide("com.ibm.mashups.enabler.ListModelController");dojo.declare("com.ibm.mashups.enabler.ListModelController",com.ibm.mashups.enabler.ListModel,{create:function(_22b){},confirmCreate:function(_22c){},insert:function(node,_22d){},confirmInsert:function(node,_22e){},remove:function(node){},confirmRemove:function(node){}});}if(!dojo._hasResource["com.ibm.mashups.enabler.Localized_API"]){dojo._hasResource["com.ibm.mashups.enabler.Localized_API"]=true;dojo.provide("com.ibm.mashups.enabler.Localized_API");dojo.provide("com.ibm.mashups.enabler.Localized");dojo.declare("com.ibm.mashups.enabler.Localized",null,{getLocales:function(){},getTitle:function(_22f){},getTitles:function(){},getDescription:function(_230){},getDescriptions:function(_231){}});}if(!dojo._hasResource["com.ibm.mashups.enabler.ModifiableLocalized"]){dojo._hasResource["com.ibm.mashups.enabler.ModifiableLocalized"]=true;dojo.provide("com.ibm.mashups.enabler.ModifiableLocalized");dojo.declare("com.ibm.mashups.enabler.ModifiableLocalized",com.ibm.mashups.enabler.Localized,{setTitle:function(_232,_233){},confirmSetTitle:function(_234,_235){},removeTitle:function(_236){},confirmRemoveTitle:function(_237){},removeTitles:function(){},confirmRemoveTitles:function(){},setDescription:function(desc,_238){},confirmSetDescription:function(desc,_239){},removeDescription:function(_23a){},confirmRemoveDescription:function(_23b){},removeDescriptions:function(){},confirmRemoveDescriptions:function(){}});}if(!dojo._hasResource["com.ibm.mashups.enabler.Localized"]){dojo._hasResource["com.ibm.mashups.enabler.Localized"]=true;dojo.provide("com.ibm.mashups.enabler.Localized");}if(!dojo._hasResource["com.ibm.mashups.enabler.Representation_API"]){dojo._hasResource["com.ibm.mashups.enabler.Representation_API"]=true;dojo.provide("com.ibm.mashups.enabler.Representation_API");dojo.provide("com.ibm.mashups.enabler.Representation");dojo.declare("com.ibm.mashups.enabler.Representation",com.ibm.mashups.enabler.Identifiable,{getID:function(){},getURL:function(){},getMimeType:function(){}});}if(!dojo._hasResource["com.ibm.mm.enabler.RepresentationImpl"]){dojo._hasResource["com.ibm.mm.enabler.RepresentationImpl"]=true;dojo.provide("com.ibm.mm.enabler.RepresentationImpl");dojo.declare("com.ibm.mm.enabler.RepresentationImpl",com.ibm.mashups.enabler.Representation,{constructor:function(url,type){this.url=url;this.type=type;},getID:function(){return this.type;},getURL:function(){return this.url;},getMimeType:function(){return this.type;}});}if(!dojo._hasResource["com.ibm.mashups.enabler.Representation"]){dojo._hasResource["com.ibm.mashups.enabler.Representation"]=true;dojo.provide("com.ibm.mashups.enabler.Representation");}if(!dojo._hasResource["com.ibm.mashups.enabler.RepresentationProvider_API"]){dojo._hasResource["com.ibm.mashups.enabler.RepresentationProvider_API"]=true;dojo.provide("com.ibm.mashups.enabler.RepresentationProvider_API");dojo.provide("com.ibm.mashups.enabler.RepresentationProvider");dojo.declare("com.ibm.mashups.enabler.RepresentationProvider",null,{getAlternateModel:function(){}});}if(!dojo._hasResource["com.ibm.mm.enabler.RepresentationModelImpl"]){dojo._hasResource["com.ibm.mm.enabler.RepresentationModelImpl"]=true;dojo.provide("com.ibm.mm.enabler.RepresentationModelImpl");dojo.declare("com.ibm.mm.enabler.RepresentationModelImpl",[com.ibm.mashups.enabler.ListModel,com.ibm.mm.enabler.DeferredIteratorImpl],{constructor:function(_23c){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.loadedNodes={};this.entries=[];this.cursor=0;this.size=null;this.start=null;this.num=null;this.strategy=null;if(_23c&&_23c.length>0){this.size=_23c.length;for(var i=0;i<_23c.length;i++){var link=_23c[i];var url=link.getAttribute("href");var _23d=link.getAttribute("type");var uri=_23d;var node=new com.ibm.mm.enabler.RepresentationImpl(url,_23d);this.entries[i]=uri;this.loadedNodes[uri]=node;}}},find:function(uri){return new com.ibm.mm.enabler.DeferredImpl(this,this._find,uri);},_find:function(_23e,sync,uri){return this._load(uri,_23e,sync);},start:function(sync){while(this._hasNext(this,sync)){if(this._next(this,sync)){continue;}else{break;}}},hasNext:function(){return this._hasNext(null,true);},_hasNext:function(_23f,sync){if(this.start===null||this.cursor=(this.start+this.num)&&(this.size>this.cursor))){this._loadAhead(_23f,sync);}return (this.size>this.cursor);},next:function(){return this._next(null,true);},_next:function(_240,sync){return this._hasNext(_240,sync)?this.loadedNodes[this.entries[this.cursor++]]:null;},size:function(){return this.size;},setCursorPosition:function(_241){this.cursor=_241;},getCursorPosition:function(){return this.cursor;},setStrategy:function(_242){if(com.ibm.mm.enabler.utils.Misc.isInstanceOf(_242,Array)){this.strategy=_242[0];}else{this.strategy=_242;}},_load:function(uri,_243,sync){var _244="_load";var _245=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_245){this.LOGGER.entering(_244,arguments);}if(uri in this.loadedNodes){if(_243){_243.finish(this.loadedNodes[uri],com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK);}}if(_245){this.LOGGER.exiting(_244,this.loadedNodes[uri]);}return this.loadedNodes[uri];},_loadAhead:function(_246,sync){}});}if(!dojo._hasResource["com.ibm.mm.enabler.RepresentationProviderImpl"]){dojo._hasResource["com.ibm.mm.enabler.RepresentationProviderImpl"]=true;dojo.provide("com.ibm.mm.enabler.RepresentationProviderImpl");dojo.declare("com.ibm.mm.enabler.RepresentationProviderImpl",com.ibm.mashups.enabler.RepresentationProvider,{constructor:function(){this.serviceJson=com.ibm.mm.enabler.model.ServiceDocumentModel.getCollectionData(com.ibm.mm.enabler.model.ServiceDocumentModel.SERVICE_NAVIGATION);var nsf=com.ibm.mm.enabler.model.NameSpaceFactory;this.r_ns=dojo.delegate(this.serviceJson.namespaces,nsf.getNameSpaces([nsf.NS_ATOM,nsf.NS_XML]));this.XPATH="atom:link";},getAlternateModel:function(){var _247=[];var md=com.ibm.mashups.enabler.xml.XPath.evaluateXPath(this.XPATH,this.xmlData,this.r_ns);if(md&&md.length>0){for(var i=0,l=md.length;i0){if(i#%{}|\\^~[]`\"Z",constructor:function(){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);},isUnsafeChar:function(_2a9){if(this.UNSAFE_CHARS.indexOf(_2a9)>-1||_2a9.charCodeAt(0)<=32||_2a9.charCodeAt(0)>=123){return true;}return false;},zEncode:function(_2aa){var _2ab="";for(var i=0;i<_2aa.length;++i){var _2ac=_2aa.charAt(i);if(!this.isUnsafeChar(_2ac)){_2ab+=_2ac;continue;}_2ab+=this.zEncodeChar(_2ac);}return _2ab;},zEncodeChar:function(_2ad){var _2ae="Z";return _2ae+this.byteToHex(_2ad.charCodeAt(0));},byteToHex:function(_2af){var _2b0=Math.floor(_2af/16);var _2b1=_2af%16;return this.HEX_CHARS[_2b0]+this.HEX_CHARS[_2b1];},zDecode:function(_2b2){var _2b3="";var _2b4="Z";if(_2b2.indexOf(_2b4)!=-1){for(var i=0,l=_2b2.length;i0){_2ba.dwords.push(_2ba.dword);len+=((_2ba.bits+7)>>3);_2ba.bits=0;}return this._encodeBase64(_2ba.dwords,0,len);},_initStream:function(_2bb){_2bb.dword=0;_2bb.mask=1;_2bb.bits=0;_2bb.dwords=[];return _2bb;},_addBits:function(_2bc,data){var mask=_2bc.mask,_2bd=_2bc.dword,bits=_2bc.bits;var len=data.length,off=0;while(len>0){var copy=Math.min(len,32-bits);for(var i=0;i>2;var _2c0=off&3;var _2c1=data[_2bf++],_2c2;var c1,c2,c3,c4;var _2c3="";for(var i=len;i>0;i-=3){switch(_2c0){case 0:c1=((_2c1>>2)&63);c2=((_2c1<<4)&48)|((_2c1>>12)&15);c3=((_2c1>>6)&60)|((_2c1>>22)&3);c4=((_2c1>>16)&63);_2c0=3;break;case 1:c1=((_2c1>>10)&63);c2=((_2c1>>4)&48)|((_2c1>>20)&15);c3=((_2c1>>14)&60)|((_2c1>>30)&3);c4=((_2c1>>24)&63);_2c0=0;_2c1=data[_2bf++];break;case 2:_2c2=data[_2bf++];c1=((_2c1>>18)&63);c2=((_2c1>>12)&48)|((_2c1>>28)&15);c3=((_2c1>>22)&60)|((_2c2>>6)&3);c4=(_2c2&63);_2c1=_2c2;_2c0=1;break;case 3:_2c2=data[_2bf++];c1=((_2c1>>26)&63);c2=((_2c1>>20)&48)|((_2c2>>4)&15);c3=((_2c2<<2)&60)|((_2c2>>14)&3);c4=((_2c2>>8)&63);_2c1=_2c2;_2c0=2;break;}switch(i){case 1:c3=64;c4=64;break;case 2:c4=64;break;}_2c3+=ab.charAt(c1);_2c3+=ab.charAt(c2);_2c3+=ab.charAt(c3);_2c3+=ab.charAt(c4);}return _2c3;},_decodeBase64:function(_2c4){var ab=this.URL_ALPHABET;var len=_2c4.length/4;var i=0;var _2c5=[];for(var j=0;j>4);c2=((indexC2&15)<<4)|(indexC3>>2);c3=((indexC3&3)<<6)|indexC4;_2c5.push(c1);switch(_2c6){case 0:_2c5.push(c2);_2c5.push(c3);break;case 1:_2c5.push(c2);break;case 2:break;}}return _2c5;},_frequencyCompare:function(n1,n2){return n1.frequency-n2.frequency;},_initTree:function(_2c7,node,_2c8){if(node.left&&node.right){this._addBit(_2c7,1);this._initTree(_2c7,node.left,_2c8.concat(0));this._initTree(_2c7,node.right,_2c8.concat(1));}else{this._addBit(_2c7,0);node.prefix=_2c8;_2c7.tokens.push(node.name);}return _2c7;},_dumpTokens:function(tree,_2c9){var _2ca=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_2ca){for(var i=0;i=0;--i){var _2cd=_2cb[i];node=_2cc[_2cd];if(node){node.frequency++;}else{node={frequency:1,name:_2cd};_2cc[_2cd]=node;}}var _2ce=[];for(node in _2cc){if(Object.prototype.hasOwnProperty.call(_2cc,node)){_2ce.push(_2cc[node]);}}_2ce.sort(this._frequencyCompare);while(_2ce.length>1){var left=_2ce.shift(),_2cf=_2ce.shift();_2ce.push({frequency:left.frequency+_2cf.frequency,left:left,right:_2cf});_2ce.sort(this._frequencyCompare);}var root=_2ce[0];var tree=this._initTree(this._initStream({tokens:[]}),_2ce.shift(),[]);this._dumpTokens(tree,_2cc);var url=this._encodeStream(tree);len=tree.tokens.length;for(i=0;i=0)&&(i1>=0)){var _2d6=this._decodeBase64(tree.substring(0,i0));var _2d7=tree.substring(i0+1,i1).split("/");var _2d8=this._decodeBase64(tree.substring(i1+1));encodedTokens=this._decodeTokens(_2d7);var root=this._readStructure(this._convertBitToChar(_2d6),encodedTokens);var _2d9=this._convertBitToChar(_2d8);var _2da="";while(_2d9.length>0){_2da=this._buildData(_2da,_2d9,root);}return _2da;}return null;},_buildData:function(_2db,_2dc,root){var _2dd=false;var node=null;while(!_2dd){var bit=_2dc.shift();if(typeof bit=="undefined"){node=null;break;}node=this._getNode(bit,root);if(node&&node.token&&node.token){_2dd=true;}else{if(!node){_2dd=true;}}root=node;}if(_2dd&&node){_2db=_2db.concat(node.token);}return _2db;},_getNode:function(bit,_2de){var node=null;node=(bit==1)?_2de.right:_2de.left;if(!node){return null;}return node;},_convertBitToChar:function(_2df){var arr=[];var mask=1;var bit=0;for(var i=0;i<_2df.length;i++){var _2e0=_2df[i];for(var j=0;j<8;j++){bit=_2e0&mask;arr.push(bit);_2e0=(_2e0>>1);}}return arr;},_readStructure:function(_2e1,_2e2){var bit=_2e1.shift();var node={};if(bit==1){node.left=this._readStructure(_2e1,_2e2);node.right=this._readStructure(_2e1,_2e2);}else{var _2e3=_2e2.shift();node.token=_2e3;}return node;},_decodeTokens:function(_2e4){var arr=[];for(var i in _2e4){if(Object.prototype.hasOwnProperty.call(_2e4,i)){arr.push(com.ibm.mm.enabler.encode.huffman.ZEncoder.zDecode(_2e4[i]));}}return arr;}});com.ibm.mm.enabler.encode.huffman.HuffmanURL=new com.ibm.mm.enabler.encode.huffman.HuffmanURL();}if(!dojo._hasResource["com.ibm.mm.enabler.ArrayMap"]){dojo._hasResource["com.ibm.mm.enabler.ArrayMap"]=true;dojo.provide("com.ibm.mm.enabler.ArrayMap");dojo.declare("com.ibm.mm.enabler.ArrayMap",null,{constructor:function(){this.entries=[];this.keys={};},values:function(){return this.entries;},put:function(key,_2e5){var _2e6=this.keys[key];if(typeof _2e6!="undefined"&&_2e6!==null){this.entries[_2e6]=_2e5;}else{_2e6=this.entries.length;this.entries.push(_2e5);this.keys[key]=_2e6;}},getKey:function(_2e7){if(_2e7=400){if(this.error){this.error(new Error(_2f6.xhr.status+": "+_2f7.URI),_2f6,_2f7);}}else{if(this.load){this.load(_2f5,_2f6,_2f7);}}}if(this.handle){this.handle(_2f5,_2f6,_2f7);}}catch(err){try{if(this.error){this.error(_2f5,_2f6,_2f7);}}catch(err2){}}});work();},_handleMultiPartResponse:function(_2f8,_2f9,_2fa,_2fb,_2fc){var _2fd=_2fc.xhr.getResponseHeader("Content-Type");var _2fe=_2fd.match(_2fa.boundaryRegx);if(!_2fe){throw new Error("No boundary specified in Content-Type response header");}var _2ff=_2fe[1];var _300=_2ff.indexOf(";");if(_300!=-1){_2ff=_2ff.substring(0,_300);}var _301=new RegExp(_2fa.newL+_2fa.sep+_2ff,"mg");var _302=_2fb.split(_301);var _303=null;if(_2f9){_303=new com.ibm.mm.enabler.io.XHRMultipartImpl();_303.startTransaction();}var i=1;for(var _304 in _2f8){if(Object.prototype.hasOwnProperty.call(_2f8,_304)){var _305=_2f8[_304];for(var x=0,l=_305.length;x0)){if(-1==_308[1].indexOf(":")){continue;}if(-1==_308[1].indexOf("digest=")){var _30b=_308[1].match(_2fa.headerPartsRegx);_307[_30b[1]]=_30b[2];if(_30b[1]=="X-Status-Code"){_309=_30b[2];}else{if(_30b[1]=="Content-Type"){_2fd=_30b[2];}else{if(_30b[1]=="Content-Language"){_30a=_30b[2];}}}}}part=dojo.string.trim(part.substr(_2fa.headerRegx.lastIndex+_2fa.newL.length));var _30c="";var _30d="";var _30e=parseInt(_309,10);if(_30e<400){_30d=part;if(_306.handleAs=="xml"){_30c=com.ibm.mm.enabler.utils.Dom.createDocument(part);}else{_30c=dojo.contentHandlers[_306.handleAs]({responseText:part});}}else{if(_2fd&&_2fd.indexOf(this.CONTENT_TYPE_SOAP)===0){var _30f=com.ibm.mm.enabler.utils.Dom.createDocument(part);var _310="env:Fault/env:Reason/env:Text/@xml:lang";var _311=com.ibm.mashups.enabler.xml.XPath.evaluateXPath(_310,_30f,this.ns);if(!_30a){_30a=_2fc.xhr.getResponseHeader("Content-Language");}var _312=null;if(_30a&&_311){var _313=dojo.map(_311,function(node){return node.textContent;});_312=com.ibm.mm.enabler.utils.LocaleHelper.matchLocale(_30a,_313);}var expr="env:Fault/env:Reason/env:Text";if(_312){expr+="[@xml:lang='"+_312+"']";}var node=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(expr,_30f,this.ns);if(node){_30d=com.ibm.mm.enabler.utils.Dom.textContent(node);_30c=_30d;}}}var _314=new com.ibm.mm.enabler.io.XHRWrapper(_2fc,_30d,_30e,_2fd,_307);var xhr=_2fc.xhr;_2fc.xhr=_314;_2fa._partHandler(_306,_30c,_2fc,_307);_2fc.xhr=xhr;}}}if(_2f9){var _315=false;if(_2fc&&_2fc["com.ibm.mm.Multipart.forceOnNextResponse"]){_315=_2fc["com.ibm.mm.Multipart.forceOnNextResponse"];}_303.endTransactionDeferred(_315).start();}},_multiPartXhr:function(_316,args,_317,_318){var body="";var _319=null;for(var _31a in _317){if(Object.prototype.hasOwnProperty.call(_317,_31a)){for(var _31b in _317[_31a]){if(Object.prototype.hasOwnProperty.call(_317[_31a],_31b)){var part=_317[_31a][_31b];part.handleAs=part.handleAs?part.handleAs.toLowerCase():"text";_319="";for(var x in part.headers){if(Object.prototype.hasOwnProperty.call(part.headers,x)){_319+=x+": "+part.headers[x]+this.newL;}}body+=this.startB+_319+this.newL;if(part.data&&part.data.length>1){body+=part.data+this.newL;}else{if(part.postData&&part.postData.length>1){body+=part.postData+this.newL;}else{if(part.putData&&part.putData.length>1){body+=part.putData+this.newL;}}}}}}}body+=this.endB;if(_316.toUpperCase()!="PUT"){_316="POST";}var me=this;var _31c;var _31d=dojo.mixin({},args,{load:function(_31e,_31f){me._handleMultiPartResponse(_317,_318,me,_31e,_31f);_31c=_31f.xhr.status;},error:function(_320,_321){for(var part in _317){for(var x=0,l=part.length;xthis.urlMaxLength){if(!this.splitTransactions){if(_33b){this.LOGGER.trace(_33a,"url is too long, falling back to POST");}_33c=this._doMultipartPOSTRequest(this.method,_339,this.multipartParts);}else{if(_33b){this.LOGGER.trace(_33a,"url is too long, split transactions is enabled");}_33c=this._doMultipartGETSplitRequest(_339,url);}}else{_33c=this._doMultipartGETRequest(url,_339);}}else{_33c=this._doMultipartPOSTRequest(this.method,_339,this.multipartParts);}return _33c;},_doMultipartGETSplitRequest:function(_33d,_33e){var urls=[];for(var url in _33d){urls.push(url);}if(urls.length==0){return 200;}var _33f;if(!_33e){_33f=this._createHuffmanUrl(_33d);}else{_33f=_33e;}if(_33f.length<=this.urlMaxLength||urls.length==1){return this._doMultipartGETRequest(_33f,_33d);}var half=Math.round(urls.length/2);var left={};for(var i=0;i_342?_340:_342;},_doMultipartGETRequest:function(url,_343){var me=this;xhrArgs={url:url,load:function(_344,_345){me._handleMultiPartResponse(_343,me.multipartParts,me,_344,_345);status=_345.xhr.status;},error:function(_346,_347){for(var part in _343){for(var x=0,l=part.length;x_34a){_34a=_34b;}}}else{var _34c={};var pub=_349[this.SCOPE_PUBLIC];for(var part in pub){if(Object.prototype.hasOwnProperty.call(pub,part)){for(var i=0,l=pub[part].length;i_354){_354=_355;}}}}else{var _357=this.partsArray;_354=this._loadPartsArray(_357);}if(_354!==0&&_34e){_34e(_34f);}if(_351){this.LOGGER.exiting(_350);}},endTransactionDeferred:function(_358){if(typeof _358!=="undefined"&&true===_358){this.multipartParts=true;}return new com.ibm.mm.enabler.DeferredOperationImpl(this,this._endTransaction);},_endTransaction:function(_359,sync){var _35a="_endTransaction(deferred, sync)";var _35b=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_35b){this.LOGGER.entering(_35a,[_359,sync]);}if(!this.doMultipart){if(_35b){this.LOGGER.exiting(_35a);}return;}this._release();if(0_35d){_35d=tmpStatus;}}}}else{var _35f=this.partsArray;_35d=this._loadPartsArray(_35f);}if(_35d!==0&&_359){var _360=_359.getOperationCallback();if(_360){_360(id,com.ibm.mashups.enabler.DeferredOperation.OPERATION_GET,xhr.status,myDeferred.getOperationCallbackParameters());}}if(_35b){this.LOGGER.exiting(_35a);}},_doMultipartPOSTRequest:function(_361,_362,_363){var _364=this._processMultipartBody(_362);this._initServiceDoc();var _365;if(_364){_365={url:this.serviceCHJson.url,sync:true};}else{_365={url:this.serviceMPJson.url,sync:true};}var _366=this._multiPartXhr(_361,_365,_362,_363);return _366;},_assocArraySize:function(_367){var size=0;for(var x in _367){if(Object.prototype.hasOwnProperty.call(_367,x)){size++;}}return size;},_addToPartsArray:function(_368,args){var _369=_368[args.url];if(!_369){_368[args.url]=[];_368[args.url][0]=args;}else{_369[_369.length]=args;}},_acquire:function(){this.statics.semaphore++;},_release:function(_36a,_36b){this.statics.semaphore--;},_createPocURI:function(args){var _36c="_createPocURI(args)";var _36d=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_36d){this.LOGGER.entering(_36c,args);}var url=args.url;var _36e=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME).getValue(com.ibm.mashups.enabler.services.ConfigConstants.PROXY_URL);var _36f=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME).getValue(com.ibm.mashups.enabler.services.ConfigConstants.LOCALAPPS_REGEX);_36e+="/http/";if(url.indexOf(_36e)===0){var _370="http://";var _371=url.indexOf("/",_36e.length+1);if(_371>-1){_370+=unescape(url.substring(_36e.length,_371));_370+=url.substring(_371);}else{_370="http://"+url.substring(_36e.length);}url=_370;}var _372=new com.ibm.mm.enabler.utils.HttpUrl(url);var _373=this._extractDigest(_372,url);if(_373){if(null===this.digest&&false===this.replaceDigest){this.replaceDigest=true;}else{if(_373!==this.digest){this.replaceDigest=false;}}this.digest=_373;}else{this.digest="";this.replaceDigest=false;}if(args.content){for(var name in args.content){if(Object.prototype.hasOwnProperty.call(args.content,name)){var _374=args.content[name];_372.addParameter(name,_374);}}}var uri="";var _375=_372.isProxyNeeded();var _376=null;if(_36f){_376=new RegExp(_36f);}if((_375)||(_376&&(url.match(_376)))){uri=_372.toString();}else{var _377=(args.method)?args.method.toLowerCase():null;if(_377&&!this.useSinkForModRequests&&(_377=="post"||_377=="put"||_377=="delete")){uri=_372.getParameter("uri");}else{uri="res:"+_372.toServerRelativeString();}}if(_36d){this.LOGGER.trace(_36c,"proxy? ${0}: ${1}",[_375,uri]);}if(_36d){this.LOGGER.exiting(_36c,uri);}return uri;},_processMultipartBody:function(_378){var _379="_processMultipartBody(parts)";var _37a=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_37a){this.LOGGER.entering(_379,_378);}var _37b=false;for(var w in _378){if(Object.prototype.hasOwnProperty.call(_378,w)){for(var x in _378[w]){if(Object.prototype.hasOwnProperty.call(_378[w],x)){var args=_378[w][x];var uri=this._createPocURI(args);var _37c=uri;args.headers=dojo.mixin({},args.headers,{"X-Method-Override":args.method,"Content-ID":_37c});if("GET"!==args.method){_37b=true;}}}}}if(_37a){this.LOGGER.exiting(_379,_37b);}return _37b;},_createSiteMap:function(_37d){var _37e="_createSiteMap(parts)";var _37f=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_37f){this.LOGGER.entering(_37e,_37d);}var cxml="";for(var w in _37d){if(Object.prototype.hasOwnProperty.call(_37d,w)){var args=_37d[w][0];args.handleAs=args.handleAs?args.handleAs.toLowerCase():"text";var uri=this._createPocURI(args).replace(//g,">").replace(/&/g,"&");cxml+="";}}cxml+="";if(_37f){this.LOGGER.exiting(_37e,cxml);}return cxml;},_extractDigest:function(_380,url){var _381="_extractDigest(httpUrl, url)";var _382=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_382){this.LOGGER.entering(_381,[_380,url]);}var _383;var _384=_380.getParameter("digest");if(!_384){var _385=url.indexOf("digest!");if(0<_385){_385+=7;var end=url.indexOf("/",_385);_383=url.substring(_385,end);}if(_382){this.LOGGER.trace(_381,"digest portal style - ${0}",_383);}}else{_383=_384;}if(_382){this.LOGGER.exiting(_381,_383);}return _383;},_updateDigest:function(url){var _386="_updateDigest(url)";var _387=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_387){this.LOGGER.entering(_386,url);}if(!this.replaceDigest){if(_387){this.LOGGER.trace(_386,"this.replaceDigest is false, returning");this.LOGGER.exiting(_386,url);}return url;}var _388;var end;var _389=url.indexOf("digest!");if(0<_389){_389+=7;end=url.indexOf("/",_389);_388=url.substring(_389,end);}else{if(!_388){_389=url.indexOf("digest=");if(0<_389){_389+=7;end=url.indexOf("&",_389);if(-1===end){_388=url.substring(_389);}else{_388=url.substring(_389,end);}}}}if(_387){this.LOGGER.trace(_386,"extracted digest - ${0}",_388);}var _38a=url;if(_388){_38a=url.replace(_388,this.digest);}if(_387){this.LOGGER.exiting(_386,_38a);}return _38a;}});}if(!dojo._hasResource["com.ibm.mashups.enabler.io.XHRMultipart"]){dojo._hasResource["com.ibm.mashups.enabler.io.XHRMultipart"]=true;dojo.provide("com.ibm.mashups.enabler.io.XHRMultipart");}if(!dojo._hasResource["com.ibm.mashups.enabler.io.XHRMultipartFactory_API"]){dojo._hasResource["com.ibm.mashups.enabler.io.XHRMultipartFactory_API"]=true;dojo.provide("com.ibm.mashups.enabler.io.XHRMultipartFactory_API");dojo.provide("com.ibm.mashups.enabler.io.XHRMultipartFactory");dojo.declare("com.ibm.mashups.enabler.io.XHRMultipartFactory",null,{create:function(){},isMultipartEnabled:function(){},isMultipartApplicationWidgets:function(){}});}if(!dojo._hasResource["com.ibm.mm.enabler.io.XHRMultipartFactoryImpl"]){dojo._hasResource["com.ibm.mm.enabler.io.XHRMultipartFactoryImpl"]=true;dojo.provide("com.ibm.mm.enabler.io.XHRMultipartFactoryImpl");dojo.declare("com.ibm.mm.enabler.io.XHRMultipartFactoryImpl",[com.ibm.mashups.enabler.io.XHRMultipartFactory,com.ibm.mm.enabler.ServiceDocConsumer],{constructor:function(){this._init=false;this.serviceMPJson=null;this.doMultipart=false;var _38b=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME);var _38c=_38b.getValue(com.ibm.mashups.enabler.services.ConfigConstants.PAGE_LOAD_OPTIMIZATION_APP_WIDGETS);this.multipartAppWidgets=false;if(typeof (_38c)=="undefined"||_38c===null||_38c===true){this.multipartAppWidgets=true;}this.CONTEXT_ENABLER="enabler";},_initServiceDoc:function(){this.inherited("_initServiceDoc",arguments);if(dojo.exists("com.ibm.mm.enabler.model.ServiceDocumentModel")){this.serviceMPJson=com.ibm.mm.enabler.model.ServiceDocumentModel.getCollectionData([com.ibm.mm.enabler.model.ServiceDocumentModel.SERVICE_MODEL,com.ibm.mm.enabler.model.ServiceDocumentModel.SERVICE_MULTIPART]);}if(this.serviceMPJson&&this.serviceMPJson.url){this.doMultipart=true;}},create:function(){return new com.ibm.mm.enabler.io.XHRMultipartImpl();},isMultipartEnabled:function(){if(!this._init){this._init=true;var _38d=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME);var _38e=_38d.getValue(com.ibm.mashups.enabler.services.ConfigConstants.MULTIPART_ENABLED);if(dojo.isIE!=6&&_38e){this._initServiceDoc();}}return this.doMultipart;},isMultipartApplicationWidgets:function(){return this.multipartAppWidgets;}});com.ibm.mashups.enabler.io.XHRMultipartFactory=new com.ibm.mm.enabler.io.XHRMultipartFactoryImpl();}if(!dojo._hasResource["com.ibm.mashups.enabler.io.XHRMultipartFactory"]){dojo._hasResource["com.ibm.mashups.enabler.io.XHRMultipartFactory"]=true;dojo.provide("com.ibm.mashups.enabler.io.XHRMultipartFactory");dojo.require("com.ibm.mm.enabler.io.XHRMultipartFactoryImpl");}if(!dojo._hasResource["com.ibm.mashups.enabler.model.state.Accessor"]){dojo._hasResource["com.ibm.mashups.enabler.model.state.Accessor"]=true;dojo.provide("com.ibm.mashups.enabler.model.state.Accessor");dojo.declare("com.ibm.mashups.enabler.model.state.Accessor",null,{});}if(!dojo._hasResource["com.ibm.mashups.enabler.model.state.PageAccessor_API"]){dojo._hasResource["com.ibm.mashups.enabler.model.state.PageAccessor_API"]=true;dojo.provide("com.ibm.mashups.enabler.model.state.PageAccessor_API");dojo.provide("com.ibm.mashups.enabler.model.state.PageAccessor");dojo.declare("com.ibm.mashups.enabler.model.state.PageAccessor",[com.ibm.mashups.enabler.model.state.Accessor],{getPageID:function(){},setPageID:function(_38f){},confirmSetPageID:function(_390){return true;}});}if(!dojo._hasResource["com.ibm.mm.enabler.model.state.PageAccessorImpl"]){dojo._hasResource["com.ibm.mm.enabler.model.state.PageAccessorImpl"]=true;dojo.provide("com.ibm.mm.enabler.model.state.PageAccessorImpl");dojo.declare("com.ibm.mm.enabler.model.state.PageAccessorImpl",[com.ibm.mashups.enabler.model.state.PageAccessor],{constructor:function(_391,_392){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.bIsLoggable=this.LOGGER.isLoggable(this.LOG_LEVEL);if(this.bIsLoggable){this.LOGGER.entering("constructor");this.LOGGER.trace("constructor","spaceId:"+_392);}this.navStateModel=_391;if(_392){this.spaceid=_392;}},getPageID:function(){var _393=this.navStateModel._state;var rc=null;if(!_393){return null;}if(!this.spaceid){if(_393.pid){if(this.bIsLoggable){this.LOGGER.trace("getPageID","No required pace is defined, return Pageid"+_393.pid.value);}return _393.pid.value;}if(this.bIsLoggable){this.LOGGER.trace("getPageID","No required space is defined, no pid is defined in state return null");}return null;}else{if(_393.pageselection&&_393.pageselection[this.spaceid]){if(this.bIsLoggable){this.LOGGER.trace("getPageID","return pid:"+_393.pageselection[this.spaceid]+" for space:"+this.spaceid);}return _393.pageselection[this.spaceid].value;}if(this.bIsLoggable){this.LOGGER.trace("getPageID","No page is found for required space "+this.spaceid+" return null");}return null;}if(this.bIsLoggable){this.LOGGER.trace("getPageID","return null");}return null;},setPageID:function(_394){if(this.bIsLoggable){this.LOGGER.trace("setPageID","pageId:"+_394);}var _395=this.navStateModel._state;if(!_395){this.navStateModel._state={};_395=this.navStateModel._state;}if(!_394){_395.pid=null;if(this.spaceid){if(_395.pageselection&&_395.pageselection[this.spaceid]){_395.pageselection[this.spaceid]=null;}}this.navStateModel.setDirty(true,"pid");return;}var lm=new Date().getTime();_395.pid=_395.pid?_395.pid:{};_395.pid.value=_394;_395.pid.params=_395.pid.params?_395.pid.params:{};_395.pid.params.lm=lm;if(this.spaceid){if(!_395.pageselection){_395.pageselection={};}if(!_395.pageselection[this.spaceid]){_395.pageselection[this.spaceid]={};}_395.pageselection[this.spaceid].value=_394;_395.pageselection[this.spaceid].params=_395.pageselection[this.spaceid].params?_395.pageselection[this.spaceid].params:{};_395.pageselection[this.spaceid].params.lm=lm;}this.navStateModel.setDirty(true,"pid");}});}if(!dojo._hasResource["com.ibm.mashups.enabler.model.state.PageAccessor"]){dojo._hasResource["com.ibm.mashups.enabler.model.state.PageAccessor"]=true;dojo.provide("com.ibm.mashups.enabler.model.state.PageAccessor");}if(!dojo._hasResource["com.ibm.mashups.enabler.model.state.SpaceAccessor_API"]){dojo._hasResource["com.ibm.mashups.enabler.model.state.SpaceAccessor_API"]=true;dojo.provide("com.ibm.mashups.enabler.model.state.SpaceAccessor_API");dojo.provide("com.ibm.mashups.enabler.model.state.SpaceAccessor");dojo.declare("com.ibm.mashups.enabler.model.state.SpaceAccessor",[com.ibm.mashups.enabler.model.state.Accessor],{getSpaceID:function(){},setSpaceID:function(_396){},confirmSetSpaceID:function(_397){return true;}});}if(!dojo._hasResource["com.ibm.mm.enabler.model.state.SpaceAccessorImpl"]){dojo._hasResource["com.ibm.mm.enabler.model.state.SpaceAccessorImpl"]=true;dojo.provide("com.ibm.mm.enabler.model.state.SpaceAccessorImpl");dojo.declare("com.ibm.mm.enabler.model.state.SpaceAccessorImpl",[com.ibm.mashups.enabler.model.state.SpaceAccessor],{constructor:function(_398){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.bIsLoggable=this.LOGGER.isLoggable(this.LOG_LEVEL);if(this.bIsLoggable){this.LOGGER.entering("constructor");}this.navStateModel=_398;},getSpaceID:function(){var _399=this.navStateModel._state;if(!_399){return null;}if(_399.sid&&_399.sid.value){if(this.bIsLoggable){this.LOGGER.trace("getSpaceID","sid:"+_399.sid.value);}return _399.sid.value;}if(this.bIsLoggable){this.LOGGER.trace("getSpaceID","sid:null");}return null;},_setSpaceIDInternal:function(_39a){var _39b=this.navStateModel._state;if(!_39b){this.navStateModel._state={};_39b=this.navStateModel._state;}var lm=new Date().getTime();if(typeof _39a=="undefined"){_39b.sid={};}else{_39b.sid=_39b.sid?_39b.sid:{};_39b.sid.value=_39a;_39b.sid.params=_39b.sid.params?_39b.sid.params:{};_39b.sid.params.lm=lm;}if(_39b.pid){_39b.pid=null;}},setSpaceID:function(_39c){if(this.bIsLoggable){this.LOGGER.trace("setSpaceID","sid:"+_39c);}this._setSpaceIDInternal(_39c);this.navStateModel.setDirty(true,"sid");}});}if(!dojo._hasResource["com.ibm.mashups.enabler.model.state.SpaceAccessor"]){dojo._hasResource["com.ibm.mashups.enabler.model.state.SpaceAccessor"]=true;dojo.provide("com.ibm.mashups.enabler.model.state.SpaceAccessor");}if(!dojo._hasResource["com.ibm.mashups.enabler.model.state.WidgetAccessor_API"]){dojo._hasResource["com.ibm.mashups.enabler.model.state.WidgetAccessor_API"]=true;dojo.provide("com.ibm.mashups.enabler.model.state.WidgetAccessor_API");dojo.provide("com.ibm.mashups.enabler.model.state.WidgetAccessor");dojo.declare("com.ibm.mashups.enabler.model.state.WidgetAccessor",[com.ibm.mashups.enabler.model.state.Accessor],{constructor:function(_39d,id){},getWidgetID:function(){},getWidgetStateValues:function(key){},getWidgetState:function(key){},setWidgetState:function(key,_39e){},confirmSetWidgetState:function(key,_39f){return true;},setWidgetState:function(key,_3a0){},confirmSetWidgetState:function(key,_3a1){return true;},removeWidgetState:function(key){},confirmRemoveWidgetState:function(key){return true;},getWidgetStateNames:function(){},getWidgetMode:function(){},setWidgetMode:function(mode){},confirmSetWidgetMode:function(mode){return true;},getWindowState:function(){},setWindowState:function(_3a2){},confirmSetWindowState:function(_3a3){return true;},getSize:function(){},setSize:function(_3a4,_3a5){},confirmSetSize:function(_3a6,_3a7){return true;},MIN:"minimize",MAX:"maximize",NORMAL:"normal"});}if(!dojo._hasResource["com.ibm.mm.enabler.model.state.WidgetAccessorImpl"]){dojo._hasResource["com.ibm.mm.enabler.model.state.WidgetAccessorImpl"]=true;dojo.provide("com.ibm.mm.enabler.model.state.WidgetAccessorImpl");dojo.declare("com.ibm.mm.enabler.model.state.WidgetAccessorImpl",[com.ibm.mashups.enabler.model.state.WidgetAccessor],{constructor:function(_3a8,id){this.navStateModel=_3a8;this.wid=id;this.uniqueWid=this._getUniqueWid();this.widgetNavStateNode=_3a8._find(this.WIDGET_PREFIX+this.navStateModel.DELIMITER+this.uniqueWid);if(this.wid!=this.uniqueWid&&!this.widgetNavStateNode){this.widgetNavStateNodeFallback=_3a8._find(this.WIDGET_PREFIX+this.navStateModel.DELIMITER+this.wid);}},WIDGET_PREFIX:"wparams",WIDTH:"w",HEIGHT:"h",WINDOWSTATE:"st",SYSTEMSTATE:"rp",CUSTOMSTATE:"cp",VALUE:"value",PARAMS:"params",MODE:"md",RP:{w:"w",h:"h",st:"st",md:"md"},VIEW:"view",getWidgetID:function(){return this.wid;},_getUniqueWid:function(){return this.navStateModel._getUniqueWid(this.wid);},getWidgetStateSet:function(){var _3a9=null;if(!this.widgetNavStateNode&&!this.widgetNavStateNodeFallback){return null;}var _3aa=this.widgetNavStateNode;if(!_3aa){_3aa=this.widgetNavStateNodeFallback;}var data=_3aa.getRef();if(data&&data[this.VALUE]){if(data[this.VALUE][this.CUSTOMSTATE]){_3a9=data[this.VALUE][this.CUSTOMSTATE];}}if(_3a9&&!dojo.isString(_3a9)){_3a9=dojo.toJson(_3a9);}return _3a9;},_createWidgetNavStateNode:function(){var _3ab=this.navStateModel.create({key:this.uniqueWid});var _3ac=this.navStateModel._find(this.WIDGET_PREFIX);if(!_3ac){var temp=this.navStateModel.create({key:this.WIDGET_PREFIX});this.navStateModel.insert(temp,this.navStateModel._getRoot());_3ac=this.navStateModel._find(this.WIDGET_PREFIX);}this.navStateModel.insert(_3ab,_3ac);_3ab=this.navStateModel._find(this.WIDGET_PREFIX+this.navStateModel.DELIMITER+this.uniqueWid);return _3ab;},setWidgetStateSet:function(_3ad){var _3ae=null;if(dojo.isString(_3ad)){try{_3ad=dojo.fromJson(_3ad);}catch(e){}}if(!this.widgetNavStateNode){this.widgetNavStateNode=this._createWidgetNavStateNode();}var data=this.widgetNavStateNode.getRef();data.params=data.params?data.params:{};data.params.lm=new Date().getTime();if(data&&data[this.VALUE]){if(data[this.VALUE][this.CUSTOMSTATE]){_3ae=dojo.clone(data[this.VALUE][this.CUSTOMSTATE]);}}data[this.VALUE]=data[this.VALUE]?data[this.VALUE]:{};var obj=_3ad;if(_3ae&&!dojo.isString(_3ae)&&!dojo.isString(_3ad)){obj=dojo.mixin(_3ae,_3ad);}data[this.VALUE][this.CUSTOMSTATE]=obj;this.navStateModel.setDirty(true);return this;},_getWidgetSystemState:function(key){var _3af=null;if(!this.widgetNavStateNode&&!this.widgetNavStateNodeFallback){return null;}var _3b0=this.widgetNavStateNode;if(!_3b0){_3b0=this.widgetNavStateNodeFallback;}var data=_3b0.getRef();if(data&&data[this.VALUE]){if(data[this.VALUE][this.SYSTEMSTATE]){data=data[this.VALUE][this.SYSTEMSTATE];if(data&&data[key]){_3af=data[key];}}}return _3af;},_setWidgetSystemState:function(key,_3b1){if(!this.widgetNavStateNode){this.widgetNavStateNode=this._createWidgetNavStateNode();}var data=this.widgetNavStateNode.getRef();data.params=data.params?data.params:{};data.params.lm=new Date().getTime();var _3b2=null;data[this.VALUE]=data[this.VALUE]?data[this.VALUE]:{};data[this.VALUE][this.SYSTEMSTATE]=data[this.VALUE][this.SYSTEMSTATE]?data[this.VALUE][this.SYSTEMSTATE]:{};_3b2=data[this.VALUE][this.SYSTEMSTATE];_3b2[key]=_3b1;this.navStateModel.setDirty(true);return this;},getWidgetState:function(key){var rc=this._getWidgetStateValue(key)||null;if(!rc){return null;}if(!dojo.isString(rc)){rc=dojo.toJson(rc);}return rc;},_getWidgetStateValue:function(key){if(!key){return null;}if(key&&key=="cp"){return this.getWidgetStateSet();}if(this.RP[key]){return this._getWidgetSystemState(key);}var _3b3=null;if(!this.widgetNavStateNode&&!this.widgetNavStateNodeFallback){return null;}var _3b4=this.widgetNavStateNode;if(!_3b4){_3b4=this.widgetNavStateNodeFallback;}var data=_3b4.getRef();if(data&&data[this.VALUE]){if(data[this.VALUE][this.CUSTOMSTATE]){data=data[this.VALUE][this.CUSTOMSTATE];if(dojo.isString(data)){return null;}if(data&&data[key]){_3b3=data[key];}}}return _3b3;},getWidgetStateValues:function(key){var rc=this._getWidgetStateValue(key)||null;if(!rc){return null;}if(dojo.isString(rc)){var arr=[];arr.push(rc);return arr;}return rc;},getWidgetStateNames:function(){var _3b5=[];if(!this.widgetNavStateNode&&!this.widgetNavStateNodeFallback){return null;}var _3b6=this.widgetNavStateNode;if(!_3b6){_3b6=this.widgetNavStateNodeFallback;}var data=_3b6.getRef();if(data&&data[this.VALUE]){if(data[this.VALUE][this.CUSTOMSTATE]){data=data[this.VALUE][this.CUSTOMSTATE];if(dojo.isString(data)){return null;}if(data){for(var i in data){if(Object.prototype.hasOwnProperty.call(data,i)){if(data[i]){_3b5.push(i);}}}}}}if(_3b5.length===0){return null;}return _3b5;},setWidgetState:function(key,_3b7){if(!key||!_3b7){return null;}if(key&&key=="cp"){return this.setWidgetStateSet(_3b7);}var _3b8=false;if(dojo.isArray(_3b7)&&_3b7.length>=1){if(dojo.isString(_3b7[0])){_3b8=true;}}if(!_3b8){if(dojo.isString(_3b7)){_3b8=true;}}if(!_3b8){return null;}if(this.RP[key]){return this._setWidgetSystemState(key,_3b7);}if(key&&key=="cp"){return this.setWidgetStateSet(_3b7);}if(!this.widgetNavStateNode){this.widgetNavStateNode=this._createWidgetNavStateNode();}var data=this.widgetNavStateNode.getRef();data.params=data.params?data.params:{};data.params.lm=new Date().getTime();var _3b9=null;data[this.VALUE]=data[this.VALUE]?data[this.VALUE]:{};data[this.VALUE][this.CUSTOMSTATE]=data[this.VALUE][this.CUSTOMSTATE]?data[this.VALUE][this.CUSTOMSTATE]:{};_3b9=data[this.VALUE][this.CUSTOMSTATE];_3b9[key]=_3b7;this.navStateModel.setDirty(true);return this;},removeWidgetState:function(key){if(!key){return false;}if(this.RP[key]){return this._removeWidgetSystemState(key);}if(!this.widgetNavStateNode){return false;}var data=this.widgetNavStateNode.getRef();data.params=data.params?data.params:{};data.params.lm=new Date().getTime();if(key&&key=="cp"){if(data&&data[this.VALUE]&&data[this.VALUE][this.CUSTOMSTATE]){data[this.VALUE][this.CUSTOMSTATE]=null;this.navStateModel.setDirty(true);return true;}return false;}if(data&&data[this.VALUE]&&data[this.VALUE][this.CUSTOMSTATE]){var _3ba=data[this.VALUE][this.CUSTOMSTATE];if(_3ba&&_3ba[key]){_3ba[key]=null;this.navStateModel.setDirty(true);return true;}}return false;},_removeWidgetSystemState:function(key){if(!key){return false;}if(!this.widgetNavStateNode){return false;}var data=this.widgetNavStateNode.getRef();data.params=data.params?data.params:{};data.params.lm=new Date().getTime();if(data&&data[this.VALUE]&&data[this.VALUE][this.SYSTEMSTATE]){var _3bb=data[this.VALUE][this.SYSTEMSTATE];if(_3bb&&_3bb[key]){_3bb[key]=null;this.navStateModel.setDirty(true);return true;}}return false;},getWindowState:function(){rc=this._getWidgetSystemState(this.WINDOWSTATE);return rc;},setWindowState:function(_3bc){if(_3bc&&(_3bc==this.MIN||_3bc==this.MAX||_3bc==this.NORMAL)){this._setWidgetSystemState(this.WINDOWSTATE,_3bc);}},getWidgetMode:function(){var rc=this._getWidgetSystemState(this.MODE);return rc;},setWidgetMode:function(_3bd){if(_3bd){this._setWidgetSystemState(this.MODE,_3bd);return this;}return null;},getSize:function(){var size={};var _3be=this._getWidgetSystemState(this.HEIGHT);var _3bf=this._getWidgetSystemState(this.WIDTH);if(_3be){size[this.HEIGHT]=_3be;}if(_3bf){size[this.WIDTH]=_3bf;}if(!size[this.HEIGHT]&&!size[this.WIDTH]){return null;}return size;},setSize:function(_3c0,_3c1){if(_3c0){this._setWidgetSystemState(this.WIDTH,_3c0);}if(_3c1){this._setWidgetSystemState(this.HEIGHT,_3c1);}return this;}});}if(!dojo._hasResource["com.ibm.mashups.enabler.model.state.WidgetAccessor"]){dojo._hasResource["com.ibm.mashups.enabler.model.state.WidgetAccessor"]=true;dojo.provide("com.ibm.mashups.enabler.model.state.WidgetAccessor");}if(!dojo._hasResource["com.ibm.mashups.enabler.model.state.PageModeAccessor_API"]){dojo._hasResource["com.ibm.mashups.enabler.model.state.PageModeAccessor_API"]=true;dojo.provide("com.ibm.mashups.enabler.model.state.PageModeAccessor_API");dojo.provide("com.ibm.mashups.enabler.model.state.PageModeAccessor");dojo.declare("com.ibm.mashups.enabler.model.state.PageModeAccessor",[com.ibm.mashups.enabler.model.state.Accessor],{VIEW:"view",EDIT:"edit",getPageMode:function(){},setPageMode:function(_3c2){},confirmSetPageMode:function(_3c3){return true;}});com.ibm.mashups.enabler.model.state.PageModeAccessor.VIEW="view";com.ibm.mashups.enabler.model.state.PageModeAccessor.EDIT="edit";}if(!dojo._hasResource["com.ibm.mm.enabler.model.state.PageModeAccessorImpl"]){dojo._hasResource["com.ibm.mm.enabler.model.state.PageModeAccessorImpl"]=true;dojo.provide("com.ibm.mm.enabler.model.state.PageModeAccessorImpl");dojo.declare("com.ibm.mm.enabler.model.state.PageModeAccessorImpl",[com.ibm.mashups.enabler.model.state.PageModeAccessor],{constructor:function(_3c4){this.navStateModel=_3c4;},getPageMode:function(){var _3c5=this.navStateModel._getPageMode();if(!_3c5){return null;}return _3c5;},setPageMode:function(mode){if(mode){this.navStateModel._setPageMode(mode);}return;}});}if(!dojo._hasResource["com.ibm.mashups.enabler.model.state.PageModeAccessor"]){dojo._hasResource["com.ibm.mashups.enabler.model.state.PageModeAccessor"]=true;dojo.provide("com.ibm.mashups.enabler.model.state.PageModeAccessor");}if(!dojo._hasResource["com.ibm.mashups.enabler.model.state.ShareableParameterSetAccessor_API"]){dojo._hasResource["com.ibm.mashups.enabler.model.state.ShareableParameterSetAccessor_API"]=true;dojo.provide("com.ibm.mashups.enabler.model.state.ShareableParameterSetAccessor_API");dojo.provide("com.ibm.mashups.enabler.model.state.ShareableParameterSetAccessor");dojo.declare("com.ibm.mashups.enabler.model.state.ShareableParameterSetAccessor",[com.ibm.mashups.enabler.model.state.Accessor],{getId:function(){},getScope:function(){},getAllNames:function(){},setItemValue:function(_3c6,_3c7){},confirmSetItemValue:function(_3c8,_3c9){return true;},removeItem:function(_3ca){},confirmRemoveItem:function(_3cb){return true;},getItemValue:function(_3cc){},registerListener:function(_3cd){},removeListener:function(_3ce){},confirmRemoveListener:function(_3cf){return true;}});}if(!dojo._hasResource["com.ibm.mm.enabler.model.state.ShareableParameterSetAccessorImpl"]){dojo._hasResource["com.ibm.mm.enabler.model.state.ShareableParameterSetAccessorImpl"]=true;dojo.provide("com.ibm.mm.enabler.model.state.ShareableParameterSetAccessorImpl");dojo.declare("com.ibm.mm.enabler.model.state.ShareableParameterSetAccessorImpl",[com.ibm.mashups.enabler.model.state.ShareableParameterSetAccessor],{DELETE_TOKEN:"DELETE_TOKEN",TYPE_NEW:"newItem",TYPE_UPDATE:"changedValue",TYPE_REMOVE:"removedItem",constructor:function(_3d0,name,_3d1){if(!_3d1){this.scope=com.ibm.mm.enabler.model.state.ShareableParameterSetAccessorImpl.GLOBAL_SCOPE;}else{this.scope=_3d1;}this.name=name;this.navStateModel=_3d0;this.navStateNode=_3d0._find("sparams"+this.navStateModel.DELIMITER+name+this.navStateModel.DELIMITER+this.scope);},_createNavStateNode:function(){var temp;var _3d2=this.navStateModel._find("sparams");if(!_3d2){temp=this.navStateModel.create({key:"sparams"});this.navStateModel.insert(temp,this.navStateModel._getRoot());_3d2=this.navStateModel._find("sparams");}var _3d3=this.navStateModel._find(this.name);if(!_3d3){temp=this.navStateModel.create({key:this.name});this.navStateModel.insert(temp,_3d2);_3d3=this.navStateModel._find("sparams"+this.navStateModel.DELIMITER+this.name);}var _3d4=this.navStateModel.create({key:this.scope});this.navStateModel.insert(_3d4,_3d3);_3d4=this.navStateModel._find("sparams"+this.navStateModel.DELIMITER+this.name+this.navStateModel.DELIMITER+this.scope);return _3d4;},getId:function(){return this.name;},getScope:function(){return this.scope;},getAllNames:function(){if(!this.navStateNode){return null;}var arr=[];var data=this.navStateNode.getRef();if(data&&data[this.navStateModel.VALUE]){for(var i in data[this.navStateModel.VALUE]){if(data[this.navStateModel.VALUE].hasOwnProperty(i)){var _3d5=data[this.navStateModel.VALUE][i][this.navStateModel.VALUE];if(_3d5&&_3d5!=this.DELETE_TOKEN){arr.push(i);}}}}return arr;},setItemValue:function(_3d6,_3d7){if(!this.navStateNode){this.navStateNode=this._createNavStateNode();}var data=this.navStateNode.getRef();data.params=data.params?data.params:{};data.params.lm=new Date().getTime();data.value=data.value?data.value:{};var _3d8={};if(!data.value[_3d6]){data.value[_3d6]={};data.value[_3d6].value=_3d7;data.value[_3d6].params=data.value[_3d6].params?data.value[_3d6].params:{};data.value[_3d6].params._isDirty=true;_3d8.alias=_3d6;_3d8.type=this.TYPE_NEW;_3d8.newVal=_3d7;data.value[_3d6].params._change=_3d8;}else{if(data.value[_3d6]){var _3d9=dojo.clone(data.value[_3d6].value);data.value[_3d6].value=_3d7;data.value[_3d6].params=data.value[_3d6].params?data.value[_3d6].params:{};var _3da=data.value[_3d6].params._isDirty;if(_3da){_3d8=data.value[_3d6].params._change;if(_3d8.type==this.TYPE_NEW){_3d8.newVal=_3d7;}else{if(_3d8.type==this.TYPE_UPDATE){_3d8.newVal=_3d7;}else{if(_3d8.type==this.TYPE_REMOVE){if(_3d8.oldVal){_3d8.type=this.TYPE_UPDATE;}else{_3d8.type=this.TYPE_NEW;}_3d8.newVal=_3d7;}}}}else{_3d8.type=this.TYPE_UPDATE;_3d8.oldVal=_3d9;_3d8.newVal=_3d7;_3d8.alias=_3d6;data.value[_3d6].params._change=_3d8;}data.value[_3d6].params._isDirty=true;}}this.navStateModel.setDirty(true);return true;},removeItem:function(_3db){if(!this.navStateNode){return false;}var data=this.navStateNode.getRef();data.params=data.params?data.params:{};data.params.lm=new Date().getTime();if(data&&data[this.navStateModel.VALUE]){if(data[this.navStateModel.VALUE][_3db]){var _3dc=data[this.navStateModel.VALUE][_3db];var _3dd=dojo.clone(_3dc.value);_3dc.value=this.DELETE_TOKEN;_3dc.params=_3dc.params?_3dc.params:{};var _3de=_3dc.params._isDirty;var _3df={};if(_3de){_3df=_3dc.params._change;if(_3df.type==this.TYPE_NEW){delete data[this.navStateModel.VALUE][_3db];}else{if(_3df.type==this.TYPE_UPDATE){_3df.type=this.TYPE_REMOVE;_3df.newVal=null;delete _3df.oldVal;}}}else{_3df.type=this.TYPE_REMOVE;_3df.alias=_3db;_3df.oldVal=_3dd;_3dc.params._change=_3df;_3dc.params._isDirty=true;}this.navStateModel.setDirty(true);}else{return false;}}return true;},getItemValue:function(_3e0){if(!this.navStateNode){return null;}var data=this.navStateNode.getRef();if(data&&data[this.navStateModel.VALUE]){if(data[this.navStateModel.VALUE][_3e0]){var _3e1=data[this.navStateModel.VALUE][_3e0];var _3e2=_3e1[this.navStateModel.VALUE];if(_3e2&&_3e2!=this.DELETE_TOKEN){return _3e2;}}}return null;},registerListener:function(_3e3){if(!this.navStateNode){this.navStateNode=this._createNavStateNode();}var data=this.navStateNode.getRef();var _3e4=data[this.navStateModel.PARAMS];if(!_3e4){data[this.navStateModel.PARAMS]={};_3e4=data[this.navStateModel.PARAMS];}if(!_3e4._listeners){_3e4._listeners={};}var _3e5=this.navStateModel._generateListenerId();_3e4._listeners[_3e5]=_3e3;return _3e5;},removeListener:function(_3e6){if(!this.navStateNode){return null;}var data=this.navStateNode.getRef();var _3e7=data[this.navStateModel.PARAMS];if(_3e7&&_3e7._listeners){var _3e8=_3e7._listeners;if(_3e8[_3e6]){_3e8[_3e6]=null;delete _3e8[_3e6];return true;}}return false;},_setItems:function(_3e9){for(var i in _3e9){if(_3e9[i]&&_3e9[i]==this.DELETE_TOKEN){this.removeItem(i);}else{if(_3e9[i]){this.setItemValue(i,_3e9[i]);}}}}});com.ibm.mm.enabler.model.state.ShareableParameterSetAccessorImpl.GLOBAL_SCOPE="global";}if(!dojo._hasResource["com.ibm.mashups.enabler.model.state.ShareableParameterSetAccessor"]){dojo._hasResource["com.ibm.mashups.enabler.model.state.ShareableParameterSetAccessor"]=true;dojo.provide("com.ibm.mashups.enabler.model.state.ShareableParameterSetAccessor");}if(!dojo._hasResource["com.ibm.mashups.enabler.model.state.LayoutContainerAccessor_API"]){dojo._hasResource["com.ibm.mashups.enabler.model.state.LayoutContainerAccessor_API"]=true;dojo.provide("com.ibm.mashups.enabler.model.state.LayoutContainerAccessor_API");dojo.provide("com.ibm.mashups.enabler.model.state.LayoutContainerAccessor");dojo.declare("com.ibm.mashups.enabler.model.state.LayoutContainerAccessor",[com.ibm.mashups.enabler.model.state.Accessor],{constructor:function(_3ea,_3eb,_3ec){},getID:function(){},getSize:function(){},setSize:function(_3ed){},confirmSetSize:function(_3ee){return true;}});}if(!dojo._hasResource["com.ibm.mm.enabler.model.state.LayoutContainerAccessorImpl"]){dojo._hasResource["com.ibm.mm.enabler.model.state.LayoutContainerAccessorImpl"]=true;dojo.provide("com.ibm.mm.enabler.model.state.LayoutContainerAccessorImpl");dojo.declare("com.ibm.mm.enabler.model.state.LayoutContainerAccessorImpl",[com.ibm.mashups.enabler.model.state.LayoutContainerAccessor],{constructor:function(_3ef,_3f0,_3f1){this.navStateModel=_3ef;this.cid=_3f0;this.pid=_3f1;var _3f2=this.navStateModel.DELIMITER;var path=this.LAYOUT_PREFIX;path+=_3f2+this.pid;this.layoutNavStateNode=_3ef._find(path);if(this.layoutNavStateNode){path+=_3f2+this.VALUE+_3f2+this.cid;this.layoutContainerNavStateNode=_3ef._find(path);}else{this.layoutContainerNavStateNode=null;}},LAYOUT_PREFIX:"lcparams",WIDTH:"w",SYSTEMSTATE:"rp",VALUE:"value",PARAMS:"params",MODE:"md",RP:{w:"w"},getID:function(){return this.cid;},_getLayoutContainerSystemState:function(key){var _3f3=null;if(!this.layoutContainerNavStateNode){return null;}var data=this.layoutContainerNavStateNode.getRef();if(data&&data[this.VALUE]){if(data[this.VALUE][this.SYSTEMSTATE]){data=data[this.VALUE][this.SYSTEMSTATE];if(data&&data[key]){_3f3=data[key];}}}return _3f3;},_setLayoutContainerSystemState:function(key,_3f4){var data;if(!this.layoutContainerNavStateNode){this.layoutContainerNavStateNode=this._createLayoutContainerNavStateNode();}data=this.layoutNavStateNode.getRef();data.params=data.params?data.params:{};data.params.lm=new Date().getTime();data=this.layoutContainerNavStateNode.getRef();var _3f5=null;data[this.VALUE]=data[this.VALUE]?data[this.VALUE]:{};data[this.VALUE][this.SYSTEMSTATE]=data[this.VALUE][this.SYSTEMSTATE]?data[this.VALUE][this.SYSTEMSTATE]:{};_3f5=data[this.VALUE][this.SYSTEMSTATE];_3f5[key]=_3f4;this.navStateModel.setDirty(true);return this;},_createLayoutNavStateNode:function(){var _3f6=this.navStateModel.create({key:this.pid});var _3f7=this.navStateModel._find(this.LAYOUT_PREFIX);if(!_3f7){var temp=this.navStateModel.create({key:this.LAYOUT_PREFIX});this.navStateModel.insert(temp,this.navStateModel._getRoot());_3f7=this.navStateModel._find(this.LAYOUT_PREFIX);}this.navStateModel.insert(_3f6,_3f7);_3f6=this.navStateModel._find(this.LAYOUT_PREFIX+this.navStateModel.DELIMITER+this.pid);return _3f6;},_createLayoutContainerNavStateNode:function(){if(!this.layoutNavStateNode){this.layoutNavStateNode=this._createLayoutNavStateNode();}var data=this.layoutNavStateNode.getRef();data[this.VALUE]=data[this.VALUE]?data[this.VALUE]:{};var _3f8=this.navStateModel.DELIMITER;var path=this.LAYOUT_PREFIX+_3f8+this.pid+_3f8+this.VALUE;var _3f9=this.navStateModel.create({key:this.cid});var _3fa=this.navStateModel._find(path);this.navStateModel.insert(_3f9,_3fa);_3f9=this.navStateModel._find(path+_3f8+this.cid);return _3f9;},getSize:function(){var size={};var _3fb=this._getLayoutContainerSystemState(this.WIDTH);if(_3fb){size[this.WIDTH]=_3fb;return size;}else{return null;}return size;},setSize:function(_3fc){if(_3fc){this._setLayoutContainerSystemState(this.WIDTH,_3fc);}return this;}});}if(!dojo._hasResource["com.ibm.mashups.enabler.model.state.LayoutContainerAccessor"]){dojo._hasResource["com.ibm.mashups.enabler.model.state.LayoutContainerAccessor"]=true;dojo.provide("com.ibm.mashups.enabler.model.state.LayoutContainerAccessor");}if(!dojo._hasResource["com.ibm.mashups.enabler.model.state.LayoutAccessor_API"]){dojo._hasResource["com.ibm.mashups.enabler.model.state.LayoutAccessor_API"]=true;dojo.provide("com.ibm.mashups.enabler.model.state.LayoutAccessor_API");dojo.provide("com.ibm.mashups.enabler.model.state.LayoutAccessor");dojo.declare("com.ibm.mashups.enabler.model.state.LayoutAccessor",[com.ibm.mashups.enabler.model.state.Accessor],{constructor:function(_3fd,_3fe){},getTemplateURL:function(){},setTemplateURL:function(url){},getContainerAccessor:function(_3ff){},removeAll:function(_400){}});}if(!dojo._hasResource["com.ibm.mm.enabler.model.state.LayoutAccessorImpl"]){dojo._hasResource["com.ibm.mm.enabler.model.state.LayoutAccessorImpl"]=true;dojo.provide("com.ibm.mm.enabler.model.state.LayoutAccessorImpl");dojo.declare("com.ibm.mm.enabler.model.state.LayoutAccessorImpl",[com.ibm.mashups.enabler.model.state.LayoutAccessor],{constructor:function(_401,_402){this.navStateModel=_401;this.pid=_402;this.path=this.LAYOUT_PREFIX+this.navStateModel.DELIMITER+this.pid;this.layoutNavStateNode=null;},LAYOUT_PREFIX:"lcparams",WIDGET_PREFIX:"wparams",VALUE:"value",TEMPLATE_URL:"templateURL",SYSTEMSTATE:"rp",WIDTH:"w",HEIGHT:"h",_getLayoutState:function(key){var _403=null;if(!this.layoutNavStateNode){this.layoutNavStateNode=this.navStateModel._find(this.path);if(!this.layoutNavStateNode){return null;}}var data=this.layoutNavStateNode.getRef();if(data&&data[key]){_403=data[key];}return _403;},_setLayoutState:function(key,_404){var data;if(!this.layoutNavStateNode){this.layoutNavStateNode=this.navStateModel._find(this.path);if(!this.layoutNavStateNode){this.layoutNavStateNode=this._createLayoutNavStateNode();}}data=this.layoutNavStateNode.getRef();data.params=data.params?data.params:{};data.params.lm=new Date().getTime();data[key]=_404;this.navStateModel.setDirty(true);return this;},_createLayoutNavStateNode:function(){var _405=this.navStateModel.create({key:this.pid});var _406=this.navStateModel._find(this.LAYOUT_PREFIX);if(!_406){var temp=this.navStateModel.create({key:this.LAYOUT_PREFIX});this.navStateModel.insert(temp,this.navStateModel._getRoot());_406=this.navStateModel._find(this.LAYOUT_PREFIX);}this.navStateModel.insert(_405,_406);_405=this.navStateModel._find(this.path);return _405;},getTemplateURL:function(){return this._getLayoutState(this.TEMPLATE_URL);},setTemplateURL:function(url){return this._setLayoutState(this.TEMPLATE_URL,url);},removeAll:function(_407){var _408=this.navStateModel.DELIMITER;if(_407&&this.navStateModel._find(this.WIDGET_PREFIX)){var i;var _409;for(i=0;i<_407.length;i++){_409=this.navStateModel._find(this.WIDGET_PREFIX+_408+_407[i]+_408+this.VALUE+_408+this.SYSTEMSTATE);if(_409){_409=_409.getRef();delete _409[this.WIDTH];delete _409[this.HEIGHT];this.navStateModel.setDirty(true);}}}if(this.layoutNavStateNode){this.navStateModel.remove(this.layoutNavStateNode);this.navStateModel.setDirty(true);delete this.layoutNavStateNode;}return this;},getContainerAccessor:function(_40a){return new com.ibm.mm.enabler.model.state.LayoutContainerAccessorImpl(this.navStateModel,_40a,this.pid);}});}if(!dojo._hasResource["com.ibm.mashups.enabler.model.state.LayoutAccessor"]){dojo._hasResource["com.ibm.mashups.enabler.model.state.LayoutAccessor"]=true;dojo.provide("com.ibm.mashups.enabler.model.state.LayoutAccessor");}if(!dojo._hasResource["com.ibm.mashups.enabler.model.state.AccessorFactory_API"]){dojo._hasResource["com.ibm.mashups.enabler.model.state.AccessorFactory_API"]=true;dojo.provide("com.ibm.mashups.enabler.model.state.AccessorFactory_API");dojo.provide("com.ibm.mashups.enabler.model.state.AccessorFactory");dojo.declare("com.ibm.mashups.enabler.model.state.AccessorFactory",null,{getPageAccessor:function(_40b,_40c){},getSpaceAccessor:function(_40d){},getWidgetAccessor:function(_40e,_40f){},getPageModeAccessor:function(_410){},getShareableParameterSetAccessor:function(_411,id,_412){},getLayoutAccessor:function(_413,_414){}});}if(!dojo._hasResource["com.ibm.mm.enabler.model.state.AccessorFactoryImpl"]){dojo._hasResource["com.ibm.mm.enabler.model.state.AccessorFactoryImpl"]=true;dojo.provide("com.ibm.mm.enabler.model.state.AccessorFactoryImpl");dojo.declare("com.ibm.mm.enabler.model.state.AccessorFactoryImpl",[com.ibm.mashups.enabler.model.state.AccessorFactory],{constructor:function(){},getPageAccessor:function(_415,_416){return new com.ibm.mm.enabler.model.state.PageAccessorImpl(_415,_416);},getPageModeAccessor:function(_417){return new com.ibm.mm.enabler.model.state.PageModeAccessorImpl(_417);},getSpaceAccessor:function(_418){return new com.ibm.mm.enabler.model.state.SpaceAccessorImpl(_418);},getWidgetAccessor:function(_419,_41a){return new com.ibm.mm.enabler.model.state.WidgetAccessorImpl(_419,_41a);},getShareableParameterSetAccessor:function(_41b,name,_41c){return new com.ibm.mm.enabler.model.state.ShareableParameterSetAccessorImpl(_41b,name,_41c);},getLayoutAccessor:function(_41d,_41e){return new com.ibm.mm.enabler.model.state.LayoutAccessorImpl(_41d,_41e);}});com.ibm.mashups.enabler.model.state.AccessorFactory=new com.ibm.mm.enabler.model.state.AccessorFactoryImpl();}if(!dojo._hasResource["com.ibm.mashups.enabler.model.state.AccessorFactory"]){dojo._hasResource["com.ibm.mashups.enabler.model.state.AccessorFactory"]=true;dojo.provide("com.ibm.mashups.enabler.model.state.AccessorFactory");}if(!dojo._hasResource["com.ibm.mashups.enabler.model.state.NavigationStateModel_API"]){dojo._hasResource["com.ibm.mashups.enabler.model.state.NavigationStateModel_API"]=true;dojo.provide("com.ibm.mashups.enabler.model.state.NavigationStateModel_API");dojo.provide("com.ibm.mashups.enabler.model.state.NavigationStateModel");dojo.declare("com.ibm.mashups.enabler.model.state.NavigationStateModel",null,{ONNAVSTATEUPDATED:"com.ibm.mashups.enabler.model.state.onNavStateUpdated",startTransaction:function(){return;},commitTransaction:function(){return;},discardTransaction:function(){return;},isTransaction:function(){return false;},commit:function(_41f){return new com.ibm.mashups.enabler.Deferred();},discard:function(){return;},dispose:function(){return;}});}if(!dojo._hasResource["com.ibm.mashups.enabler.services.IdentificationService_API"]){dojo._hasResource["com.ibm.mashups.enabler.services.IdentificationService_API"]=true;dojo.provide("com.ibm.mashups.enabler.services.IdentificationService_API");dojo.provide("com.ibm.mashups.enabler.services.IdentificationService");dojo.declare("com.ibm.mashups.enabler.services.IdentificationService",null,{createClientID:function(){},attachClientID:function(_420){},releaseClientID:function(id){},isClientID:function(id){},isServerID:function(id){},isAlienID:function(id){},attachServerID:function(_421,_422){},resolveID:function(id){},resolveIdentifiable:function(id){}});}if(!dojo._hasResource["com.ibm.mm.enabler.utils.Utils"]){dojo._hasResource["com.ibm.mm.enabler.utils.Utils"]=true;dojo.provide("com.ibm.mm.enabler.utils.Utils");dojo.declare("com.ibm.mm.enabler.utils.UtilsImpl",null,{constructor:function(){this.serviceJson=null;},_lazyInit:function(){if(this.serviceJson){return;}this.xmlDom=com.ibm.mm.enabler.utils.Dom.createDocument();this.serviceJson=com.ibm.mm.enabler.model.ServiceDocumentModel.getCollectionData(com.ibm.mm.enabler.model.ServiceDocumentModel.SERVICE_NAVIGATION);this.prefix=this.serviceJson.idprefix;var nsf=com.ibm.mm.enabler.model.NameSpaceFactory;this.ns=dojo.delegate(this.serviceJson.namespaces,nsf.getNameSpaces([nsf.NS_ATOM]));},createNode:function(name,ns){this._lazyInit();return com.ibm.mm.enabler.utils.Dom.createElement(this.xmlDom,name,ns);},createLinkNode:function(href,rel,ns){var _423=this.createNode("atom:link",ns);_423.setAttribute("href",href);_423.setAttribute("rel",rel);return _423;},createExtLinkNode:function(href,rel,_424){this._lazyInit();var nsf=com.ibm.mm.enabler.model.NameSpaceFactory;var _425=this.createNode("atom:link",this.ns[nsf.NS_ATOM]);_425.setAttribute("href",href);if(rel){_425.setAttribute("rel",rel);}com.ibm.mm.enabler.utils.Dom.setAttributeWithNS(this.xmlDom,_425,"ext:rel","rel",this.ns.ext,_424);return _425;},getIdFromExtUri:function(_426,node){this._lazyInit();var id=null;var uri=com.ibm.mm.enabler.utils.Dom.getAttributeWithNS(node,"ext:uri","uri",this.ns.ext);if(uri){var aPos=uri.indexOf("@");if(aPos!=-1){uri=uri.slice(0,aPos);}id=uri;var _427=id.lastIndexOf(":");if(_427!=-1){id=id.slice(_427+1);}_427=id.toUpperCase().lastIndexOf("%3A");if(_427!=-1){id=id.slice(_427+3);}_427=id.lastIndexOf("/");if(_427!=-1){id=id.slice(_427+1);}}return id;},getHrefFromIdentifiable:function(_428){return (_428&&(typeof _428._getParameters=="function"))?_428._getParameters().href:null;},getIdFromIdentifiable:function(_429){if(com.ibm.mm.enabler.utils.Misc.isInstanceOf(_429,com.ibm.mashups.enabler.Identifiable)){return _429.getID();}else{if(dojo.isString(_429)){return dojo.string.trim(_429);}else{return _429;}}},setAttributeWithNS:function(_42a,_42b,_42c,_42d){this._lazyInit();com.ibm.mm.enabler.utils.Dom.setAttributeWithNS(this.xmlDom,_42a,_42b,null,_42c,_42d);},createFeed:function(id,_42e,_42f,_430){var ns="";for(var _431 in _430){if(Object.prototype.hasOwnProperty.call(_430,_431)){ns+="xmlns:"+_431+"=\""+_430[_431]+"\" ";}}var time=new Date();var feed="\n"+"\n"+""+_42e+"\n"+""+id+"\n"+""+time.toGMTString()+"\n"+_42f+"";return feed;},transferElements:function(_432,_433,_434,ns){dojo.forEach(_434,function(ctx){var _435=ctx.parentXpath+"/"+ctx.element;if(ctx.replace===true){var _436=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(_435,_433,ns);if(_436){_436.parentNode.removeChild(_436);}}var _437=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(_435,_432,ns);if(_437){var _438=_437.cloneNode(true);var _439=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(ctx.parentXpath,_433,ns);if(_439){_439.appendChild(_438);}}},this);}});com.ibm.mm.enabler.utils.Utils=new com.ibm.mm.enabler.utils.UtilsImpl();}if(!dojo._hasResource["com.ibm.mm.enabler.IdentifiableHelper"]){dojo._hasResource["com.ibm.mm.enabler.IdentifiableHelper"]=true;dojo.provide("com.ibm.mm.enabler.IdentifiableHelper");com.ibm.mm.enabler.IdentifiableHelper.ID_MATCHER=/^(.*?)(%3a)?([ \.\w_\-]*)(@.*?)?$/i;com.ibm.mm.enabler.IdentifiableHelper.getID=function(id){var _43a=id.match(com.ibm.mm.enabler.IdentifiableHelper.ID_MATCHER);return _43a?_43a[3]:"";};com.ibm.mm.enabler.IdentifiableHelper.replaceID=function(_43b,_43c,_43d){var id=com.ibm.mm.enabler.IdentifiableHelper.getID(_43d);var _43e=_43b.match(com.ibm.mm.enabler.IdentifiableHelper.ID_MATCHER);return _43c+":"+id+(_43e?(_43e[4]||""):"");};}if(!dojo._hasResource["com.ibm.mm.enabler.utils.Atom"]){dojo._hasResource["com.ibm.mm.enabler.utils.Atom"]=true;dojo.provide("com.ibm.mm.enabler.utils.Atom");com.ibm.mm.enabler.utils.Atom={_FEED:"atom:feed",_ENTRY:"atom:entry",_LINK:"atom:link",_ID:"atom:id",_NEXT_LINK:"atom:link[@rel='next']",_EDIT_LINK:"atom:link[@rel='edit']",_REPLIES_LINK:"atom:link[@rel='replies']",_REPLIES_LINK_HREF:"atom:link[@rel='replies']/@href",_IN_REPLY_TO_LINK:"thr:in-reply-to",_IN_REPLY_TO_LINK_HREF:"thr:in-reply-to/@href",LOG_LEVEL:com.ibm.mashups.enabler.logging.LogLevel.TRACE,LOGGER:com.ibm.mashups.enabler.logging.Logger.getLogger("com.ibm.mm.enabler.utils.Atom"),createEntry:function(_43f,_440,_441){var _442={};var _443="createEntry";var _444=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_444){this.LOGGER.entering(_443,[_43f,_440,_441]);}var nsf=com.ibm.mm.enabler.model.NameSpaceFactory;var ns=nsf.getNameSpaces([nsf.NS_ATOM]);var _445=com.ibm.mm.enabler.utils.Utils.createNode("atom:entry",ns.atom);var _446=com.ibm.mm.enabler.utils.Utils.createNode("atom:id",ns.atom);_445.appendChild(_446);var _447=com.ibm.mm.enabler.utils.Utils.createNode("atom:title",ns.atom);if(_43f){com.ibm.mm.enabler.utils.Dom.textContent(_447,_43f);}_445.appendChild(_447);var _448=com.ibm.mm.enabler.utils.Utils.createNode("atom:updated",ns.atom);var time=new Date();com.ibm.mm.enabler.utils.Dom.textContent(_448,time.toGMTString());_445.appendChild(_448);var _449=com.ibm.mm.enabler.utils.Utils.createNode("atom:content",ns.atom);_449.setAttribute("type","application/xml");_445.appendChild(_449);if(_440&&_441){var elem=com.ibm.mm.enabler.utils.Utils.createNode(_440,_441);_449.appendChild(elem);_442.modelElement=elem;}_442.entryElement=_445;_442.idElement=_446;if(_444){this.LOGGER.exiting(_443,_442);}return _442;}};}if(!dojo._hasResource["com.ibm.mm.enabler.persistence.xml.IdentifiableXmlImpl"]){dojo._hasResource["com.ibm.mm.enabler.persistence.xml.IdentifiableXmlImpl"]=true;dojo.provide("com.ibm.mm.enabler.persistence.xml.IdentifiableXmlImpl");dojo.declare("com.ibm.mm.enabler.persistence.xml.IdentifiableXmlImpl",[com.ibm.mashups.enabler.Identifiable,com.ibm.mm.enabler.DirtyFlagProviderImpl,com.ibm.mm.enabler.ServiceDocConsumer],{constructor:function(){this.modelMessages=dojo.i18n.getLocalization("com.ibm.mm.enabler","modelMessages");this._resetCachedRawID();this._addDirtyCallback(this,this._resetCachedRawID,null,true);},_cachedRawIdToken:{},_resetCachedRawID:function(){this._cachedRawID=this._cachedRawIdToken;},_cachedRawID:null,_initServiceDoc:function(){this.inherited("_initServiceDoc",arguments);var _44a=com.ibm.mm.enabler.model.ServiceDocumentModel.getCollectionData(com.ibm.mm.enabler.model.ServiceDocumentModel.SERVICE_NAVIGATION);var nsf=com.ibm.mm.enabler.model.NameSpaceFactory;this.id_ns=dojo.delegate(_44a.namespaces,nsf.getNameSpaces([nsf.NS_ATOM,nsf.NS_THR,nsf.NS_XML,nsf.NS_OPENSEARCH,nsf.NS_XHTML,nsf.NS_APP]));this.id_prefix=_44a.idprefix;},getID:function(){var id=this._getRawID();return id?com.ibm.mm.enabler.IdentifiableHelper.getID(id):id;},_getRawID:function(){this._initServiceDoc();if(this._cachedRawID===this._cachedRawIdToken){var _44b=null;var node=com.ibm.mashups.enabler.xml.XPath.evaluateString(com.ibm.mm.enabler.utils.Atom._ID,this.xmlData,this.id_ns);if(node){_44b=dojo.string.trim(node);}this._cachedRawID=_44b;}return this._cachedRawID;},equals:function(_44c){return com.ibm.mm.enabler.utils.Utils.getIdFromIdentifiable(this)==com.ibm.mm.enabler.utils.Utils.getIdFromIdentifiable(_44c);},setID:function(id){this._initServiceDoc();var _44d=this._getRawID();var _44e=this.id_prefix;if(_44d){var _44f=_44d.indexOf(this.id_prefix);if(_44f>0){_44e=_44d.substring(0,_44f+this.id_prefix.length);}}var _450=com.ibm.mm.enabler.IdentifiableHelper.replaceID(_44d||"",_44e,id);if(_450!=_44d){this._setRawID(_450);}},_setRawID:function(id){this._initServiceDoc();id=id||"";var node=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(com.ibm.mm.enabler.utils.Atom._ID,this.xmlData,this.id_ns);if(node){var _451=this._getRawID();if(id!=_451){com.ibm.mm.enabler.utils.Dom.textContent(node,id);this._setDirty();this._cachedRawID=dojo.string.trim(id);}}else{throw new Error(dojo.string.substitute(this.modelMessages.E_ELEMENT_NOT_FOUND_2,[com.ibm.mm.enabler.utils.Atom._ID,this.toString()]));}},getUniqueName:function(){this._initServiceDoc();var name=null;var res=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(com.ibm.mm.enabler.utils.Atom._ID,this.xmlData,this.id_ns);if(res){name=com.ibm.mm.enabler.utils.Dom.getAttributeWithNS(res,"ext:uniquename","uniquename",this.id_ns.ext);}return name||"";}});}if(!dojo._hasResource["com.ibm.mm.enabler.IdentifierImpl"]){dojo._hasResource["com.ibm.mm.enabler.IdentifierImpl"]=true;dojo.provide("com.ibm.mm.enabler.IdentifierImpl");dojo.declare("com.ibm.mm.enabler.IdentifierImpl",com.ibm.mm.enabler.persistence.xml.IdentifiableXmlImpl,{_id:null,_params:null,constructor:function(id,_452){if(dojo.isString(id)){this._id=id;}else{this.xmlData=id;}this._params=_452;},setID:function(id){if(this._id){this._id=id;}else{this.inherited(arguments);}},getID:function(){return this._id?com.ibm.mm.enabler.IdentifiableHelper.getID(this._id):this.inherited(arguments);},_getParameters:function(){return this._params;},_getRawID:function(){return this._id?this._id:this.inherited(arguments);},_setRawID:function(id){if(!this._id){var _453=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(com.ibm.mm.enabler.utils.Atom._ID,this.xmlData,this.id_ns);if(_453){com.ibm.mm.enabler.utils.Dom.textContent(_453,id);}}}});}if(!dojo._hasResource["com.ibm.mm.enabler.services.IdentificationServiceImpl"]){dojo._hasResource["com.ibm.mm.enabler.services.IdentificationServiceImpl"]=true;dojo.provide("com.ibm.mm.enabler.services.IdentificationServiceImpl");dojo.declare("com.ibm.mm.enabler.services.IdentificationServiceImpl",[com.ibm.mashups.enabler.services.IdentificationService],{constructor:function(){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger("com.ibm.mm.enabler.services.IdentificationServiceImpl");this.clientIds={};this.clientServerMap={};var _454=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME).getValue(com.ibm.mashups.enabler.services.ConfigConstants.SERVER_OBJECT_ID_FORMAT);if(!_454){_454="M[A-F0-9]+$";}this.serverOidRegExp=new RegExp(_454);},createClientID:function(){while(true){var id=dojox.uuid.generateRandomUuid().replace(/-/g,"_");if(!(id in this.clientIds)){this.clientIds[id]=null;return id;}}return null;},attachClientID:function(_455){this.clientIds[_455]=null;},releaseClientID:function(id){var _456=com.ibm.mm.enabler.utils.Utils.getIdFromIdentifiable(id);if(this.isClientID(_456)){delete this.clientIds[_456];delete this.clientServerMap[_456];}},isClientID:function(id){return (id in this.clientIds);},isServerID:function(id){return this.serverOidRegExp.test(id);},isAlienID:function(id){return !this.isServerID(id)&&!this.isClientID(id);},attachServerID:function(cid,sid){var _457=com.ibm.mm.enabler.utils.Utils.getIdFromIdentifiable(cid);var _458=com.ibm.mm.enabler.utils.Utils.getIdFromIdentifiable(sid);this.clientServerMap[_457]=_458;},resolveID:function(id){var _459=com.ibm.mm.enabler.utils.Utils.getIdFromIdentifiable(id);return (_459 in this.clientServerMap)?this.clientServerMap[_459]:_459;},resolveIdentifiable:function(id){return new com.ibm.mm.enabler.IdentifierImpl(this.resolveID(id));}});com.ibm.mashups.enabler.services.IdentificationService=new com.ibm.mm.enabler.services.IdentificationServiceImpl();}if(!dojo._hasResource["com.ibm.mashups.enabler.services.IdentificationService"]){dojo._hasResource["com.ibm.mashups.enabler.services.IdentificationService"]=true;dojo.provide("com.ibm.mashups.enabler.services.IdentificationService");}if(!dojo._hasResource["com.ibm.mashups.enabler.model.state.NavigationStateProcessor_API"]){dojo._hasResource["com.ibm.mashups.enabler.model.state.NavigationStateProcessor_API"]=true;dojo.provide("com.ibm.mashups.enabler.model.state.NavigationStateProcessor_API");dojo.provide("com.ibm.mashups.enabler.model.state.NavigationStateProcessor");dojo.declare("com.ibm.mashups.enabler.model.state.NavigationStateProcessor",null,{encodeWidgetIdentifier:function(wid,_45a){},decodeWidgetIdentifier:function(wid,_45b){},decode:function(url,_45c){},encode:function(_45d,_45e,_45f,_460,_461){},generateUrl:function(_462,_463,_464){},generateURL:function(_465,_466,_467){},preprocess:function(_468,_469){},dispose:function(_46a){},postprocess:function(_46b,_46c,_46d,_46e){}});}if(!dojo._hasResource["com.ibm.mm.enabler.model.state.CookieManager"]){dojo._hasResource["com.ibm.mm.enabler.model.state.CookieManager"]=true;dojo.provide("com.ibm.mm.enabler.model.state.CookieManager");dojo.declare("com.ibm.mm.enabler.model.state.CookieManager",null,{constructor:function(){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.bIsLoggable=this.LOGGER.isLoggable(this.LOG_LEVEL);this._dirty=false;this.cookiePath=window.location.pathname;},COOKIE_PREFIX:"digest.ignore.state.",disposeState:function(){if(ibmConfig["com.ibm.mashups.embedding.isActive"]===true){return;}var id=this._getCookieID();if(id&&dojo.cookie(id)){if(dojo.isIE){dojo.cookie(id,null,{expires:-1});}else{dojo.cookie(id,null,{expires:-1,path:this.cookiePath});}}if(this._state){delete this._state;}this._dirty=false;},_getCookieID:function(){if(!this._cookieID){var _46f=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME);var uid=_46f.getValue(com.ibm.mashups.enabler.services.ConfigConstants.USER);if(!uid||(uid&&uid=="null")){return null;}this._cookieID=this.COOKIE_PREFIX+uid;}return this._cookieID;},_init:function(){if(!this._getCookieID()){this._state={};return;}if(dojo.cookie.isSupported()){if(dojo.cookie(this._getCookieID())&&dojo.fromJson(dojo.cookie(this._getCookieID()))){this._state=dojo.fromJson(dojo.cookie(this._getCookieID()));}}if(!this._state){this._state={};}},getState:function(id){if(!this._state){this._init();}if(!id){return this._state;}if(this._state[id]){return this._state[id];}return null;},setState:function(id,_470){if(!this._state){this._state={};}this._state[id]=_470;this._dirty=true;},removeState:function(id){if(this._state[id]){delete this._state[id];this._dirty=true;}},commit:function(){if(ibmConfig["com.ibm.mashups.embedding.isActive"]===true){return;}if(this._dirty){if(!this._getCookieID()){this._dirty=false;return;}if(dojo.cookie.isSupported()){if(dojo.isIE){dojo.cookie(this._getCookieID(),dojo.toJson(this._state),{expires:3652});}else{dojo.cookie(this._getCookieID(),dojo.toJson(this._state),{expires:3652,path:this.cookiePath});}}this._dirty=false;}}});com.ibm.mashups.enabler.model.state.CookieManager=new com.ibm.mm.enabler.model.state.CookieManager();}if(!dojo._hasResource["com.ibm.mashups.iwidget.model.Factory_API"]){dojo._hasResource["com.ibm.mashups.iwidget.model.Factory_API"]=true;dojo.provide("com.ibm.mashups.iwidget.model.Factory_API");dojo.provide("com.ibm.mashups.iwidget.model.Factory");dojo.declare("com.ibm.mashups.iwidget.model.Factory",null,{constructor:function(){},getGlobalWidgetModel:function(){}});}if(!dojo._hasResource["com.ibm.mm.iwidget.Constants"]){dojo._hasResource["com.ibm.mm.iwidget.Constants"]=true;dojo.provide("com.ibm.mm.iwidget.Constants");dojo.declare("com.ibm.mm.iwidget.Constants",null,{constructor:function(){},WIDGETEVENT_PREFIX:"widgetevents.",WILDCARD_PREFIX:"*.",mode:{VIEW:"view",EDIT:"edit",PERSONALIZE:"personalize",CONFIG:"config",HELP:"help"},mode_view:"view",mode_edit:"edit",mode_help:"help",event:{TITLE:"title",DESCRIPTION:"description"},ATTRIBUTES:"attributes",IDESCRIPTOR:"idescriptor",USERPROFILE:"userprofile",windowstate:{NORMAL:"normal",MINIMIZE:"minimize",MAXIMIZE:"maximize"},status:{SUCCESS:200,TIMEOUT:408,NOTFOUND:404,INTERROR:500,OTHER:303},changeType:{CHANGEDVALUE:"changedValue",NEWITEM:"newItem",REMOVEDITEM:"removedItem"},iDescriptorItems:{title:"title",name:"name",description:"description",defaultHeight:"defaultHeight",defaultWidth:"defaultWidth",displayLocale:"displayLocale",mode:"mode",author:"author",email:"email",website:"website",version:"version",icon:"icon",windowState:"windowState",messageLocale:"messageLocale",availableMessageLocales:"availableMessageLocales",thumbnail:"thumbnail"},IW_PREFIX:"iw-",IW_DEFINITION_TYPE:"iwidget",OSGADGET_DEFINITION_TYPE:"os-gadget",CSSCLASS_INSTANCE:{iwWidget:"iWidget",iwOSGadget:"OSGadget",iwSandbox:"Sandbox",iwDefinition:"Definition",iwEventDescription:"EventDescription",iwPayloadType:"PayloadType",iwHandled:"Handled",iwPublished:"Published",iwDescription:"Description",iwTitle:"Title",iwEvent:"Event",iwDescRef:"DescRef",iwGlobalid:"Globalid",iwHandler:"Handler",iwNewWire:"NewWire",iwRemoveWire:"RemoveWire",iwReadOnly:"ReadOnly",iwItemSet:"ItemSet",iwItem:"Item",iwValue:"Value",iwContent:"Content",iwReceivedEvent:"ReceivedEvent",iwSourceEvent:"SourceEvent",iwTargetEvent:"TargetEvent",iwMappedName:"MappedName",iwStandalone:"Standalone"},CSSCLASS_PREFIXED_INSTANCE:{},CSSCLASS_PERSONALIZED:"mm-Personalized",RESOURCE:{src:"src",id:"id",globalid:"globalid",mimeType:"mimeType",callback:"callback",version:"version",blockInit:"blockInit",skipLoad:"skipLoad"},EVENTS:{onLoad:"onLoad",onUnLoad:"onUnload",onModeChanged:"onModeChanged",onItemSetChanged:"onItemSetChanged",unloadWidget:"/enabler/unloadWidget",unSubscribeWire:"/enabler/unSubscribeWire",modeChanged:"modeChanged",onSizeChanged:"onSizeChanged",onNavStateChanged:"onNavStateChanged",onAttributeSaved:"com.ibm.mashups.iwidget.onAttributeSaved",onWindowStateChanged:"onWindowStateChanged",onIncompleteEventDescription:"onIncompleteEventDescription"},eventservice:{type:{MAIN:"MAIN",IFRAME:"IFRAME"}}});com.ibm.mm.iwidget.Constants=new com.ibm.mm.iwidget.Constants();(function(){for(var key in com.ibm.mm.iwidget.Constants.CSSCLASS_INSTANCE){if(Object.prototype.hasOwnProperty.call(com.ibm.mm.iwidget.Constants.CSSCLASS_INSTANCE,key)){com.ibm.mm.iwidget.Constants.CSSCLASS_PREFIXED_INSTANCE[key]=com.ibm.mm.iwidget.Constants.IW_PREFIX+com.ibm.mm.iwidget.Constants.CSSCLASS_INSTANCE[key];}}})();iwConstants=com.ibm.mm.iwidget.Constants;}if(!dojo._hasResource["com.ibm.mashups.iwidget.widget.WireProvider"]){dojo._hasResource["com.ibm.mashups.iwidget.widget.WireProvider"]=true;dojo.provide("com.ibm.mashups.iwidget.widget.WireProvider");dojo.declare("com.ibm.mashups.iwidget.widget.WireProvider",null,{constructor:function(id){},getWires:function(){}});}if(!dojo._hasResource["com.ibm.mashups.iwidget.IEventDescription_API"]){dojo._hasResource["com.ibm.mashups.iwidget.IEventDescription_API"]=true;dojo.provide("com.ibm.mashups.iwidget.IEventDescription_API");dojo.provide("com.ibm.mashups.iwidget.IEventDescription");dojo.declare("com.ibm.mashups.iwidget.IEventDescription",null,{constructor:function(){},alias:"",name:"",type:"",handlingFn:"",getDescription:function(_471){return null;},lang:"",isHandled:false,isPublished:false,getAttribute:function(_472,_473){return null;},setAttribute:function(_474,_475,_476){}});}if(!dojo._hasResource["com.ibm.mm.iwidget.IEventDescriptionImpl"]){dojo._hasResource["com.ibm.mm.iwidget.IEventDescriptionImpl"]=true;dojo.provide("com.ibm.mm.iwidget.IEventDescriptionImpl");dojo.declare("com.ibm.mm.iwidget.IEventDescriptionImpl",com.ibm.mashups.iwidget.IEventDescription,{constructor:function(name,_477,type,_478,_479,_47a,_47b){if(dojo.isString(name)){var obj={};obj.name=name;_477=_477||null;if(_477){obj.handlingFn=_477;obj.isHandled=true;obj.isPublished=false;}else{obj.isPublished=true;}type=type||null;if(type){obj.type=type;}_47a=_47a||null;if(_47a){obj.lang=_47a;}else{obj.lang="en";}obj.attributes={};obj.localizedAttributes={};_479=_479||null;if(_479){obj.attributes.aliases=_479;}_47b=_47b||null;if(_47b){obj.localizedAttributes=_47b;}if(_478){if(!obj.localizedAttributes[obj.lang]){obj.localizedAttributes[obj.lang]={};}obj.localizedAttributes[obj.lang].description=_478;}this._internalJsonObj=obj;}else{this._internalJsonObj=name;}this.initPredefinedFields(this._internalJsonObj);},initPredefinedFields:function(obj){this.name=obj.name;this.type=obj.type;this.lang=obj.lang;this.handlingFn=obj.handlingFn;this.isHandled=obj.isHandled;this.isPublished=obj.isPublished;},getDescription:function(_47c){return this._getLocalizedAttribute("description",_47c);},getTitle:function(_47d){return this._getLocalizedAttribute("title",_47d);},_getLocalizedAttribute:function(_47e,_47f){var _480=null,_481=null;var lc=com.ibm.mashups.enabler.context.Factory.getLocalizedContext(_47f,this.lang);var _482=lc.getLocale(this);if(this.localemapping&&this.localemapping[_482]){_482=this.localemapping[_482];}if(this._internalJsonObj.localizedAttributes){_481=this._internalJsonObj.localizedAttributes[_482];if(_481){_480=_481[_47e];}}if(!_480){_480=this[_47e];}if(typeof _480=="undefined"){_480=null;}return _480;},setOnRemoveWire:function(_483){if(typeof _483=="undefined"||_483===null){_483="onRemoveWire";}if(typeof this._internalJsonObj.attributes=="undefined"){this._internalJsonObj.attributes={};}this._internalJsonObj.attributes.onRemoveWire=_483;return this;},getOnRemoveWire:function(){if(typeof this._internalJsonObj.attributes!="undefined"&&this._internalJsonObj.attributes.onRemoveWire){return this._internalJsonObj.attributes.onRemoveWire;}return null;},setOnNewWire:function(_484){if(typeof _484=="undefined"||_484===null){_484="onNewWire";}if(typeof this._internalJsonObj.attributes=="undefined"){this._internalJsonObj.attributes={};}this._internalJsonObj.attributes.onNewWire=_484;return this;},getOnNewWire:function(){if(typeof this._internalJsonObj.attributes!="undefined"&&this._internalJsonObj.attributes.onNewWire){return this._internalJsonObj.attributes.onNewWire;}return null;},getLocales:function(){var _485=[];var _486={};if(this._internalJsonObj.localizedAttributes){for(var i in this._internalJsonObj.localizedAttributes){if(Object.prototype.hasOwnProperty.call(this._internalJsonObj.localizedAttributes,i)){_485.push(i);var _487=com.ibm.mm.enabler.utils.LocaleHelper.normalizeLocale(i);if(_487!=i){_486[_487]=i;}}}}this.localemapping=_486;return _485;},toString:function(){var temp=this.toJson();return dojo.toJson(temp);},_getInternalJsonObj:function(){return this._internalJsonObj;},toJson:function(){var _488={};for(var i in this._internalJsonObj){if(Object.prototype.hasOwnProperty.call(this._internalJsonObj,i)){if(i=="handlingFn"){if(dojo.isFunction(this._internalJsonObj[i])){_488[i]="HANDLEFN";continue;}}_488[i]=dojo.clone(this._internalJsonObj[i]);}}return _488;},clone:function(){var temp=dojo.toJson(this._internalJsonObj);if(temp){return new com.ibm.mm.iwidget.IEventDescriptionImpl(dojo.fromJson(temp));}else{return null;}},getAttribute:function(_489,_48a){if(!_489){return null;}if(!_48a){if(this._internalJsonObj.attributes&&typeof this._internalJsonObj.attributes[_489]!="undefined"){return this._internalJsonObj.attributes[_489];}if(this._internalJsonObj.localizedAttributes&&this._internalJsonObj.localizedAttributes[this.lang]){var _48b=this._internalJsonObj.localizedAttributes[this.lang][_489];if(_48b){return _48b;}}return null;}else{return this._getLocalizedAttribute(_489,_48a);}},setAttribute:function(_48c,_48d,_48e){if(!_48c){return null;}if(typeof _48d=="undefined"){return null;}if(!_48e){if(typeof this._internalJsonObj.attributes=="undefined"){this._internalJsonObj.attributes={};}this._internalJsonObj.attributes[_48c]=_48d;if(_48d===null){delete this._internalJsonObj.attributes[_48c];}return this;}if(!this._internalJsonObj.localizedAttributes[_48e]){this._internalJsonObj.localizedAttributes[_48e]={};}this._internalJsonObj.localizedAttributes[_48e][_48c]=_48d;if(_48d===null){delete this._internalJsonObj.localizedAttributes[_48e][_48c];}return this;},copyRuntimeProperties:function(_48f){if((!this.handlingFn)&&(_48f.handlingFn)){this.handlingFn=_48f.handlingFn;}if((!this._internalJsonObj.handlingFn)&&(_48f._internalJsonObj.handlingFn)){this._internalJsonObj.handlingFn=_48f._internalJsonObj.handlingFn;}if(typeof this._internalJsonObj.attributes=="undefined"){this._internalJsonObj.attributes={};}for(var name in _48f._internalJsonObj.attributes){if(!this._internalJsonObj.attributes[name]){this._internalJsonObj.attributes[name]=_48f._internalJsonObj.attributes[name];}}}});}if(!dojo._hasResource["com.ibm.mashups.iwidget.IEventDescription"]){dojo._hasResource["com.ibm.mashups.iwidget.IEventDescription"]=true;dojo.provide("com.ibm.mashups.iwidget.IEventDescription");}if(!dojo._hasResource["com.ibm.mashups.iwidget.widget.EventProvider"]){dojo._hasResource["com.ibm.mashups.iwidget.widget.EventProvider"]=true;dojo.provide("com.ibm.mashups.iwidget.widget.EventProvider");dojo.declare("com.ibm.mashups.iwidget.widget.EventProvider",null,{constructor:function(){},getWidgetPublishedEvents:function(){},getWidgetHandledEvents:function(){},getPublicEvent:function(name){}});}if(!dojo._hasResource["com.ibm.mashups.iwidget.widget.Properties_API"]){dojo._hasResource["com.ibm.mashups.iwidget.widget.Properties_API"]=true;dojo.provide("com.ibm.mashups.iwidget.widget.Properties_API");dojo.provide("com.ibm.mashups.iwidget.widget.Properties");dojo.declare("com.ibm.mashups.iwidget.widget.Properties",null,{constructor:function(){},getItemValue:function(_490,_491){},getAllNames:function(){return null;},getItemLocales:function(_492){},isReadOnly:function(_493){}});}if(!dojo._hasResource["com.ibm.mm.iwidget.widget.PropertiesImpl"]){dojo._hasResource["com.ibm.mm.iwidget.widget.PropertiesImpl"]=true;dojo.provide("com.ibm.mm.iwidget.widget.PropertiesImpl");dojo.declare("com.ibm.mm.iwidget.widget.PropertiesImpl",com.ibm.mashups.iwidget.widget.Properties,{DELETE_TOKEN:"com.ibm.mm.iwidget.widget.DELETE_TOKEN",TYPE_NEW:"newItem",TYPE_UPDATE:"updatedValue",TYPE_REMOVE:"removedItem",constructor:function(_494,_495){this._defaultProperties=_495;this._items={};if(_494){this._items=_494;}this._localizedItems={};this.DEFAULT_LOCALE=ibmConfig[com.ibm.mashups.enabler.services.ConfigConstants.DEFAULT_LOCALE];if(!this.DEFAULT_LOCALE){this.DEFAULT_LOCALE="en";}},_getItemDefaultLocale:function(_496){var _497=null;if(this._items[_496]){if(this._items[_496].defaultLocale){_497=this._items[_496].defaultLocale;}}if(!_497){_497=null;}return _497;},getLocalizedItemValue:function(_498,_499){if(!_498||!_499){return;}if(!(_498 in this._items)&&!this._defaultProperties){return null;}var item=this._items[_498];var _49a=null;if(!item.values){return null;}var _49b=[];for(var i in item.values){if(Object.prototype.hasOwnProperty.call(item.values,i)){_49b.push(i);}}var _49c;_49c=com.ibm.mm.enabler.utils.LocaleHelper.matchLocale(_499,_49b);for(var j in item.values){if(_49c==com.ibm.mm.enabler.utils.LocaleHelper.normalizeLocale(j)){_49a=item.values[j];break;}}if(_49a==this.DELETE_TOKEN){return null;}return _49a;},getItemValue:function(_49d,_49e){if(!(_49d in this._items)&&!this._defaultProperties){return null;}if(!(_49d in this._items)){return this._defaultProperties.getItemValue(_49d,_49e);}var item=this._items[_49d];var _49f=null;if((typeof _49e=="undefined"||_49e===null)&&typeof item.value!="undefined"&&item.value!==null){if(item.value==this.DELETE_TOKEN){return null;}return item.value;}if(!item.values){return null;}var _4a0=[];for(var i in item.values){if(Object.prototype.hasOwnProperty.call(item.values,i)){_4a0.push(i);}}var _4a1;if(_49e){_4a1=com.ibm.mm.enabler.utils.LocaleHelper.matchLocale(_49e,_4a0);for(var j in item.values){if(_4a1==com.ibm.mm.enabler.utils.LocaleHelper.normalizeLocale(j)){_49f=item.values[j];break;}}}if(item.defaultLocale&&_49f===null){_4a1=com.ibm.mm.enabler.utils.LocaleHelper.matchLocale(item.defaultLocale,_4a0);for(var k in item.values){if(_4a1==com.ibm.mm.enabler.utils.LocaleHelper.normalizeLocale(k)){_49f=item.values[k];break;}}}if(this.DEFAULT_LOCALE&&_49f===null){_4a1=com.ibm.mm.enabler.utils.LocaleHelper.matchLocale(this.DEFAULT_LOCALE,_4a0);for(var l in item.values){if(_4a1==com.ibm.mm.enabler.utils.LocaleHelper.normalizeLocale(l)){_49f=item.values[l];break;}}}if(_49f===null){for(var lang in item.values){if(Object.prototype.hasOwnProperty.call(item.values,lang)){_49f=item.values[lang];break;}}}if(_49f==this.DELETE_TOKEN){return null;}return _49f;},getItemLocales:function(_4a2){var _4a3=[];if(_4a2 in this._items&&this._items[_4a2].values){for(var _4a4 in this._items[_4a2].values){if(Object.prototype.hasOwnProperty.call(this._items[_4a2].values,_4a4)){_4a3.push(_4a4);}}}if(_4a3.length===0){return null;}return _4a3;},getAllNames:function(){var _4a5=[];if(this._defaultProperties){_4a5=this._defaultProperties.getAllNames();}var _4a6={};for(var i=0;i<_4a5.length;i++){_4a6[_4a5[i]]=null;}for(var _4a7 in this._items){if(this._items[_4a7]&&this._items[_4a7]._change&&this._items[_4a7]._change.changeType==this.TYPE_REMOVE){if(_4a7 in _4a6){delete _4a6[_4a7];}}else{_4a6[_4a7]=null;}}var _4a8=[];for(var _4a9 in _4a6){if(Object.prototype.hasOwnProperty.call(_4a6,_4a9)){_4a8.push(_4a9);}}return _4a8;},isReadOnly:function(_4aa){var item=this._items[_4aa];return (this._defaultProperties&&this_defaultProperties.isReadOnly(_4aa))||(item&&item.readOnly);}});}if(!dojo._hasResource["com.ibm.mashups.iwidget.widget.Properties"]){dojo._hasResource["com.ibm.mashups.iwidget.widget.Properties"]=true;dojo.provide("com.ibm.mashups.iwidget.widget.Properties");}if(!dojo._hasResource["com.ibm.mashups.iwidget.widget.PropertiesProvider"]){dojo._hasResource["com.ibm.mashups.iwidget.widget.PropertiesProvider"]=true;dojo.provide("com.ibm.mashups.iwidget.widget.PropertiesProvider");dojo.declare("com.ibm.mashups.iwidget.widget.PropertiesProvider",null,{constructor:function(){},getIDescriptorItems:function(){},getAttributes:function(){}});}if(!dojo._hasResource["com.ibm.mashups.iwidget.widget.IWidgetDefinition_API"]){dojo._hasResource["com.ibm.mashups.iwidget.widget.IWidgetDefinition_API"]=true;dojo.provide("com.ibm.mashups.iwidget.widget.IWidgetDefinition_API");dojo.provide("com.ibm.mashups.iwidget.widget.IWidgetDefinition");dojo.declare("com.ibm.mashups.iwidget.widget.IWidgetDefinition",[com.ibm.mashups.iwidget.widget.EventProvider,com.ibm.mashups.iwidget.widget.PropertiesProvider],{constructor:function(){},getSupportedModes:function(){},toSpecObject:function(){}});}if(!dojo._hasResource["com.ibm.mm.iwidget.widget.IWidgetDefinitionDefaultImpl"]){dojo._hasResource["com.ibm.mm.iwidget.widget.IWidgetDefinitionDefaultImpl"]=true;dojo.provide("com.ibm.mm.iwidget.widget.IWidgetDefinitionDefaultImpl");dojo.declare("com.ibm.mm.iwidget.widget.IWidgetDefinitionDefaultImpl",com.ibm.mashups.iwidget.widget.IWidgetDefinition,{namespaces:{"iw":"http://www.ibm.com/xmlns/prod/iWidget"},reservedAttributes:{iScope:"iScope",supportedModes:"supportedModes",id:"id",allowInstanceContent:"allowInstanceContent",lang:"language","xml_lang":"_xml_lang","xmlns_iw":"_xmlns_iw",supportedWindowStates:"supportedWindowStates","xml_base":"_xml_base",sandbox:"sandbox"},constructor:function(_4ab,_4ac,_4ad){this.widgetDef=_4ab;if(_4ac){this.xmlStr=_4ac;}if(_4ad){this.specObject=_4ad;this._specObjectToWidgetDef();}},getXmlBase:function(){if(this.widgetDef.xmlBase){return this.widgetDef.xmlBase;}return null;},getAllowInstanceContent:function(){return this.widgetDef.allowInstanceContent;},getResources:function(){if(!this.resources){this.resources=[];}return this.resources;},getIScope:function(){return this.widgetDef.iScope;},getWidgetEvents:function(){return this.widgetDef.widgetEvents;},getMarkupByMode:function(mode){if(this.widgetDef.markup){if(!mode){mode="view";}var temp=this.widgetDef.markup[mode];return temp;}else{return null;}},setMarkupByMode:function(mode,elem){if(this.widgetDef.markup){if(!mode){mode="view";}this.widgetDef.markup[mode]=elem;return this;}return null;},_getManagedItemSetListener:function(_4ae){if(!_4ae){return null;}if(_4ae!=iwConstants.ATTRIBUTES&&_4ae!=iwConstants.IDESCRIPTOR){return null;}if(this.widgetDef.itemSetsArr){var _4af=this.widgetDef.itemSetsArr[_4ae];if(_4af&&_4af.onItemSetChanged){return _4af.onItemSetChanged;}}return null;},_getManagedItemSetItems:function(_4b0,_4b1){var _4b2={};if(this.widgetDef.itemSetsArr){var _4b3=this.widgetDef.itemSetsArr[_4b0];if(_4b3){for(var _4b4 in _4b3.items){if(Object.prototype.hasOwnProperty.call(_4b3.items,_4b4)){_4b2[_4b4]=_4b3.items[_4b4];}}}}_4b1=_4b1||null;if(_4b1){for(var _4b5 in _4b1){if(Object.prototype.hasOwnProperty.call(_4b1,_4b5)){var _4b6=_4b1[_4b5];if(typeof _4b6!="undefined"&&_4b6!==null){var _4b7={};_4b7.readOnly=false;_4b7.value=_4b6;_4b7.id=_4b5;_4b2[_4b5]=_4b7;}}}}return new com.ibm.mm.iwidget.widget.PropertiesImpl(_4b2);},getAttributes:function(){if(!this.attributeProperties){this.attributeProperties=this._getManagedItemSetItems(iwConstants.ATTRIBUTES,this.widgetDef.simpleAttributes);}return this.attributeProperties;},getIDescriptorItems:function(){if(!this.idescriptorProperties){this.idescriptorProperties=this._getManagedItemSetItems(iwConstants.IDESCRIPTOR,this.widgetDef.iDescriptor);}return this.idescriptorProperties;},getAllItemSetNames:function(){var _4b8=[];if(!this.widgetDef.itemSetsArr){return _4b8;}for(var _4b9 in this.widgetDef.itemSetsArr){if(Object.prototype.hasOwnProperty.call(this.widgetDef.itemSetsArr,_4b9)){var _4ba=this.widgetDef.itemSetsArr[_4b9];if(typeof (_4ba)!="undefined"&&_4b9!=iwConstants.ATTRIBUTES&&_4b9!=iwConstants.IDESCRIPTOR){_4b8.push(_4ba.id);}}}return _4b8;},getItemSet:function(name){if(name=="attributes"){return this.getAttributes();}var _4bb=this.widgetDef.itemSetsArr[name]||null;if(!_4bb){return null;}return _4bb;},getWidgetId:function(){return this.widgetDef.id;},getWidgetName:function(){return this.widgetDef.id;},getPayloadDefs:function(){return null;},getPayloadDef:function(name){return null;},getPayloadDefNames:function(){var arr=[];return arr;},getSupportedModes:function(){var temp=this.widgetDef.supportedModes;if(!temp){return null;}var arr=temp.split(" ");return arr;},getSupportedWindowStates:function(){var temp=this.widgetDef.supportedWindowStates;if(!temp){return null;}var arr=temp.split(" ");return arr;},getDefaultLanguage:function(){return this.widgetDef.lang;},getMarkup:function(){return this.widgetDef.markup;},_specObjectToWidgetDef:function(){this.widgetDef={};if(null===this.specObject){return;}var temp=this.specObject._id;if(!temp){temp=this.specObject._name;}this.widgetDef.id=null;this.widgetDef.name=null;if(temp){this.widgetDef.id=temp;this.widgetDef.name=temp;}this.widgetDef.allowInstanceContent=false;temp=this.specObject._allowInstanceContent;if(temp&&temp=="true"){this.widgetDef.allowInstanceContent=true;}temp=this.specObject._iScope;this.widgetDef.iScope=null;if(temp){this.widgetDef.iScope=temp;}temp=this.specObject._supportedModes;if(!temp){temp="view";}this.widgetDef.supportedModes=temp;temp=this.specObject._supportedWindowStates;if(!temp){temp="normal";}this.widgetDef.supportedWindowStates=temp;temp=this.specObject._lang;if(!temp){temp=this.specObject._xml_lang;}if(!temp){temp="en";}this.widgetDef.lang=temp;temp=this.specObject._xml_base;if(temp){this.widgetDef.xmlBase=temp;}var _4bc=iwConstants.iDescriptorItems;var _4bd={};for(var i in _4bc){if(Object.prototype.hasOwnProperty.call(_4bc,i)){var name=_4bc[i];var _4be=this.specObject["_"+name];if(typeof _4be=="undefined"){_4be=null;}_4bd[name]=_4be;}}this.widgetDef.iDescriptor=_4bd;var _4bf={};var _4c0={};for(var j in this.specObject){if(Object.prototype.hasOwnProperty.call(this.specObject,j)){if(0!==j.indexOf("_")){continue;}var attr=j;attr=attr.substr(1);if(attr.indexOf("on")!==0&&!iwConstants.iDescriptorItems[attr]&&!this.reservedAttributes[attr]){_4bf[attr]=this.specObject[j];}else{if(attr.indexOf("on")===0){_4c0[attr]=this.specObject[j];}}}}this.widgetDef.simpleAttributes=_4bf;this.widgetDef.widgetEvents=_4c0;this.widgetDef.markup=this._extractMarkupFromSpecObject();var _4c1=this._extractItemSetsFromSpecObject(this.widgetDef);if(null!==_4c1){this.widgetDef.itemSetsArr=_4c1;}this.widgetDef.publicEvents=this._extractEventsFromSpecObject();this.widgetDef.resources=this._extractResourcesFromSpecObject();this.widgetDef.eventDescriptions=this._extractEventDescFromSpecObject();},_extractMarkupFromSpecObject:function(){var _4c2=this.specObject.contents;var _4c3={};for(var mode in _4c2){if(Object.prototype.hasOwnProperty.call(_4c2,mode)){if(_4c2[mode]){_4c3[mode]={};if(_4c2[mode]._uri){_4c3[mode].uri=_4c2[mode]._uri;}if(_4c2[mode].value){_4c3[mode].content=_4c2[mode].value;}}}}return _4c3;},_extractItemSetsFromSpecObject:function(_4c4){var _4c5=this.specObject.itemSets;if(_4c5){var _4c6={};var _4c7={};for(var i in _4c5){if(Object.prototype.hasOwnProperty.call(_4c5,i)){var _4c8=_4c5[i];var id=i;var _4c9=_4c8._onItemSetChanged;var temp=_4c8._private;var _4ca=true;if(temp&&temp=="false"){_4ca=false;}var _4cb=_4c8._alias?_4c8._alias:null;var _4cc=_4c8._description;var _4cd={id:id,onItemSetChanged:_4c9,isPrivate:_4ca};if(_4cb){_4cd.alias=_4cb;}_4cd.items={};var _4ce=_4c8.items;for(var j in _4ce){if(Object.prototype.hasOwnProperty.call(_4ce,j)){var item=_4ce[j];var _4cf=false;var _4d0=item._readOnly;if(_4d0&&_4d0=="true"){_4cf=true;}var id2=item._id;var _4d1=item._alias?item._alias:null;var _4d2=item._value;var lang=item._lang;if(!lang){lang=item._xml_lang;}var _4d3={};_4d3.id=id2;if(_4d1){_4d3.alias=_4d1;}_4d3.readOnly=_4cf;if(lang){_4d3.defaultLocale=lang;}if(typeof _4d2!="undefined"&&_4d2!==null&&!lang){_4d3.value=_4d2;}if(typeof _4d2!="undefined"&&_4d2!==null&&lang){_4d3.values={};_4d3.values[lang]=_4d2;}var _4d4=item.alts;for(var v in _4d4){if(Object.prototype.hasOwnProperty.call(_4d4,v)){var _4d5=_4d4[v];var _4d6=v;var _4d7=_4d5._value;if(!_4d3.values){_4d3.values={};}_4d3.values[_4d6]=_4d7;if(lang&&_4d6==lang&&_4d3.value){delete _4d3.value;}}}_4cd.items[id2]=_4d3;}}if(_4ca===true){_4c6[id]=_4cd;}else{_4c7[id]=_4cd;}}}_4c4.shareableItemSetsArr=_4c7;return _4c6;}return null;},_extractEventsFromSpecObject:function(){var _4d8=this.specObject.events;var _4d9={};if(_4d8&&_4d8.length!==0){for(var j in _4d8){if(Object.prototype.hasOwnProperty.call(_4d8,j)){var _4da=_4d8[j];var _4db={};for(var i in _4da){if(Object.prototype.hasOwnProperty.call(_4da,i)){var name=i;if(0===i.indexOf("_")){name=name.substr(1);}var _4dc=_4da[i];if(name=="eventDescName"){name="description";}if(name=="handled"){name="isHandled";}if(name=="published"){name="isPublished";}if(_4dc){_4db[name]=_4dc;}}}_4d9[_4db.id]=_4db;}}}return _4d9;},_extractResourcesFromSpecObject:function(){var _4dd=[];var _4de=this.specObject.resources;var j=0;if(_4de&&_4de.length!==0){for(var i in _4de){if(Object.prototype.hasOwnProperty.call(_4de,i)){var node=_4de[i];var _4df={};var id=node._id;if(!id){id=node._globalid;}_4df[iwConstants.RESOURCE.id]=id?id:null;var src=node._src;if(!src){src=node._uri;}_4df[iwConstants.RESOURCE.src]=src;_4df[iwConstants.RESOURCE.version]=node._version?node._version:null;_4df[iwConstants.RESOURCE.callback]=node._callback?node._callback:null;_4df[iwConstants.RESOURCE.mimeType]=node._mimeType?node._mimeType:null;_4df[iwConstants.RESOURCE.blockInit]=node._blockInit?node._blockInit:null;_4df[iwConstants.RESOURCE.globalid]=node._globalid?node._globalid:null;_4df[iwConstants.RESOURCE.skipLoad]=node._skipLoad?node._skipLoad:null;_4dd[j]=_4df;j++;}}}return _4dd;},_extractPayloadDefsFromSpecObject:function(){var _4e0={};var _4e1=this.specObject.payloadDefs;for(var i in _4e1){if(Object.prototype.hasOwnProperty.call(_4e1,i)){var _4e2=payloadDef[i];}}},_extractEventDescFromSpecObject:function(){var _4e3={};var _4e4=this.specObject.eventDescriptions;if(_4e4&&_4e4.length!==0){for(var i in _4e4){if(Object.prototype.hasOwnProperty.call(_4e4,i)){var node=_4e4[i];var _4e5={};var id=i;_4e5.id=id;_4e5.payloadType=node._payloadType;_4e5.description=node._description;_4e5.title=node._title;_4e5.descriptionURI=node._descriptionURI?node._descriptionURI:null;var lang=node._lang;if(!lang){lang=node._xml_lang;}if(lang){_4e5.lang=lang;}var _4e6=node.alts;for(var j in _4e6){if(Object.prototype.hasOwnProperty.call(_4e6,j)){var _4e7=_4e6[j];var temp={};temp.description=_4e7._description;temp.title=_4e7._title;temp.descriptionURI=_4e7._descriptionURI?aNode_descriptionURI:null;if(!_4e5.descriptions){_4e5.descriptions={};}_4e5.descriptions[j]=temp;}}_4e3[id]=_4e5;}}}return _4e3;},toSpecObject:function(){if(this.specObject){return this.specObject;}var _4e8={};return _4e8;}});com.ibm.mm.iwidget.widget.IWidgetDefinitionImpl=com.ibm.mm.iwidget.widget.IWidgetDefinitionDefaultImpl;if((ibmConfig.enablerLayerModules)&&(dojo.indexOf(ibmConfig.enablerLayerModules,"iWidget")>=0)){dojo["require"]("com.ibm.mm.iwidget.widget.IWidgetDefinitionExtendedImpl");}}if(!dojo._hasResource["com.ibm.mashups.iwidget.widget.IWidgetDefinition"]){dojo._hasResource["com.ibm.mashups.iwidget.widget.IWidgetDefinition"]=true;dojo.provide("com.ibm.mashups.iwidget.widget.IWidgetDefinition");}if(!dojo._hasResource["com.ibm.mashups.iwidget.widget.ModifiableProperties_API"]){dojo._hasResource["com.ibm.mashups.iwidget.widget.ModifiableProperties_API"]=true;dojo.provide("com.ibm.mashups.iwidget.widget.ModifiableProperties_API");dojo.provide("com.ibm.mashups.iwidget.widget.ModifiableProperties");dojo.declare("com.ibm.mashups.iwidget.widget.ModifiableProperties",[com.ibm.mashups.iwidget.widget.Properties],{constructor:function(){},setItemValue:function(_4e9,_4ea,_4eb,_4ec){},removeItem:function(_4ed){},removeItemValue:function(_4ee,_4ef){}});}if(!dojo._hasResource["com.ibm.mm.iwidget.widget.ModifiablePropertiesImpl"]){dojo._hasResource["com.ibm.mm.iwidget.widget.ModifiablePropertiesImpl"]=true;dojo.provide("com.ibm.mm.iwidget.widget.ModifiablePropertiesImpl");dojo.declare("com.ibm.mm.iwidget.widget.ModifiablePropertiesImpl",[com.ibm.mashups.iwidget.widget.ModifiableProperties,com.ibm.mm.iwidget.widget.PropertiesImpl],{constructor:function(_4f0,_4f1){this._dirty=false;},_buildChange:function(item,_4f2,_4f3,_4f4,_4f5){var _4f6=item._dirty;if(!_4f6){item._dirty=true;}var _4f7=item._change?item._change:{};_4f7.id=_4f2;if(_4f5){if(_4f6&&_4f7.changeType&&_4f7.changeType==this.TYPE_NEW){item._dirty=false;delete item._change;return;}else{if(_4f6){_4f7.changeType=this.TYPE_REMOVE;return;}}item._change.changeType=this.TYPE_REMOVE;item._change.oldVal=_4f3;return;}if(_4f6&&_4f7.changeType){if(_4f7.changeType==this.TYPE_NEW){_4f7.newVal=_4f4;}else{_4f7.changeType=this.TYPE_UPDATE;_4f7.newVal=_4f4;}}else{if(_4f3){_4f7.oldVal=_4f3;}if(_4f4){_4f7.newVal=_4f4;}if(_4f3){_4f7.changeType=this.TYPE_UPDATE;}else{_4f7.changeType=this.TYPE_NEW;}}item._change=_4f7;return;},setItemValue:function(_4f8,_4f9,_4fa,_4fb){if(!_4f8||!_4f9){return null;}if(_4f8 in this._items){if(this._defaultProperties&&this._defaultProperties.isReadOnly(_4f8)){return null;}}var _4fc={};var _4fd={};var _4fe;if(!_4fb||(_4fb&&_4fb=="")){if(_4f8 in this._items){_4fc={};_4fd={};if(this._items[_4f8].values){_4fc=dojo.clone(this._items[_4f8].values);if(this._items[_4f8].value){_4fc[""]=this._items[_4f8].value;}_4fd=dojo.clone(this._items[_4f8].values);_4fd[""]=_4f9;}else{if(this._items[_4f8].value){_4fc[""]=this._items[_4f8].value;}_4fd[""]=_4f9;}this._items[_4f8].value=_4f9;this._buildChange(this._items[_4f8],_4f8,_4fc,_4fd);}else{var _4ff={};_4ff.id=_4f8;_4ff.value=_4f9;_4fe=!!_4fa;_4ff.readOnly=_4fe;this._items[_4f8]=_4ff;_4fd={};_4fd[""]=_4f9;this._items[_4f8]=this._items[_4f8]?this._items[_4f8]:{};this._buildChange(this._items[_4f8],_4f8,null,_4fd);}if(this._items[_4f8]._dirty){this._dirty=true;}return this;}var _500=_4fb.replace(/-/g,"_");if(_4f8 in this._items){_4fc={};_4fd={};if(this._items[_4f8].values){_4fc=dojo.clone(this._items[_4f8].values);}this._items[_4f8].values[_500]=_4f9;_4fd=dojo.clone(this._items[_4f8].values);if(this._items[_4f8].value){_4fc[""]=this._items[_4f8].value;_4fd[""]=this._items[_4f8].value;}this._items[_4f8].readOnly=_4fa;this._buildChange(this._items[_4f8],_4f8,_4fc,_4f9);if(this._items[_4f8]._dirty){this._dirty=true;}return this;}var item={};item.values={};item.values[_500]=_4f9;item.id=_4f8;_4fe=!!_4fa;item.readOnly=_4fe;this._items[_4f8]=item;_4fd=dojo.clone(item.values);this._buildChange(this._items[_4f8],_4f8,null,_4fd);if(this._items[_4f8]._dirty){this._dirty=true;}return this;},removeItem:function(_501){if(this._defaultProperties&&this._defaultProperties.isReadOnly(_501)){throw "The specified item ["+_501+"] is readOnly!";}var _502={};var _503=false;if(_501 in this._items){if(this._items[_501]._dirty){this._items[_501].value=this.DELETE_TOKEN;this._items[_501].values=this.DELETE_TOKEN;_502=this._items[_501]._change?this._items[_501]._change:{};if(_502.changeType==this.TYPE_NEW){delete this._items[_501];return this;}else{_502.changeType=this.TYPE_REMOVE;}}else{var _504={};if(this._items[_501].values){_504=dojo.clone(this._items[_501].values);}if(this._items[_501].value){_504[""]=this._items[_501].value;}this._items[_501].value=this.DELETE_TOKEN;this._items[_501].values=this.DELETE_TOKEN;_502={};_502.changeType=this.TYPE_REMOVE;_502.itemName=_501;_502.oldVal=_504;this._items[_501]._change=_502;this._items[_501]._dirty=true;}_503=true;}if(_503){this._dirty=true;return this;}else{return null;}},removeItemValue:function(_505,_506){if(!_506){_506="";}if(this._defaultProperties&&this._defaultProperties.isReadOnly(_505)){throw "The specified item ["+_505+"] is readOnly!";}var _507=_506.replace(/-/g,"_");var _508=false;var _509={};if(_505 in this._items){if(this._items[_505]._dirty){_509=this._items[_505]._change?this._items[_505]._change:{};if(_509.changeType==this.TYPE_REMOVE){return null;}else{if(_509.changeType==this.TYPE_NEW){if(_507==""&&this._items[_505].value&&this._items[_505].value!=this.DELETE_TOKEN){delete this._items[_505].value;if(this._items[_505]._change.newVal[""]){delete this._items[_505]._change.newVal[""];}_508=true;}if(_507!=""){if(this._items[_505].values[_507]){delete this._items[_505].values[_507];if(this._items[_505]._change.newVal[_507]){delete this._items[_505]._change.newVal[_507];}_508=true;}}if(this._isEmpty(this._items[_505]._change.newVal)){delete this._items[_505]._dirty;delete this._items[_505]._change;}}else{if(_507==""&&this._items[_505].value&&this._items[_505].value!=this.DELETE_TOKEN){delete this._items[_505].value;if(this._items[_505]._change.newVal[""]){delete this._items[_505]._change.newVal[""];}_508=true;}if(this._items[_505].values[_507]){delete this._items[_505].values[_507];if(this._items[_505]._change.newVal[_507]){delete this._items[_505]._change.newVal[_507];}_508=true;}}}}else{var _50a={};var _50b={};if(_507==""&&this._items[_505].value){_509={};_509.id=_505;_50a={};_50b={};if(this._items[_505].values){_509.changeType=this.TYPE_UPDATE;_50a=dojo.clone(this._items[_505].values);_50a[""]=this._items[_505][""];_509.oldVal=_50a;_509.newVal=dojo.clone(this._items[_505].values);delete this._items[_505].value;}else{_509.changeType=this.TYPE_REMOVE;_50a[""]=this._items[_505][""];_509.oldVal=_50a;delete this._items[_505].value;}this._items[_505]._change=_509;this._items[_505]._dirty=true;_508=true;}if(_507 in this._items[_505].values){_509={};_509.id=_505;_50a={};_50b={};if(this._items[_505].value){_509.changeType=this.TYPE_UPDATE;_50a=dojo.clone(this._items[_505].values);_50a[""]=this._items[_505][""];_509.oldVal=_50a;_509.newVal=dojo.clone(this._items[_505].values);_509.newVal[""]=this._items[_505].value;delete _509.newVal[_507];delete this._items[_505].value;}else{_50a=dojo.clone(this._items[_505].values);delete this._items[_505].values[_507];if(this._isEmpty(this._items[_505].values)){_509.changeType=this.TYPE_REMOVE;}else{_509.changeType=this.TYPE_UPDATE;_509.newVal=dojo.clone(this._items[_505].values);}_509.oldVal=_50a;}this._items[_505]._change=_509;this._items[_505]._dirty=true;_508=true;}}}if(_508){this._dirty=true;return this;}else{return null;}},_isDirty:function(){return this._dirty;},_setDirty:function(_50c){this._dirty=_50c;},_isItemDirty:function(_50d){if(!_50d){return false;}var _50e=false;if(this._items[_50d]){_50e=this._items[_50d]._dirty;}return _50e;},_setItemDirty:function(_50f,_510){if(!_50f){return;}if(this._items[_50f]){this._items[_50f]._dirty=_510;if(typeof _510!="undefined"&&!_510){delete this._items[_50f]._dirty;delete this._items[_50f]._change;}if(this._items[_50f].values&&this._items[_50f].values==this.DELETE_TOKEN){delete this._items[_50f].values;}if(this._items[_50f].value&&this._items[_50f].value==this.DELETE_TOKEN){delete this._items[_50f].value;}if(!this._items[_50f].value&&!this._items[_50f].values){delete this._items[_50f];}}},_getInternalItemValue:function(_511){if(this._items[_511]){return this._items[_511];}return null;},_isEmpty:function(obj){return com.ibm.mm.enabler.utils.Misc.isEmpty(obj);},_getRequiredValue:function(obj,_512){if(!obj){return null;}if(dojo.isString(obj)){return obj;}if(_512){if(obj[_512]){return obj[_512];}else{return null;}}var _513=null;var j=0;for(var i in obj){if(Object.prototype.hasOwnProperty.call(obj,i)){if(i==""){_513=obj[i];}j++;}}if(_513&&j==1){return _513;}return obj;},_updateProperties:function(_514){var _515=dojo.mixin(this._items,_514);this._items=_515;this._dirty=true;},toJson:function(){return this._items;}});}if(!dojo._hasResource["com.ibm.mashups.iwidget.widget.ModifiableProperties"]){dojo._hasResource["com.ibm.mashups.iwidget.widget.ModifiableProperties"]=true;dojo.provide("com.ibm.mashups.iwidget.widget.ModifiableProperties");}if(!dojo._hasResource["com.ibm.mashups.iwidget.widget.ModifiablePropertiesProvider"]){dojo._hasResource["com.ibm.mashups.iwidget.widget.ModifiablePropertiesProvider"]=true;dojo.provide("com.ibm.mashups.iwidget.widget.ModifiablePropertiesProvider");dojo.declare("com.ibm.mashups.iwidget.widget.ModifiablePropertiesProvider",null,{constructor:function(){},getIDescriptorItems:function(){},getAttributes:function(){}});}if(!dojo._hasResource["com.ibm.mashups.iwidget.widget.ModifiableWireProvider"]){dojo._hasResource["com.ibm.mashups.iwidget.widget.ModifiableWireProvider"]=true;dojo.provide("com.ibm.mashups.iwidget.widget.ModifiableWireProvider");dojo.declare("com.ibm.mashups.iwidget.widget.ModifiableWireProvider",com.ibm.mashups.iwidget.widget.WireProvider,{constructor:function(id){},addWire:function(_516,_517,_518){},removeWire:function(_519,_51a,_51b){}});}if(!dojo._hasResource["com.ibm.mashups.iwidget.widget.IWidgetInstance_API"]){dojo._hasResource["com.ibm.mashups.iwidget.widget.IWidgetInstance_API"]=true;dojo.provide("com.ibm.mashups.iwidget.widget.IWidgetInstance_API");dojo.provide("com.ibm.mashups.iwidget.widget.IWidgetInstance");dojo.declare("com.ibm.mashups.iwidget.widget.IWidgetInstance",[com.ibm.mashups.iwidget.widget.ModifiablePropertiesProvider,com.ibm.mashups.iwidget.widget.ModifiableWireProvider],{constructor:function(){}});}if(!dojo._hasResource["com.ibm.mm.iwidget.Utils"]){dojo._hasResource["com.ibm.mm.iwidget.Utils"]=true;dojo.provide("com.ibm.mm.iwidget.Utils");dojo.declare("com.ibm.mm.iwidget.UtilsDefaultImpl",null,{constructor:function(){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger("com.ibm.mm.iwidget.Utils");this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.bIsLoggable=this.LOGGER.isLoggable(this.LOG_LEVEL);},widgetClassRE:new RegExp("(mm:|mm_|iw-)iWidget"),findElementByAttribute:function(att,_51c,root,_51d,_51e){var _51f=root;if(!root.childNodes){return false;}if(att=="class"){dojo.query("."+_51c,root).forEach(function(ele){_51d.push(ele);});return _51d.length!==0;}else{if(att=="query"){dojo.query(_51c,root).forEach(function(ele){_51d.push(ele);});return _51d.length!==0;}}if(root.getElementsByTagName){var _520=root.getElementsByTagName("*");for(var i=0,l=_520.length;i=0)){dojo["require"]("com.ibm.mm.iwidget.UtilsExtended");}else{com.ibm.mm.iwidget.Utils=new com.ibm.mm.iwidget.UtilsDefaultImpl();}}if(!dojo._hasResource["com.ibm.mm.iwidget.widget.IWidgetInstanceDefaultImpl"]){dojo._hasResource["com.ibm.mm.iwidget.widget.IWidgetInstanceDefaultImpl"]=true;dojo.provide("com.ibm.mm.iwidget.widget.IWidgetInstanceDefaultImpl");dojo.declare("com.ibm.mm.iwidget.widget.IWidgetInstanceDefaultImpl",com.ibm.mashups.iwidget.widget.IWidgetInstance,{constructor:function(_52d,_52e,id){this.wrapper=_52d;this.rootElement=_52e;this.id=id;this.ns=_52e.className.substr(0,3);var _52f=[];var _530=this.ns+"Definition";com.ibm.mm.iwidget.Utils.findElementByAttribute("query","> ."+_530,this.rootElement,_52f,false);if(_52f&&_52f.length>0){var node=_52f[0];var url=node.getAttribute("href");if(typeof (url)!="undefined"&&url!==null){this.widgetXMLUrl=url;}}this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.bIsLoggable=this.LOGGER.isLoggable(this.LOG_LEVEL);},_destroy:function(){if(this.rootElement){this.rootElement=null;}},getDefaultViewContent:function(){if(this.defaultViewContent){return this.defaultViewContent;}var _531=this.ns+"Content";var node=null;var _532=dojo.query("> ."+_531+"."+iwConstants.mode_view,this.rootElement);if(_532){node=_532[0];}if(!node){_532=dojo.query("> ."+_531,this.rootElement);if(_532){node=_532[0];}}if(node){this.defaultViewContent=node.innerHTML;return this.defaultViewContent;}else{return null;}},getWidgetEvents:function(){if(this.widgetEvents){return this.widgetEvents;}var _533={};var _534=this.rootElement.attributes;for(var i=0;i<_534.length;i++){var _535=_534[i];if(_535.name!==null&&_535.name.indexOf("on")===0){var _536=this.rootElement.getAttribute(_535.name);if(typeof _536!="undefined"&&_536!==null){_533[_535.name]=_536;if(this.bIsLoggable){this.LOGGER.trace("iWidgetInstance.getWidgetEvents","eventName:"+_535.name+" handler:"+_533[_535.name]);}}}}this.widgetEvents=_533;return this.widgetEvents;},_addWire:function(wire){},_removeWire:function(id){},addWire:function(_537,_538,_539){},removeWire:function(_53a,_53b,_53c){},_getPublicEvents:function(){return null;},getWires:function(){return [];},getWireModel:function(){return null;},getAttributes:function(){if(!this.attributeProperties){var _53d=this.getItemSets()[iwConstants.ATTRIBUTES];var _53e={};if(_53d){for(var _53f in _53d){if(Object.prototype.hasOwnProperty.call(_53d,_53f)){_53e[_53f]=_53d[_53f];}}}this.attributeProperties=new com.ibm.mm.iwidget.widget.ModifiablePropertiesImpl(_53e);}return this.attributeProperties;},getIDescriptorItems:function(){if(!this.idescriptorProperties){var _540=this.getItemSets()[iwConstants.IDESCRIPTOR];var _541={};if(_540){for(var _542 in _540){if(Object.prototype.hasOwnProperty.call(_540,_542)){_541[_542]=_540[_542];}}}this.idescriptorProperties=new com.ibm.mm.iwidget.widget.ModifiablePropertiesImpl(_541);}return this.idescriptorProperties;},_getItemSets:function(){if(this.itemSets){return this.itemSets;}this.loadItemSets();return this.itemSets;},getItemSets:function(){return this._getItemSets();},getItemSet:function(_543){if(!_543){return null;}var _544=this._getItemSets();if(_544&&_544[_543]){return _544[_543];}},loadItemSets:function(){this.itemSets=this._loadItemSetsOptimized(this.rootElement,this.ns);},_loadItemSetsOptimized:function(_545,ns){var _546={};if(_545.childNodes.length){dojo.query("> ."+ns+com.ibm.mm.iwidget.Constants.CSSCLASS_INSTANCE.iwItemSet+" > ."+ns+com.ibm.mm.iwidget.Constants.CSSCLASS_INSTANCE.iwItem,_545).forEach(function(item){var _547=dojo.attr(item.parentNode,"title");if(_547){if(!_546[_547]){_546[_547]={};}var _548=this._loadItemOptimized(item,ns);_546[_547][_548.id]=_548;}},this);}return _546;},_loadItemOptimized:function(elem,ns){var css=com.ibm.mm.iwidget.Constants.CSSCLASS_INSTANCE;var item={id:com.ibm.mm.iwidget.Utils.stripHashPrefix(dojo.attr(elem,"href")),readOnly:dojo.hasClass(elem,ns+css.iwReadOnly)};var lang=dojo.attr(elem,"lang");if(lang){item.defaultLocale=lang;}var _549;var _54a=dojo.query("> ."+ns+css.iwValue,elem);if(_54a.length){item.values={};_54a.forEach(function(_54b){var _54c=dojo.attr(_54b,"lang")||lang;item.values[_54c]=com.ibm.mm.enabler.utils.Dom.textContent(_54b);});}else{_549=com.ibm.mm.enabler.utils.Dom.textContent(elem);if(dojo.isString(_549)){item.value=dojo.string.trim(_549);}}return item;},_invalidateItemSets:function(name){if(!name){this.itemSets={};}else{this.itemSets[name]={};}},_getInstanceMarkup:function(){var node=dojo.clone(this.rootElement);dojo.query("> ."+this.ns+"Content",node).forEach(function(_54d){com.ibm.mm.enabler.utils.Dom.destroyNode(_54d);});dojo.query("> ."+this.ns+"loading",node).forEach(function(_54e){com.ibm.mm.enabler.utils.Dom.destroyNode(_54e);});var _54f=document.createElement("div");_54f.appendChild(node);var html=_54f.innerHTML;return html;}});com.ibm.mm.iwidget.widget.IWidgetInstanceImpl=com.ibm.mm.iwidget.widget.IWidgetInstanceDefaultImpl;if((ibmConfig.enablerLayerModules)&&(dojo.indexOf(ibmConfig.enablerLayerModules,"iWidget")>=0)){dojo["require"]("com.ibm.mm.iwidget.widget.IWidgetInstanceExtendedImpl");}}if(!dojo._hasResource["com.ibm.mashups.iwidget.widget.IWidgetInstance"]){dojo._hasResource["com.ibm.mashups.iwidget.widget.IWidgetInstance"]=true;dojo.provide("com.ibm.mashups.iwidget.widget.IWidgetInstance");}if(!dojo._hasResource["com.ibm.mashups.iwidget.widget.IWidgetWrapper_API"]){dojo._hasResource["com.ibm.mashups.iwidget.widget.IWidgetWrapper_API"]=true;dojo.provide("com.ibm.mashups.iwidget.widget.IWidgetWrapper_API");dojo.provide("com.ibm.mashups.iwidget.widget.IWidgetWrapper");dojo.declare("com.ibm.mashups.iwidget.widget.IWidgetWrapper",[com.ibm.mashups.iwidget.widget.WireProvider,com.ibm.mashups.iwidget.widget.EventProvider],{constructor:function(){},getIWidgetDefinition:function(){},setIWidgetDefinition:function(_550){},getIWidgetInstance:function(){},getMarkup:function(){},isLoaded:function(){},isStandalone:function(){},doRender:function(){}});}if(!dojo._hasResource["com.ibm.mm.enabler.aggregation.javascript.Filter"]){dojo._hasResource["com.ibm.mm.enabler.aggregation.javascript.Filter"]=true;dojo.provide("com.ibm.mm.enabler.aggregation.javascript.Filter");function com_ibm_enabler_aggregation_javascript_globalEvalNonIE(_551){eval.call(self,_551);};dojo.declare("com.ibm.mm.enabler.aggregation.javascript.Filter",null,{constructor:function(){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.bIsLoggable=this.LOGGER.isLoggable(this.LOG_LEVEL);},doFilter:function(_552){},evalGlobal:function(_553){if(window.execScript){window.execScript(this._stripHTMLComments(_553),"JavaScript");}else{com_ibm_enabler_aggregation_javascript_globalEvalNonIE(_553);}},_stripHTMLComments:function(str){if(this.bIsLoggable){this.LOGGER.entering("com.ibm.mm.enabler.aggregation.javascript.Filter._stripHTMLComments",[str]);}var _554=str;_554=_554.replace(/)]+-->/g,"");if(this.bIsLoggable){this.LOGGER.exiting("com.ibm.mm.enabler.aggregation.javascript.Filter._stripHTMLComments",[_554]);}return _554;},prepareDocumentWrite:function(_555){if(this.bIsLoggable){this.LOGGER.entering("com.ibm.mm.enabler.aggregation.javascript.Filter.prepareDocumentWrite");}var me=this;document.write=function(){me._documentWrite(_555,document.write.arguments);};document.writeln=function(str){me._documentWrite(_555,document.writeln.arguments);};if(this.bIsLoggable){this.LOGGER.exiting("com.ibm.mm.enabler.aggregation.javascript.Filter.prepareDocumentWrite");}},_documentWrite:function(_556,args){for(var i=0,l=args.length;i0){var i=0;if(dojo.isIE){cont="
"+cont;i++;}var div=dojo.create("div",{innerHTML:cont});var _559=dojo.isIE||dojo.isWebKit||dojo.isOpera;var _55a=div.childNodes||null;if(_55a!==null&&_55a.length>0){var pred=_557;var l;var _55b=[];while(i<(l=_55a.length)){var node=_55a[l-1];dojo.place(node,pred,"before");if(_559&&node.tagName&&node.tagName.toLowerCase()=="script"){_55b.unshift(node);}pred=node;}if(_559){dojo.forEach(_55b,function(scr){com.ibm.mm.enabler.aggregation.javascript.JAVASCRIPT_HANDLER.handle(scr);});}}dojo.destroy(div);}if(this.bIsLoggable){this.LOGGER.exiting("com.ibm.mm.enabler.aggregation.javascript.Filter.applyDocumentWrite");}}});}if(!dojo._hasResource["com.ibm.mm.enabler.aggregation.javascript.ExternalScriptFilter"]){dojo._hasResource["com.ibm.mm.enabler.aggregation.javascript.ExternalScriptFilter"]=true;dojo.provide("com.ibm.mm.enabler.aggregation.javascript.ExternalScriptFilter");dojo.declare("com.ibm.mm.enabler.aggregation.javascript.ExternalScriptFilter",com.ibm.mm.enabler.aggregation.javascript.Filter,{doFilter:function(_55c){var url=this._getScriptUrl(_55c);var _55d=false;if(url){var _55e=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME).getValue(com.ibm.mashups.enabler.services.ConfigConstants.PROXY_URL);_55e=_55e||null;if(_55e!==null){_55e+="/";url=this._rewriteURL(url,_55e);}var _55f={content:""};this.prepareDocumentWrite(_55f);this._loadExternalScript(url);this.applyDocumentWrite(_55c,_55f);_55d=true;}return _55d;},_getScriptUrl:function(_560){var url=null;if(_560.getAttribute){url=_560.getAttribute("src");}else{var _561=_560.toLowerCase().indexOf("");var _562=_560.substring(_561,end);var _563=_562.toLowerCase().indexOf("src");if(_563!=-1){var _564=_562.indexOf("'",_563);var _565=_562.indexOf("\"",_563);var _566="\"";var _567=_565;if(_565==-1||(_564!=-1&&_564<_565)){_566="'";_567=_564;}var _568=_562.indexOf(_566,_567+1);url=_562.substring(_567+1,_568);}}return url;},loadExternalScript:function(url){var _569=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME).getValue(com.ibm.mashups.enabler.services.ConfigConstants.PROXY_URL);_569=_569||null;if(_569!==null){_569+="/";url=this._rewriteURL(url,_569);}this._loadExternalScript(url);},_loadExternalScript:function(url){var me=this;dojo.xhrGet({url:url,load:function(data,_56a){if(this.bIsLoggable){this.LOGGER.trace("com.ibm.mm.enabler.aggregation.javascript.Filter._loadExternalScript","Retrieved JS file: ${0}",[data]);}me.evalGlobal(data);},sync:true,handleAs:"text"});},_rewriteURL:function(_56b,_56c){var _56d=_56c;var host=window.location.host;var _56e=window.location.protocol;if(_56b.indexOf("://")<0||_56b.indexOf(_56e)===0&&_56b.indexOf(host)==_56e.length+2){return _56b;}if(_56b.indexOf("https")===0){_56d+="https/";}else{_56d+="http/";}_56d+=_56b.substr(_56b.indexOf("://")+3);return _56d;}});}if(!dojo._hasResource["com.ibm.mm.enabler.aggregation.javascript.FilterChain"]){dojo._hasResource["com.ibm.mm.enabler.aggregation.javascript.FilterChain"]=true;dojo.provide("com.ibm.mm.enabler.aggregation.javascript.FilterChain");dojo.declare("com.ibm.mm.enabler.aggregation.javascript.FilterChain",null,{constructor:function(){this._filters=[];},addFilter:function(_56f){if(!this._filters){this._filters=[];}this._filters.push(_56f);},applyFilters:function(_570){var _571=false;for(var i=0,l=this._filters.length;i");var _577=_575.lastIndexOf("<");_574=_575.substring(_576+1,_577);}if(this.bIsLoggable){this.LOGGER.trace("com.ibm.mm.enabler.aggregation.javascript.InlineScriptFilter.doFilter","Stripped HTML tags out: "+_574);}if(_574){var _578={content:""};this.prepareDocumentWrite(_578);this.evalGlobal(_574);_573=true;this.applyDocumentWrite(_572,_578);}return _573;}});}if(!dojo._hasResource["com.ibm.mm.enabler.aggregation.javascript.WidgetJavascriptHandler"]){dojo._hasResource["com.ibm.mm.enabler.aggregation.javascript.WidgetJavascriptHandler"]=true;dojo.provide("com.ibm.mm.enabler.aggregation.javascript.WidgetJavascriptHandler");dojo.declare("com.ibm.mm.enabler.aggregation.javascript.WidgetJavascriptHandler",null,{constructor:function(){this.filterChain=new com.ibm.mm.enabler.aggregation.javascript.FilterChain();this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.bIsLoggable=this.LOGGER.isLoggable(this.LOG_LEVEL);},handle:function(_579){if(this.bIsLoggable){this.LOGGER.entering("WidgetJavascriptHandler.handle",[_579]);}var val=this.filterChain.applyFilters(_579);if(this.bIsLoggable){this.LOGGER.exiting("WidgetJavascriptHandler.handle");}}});}if(!dojo._hasResource["com.ibm.mm.enabler.aggregation.javascript"]){dojo._hasResource["com.ibm.mm.enabler.aggregation.javascript"]=true;dojo.provide("com.ibm.mm.enabler.aggregation.javascript");com.ibm.mm.enabler.aggregation.javascript.JAVASCRIPT_HANDLER=new com.ibm.mm.enabler.aggregation.javascript.WidgetJavascriptHandler();com.ibm.mm.enabler.aggregation.javascript.JAVASCRIPT_HANDLER.filterChain.addFilter(new com.ibm.mm.enabler.aggregation.javascript.ExternalScriptFilter());com.ibm.mm.enabler.aggregation.javascript.JAVASCRIPT_HANDLER.filterChain.addFilter(new com.ibm.mm.enabler.aggregation.javascript.InlineScriptFilter());}if(!dojo._hasResource["com.ibm.mashups.iwidget.Constants"]){dojo._hasResource["com.ibm.mashups.iwidget.Constants"]=true;dojo.provide("com.ibm.mashups.iwidget.Constants");dojo.declare("com.ibm.mashups.iwidget.Constants",null,{WIDGET_LOADED:"com.ibm.mashups.iwidget.widgetloaded",RESIZE_WIDGET:"com.ibm.mashups.iwidget.resizewidget",UNLOAD_WIDGETS:"com.ibm.mashups.iwidget.unloadwidgets",WIDGETS_UNLOADED:"com.ibm.mashups.iwidget.widgetsunloaded",WIDGET_MODECHANGED:"com.ibm.mashups.iwidget.widgetmodechanged",CHANGE_WIDGETMODE:"com.ibm.mashups.iwidget.changewidgetmode",WIDGET_WINDOWSTATECHANGED:"com.ibm.mashups.iwidget.widgetwindowstatechanged",CHANGE_WIDGETWINDOWSTATE:"com.ibm.mashups.iwidget.changewidgetwindowstate",NAVSTATE_UPDATED:"com.ibm.mashups.enabler.model.state.onNavStateUpdated"});com.ibm.mashups.iwidget.Constants=new com.ibm.mashups.iwidget.Constants();}if(!dojo._hasResource["com.ibm.mashups.iwidget.iEvents_API"]){dojo._hasResource["com.ibm.mashups.iwidget.iEvents_API"]=true;dojo.provide("com.ibm.mashups.iwidget.iEvents_API");dojo.provide("com.ibm.mashups.iwidget.iEvents");dojo.declare("com.ibm.mashups.iwidget.iEvents",null,{constructor:function(){},fireEvent:function(_57a,_57b,_57c){},setEvent:function(_57d){},setEvents:function(_57e){},removeEvent:function(_57f){},removeEvents:function(_580){},getEvents:function(_581){},createEventDescription:function(_582){}});}if(!dojo._hasResource["com.ibm.mashups.iwidget.IEvent_API"]){dojo._hasResource["com.ibm.mashups.iwidget.IEvent_API"]=true;dojo.provide("com.ibm.mashups.iwidget.IEvent_API");dojo.provide("com.ibm.mashups.iwidget.IEvent");dojo.declare("com.ibm.mashups.iwidget.IEvent",null,{constructor:function(){},name:"",type:"",payload:null,source:""});}if(!dojo._hasResource["com.ibm.mashups.iwidget.IEvent"]){dojo._hasResource["com.ibm.mashups.iwidget.IEvent"]=true;dojo.provide("com.ibm.mashups.iwidget.IEvent");}if(!dojo._hasResource["com.ibm.mm.iwidget.IEventImpl"]){dojo._hasResource["com.ibm.mm.iwidget.IEventImpl"]=true;dojo.provide("com.ibm.mm.iwidget.IEventImpl");dojo.declare("com.ibm.mm.iwidget.IEventImpl",com.ibm.mashups.iwidget.IEvent,{constructor:function(name,type,_583,_584){this.name=name;if(typeof type!="undefined"){this.type=type;}else{this.type=null;}if(typeof _583!="undefined"){this.payload=_583;}else{this.payload=null;}if(typeof _584!="undefined"){this.source=_584;}else{this.source=null;}this.source=_584;}});}if(!dojo._hasResource["com.ibm.mm.iwidget.icontext.IContextIEventsImpl"]){dojo._hasResource["com.ibm.mm.iwidget.icontext.IContextIEventsImpl"]=true;dojo.provide("com.ibm.mm.iwidget.icontext.IContextIEventsImpl");dojo.declare("com.ibm.mm.iwidget.icontext.IContextIEventsImpl",com.ibm.mashups.iwidget.iEvents,{constructor:function(_585){this.widget=_585;this.id=_585.id;this.svc=com.ibm.mashups.services.ServiceManager.getService("eventService");this.timer=null;this.timerEventQ=[];this.allTargetWidgetsLoaded=false;this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.bIsLoggable=this.LOGGER.isLoggable(this.LOG_LEVEL);},createEventDescription:function(_586){return new com.ibm.mm.iwidget.IEventDescriptionImpl(_586);},getEvents:function(_587){var _588=this.widget._getPublicEvents();var _589=_588.getEvents(_587);if(!_589){return null;}var arr=[];for(var i in _589){if(Object.prototype.hasOwnProperty.call(_589,i)){arr.push(_589[i].clone());}}return arr;},setEvent:function(_58a){var _58b=this.widget._getPublicEvents();var rc=_58b.eventExists(_58a.name);var _58c=false;if(rc){_58c=_58b.isUpdateEventRequired(_58a);}else{_58c=true;}if(_58c){var cs=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.iwidget.services.ContainerService.SERVICE_NAME);if(cs){cs.switchToModifiablePersistenceMode(com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_EVENTS);}}_58b=this.widget._getPublicEvents();rc=_58b.eventExists(_58a.name);if(rc){if(this.widget._inIframe()){this.svc._publishEvent(this.svc.WIDGETEVENT_PREFIX+"_stub_"+this.id,{"scope":"eventmodel","methodname":"updateEvent","params":[_58a.toJson()]},this.id);}rc=_58b.updateEvent(_58a);}else{if(this.widget._inIframe()){this.svc._publishEvent(this.svc.WIDGETEVENT_PREFIX+"_stub_"+this.id,{"scope":"eventmodel","methodname":"createEvent","params":[_58a.toJson()]},this.id);}rc=_58b.createEvent(_58a);}return rc;},removeEvent:function(_58d){var cs=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.iwidget.services.ContainerService.SERVICE_NAME);if(cs){cs.switchToModifiablePersistenceMode(com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_EVENTS);}if(this.widget._inIframe()){this.svc._publishEvent(this.svc.WIDGETEVENT_PREFIX+"_stub_"+this.id,{"scope":"eventmodel","methodname":"removeEvent","params":[_58d]},this.id);}var _58e=this.widget._getPublicEvents();var rc=_58e.removeEvent(_58d);return rc;},publishEvent:function(_58f,_590,_591){return this.fireEvent(_58f,_591,_590);},fireEvent:function(_592,_593,_594){var _595="fireEvent(eventName, payloadType, payload)";if(this.bIsLoggable){this.LOGGER.entering(_595,[_592,_593,_594]);}if(this.allTargetWidgetsLoaded){this._fireEventFinish(_592,_593,_594);}else{this.timerEventQ.push({"eventName":_592,"payloadType":_593,"payload":_594});if(!this.timer){var _596=com.ibm.mashups.iwidget.model.Factory.getGlobalWidgetModel();var _597=dojo.query("."+this.widget.ns+"ReceivedEvent");var _598=[];for(var i=0;i<_597.length;i++){var _599=dojo.query("."+this.widget.ns+"SourceEvent",_597[i])[0];if(_599){var href=_599.getAttribute("href");if(href.indexOf(this.widget.id)!=-1){var _59a=_596.find(_597[i].parentNode.id);if(_59a){_598.push(_59a);}}}}this.timer_tries=0;this.timer=setInterval(dojo.hitch(this,"_fireEventContinue",_598),5);}}if(this.bIsLoggable){this.LOGGER.exiting(_595);}},_fireEventContinue:function(_59b){var _59c="_fireEventContinue(target_widgets)";if(this.bIsLoggable){this.LOGGER.entering(_59c,[_59b]);}for(var i=0;i<_59b.length;i++){if(!_59b[i].isLoaded()&&(this.timer_tries<20)){this.timer_tries++;if(this.bIsLoggable){this.LOGGER.trace(_59c,"Not all target widgets are loaded, retry "+this.timer_tries);}if(this.bIsLoggable){this.LOGGER.exiting(_59c);}return;}}clearInterval(this.timer);this.timer_tries=0;while(this.timerEventQ.length>0){var _59d=this.timerEventQ.shift();this._fireEventFinish(_59d.eventName,_59d.payloadType,_59d.payload);}this.allTargetWidgetsLoaded=true;this.timer=null;if(this.bIsLoggable){this.LOGGER.exiting(_59c);}},_fireEventFinish:function(_59e,_59f,_5a0){var _5a1="_fireEventFinish(eventName, payloadType, payload)";if(this.bIsLoggable){this.LOGGER.entering(_5a1,[_59e,_59f,_5a0]);}var _5a2=this.widget._getPublicEvents();var _5a3=false;var temp;if(_5a2){temp=_5a2.find(_59e);if(temp){_59f=temp.type;}if(temp&&temp.handlingFn){_5a3=true;}}var _5a4=new com.ibm.mm.iwidget.IEventImpl(_59e,_59f,_5a0,null);if(!_5a3){this.widget.handleEvent(_5a4);}if(_5a2){temp=_5a2.find(_59e);if(temp&&temp.isPublished){this.svc.publishWire(this.id,_59e,_5a0,_59f);}}if(this.bIsLoggable){this.LOGGER.exiting(_5a1);}},setEvents:function(_5a5){var _5a6=this.widget._getPublicEvents();if(this.widget._inIframe()){var arr=[];for(var i=0;i<_5a5.length;i++){arr.push(_5a5[i].toJson());}this.svc._publishEvent(this.svc.WIDGETEVENT_PREFIX+"_stub_"+this.id,{"scope":"eventmodel","methodname":"setEvents","params":[arr]},this.id);}rc=_5a6.setEvents(_5a5);return rc;},removeEvents:function(_5a7){if(this.widget._inIframe()){this.svc._publishEvent(this.svc.WIDGETEVENT_PREFIX+"_stub_"+this.id,{"scope":"eventmodel","methodname":"removeEvents","params":[_5a7]},this.id);}var _5a8=this.widget._getPublicEvents();var rc=_5a8.removeEvents(_5a7);return rc;}});}if(!dojo._hasResource["com.ibm.mashups.iwidget.iEvents"]){dojo._hasResource["com.ibm.mashups.iwidget.iEvents"]=true;dojo.provide("com.ibm.mashups.iwidget.iEvents");}if(!dojo._hasResource["com.ibm.mashups.iwidget.io_API"]){dojo._hasResource["com.ibm.mashups.iwidget.io_API"]=true;dojo.provide("com.ibm.mashups.iwidget.io_API");dojo.provide("com.ibm.mashups.iwidget.io");dojo.declare("com.ibm.mashups.iwidget.io",null,{constructor:function(){},XMLHttpRequest:function(){},rewriteURI:function(uri,_5a9){return null;},xhrReq:function(args){return;}});}if(!dojo._hasResource["com.ibm.mm.iwidget.icontext.IContextIOImpl"]){dojo._hasResource["com.ibm.mm.iwidget.icontext.IContextIOImpl"]=true;dojo.provide("com.ibm.mm.iwidget.icontext.IContextIOImpl");dojo.declare("com.ibm.mm.iwidget.icontext.IContextIOImpl",com.ibm.mashups.iwidget.io,{constructor:function(_5aa){this.id=_5aa.id;this.widget=_5aa;this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.bIsLoggable=this.LOGGER.isLoggable(this.LOG_LEVEL);},XMLHttpRequest:function(){return dojo._xhrObj();},rewriteURI:function(uri,_5ab){if(this.bIsLoggable){this.LOGGER.entering("com.ibm.mm.iwidget.io.rewriteURI",[uri,_5ab]);}var _5ac=this.widget._rewriteURI(uri,_5ab);if(this.bIsLoggable){this.LOGGER.exiting("com.ibm.mm.iwidget.io.rewriteURI",[_5ac]);}return _5ac;},getWebAppRootPath:function(){if(this.rootPath){return this.rootPath;}var _5ad=this.widget.getIWidgetInstance().widgetXMLUrl;_5ad=this.widget._getRawBaseUri(_5ad);_5ad=this.widget._getResolvedPocUri(_5ad);var _5ae=null;if(_5ad&&_5ad.indexOf("/")===0){var temp=_5ad.substring(1);if(temp.indexOf("/")>0){_5ae="/"+temp.substring(0,temp.indexOf("/"));}else{_5ae=_5ad;}}if(_5ae){this.rootPath=_5ae;return _5ae;}if(_5ad&&_5ad.indexOf("://")>0){var _5af=_5ad.split("/");if(_5af.length>=4){_5ae=_5af[0]+"//"+_5af[2]+"/"+_5af[3];}}if(_5ae){this.rootPath=_5ae;return _5ae;}return null;},request:function(_5b0,uri,_5b1,_5b2,_5b3){var xhr=dojo._xhrObj();var _5b4=this.rewriteURI(uri);var _5b5=false;if(_5b1){xhr.onreadystatechange=_5b1;_5b5=true;}var _5b6=_5b0||null;if(!_5b0){_5b6=this.httpmethods.GET;}if(_5b0){if(!this.httpmethods[_5b0]){_5b6=this.httpmethods.GET;}}xhr.open(_5b6,_5b4,_5b5);var _5b7=null;var _5b8="application/x-www-form-urlencoded";if(_5b3){for(var i=0;i<_5b3.length;i++){var _5b9=_5b3[i];var _5ba=_5b9[_5ba];var _5bb=_5b9[_5bb];if(_5ba=="Content-Type"){_5b7=_5bb;}else{xhr.setRequestHeader(_5ba,_5bb);}}}xhr.setRequestHeader("Content-Type",(_5b7||_5b8));if(_5b6==this.httpmethods.PUT||_5b6==this.httpmethods.POST){if(_5b2){xhr.send(_5b2);}}else{xhr.send(null);}return xhr;},xhrReq:function(args){if(!args){return;}var _5bc=com.ibm.mashups.enabler.io.XHRMultipartFactory;if(!args.requestVerb||!args.url||!args.handleAs){return;}var _5bd=args.requestVerb;if(_5bd&&!this.requestVerbs[_5bd]){_5bd=this.requestVerbs.get;}if(_5bd&&_5bd==this.requestVerbs.get){var obj=args;delete obj.requestVerb;obj.ibmMultipart={context:_5bc.CONTEXT_ENABLER};dojo.xhrGet(obj);return;}if(_5bd&&_5bd==this.requestVerbs.put){var obj1=args;delete obj1.requestVerb;if(obj1.msgData){obj1.putData=obj1.msgData;delete obj1.msgData;}obj1.ibmMultipart={context:_5bc.CONTEXT_ENABLER};dojo.xhrPut(obj1);return;}if(_5bd&&_5bd==this.requestVerbs["delete"]){var obj2=args;delete obj2.requestVerb;obj2.ibmMultipart={context:_5bc.CONTEXT_ENABLER};dojo.xhrDelete(obj2);return;}if(_5bd&&_5bd==this.requestVerbs.post){var obj3=args;delete obj3.requestVerb;if(obj3.msgData){obj3.postData=obj3.msgData;delete obj3.msgData;}obj3.ibmMultipart={context:_5bc.CONTEXT_ENABLER};dojo.xhrPost(obj3);return;}},httpmethods:{GET:"GET",PUT:"PUT",POST:"POST",DELETE:"DELETE"},requestVerbs:{get:"get",put:"put",post:"post","delete":"delete"}});}if(!dojo._hasResource["com.ibm.mashups.iwidget.io"]){dojo._hasResource["com.ibm.mashups.iwidget.io"]=true;dojo.provide("com.ibm.mashups.iwidget.io");}if(!dojo._hasResource["com.ibm.mashups.iwidget.iContext_API"]){dojo._hasResource["com.ibm.mashups.iwidget.iContext_API"]=true;dojo.provide("com.ibm.mashups.iwidget.iContext_API");dojo.provide("com.ibm.mashups.iwidget.iContext");dojo.declare("com.ibm.mashups.iwidget.iContext",null,{constructor:function(){},constants:{mode:{VIEW:"view",EDIT:"edit",PERSONALIZE:"personalize",CONFIG:"config",HELP:"help"},event:{TITLE:"title",DESCRIPTION:"description"},ATTRIBUTES:"attributes",IDESCRIPTOR:"idescriptor",USERPROFILE:"userprofile",keys:{SHIFT:1,ALT:2,CTRL:4,META:8,CAPSLOCK:16},windowstate:{NORMAL:"normal",MINIMIZE:"minimize",MAXIMIZE:"maximize"},status:{SUCCESS:200,TIMEOUT:408,NOTFOUND:404,INTERROR:500,OTHER:303},changeType:{CHANGEDVALUE:"changedValue",NEWITEM:"newItem",REMOVEDITEM:"removedItem"}},getWidgetId:function(){return null;},getRootElement:function(){return null;},getElementById:function(id,root){return null;},getiWidgetAttributes:function(){return {};},getItemSet:function(name,_5be){return null;},getShareableItemSet:function(name){return null;},requires:function(_5bf,_5c0,uri,cb,_5c1){},iScope:function(){return null;},processMarkup:function(_5c2){return null;},processiWidgets:function(root){},getElementByClass:function(_5c3,root){return null;},getUserProfile:function(){return null;},getiDescriptor:function(){return null;},io:{},iEvents:{}});}if(!dojo._hasResource["com.ibm.mm.iwidget.icontext.IContextDefaultImpl"]){dojo._hasResource["com.ibm.mm.iwidget.icontext.IContextDefaultImpl"]=true;dojo.provide("com.ibm.mm.iwidget.icontext.IContextDefaultImpl");dojo.declare("com.ibm.mm.iwidget.icontext.IContextDefaultImpl",com.ibm.mashups.iwidget.iContext,{constructor:function(_5c4){this.widgetwrapper=_5c4;this.widgetId=_5c4.id;this.scope={};this.rootElement=dojo.byId(this.widgetId);this.ns=this.rootElement.className.substr(0,3);this._initEvents();this._initIO();this._initMMExtension();},_destroy:function(){if(this.rootElement){this.rootElement=null;}},getWidgetId:function(){if(this.widgetId){return this.widgetId;}return null;},_initEvents:function(){this.iEvents=null;},_initMMExtension:function(){this._mm=null;},getRootElement:function(){return dojo.byId(this.widgetId);},getElementById:function(id,root){if(!root){root=this._getContentRoot();}var _5c5=[];var rc=com.ibm.mm.iwidget.Utils.findElementByAttribute("id",id,root,_5c5,false);if(rc){return _5c5[0];}else{return null;}},getiWidgetAttributes:function(){var _5c6=this.widgetwrapper.getAttributes();return _5c6;},getItemSet:function(name,_5c7){if(typeof name=="undefined"||name===null){return null;}if(name==iwConstants.ATTRIBUTES){return this.getiWidgetAttributes();}if(name==iwConstants.USERPROFILE){return this.getUserProfile();}if(name==iwConstants.IDESCRIPTOR){return this.getiDescriptor();}var _5c8=this.widgetwrapper.getWidgetItemSet(name);return _5c8;},iScope:function(){return this.scope;},processMarkup:function(_5c9){var _5ca=_5c9.replace(/_IWID_/g,"_"+this.widgetId+"_");var _5cb=_5ca.replace(/iContext(?=\.|\s|\(|\))/g,"_"+this.widgetId+"_iContext");return _5cb;},getElementByClass:function(_5cc,root){if(!root){root=this._getContentRoot();}var _5cd=dojo.query("."+_5cc,root);if(typeof _5cd!="undefined"&&_5cd!==null){if(_5cd.length===0){return null;}else{var _5ce=[];for(var i=0;i<_5cd.length;i++){_5ce.push(_5cd[i]);}return _5ce;}}return null;},getWidgetXMLPath:function(){var url=this.widgetwrapper.getIWidgetInstance().widgetXMLUrl;var _5cf=url.indexOf("?");if(0<_5cf){url=url.substring(0,_5cf);}var url2=com.ibm.mm.enabler.EndpointUtils.checkForEndpoints(url);if(url2){url=url2;}return url;},_getWidgetBaseUri:function(){var _5d0=this.widgetwrapper.getIWidgetInstance().widgetXMLUrl;var _5d1=_5d0.indexOf("?");if(0<_5d1){_5d0=_5d0.substring(0,_5d1);}return _5d0.substring(0,_5d0.lastIndexOf("/")+1);},_getContentRoot:function(){var _5d2=this.getRootElement();var _5d3=this.widgetwrapper.currentMode;if(!_5d3){_5d3="view";}var _5d4=this.widgetwrapper.windowManager[_5d3];if(_5d4){var temp=_5d4.root;if(temp){_5d2=temp;}}return _5d2;},getiDescriptor:function(){var _5d5=this.widgetwrapper.getIDescriptorItems();return _5d5;},_initIO:function(){this.io=new com.ibm.mm.iwidget.icontext.IContextIOImpl(this.widgetwrapper);},getUserProfile:function(){return null;},requires:function(_5d6,_5d7,uri,cb,_5d8){return;},processiWidgets:function(root){return;}});com.ibm.mm.iwidget.icontext.IContextImpl=com.ibm.mm.iwidget.icontext.IContextDefaultImpl;if((ibmConfig.enablerLayerModules)&&(dojo.indexOf(ibmConfig.enablerLayerModules,"iWidget")>=0)){dojo["require"]("com.ibm.mm.iwidget.icontext.IContextExtendedImpl");}}if(!dojo._hasResource["com.ibm.mashups.iwidget.iContext"]){dojo._hasResource["com.ibm.mashups.iwidget.iContext"]=true;dojo.provide("com.ibm.mashups.iwidget.iContext");}if(!dojo._hasResource["com.ibm.mashups.iwidget.itemset.ManagedItemSetCallbackModel"]){dojo._hasResource["com.ibm.mashups.iwidget.itemset.ManagedItemSetCallbackModel"]=true;dojo.provide("com.ibm.mashups.iwidget.itemset.ManagedItemSetCallbackModel");dojo.declare("com.ibm.mashups.iwidget.itemset.ManagedItemSetCallbackModel",null,{constructor:function(){},postSaveCallbackFn:function(_5d9,_5da){}});}if(!dojo._hasResource["com.ibm.mashups.iwidget.itemset.ManagedItemSet_API"]){dojo._hasResource["com.ibm.mashups.iwidget.itemset.ManagedItemSet_API"]=true;dojo.provide("com.ibm.mashups.iwidget.itemset.ManagedItemSet_API");dojo.provide("com.ibm.mashups.iwidget.itemset.ManagedItemSet");dojo.declare("com.ibm.mashups.iwidget.itemset.ManagedItemSet",null,{constructor:function(){},save:function(_5db){},commit:function(_5dc){},setItemValue:function(_5dd,_5de,_5df){return this;},setItemValue:function(_5e0,_5e1){return this;},getItemValue:function(_5e2){return null;},getAllNames:function(){return null;},removeItem:function(_5e3){return null;},clone:function(){return null;},isReadOnly:function(_5e4){return null;},getItemSetDescription:function(){return null;},addListener:function(_5e5){return null;},removeListener:function(_5e6){return true;}});}if(!dojo._hasResource["com.ibm.mashups.iwidget.services.EventService"]){dojo._hasResource["com.ibm.mashups.iwidget.services.EventService"]=true;dojo.provide("com.ibm.mashups.iwidget.services.EventService");dojo.declare("com.ibm.mashups.iwidget.services.EventService",null,{SERVICE_NAME:"eventService",constructor:function(){},fireEvent:function(_5e7,_5e8,_5e9,_5ea,_5eb){},broadcastEvent:function(_5ec,_5ed,_5ee,_5ef){},broadcastEvent:function(_5f0,_5f1,_5f2,_5f3,_5f4){},broadcastEvent:function(_5f5,_5f6,_5f7,_5f8,_5f9,_5fa){},broadcastEvents:function(_5fb,_5fc){},broadcastEvents:function(_5fd,_5fe,_5ff){},broadcastEvents:function(_600,_601,_602,_603){},publishEvent:function(_604,_605,_606,_607){},subscribeEvent:function(_608,_609,_60a,_60b,_60c){},unsubscribeEvent:function(_60d,_60e){}});com.ibm.mashups.iwidget.services.EventService.SERVICE_NAME="eventService";}if(!dojo._hasResource["com.ibm.mm.iwidget.manageditemset.IDescriptorDefaultImpl"]){dojo._hasResource["com.ibm.mm.iwidget.manageditemset.IDescriptorDefaultImpl"]=true;dojo.provide("com.ibm.mm.iwidget.manageditemset.IDescriptorDefaultImpl");dojo.declare("com.ibm.mm.iwidget.manageditemset.IDescriptorDefaultImpl",com.ibm.mashups.iwidget.itemset.ManagedItemSet,{constructor:function(_60f,_610,_611){this.widget=_60f;this.defiDescriptorItems=_610;this.instanceiDescriptorItems=_611;this.navStateModel=com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel();this._updatedItems={};this._hasDynamicTitle=false;this._hasDynamicIcon=false;},readOnlyItems:{defaultHeight:"defaultHeight",defaultWidth:"defaultWidth",displayLocale:"displayLocale",messageLocale:"messageLocale",author:"author",email:"email",website:"website",version:"version",icon:"icon"},writableItems:{title:"title",name:"name",description:"description",availableMessageLocales:"availableMessageLocales",mode:"mode",windowState:"windowState"},localizedItems:{title:"title",name:"name",description:"description"},getItemValue:function(name){if(typeof name=="undefined"||name===null){return null;}var _612=null;if(name==iwConstants.iDescriptorItems.mode){var _613=this.widget;if(_613){_612=_613.currentMode;}}else{if(name==iwConstants.iDescriptorItems.displayLocale){var _614=ibmConfig.locale;var _615=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME);var temp=_615.getValue(com.ibm.mashups.enabler.services.ConfigConstants.DISPLAY_LOCALE);if(temp){_614=temp;}_612=_614;}else{if(name==iwConstants.iDescriptorItems.messageLocale){_612=this._getMessageLocale();}else{if(name==iwConstants.iDescriptorItems.windowState){_612=this._getWindowState();}else{_612=this._getItemValue(name);}}}}return _612;},_getWindowState:function(){return "normal";},_getItemValue:function(_616){var _617=null;var _618=null;var _619=null;if(this.localizedItems[_616]){_619=this._getMessageLocale();}if(_616==iwConstants.iDescriptorItems.title){_618=this._getDynamicTitle();}if(_618===null&&this.instanceiDescriptorItems){_618=this.instanceiDescriptorItems.getItemValue(_616,_619);}if(_618===null&&this.defiDescriptorItems){_617=this.defiDescriptorItems.getItemValue(_616,_619);if(typeof _617=="undefined"){_617=null;}}if(_618!==null){return _618;}return _617;},_getDynamicTitle:function(){return null;},_setDynamicTitleOrIcon:function(name,_61a){},setItemValue:function(name,_61b){if(typeof name=="undefined"||name===null){return null;}if(typeof _61b=="undefined"||_61b===null){return null;}if(this.readOnlyItems[name]){return null;}if(name==iwConstants.iDescriptorItems.mode){var _61c=this._getWidgetDef().getSupportedModes();if(this._contains(_61c,_61b)){this._updatedItems[name]=_61b;}else{return null;}}if(name==iwConstants.iDescriptorItems.windowState){var _61d=this._getWidgetDef().getSupportedWindowStates();if(this._contains(_61d,_61b)){this._updatedItems[name]=_61b;}else{return null;}}if(this.widget.id&&(name==iwConstants.iDescriptorItems.title||name==iwConstants.iDescriptorItems.icon)){this._setDynamicTitleOrIcon(name,_61b);}var _61e=null;if(this.localizedItems[name]){_61e=this._getMessageLocale();}if(name==this.writableItems.title||name==this.writableItems.name||name==this.writableItems.description){this.instanceiDescriptorItems.setItemValue(name,_61b,false,_61e);}if(name==iwConstants.iDescriptorItems.availableMessageLocales){this.instanceiDescriptorItems.setItemValue(name,_61b,false);}return this;},isReadOnly:function(name){if(typeof name=="undefined"||name===null){return false;}if(this.readOnlyItems[name]){return true;}else{return false;}},removeItem:function(name){return null;},getAllNames:function(){var arr={};if(this.defiDescriptorItems){var _61f=this.defiDescriptorItems.getAllNames();for(var i in _61f){if(Object.prototype.hasOwnProperty.call(_61f,i)){arr[_61f[i]]=true;}}}if(this.instanceiDescriptorItems){var _620=this.instanceiDescriptorItems.getAllNames();for(var j in _620){if(Object.prototype.hasOwnProperty.call(_620,j)){arr[_620[j]]=true;}}}this._hasDynamicTitle&&(arr[iwConstants.iDescriptorItems.title]=true);this._hasDynamicIcon&&(arr[iwConstants.iDescriptorItems.icon]=true);var _621=[];for(var name in arr){if(Object.prototype.hasOwnProperty.call(arr,name)){_621.push(name);}}return _621;},save:function(cb){return this.commit(cb);},commit:function(_622){if(this.serverless){this._saveMicroformat();}if(this._updatedItems[iwConstants.iDescriptorItems.mode]){var _623=this._updatedItems[iwConstants.iDescriptorItems.mode];this.widget._handleOnModeChange(_623);}if(this._updatedItems[iwConstants.iDescriptorItems.windowState]){var _624=this._updatedItems[iwConstants.iDescriptorItems.windowState];var _625=this._getWindowState();var _626=com.ibm.mashups.services.ServiceManager.getService("eventService");_626.publishEvent(com.ibm.mashups.iwidget.Constants.CHANGE_WIDGETWINDOWSTATE,{id:this.widget.id,newWindowState:_624,oldWindowState:_625});}if(_622){_622(iwConstants.IDESCRIPTOR,true);}},_saveMicroformat:function(){this.widget.commit();var _627={};_627.wid=this.widget.id;this.widget.eventSvr._publishEvent(iwConstants.EVENTS.onAttributeSaved,_627,this.widget.hubId);},addListener:function(fn){var _628=this.widget;var _629=_628._registerListener(iwConstants.IDESCRIPTOR,fn);return _629;},removeListener:function(_62a){var _62b=this.widget;return _62b._removeListener(iwConstants.IDESCRIPTOR,_62a);},_getWidgetDef:function(){return this.widget.widgetDef;},_contains:function(arr,_62c){var rc=false;for(var i=0;i=0)){dojo["require"]("com.ibm.mm.iwidget.manageditemset.IDescriptorExtendedImpl");}}if(!dojo._hasResource["com.ibm.mashups.iwidget.itemset.ManagedItemSet"]){dojo._hasResource["com.ibm.mashups.iwidget.itemset.ManagedItemSet"]=true;dojo.provide("com.ibm.mashups.iwidget.itemset.ManagedItemSet");}if(!dojo._hasResource["com.ibm.mm.iwidget.manageditemset.PersistentAttributes"]){dojo._hasResource["com.ibm.mm.iwidget.manageditemset.PersistentAttributes"]=true;dojo.provide("com.ibm.mm.iwidget.manageditemset.PersistentAttributes");dojo.declare("com.ibm.mm.iwidget.manageditemset.InternalPersistentAttributesToPreferenceModelAdapter",com.ibm.mashups.iwidget.itemset.ManagedItemSet,{constructor:function(_636,_637,_638){if(_637){this.serverless=true;}else{this.serverless=false;}this.modes=iwConstants.mode;this.widget=_636;this.widgetInstance=this.widget.getIWidgetInstance();this.instanceAttributes=this.widgetInstance.getAttributes();this.defAttributes=this.widget.widgetDef.getAttributes();this.parent=_638;this.mode=this._getMode(null);},setItemValue:function(_639,_63a,_63b){if(!_639){return null;}if(!_63a){return null;}if(this.isReadOnly(_639)){return null;}if(this.serverless){if(this.mode==this.modes.EDIT){this.instanceAttributes.setItemValue(_639,_63a);if(this.parent){return this.parent;}}}return null;},getItemValue:function(_63c,_63d){if(!_63c){return null;}var _63e;if(this.serverless){if(typeof _63d==="undefined"){_63d=true;}if(this.mode==this.modes.CONFIG){_63e=this.defAttributes.getItemValue(_63c);if(typeof _63e==="undefined"){_63e=null;}return _63e;}if(this.mode==this.modes.EDIT&&!_63d){_63e=this.instanceAttributes.getItemValue(_63c);if(typeof _63e==="undefined"){_63e=null;}return _63e;}if(_63d){_63e=this.instanceAttributes.getItemValue(_63c);if(!_63e){_63e=this.defAttributes.getItemValue(_63c);}if(typeof _63e==="undefined"){_63e=null;}return _63e;}}return null;},getAllNames:function(_63f){if(this.serverless){if(typeof _63f==="undefined"){_63f=true;}var _640;if(this.mode==this.modes.CONFIG){_640=this.defAttributes.getAllNames();if(_640&&_640.length&&_640.length===0){return null;}return _640;}if(this.mode==this.modes.EDIT&&!_63f){_640=this.instanceAttributes.getAllNames();if(_640&&_640.length&&_640.length===0){return null;}return _640;}var name;if(_63f){_640=this.instanceAttributes.getAllNames();var obj={};if(_640&&_640.length&&_640.length>0){for(var i in _640){if(Object.prototype.hasOwnProperty.call(_640,i)){name=_640[i];obj[name]=name;}}}_640=this.defAttributes.getAllNames();if(_640&&_640.length&&_640.length>0){for(var j in _640){if(Object.prototype.hasOwnProperty.call(_640,j)){name=_640[j];obj[name]=name;}}}return this._getNamesArray(obj);}}return null;},removeItem:function(_641){if(!_641){return null;}if(this.isReadOnly(_641)){return null;}if(this.serverless){if(this.mode==this.modes.EDIT){this.instanceAttributes.removeItem(_641);if(this.parent){return this.parent;}}}return null;},isReadOnly:function(_642,_643){if(!_642){return false;}if(this.serverless){if(typeof _643==="undefined"){_643=true;}if(this.mode==this.modes.CONFIG){return this.defAttributes.isReadOnly(_642);}if(this.mode==this.modes.EDIT&&_643){var _644=this.defAttributes.isReadOnly(_642);if(!_644){_644=this.instanceAttributes.isReadOnly(_642);}return _644;}if(this.mode==this.modes.EDIT){return this.instanceAttributes.isReadOnly(_642);}}return false;},commit:function(_645){if(this.serverless){this._saveMicroformat();}else{return null;}if(_645){_645(iwConstants.ATTRIBUTES,true);}return (this);},_getNamesArray:function(_646){var i=0;var _647=[];var name;for(name in _646){if(Object.prototype.hasOwnProperty.call(_646,name)){_647.push(name);i++;}}if(i===0){return null;}return _647;},_saveMicroformat:function(){this.widget.commit();var _648={};_648.wid=this.widget.id;this.widget.eventSvr._publishEvent(iwConstants.EVENTS.onAttributeSaved,_648,this.widget.hubId);},_getMode:function(_649){var mode=this.modes.EDIT;if(_649){mode=_649;}else{mode=this.widget.currentMode;}if(mode==this.modes.VIEW){mode=this.modes.EDIT;}return mode;},addListener:function(fn){var _64a=this.widget._registerListener(iwConstants.ATTRIBUTES,fn);return _64a;},removeListener:function(_64b){return this.widget._removeListener(iwConstants.ATTRIBUTES,_64b);}});dojo.declare("com.ibm.mm.iwidget.manageditemset.PersistentAttributes",com.ibm.mashups.iwidget.itemset.ManagedItemSet,{constructor:function(_64c,_64d){this._internalPersistentAttributesToPreferenceModelAdapter=new com.ibm.mm.iwidget.manageditemset.InternalPersistentAttributesToPreferenceModelAdapter(_64c,_64d,this);},setItemValue:function(_64e,_64f){return this._internal().setItemValue(_64e,_64f,true);},getItemValue:function(_650){return this._internal().getItemValue(_650,true);},getAllNames:function(){return this._internal().getAllNames(true);},removeItem:function(_651){return this._internal().removeItem(_651);},isReadOnly:function(_652){return this._internal().isReadOnly(_652,true);},save:function(_653){return this.commit(_653);},commit:function(_654){return this._internal().commit(_654);},_internal:function(){return this._internalPersistentAttributesToPreferenceModelAdapter;},addListener:function(fn){return this._internal().addListener(fn);},removeListener:function(_655){return this._internal().removeListener(_655);}});}if(!dojo._hasResource["com.ibm.mashups.iwidget.itemset.ItemSet"]){dojo._hasResource["com.ibm.mashups.iwidget.itemset.ItemSet"]=true;dojo.provide("com.ibm.mashups.iwidget.itemset.ItemSet");dojo.declare("com.ibm.mashups.iwidget.itemset.ItemSet",null,{constructor:function(){},setLocalizedItemValue:function(_656,_657,_658){return this;},setItemValue:function(_659,_65a,_65b){return this;},setItemValue:function(_65c,_65d){return this;},getLocalizedItemValue:function(_65e,_65f){return null;},getItemValue:function(_660){return null;},getAllNames:function(){return null;},removeItem:function(_661){return null;},removeItemValue:function(_662){return null;},removeLocalizedItemValue:function(_663,_664){return null;},getLocalesWithValues:function(_665){return null;},clone:function(){return null;},isReadOnly:function(_666){return false;},getItemSetDescription:function(){return null;},addListener:function(_667){return null;},removeListener:function(_668){return true;}});}if(!dojo._hasResource["com.ibm.mm.iwidget.itemset.ItemsetDefaultImpl"]){dojo._hasResource["com.ibm.mm.iwidget.itemset.ItemsetDefaultImpl"]=true;dojo.provide("com.ibm.mm.iwidget.itemset.ItemsetDefaultImpl");dojo.declare("com.ibm.mm.iwidget.itemset.ItemSetDefaultImpl",com.ibm.mashups.iwidget.itemset.ItemSet,{constructor:function(_669,_66a,name){this.widget=_669;this.name=name;var _66b=this.widget.getIWidgetInstance();var _66c=null;if(_66b){_66c=_66b.getItemSet(name);}var _66d={};if(_66a){if(_66a){for(var _66e in _66a.items){if(Object.prototype.hasOwnProperty.call(_66a.items,_66e)){_66d[_66e]=dojo.clone(_66a.items[_66e]);}}}this.properties=new com.ibm.mm.iwidget.widget.ModifiablePropertiesImpl(_66d);}if(!this.properties){this.properties=new com.ibm.mm.iwidget.widget.ModifiablePropertiesImpl(_66d);}if(_66c){for(var _66f in _66c){if(Object.prototype.hasOwnProperty.call(_66c,_66f)){var _670=_66c[_66f];if(_670.values){for(var j in _670.values){if(Object.prototype.hasOwnProperty.call(_670.values,j)){this.properties.setItemValue(_66f,_670.values[j],false,j);}}}if(_670.value){this.properties.setItemValue(_66f,_670.value);}}}}this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.bIsLoggable=this.LOGGER.isLoggable(this.LOG_LEVEL);},_getResourceBundle:function(){if(!this.iwMessages){this.iwMessages=dojo.i18n.getLocalization("com.ibm.mm.enabler","iwMessages");}return this.iwMessages;},_logDeprecated:function(_671,fn1,fn2){this._getResourceBundle();var _672=dojo.string.substitute(this.iwMessages.W_DEPRECATE_2,[fn1,fn2]);this.LOGGER.warning(_671,_672);},getLocalesWithValues:function(_673){return this.properties.getItemLocales(_673);},setLocalizedItemValue:function(_674,_675,_676){if(!_674||!_676){return null;}if(!(typeof _675!="undefined"&&_675!==null)){return null;}rc=this.properties.setItemValue(_674,_675,false,_676);if(rc){return this;}return null;},setItemValue:function(_677,_678,_679){if(!_677){return null;}if(!(typeof _678!="undefined"&&_678!==null)){return null;}if(!_679){rc=this.properties.setItemValue(_677,_678,false);}else{if(_679&&!dojo.isString(_679)){this._logDeprecated("setItemValue","ItemSet.setItemValue(itemName,value,readOnly)","ItemSet.setItemValue(item,value)");rc=this.properties.setItemValue(_677,_678,false);}else{this._logDeprecated("setItemValue","ItemSet.setItemValue(itemName,value,locale)","ItemSet.setLocalizedItemValue(item,value,locale)");return this.setLocalizedItemValue(_677,_678,_679);}}if(rc){return this;}return null;},getLocalizedItemValue:function(_67a,_67b){if(!_67a||!_67b){return null;}return this.properties.getLocalizedItemValue(_67a,_67b);},getItemValue:function(_67c,_67d){if(!_67c){return null;}if(_67d){this._logDeprecated("getItemValue","ItemSet.getItemValue(itemName,locale)","ItemSet.getLocalizedItemValue(item,locale)");return this.getLocalizedItemValue(_67c,_67d);}return this.properties.getItemValue(_67c);},getAllNames:function(){rc=this.properties.getAllNames();if(rc&&rc.length===0){return null;}return rc;},removeItem:function(_67e,_67f){if(!_67e){return null;}if(_67f){this._logDeprecated("removeItem","ItemSet.removeItem(itemName,locale)","ItemSet.removeLocalizedItemValue(itemName,locale)");return this.removeLocalizedItemValue(_67e,_67f);}rc=this.properties.removeItem(_67e);if(rc){return this;}return null;},removeLocalizedItemValue:function(_680,_681){if(!_680||!_681){return null;}rc=this.properties.removeItemValue(_680,_681);if(rc){return this;}return null;},removeItemValue:function(_682){if(!_682){return null;}rc=this.properties.removeItemValue(_682);if(rc){return this;}return null;}});}if(!dojo._hasResource["com.ibm.mm.iwidget.DeferredLiveTextUnprocessStubImpl"]){dojo._hasResource["com.ibm.mm.iwidget.DeferredLiveTextUnprocessStubImpl"]=true;dojo.provide("com.ibm.mm.iwidget.DeferredLiveTextUnprocessStubImpl");dojo.declare("com.ibm.mm.iwidget.DeferredLiveTextUnprocessStubImpl",com.ibm.mm.enabler.DeferredImpl,{constructor:function(_683){this.wrapper=_683;},start:function(sync){if(sync){return;}var _684=this.wrapper.getIWidgetInstance();var _685=dojo.clone(this.wrapper.rootElement);this._unchangeCompleteCallback(_685);},setIncludeParent:function(_686){this.includeParent=_686;},getIncludeParent:function(){return this.includeParent;},_unchangeCompleteCallback:function(node){if(dojo.isFunction(this.getFinishedCallback())){this.finish(node,200);}}});}if(!dojo._hasResource["com.ibm.mashups.iwidget.services.ContainerService_API"]){dojo._hasResource["com.ibm.mashups.iwidget.services.ContainerService_API"]=true;dojo.provide("com.ibm.mashups.iwidget.services.ContainerService_API");dojo.provide("com.ibm.mashups.iwidget.services.ContainerService");dojo.declare("com.ibm.mashups.iwidget.services.ContainerService",null,{SERVICE_NAME:"iWidgetContainerService",PROVIDER_EVENTS:"events",PROVIDER_WIRES:"wires",PROVIDER_ATTRIBUTES:"attributes",registerOnChangeListener:function(_687,_688){},getPersistenceMode:function(_689,_68a){},switchToModifiablePersistenceMode:function(){}});com.ibm.mashups.iwidget.services.ContainerService.SERVICE_NAME="iWidgetContainerService";com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_EVENTS="events";com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_WIRES="wires";com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_ATTRIBUTES="attributes";}if(!dojo._hasResource["com.ibm.mm.iwidget.services.ContainerServiceImpl"]){dojo._hasResource["com.ibm.mm.iwidget.services.ContainerServiceImpl"]=true;dojo.provide("com.ibm.mm.iwidget.services.ContainerServiceImpl");dojo.declare("com.ibm.mm.iwidget.services.ContainerServiceImpl",com.ibm.mashups.iwidget.services.ContainerService,{constructor:function(){this._modes=null;this._modModes=null;this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.bIsLoggable=this.LOGGER.isLoggable(this.LOG_LEVEL);this.TOPIC_BASE="/"+("com.ibm.mm.iwidget.services.ContainerServiceImpl".replace(/\./ig,"/"))+"/";this.TOPIC_CHANGE=this.TOPIC_BASE+"change";this.TOPIC_CHANGE_EVENTS=this.TOPIC_CHANGE+"/events";this.TOPIC_CHANGE_WIRES=this.TOPIC_CHANGE+"/wires";this.TOPIC_CHANGE_ATTRIBUTES=this.TOPIC_CHANGE+"/attributes";this._topics={};this._topics[com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_EVENTS]=this.TOPIC_CHANGE_EVENTS;this._topics[com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_WIRES]=this.TOPIC_CHANGE_WIRES;this._topics[com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_ATTRIBUTES]=this.TOPIC_CHANGE_ATTRIBUTES;},_invalidate:function(){this._modes=null;this._modModes=null;},_init:function(){if(this._modes){return;}var _68b="_init";if(this.bIsLoggable){this.LOGGER.entering(_68b,arguments);}var cs=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME);var _68c=cs.getValue(com.ibm.mashups.enabler.services.ConfigConstants.PERSISTENCE_MODE);var _68d=cs.getValue(com.ibm.mashups.enabler.services.ConfigConstants.PERSISTENCE_MODE_EVENTS);var _68e=cs.getValue(com.ibm.mashups.enabler.services.ConfigConstants.PERSISTENCE_MODE_WIRES);var _68f=cs.getValue(com.ibm.mashups.enabler.services.ConfigConstants.PERSISTENCE_MODE_ATTRIBUTES);this._modes={};this._modes[com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_EVENTS]=(_68d)?_68d:_68c;this._modes[com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_WIRES]=(_68e)?_68e:_68c;this._modes[com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_ATTRIBUTES]=(_68f)?_68f:_68c;_68d=cs.getValue(com.ibm.mashups.enabler.services.ConfigConstants.PERSISTENCE_MODE_EVENTS_MODIFIABLE);_68e=cs.getValue(com.ibm.mashups.enabler.services.ConfigConstants.PERSISTENCE_MODE_WIRES_MODIFIABLE);_68f=cs.getValue(com.ibm.mashups.enabler.services.ConfigConstants.PERSISTENCE_MODE_ATTRIBUTES_MODIFIABLE);this._modModes={};this._modModes[com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_EVENTS]=(_68d)?_68d:_68c;this._modModes[com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_WIRES]=(_68e)?_68e:_68c;this._modModes[com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_ATTRIBUTES]=(_68f)?_68f:_68c;if(this.bIsLoggable){this.LOGGER.trace(_68b,"Selected Modes for the iWidget Providers:");this.LOGGER.trace(_68b,com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_EVENTS+": "+this._modes[com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_EVENTS]);this.LOGGER.trace(_68b,com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_WIRES+": "+this._modes[com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_WIRES]);this.LOGGER.trace(_68b,com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_ATTRIBUTES+": "+this._modes[com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_ATTRIBUTES]);this.LOGGER.exiting(_68b);}},registerOnChangeListener:function(_690,_691){this._init();var _692=dojo.subscribe(this._topics[_690],_691.context,_691.callback);if(dojo.isFunction(_691.unregister)){dojo.hitch(_691.context,_691.unregister)(_692);}},getPersistenceMode:function(_693,_694){this._init();return this._modes[_693];},switchToModifiablePersistenceMode:function(_695){var _696="switchToModifiablePersistenceMode";if(this.bIsLoggable){this.LOGGER.entering(_696,arguments);}this._init();var _697=this._modes[com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_EVENTS];var _698=this._modModes[com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_EVENTS];var _699=this._modes[com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_WIRES];var _69a=this._modModes[com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_WIRES];var _69b=this._modes[com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_ATTRIBUTES];var _69c=this._modModes[com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_ATTRIBUTES];this._modes[com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_EVENTS]=_698;this._modes[com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_WIRES]=_69a;this._modes[com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_ATTRIBUTES]=_69c;if(_697!=_698){if(this.bIsLoggable){this.LOGGER.trace(_696,"old mode != new mode, switching...");}dojo.publish(this._topics[com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_EVENTS],[com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_EVENTS,_697,_698]);dojo.publish(this._topics[com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_WIRES],[com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_WIRES,_699,_69a]);dojo.publish(this._topics[com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_ATTRIBUTES],[com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_ATTRIBUTES,_69b,_69c]);}if(this.bIsLoggable){this.LOGGER.exiting(_696);}}});com.ibm.mashups.services.ServiceManager.setService(com.ibm.mashups.iwidget.services.ContainerService.SERVICE_NAME,new com.ibm.mm.iwidget.services.ContainerServiceImpl());}if(!dojo._hasResource["com.ibm.mashups.iwidget.services.ContainerService"]){dojo._hasResource["com.ibm.mashups.iwidget.services.ContainerService"]=true;dojo.provide("com.ibm.mashups.iwidget.services.ContainerService");}if(!dojo._hasResource["com.ibm.mm.iwidget.manageditemset.AttributesModeDelegate"]){dojo._hasResource["com.ibm.mm.iwidget.manageditemset.AttributesModeDelegate"]=true;dojo.provide("com.ibm.mm.iwidget.manageditemset.AttributesModeDelegate");dojo.declare("com.ibm.mm.iwidget.manageditemset.AttributesModeDelegate",com.ibm.mashups.iwidget.itemset.ManagedItemSet,{constructor:function(_69d,_69e){this.persistentAttributesFactoryService=_69d;this.wrapper=_69e;this.callbackHandle={context:this,callback:"_attributesProviderModeChange",unregister:function(_69f){this.wrapper.unregisterArray.push(_69f);}};this.widgetAttributes=[];this.widgetAttributesReplay=[];this._skipRecord=false;this._getAttributes();},_attributesProviderModeChange:function(_6a0,_6a1,_6a2){this.widgetAttributes=[];this._getAttributes();var _6a3=this._getModeSelector();var _6a4=this.widgetAttributesReplay[_6a3];if(_6a4){this._skipRecord=true;for(var i=0;i<_6a4.length;i++){var _6a5=_6a4[i];if(_6a5[0]=="set"){this.setItemValue(_6a5[1],_6a5[2]);}else{if(_6a5[0]=="remove"){this.removeItem(_6a5[1]);}}}this._skipRecord=false;}this.widgetAttributesReplay=[];this.widgetAttributesReplay[_6a3]=[];},_getModeSelector:function(){var _6a6=this.wrapper._getCurrentMode();var _6a7=iwConstants.mode.PERSONALIZE;if(_6a6==iwConstants.mode.CONFIG||_6a6==iwConstants.mode.EDIT){_6a7=_6a6;}return _6a7;},_getAttributes:function(){var _6a8=this._getModeSelector();this.widgetAttributes[_6a8]=this.widgetAttributes[_6a8]||null;if(this.widgetAttributes[_6a8]===null){this.widgetAttributes[_6a8]=this.persistentAttributesFactoryService.createPersistentAttributes(this.wrapper,this.callbackHandle);this.callbackHandle=null;}return this.widgetAttributes[_6a8];},_record:function(_6a9){if(!this._skipRecord){var _6aa=this._getModeSelector();this.widgetAttributesReplay[_6aa]=this.widgetAttributesReplay[_6aa]||null;if(this.widgetAttributesReplay[_6aa]===null){this.widgetAttributesReplay[_6aa]=[];}this.widgetAttributesReplay[_6aa].push(_6a9);}},_clearReplay:function(){var _6ab=this._getModeSelector();this.widgetAttributesReplay[_6ab]=[];},setItemValue:function(_6ac,_6ad){this._record(["set",_6ac,_6ad]);return this._getAttributes().setItemValue(_6ac,_6ad);},getItemValue:function(_6ae){return this._getAttributes().getItemValue(_6ae,true);},getAllNames:function(){return this._getAttributes().getAllNames(true);},removeItem:function(_6af){this._record(["remove",_6af]);return this._getAttributes().removeItem(_6af);},isReadOnly:function(_6b0){return this._getAttributes().isReadOnly(_6b0,true);},save:function(_6b1){var cs=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.iwidget.services.ContainerService.SERVICE_NAME);if(cs){cs.switchToModifiablePersistenceMode(com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_ATTRIBUTES);}this._clearReplay();return this._getAttributes().save(_6b1);},commit:function(_6b2){var cs=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.iwidget.services.ContainerService.SERVICE_NAME);if(cs){cs.switchToModifiablePersistenceMode(com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_ATTRIBUTES);}this._clearReplay();return this._getAttributes().commit(_6b2);},addListener:function(fn){return this._getAttributes().addListener(fn);},removeListener:function(_6b3){return this._getAttributes().removeListener(_6b3);}});}if(!dojo._hasResource["com.ibm.mm.iwidget.DeferredLoadImpl"]){dojo._hasResource["com.ibm.mm.iwidget.DeferredLoadImpl"]=true;dojo.provide("com.ibm.mm.iwidget.DeferredLoadImpl");dojo.declare("com.ibm.mm.iwidget.DeferredLoadImpl",com.ibm.mm.enabler.DeferredImpl,{constructor:function(uri,id,_6b4){this.uri=uri;if(typeof id=="undefined"){id=null;}this.id=id;if(typeof _6b4=="undefined"){_6b4=null;}this.widgetDef=_6b4;},start:function(sync){if(this.widgetDef){this._handleCallback(this.widgetDef,200);return this.widgetDef;}var mode=(typeof (sync)=="undefined")?true:sync;var _6b5=com.ibm.mashups.services.ServiceManager.getService("widgetLoadService");_6b5.getWidgetXML(this.uri,mode,dojo.hitch(this,"_handleLoad"),this.id);if(sync){return this.widgetDef;}return null;},_handleLoad:function(data,_6b6,xhr){if(xhr){_6b6=xhr.status;}if(_6b6!=200){data=null;}this.widgetDef=data;this._handleCallback(data,status);},_handleCallback:function(_6b7,_6b8){this.finish(_6b7,_6b8);}});}if(!dojo._hasResource["com.ibm.mm.iwidget.widget.IWidgetWrapperDefaultImpl"]){dojo._hasResource["com.ibm.mm.iwidget.widget.IWidgetWrapperDefaultImpl"]=true;dojo.provide("com.ibm.mm.iwidget.widget.IWidgetWrapperDefaultImpl");dojo.declare("com.ibm.mm.iwidget.widget.IWidgetWrapperDefaultImpl",com.ibm.mashups.iwidget.widget.IWidgetWrapper,{constructor:function(_6b9,id){this._internalIbmModes=iwConstants._INTERNALIBMMODES;this.rootElement=_6b9;this.id=id||dojo.attr(_6b9,"id");this.hubId=this.id;this.simpleWidgetEvents={};this.loaded=false;this.standalone=null;this.widgetAttributes=null;this.widgetItemSets=null;this.ns=_6b9.className.substr(0,3);this.windowManager={};this.iwMessages=null;this.eventSvr=com.ibm.mashups.services.ServiceManager.getService("eventService");this._jsHandler=com.ibm.mm.enabler.aggregation.javascript.JAVASCRIPT_HANDLER;this.eventHandlers=[];this.unregisterArray=[];this.publishedEvents={};this.handledEvents={};this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.bIsLoggable=this.LOGGER.isLoggable(this.LOG_LEVEL);},getID:function(){return this.id;},getIWidgetInstance:function(){if(this.widgetInstance){return this.widgetInstance;}this.widgetInstance=new com.ibm.mm.iwidget.widget.IWidgetInstanceImpl(this,this.rootElement,this.id);return this.widgetInstance;},setIWidgetDefinition:function(_6ba){this.widgetDef=_6ba;},getIWidgetDefinition:function(){if(this.loaded){return new com.ibm.mm.iwidget.DeferredLoadImpl(this.getIWidgetInstance().widgetXMLUrl,this.id,this.widgetDef);}else{return new com.ibm.mm.iwidget.DeferredLoadImpl(this.getIWidgetInstance().widgetXMLUrl,this.id);}},getMarkup:function(){return new com.ibm.mm.iwidget.DeferredLiveTextUnprocessStubImpl(this);},doRender:function(){try{this.prepare();this.execute();}catch(e){this.LOGGER.severe("IWidgetWrapper.doRender","widget: ${0} OnloadingException: ${1}",[this.hubId,e]);}},prepare:function(){var _6bb="_"+this.id+"_"+"iContext";if(!this.isModal()){dojo.global[_6bb]=new com.ibm.mm.iwidget.icontext.IContextImpl(this,this.ns);}else{var _6bc=this._mainframeId;var _6bd=parent[_6bc][_6bb];dojo.global[_6bb]=_6bd;}var _6be=this.eventSvr._subscribeEvent(this.eventSvr.WIDGETEVENT_PREFIX+this.hubId,this,"handleEvent",null,this.hubId);if(!this._inIframe()){this.eventHandlers.push(_6be);}},execute:function(){this._initialize(dojo.hitch(this,function(){this._doRender();}));},_initialize:function(_6bf){var lang=this.widgetDef.getDefaultLanguage();if(typeof lang!="undefined"&&lang!==null){this.defaultLanguage=lang;}else{this.defaultLanguage="en";}var _6c0=this._getInitDefaultMode();if(_6c0===null){_6c0=iwConstants.mode_view;}this.currentMode=_6c0;if(this._handleSaveMode){this._handleSaveMode();}this._initManagedItemSet();if(_6bf){_6bf();}},_getResourceBundle:function(){return null;},_logUpdateMarkupError:function(mode){},_getMarkupByMode:function(mode){var _6c1=this.widgetDef;var elem=_6c1.getMarkupByMode(mode);if(elem&&elem.uri){var uri=this._rewriteURI(elem.uri);dojo.xhrGet({url:uri,ibmMultipart:{context:com.ibm.mashups.enabler.io.XHRMultipartFactory.CONTEXT_ENABLER},handleAs:"text",sync:true,load:function(_6c2){if(_6c2){var _6c3={};_6c3.content=_6c2;_6c1.setMarkupByMode(mode,_6c3);}},error:function(data,_6c4){this.LOGGER.severe("_getMarkupByMode","error loading content for mode:"+mode,data);delete elem.uri;}});}var _6c5=null;if(_6c1.getMarkupByMode(mode)){_6c5=_6c1.getMarkupByMode(mode).content;}return _6c5;},_updateTitle:function(){},_updateMarkup:function(mode,_6c6){var _6c7=this._getMarkupByMode(mode);if(mode==iwConstants.mode_view){if(this.widgetDef.getAllowInstanceContent()){var temp=this.getIWidgetInstance().getDefaultViewContent();if(temp&&temp!==null){_6c7=temp;}}}if(typeof _6c7=="undefined"||_6c7===null){this._logUpdateMarkupError(mode);return true;}var _6c8=this._prepareMarkup(_6c7);_6c8=_6c8.replace(/^\s+|\s+$/,"");if(_6c8.indexOf("=0;k--){var _6d2=_6d1[k].getSourceWidgetID();_6d0.removeWire(_6d2);this.commit();}}}var _6d3=null;if(_6d0){_6d3=_6d0.getTargets();}if(_6d3&&true!==_6cf){var _6d4=com.ibm.mashups.iwidget.model.Factory.getGlobalWidgetModel();for(var i in _6d3){if(Object.prototype.hasOwnProperty.call(_6d3,i)){var _6d5=_6d4.find(i);if(_6d5){var _6d6=_6d5.getIWidgetInstance().getWireModel();_6d6.removeWire(this.id);_6d5.commit();}}}}for(var x in this.eventHandlers){if(Object.prototype.hasOwnProperty.call(this.eventHandlers,x)){this.eventSvr._unsubscribeEvent(this.eventHandlers[x],this.hubId);}}this.eventSvr._getHubAdapter(this.hubId).removeInlineHubClient(this.hubId);if(dojo.global["_"+this.id+"_"+"iContext"]){dojo.global["_"+this.id+"_"+"iContext"]._destroy();dojo.global["_"+this.id+"_"+"iContext"]=null;}}else{if(!this.isModal()){this.eventSvr.disconnectHubClient();if(dojo.global["_"+this.id+"_"+"iContext"]){dojo.global["_"+this.id+"_"+"iContext"]=null;}}}if(this.rootElement){this.rootElement=null;}if(this.windowManager){this.windowManager=null;}this.widgetInstance._destroy();},_doRender:function(){if(!this._inIframe()){this._updateTitle();}var _6d7=document.createElement("div");_6d7.className=this.ns+"Content";this.rootElement.appendChild(_6d7);var _6d8=this.rootElement.lastChild;dojo.addClass(_6d8,this.currentMode);_6d8.style.visibility="hidden";if(this._inIframe()){dojo.style(_6d8,"height","100%");}var _6d9=this.widgetDef.getIDescriptorItems();var _6da=_6d9.getItemValue(iwConstants.iDescriptorItems.mode);if(this.isModal()&&this.currentMode!=_6da){var _6db=document.createElement("div");_6db.className=this.ns+"Content";this.rootElement.appendChild(_6db);contentDiv1=this.rootElement.lastChild;dojo.addClass(contentDiv1,_6da);contentDiv1.style.visibility="hidden";contentDiv1.style.display="none";this._updateMarkup(_6da,contentDiv1);}this._updateMarkup(this.currentMode,_6d8);this._loadWidgetSharedResource(dojo.partial(this._finishRender,_6d8,this));},_finishRender:function(_6dc,_6dd){try{var _6de=_6dd.eventSvr._subscribeEvent(com.ibm.mashups.iwidget.Constants.RESIZE_WIDGET+"."+_6dd.id,_6dd,"handleSizeChanged",null,_6dd.id);_6dd.eventHandlers.push(_6de);_6dd._createiScope();_6dd._evalScripts(_6dc);_6dd.windowManager[_6dd.currentMode]={id:_6dd.currentMode,root:_6dc,active:true,external:false};dojo.query("> ."+_6dd.ns+"loading",_6dd.rootElement).forEach(function(elem){com.ibm.mm.enabler.utils.Dom.destroyNode(elem);});_6dd.onLoad();if(typeof _6dd._eventqueue!="undefined"&&_6dd._eventqueue!==null){for(var _6df in _6dd._eventqueue){if(Object.prototype.hasOwnProperty.call(_6dd._eventqueue,_6df)){_6dd.handleEvent(_6dd._eventqueue[_6df]);}}}}catch(e){if(_6dd._logInlineMessage){_6dd._logInlineMessage(_6dd,e);}if(_6dd.bIsLoggable){_6dd.LOGGER.trace("iWidget._finishRender","failed to render widget:"+_6dd.id+" Error:"+e.message);}return;}dojo.query("."+_6dd.currentMode,_6dd.rootElement).style({"visibility":""});},_evalScripts:function(_6e0){dojo.query("script",_6e0).forEach(function(_6e1){this._jsHandler.handle(_6e1);},this);},onLoad:function(){if(!this.isModal()){this._handleEventInternal(iwConstants.EVENTS.onLoad);}this.updateState();var _6e2=new com.ibm.mm.iwidget.IEventImpl("on"+this.currentMode,null,{oldMode:null});this._handleEventInternal("on"+this.currentMode,_6e2);this.loaded=true;try{dojo.publish(com.ibm.mashups.iwidget.Constants.WIDGET_LOADED+"."+this.id,[this.id]);}catch(e){throw e;}this.eventSvr._publishEvent(com.ibm.mashups.iwidget.Constants.WIDGET_LOADED+"."+this.hubId,this.hubId);},updateState:function(){return;},_getSimpleEventHandler:function(_6e3){if(this.simpleWidgetEvents&&typeof this.simpleWidgetEvents[_6e3]!="undefined"){return this.simpleWidgetEvents[_6e3];}var _6e4=this.widgetDef.getWidgetEvents()[_6e3];if(!_6e4){_6e4=_6e3;}var _6e5=this._getHandlerScope(_6e4);var _6e6=null;if(_6e5){_6e6=dojo.hitch(_6e5,_6e4);this.simpleWidgetEvents[_6e3]=_6e6;}else{if(_6e4.indexOf("on")===0){var _6e7="on"+_6e4.substr(2,1).toUpperCase()+_6e4.substr(3);if(_6e7!=_6e4){_6e5=this._getHandlerScope(_6e7);if(_6e5){_6e6=dojo.hitch(_6e5,_6e7);this.simpleWidgetEvents[_6e3]=_6e6;}}}}return _6e6;},_getHandlerScope:function(_6e8){var fn=dojo.global["_"+this.id+"_"+_6e8];if(typeof (fn)=="undefined"){var _6e9=dojo.global["_"+this.id+"_iContext"].iScope();if(_6e9&&_6e9[_6e8]){fn=_6e9;}}if(typeof fn=="undefined"||fn===null){fn=dojo.global[_6e8];}if(typeof fn=="undefined"||fn===null){return null;}else{return fn;}},handleEvent:function(_6ea){var _6eb=_6ea.declaredClass;if(_6eb=="com.ibm.mm.iwidget.IEventImpl"){var _6ec=_6ea.name;return this._handleEvent(_6ec,_6ea);}},_handleEvent:function(_6ed,_6ee){var _6ef="_handleEvent(eventName, iEvent)";if(this.bIsLoggable){this.LOGGER.entering(_6ef,[_6ed,dojo.toJson(_6ee)]);}_6ee=this._deserializePayload(_6ee);if(typeof _6ed=="undefined"||_6ed===null){return false;}if(!this.loaded){if(!this._eventqueue){this._eventqueue={};}this._eventqueue[_6ed]=_6ee;return;}try{if(_6ed==iwConstants.EVENTS.onModeChanged){if(this._inIframe()){var _6f0={};_6f0.methodname="_handleOnModeChange";_6f0.hubclient=this.hubId;_6f0.params=[_6ee.payload];var id="_stub_"+this.id;this.eventSvr._publishEvent(iwConstants.WIDGETEVENT_PREFIX+id,_6f0,this.hubId);return;}return this._handleModeChange(_6ee);}return this._handleEventInternal(_6ed,_6ee);}catch(e){this.LOGGER.severe("IWidgetWrapper.handleEvent","widget: ${0}, eventName: ${1}, HandleEventException: ${2}",[this.hubId,_6ed,e]);throw e;}},_deserializePayload:function(_6f1){if(typeof _6f1.payload=="string"&&_6f1.payload.indexOf("className")!=-1&&_6f1.payload.indexOf("json")!=-1){try{var _6f2=dojo.fromJson(_6f1.payload);if(_6f2.className&&typeof _6f2.className=="string"&&_6f2.className.length>0&&_6f2.json&&typeof _6f2.json=="string"){var _6f3=_6f2.json;if(_6f2.className=="com.ibm.mm.data.table"&&_6f3.indexOf("data")!=-1){_6f3=dojo.fromJson(_6f3);}_6f1.payload=new (dojo.getObject(_6f2.className))(_6f3);}}catch(e){this.LOGGER.severe("IWidgetWrapper._deserializePayload","widget: ${0}, eventName: ${1}, PayloadDeserializeException: ${2}",[this.hubId,_6f1.payload,e]);throw e;}}return _6f1;},_handleOnModeChange:function(_6f4){var _6f5=new com.ibm.mm.iwidget.IEventImpl("onModeChanged",null,{newMode:_6f4},null);this._handleModeChange(_6f5);},_handleModeChange:function(_6f6){var _6f7=false;var _6f8=this.currentMode;var _6f9=_6f6.payload;if(typeof _6f9=="undefined"||_6f9===null){return false;}if(dojo.isString(_6f9)){_6f9=dojo.fromJson(_6f9);}if(typeof _6f9=="undefined"||_6f9===null){return false;}var _6fa=_6f9.newMode||null;var _6fb=_6f9.rootElementId||null;if(_6fa!==null&&_6fa==this.currentMode){return false;}if(_6fa===null){return false;}var _6fc=_6fb!==null;var _6fd=_6fb;var _6fe=this._getDefaultMode();if(!_6fe){_6fe="view";}var _6ff=this.windowManager[_6fa]||null;if(this._inIframe()&&_6ff!==null&&_6fe==_6fa){this.currentMode=_6fa;if(this._handleSaveMode){this._handleSaveMode();}this.windowManager[_6fa].active=true;if(_6fd!==null){this.windowManager[_6fa].root=_6fd;}dojo.style(this.windowManager[_6fa].root,"display","");var _700=this.windowManager[_6f8];_700.active=false;if(_700.root){dojo.style(_700.root,"display","none");}this._handleOnModeEvent(_6fa,_6f8);return;}var _701=false;if(typeof _6ff!="undefined"&&_6ff!==null){var _702=_6ff.root;if(!_6ff.external&&_702!==null&&_6fb===null){_6fd=_702;_701=true;_6f7=true;dojo.style(_702,"display","");}}if(!_701){if(_6fd===null){var _703=document.createElement("div");_703.className=this.ns+"Content";this.rootElement.appendChild(_703);_6fd=this.rootElement.lastChild;dojo.addClass(_6fd,_6fa);}_6f7=this._updateMarkup(_6fa,_6fd);}if(_6f7){var _704=this.windowManager[this.currentMode];var _705=_704.root;if(_704.external){dojo.style(_705,"display","none");this.windowManager[this.currentMode]=null;}else{if(_6fb!==null){_704.active=false;}else{_704.active=false;dojo.style(_705,"display","none");}}_6f8=this.currentMode;this.currentMode=_6fa;if(this._handleSaveMode){this._handleSaveMode();}this.windowManager[_6fa]={id:_6fa,root:_6fd,active:true,external:_6fc};if(!_701){this._evalScripts(_6fd);}this._handleOnModeEvent(_6fa,_6f8);}if(_6f7&&!this._inIframe()){dojo.publish(iwConstants.EVENTS.modeChanged,[this.id,_6f8,_6fa]);_6f9={};_6f9.id=this.id;_6f9.oldMode=_6f8;_6f9.newMode=_6fa;this.eventSvr._publishEvent(com.ibm.mashups.iwidget.Constants.WIDGET_MODECHANGED,_6f9,this.hubId);}if(this._inIframe()){var _706={};_706.methodname="_handleOnModeUpdated";_706.hubclient=this.hubId;_706.params=[_6f6.payload];var id="_stub_"+this.id;this.eventSvr._publishEvent(iwConstants.WIDGETEVENT_PREFIX+id,_706,this.hubId);}return _6f7;},_handleOnModeUpdated:function(mode){var _707=mode.newMode||mode;if(_707==this.currentMode){return;}this.currentMode=_707;if(this._handleSaveMode){this._handleSaveMode();}this.windowManager[_707]={id:this.id,active:true,external:true};},_handleOnModeEvent:function(mode,_708){if(this._inIframe()){dojo.setContext(com.ibm.mashups.iwidget.model.Factory.getGlobalWidgetModel().global,com.ibm.mashups.iwidget.model.Factory.getGlobalWidgetModel().doc);if(dojo.isIE){if(document._mmcreateElement){document.createElement=document._mmcreateElement;}if(document._mmgetElementsByTagName){document.getElementsByTagName=document._mmgetElementsByTagName;}}}var _709=false;var _70a="on"+mode;if(!_708){_708=null;}var _70b=new com.ibm.mm.iwidget.IEventImpl(_70a,null,{oldMode:_708});_709=this._handleEventInternal(_70a,_70b);return _709;},_handleEventInternal:function(_70c,_70d){if(typeof _70c=="undefined"||_70c===null){return false;}var _70e=false;var _70f=null;if(_70c.indexOf("on")===0){var _710=this._getSimpleEventHandler(_70c);if(_710!==null){_70f=_710;}}if(_70f===null){_70f=this.getPublicEventHandler(_70c);}if(dojo.isFunction(_70f)){try{if(_70d){if(this._transform){_70d=this._transform(_70c,_70d);}dojo.partial(_70f)(_70d);}else{dojo.partial(_70f)();}}catch(e){this.LOGGER.severe("IWidgetWrapper._handleEventInternal","widget: ${0}, eventName: ${1}, HandleEventException: ${2}",[this.hubId,_70c,e]);throw e;}_70e=true;}return _70e;},getPublicEventHandler:function(_711){return null;},_getParent:function(){if(!this.parent){this.parent=com.ibm.mm.iwidget.Utils.getWidgetParent(this.rootElement);}this.parent=this.parent||null;return this.parent;},_setParent:function(_712){this.parent=_712;},getAttributes:function(){if(!this.widgetAttributes){var _713=com.ibm.mashups.services.ServiceManager.getService("persistentAttributesFactoryService");this.widgetAttributes=new com.ibm.mm.iwidget.manageditemset.AttributesModeDelegate(_713,this);}return this.widgetAttributes;},getWidgetItemSets:function(){if(this.widgetItemSets){return this.widgetItemSets;}this.widgetItemSets={};if(this.widgetDef){var _714=this.widgetDef.getAllItemSetNames();for(var i=0,l=_714.length;i0){var _74a=new com.ibm.mm.iwidget.IEventImpl("onItemSetChanged",null,_748);if(dojo.isString(fn)){var _74b=me._getHandlerScope(fn);if(_74b){fn=dojo.hitch(_74b,fn);}}if(dojo.isFunction(fn)){dojo.partial(fn)(_74a);}}};this.listenerManager[_745][_746]=_747;return _746;},_removeListener:function(_74c,id){if(!_74c||typeof id=="undefined"||id===null){return false;}if(!this.listenerManager){return false;}if(!this.listenerManager[_74c]){return false;}if(this.listenerManager[_74c][id]){delete this.listenerManager[_74c][id];return true;}return false;},_generateListenerId:function(){if(typeof this._listenerCt=="undefined"){this._listenerCt=0;}else{this._listenerCt++;}return this._listenerCt;},_initManagedItemSet:function(){var _74d=null;if(typeof (this.widgetDef)!="undefined"){_74d=this.widgetDef._getManagedItemSetListener(iwConstants.ATTRIBUTES);if(_74d!==null){this._registerListener(iwConstants.ATTRIBUTES,_74d);}_74d=this.widgetDef._getManagedItemSetListener(iwConstants.IDESCRIPTOR);if(_74d!==null){this._registerListener(iwConstants.IDESCRIPTOR,_74d);}}},_getRawUri:function(){var _74e=this.getIWidgetInstance().widgetXMLUrl;if(this.widgetDef.getXmlBase()){_74e=this.widgetDef.getXmlBase();}return _74e;},_initBaseUri:function(_74f){if(!_74f){return;}this.rawBaseUri=this._getRawBaseUri(_74f);this.widgetBaseUri=this._getResolvedPocUri(this.rawBaseUri);this.widgetBaseUriXhr=this._getXhrUri(this.widgetBaseUri);if(this.rawBaseUri.indexOf(":/")!=-1){var _750=this._getServerRoot(this.rawBaseUri);if(_750){this.serverRoot=this._getResolvedPocUri(_750);this.serverRootXhr=this._getXhrUri(this.serverRoot);}}},_rewriteURI:function(uri,_751){if(!this.widgetBaseUri){var _752=this._getRawUri();this._initBaseUri(_752);}return this._rewriteURIWithContext(uri,_751,this.widgetBaseUri,this.widgetBaseUriXhr,this.serverRoot,this.serverRootXhr);},_rewriteURIWithContext:function(uri,_753,_754,_755,_756,_757){if(typeof _753=="undefined"){_753=true;}var uri2=com.ibm.mm.enabler.EndpointUtils.checkForEndpoints(uri);if(uri2){uri=uri2;}var _758=uri;var _759,_75a;if(_753){if(uri.indexOf(":/")!=-1){_758=com.ibm.mm.enabler.utils.URLHelper.rewriteURL(uri);}else{if(_757!==null&&uri.indexOf(_757)===0){_758=uri;}else{_759=uri.split("?");_75a=com.ibm.mm.enabler.utils.Misc.encodePath(_759[0]);_758=_75a;if(uri.indexOf("/")===0){if(_757){_758=_757+_75a.substring(1);}}else{if(_755){_758=_755+_75a;}}if(_759.length==2){_758+="?"+_759[1];}}}}else{if(uri.indexOf(":/")===-1){_759=uri.split("?");_75a=com.ibm.mm.enabler.utils.Misc.encodePath(_759[0]);if(uri.indexOf("/")===0){if(_756){_758=_756+_75a.substring(1);}}else{if(_754){_758=_754+_75a;}}if(_759.length===2){_758+="?"+_759[1];}}}return _758;},_getRawBaseUri:function(_75b){if(!_75b){return null;}var _75c=_75b.indexOf("?");if(0<_75c){_75b=_75b.substring(0,_75c);}var uri2=com.ibm.mm.enabler.EndpointUtils.checkForEndpoints(_75b);if(uri2){_75b=uri2;}var rc=_75b.substring(0,_75b.lastIndexOf("/")+1);return rc;},_getResolvedPocUri:function(_75d){if(!_75d){return null;}var rc=_75d;if(com.ibm.mm.enabler.utils.Misc.isPocUrl(_75d)===true){rc=com.ibm.mm.enabler.utils.URLHelper.rewriteURL(_75d);}return rc;},_getXhrUri:function(_75e){if(!_75e){return null;}var rc=_75e;if(_75e.indexOf("/")!==0){rc=com.ibm.mm.enabler.utils.URLHelper.rewriteURL(_75e);}return rc;},_getServerRoot:function(_75f){if(!_75f){return null;}if(_75f.indexOf(":/")==-1){return null;}var _760=null;var _761=_75f.indexOf(":/");_760=_75f.substring(0,_761+2);if(_75f.indexOf(":///")!==-1){_760=_75f.substring(0,_761+4);}else{if(_75f.indexOf("://")!==-1){var _762=_75f.indexOf("/",_761+4);_760=_75f.substring(0,_762+1);}}return _760;},_executeCallbackQueue:function(){return;},_getCurrentMode:function(){return this.currentMode;}});com.ibm.mm.iwidget.widget.IWidgetWrapperImpl=com.ibm.mm.iwidget.widget.IWidgetWrapperDefaultImpl;if((ibmConfig.enablerLayerModules)&&(dojo.indexOf(ibmConfig.enablerLayerModules,"iWidget")>=0)){dojo["require"]("com.ibm.mm.iwidget.widget.IWidgetWrapperExtendedImpl");}}if(!dojo._hasResource["com.ibm.mashups.iwidget.widget.IWidgetWrapper"]){dojo._hasResource["com.ibm.mashups.iwidget.widget.IWidgetWrapper"]=true;dojo.provide("com.ibm.mashups.iwidget.widget.IWidgetWrapper");}if(!dojo._hasResource["com.ibm.mashups.iwidget.model.WidgetModel"]){dojo._hasResource["com.ibm.mashups.iwidget.model.WidgetModel"]=true;dojo.provide("com.ibm.mashups.iwidget.model.WidgetModel");dojo.declare("com.ibm.mashups.iwidget.model.WidgetModel",null,{constructor:function(id){},find:function(id){},hasChildren:function(_763){},getChildren:function(_764,_765){},getParent:function(_766){},getWidgetDefinitionByUrl:function(url){},getWidgetDefinitionByURL:function(url){},commit:function(){},createIWidgetDefinition:function(json){},createWidget:function(span){}});}if(!dojo._hasResource["com.ibm.mm.enabler.hub.ManagedHubImpl"]){dojo._hasResource["com.ibm.mm.enabler.hub.ManagedHubImpl"]=true;dojo.provide("com.ibm.mm.enabler.hub.ManagedHubImpl");dojo.declare("com.ibm.mm.enabler.hub.ManagedHubImpl",null,{constructor:function(){},publishMgr:function(_767,data,_768,_769){var _76a=_768?_768.getClientID():"manager";var _76b=_769?_769.getClientID():"manager";var that=com.ibm.mm.enabler.hub.ManagedHubImpl._instance;if(that.bIsLoggable){that.LOGGER.trace("publishMgr","(MANAGER): PUB: "+_76a+" -> "+_76b+" || topic: '"+_767+"' data: '"+data+"'");}return true;},subscribeMgr:function(_76c,_76d){var _76e=_76d?_76d.getClientID():"manager";var that=com.ibm.mm.enabler.hub.ManagedHubImpl._instance;if(that.bIsLoggable){that.LOGGER.trace("subscribeMgr","(MANAGER): SUB: id: '"+_76e+"' topic: '"+_76c+"'");}return true;},securityMgr:function(_76f,_770){var that=com.ibm.mm.enabler.hub.ManagedHubImpl._instance;if(that.bIsLoggable){that.LOGGER.trace("securityMgr","source:"+_76f+" alertType:"+_770);}},getInstance:function(){var hub=com.ibm.mm.enabler.hub.ManagedHubImpl._instance;if(!hub){com.ibm.mm.enabler.hub.ManagedHubImpl._instance=new OpenAjax.hub.ManagedHub({onPublish:this.publishMgr,onSubscribe:this.subscribeMgr,onSecurityAlert:this.securityMgr});com.ibm.mm.enabler.hub.ManagedHubImpl._instance.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger("com.ibm.mm.enabler.hub.ManagedHubImpl");com.ibm.mm.enabler.hub.ManagedHubImpl._instance.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;com.ibm.mm.enabler.hub.ManagedHubImpl._instance.bIsLoggable=com.ibm.mm.enabler.hub.ManagedHubImpl._instance.LOGGER.isLoggable(com.ibm.mm.enabler.hub.ManagedHubImpl._instance.LOG_LEVEL);hub=com.ibm.mm.enabler.hub.ManagedHubImpl._instance;}return hub;}});com.ibm.mm.enabler.hub.ManagedHubImpl=new com.ibm.mm.enabler.hub.ManagedHubImpl();}if(!dojo._hasResource["com.ibm.mm.enabler.hub.SubDomainPoolImpl"]){dojo._hasResource["com.ibm.mm.enabler.hub.SubDomainPoolImpl"]=true;dojo.provide("com.ibm.mm.enabler.hub.SubDomainPoolImpl");dojo.declare("com.ibm.mm.enabler.hub.SubDomainPoolImpl",null,{constructor:function(arr){if(arr){this._pool=arr;this._internalPool=dojo.clone(this._pool);}else{this._counter=0;this._reusedSubDomain=[];}this.configService=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME);this.reuseSubDomain=this.configService.getValue(com.ibm.mashups.enabler.services.ConfigConstants.SUBDOMAINREUSE);},getSize:function(){if(this._internalPool){return this._internalPool.length;}return -1;},get:function(){if(this._pool){return this._getFromPool();}var cnt=this._counter;if(this.reuseSubDomain){if(this._reusedSubDomain.length>0){cnt=this._reusedSubDomain.shift();return cnt;}else{this._counter++;}}else{this._counter++;}return "w"+cnt;},add:function(_771){if(!this.reuseSubDomain){return;}if(this._pool){return this._addToPool(_771);}else{this._reusedSubDomain.push(_771);}return;},_getFromPool:function(){if(this._pool.length===0){return null;}return this._pool.shift();},_addToPool:function(_772){this._pool.push(_772);}});}if(!dojo._hasResource["com.ibm.mm.enabler.hub.XHRHeaderExtensionImpl"]){dojo._hasResource["com.ibm.mm.enabler.hub.XHRHeaderExtensionImpl"]=true;dojo.provide("com.ibm.mm.enabler.hub.XHRHeaderExtensionImpl");dojo.declare("com.ibm.mm.enabler.hub.XHRHeaderExtensionImpl",null,{LOG_LEVEL:com.ibm.mashups.enabler.logging.LogLevel.TRACE,constructor:function(){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_METHOD="dojo.xhr()";this.bIsLoggable=this.LOGGER.isLoggable(this.LOG_LEVEL);this.originalDojoXHR=dojo.xhr;dojo.xhr=dojo.hitch(this,function(_773,args,_774){if(this.bIsLoggable){this.LOGGER.entering(this.LOG_METHOD,[_773,args,_774]);}if(!args.headers){args.headers={};}args.headers["com.ibm.lotus.openajax.virtualhost"]=document.location.hostname;args.headers["com.ibm.lotus.openajax.virtualport"]=document.location.port;if(this.bIsLoggable){this.LOGGER.trace(this.LOG_METHOD,"Adding headers: com.ibm.lotus.openajax.virtualhost="+document.location.hostname+" - com.ibm.lotus.openajax.virtualport="+document.location.port);}var ret=this.originalDojoXHR(_773,args,_774);if(this.bIsLoggable){this.LOGGER.exiting(this.LOG_METHOD);}return ret;});}});com.ibm.mm.enabler.hub.XHRHeaderExtension=new com.ibm.mm.enabler.hub.XHRHeaderExtensionImpl();}if(!dojo._hasResource["com.ibm.mm.enabler.hub.MainHubAdapterImpl"]){dojo._hasResource["com.ibm.mm.enabler.hub.MainHubAdapterImpl"]=true;dojo.provide("com.ibm.mm.enabler.hub.MainHubAdapterImpl");dojo.declare("com.ibm.mm.enabler.hub.MainHubAdapterImpl",null,{constructor:function(_775){this._managedhub=_775;this._inlineHubClients={};this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.bIsLoggable=this.LOGGER.isLoggable(this.LOG_LEVEL);},PREFIX_INLINE:"_inline_",PREFIX_IFRAME:"_iframe_",createInlineHubContainer:function(id){var _776=this.PREFIX_INLINE+id;var me=this;function onClientConnect(_777){if(me.bIsLoggable){me.LOGGER.trace("onClientConnect","++ "+_777.getClientID()+" connected");}};function onClientDisconnect(_778){if(me.bIsLoggable){me.LOGGER.trace("onClientDisconnect","-- "+_778.getClientID()+" disconnected");}};function onClientSecurityAlert(_779,_77a){if(me.bIsLoggable){me.LOGGER.trace("onClientSecurityAlert","!! security alert - id: '"+_779.getClientID()+"' msg: '"+_77a);}};function onClientError(_77b,_77c){if(me.bIsLoggable){me.LOGGER.trace("onClientError","!! error - id: '"+_77b.getClientID()+"' msg: '"+_77c);}};var _77d={Container:{onConnect:onClientConnect,onDisconnect:onClientDisconnect,onSecurityAlert:onClientSecurityAlert,onError:onClientError}};var _77e=new OpenAjax.hub.InlineContainer(this._managedhub,_776,_77d);return _77e;},createIframeHubContainer:function(id,_77f,uri,_780,_781,_782,_783){var _784=this.PREFIX_IFRAME+id;var _785=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME);var _786=_785.getValue(com.ibm.mashups.enabler.services.ConfigConstants.CONTEXT_ROOT_ENABLER);var _787=_786+"/js/openajaxhub/rpc_relay.html";var _788=window.location.protocol;var host=window.location.hostname;var port=window.location.port;var _789=_788+"//"+host+":"+port+_787;if(port==""){_789=_788+"//"+host+_787;}var me=this;function onClientConnect(_78a){if(me.bIsLoggable){me.LOGGER.trace("onClientConnect","++ "+_78a.getClientID()+" connected");}};function onClientDisconnect(_78b){if(me.bIsLoggable){me.LOGGER.trace("onClientDisconnect","-- "+_78b.getClientID()+" disconnected");}};function onClientSecurityAlert(_78c,_78d){if(me.bIsLoggable){me.LOGGER.trace("onClientSecurityAlert","!! security alert - id: '"+_78c.getClientID()+"' msg: '"+_78d);}};try{var w,h;this.removeIframeHubContainer(id);if(_780&&_780=="true"){w="600px";h="400px";}else{w="100%";h="100%";}if(_781){w=_781;}if(_782){h=_782;}if(_783){onClientSecurityAlert=_783;}var _78e=new OpenAjax.hub.IframeContainer(this._managedhub,_784,{Container:{onConnect:onClientConnect,onDisconnect:onClientDisconnect,onSecurityAlert:onClientSecurityAlert},IframeContainer:{uri:uri,tunnelURI:_789,parent:_77f,iframeAttrs:{title:"iframe",style:{width:w,height:h,border:"0px",overflow:"auto"}},timeout:1200000}});}catch(e){if(me.bIsLoggable){me.LOGGER.trace("createIframeHubContainer","Creating iframe container exception:"+e.message);}}},createInlineHubClient:function(id){var _78f=this.PREFIX_INLINE+id;var me=this;var _790=this._managedhub.getContainer(_78f);function onHubClientSecurityAlert(_791,_792){};var _793=new OpenAjax.hub.InlineHubClient({HubClient:{onSecurityAlert:onHubClientSecurityAlert},InlineHubClient:{container:_790}});function onHubClientConnect(_794,_795,_796){if(!_795){if(me.bIsLoggable){me.LOGGER.trace("createIframeHubContainer","!! client connection error = id: '"+_794.getClientID()+"' msg: '"+_796);}}};_793.connect(onHubClientConnect);this._inlineHubClients[_78f]=_793;return _793;},_getInlineHubClient:function(id){if(!id){return null;}var _797=this.PREFIX_INLINE+id;var _798=this._inlineHubClients[_797];if(typeof _798=="undefined"){_798=null;}return _798;},getInlineHubClient:function(id){if(!id){return this._managedhub;}var _799=this._getInlineHubClient(id);return _799?_799:this._managedhub;},isInlineClient:function(id){var rc=false;var _79a=this._getInlineHubClient(id);if(_79a){rc=true;}return rc;},removeInlineHubClient:function(id){var _79b=this._getInlineHubClient(id);var _79c=this.PREFIX_INLINE+id;if(_79b){var me=this;var _79d=function(_79e,_79f,_7a0){if(!_79f){if(me.bIsLoggable){me.LOGGER.trace("onHubClientDisconnect","-- "+_79e.getClientID()+" msg:"+_7a0);}}};_79b.disconnect(_79d);delete this._inlineHubClients[_79c];var _7a1=this._managedhub.getContainer(_79c);if(_7a1){this._managedhub.removeContainer(_7a1);}return;}},getContainer:function(id,_7a2){_7a2=_7a2||false;if(_7a2===true){id=this.PREFIX_IFRAME+id;}return this._managedhub.getContainer(id);},removeIframeHubContainer:function(id){var _7a3=this.PREFIX_IFRAME+id;var _7a4=this._managedhub.getContainer(_7a3);if(_7a4){this._managedhub.removeContainer(_7a4);}},returnSubDomain:function(_7a5){this.getSubDomainPool().add(_7a5);},getSubDomainSize:function(){return this.getSubDomainPool().getSize();},getSubDomain:function(){return this.getSubDomainPool().get();},getSubDomainPool:function(){if(!this.subDomainPool){var _7a6=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME);var _7a7=_7a6.getValue(com.ibm.mashups.enabler.services.ConfigConstants.SUBDOMAINS);if(_7a7){if(dojo.isArray(_7a7)&&_7a7.length!==0){this.subDomainPool=new com.ibm.mm.enabler.hub.SubDomainPoolImpl(_7a7);}}if(!this.subDomainPool){this.subDomainPool=new com.ibm.mm.enabler.hub.SubDomainPoolImpl();}}return this.subDomainPool;}});}if(!dojo._hasResource["com.ibm.mm.iwidget.services.EventService"]){dojo._hasResource["com.ibm.mm.iwidget.services.EventService"]=true;dojo.provide("com.ibm.mm.iwidget.services.EventService");dojo.declare("com.ibm.mm.iwidget.services.EventServiceDefaultImpl",com.ibm.mashups.iwidget.services.EventService,{constructor:function(){this.subMgr={};this.managedhub=com.ibm.mm.enabler.hub.ManagedHubImpl.getInstance();this.hubAdapter=new com.ibm.mm.enabler.hub.MainHubAdapterImpl(this.managedhub);this._subscribeEventService();if(this.registerServices){this.registerServices();}if(this.registerExtServices){this.registerExtServices();}this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.bIsLoggable=this.LOGGER.isLoggable(this.LOG_LEVEL);},getType:function(){return com.ibm.mm.iwidget.Constants.eventservice.type.MAIN;},registerServices:function(){var _7a8=com.ibm.mashups.iwidget.Constants.CHANGE_WIDGETMODE;var me=this;var _7a9=function(_7aa){var _7ab=_7aa.id;var _7ac=_7aa.newMode;var _7ad=_7aa.parentNode;me.fireEvent(_7ab,"onModeChanged",{newMode:_7ac,rootElementId:_7ad});};this.subscribeEvent(_7a8,null,_7a9,null,null);},setId:function(id){this.id=id;},getId:function(){return "main";},_subscribeEventService:function(){var that=this;function eventCallback(_7ae,_7af,_7b0){var _7b1=_7af.methodname;if(_7b1){var fn=that[_7af.methodname];if(fn){that[_7b1].apply(that,_7af.params);}}};this.managedhub.subscribe("eventservice."+this.getId(),eventCallback,that,that._subscribeCallback);},_subscribeCallback:function(_7b2,_7b3,_7b4){if(!_7b3){console.log("subscribe failed "+_7b2);}},_getHubAdapter:function(){return this.hubAdapter;},_getManagedHub:function(){return this.managedhub;},WIDGETEVENT_PREFIX:iwConstants.WIDGETEVENT_PREFIX,WILDCARD_PREFIX:iwConstants.WILDCARD_PREFIX,subscribeWire:function(_7b5,_7b6,_7b7,_7b8){return false;},publishWire:function(_7b9,_7ba,_7bb,_7bc){return false;},unSubscribeWire:function(_7bd,_7be,_7bf,_7c0){return false;},addWire:function(_7c1,_7c2,_7c3,_7c4){return false;},removeWire:function(_7c5,_7c6,_7c7,_7c8){return false;},fireEvent:function(_7c9,_7ca,_7cb,_7cc,_7cd){var _7ce=new com.ibm.mm.iwidget.IEventImpl(_7ca,_7cc,_7cb,_7cd);var _7cf=com.ibm.mashups.iwidget.model.Factory.getGlobalWidgetModel();var _7d0=_7cf.find(_7c9);var cb=function(_7d1,_7d2,_7d3,_7d4){var _7d5=_7d1.hubAdapter.isInlineClient(_7d2.id);if(_7d5){_7d1._publishEvent(_7d1.WIDGETEVENT_PREFIX+_7d2.id,_7d3,_7d3.source);}else{var _7d6={};if(_7d3.name==iwConstants.EVENTS.onModeChanged){_7d6.methodname="_handleOnModeChange";_7d6.params=[_7cb];_7d2.handleEvent(_7d6);return;}_7d6.methodname="fireEvent";_7d6.hubclient=_7d1.getId();_7d6.params=[_7d2.id,_7d3.name,_7d3.payload,_7d3.type];_7d1._publishEvent("eventservice."+_7d2.id,_7d6);}if(_7d4){var _7d7=_7d1.subMgr[_7d4];if(_7d7){_7d1.unsubscribeEvent(_7d7);}delete _7d1.subMgr[_7d4];}};if(_7d0&&_7d0.isLoaded()){cb(this,_7d0,_7ce);}else{var that=this;var _7d8=dojox.uuid.generateRandomUuid();var _7d9=this.subscribeEvent(com.ibm.mashups.iwidget.Constants.WIDGET_LOADED+"."+_7c9,null,function(){var _7da=_7cf.find(_7c9);cb(that,_7da,_7ce,_7d8);});this.subMgr[_7d8]=_7d9;}},publishEvent:function(_7db,_7dc,_7dd,_7de){if(this.bIsLoggable){this.LOGGER.entering("eventService.publishEvent",[_7db,_7dc,_7dd,_7de]);}if(typeof _7db=="undefined"||_7db===null){return;}var temp;if(_7db.indexOf(this.WILDCARD_PREFIX)===0){temp=this.WILDCARD_PREFIX;return this.broadcastEvent(_7db.substring(temp.length),_7dc,_7dd,_7de);}else{if(_7db.indexOf(this.WIDGETEVENT_PREFIX)===0){temp=_7db.substring(this.WIDGETEVENT_PREFIX.length);var _7df=temp.substring(0,temp.indexOf("."));var _7e0=temp.substring(temp.indexOf(".")+1);return this.fireEvent(_7df,_7e0,_7dc,_7dd,_7de);}}this._publishEvent(_7db,_7dc,_7de);},_publishEvent:function(_7e1,_7e2,_7e3){var _7e4=this.hubAdapter.getInlineHubClient(_7e3);if(typeof _7e2=="undefined"||_7e2===null){_7e4.publish(_7e1);}else{_7e4.publish(_7e1,_7e2);}},broadcastEvent:function(_7e5,_7e6,_7e7,_7e8,_7e9,_7ea){var _7eb={};_7eb.targetEvent=_7e5;_7eb.payload=_7e6;_7eb.payloadType=_7e7;this.broadcastEvents([_7eb],_7e8,_7e9,_7ea);return;},broadcastEvents:function(_7ec,_7ed,_7ee,_7ef){if((_7ec===null)||!dojo.isArray(_7ec)){return;}var _7f0=com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel();var _7f1=com.ibm.mashups.enabler.model.state.AccessorFactory.getSpaceAccessor(_7f0);var _7f2=_7f1.getSpaceID();var _7f3=com.ibm.mashups.enabler.model.state.AccessorFactory.getPageAccessor(_7f0,_7f2);var _7f4=_7f3.getPageID();var _7f5=((_7ee)&&(typeof _7ee=="string")&&(_7ee!=_7f4));if(_7f5){this._switchPageForBroadcastEvents(_7ec,_7ed,_7ee,_7ef,_7f0,_7f1,_7f2);}else{var _7f6;var _7f7;var _7f8=com.ibm.mashups.iwidget.model.Factory.getGlobalWidgetModel();var _7f9=_7f8.getAllWidgets();var that=this;var _7fa=function(_7fb,_7fc,_7fd){var _7fe=_7fb.getWidgetHandledEvents();if(_7fe===null){var _7ff=_7fb.getIWidgetDefinition().start();if(_7ff){_7fe=_7ff.getWidgetHandledEvents();}}if(_7fe){for(var i=0;i<_7fc.length;i++){for(var j=0;j<_7fe.length;j++){if(_7fc[i].targetEvent==_7fe[j].name){that.fireEvent(_7fb.getID(),_7fc[i].targetEvent,_7fc[i].payload,_7fc[i].payloadType,_7ed);break;}}}}if(_7fd){var _800=that.subMgr[_7fd];if(_800){that.unsubscribeEvent(_800);}delete that.subMgr[_7fd];}};var _801=false;for(var i in _7f9){if(Object.prototype.hasOwnProperty.call(_7f9,i)){var _802=_7f9[i];if(_802.isLoaded()){_7fa(_802,_7ec);}else{if(!_802.lazyLoad){_801=true;_7f6=dojox.uuid.generateRandomUuid();_7f7=this.subscribeEvent(com.ibm.mashups.iwidget.Constants.WIDGET_LOADED+"."+_802.getID(),null,dojo.partial(_7fa,_802,_7ec,_7f6));this.subMgr[_7f6]=_7f7;}}}}if((_7ec.length>0)&&(_7ec[0].targetEvent==="com.ibm.mashups.builder.skinLoaded")){_7f6=dojox.uuid.generateRandomUuid();_7f7=this.subscribeEvent(com.ibm.mashups.iwidget.Constants.WIDGET_LOADED+"."+_7ec[0].payload.widgetId,null,function(){that._handleBroadcastEventsCache();var _803=that.subMgr[_7f6];if(_803){that.unsubscribeEvent(_803);}});this.subMgr[_7f6]=_7f7;}for(var j=0;j<_7ec.length;j++){this._publishEvent(_7ec[j].targetEvent,_7ec[j].payload,_7ed);}}return;},_switchPageForBroadcastEvents:function(_804,_805,_806,_807,_808,_809,_80a){},_handleBroadcastEventsCache:function(){},_subscribeEvent:function(_80b,_80c,_80d,_80e,_80f){var _810=this._getHubAdapter().getInlineHubClient(_80f);var _811=_810.subscribe(_80b,function(_812,data,_813){var ec=_80d;if(_80c&&_80d){ec=dojo.hitch(_80c,_80d);}if(ec){ec(data);}},null,function(_814,_815,_816){if(_80c&&_80e){_80e=dojo.hitch(_80c,_80e);}if(_80e){_80e.apply(this,[_814,_815,_816]);}if(!_815){console.log("subscription for "+_814+" failed");return;}});return _811;},subscribeEvent:function(_817,_818,_819,_81a,_81b){return this._subscribeEvent(_817,_818,_819,_81a,_81b);},_unsubscribeEvent:function(_81c,_81d){var _81e=this._getHubAdapter().getInlineHubClient(_81d);try{if(_81e){_81e.unsubscribe(_81c);}}catch(e){console.log("unsubscribe failure:"+e);}},unsubscribeEvent:function(_81f,_820){if(!_81f){return;}this._unsubscribeEvent(_81f,_820);},_generateWireId:function(_821,_822,_823,_824){return _821+"_"+_822+"_"+_823+"_"+_824;}});if(!ibmConfig.insideSandbox){com.ibm.mashups.services.ServiceManager.setService("eventService","com.ibm.mm.iwidget.services.EventServiceDefaultImpl");}if((ibmConfig.enablerLayerModules)&&(dojo.indexOf(ibmConfig.enablerLayerModules,"iWidget")>=0)){dojo["require"]("com.ibm.mm.iwidget.services.EventServiceExtended");dojo["require"]("com.ibm.mm.iwidget.services.IFrameEventServiceImpl");}}if(!dojo._hasResource["com.ibm.mm.iwidget.model.WidgetModel"]){dojo._hasResource["com.ibm.mm.iwidget.model.WidgetModel"]=true;dojo.provide("com.ibm.mm.iwidget.model.WidgetModel");dojo.declare("com.ibm.mm.iwidget.model.WidgetModelDefaultImpl",com.ibm.mashups.iwidget.model.WidgetModel,{constructor:function(){this.widgetArr={};this.parentMap={};this.eventService=com.ibm.mashups.services.ServiceManager.getService("eventService");this.eventService.subscribeEvent(com.ibm.mashups.iwidget.Constants.UNLOAD_WIDGETS,this,"_unloadWidgets");if(!ibmConfig||(ibmConfig&&typeof ibmConfig.loadingHTML!="string")){if(ibmConfig["loadingHTML.imageURL"]){this.processAnim=com.ibm.mm.enabler.utils.Misc.preloadImage(ibmConfig["loadingHTML.imageURL"],20,20);}else{var url=dojo.moduleUrl("com.ibm.mm.iwidget","image/");url=url+"progress-anim.gif";this.processAnim=com.ibm.mm.enabler.utils.Misc.preloadImage(url,20,20);}}dojo.addOnWindowUnload(this,"_onWindowUnload");this.global=dojo.global;this.doc=dojo.doc;this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.bIsLoggable=this.LOGGER.isLoggable(this.LOG_LEVEL);},_onWindowUnload:function(){try{var arr=[];for(var i in this.widgetArr){if(Object.prototype.hasOwnProperty.call(this.widgetArr,i)){this._unloadWidget(i);}}}catch(e){console.log("_onWindowUnload "+e.message);}},createWidget:function(_825){var id=_825.getAttribute("id");if(typeof (id)=="undefined"){return null;}var _826=this.widgetArr[id];if(typeof _826!="undefined"&&_826!==null){var _827=_826.rootElement;if(_827==_825){return _826;}else{this._unloadWidget(id);}}var _828=new com.ibm.mm.iwidget.widget.IWidgetWrapperImpl(_825,id);this.widgetArr[id]=_828;this.parentMap[id]="DEFER_TOKEN";return _828;},createIWidgetDefinition:function(json){return new com.ibm.mm.iwidget.widget.IWidgetDefinitionImpl(null,null,json);},find:function(id){var _829=this.widgetArr[id];if(typeof _829!="undefined"){if(_829.lazyLoad&&!_829.loaded){this.renderWidget(_829);delete _829.lazyLoad;}return _829;}return null;},getWidgetById:function(id){return this.find(id);},commit:function(){return new com.ibm.mm.enabler.DeferredOperationImpl(this,this._commit);},_commit:function(_82a,sync){for(var _82b in this.widgetArr){if(Object.prototype.hasOwnProperty.call(this.widgetArr,_82b)){var _82c=this.widgetArr[_82b];var _82d=_82c.getIWidgetInstance();if(!_82d){continue;}_82c.commit();}}},_unloadWidgets:function(arr){var _82e;if(typeof arr!="undefined"||arr!==null){var _82f;if(arr.refreshId){_82f=arr.refreshId;arr=arr.unloadArray;}if(dojo.isArray(arr)){for(var i in arr){if(Object.prototype.hasOwnProperty.call(arr,i)){_82e=arr[i];this._unloadWidget(_82e,_82e==_82f?true:false);}}dojo.publish(com.ibm.mashups.iwidget.Constants.WIDGETS_UNLOADED,[arr]);this.eventService.publishEvent(com.ibm.mashups.iwidget.Constants.WIDGETS_UNLOADED,arr);}else{if(dojo.isString(arr)){this._unloadWidget(arr);}}}},_unloadWidget:function(_830,_831){if(typeof this.widgetArr[_830]!="undefined"&&this.widgetArr[_830]!==null){var _832=this.widgetArr[_830];try{_832.destroy(_831);}catch(e){}delete this.widgetArr[_830];if(this.parentMap[_830]){delete this.parentMap[_830];}}},getParent:function(_833){var _834=this.parentMap[_833.getID()];if(_834&&_834=="DEFER_TOKEN"){_834=_833._getParent();this.parentMap[_833.getID()]=_834;}if(_834){parent=this.find(_834);}return parent||null;},hasChildren:function(_835){return (this.getChildren(_835,false).length===0)?false:true;},getChildren:function(_836,_837){this._checkParentMap();var _838=[];var _839=(typeof _837=="undefined")?true:_837;this._getChildren(_836,_839,_838);return _838;},_checkParentMap:function(){for(var id in this.widgetArr){if(Object.prototype.hasOwnProperty.call(this.widgetArr,id)){var _83a=this.parentMap[id];if(_83a&&_83a=="DEFER_TOKEN"){var _83b=this.widgetArr[id];_83a=_83b._getParent();this.parentMap[id]=_83a;}}}},_getChildren:function(_83c,_83d,_83e){for(var id in this.parentMap){if(this.parentMap[id]==_83c.getID()){var _83f=this.find(id);if(_83f){_83e.push(_83f);if(_83d){this._getChildren(_83f,_83d,_83e);}}}}},getWidgetDefinitionByUrl:function(url){return this.getWidgetDefinitionByURL(url);},getWidgetDefinitionByURL:function(url){return new com.ibm.mm.iwidget.DeferredLoadImpl(url);},getAllWidgets:function(){return this.widgetArr;},renderWidget:function(_840){if(typeof _840=="undefined"){return;}if(_840.loaded){return;}_840.doRender();}});com.ibm.mm.iwidget.model.WidgetModelImpl=com.ibm.mm.iwidget.model.WidgetModelDefaultImpl;if((ibmConfig.enablerLayerModules)&&(dojo.indexOf(ibmConfig.enablerLayerModules,"iWidget")>=0)){dojo["require"]("com.ibm.mm.iwidget.model.WidgetModelExtended");}}if(!dojo._hasResource["com.ibm.mm.iwidget.model.FactoryImpl"]){dojo._hasResource["com.ibm.mm.iwidget.model.FactoryImpl"]=true;dojo.provide("com.ibm.mm.iwidget.model.FactoryImpl");dojo.declare("com.ibm.mm.iwidget.model.FactoryImpl",com.ibm.mashups.iwidget.model.Factory,{constructor:function(){},getGlobalWidgetModel:function(){if(!this._globalWidgetModel){this._globalWidgetModel=new com.ibm.mm.iwidget.model.WidgetModelImpl();}return this._globalWidgetModel;}});com.ibm.mashups.iwidget.model.Factory=new com.ibm.mm.iwidget.model.FactoryImpl();}if(!dojo._hasResource["com.ibm.mashups.iwidget.model.Factory"]){dojo._hasResource["com.ibm.mashups.iwidget.model.Factory"]=true;dojo.provide("com.ibm.mashups.iwidget.model.Factory");}if(!dojo._hasResource["com.ibm.mm.enabler.model.state.NavigationStateProcessorImpl"]){dojo._hasResource["com.ibm.mm.enabler.model.state.NavigationStateProcessorImpl"]=true;dojo.provide("com.ibm.mm.enabler.model.state.NavigationStateProcessorImpl");dojo.declare("com.ibm.mm.enabler.model.state.NavigationStateProcessorImpl",com.ibm.mashups.enabler.model.state.NavigationStateProcessor,{constructor:function(){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.bIsLoggable=this.LOGGER.isLoggable(this.LOG_LEVEL);if(this.bIsLoggable){this.LOGGER.entering("constructor");}this.configService=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME);var _841=this.configService.getValue(com.ibm.mashups.enabler.services.ConfigConstants.NAVSTATE_PERSISTENCE_URL);if(_841){this.persistenceURL=this._getAssociativeArray(_841);}var _842=this.configService.getValue(com.ibm.mashups.enabler.services.ConfigConstants.NAVSTATE_PERSISTENCE_PSTORE);if(_842){this.persistencePSTORE=this._getAssociativeArray(_842);}var _843=this.configService.getValue(com.ibm.mashups.enabler.services.ConfigConstants.NAVSTATE_PERSISTENCE_URL_LIMIT);var _844=10;if(_843){_844=parseInt(_843,10);}this.urlpersistenceLIMIT=_844;var _845=this.configService.getValue(com.ibm.mashups.enabler.services.ConfigConstants.NAVSTATE_PERSISTENCE_URL_SPLIMIT);_844=2;if(_845){_844=parseInt(_845,10);}this.urlpersistenceSPLIMIT=_844;this.isHuffmannEnabled=this.configService.getValue(com.ibm.mashups.enabler.services.ConfigConstants.NAVSTATE_HUFFMANNENCODE_ENABLED);},PID:"pid",SHAREDPARAMETERSETS:"sps",SID:"sid",HUFFMANN_PREFIX:"mashup:huffman/",encodeWidgetIdentifier:function(wid,nsm){return wid;},decodeWidgetIdentifier:function(wid,nsm){return wid;},dispose:function(_846){var _847=com.ibm.mashups.enabler.model.state.CookieManager;var temp=_847.disposeState();if(_846){_846();}},_getAssociativeArray:function(_848){var obj={};if(dojo.isString(_848)){obj[_848]=_848;return obj;}for(var i in _848){if(Object.prototype.hasOwnProperty.call(_848,i)){var _849=_848[i];obj[_849]=_849;}}return obj;},decode:function(url,_84a){if(this.bIsLoggable){this.LOGGER.entering("decode");this.LOGGER.trace("decode","url is "+url);}if(url.indexOf(this.HUFFMANN_PREFIX)!=-1){var arr=url.split(this.HUFFMANN_PREFIX);var _84b=com.ibm.mm.enabler.encode.huffman.HuffmanURL.getDataFromHuffmanTree(arr[1])||null;if(_84b){url=arr[0]+_84b;}}var hash=this._getHash(url)||null;if(hash){if(url.indexOf("#")!=-1){if(url.lastIndexOf("&")==(url.length-1)){url=url.concat(hash);}else{url=url.concat("#");url=url.concat(hash);}}else{url=url.concat("#");url=url.concat(hash);}}var _84c={};var _84d=new com.ibm.mm.enabler.utils.HttpUrl(url);var _84e=_84d.anchor;_84e=decodeURIComponent(_84e);if(this.bIsLoggable){this.LOGGER.trace("decode","fragment is "+_84e);}if(_84e&&_84e!=""){var _84f=dojo.queryToObject(_84e);var _850=new Date().getTime();if(_84f.pid){_84c.pid={};_84c.pid.value=decodeURIComponent(_84f.pid);_84c.pid.params={};_84c.pid.params.lm=_850;}if(_84f.sid){_84c.sid={};_84c.sid.value=decodeURIComponent(_84f.sid);_84c.sid.params={};_84c.sid.params.lm=_850;}if(_84f.sps){_84c.sparams={};rawValue=dojo.fromJson(decodeURIComponent(_84f.sps));_84c.sparams=rawValue;}_84c.wparams={};for(var i in _84f){if(i.indexOf("w")===0&&i.indexOf("cp")==-1&&i.indexOf("rp")==-1){var _851={};var _852=i.substr(1)*1+_850;var wID=_84f[i];var _853=i+"cp";var _854=i+"rp";if(_84f[_853]){_851.value=_851.value?_851.value:{};try{_851.value.cp=dojo.fromJson(decodeURIComponent(_84f[_853]));}catch(e){_851.value.cp=decodeURIComponent(_84f[_853]);}_851.params=_851.params?_851.params:{};_851.params.lm=_852;}if(_84f[_854]){_851.value=_851.value?_851.value:{};try{_851.value.rp=dojo.fromJson(decodeURIComponent(_84f[_854]));}catch(e2){_851.value.rp=decodeURIComponent(_84f[_854]);}_851.params=_851.params?_851.params:{};_851.params.lm=_852;}_84c.wparams[wID]=_851;}else{if(i.indexOf("w")!==0&&i!="pid"&&i!="sid"&&i!="sps"&&i!="pageselection"){var _855=_84f[i];_84c.params=_84c.params?_84c.params:{};_84c.params[i]=decodeURIComponent(_855);}}}}if(_84a){_84a(_84c);}if(!_84a){return _84c;}},_getFragmentFromData:function(obj,_856,_857){var _858;if(dojo.isString(obj)){_858=obj;}else{_858=dojo.clone(obj);if(_856||_857){_858=this._filterData(obj,_856,_857);}}var _859=_858;if(!dojo.isString(_859)){if(this._isEmpty(_859)){_859=null;}else{try{_859=dojo.toJson(_859);}catch(e){_859=null;}}}return _859;},encode:function(_85a,_85b,_85c,_85d,nsm){var _85e="";var _85f={};var wm;if(_85d&&_85d.cp){_85f=_85d.cp;if(_85f.widgetsOnCurrentPage=="true"){wm=com.ibm.mashups.iwidget.model.Factory.getGlobalWidgetModel();}}var data;var pid;var sid;if(_85a.pid&&_85a.pid.value){pid=_85a.pid.value;}if(!pid&&_85a.sid&&_85a.sid.value){sid=_85a.sid.value;if(_85a.pageselection&&_85a.pageselection[sid]){pid=_85a.pageselection[sid].value;}}if(pid&&this._contains("pid",this.persistenceURL)){_85e=_85e+"pid"+"="+encodeURIComponent(pid)+"&";}if(!sid&&_85a.sid&&_85a.sid.value){sid=_85a.sid.value;}if(sid&&this._contains("sid",this.persistenceURL)){_85e=_85e+"sid"+"="+encodeURIComponent(sid)+"&";}for(var i in _85a){if(Object.prototype.hasOwnProperty.call(_85a,i)){if(i=="sparams"){if(_85a[i]){var _860=dojo.clone(_85a[i])||null;this._removeHiddenParameters(_860);this._removeEmptyObj(_860);if(_860&&this._contains("sparams",this.persistenceURL)){_85e=_85e+"sps"+"="+encodeURIComponent(dojo.toJson(_860))+"&";}}}if(i=="pageselection"&&_85a[i]){data=dojo.clone(_85a[i])||null;if(data&&this._contains("pageselection",this.persistenceURL)){_85e=_85e+"pageselection"+"="+encodeURIComponent(dojo.toJson(data))+"&";}}if(i=="wparams"&&_85a[i]&&!(_85f.noWidgets=="true")){var _861=this._sortData(dojo.clone(_85a[i]));if(_861.length>this.urlpersistenceLIMIT){_861=_861.slice(_861.length-this.urlpersistenceLIMIT);}var _862=0;var _863;var _864;var _865=_85f.allWidgets=="true"||this._contains("cp",this.persistenceURL);var _866=_85f.widgetsOnCurrentPage=="true";for(var j in _861){if(Object.prototype.hasOwnProperty.call(_861,j)){var _867=_861[j]||null;if(_866&&wm){if(_867&&_867.wid){var wid=dojo.isFunction(this.decodeWidgetIdentifier)?this.decodeWidgetIdentifier(_867.wid,nsm):_867.wid;if(wm.find(wid)===null){continue;}}}if(_867&&_867.value){_863=null;_864=null;if(_867.value.cp&&(_865||_866)){_863=this._getFragmentFromData(_867.value.cp)||null;}if(_867.value.rp){_864=this._getFragmentFromData(_867.value.rp,this.persistenceURL)||null;}if(_863||_864){_85e=_85e+"w"+_862+"="+_867.wid+"&";if(_863){_85e=_85e+"w"+_862+"cp="+encodeURIComponent(_863)+"&";}if(_864){_85e=_85e+"w"+_862+"rp="+encodeURIComponent(_864)+"&";}_862++;if(_862>=this.urlpersistenceLIMIT){break;}}}}}}if(i=="params"&&_85a[i]){var _868=_85a[i];for(var k in _868){if(Object.prototype.hasOwnProperty.call(_868,k)){_85e=_85e+k+"="+encodeURIComponent(_868[k])+"&";}}}}}if(this.isHuffmannEnabled){if(_85e.indexOf("&")!=-1){data=_85e.substr(_85e.indexOf("&")+1);if(data.length>0){data=com.ibm.mm.enabler.encode.huffman.HuffmanURL.createRawSchemeSpecificPartFromRegex(data,"[%&c=]");_85e=_85e.substring(0,_85e.indexOf("&")+1);_85e=_85e.concat(this.HUFFMANN_PREFIX);_85e=_85e.concat(data);}}}if(_85b){_85b(_85e,_85d);}if(!_85b){return _85e;}},_removeHiddenParameters:function(obj){for(var i in obj){if(Object.prototype.hasOwnProperty.call(obj,i)){if(i.indexOf("_")===0){obj[i]=null;delete obj[i];}else{if(!dojo.isString(obj[i])){this._removeHiddenParameters(obj[i]);}}}}},_removeEmptyObj:function(obj){if(com.ibm.mm.enabler.utils.Misc.isEmpty(obj)){return;}for(var _869 in obj){if(Object.prototype.hasOwnProperty.call(obj,_869)){if(!dojo.isObject(obj[_869])){continue;}var _86a=obj[_869];this._removeEmptyObj(_86a);if(com.ibm.mm.enabler.utils.Misc.isEmpty(_86a)){obj[_869]=null;delete obj[_869];}}}},_removeQueryState:function(wru){if(wru.indexOf("?")==-1){return wru;}var _86b=wru.substring(wru.indexOf("?")+1);if(_86b&&_86b.indexOf("#")!=-1){_86b=_86b.substring(0,_86b.indexOf("#"));}var _86c=wru.substr(0,wru.indexOf("?"));var st=null;var _86d="";if(_86b&&(_86b.indexOf("nst=")===0||_86b.indexOf("&nst=")>=0)){var temp=_86b.substr(_86b.indexOf("nst=")+3);var _86e="";if(temp.indexOf("&")>0){st=temp.substring(0,temp.indexOf("&"));_86e=temp.substring(temp.indexOf("&"));}else{st=temp;}if(_86b.indexOf("&nst=")!=-1){_86d=_86b.substring(0,_86b.indexOf("&nst="));}if(_86d.length===0&&_86e.length!==0){_86d=_86d.concat(_86e.substring(1));}else{_86d=_86d.concat(_86e);}}else{return wru;}var hash=wru.substr(wru.indexOf("#")+1);var _86f=_86c;if(_86d.length>0){_86f=_86f.concat("?").concat(_86d);}if(hash.length>0){_86f=_86f.concat("#").concat(hash);}return _86f;},generateUrl:function(_870,_871,_872,nsm){return this.generateURL(_870,_871,_872);},generateURL:function(_873,_874,_875,nsm){var _876;if(_875&&_875.cp){_876={cp:_875.cp};}var _877=_876?this.encode(_873,null,null,_876,nsm):this.encode(_873,null,null,null,nsm);var href=window.location.href;href=this._removeQueryState(href);var _878=href;if(href.indexOf("#")!=-1){_878=href.substr(0,href.indexOf("#"));}var url=_878.concat("#");url=url.concat(_877);if(_875&&_875.nohash&&_875.nohash=="true"){_877=encodeURIComponent(_877);if(_878.indexOf("?")==-1){url=_878.concat("?");url=url.concat("nst=");url=url.concat(_877);}else{if(_878.lastIndexOf("&")==(_878.length-1)){url=_878.concat("nst=");url=url.concat(_877);}else{url=_878.concat("&");url=url.concat("nst=");url=url.concat(_877);}}}if(_874){_874(url);}return url;},_getHash:function(wru){if(wru.indexOf("?")==-1){return null;}if(wru.indexOf("#")!=-1){var _879=wru.substr(wru.indexOf("#")+1);if(wru.indexOf("pid")!=-1||wru.indexOf("sid")!=-1){return null;}}var _87a=wru.substring(wru.indexOf("?")+1);if(_87a&&_87a.indexOf("#")!=-1){_87a=_87a.substring(0,_87a.indexOf("#"));}var st=null;if(_87a&&(_87a.indexOf("nst=")===0||_87a.indexOf("&nst=")>=0)){var temp=_87a.substr(_87a.indexOf("nst=")+4);var _87b="";if(temp.indexOf("&")>0){st=temp.substring(0,temp.indexOf("&"));}else{st=temp;}st=decodeURIComponent(st);}else{return null;}return st;},_sortData:function(_87c){var arr=[];for(var i in _87c){if(Object.prototype.hasOwnProperty.call(_87c,i)){_87c[i].wid=i;var _87d=_87c[i];if(_87d.params&&_87d.params.lm){arr.push(_87d);}}}var _87e=function(a,b){return (a.params.lm-b.params.lm);};arr.sort(_87e);return arr;},_getLength:function(obj){var _87f=0;for(var i in obj){if(Object.prototype.hasOwnProperty.call(obj,i)){_87f++;}}return _87f;},_isEmpty:function(obj){return com.ibm.mm.enabler.utils.Misc.isEmpty(obj);},_contains:function(_880,obj){if(!obj){return false;}if(obj[_880]){return true;}return false;},_filterData:function(data,_881,_882){if(!_881&&!_882){return data;}if(!_882){for(var i in data){if(Object.prototype.hasOwnProperty.call(data,i)){if(!this._contains(i,_881)){delete data[i];}}}return data;}for(var j in data){if(Object.prototype.hasOwnProperty.call(data,j)){if(!this._contains(j,_881)&&this._contains(j,_882)){delete data[j];}}}return data;},preprocess:function(_883,_884){if(this.bIsLoggable){this.LOGGER.entering("preprocess");if(_883){this.LOGGER.trace("preprocess","state is "+dojo.toJson(_883));}}var _885=com.ibm.mashups.enabler.model.state.CookieManager;var temp=_885.getState();if(!_883.pid&&temp.pid&&!_883.sid){_883.pid=temp.pid;}if(!_883.sid&&temp.sid){_883.sid=temp.sid;}if(!_883.pageselection&&temp.pageselection){_883.pageselection=temp.pageselection;}_883.lcparams=temp.lcparams||{};if(!_883.wparams){_883.wparams={};}var _886=_883.wparams;var _887=temp.wparams;for(var i in _887){if(Object.prototype.hasOwnProperty.call(_887,i)){var _888=i;var _889=_887[i];var _88a=_886[_888];if(_88a){_889=dojo.mixin(_889,dojo.clone(_88a));_886[_888]=_889;}else{_886[_888]=_889;}}}if(_884){_884(_883);}if(!_884){return _883;}},postprocess:function(_88b,_88c,_88d,_88e){var _88f=com.ibm.mashups.enabler.model.state.CookieManager;for(var i in _88b){if(Object.prototype.hasOwnProperty.call(_88b,i)){if(i=="pid"||i=="sid"||i=="pageselection"||i=="sparams"){if(this._contains(i,this.persistencePSTORE)){_88f.setState(i,_88b[i]);}}if(i=="lcparams"&&_88b[i]&&this.persistencePSTORE&&(this.persistencePSTORE.w||this.persistencePSTORE.h)){var _890={};var _891=_88b[i];for(var page in _891){if(Object.prototype.hasOwnProperty.call(_891,page)){var _892={};var _893=_891[page];_892.templateURL=_893.templateURL;_892.params=_893.params;_890[page]=_892;}}_88f.setState("lcparams",_890);}if(i=="wparams"&&_88b[i]){var _894={};var _895=_88b[i];for(var j in _895){if(Object.prototype.hasOwnProperty.call(_895,j)){var _896=_895[j]||null;var wID=j;var _897={};if(_896&&_896.value){if(_896.value.rp){var _898=this._filterData(dojo.clone(_896.value.rp),this.persistencePSTORE);if(!this._isEmpty(_898)){_897.value=_897.value?_897.value:{};_897.value.rp=_898;}}if(_896.value.cp&&this._contains("cp",this.persistencePSTORE)){var _899=this._filterData(dojo.clone(_896.value.cp),this.persistencePSTORE);if(!this._isEmpty(_899)){_897.value=_897.value?_897.value:{};_897.value.cp=_899;}}if(!this._isEmpty(_897)){if(_896.params){_897.params=_896.params;}_894[wID]=_897;}}}}_88f.setState("wparams",_894);}}}_88f.commit();if(_88c){_88c(_88b,_88e);}if(!_88c){return _88b;}}});}if(!dojo._hasResource["com.ibm.mashups.enabler.model.state.NavigationStateProcessor"]){dojo._hasResource["com.ibm.mashups.enabler.model.state.NavigationStateProcessor"]=true;dojo.provide("com.ibm.mashups.enabler.model.state.NavigationStateProcessor");}if(!dojo._hasResource["com.ibm.mm.enabler.model.state.NavigationStateProcessorFactoryImpl"]){dojo._hasResource["com.ibm.mm.enabler.model.state.NavigationStateProcessorFactoryImpl"]=true;dojo.provide("com.ibm.mm.enabler.model.state.NavigationStateProcessorFactoryImpl");dojo.declare("com.ibm.mm.enabler.model.state.NavigationStateProcessorFactoryImpl",null,{constructor:function(){},getProcessor:function(){if(!this._nsp){this._nsp=new com.ibm.mm.enabler.model.state.NavigationStateProcessorImpl();}return this._nsp;}});com.ibm.mashups.enabler.model.state.NavigationStateProcessorFactory=new com.ibm.mm.enabler.model.state.NavigationStateProcessorFactoryImpl();}if(!dojo._hasResource["com.ibm.mashups.enabler.model.state.NavigationStateNode_API"]){dojo._hasResource["com.ibm.mashups.enabler.model.state.NavigationStateNode_API"]=true;dojo.provide("com.ibm.mashups.enabler.model.state.NavigationStateNode_API");dojo.provide("com.ibm.mashups.enabler.model.state.NavigationStateNode");dojo.declare("com.ibm.mashups.enabler.model.state.NavigationStateNode",com.ibm.mashups.enabler.Identifiable,{get:function(){},set:function(_89a){}});}if(!dojo._hasResource["com.ibm.mashups.enabler.model.state.NavigationStateNode"]){dojo._hasResource["com.ibm.mashups.enabler.model.state.NavigationStateNode"]=true;dojo.provide("com.ibm.mashups.enabler.model.state.NavigationStateNode");}if(!dojo._hasResource["com.ibm.mm.enabler.model.state.NavigationStateNodeImpl"]){dojo._hasResource["com.ibm.mm.enabler.model.state.NavigationStateNodeImpl"]=true;dojo.provide("com.ibm.mm.enabler.model.state.NavigationStateNodeImpl");dojo.declare("com.ibm.mm.enabler.model.state.NavigationStateNodeImpl",[com.ibm.mashups.enabler.model.state.NavigationStateNode],{constructor:function(_89b,key,_89c,id,ref){this.model=_89b;this.key=key;this.value=_89c;if(id){this.id=id;}if(ref){this.ref=ref;}},setID:function(id){this.id=id;},setRef:function(ref){this.ref=ref;},getID:function(){return this.id;},getRef:function(){return this.ref;},getKey:function(){return this.key;},getValue:function(){return this.value;},get:function(){return dojo.clone(this._ref);},set:function(_89d){this.ref=_89d;this.model.setDirty(true);}});}if(!dojo._hasResource["com.ibm.mm.enabler.model.state.NavigationStateModelImpl"]){dojo._hasResource["com.ibm.mm.enabler.model.state.NavigationStateModelImpl"]=true;dojo.provide("com.ibm.mm.enabler.model.state.NavigationStateModelImpl");dojo.declare("com.ibm.mm.enabler.model.state.NavigationStateModelImpl",[com.ibm.mashups.enabler.model.state.NavigationStateModel],{DELIMITER:"#",ROOT:"ROOT",DELETE_TOKEN:"DELETE_TOKEN",VALUE:"value",PARAMS:"params",constructor:function(_89e){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.bIsLoggable=this.LOGGER.isLoggable(this.LOG_LEVEL);this.processor=com.ibm.mashups.enabler.model.state.NavigationStateProcessorFactory.getProcessor();if(_89e){this._state=_89e;this._rootNode=new com.ibm.mm.enabler.model.state.NavigationStateNodeImpl(this,this.ROOT,this._state,this.ROOT,this._state);this._loaded=true;}else{dojo.back.setInitialState({back:this._loadCurrentPage,forward:this._loadCurrentPage});this._loaded=false;var _89f=this._getBaseUrl();this.processor.decode(_89f,dojo.hitch(this,"_preprocess"));}this._sync=true;},_getBaseUrl:function(){var _8a0=dojo.query("base");var _8a1=null;if(_8a0&&_8a0.length>0){var hash=dojo.hash();_8a1=_8a0[0].href+(hash!==""?"#"+hash:"");}else{_8a1=window.location.href;}return _8a1;},_getUniqueWid:function(wid){return dojo.isFunction(this.processor.encodeWidgetIdentifier)?this.processor.encodeWidgetIdentifier(wid,this):wid;},_refreshPage:function(){var cb=function(url){if(url){top.location.href=url;}};var _8a2=com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel();com.ibm.mashups.enabler.model.state.UrlGeneratorFactory.getURLGenerator().getUrl(_8a2,cb,{nohash:"true"});},_getFullUrl:function(cb,_8a3){return this.processor.generateURL(this._state,cb,_8a3,this);},clone:function(){var _8a4=dojo.clone(this._state);return new com.ibm.mm.enabler.model.state.NavigationStateModelImpl(_8a4);},_preprocess:function(_8a5){if(this.bIsLoggable){this.LOGGER.entering("_preprocess");if(_8a5){this.LOGGER.trace("_preprocess","state:"+dojo.toJson(_8a5));}}this.processor.preprocess(_8a5,dojo.hitch(this,"_initializeState"));},_initialize:function(){var _8a6=this._getBaseUrl();this.processor.decode(_8a6,dojo.hitch(this,"_preprocess"));},_initializeState:function(_8a7){if(this.bIsLoggable){this.LOGGER.entering("_initializeState");if(_8a7){this.LOGGER.trace("_initializeState","state:"+dojo.toJson(_8a7));}}this._state=_8a7;this._stateInternal=dojo.clone(_8a7);this._rootNode=new com.ibm.mm.enabler.model.state.NavigationStateNodeImpl(this,this.ROOT,this._state,this.ROOT,this._state);this._isDirty=false;this._isTransactionDirty=false;this._isTransaction=false;this._loaded=true;},_postprocess:function(_8a8,_8a9){if(this._isDirty&&(!this._pagemode||(this._pagemode&&this._pagemode!="unload"&&this._pagemode!="edit"))){this.processor.encode(_8a8,dojo.hitch(this,"_finishCommit"),this._stateInternal,_8a9,this);}else{if(this._deferred){this._deferred.finish(null,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK);delete this._deferred;}}},_loadCurrentPage:function(){var nsm=com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel();nsm._initialize();var _8aa=com.ibm.mashups.services.ServiceManager.getService("eventService");_8aa.publishEvent(nsm.ONNAVSTATEUPDATED);},_finishCommit:function(_8ab,_8ac,_8ad){try{var _8ae=window.location.hash.substring(1);if(_8ac&&_8ac.addToHistory){if(_8ab&&_8ae!=_8ab){dojo.back.addToHistory({back:this._loadCurrentPage,forward:this._loadCurrentPage,changeUrl:_8ab});}}}catch(e){this.LOGGER.warning("_finishCommit","failed to update window.location.href error:"+e.message+" length of fragment:"+_8ab.length);}if(this._isDirty){var _8af=com.ibm.mashups.services.ServiceManager.getService("eventService");_8af.publishEvent(this.ONNAVSTATEUPDATED);}this._isDirty=false;this._removeDirty(this._state);this._stateInternal=dojo.clone(this._state);if(_8ac&&_8ac.allowRedirect&&_8ad&&_8ad.doRedirect&&!this._sync){this._refreshPage();}else{if(this._deferred){this._deferred.finish(null,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK);delete this._deferred;}}},_removeDirty:function(obj){for(var i in obj){if(Object.prototype.hasOwnProperty.call(obj,i)){if(i.params&&i.params._isDirty){i.params._isDirty=false;if(i.value&&i.value==this.DELETE_TOKEN){obj[i]=null;delete obj[i];}}if(obj[i]&&!dojo.isString(obj[i])){this._removeDirty(obj[i]);}}}},setDirty:function(_8b0){this._isDirty=_8b0;},isDirty:function(){return this._isDirty;},_find:function(id){id=id||null;if(!id){return null;}if(id==this.ROOT){return this._rootNode;}else{var _8b1=this._findReference(id)||null;if(_8b1){var _8b2=new com.ibm.mm.enabler.model.state.NavigationStateNodeImpl(this);_8b2.setID(id);_8b2.setRef(_8b1);return _8b2;}}return null;},create:function(_8b3){var key=_8b3.key?_8b3.key:null;var _8b4=_8b3.value?_8b3.value:null;var _8b5=new com.ibm.mm.enabler.model.state.NavigationStateNodeImpl(this,key,_8b4);return _8b5;},insert:function(_8b6,_8b7){var _8b8=_8b7.getRef();var key=_8b6.getKey();var _8b9=_8b6.getValue()||null;if(!_8b9){_8b9={};}var _8ba=_8b7.getID();_8b8[key]=_8b9;return;},_getIndex:function(_8bb){var _8bc=0;for(var i in _8bb){if(Object.prototype.hasOwnProperty.call(_8bb,i)){_8bc++;}}return _8bc;},remove:function(_8bd){var id=_8bd.getID();var arr=id.split("#");if(arr.length==1){if(this._state[id]){delete this._state[id];}}if(arr.length>1){var key=id.substring(id.lastIndexOf("#")+1);var _8be=id.substring(0,id.lastIndexOf("#"));var _8bf=this._find(_8be);if(_8bf){var ref=_8bf.getRef();if(ref[key]){delete ref[key];}}}return;},_getRoot:function(){return this._rootNode;},_findReference:function(id){if(id==this.ROOT){return this._state;}var _8c0=false;var arr=id.split("#");var node=this._state;if(!node){return null;}for(var i in arr){if(Object.prototype.hasOwnProperty.call(arr,i)){var j=arr[i];_8c0=false;if(this._findMatch(node,j)){node=node[j];_8c0=true;}else{break;}}}if(!_8c0){return null;}return node;},_findMatch:function(node,key){if(node[key]){return true;}return false;},commit:function(_8c1){return new com.ibm.mm.enabler.DeferredImpl(this,this._commit,_8c1);},_commit:function(_8c2,sync,_8c3){this._deferred=_8c2;this._sync=sync;if(_8c3&&_8c3.allowRedirect&&this._sync){this.LOGGER.warning("_commit","additionalParams.allowRedirect set to true will be ignored since sync is true. The page will not be refreshed");}this._processShareableParameters();if(this._isDirty&&(!this._pagemode||(this._pagemode&&this._pagemode!="edit"))){this._isTransactionDirty=true;this.processor.postprocess(this._state,dojo.hitch(this,this._postprocess),this._stateInternal,_8c3);}else{_8c2.finish(null,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK);}},_processShareableParameters:function(){var _8c4=this._state.sparams;if(!_8c4){return;}var _8c5=null;for(var i in _8c4){if(Object.prototype.hasOwnProperty.call(_8c4,i)){var _8c6={};_8c6.itemSetName=i;var _8c7=[];for(var _8c8 in _8c4[i]){if(Object.prototype.hasOwnProperty.call(_8c4[i],_8c8)){var _8c9=_8c4[i][_8c8].value;for(var j in _8c9){if(Object.prototype.hasOwnProperty.call(_8c9,j)){var _8ca=_8c9[j].params;if(_8ca&&_8ca._isDirty){_8c7.push(_8ca._change);if(_8c9[j].value==this.DELETE_TOKEN){_8c9[j]=null;delete _8c9[j];}else{_8c9[j].params=null;delete _8c9[j].params;}}}}if(_8c7.length>0){_8c6.changes=_8c7;if(_8c4[i][_8c8].params&&_8c4[i][_8c8].params._listeners){var _8cb=_8c4[i][_8c8].params._listeners;for(var t in _8cb){if(Object.prototype.hasOwnProperty.call(_8cb,t)){_8cb[t](_8c6);}}}}}}}}},discard:function(){this._state=dojo.clone(this._stateInternal);this._rootNode=new com.ibm.mm.enabler.model.state.NavigationStateNodeImpl(this,this.ROOT,this._state,this.ROOT,this._state);this._isDirty=false;},_getPageMode:function(){if(!this._pagemode){return null;}return this._pagemode;},_setPageMode:function(_8cc){if(_8cc){this._pagemode=_8cc;}},dispose:function(){this._state={};this._stateInternal={};this._rootNode=new com.ibm.mm.enabler.model.state.NavigationStateNodeImpl(this,this.ROOT,this._state,this.ROOT,this._state);this._isDirty=false;this._loaded=true;this.processor.dispose();},startTransaction:function(){if(this.isTransaction()){return;}this.discard();this._isTransaction=true;this._isTransactionDirty=false;this._transactionRollbackState=dojo.clone(this._state);var _8cd=null;if(this._state){_8cd=this._state.wparams;}if(_8cd){var _8ce=com.ibm.mashups.enabler.services.IdentificationService;var id;for(id in _8cd){if(!_8ce.isServerID(id)){delete _8cd[id];}}}},commitTransaction:function(){if(this.isTransaction()){this._isTransaction=false;if(this._isTransactionDirty){this.discard();this._stateInternal=this._transactionRollbackState;this._transactionRollbackState=null;this._isDirty=true;this.processor.postprocess(this._state,dojo.hitch(this,this._postprocess),this._stateInternal);this._isTransactionDirty=false;}}return;},discardTransaction:function(){if(this.isTransaction()){if(this._isTransactionDirty){this.discard();if(!(typeof this._transactionRollbackState=="undefined")){var trs=this._transactionRollbackState;var s=this._state;if(s){if(s.pid){trs.pid=dojo.clone(s.pid);}if(s.sid){trs.sid=dojo.clone(s.sid);}if(s.pageselection){trs.pageselection=dojo.clone(s.pageselection);}}this._state=this._transactionRollbackState;this._rootNode=new com.ibm.mm.enabler.model.state.NavigationStateNodeImpl(this,this.ROOT,this._state,this.ROOT,this._state);this._transactionRollbackState=null;this._isDirty=true;this.processor.postprocess(this._state,dojo.hitch(this,this._postprocess),this._stateInternal);}this._isTransactionDirty=false;}this._isTransaction=false;}return;},isTransaction:function(){if(typeof this._isTransaction=="undefined"){this._isTransaction=false;}return this._isTransaction;},_generateListenerId:function(){if(!this._listenerCounter){this._listenerCounter=1;}else{this._listenerCounter++;}return this._listenerCounter;}});dojo.back.init();}if(!dojo._hasResource["com.ibm.mashups.enabler.model.state.NavigationStateModel"]){dojo._hasResource["com.ibm.mashups.enabler.model.state.NavigationStateModel"]=true;dojo.provide("com.ibm.mashups.enabler.model.state.NavigationStateModel");}if(!dojo._hasResource["com.ibm.mashups.enabler.model.state.NavigationStateModelFactory_API"]){dojo._hasResource["com.ibm.mashups.enabler.model.state.NavigationStateModelFactory_API"]=true;dojo.provide("com.ibm.mashups.enabler.model.state.NavigationStateModelFactory_API");dojo.provide("com.ibm.mashups.enabler.model.state.NavigationStateModelFactory");dojo.declare("com.ibm.mashups.enabler.model.state.NavigationStateModelFactory",null,{getNavigationStateModel:function(){}});}if(!dojo._hasResource["com.ibm.mm.enabler.model.state.NavigationStateModelFactoryImpl"]){dojo._hasResource["com.ibm.mm.enabler.model.state.NavigationStateModelFactoryImpl"]=true;dojo.provide("com.ibm.mm.enabler.model.state.NavigationStateModelFactoryImpl");dojo.declare("com.ibm.mm.enabler.model.state.NavigationStateModelFactoryImpl",[com.ibm.mashups.enabler.model.state.NavigationStateModelFactory],{constructor:function(){},getNavigationStateModel:function(_8cf){if(!this.navigationstatemodel){this.navigationstatemodel=new com.ibm.mm.enabler.model.state.NavigationStateModelImpl(_8cf);}return this.navigationstatemodel;}});com.ibm.mashups.enabler.model.state.NavigationStateModelFactory=new com.ibm.mm.enabler.model.state.NavigationStateModelFactoryImpl();}if(!dojo._hasResource["com.ibm.mashups.enabler.model.state.NavigationStateModelFactory"]){dojo._hasResource["com.ibm.mashups.enabler.model.state.NavigationStateModelFactory"]=true;dojo.provide("com.ibm.mashups.enabler.model.state.NavigationStateModelFactory");}if(!dojo._hasResource["com.ibm.mashups.enabler.model.state.UrlGenerator_API"]){dojo._hasResource["com.ibm.mashups.enabler.model.state.UrlGenerator_API"]=true;dojo.provide("com.ibm.mashups.enabler.model.state.UrlGenerator_API");dojo.provide("com.ibm.mashups.enabler.model.state.UrlGenerator");dojo.declare("com.ibm.mashups.enabler.model.state.UrlGenerator",null,{getUrl:function(_8d0,_8d1,_8d2){},getURL:function(_8d3,_8d4,_8d5){}});}if(!dojo._hasResource["com.ibm.mm.enabler.model.state.UrlGeneratorImpl"]){dojo._hasResource["com.ibm.mm.enabler.model.state.UrlGeneratorImpl"]=true;dojo.provide("com.ibm.mm.enabler.model.state.UrlGeneratorImpl");dojo.declare("com.ibm.mm.enabler.model.state.UrlGeneratorImpl",com.ibm.mashups.enabler.model.state.UrlGenerator,{constructor:function(){},getUrl:function(_8d6,_8d7,_8d8){return this.getURL(_8d6,_8d7,_8d8);},getURL:function(_8d9,_8da,_8db){if(!_8d9){return null;}var _8dc=_8d9.clone();return _8dc._getFullUrl(_8da,_8db);}});}if(!dojo._hasResource["com.ibm.mashups.enabler.model.state.UrlGenerator"]){dojo._hasResource["com.ibm.mashups.enabler.model.state.UrlGenerator"]=true;dojo.provide("com.ibm.mashups.enabler.model.state.UrlGenerator");}if(!dojo._hasResource["com.ibm.mashups.enabler.model.state.UrlGeneratorFactory_API"]){dojo._hasResource["com.ibm.mashups.enabler.model.state.UrlGeneratorFactory_API"]=true;dojo.provide("com.ibm.mashups.enabler.model.state.UrlGeneratorFactory_API");dojo.provide("com.ibm.mashups.enabler.model.state.UrlGeneratorFactory");dojo.declare("com.ibm.mashups.enabler.model.state.UrlGeneratorFactory",null,{getUrlGenerator:function(){},getURLGenerator:function(){}});}if(!dojo._hasResource["com.ibm.mm.enabler.model.state.UrlGeneratorFactoryImpl"]){dojo._hasResource["com.ibm.mm.enabler.model.state.UrlGeneratorFactoryImpl"]=true;dojo.provide("com.ibm.mm.enabler.model.state.UrlGeneratorFactoryImpl");dojo.declare("com.ibm.mm.enabler.model.state.UrlGeneratorFactoryImpl",com.ibm.mashups.enabler.model.state.UrlGeneratorFactory,{constructor:function(){this._urlGenerator=new com.ibm.mm.enabler.model.state.UrlGeneratorImpl();},getUrlGenerator:function(){return this.getURLGenerator();},getURLGenerator:function(){return this._urlGenerator;}});com.ibm.mashups.enabler.model.state.UrlGeneratorFactory=new com.ibm.mm.enabler.model.state.UrlGeneratorFactoryImpl();}if(!dojo._hasResource["com.ibm.mashups.enabler.model.state.UrlGeneratorFactory"]){dojo._hasResource["com.ibm.mashups.enabler.model.state.UrlGeneratorFactory"]=true;dojo.provide("com.ibm.mashups.enabler.model.state.UrlGeneratorFactory");}if(!dojo._hasResource["com.ibm.mashups.enabler.strategy.HiddenMetaDataLoadingStrategy"]){dojo._hasResource["com.ibm.mashups.enabler.strategy.HiddenMetaDataLoadingStrategy"]=true;dojo.provide("com.ibm.mashups.enabler.strategy.HiddenMetaDataLoadingStrategy");dojo.declare("com.ibm.mashups.enabler.strategy.HiddenMetaDataLoadingStrategy",com.ibm.mashups.enabler.strategy.Strategy,{constructor:function(_8dd){this.names=_8dd;},getHiddenMetaDataToLoad:function(){return this.names;}});}if(!dojo._hasResource["com.ibm.mashups.enabler.strategy.ListLoadAheadStrategy"]){dojo._hasResource["com.ibm.mashups.enabler.strategy.ListLoadAheadStrategy"]=true;dojo.provide("com.ibm.mashups.enabler.strategy.ListLoadAheadStrategy");dojo.declare("com.ibm.mashups.enabler.strategy.ListLoadAheadStrategy",com.ibm.mashups.enabler.strategy.Strategy,{constructor:function(_8de){this.interval=_8de;},getInterval:function(){return this.interval;}});}if(!dojo._hasResource["com.ibm.mashups.enabler.strategy.NavigationDeletionStrategy"]){dojo._hasResource["com.ibm.mashups.enabler.strategy.NavigationDeletionStrategy"]=true;dojo.provide("com.ibm.mashups.enabler.strategy.NavigationDeletionStrategy");dojo.declare("com.ibm.mashups.enabler.strategy.NavigationDeletionStrategy",com.ibm.mashups.enabler.strategy.Strategy,{isDeleteContentByID:function(node,_8df){return node.getID()!=_8df;}});}if(!dojo._hasResource["com.ibm.mashups.enabler.strategy.NavigationUpdateStrategy"]){dojo._hasResource["com.ibm.mashups.enabler.strategy.NavigationUpdateStrategy"]=true;dojo.provide("com.ibm.mashups.enabler.strategy.NavigationUpdateStrategy");dojo.declare("com.ibm.mashups.enabler.strategy.NavigationUpdateStrategy",com.ibm.mashups.enabler.strategy.Strategy,{constructor:function(_8e0){this._URLUpdateParameterValue=_8e0;},getURLUpdateParameterValue:function(){return this._URLUpdateParameterValue;}});}if(!dojo._hasResource["com.ibm.mashups.enabler.strategy.SyncMetaDataStrategy"]){dojo._hasResource["com.ibm.mashups.enabler.strategy.SyncMetaDataStrategy"]=true;dojo.provide("com.ibm.mashups.enabler.strategy.SyncMetaDataStrategy");dojo.declare("com.ibm.mashups.enabler.strategy.SyncMetaDataStrategy",com.ibm.mashups.enabler.strategy.Strategy,{});}if(!dojo._hasResource["com.ibm.mashups.enabler.strategy.TreeLoadAheadStrategy"]){dojo._hasResource["com.ibm.mashups.enabler.strategy.TreeLoadAheadStrategy"]=true;dojo.provide("com.ibm.mashups.enabler.strategy.TreeLoadAheadStrategy");dojo.declare("com.ibm.mashups.enabler.strategy.TreeLoadAheadStrategy",com.ibm.mashups.enabler.strategy.Strategy,{constructor:function(_8e1,_8e2){this.parentLevel=_8e1;this.childrenLevel=_8e2;},getChildrenLevel:function(){return this.childrenLevel;},getParentLevel:function(){return this.parentLevel;}});}if(!dojo._hasResource["com.ibm.mashups.enabler.utils.EventTransformer_API"]){dojo._hasResource["com.ibm.mashups.enabler.utils.EventTransformer_API"]=true;dojo.provide("com.ibm.mashups.enabler.utils.EventTransformer_API");dojo.provide("com.ibm.mashups.enabler.utils.EventTransformer");dojo.declare("com.ibm.mashups.enabler.utils.EventTransformer",null,{isTransformable:function(_8e3,_8e4,_8e5){}});}if(!dojo._hasResource["com.ibm.mm.data.datatypes"]){dojo._hasResource["com.ibm.mm.data.datatypes"]=true;dojo.provide("com.ibm.mm.data.datatypes");dojo.declare("com.ibm.mm.data.datatypes",null,{_alltypes:{"text":1,"url":1,"html":1,"image":1,"number":1,"countrycode":1,"languagecode":1,"currency":1,"boolean":1,"date":1,"time":1,"timestamp":1,"email":1,"postalcode":1,"phone":1,"address":1,"person":1,"table":1,"atom":1,"xml":1,"json":1,"modeldata":1,"xsd:string":1,"xsd:boolean":1,"xsd:decimal":1,"xsd:float":1,"xsd:double":1,"xsd:duration":1,"xsd:datetime":1,"xsd:time":1,"xsd:date":1,"xsd:gyearmonth":1,"xsd:gyear":1,"xsd:gmonthday":1,"xsd:gday":1,"xsd:gmonth":1,"xsd:hexbinary":1,"xsd:base64binary":1,"xsd:anyuri":1,"xsd:qname":1,"xsd:notation":1,"js:string":1,"js:number":1,"js:date":1,"js:boolean":1},_simpleTypes:{"text":1,"url":1,"html":1,"image":1,"number":1,"countrycode":1,"languagecode":1,"currency":1,"boolean":1,"date":1,"time":1,"timestamp":1,"email":1,"postalcode":1,"phone":1,"address":1,"person":1,"xsd:string":1,"xsd:boolean":1,"xsd:decimal":1,"xsd:float":1,"xsd:double":1,"xsd:duration":1,"xsd:datetime":1,"xsd:time":1,"xsd:date":1,"xsd:gyearmonth":1,"xsd:gyear":1,"xsd:gmonthday":1,"xsd:gday":1,"xsd:gmonth":1,"xsd:hexbinary":1,"xsd:base64binary":1,"xsd:anyuri":1,"xsd:qname":1,"xsd:notation":1,"js:string":1,"js:number":1,"js:date":1,"js:boolean":1},_complexTypes:{"table":1,"atom":1,"xml":1,"json":1,"modeldata":1},specialTypes:{"mashupdata":1},_mappings:{text:{"url":1,"html":1,"number":1,"countrycode":1,"languagecode":1,"currency":1,"boolean":1,"date":1,"time":1,"timestamp":1,"email":1,"postalcode":1,"phone":1,"address":1,"person":1,"xsd:string":1,"xsd:boolean":1,"xsd:decimal":1,"xsd:float":1,"xsd:double":1,"xsd:duration":1,"xsd:datetime":1,"xsd:time":1,"xsd:date":1,"xsd:gyearmonth":1,"xsd:gyear":1,"xsd:gmonthday":1,"xsd:gday":1,"xsd:gmonth":1,"xsd:hexbinary":1,"xsd:base64binary":1,"xsd:anyuri":1,"xsd:qname":1,"xsd:notation":1,"js:string":1,"js:number":1,"js:date":1,"js:boolean":1},"url":{"xsd:anyuri":1,"text":1,"xsd:string":1,"js:string":1},"html":{"text":1,"xsd:string":1,"js:string":1},"image":{},"number":{"xsd:decimal":1,"xsd:float":1,"xsd:double":1,"js:number":1,"text":1,"xsd:string":1,"js:string":1},"countrycode":{"text":1,"xsd:string":1,"js:string":1},"languagecode":{"text":1,"xsd:string":1,"js:string":1},"currency":{"text":1,"xsd:string":1,"js:string":1},"boolean":{"xsd:boolean":1,"js:boolean":1,"text":1,"xsd:string":1,"js:string":1},"date":{"timestamp":1,"xsd:date":1,"js:date":1,"text":1,"xsd:string":1,"js:string":1},"time":{"timestamp":1,"xsd:time":1,"text":1,"xsd:string":1,"js:string":1},"timestamp":{"date":1,"time":1,"xsd:datetime":1,"text":1,"xsd:string":1,"js:string":1},"email":{"text":1,"xsd:string":1,"js:string":1},"postalcode":{"text":1,"xsd:string":1,"js:string":1},"phone":{"text":1,"xsd:string":1,"js:string":1},"address":{"text":1,"xsd:string":1,"js:string":1},"person":{"text":1,"xsd:string":1,"js:string":1},"json":{},"xsd:string":{"text":1,"url":1,"html":1,"number":1,"countrycode":1,"languagecode":1,"currency":1,"boolean":1,"date":1,"time":1,"timestamp":1,"email":1,"postalcode":1,"phone":1,"address":1,"person":1,"xsd:boolean":1,"xsd:decimal":1,"xsd:float":1,"xsd:double":1,"xsd:duration":1,"xsd:datetime":1,"xsd:time":1,"xsd:date":1,"xsd:gyearmonth":1,"xsd:gyear":1,"xsd:gmonthday":1,"xsd:gday":1,"xsd:gmonth":1,"xsd:hexbinary":1,"xsd:base64binary":1,"xsd:anyuri":1,"xsd:qname":1,"xsd:notation":1,"js:string":1,"js:number":1,"js:date":1,"js:boolean":1},"xsd:boolean":{"boolean":1,"js:boolean":1,"text":1,"xsd:string":1,"js:string":1},"xsd:decimal":{"number":1,"js:number":1,"text":1,"xsd:string":1,"js:string":1},"xsd:float":{"number":1,"js:number":1,"text":1,"xsd:string":1,"js:string":1},"xsd:double":{"number":1,"js:number":1,"text":1,"xsd:string":1,"js:string":1},"xsd:duration":{"text":1,"xsd:string":1,"js:string":1},"xsd:gmonthday":{"text":1,"xsd:string":1,"js:string":1},"xsd:gday":{"text":1,"xsd:string":1,"js:string":1},"xsd:gmonth":{"text":1,"xsd:string":1,"js:string":1},"xsd:hexbinary":{"text":1,"xsd:string":1,"js:string":1},"xsd:base64binary":{"text":1,"xsd:string":1,"js:string":1},"xsd:qname":{"text":1,"xsd:string":1,"js:string":1},"xsd:notation":{"text":1,"xsd:string":1,"js:string":1},"xsd:anyuri":{"url":1,"text":1,"xsd:string":1,"js:string":1},"xsd:time":{"time":1,"text":1,"xsd:string":1,"js:string":1},"xsd:date":{"date":1,"js:date":1,"text":1,"xsd:string":1,"js:string":1},"xsd:datetime":{"timestamp":1,"text":1,"xsd:string":1,"js:string":1},"xsd:gyear":{"date":1,"text":1,"xsd:string":1,"js:string":1},"xsd:gyearmonth":{"date":1,"text":1,"xsd:string":1,"js:string":1},"js:string":{"text":1,"url":1,"html":1,"number":1,"countrycode":1,"languagecode":1,"currency":1,"boolean":1,"date":1,"time":1,"timestamp":1,"email":1,"postalcode":1,"phone":1,"address":1,"person":1,"xsd:string":1,"xsd:boolean":1,"xsd:decimal":1,"xsd:float":1,"xsd:double":1,"xsd:duration":1,"xsd:datetime":1,"xsd:time":1,"xsd:date":1,"xsd:gyearmonth":1,"xsd:gyear":1,"xsd:gmonthday":1,"xsd:gday":1,"xsd:gmonth":1,"xsd:hexbinary":1,"xsd:base64binary":1,"xsd:anyuri":1,"xsd:qname":1,"xsd:notation":1,"js:number":1,"js:date":1,"js:boolean":1},"js:date":{"date":1,"xsd:date":1,"text":1,"xsd:string":1,"js:string":1},"js:number":{"xsd:decimal":1,"xsd:float":1,"xsd:double":1,"number":1,"text":1,"xsd:string":1,"js:string":1},"js:boolean":{"xsd:boolean":1,"boolean":1,"text":1,"xsd:string":1,"js:string":1}},_semanticMappings:{text:{"xsd:string":1,"js:string":1},"url":{"xsd:anyuri":1},"html":{},"image":{},"number":{"xsd:decimal":1,"xsd:float":1,"xsd:double":1,"js:number":1},"countrycode":{},"languagecode":{},"currency":{},"boolean":{"xsd:boolean":1,"js:boolean":1},"date":{"xsd:date":1,"js:date":1},"time":{"xsd:time":1},"timestamp":{"xsd:datetime":1},"email":{},"postalcode":{},"phone":{},"address":{},"person":{},"json":{},"xsd:string":{"text":1,"js:string":1},"xsd:boolean":{"boolean":1,"js:boolean":1},"xsd:decimal":{"number":1,"js:number":1},"xsd:float":{"number":1,"js:number":1},"xsd:double":{"number":1,"js:number":1},"xsd:duration":{},"xsd:gmonthday":{},"xsd:gday":{},"xsd:gmonth":{},"xsd:hexbinary":{},"xsd:base64binary":{},"xsd:qname":{},"xsd:notation":{},"xsd:anyuri":{"url":1},"xsd:time":{"time":1},"xsd:date":{"date":1,"js:date":1},"xsd:datetime":{"timestamp":1},"xsd:gyear":{"date":1},"xsd:gyearmonth":{"date":1},"js:string":{"text":1,"xsd:string":1},"js:date":{"date":1,"xsd:date":1},"js:number":{"xsd:decimal":1,"xsd:float":1,"xsd:double":1,"number":1},"js:boolean":{"xsd:boolean":1,"boolean":1}},_SIMPLE_DATA_TYPE:1,_COMBINED_DATA_TYPE:2,_COMPLEX_DATA_TYPE:3,resourceBundle:null,constructor:function(_8e6){this.resourceBundle=dojo.i18n.getLocalization("com.ibm.mm.data","dataTypeStrings");this.xsdNS=com.ibm.mm.enabler.model.NameSpaceFactory.getNameSpaceUri(com.ibm.mm.enabler.model.NameSpaceFactory.NS_XSD);this.nsNS=com.ibm.mm.enabler.model.NameSpaceFactory.getNameSpaceUri(com.ibm.mm.enabler.model.NameSpaceFactory.NS_EVENT_DATATYPES);this.jsNS=com.ibm.mm.enabler.model.NameSpaceFactory.getNameSpaceUri(com.ibm.mm.enabler.model.NameSpaceFactory.NS_JS);this.xsdPrefix="xsd:";this.nsPrefix="";this.jsPrefix="js:";},addDataType:function(_8e7,_8e8){if(!_8e7){return;}this._alltypes.typename=1;if(!_8e8||_8e8==this._SIMPLE_DATA_TYPE){this._simpleTypes.typename=1;}else{this._complexTypes.typename=1;}},removeDataType:function(_8e9){delete this._alltypes[_8e9];},addDataMapping:function(_8ea,_8eb){if(this._mappings.typename1===null){this._mappings.typename1={};}this._mappings[_8ea][_8eb]=1;},removeDataMapping:function(_8ec,_8ed){if(this._mappings[_8ec]!==null){if(this._mappings[_8ec][_8ed]!==null){delete this._mappings[_8ec][_8ed];}}},getAllTypes:function(){return dojo.clone(this._alltypes);},doesTypeMatch:function(_8ee,_8ef){var _8f0=false;if(!_8ee||!_8ef){return _8f0;}_8ee=_8ee.toLowerCase();_8ef=_8ef.toLowerCase();if(_8ee==_8ef||_8ee=="any"||_8ef=="any"){_8f0=true;}else{var _8f1=this.checkDataType(_8ee);switch(_8f1){case this._SIMPLE_DATA_TYPE:var _8f2=this.checkDataType(_8ef);switch(_8f2){case this._SIMPLE_DATA_TYPE:if(this._mappings[_8ee][_8ef]==1){_8f0=true;}break;case this._COMBINED_DATA_TYPE:var _8f3=this.getMainType(_8ef);if(_8ee==_8f3||this._mappings[_8ee][_8f3]==1){_8f0=true;}break;default:break;}break;case this._COMBINED_DATA_TYPE:break;case this._COMPLEX_DATA_TYPE:break;default:break;}}return _8f0;},doesTypeFlexMatch:function(_8f4,_8f5,_8f6){var _8f7=false;if(_8f4===null||_8f5===null){return _8f7;}if((_8f6===null)||(typeof _8f6=="undefined")){_8f6=true;}_8f4=this.getNormalizedPayload(_8f4);_8f5=this.getNormalizedPayload(_8f5);_8f4=_8f4.toLowerCase();_8f5=_8f5.toLowerCase();if(_8f4==_8f5||_8f4=="any"||_8f5=="any"){_8f7=true;}else{var _8f8=this.checkDataType(_8f4);var _8f9,_8fa;switch(_8f8){case this._SIMPLE_DATA_TYPE:_8f9=this.checkDataType(_8f5);switch(_8f9){case this._SIMPLE_DATA_TYPE:if(_8f6){if(this._mappings[_8f4][_8f5]==1){_8f7=true;}}else{if(this._semanticMappings[_8f4][_8f5]==1){_8f7=true;}}break;case this._COMBINED_DATA_TYPE:_8fa=this.getMainType(_8f5);if(_8f6){if(_8f4==_8fa||this._mappings[_8f4][_8fa]==1){_8f7=true;}}else{if(_8f4==_8fa||this._semanticMappings[_8f4][_8fa]==1){_8f7=true;}}break;default:break;}break;case this._COMBINED_DATA_TYPE:_8f9=this.checkDataType(_8f5);var _8fb=this.getMainType(_8f4);switch(_8f9){case this._SIMPLE_DATA_TYPE:if(_8f6){if(_8fb==_8f5||this._mappings[_8fb][_8f5]==1){_8f7=true;}}else{if(_8fb==_8f5||this._semanticMappings[_8fb][_8f5]==1){_8f7=true;}}break;case this._COMBINED_DATA_TYPE:_8fa=this.getMainType(_8f5);if(_8fb==_8fa||this._mappings[_8fb][_8fa]==1){_8f7=true;}break;default:break;}break;default:break;}}return _8f7;},getMainType:function(_8fc){var _8fd=_8fc.indexOf(".");if(_8fd<0){return _8fc;}else{return _8fc.substring(0,_8fd);}},checkDataType:function(_8fe){_8fe=_8fe.toLowerCase();var _8ff=_8fe.split(".");if(_8ff.length==1){if(this._simpleTypes[_8fe]==1){return this._SIMPLE_DATA_TYPE;}else{return this._COMPLEX_DATA_TYPE;}}else{if(_8ff.length==2||_8ff.length==3){var _900=_8ff[0];var _901=_8ff[_8ff.length-1];if(_900=="url"||_901=="languagecode"||_901=="countrycode"){return this._COMBINED_DATA_TYPE;}else{return this._COMPLEX_DATA_TYPE;}}else{return this._COMPLEX_DATA_TYPE;}}},getTypeLabel:function(_902,_903){_902=_902.toLowerCase();var _904=_902;var _905=this.checkDataType(_902);if(_905==this._COMBINED_DATA_TYPE){var _906=_902.indexOf(".");var main=_902.substring(0,_906);var _907=this.getSimpleTypeLabel(main,_903);var sub=_902.substring(_906+1,_902.length);var _908=this.getSimpleTypeLabel(sub,_903);_904=_907+" ("+_908+")";}else{_904=this.getSimpleTypeLabel(_902,_903);}return _904;},getNormalizedPayload:function(_909){var _90a=_909;var _90b=_909;var _90c=_909.indexOf("{");var _90d=_909.indexOf("}");var _90e="";if(_90d>_90c){_90a=_909.substring(_90c+1,_90d);_90b=_909.substring(_90d+1,_909.length);if(_90a===this.xsdNS){_90e=this.xsdPrefix;}else{if(_90a===this.jsNS){_90e=this.jsPrefix;}else{if(_90a===this.nsNS){_90e=this.nsPrefix;}}}_90b=_90e+_90b;}return _90b;},getSimpleTypeLabel:function(_90f,_910){var _911;if(this.resourceBundle[_90f]){_911=this.resourceBundle[_90f];}else{_911=_90f.charAt(0).toUpperCase()+_90f.substring(1);}return _911;}});}if(!dojo._hasResource["com.ibm.mm.enabler.utils.EventTransformerImpl"]){dojo._hasResource["com.ibm.mm.enabler.utils.EventTransformerImpl"]=true;dojo.provide("com.ibm.mm.enabler.utils.EventTransformerImpl");dojo.declare("com.ibm.mm.enabler.utils.EventTransformerImpl",[com.ibm.mashups.enabler.utils.EventTransformer],{constructor:function(){this.dataTypes=new com.ibm.mm.data.datatypes();},_transform:function(_912,_913,_914){var _915=null;if(_912.type==_913.type||_912.type=="any"||_913.type=="any"){_915=new com.ibm.mm.iwidget.IEventImpl(_912.name,_912.type,_912.payload,_912.source);}else{var _916=this.isTransformable(_912,_913,_914);if(_916){var _917=null;switch(_913.type.toLowerCase()){case "time":if(_912.type.toLowerCase()=="xsd:time"){_917=this._xsdTimeToMmTime(_912.payload);}break;case "date":switch(_912.type.toLowerCase()){case "xsd:date":_917=this._xsdDateToMmDate(_912.payload);break;case "js:date":_917=this._jsDateToMmDate(_912.payload);break;}break;case "timestamp":if(_912.type.toLowerCase()=="xsd:datetime"){_917=this._xsdDateTimeToMmTimestamp(_912.payload);}break;case "xsd:time":if(_912.type.toLowerCase()=="time"){_917=this._mmTimeToXsdTime(_912.payload);}break;case "xsd:date":switch(_912.type.toLowerCase()){case "date":_917=this._mmDateToXsdDate(_912.payload);break;case "js:date":_917=this._jsDateToXsdDate(_912.payload);break;}break;case "xsd:datetime":if(_912.type.toLowerCase()=="timestamp"){_917=this._mmTimestampToXsdDatetime(_912.payload);}break;case "js:date":switch(_912.type.toLowerCase()){case "xsd:date":_917=this._xsdDateToJsDate(_912.payload);break;case "date":_917=this._mmDateToJsDate(_912.payload);break;}break;}if(_917!==null){_915=new com.ibm.mm.iwidget.IEventImpl(_912.name,_913.type,_917,_912.source);}else{_915=new com.ibm.mm.iwidget.IEventImpl(_912.name,_913.type,_912.payload,_912.source);}}}return _915;},isTransformable:function(_918,_919,_91a){return this.dataTypes.doesTypeFlexMatch(_918.type,_919.type,_91a);},_mmTimestampToXsdDatetime:function(_91b){var _91c="T";var _91d="-";var _91e=":";var _91f=/^([\d]{4})-([\d]{2})-([\d]{2})\s([\d]{2}):([\d]{2}):([\d]{2})$/;var _920=/^([\d]{4})-([\d]{2})-([\d]{2})\s([\d]{2}):([\d]{2}):([\d]{2})\.([\d]{4})$/;var _921=/^([\d]{4})([\d]{2})([\d]{2})\s([\d]{2})([\d]{2})([\d]{2})$/;var _922=false;_922=_920.test(_91b);if(_922){var _923=_91b.split(new RegExp("[.]{1}"))[0];return _923.replace(/\s/,_91c);}else{_922=_91f.test(_91b);if(_922){return _91b.replace(/\s/,_91c);}else{_922=_921.test(_91b);if(_922){var _924=_921.exec(_91b);var yyyy=_924[1];var _925=_924[2];var dd=_924[3];var hh=_924[4];var _926=_924[5];var ss=_924[6];return yyyy+_91d+_925+_91d+dd+_91c+hh+_91e+_926+_91e+ss;}else{return null;}}}},_mmDateToXsdDate:function(date){var _927="-";var _928="01";var _929="01";var _92a=/^([\d]{4})-([\d]{2})-([\d]{2})$/;var _92b=/^([\d]{4})([\d]{2})([\d]{2})$/;var _92c=/^([\d]{4})([\d]{2})$/;var _92d=/^([\d]{4})$/;var _92e=false;_92e=_92a.test(date);if(_92e){return date;}else{_92e=_92b.test(date);var yyyy,mm,_92f;if(_92e){_92f=_92b.exec(date);yyyy=_92f[1];mm=_92f[2];var dd=_92f[3];return yyyy+_927+mm+_927+dd;}else{_92e=_92c.test(date);if(_92e){_92f=_92c.exec(date);yyyy=_92f[1];mm=_92f[2];return yyyy+_927+mm+_927+_929;}else{_92e=_92d.test(date);if(_92e){_92f=_92d.exec(date);yyyy=_92f[1];return yyyy+_927+_928+_927+_929;}else{return null;}}}}},_mmTimeToXsdTime:function(time){var _930=":";var _931="00";var _932="00";var _933=/^\d{2}\:\d{2}\:\d{2}\.\d{4}$/;var _934=/^\d{2}\:\d{2}\:\d{2}$/;var _935=/^\d{2}\:\d{2}$/;var _936=/^\d{2}$/;var _937=false;_937=_933.test(time);if(_937){return time.split(new RegExp("[.]{1}"))[0];}else{_937=_934.test(time);if(_937){return time;}else{_937=_935.test(time);if(_937){return time+_930+_932;}else{_937=_936.test(time);if(_937){return time+_930+_931+_930+_932;}else{return null;}}}}},_xsdDateTimeToMmTimestamp:function(_938){var _939=" ";var _93a=/^\d{4}\-\d{2}\-\d{2}\T\d{2}\:\d{2}\:\d{2}/;var _93b=false;_93b=_93a.test(_938);if(_93b){var _93c=_938.match(_93a)[0];return _93c.replace(/T/,_939);}else{return null;}},_xsdDateToMmDate:function(date){var _93d=/^\d{4}\-\d{2}\-\d{2}/;var _93e=false;_93e=_93d.test(date);if(_93e){return date.match(_93d)[0];}else{return null;}},_xsdTimeToMmTime:function(time){var _93f=/^\d{2}\:\d{2}\:\d{2}/;var _940=false;_940=_93f.test(time);if(_940){return time.match(_93f)[0];}else{return null;}},_jsDateToMmDate:function(date){if(date){var year=date.getFullYear();var _941=date.getMonth();var day=date.getDate();_941=this._format(_941.toString());day=this._format(day.toString());return year+"-"+_941+"-"+day;}else{return null;}},_jsDateToXsdDate:function(date){var _942=null;if(date){var year=date.getFullYear();var _943=date.getMonth();var day=date.getDate();var _944=date.getTimezoneOffset();_943=this._format(_943.toString());day=this._format(day.toString());_942=year+"-"+_943+"-"+day;if(_944!==0){var _945;var _946;var _947;if(_944<0){_946=Math.ceil(_944/60);_947=(_944*-1)%60;if(_947===0){_945="-"+this._format((_946*-1).toString())+":00";}else{_945="-"+this._format((_946*-1).toString())+this._format(_947);}_942=_942+_945;}else{_946=Math.floor(_944/60);_947=_944%60;if(_947===0){_945="+"+this._format((_946).toString())+":00";}else{_945="+"+this._format((_946).toString())+this._format(_947);}_942=_942+_945;}}}return _942;},_xsdDateToJsDate:function(date){var _948=/^([\d]{4})-(\d\d)-(\d\d)/;var _949=false;_949=_948.test(date);if(_949){var _94a=new Date(NaN);var _94b;var _94c=_948.exec(date);if(_94c){_94b=_94c[2];_94a.setFullYear(_94c[1],_94b-1,_94c[3]);if(_94b!=_94a.getMonth()+1){_94a.setTime(NaN);}}return _94a;}else{return null;}},_mmDateToJsDate:function(date){return this._xsdDateToJsDate(this._mmDateToXsdDate(date));},_format:function(_94d){if(_94d.length==1){_94d="0"+_94d;}return _94d;}});}if(!dojo._hasResource["com.ibm.mashups.enabler.utils.EventTransformer"]){dojo._hasResource["com.ibm.mashups.enabler.utils.EventTransformer"]=true;dojo.provide("com.ibm.mashups.enabler.utils.EventTransformer");}if(!dojo._hasResource["com.ibm.mm.enabler.logging.Trace"]){dojo._hasResource["com.ibm.mm.enabler.logging.Trace"]=true;if(typeof (__trace)=="undefined"){__trace={enter:function(_94e,_94f,args){if((args)&&(args.length==0)){args=null;}com.ibm.mashups.enabler.logging.Logger.getLogger(_94e).entering(_94f,args);},msg:function(_950,_951,msg,args){com.ibm.mashups.enabler.logging.Logger.getLogger(_950).trace(_951,msg,args);},evalFunction:function(js){return "function() {"+js+"}";},evalResult:function(_952,_953,msg){com.ibm.mashups.enabler.logging.Logger.getLogger(_952).trace(_953,msg);},exit:function(_954,_955,_956){com.ibm.mashups.enabler.logging.Logger.getLogger(_954).exiting(_955,_956);},assertFunction:function(_957){return "function() {\t if (!("+_957+")) {\t throw new Error('Assert failed');\t }\t }";}};}}if(!dojo._hasResource["com.ibm.mashups.enabler.widget.Constants_API"]){dojo._hasResource["com.ibm.mashups.enabler.widget.Constants_API"]=true;dojo.provide("com.ibm.mashups.enabler.widget.Constants_API");dojo.provide("com.ibm.mashups.enabler.widget.Constants");dojo.declare("com.ibm.mashups.enabler.widget.Constants",null,{FILTER_HANDLED_EVENTS:"HandledEvents",FILTER_PUBLISHED_EVENTS:"PublishedEvents"});}if(!dojo._hasResource["com.ibm.mm.enabler.widget.Constants"]){dojo._hasResource["com.ibm.mm.enabler.widget.Constants"]=true;dojo.provide("com.ibm.mm.enabler.widget.Constants");dojo.declare("com.ibm.mm.enabler.widget.Constants",com.ibm.mashups.enabler.widget.Constants,{constructor:function(){},PERSISTENCE_MODE_MODEL:"Model",PERSISTENCE_MODE_MODEL_PREFERENCES:"ModelPreferences",PERSISTENCE_MODE_DOM:"DOM"});com.ibm.mashups.enabler.widget.Constants=new com.ibm.mm.enabler.widget.Constants();}if(!dojo._hasResource["com.ibm.mashups.enabler.widget.Constants"]){dojo._hasResource["com.ibm.mashups.enabler.widget.Constants"]=true;dojo.provide("com.ibm.mashups.enabler.widget.Constants");}if(!dojo._hasResource["com.ibm.mashups.iwidget.itemset.PersistentAttributesFactory"]){dojo._hasResource["com.ibm.mashups.iwidget.itemset.PersistentAttributesFactory"]=true;dojo.provide("com.ibm.mashups.iwidget.itemset.PersistentAttributesFactory");dojo.declare("com.ibm.mashups.iwidget.itemset.PersistentAttributesFactory",null,{createPersistentAttributes:function(_958,_959){},getSupportedPersistenceMode:function(){}});}if(!dojo._hasResource["com.ibm.mashups.iwidget.services.PersistentAttributesFactoryService_API"]){dojo._hasResource["com.ibm.mashups.iwidget.services.PersistentAttributesFactoryService_API"]=true;dojo.provide("com.ibm.mashups.iwidget.services.PersistentAttributesFactoryService_API");dojo.provide("com.ibm.mashups.iwidget.services.PersistentAttributesFactoryService");dojo.declare("com.ibm.mashups.iwidget.services.PersistentAttributesFactoryService",null,{SERVICE_NAME:"persistentAttributesFactoryService",createPersistentAttributes:function(_95a,_95b){},setFactory:function(_95c,_95d){},removeFactory:function(_95e){}});com.ibm.mashups.iwidget.services.PersistentAttributesFactoryService.SERVICE_NAME=com.ibm.mashups.iwidget.services.PersistentAttributesFactoryService.prototype.SERVICE_NAME;}if(!dojo._hasResource["com.ibm.mm.iwidget.manageditemset.DOMPersistentAttributesFactoryImpl"]){dojo._hasResource["com.ibm.mm.iwidget.manageditemset.DOMPersistentAttributesFactoryImpl"]=true;dojo.provide("com.ibm.mm.iwidget.manageditemset.DOMPersistentAttributesFactoryImpl");dojo.declare("com.ibm.mm.iwidget.manageditemset.DOMPersistentAttributesFactoryImpl",com.ibm.mashups.iwidget.itemset.PersistentAttributesFactory,{constructor:function(){this.modes=["DOM"];},createPersistentAttributes:function(_95f,_960){return new com.ibm.mm.iwidget.manageditemset.PersistentAttributes(_95f,true);},getSupportedPersistenceMode:function(){return this.modes;}});}if(!dojo._hasResource["com.ibm.mm.iwidget.services.PersistentAttributesFactoryServiceImpl"]){dojo._hasResource["com.ibm.mm.iwidget.services.PersistentAttributesFactoryServiceImpl"]=true;dojo.provide("com.ibm.mm.iwidget.services.PersistentAttributesFactoryServiceImpl");dojo.declare("com.ibm.mm.iwidget.services.PersistentAttributesFactoryServiceImpl",com.ibm.mashups.iwidget.services.PersistentAttributesFactoryService,{constructor:function(){this._factories={};this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.bIsLoggable=this.LOGGER.isLoggable(this.LOG_LEVEL);},createPersistentAttributes:function(_961,_962){if(_962){com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.iwidget.services.ContainerService.SERVICE_NAME).registerOnChangeListener(com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_ATTRIBUTES,_962);}var _963;var wID=_961.id;var _963=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.iwidget.services.ContainerService.SERVICE_NAME).getPersistenceMode(com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_ATTRIBUTES);var _964=_961.rootElement;if(dojo.hasClass(_964,com.ibm.mm.iwidget.services.PersistentAttributesFactoryServiceImpl.STANDALONE_CLASS)||!_963){_963=com.ibm.mm.iwidget.services.PersistentAttributesFactoryServiceImpl.DEFAULT_PERSISTENCE;}if(typeof _963!=="undefined"&&_963==com.ibm.mashups.enabler.widget.Constants.PERSISTENCE_MODE_MODEL){var _965=com.ibm.mashups.enabler.widget.Factory.getWidgetModel();var _966=com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel();var _967=com.ibm.mashups.enabler.model.state.AccessorFactory.getSpaceAccessor(_966);var _968=com.ibm.mashups.enabler.model.state.AccessorFactory.getPageAccessor(_966,_969);var _969=_967.getSpaceID();var _96a=_968.getPageID();var _96b=com.ibm.mm.iwidget.Utils.getModelID(wID);var wnd=_965.findWidgetWindow(_96b,_96a).start();if(!wnd){if(!com.ibm.mashups.enabler.services.IdentificationService.isClientID(_96b)){if(dojo.isFunction(_961._getResourceBundle)){_961._getResourceBundle();this.LOGGER.warning("createPersistentAttributes",_961.iwMessages.W_STANDALONECLASS_MISSING_1,[wID]);}else{this.LOGGER.warning("createPersistentAttributes","widget "+wID+" is missing class "+com.ibm.mm.iwidget.Constants.CSSCLASS_PREFIXED_INSTANCE.iwStandalone);}}_963=com.ibm.mm.iwidget.services.PersistentAttributesFactoryServiceImpl.DEFAULT_PERSISTENCE;}}if(!(_963 in this._factories)){return null;}return this._factories[_963].createPersistentAttributes(_961,_963);},setFactory:function(_96c,_96d){this._factories[_96c]=_96d;},removeFactory:function(_96e){if(_96e in this._factories){delete this._factories[_96e];}}});com.ibm.mm.iwidget.services.PersistentAttributesFactoryServiceImpl.DEFAULT_PERSISTENCE=com.ibm.mashups.enabler.widget.Constants.PERSISTENCE_MODE_DOM;com.ibm.mm.iwidget.services.PersistentAttributesFactoryServiceImpl.STANDALONE_CLASS=com.ibm.mm.iwidget.Constants.CSSCLASS_PREFIXED_INSTANCE.iwStandalone;com.ibm.mashups.services.ServiceManager.setService(com.ibm.mashups.iwidget.services.PersistentAttributesFactoryService.SERVICE_NAME,new com.ibm.mm.iwidget.services.PersistentAttributesFactoryServiceImpl());com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.iwidget.services.PersistentAttributesFactoryService.SERVICE_NAME).setFactory(com.ibm.mashups.enabler.widget.Constants.PERSISTENCE_MODE_DOM,new com.ibm.mm.iwidget.manageditemset.DOMPersistentAttributesFactoryImpl());}if(!dojo._hasResource["com.ibm.mashups.iwidget.services.PersistentAttributesFactoryService"]){dojo._hasResource["com.ibm.mashups.iwidget.services.PersistentAttributesFactoryService"]=true;dojo.provide("com.ibm.mashups.iwidget.services.PersistentAttributesFactoryService");}if(!dojo._hasResource["com.ibm.mm.iwidget.services.IWidgetFragmentServiceImpl"]){dojo._hasResource["com.ibm.mm.iwidget.services.IWidgetFragmentServiceImpl"]=true;dojo.provide("com.ibm.mm.iwidget.services.IWidgetFragmentServiceImpl");dojo.declare("com.ibm.mm.iwidget.services.IWidgetFragmentServiceImpl",null,{createItem:function(_96f,_970,_971,ns){if(!ns){ns="iw-";}var item=document.createElement("a");dojo.addClass(item,ns+iwConstants.CSSCLASS_INSTANCE.iwItem);dojo.style(item,"visibility","hidden");dojo.style(item,"display","none");item.setAttribute("href","#"+_96f);if(_971){item.setAttribute("lang",_971);}if(_970&&!_971){item.innerHTML=_970;}return item;},createItemSet:function(_972,ns){if(!ns){ns="iw-";}var _973=document.createElement("span");dojo.addClass(_973,ns+iwConstants.CSSCLASS_INSTANCE.iwItemSet);_973.setAttribute("title",_972);dojo.style(_973,"visibility","hidden");dojo.style(_973,"display","none");return _973;},createWidgetDefRef:function(_974,ns){if(!ns){ns="iw-";}var aTag=document.createElement("a");dojo.addClass(aTag,ns+iwConstants.CSSCLASS_INSTANCE.iwDefinition);aTag.setAttribute("href",_974);dojo.style(aTag,"visibility","hidden");dojo.style(aTag,"display","none");return aTag;},getItemSet:function(_975,name,ns){if(!ns){ns="iw-";}var rc=null;var _976=dojo.byId(_975);var _977=dojo.query("."+ns+iwConstants.CSSCLASS_INSTANCE.iwItemSet,_976);for(var i=0;i<_977.length;i++){var _978=_977[i];var _979=_978.getAttribute("title");if(name==_979){rc=_978;break;}}return rc;},getItem:function(_97a,name,ns){if(!ns){ns="iw-";}var rc=null;var _97b=dojo.query("."+ns+iwConstants.CSSCLASS_INSTANCE.iwItem,_97a);for(var i=0;i<_97b.length;i++){var _97c=_97b[i];var _97d=this.getKeyFromHref(_97c);if(_97d&&_97d==name){rc=_97c;break;}}return rc;},getItems:function(_97e,ns){if(!ns){ns="iw-";}var _97f=dojo.query("."+ns+iwConstants.CSSCLASS_INSTANCE.iwItem,_97e);if(typeof _97f=="undefined"||_97f===null||_97f.length===0){_97f=null;}return _97f;},getWidgetDefRef:function(_980,ns){if(!ns){ns="iw-";}var rc=null;var _981=dojo.byId(_980);var def=dojo.query("."+ns+iwConstants.CSSCLASS_INSTANCE.iwDefinition,_981)[0];var ref=def.getAttribute("href");if(ref){rc=ref;}return rc;},getKeyFromHref:function(node){var _982=node.getAttribute("href");if(!_982){return null;}var pos=_982.indexOf("#");if(pos<0){return null;}return _982.substring(pos+1);}});com.ibm.mashups.services.ServiceManager.setService("iwidgetFragmentService",new com.ibm.mm.iwidget.services.IWidgetFragmentServiceImpl());}if(!dojo._hasResource["com.ibm.mm.enabler.EndpointUtilsExtendedImpl"]){dojo._hasResource["com.ibm.mm.enabler.EndpointUtilsExtendedImpl"]=true;dojo.provide("com.ibm.mm.enabler.EndpointUtilsExtendedImpl");dojo.declare("com.ibm.mm.enabler.EndpointUtilsExtendedImpl",com.ibm.mm.enabler.EndpointUtilsDefaultImpl,{constructor:function(){},checkForEndpoints:function(url){if(!url){return null;}var _983=url.toString();if(_983){var _984=_983.indexOf("endpoint://",0);if(_984===0){var _985=_983.indexOf("/",11);if(_985>0){var _986=_983.substring(11,_985);var _987=_983.substring(_985+1);var _988=this._resolveEndpoint(_986);if(_988){if(_988.charAt(_988.length-1)=="/"){_983=_988+_987;}else{_983=_988+"/"+_987;}return _983;}else{return null;}}}else{if(_984>0){var _989=_983.substring(0,_984);var _98a=_983.substring(_984);var _98b=this.checkForEndpoints(_98a);if(_98b){return _98b.substring(0);}}}}return url;},_resolveEndpoint:function(_98c){if(!this.co){this._init();}var _98d=decodeURIComponent(_98c);var url=this.co.getValue(_98d+".url");if(!url){if(_98d=="{contenthandler}"){url=this.urlContentHandler;}else{if(_98d=="{webdavroot}"){url=this.urlWebDavRoot;}else{return null;}}}if((url)&&(url.charAt(0)!="/")&&(url.substr(0,4)!="http")){url="/"+url;}return url;},_init:function(){this.cs=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME);this.co=this.cs.getConfigObject(com.ibm.mashups.enabler.services.ConfigConstants.ENDPOINT_CONFIG_PROVIDER);this.urlContentHandler="";this.urlContentHandler+=this.cs.getValue(com.ibm.mashups.enabler.services.ConfigConstants.CONTEXT_ROOT);var _98e=this.cs.getValue(com.ibm.mashups.enabler.services.ConfigConstants.ANONYMOUS_USER);var _98f;if(_98e){_98f=this.cs.getValue(com.ibm.mashups.enabler.services.ConfigConstants.CONTENTHANDLER_PUBLIC);}else{_98f=this.cs.getValue(com.ibm.mashups.enabler.services.ConfigConstants.CONTENTHANDLER_PRIVATE);}this.urlContentHandler+=_98f;if(com.ibm.mm.enabler.remote&&com.ibm.mm.enabler.remote.WebDavUrlFactory){this.urlWebDavRoot=com.ibm.mm.enabler.remote.WebDavUrlFactory.createUrl()+"/";}else{this.urlWebDavRoot=null;}}});com.ibm.mm.enabler.EndpointUtils=new com.ibm.mm.enabler.EndpointUtilsExtendedImpl();}if(!dojo._hasResource["com.ibm.mm.iwidget.payloadDef"]){dojo._hasResource["com.ibm.mm.iwidget.payloadDef"]=true;dojo.provide("com.ibm.mm.iwidget.payloadDef");dojo.declare("com.ibm.mm.iwidget.payloadDef",null,{constructor:function(name,type,_990,_991,_992){this.name=name;this.attributes=_992||null;if(!this.attributes){this.attributes={};}if(typeof type!="undefined"&&type!==null){this.attributes.type=type;}if(typeof _990!="undefined"&&_990!==null){this.attributes.defaultValue=_990;}if(typeof _991!="undefined"&&_991!==null){this.attributes.description=_991;}this.attributeNames=[];this.attributeNames.push("type");this.attributeNames.push("defaultValue");this.attributeNames.push("description");var _993;for(_993 in _992){if(Object.prototype.hasOwnProperty.call(_992,_993)){this.attributeNames.push(_993);}}this.children=new com.ibm.mm.enabler.ArrayMap();},setAttribute:function(name,_994){this.attributes[name]=_994;if(typeof (this.attributeNames[name])!="undefined"){this.attributeNames.push(name);}},getAttribute:function(name){var _995=this.attributes[name];if(typeof _995=="undefined"){_995=null;}return _995;},getAttributeNames:function(){return this.attributeNames;},getChildren:function(){return this.children.values();},getChild:function(name){return this.children.get(name);},setChild:function(name,_996){this.children.put(name,_996);},getChildrenNames:function(){this.children.keySet();},getName:function(){return this.name;},getType:function(){return this.attributes.type;},getDefaultValue:function(){return this.attributes.defaultValue;},getDescription:function(){return this.attributes.description;}});}if(!dojo._hasResource["com.ibm.mm.iwidget.UtilsExtended"]){dojo._hasResource["com.ibm.mm.iwidget.UtilsExtended"]=true;dojo.provide("com.ibm.mm.iwidget.UtilsExtended");dojo.declare("com.ibm.mm.iwidget.UtilsExtendedImpl",com.ibm.mm.iwidget.UtilsDefaultImpl,{getPayloadDef:function(_997){var name=_997.getAttribute("name");var _998=new com.ibm.mm.iwidget.payloadDef(name);var _999=_997.attributes;for(var i=0;i<_999.length;i++){var _99a=_999[i];if(_99a.name!="name"){_998.setAttribute(_99a.name,_99a.value);}}var _99b=_997.childNodes;for(var j=0;j<_99b.length;j++){var _99c=_99b[j];if(_99c.nodeType==1){var _99d=this.getPayloadDef(_99c);_998.setChild(_99d.name,_99d);}}return _998;}});if((ibmConfig.enablerLayerModules)&&(dojo.indexOf(ibmConfig.enablerLayerModules,"CoreModel")>=0)){dojo["require"]("com.ibm.mm.enabler.iwidget.UtilsModelImpl");}else{com.ibm.mm.iwidget.Utils=new com.ibm.mm.iwidget.UtilsExtendedImpl();}}if(!dojo._hasResource["com.ibm.mm.iwidget.icontext.IContextMMExtensionImpl"]){dojo._hasResource["com.ibm.mm.iwidget.icontext.IContextMMExtensionImpl"]=true;dojo.provide("com.ibm.mm.iwidget.icontext.IContextMMExtensionImpl");dojo.declare("com.ibm.mm.iwidget.icontext.IContextMMExtensionImpl",null,{constructor:function(_99e){this.widget=_99e;this.widgetId=_99e.id;},getSupportedModes:function(){var _99f=this.widgetwrapper.widgetDef.getSupportedModes();return _99f;},getPayloadDef:function(name){var _9a0=this.widget.widgetDef.payloadDefs;var _9a1=_9a0[name];if(typeof _9a1=="undefined"){return null;}return _9a1;},getPayloadDefNames:function(){var _9a2=this.widget.widgetDef.payloadDefs;var arr=[];for(var a in _9a2){if(Object.prototype.hasOwnProperty.call(_9a2,a)){arr.push(a);}}return arr;}});}if(!dojo._hasResource["com.ibm.mm.iwidget.manageditemset.UserProfileImpl"]){dojo._hasResource["com.ibm.mm.iwidget.manageditemset.UserProfileImpl"]=true;dojo.provide("com.ibm.mm.iwidget.manageditemset.UserProfileImpl");dojo.declare("com.ibm.mm.iwidget.manageditemset.UserProfileImpl",com.ibm.mashups.iwidget.itemset.ManagedItemSet,{constructor:function(_9a3,user){this.widgetId=_9a3;this.user=user;},getItemValue:function(name){if(!name){return null;}var _9a4=this.user.getAttribute(name);if(typeof _9a4=="undefined"){_9a4=null;}return _9a4;},setItemValue:function(name,_9a5){if(!name||!_9a5){return null;}if(this.isReadOnly(name)){return null;}this.user.setAttribute(name,_9a5);return this;},isReadOnly:function(name){if(typeof name=="undefined"||name===null){return false;}var _9a6=this.user.getReadOnlyAttributeNames();var rc=this._contains(_9a6,name);return rc;},_contains:function(_9a7,_9a8){if(!_9a8){return false;}if(!_9a7){return false;}if(_9a7&&!dojo.isArray(_9a7)){return false;}for(var i=0;i<_9a7.length;i++){if(_9a7[i]&&_9a7[i]==_9a8){return true;}}return false;},removeItem:function(name){if(!name){return null;}if(this.isReadOnly(name)){return null;}this.user.removeAttribute(name);return this;},getAllNames:function(){var _9a9=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME);var _9aa=_9a9.getValue("com.ibm.mashups.hideLookaside");if(dojo.isString(_9aa)&&_9aa.toLowerCase()=="true"){return this.user.getReadOnlyAttributeNames();}return this.user.getAttributeNames();},save:function(cb){return this.commit(cb);},commit:function(cb){var _9ab=null;if(com.ibm.mashups.enabler.user.Factory.getUserModel){_9ab=com.ibm.mashups.enabler.user.Factory.getUserModel();}if(_9ab){var _9ac=_9ab.commit();var fn=function(_9ad,_9ae,_9af){if(cb){var rc=false;var _9b0=iwConstants.USERPROFILE;if(_9ae&&_9ae==iwConstants.status.SUCCESS){rc=true;}cb(_9b0,rc);}};_9ac.setFinishedCallback(fn);_9ac.start();}},addListener:function(fn){var _9b1=this._getWidget();if(!_9b1){return null;}var _9b2=_9b1._registerListener(iwConstants.USERPROFILE,fn);return _9b2;},removeListener:function(_9b3){var _9b4=this._getWidget();if(!_9b4){return null;}return _9b4._removeListener(iwConstants.USERPROFILE,_9b3);},_getWidget:function(){var _9b5=com.ibm.mashups.iwidget.model.Factory.getGlobalModel();return _9b5.find(this.widget)||null;}});}if(!dojo._hasResource["com.ibm.mm.iwidget.widget.ResourceImpl"]){dojo._hasResource["com.ibm.mm.iwidget.widget.ResourceImpl"]=true;dojo.provide("com.ibm.mm.iwidget.widget.ResourceImpl");dojo.declare("com.ibm.mm.iwidget.widget.ResourceImpl",null,{constructor:function(obj){if(obj){for(var i in obj){if(Object.prototype.hasOwnProperty.call(obj,i)){this[i]=obj[i];}}}},IMAGE:{"bmp":"bmp","cod":"cod","gif":"gif","ief":"ief","jpe":"jpe","jpeg":"jpeg","jpg":"jpg","jfif":"jfif","svg":"svg","tif":"tif","tiff":"tiff","ras":"ras","cmx":"cmx","ico":"ico","pnm":"pnm","pbm":"pbm","pgm":"pgm","ppm":"ppm","rgb":"rgb","xbm":"xbm","xpm":"xpm","xwd":"xwd"},isCSS:function(){var rc=false;var _9b6=this._getExtension();if(_9b6&&_9b6=="css"){rc=true;}if(!rc&&this.getMimeType()){if(this.getMimeType()=="text/stylesheet"||this.getMimeType()=="text/css"){rc=true;}}return rc;},isImage:function(){var rc=false;var _9b7=this._getExtension();if(_9b7&&_9b7 in this.IMAGE){rc=true;}if(!rc&&this.getMimeType()){if(this.getMimeType().indexOf("image/")===0){rc=true;}}return rc;},isJS:function(){var rc=false;var _9b8=this._getExtension();if(_9b8&&_9b8=="js"){rc=true;}if(!rc&&this.getMimeType()){var _9b9=this.getMimeType();if(_9b9=="text/javascript"||_9b9=="application/x-javascript"||_9b9=="application/javascript"){rc=true;}}return rc;},getGlobalId:function(){var id=this[iwConstants.RESOURCE.globalid];if(!id){id=this[iwConstants.RESOURCE.id];}if(!id){id=null;}return id;},getSrc:function(){return this[iwConstants.RESOURCE.src];},getMimeType:function(){var _9ba=this[iwConstants.RESOURCE.mimeType];if(!_9ba){_9ba=null;}return _9ba;},_getExtension:function(){var uri=this.getSrc();if(!uri){return null;}var _9bb=uri.substring(uri.lastIndexOf(".")+1,uri.length);if(!_9bb){return null;}return _9bb;}});}if(!dojo._hasResource["com.ibm.mm.iwidget.icontext.IContextExtendedImpl"]){dojo._hasResource["com.ibm.mm.iwidget.icontext.IContextExtendedImpl"]=true;dojo.provide("com.ibm.mm.iwidget.icontext.IContextExtendedImpl");dojo.declare("com.ibm.mm.iwidget.icontext.IContextExtendedImpl",com.ibm.mm.iwidget.icontext.IContextDefaultImpl,{_initEvents:function(){this.iEvents=new com.ibm.mm.iwidget.icontext.IContextIEventsImpl(this.widgetwrapper);},_initIO:function(){this.io=new com.ibm.mm.iwidget.icontext.IContextIOImpl(this.widgetwrapper);},_initMMExtension:function(){this._mm=new com.ibm.mm.iwidget.icontext.IContextMMExtensionImpl(this.widgetwrapper);},getUserProfile:function(){var _9bc=null;if(com.ibm.mashups.enabler.user.Factory.getUserModel){_9bc=com.ibm.mashups.enabler.user.Factory.getUserModel();}var user=null;if(_9bc){user=_9bc.findCurrentUser().start();}var _9bd=null;if(user){_9bd=new com.ibm.mm.iwidget.manageditemset.UserProfileImpl(this.widgetId,user);}return _9bd;},requires:function(_9be,_9bf,uri,cb,_9c0){_9c0=_9c0||null;if(!_9c0){_9c0="text/plain";}uri=uri||null;if(uri){var obj={};obj[iwConstants.RESOURCE.mimeType]=_9c0;obj[iwConstants.RESOURCE.id]=_9be;obj[iwConstants.RESOURCE.version]=_9bf;obj[iwConstants.RESOURCE.src]=uri;obj[iwConstants.RESOURCE.callback]=cb;var _9c1=new com.ibm.mm.iwidget.widget.ResourceImpl(obj);com.ibm.mashups.services.ServiceManager.getService("resourceLoadService").loadResource(_9c1,this.widgetId);}},processiWidgets:function(root){dojo.publish("/com/ibm/mashups/livetext/livetextchanged",[root,true]);},getShareableItemSet:function(name){name=name||null;if(!name){return null;}var _9c2=this.widgetwrapper._getShareableItemSet(name);return _9c2;}});com.ibm.mm.iwidget.icontext.IContextImpl=com.ibm.mm.iwidget.icontext.IContextExtendedImpl;}if(!dojo._hasResource["com.ibm.mm.iwidget.manageditemset.IDescriptorExtendedImpl"]){dojo._hasResource["com.ibm.mm.iwidget.manageditemset.IDescriptorExtendedImpl"]=true;dojo.provide("com.ibm.mm.iwidget.manageditemset.IDescriptorExtendedImpl");dojo.declare("com.ibm.mm.iwidget.manageditemset.IDescriptorExtendedImpl",com.ibm.mm.iwidget.manageditemset.IDescriptorDefaultImpl,{_getWindowState:function(){if(this.widget){var _9c3=com.ibm.mashups.enabler.model.state.AccessorFactory.getWidgetAccessor(this.navStateModel,this.widget.id);value=_9c3.getWindowState();}else{value="normal";}return value;}});com.ibm.mm.iwidget.manageditemset.IDescriptorImpl=com.ibm.mm.iwidget.manageditemset.IDescriptorExtendedImpl;if((ibmConfig.enablerLayerModules)&&(dojo.indexOf(ibmConfig.enablerLayerModules,"CoreModel")>=0)){dojo["require"]("com.ibm.mm.enabler.iwidget.manageditemset.IDescriptorModelImpl");}}if(!dojo._hasResource["com.ibm.mm.iwidget.services.ResourceLoadServiceImpl"]){dojo._hasResource["com.ibm.mm.iwidget.services.ResourceLoadServiceImpl"]=true;dojo.provide("com.ibm.mm.iwidget.services.ResourceLoadServiceImpl");dojo.declare("com.ibm.mm.iwidget.services.ResourceLoadServiceImpl",null,{constructor:function(){this.modules={};this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.bIsLoggable=this.LOGGER.isLoggable(this.LOG_LEVEL);this.LOADING_TOKEN=0;this.LOADING_ERROR_TOKEN=1;this.LOADED_TOKEN=2;this.waitingqueue={};this.evalqueue={};this.callbackQueue={};var cs=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME);if(cs){var _9c4=cs.getValue(com.ibm.mashups.enabler.services.ConfigConstants.REGISTER_LOADEDRESOURCES);if(_9c4){if(dojo.isString(_9c4)){try{_9c4=dojo.fromJson(_9c4);}catch(e){}}if(dojo.isArray(_9c4)){this.registeredLoadedResources=_9c4;}}}},executeCallbackQueue:function(_9c5){if(this.callbackQueue[_9c5]){var _9c6=this.callbackQueue[_9c5];var _9c7=com.ibm.mashups.iwidget.model.Factory.getGlobalWidgetModel().find(_9c5);if(_9c7){for(var i=0;i<_9c6.length;i++){if(_9c6[i]){var _9c8=_9c7._getHandlerScope(_9c6[i].cb);if(_9c8){var cb=dojo.hitch(_9c8,_9c6[i].cb);cb(_9c6[i].id,_9c6[i].src,_9c6[i].status);_9c6[i]=null;}}}}}},loadResource:function(_9c9,_9ca,cb2){var _9cb="loadResource";var _9cc=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_9cc){this.LOGGER.entering(_9cb,arguments);}var _9cd=_9c9.getGlobalId();var uri=_9c9.getSrc();var path=null;if(_9c9.isJS()){path=this._rewriteUrl(uri,_9ca,true);}else{path=this._rewriteUrl(uri,_9ca,false);}if(!_9cd){_9cd=path;}if(!_9cd){return;}this.evalqueue[_9ca]=this.evalqueue[_9ca]?this.evalqueue[_9ca]:[];this.evalqueue[_9ca].push({_id:_9cd,resourceElem:_9c9,cb2:cb2,widgetId:_9ca,isReady:false});var _9ce=_9c9[iwConstants.RESOURCE.skipLoad];if(_9ce){var rc=false;try{rc=dojo.eval(_9ce);}catch(e){rc=false;}if(rc){this._handleLoadedResource(_9cd,_9ca,null,iwConstants.status.OTHER);return;}}var _9cf=this.registeredLoadedResources;if(dojo.isArray(_9cf)){for(var j=0;j<_9cf.length;j++){if(_9cf[j].globalid&&_9cf[j].globalid==_9cd){if(_9cf[j].version){var _9d0=_9c9[iwConstants.RESOURCE.version];if(!_9d0||(_9d0&&_9d0==_9cf[j].version)){this._handleLoadedResource(_9cd,_9ca,null,iwConstants.status.OTHER);return;}}else{this._handleLoadedResource(_9cd,_9ca,null,iwConstants.status.OTHER);return;}}}}var _9d1=this.modules[_9cd];var me=this;if(_9d1&&_9d1!==null){var type=_9d1.type;switch(type){case 0:this.waitingqueue[_9d1._id]=(this.waitingqueue[_9d1._id])?this.waitingqueue[_9d1._id]:[];this.waitingqueue[_9d1._id].push({resourceElem:_9c9,widgetId:_9ca,cb2:cb2});return;case 1:this._handleLoadedResource(_9cd,_9ca,null,_9d1.status,_9d1.data);return;case 2:this._handleLoadedResource(_9cd,_9ca,null,_9d1.status);return;}}_9d1={};_9d1.type=this.LOADING_TOKEN;_9d1._id=_9cd;_9d1._path=path;this.modules[_9cd]=_9d1;if(_9cd!=path){this.modules[path]=this.modules[_9cd];}var _9d2=null;if(_9c9.isCSS()){_9d2=this._loadCSS(path);this.modules[_9cd].type=this.LOADED_TOKEN;this.modules[_9cd].status=iwConstants.status.OTHER;this._handleLoadedResource(_9cd,_9ca,null,iwConstants.status.OTHER);return;}if(_9c9.isImage()){_9d2=this._loadImage(path);this.modules[_9cd].type=this.LOADED_TOKEN;this.modules[_9cd].status=iwConstants.status.OTHER;this._handleLoadedResource(_9cd,_9ca,null,iwConstants.status.OTHER);return;}var _9d3=path;if(dojo.isIE==6&&path.indexOf("/")===0){var _9d4=window.location.protocol;var host=window.location.hostname;var port=window.location.port;_9d3=_9d4+"//"+host+":"+port+path;}var _9d5=com.ibm.mashups.enabler.io.XHRMultipartFactory;var _9d6=_9d5.create();var _9d7=!_9d6.isTransaction();if(ibmConfig.dojotest){_9d7=true;}var args={url:_9d3,ibmMultipart:{context:_9d5.CONTEXT_ENABLER},sync:_9d7,load:function(data,_9d8){var _9d9=null;if(_9d8.xhr.status==200||_9d8.xhr.status===0){var _9da=_9d8.xhr.responseText;_9d9=_9da.replace(/_IWID_/g,"_"+_9ca+"_");}me.modules[_9cd].type=me.LOADED_TOKEN;me.modules[_9cd].status=iwConstants.status.SUCCESS;me._handleLoadedResource(_9cd,_9ca,_9d9,iwConstants.status.SUCCESS);var _9db=me.waitingqueue[_9cd];if(_9db){for(var j=0;j<_9db.length;j++){var req=_9db[j];me._handleLoadedResource(_9cd,req.widgetId,null,iwConstants.status.SUCCESS);}}me.waitingqueue[_9cd]=null;},error:function(data,_9dc){me.modules[_9cd].type=me.LOADING_ERROR_TOKEN;me.modules[_9cd].data=data;me.modules[_9cd].status=_9dc.xhr.status;me._handleLoadedResource(_9cd,_9ca,null,_9dc.xhr.status,data);var _9dd=me.waitingqueue[_9cd];if(_9dd){for(var h=0;h<_9dd.length;h++){var req=_9dd[h];me._handleLoadedResource(_9cd,req.widgetId,null,_9dc.xhr.status,data);}}me.waitingqueue[_9cd]=null;}};dojo.xhrGet(args);},_rewriteUrl:function(uri,id,_9de){var _9df=com.ibm.mashups.iwidget.model.Factory.getGlobalWidgetModel().find(id);return _9df._rewriteURI(uri,_9de);},_getExtension:function(uri){return uri.substring(uri.lastIndexOf(".")+1,uri.length);},_loadCSS:function(path){var link=document.createElement("link");link.setAttribute("rel","stylesheet");link.setAttribute("type","text/css");link.setAttribute("href",path);document.getElementsByTagName("head")[0].appendChild(link);},_loadImage:function(path){com.ibm.mm.enabler.utils.Misc.preloadImage(url);},_evalCallback:function(cb,_9e0,_9e1,_9e2){if(cb){if(dojo.isString(cb)){var _9e3=com.ibm.mashups.iwidget.model.Factory.getGlobalWidgetModel().find(_9e0);if(_9e3){var _9e4=_9e3._getHandlerScope(cb);if(_9e4){cb=dojo.hitch(_9e4,cb);}}}var id=_9e1.getGlobalId();var src=_9e1.getSrc();if(!_9e2){_9e2=iwConstants.status.SUCCESS;}if(dojo.isFunction(cb)){dojo.partial(cb)(id,src,_9e2);}else{this.callbackQueue[_9e0]=this.callbackQueue[_9e0]?this.callbackQueue[_9e0]:[];var _9e5={cb:cb,id:id,src:src,status:_9e2};this.callbackQueue[_9e0].push(_9e5);}}},_evalFn:function(_9e6){if(window.execScript){window.execScript(_9e6,"JavaScript");}else{dojo.eval(_9e6);}},_loadedFC:function(_9e7,_9e8,cb2,data,_9e9){var cb=_9e7[iwConstants.RESOURCE.callback];if(cb){this._evalCallback(cb,_9e8,_9e7,_9e9);}if(cb2){var _9ea=com.ibm.mashups.enabler.io.XHRMultipartFactory.create();_9ea.suspendTransaction();if(data&&_9e9){cb2(data,_9e9);}else{cb2();}_9ea.resumeTransaction();}},_handleLoadedResource:function(_9eb,_9ec,_9ed,_9ee,_9ef){var _9f0;var _9f1=this.evalqueue[_9ec];if(_9f1){if(_9f1[0]&&_9f1[0]._id&&_9f1[0]._id==_9eb){if(_9ed){this._evalFn(_9ed);}_9f0=_9f1.shift();this._loadedFC(_9f0.resourceElem,_9ec,_9f0.cb2,_9ef,_9ee);var arr=_9f1;var _9f2=true;while(_9f2&&_9f1.length>0){if(_9f1[0].isReady){var _9f3=_9f1[0].contents;if(_9f3){this._evalFn(_9f3);}this._loadedFC(_9f1[0].resourceElem,_9ec,_9f1[0].cb2,_9f1[0].statusData,_9f1[0].status);_9f1.shift();}else{_9f2=false;}}}else{if(_9f1[0]&&_9f1[0]._id&&_9f1[0]._id!=_9eb){for(var i=0;i<_9f1.length;i++){_9f0=_9f1[i];if(_9f0._id&&_9f0._id==_9eb){_9f1[i].contents=_9ed;_9f1[i].isReady=true;_9f1[i].status=_9ee;_9f1[i].statusData=_9ef;}}}}}}});com.ibm.mashups.services.ServiceManager.setService("resourceLoadService",new com.ibm.mm.iwidget.services.ResourceLoadServiceImpl());}if(!dojo._hasResource["com.ibm.mm.iwidget.parser.WidgetParser"]){dojo._hasResource["com.ibm.mm.iwidget.parser.WidgetParser"]=true;dojo.provide("com.ibm.mm.iwidget.parser.WidgetParser");dojo.declare("com.ibm.mm.iwidget.parser.WidgetParser",null,{parseWidgetDefinition:function(){return null;}});}if(!dojo._hasResource["com.ibm.mm.enabler.xslt"]){dojo._hasResource["com.ibm.mm.enabler.xslt"]=true;dojo.provide("com.ibm.mm.enabler.xslt");com.ibm.mm.enabler.xslt.ie={};com.ibm.mm.enabler.xslt.gecko={};com.ibm.mm.enabler.xslt.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);com.ibm.mm.enabler.xslt.getXmlHttpRequest=function(){var oXml=null;if(typeof ActiveXObject!="undefined"){oXml=new ActiveXObject("Microsoft.XMLHTTP");}else{oXml=new XMLHttpRequest();}return oXml;};com.ibm.mm.enabler.xslt.loadXml=function(sUrl){if(typeof ActiveXObject!="undefined"){return com.ibm.mm.enabler.xslt.ie.loadXml(sUrl);}else{return com.ibm.mm.enabler.xslt.gecko.loadXml(sUrl);}};com.ibm.mm.enabler.xslt.loadXmlString=function(sXml){if(typeof ActiveXObject!="undefined"){return com.ibm.mm.enabler.xslt.ie.loadXmlString(sXml);}else{var _9f4=new DOMParser();return com.ibm.mm.enabler.xslt.gecko.loadXmlString(sXml);}};com.ibm.mm.enabler.xslt.loadXsl=function(sUrl){if(typeof ActiveXObject!="undefined"){return com.ibm.mm.enabler.xslt.ie.loadXsl(sUrl);}else{return com.ibm.mm.enabler.xslt.gecko.loadXsl(sUrl);}};com.ibm.mm.enabler.xslt.transform=function(xml,xsl,_9f5,_9f6,_9f7){var _9f8=com.ibm.mashups.enabler.logging.LogLevel.TRACE;var _9f9="transform";var _9fa=com.ibm.mm.enabler.xslt.LOGGER.isLoggable(_9f8);if(_9fa){com.ibm.mm.enabler.xslt.LOGGER.entering(_9f9,arguments);}if(typeof ActiveXObject!="undefined"){return com.ibm.mm.enabler.xslt.ie.transform(xml,xsl,_9f5,_9f6,_9f7);}else{return com.ibm.mm.enabler.xslt.gecko.transform(xml,xsl,_9f5,_9f6,_9f7);}};com.ibm.mm.enabler.xslt.transformAndUpdate=function(_9fb,xml,xsl,_9fc,_9fd){var _9fe=com.ibm.mashups.enabler.logging.LogLevel.TRACE;var _9ff="transformAndUpdate";var _a00=com.ibm.mm.enabler.xslt.LOGGER.isLoggable(_9fe);if(_a00){com.ibm.mm.enabler.xslt.LOGGER.entering(_9ff,arguments);}var _a01;if(typeof ActiveXObject!="undefined"){_a01=com.ibm.mm.enabler.xslt.ie.transform(xml,xsl,_9fc,_9fd,true);if(_a00){com.ibm.mm.enabler.xslt.LOGGER.trace(_9ff,"XSLT result: "+_a01);}_9fb.innerHTML+=_a01;}else{_a01=com.ibm.mm.enabler.xslt.gecko.transform(xml,xsl,_9fc,_9fd,false);if(_a00){com.ibm.mm.enabler.xslt.LOGGER.trace(_9ff,"XSLT result: "+(new XMLSerializer()).serializeToString(_a01));}var _a02=_a01.documentElement;if(_a01.documentElement.tagName=="transformiix:result"){_a02=_a01.documentElement.childNodes;com.ibm.mm.enabler.utils.Dom.copyChildren(_a01.documentElement,_9fb,true);}else{if(_a00){com.ibm.mm.enabler.xslt.LOGGER.trace(_9ff,"Appending: "+(new XMLSerializer()).serializeToString(_a02));}_9fb.appendChild(_a02);}}if(_a00){com.ibm.mm.enabler.xslt.LOGGER.exiting(_9ff);}};com.ibm.mm.enabler.xslt.ie.loadXml=function(sUrl){var _a03=new ActiveXObject("MSXML2.DOMDocument");_a03.async=0;_a03.resolveExternals=0;if(!_a03.load(sUrl)){throw new Error("Error loading xml file "+sUrl);}return _a03;};com.ibm.mm.enabler.xslt.ie.loadXmlString=function(sXml){var _a04=new ActiveXObject("MSXML2.DOMDocument");_a04.async=0;_a04.resolveExternals=0;if(!_a04.loadXML(sXml)){throw new Error("Error loading xml string "+sXml);}return _a04;};com.ibm.mm.enabler.xslt.ie.loadXsl=function(sUrl){var _a05=new ActiveXObject("MSXML2.FreeThreadedDOMDocument");_a05.async=0;_a05.resolveExternals=0;if(!_a05.load(sUrl)){throw new Error("Error loading xsl file "+sUrl);}return _a05;};com.ibm.mm.enabler.xslt.ie.transform=function(_a06,xsl,_a07,_a08,_a09){var oXml=_a06;var oXsl=xsl;try{if(!oXsl.documentElement){oXsl=this.loadXsl(xsl);}}catch(e){var sMsg=e.message;throw new Error(""+sMsg,""+sMsg);}var _a0a=new ActiveXObject("Msxml2.XSLTemplate");_a0a.stylesheet=oXsl;var _a0b=_a0a.createProcessor();_a0b.input=oXml;if(_a08){com.ibm.mm.enabler.utils.Misc.forIn(_a08,function(_a0c,key,obj){this.addParameter(key,_a0c);},_a0b);}if(_a07){_a0b.addParameter("mode",_a07);}if(_a09){if(!_a0b.transform()){throw new Error("Error transforming xml doc "+oXml);}return _a0b.output;}else{var _a0d=new ActiveXObject("MSXML2.DOMDocument");_a0d.async=0;_a0d.validateOnParse=1;oXml.transformNodeToObject(oXsl,_a0d);return _a0d;}};com.ibm.mm.enabler.xslt.gecko.loadXml=function(sUrl){};com.ibm.mm.enabler.xslt.gecko.loadXmlString=function(sXml){var _a0e=new DOMParser();var _a0f;try{_a0f=_a0e.parseFromString(sXml,"text/xml");}catch(exc){throw new Error("Error loading xml string "+sXml);}return _a0f;};com.ibm.mm.enabler.xslt.gecko.loadXsl=function(sUrl){var _a10=document.implementation.createDocument("","",null);_a10.async=0;_a10.load(sUrl);return _a10;};com.ibm.mm.enabler.xslt.gecko.transform=function(_a11,xsl,_a12,_a13,_a14){try{var _a15=xsl;if(!_a15.documentElement){_a15=this.loadXsl(xsl);}var proc=new XSLTProcessor();proc.importStylesheet(_a15);if(_a13){com.ibm.mm.enabler.utils.Misc.forIn(_a13,function(_a16,key,obj){this.setParameter(null,key,_a16);},proc);}if(_a12){proc.setParameter(null,"mode",_a12);}var _a17=proc.transformToDocument(_a11);if(!_a14){return _a17;}resultStr=_a17.documentElement.childNodes[0].textContent;}catch(exc){throw new Error("Error transforming xml doc "+exc);}return resultStr;};com.ibm.mm.enabler.xslt.setLayerContentByXml=function(_a18,xml,xsl,_a19,_a1a){var _a1b=com.ibm.mm.enabler.xslt.transform(xml,xsl,null,_a19,_a1a);if(_a18.innerHTML){_a18.innerHTML=_a1b;}else{var obj=document.getElementById(_a18);obj.innerHTML=_a1b;}};}if(!dojo._hasResource["com.ibm.mm.iwidget.widget.IWidgetDefinitionLegacyImpl"]){dojo._hasResource["com.ibm.mm.iwidget.widget.IWidgetDefinitionLegacyImpl"]=true;dojo.provide("com.ibm.mm.iwidget.widget.IWidgetDefinitionLegacyImpl");dojo.declare("com.ibm.mm.iwidget.widget.IWidgetDefinitionLegacyImpl",com.ibm.mashups.iwidget.widget.IWidgetDefinition,{constructor:function(name,_a1c,_a1d,_a1e,_a1f,uri,_a20,_a21,_a22,_a23,_a24,_a25){var arg1=name;if(dojo.isString(arg1)){this.name=name;this.markup=_a1c;this.iScope=_a1d;this.itemSetsArr=_a1e;this.uri=uri;this.widgetEvents=_a1f;this.publishedEvents=_a21;this.handledEvents=_a22;this.supportedModes=_a20;this.resources=_a23;this.payloadDefs=_a24;this.iDescriptor=_a25;}else{this.name=arg1.name;this.markup=arg1.markup;this.metaData=arg1.metaData;this.events=arg1.events;this.itemSets=arg1.itemSets;this.resources=arg1.resources;this.payloadDefs=arg1.payloadDefs;this.iScope=this.metaData.iScope;this.supportedModes=this.metaData.supportedModes;this.uri=this.metaData.contentURI;var _a26;this.widgetEvents={};for(_a26 in this.metaData){if(_a26.indexOf("on")===0){this.widgetEvents[_a26]=this.metaData[_a26];}}var _a27=arg1.events.publishedEvents;this.publishedEvents={};this.handledEvents={};var _a28;var _a29;for(_a28 in _a27){if(Object.prototype.hasOwnProperty.call(_a27,_a28)){_a26=_a27[_a28];_a29=new com.ibm.mm.iwidget.IEventDescriptionImpl(_a26.eventName,_a26.payloadType,_a26.description,_a26.onEvent);if(!this.publishedEvents[_a28]){this.publishedEvents[_a28]=[];}this.publishedEvents[_a28].push(_a29);}}var _a2a=arg1.events.handledEvents;for(_a28 in _a2a){if(Object.prototype.hasOwnProperty.call(_a2a,_a28)){_a26=_a2a[_a28];_a29=new com.ibm.mm.iwidget.IEventDescriptionImpl(_a26.eventName,_a26.payloadType,_a26.description,_a26.onEvent);if(!this.handledEvents[_a28]){this.handledEvents[_a28]=[];}this.handledEvents[_a28].push(_a29);}}var _a2b;this.itemSetsArr={};for(_a2b in arg1.itemSets){if(Object.prototype.hasOwnProperty.call(arg1.itemSets,_a2b)){var _a2c=arg1.itemSets[_a2b];var _a2d;if(_a2b=="attributes"){_a2d=new com.ibm.mm.iwidget.itemset.ItemSetDefaultImpl(_a2c.name,_a2c.onItemSetChanged);}else{_a2d=new com.ibm.mm.iwidget.itemset.ItemSetDefaultImpl(_a2c.name,_a2c.onItemSetChanged);}_a2d.itemLists.items=_a2c.itemLists;this.itemSetsArr[_a2b]=_a2d;}}}},_getPublishedEvents:function(){return this.publishedEvents;},_getHandledEvents:function(){return this.handledEvents;},getPublishedEvents:function(){var arr=[];for(var i in this.publishedEvents){if(Object.prototype.hasOwnProperty.call(this.publishedEvents,i)){arr.push(this.publishedEvents[i]);}}return arr;},getHandledEvents:function(){var arr=[];for(var i in this.handledEvents){if(Object.prototype.hasOwnProperty.call(this.handledEvents,i)){arr.push(this.handledEvents[i]);}}return arr;},getAttributes:function(){var _a2e=this.itemSetsArr.attributes;if(!_a2e){_a2e={name:"attributes",items:{}};}if(typeof (this.uri)!="undefined"&&_a2e){_a2e.items.contentURI={id:"contentURI",value:this.uri,readOnly:false};}if(typeof (this.supportedModes)!="undefined"&&_a2e){_a2e.items.supportedModes={id:"supportedModes",value:this.uri,readOnly:false};}return _a2e;},getAllItemSetNames:function(){var _a2f=[];if(!this.itemSetsArr){return _a2f;}var i=0;for(var _a30 in this.itemSetsArr){if(Object.prototype.hasOwnProperty.call(this.itemSetsArr,_a30)){var _a31=this.itemSetsArr[_a30];if(typeof (_a31)!="undefined"){_a2f[i]=_a31.name;}i++;}}return _a2f;},getItemSet:function(name){if(name=="attributes"){return this.getAttributes();}var _a32=this.itemSetsArr[name];if(typeof (_a32)!="undefined"){return _a32;}return null;},getPublishedEventsNames:function(){if(!this.publishedEvents){return null;}var _a33=[];var _a34;for(_a34 in this.publishedEvents){if(Object.prototype.hasOwnProperty.call(this.publishedEvents,_a34)){_a33.push(_a34);}}return _a33;},getHandledEventsNames:function(){if(!this.handledEvents){return null;}var _a35=[];var _a36;for(_a36 in this.handledEvents){if(Object.prototype.hasOwnProperty.call(this.handledEvents,_a36)){_a35.push(_a36);}}return _a35;},getPublishedEvent:function(_a37){if(!this.publishedEvents){return null;}return this.publishedEvents[_a37];},getHandledEvent:function(_a38){if(!this.handledEvents){return null;}return this.handledEvents[_a38];},getWidgetName:function(){return this.name;},getPayloadDefs:function(){return this.payloadDefs;},getPayloadDef:function(name){var _a39=this.payloadDefs[name];if(typeof _a39=="undefined"){return null;}return _a39;},getPayloadDefNames:function(){var arr=[];var a;for(a in this.payloadDefs){if(Object.prototype.hasOwnProperty.call(this.payloadDefs,a)){arr.push(a);}}return arr;},getSupportedModes:function(){var temp=this.supportedModes;if(!temp){return null;}var arr=temp.split(" ");return arr;},getIDescriptorItems:function(){return null;},getMarkupByMode:function(mode){return this.markup;},getWidgetEvents:function(){return this.widgetEvents;},getIScope:function(){return this.iScope;},getResources:function(){return this.resources;},getDefaultLanguage:function(){return "en";},getMarkup:function(){return this.markup;},getAllowInstanceContent:function(){return false;},_getShareableItemSets:function(){return null;},_getManagedItemSetListener:function(_a3a){return null;},getXmlBase:function(){return null;}});}if(!dojo._hasResource["com.ibm.mm.iwidget.parser.LegacyXMLParser"]){dojo._hasResource["com.ibm.mm.iwidget.parser.LegacyXMLParser"]=true;dojo.provide("com.ibm.mm.iwidget.parser.LegacyXMLParser");dojo.declare("com.ibm.mm.iwidget.parser.LegacyXMLParser",com.ibm.mm.iwidget.parser.WidgetParser,{constructor:function(_a3b){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.xmlStr=_a3b;},namespaces:{"iw":"http://www.ibm.com/iWidget"},parseWidgetDefinition:function(){var _a3c=com.ibm.mm.enabler.xslt.loadXmlString(this.xmlStr);var _a3d=this.readMarkup(_a3c);var _a3e=this.readItemSets(_a3c);var uri=this.readContentURI(_a3c);var _a3f=this.readWidgetEvents(_a3c);var name=this.readName(_a3c);var _a40=this.readiScope(_a3c);var _a41=this.readSupportedModes(_a3c);var _a42=this.readPublicEvents(_a3c,"iw:handledEvents");var _a43=this.readPublicEvents(_a3c,"iw:publishedEvents");var _a44=this.readResources(_a3c);var _a45=this.readPayloadDefs(_a3c);var _a46=this.readIDescriptor(_a3c);return new com.ibm.mm.iwidget.widget.IWidgetDefinitionLegacyImpl(name,_a3d,_a40,_a3e,_a3f,uri,_a41,_a43,_a42,_a44,_a45,_a46);},readMarkup:function(_a47){var _a48="readMarkup";var _a49=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_a49){this.LOGGER.entering(_a48,arguments);}var _a4a="/iw:iwidget/iw:content";var _a4b=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(_a4a,_a47,this.namespaces);var _a4c="";if(_a4b){var _a4d=_a4b.childNodes;for(var j=0,l=_a4d.length;j0){dojo.forEach(_a78,function(node){var _a79={};_a79.name=node.getAttribute("resourceName");_a79.src=node.getAttribute("uri");_a79.version=node.getAttribute("version");_a79.callback=node.getAttribute("callback");_a79.mimetype=node.getAttribute("mimetype");_a77[i]=_a79;},this);}return _a77;},readIDescriptor:function(_a7a){return null;}});}if(!dojo._hasResource["com.ibm.mm.iwidget.parser.StandardXMLParser"]){dojo._hasResource["com.ibm.mm.iwidget.parser.StandardXMLParser"]=true;dojo.provide("com.ibm.mm.iwidget.parser.StandardXMLParser");dojo.declare("com.ibm.mm.iwidget.parser.StandardXMLParser",com.ibm.mm.iwidget.parser.WidgetParser,{constructor:function(_a7b){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.xmlStr=_a7b;},namespaces:{"iw":"http://www.ibm.com/xmlns/prod/iWidget"},reservedAttributes:{iScope:"iScope",supportedModes:"supportedModes",id:"id",allowInstanceContent:"allowInstanceContent",lang:"lang","xmlns:iw":"xmlns:iw",supportedWindowStates:"supportedWindowStates","xml:lang":"xml:lang","xml:base":"xml:base"},parseWidgetDefinition:function(){var _a7c=com.ibm.mm.enabler.xslt.loadXmlString(this.xmlStr);var _a7d=this.readRootElement(_a7c);_a7d.markup=this.readMarkup(_a7c);_a7d.itemSetsArr=this.readItemSets(_a7c,_a7d);_a7d.publicEvents=this.readPublicEvents(_a7c);_a7d.resources=this.readResources(_a7c);var _a7e=this.readPayloadDefs(_a7c);if(_a7e){_a7d.payloadDefs=_a7e;}_a7d.eventDescriptions=this.readEventDescriptions(_a7c);_a7d.xmlStr=this.xmlStr;return new com.ibm.mm.iwidget.widget.IWidgetDefinitionImpl(_a7d,this.xmlStr);},readRootElement:function(_a7f){var _a80={};var root=_a7f.documentElement;var _a81=root.getAttribute("supportedModes");if(!_a81){_a81="view";}_a80.supportedModes=_a81;var _a82;var name=root.getAttribute("id");if(!name){name=null;}_a80.id=name;_a80.name=name;var temp=root.getAttribute("allowInstanceContent");var _a83=false;if(temp&&temp=="true"){_a83=true;}_a80.allowInstanceContent=_a83;var lang=root.getAttribute("lang");if(!lang){lang=root.getAttribute("xml:lang");}if(!lang){lang="en";}_a80.lang=lang;var _a84={};var _a85=root.attributes;var i;for(i=0;i<_a85.length;i++){var _a86=_a85[i];if(_a86.name.indexOf("on")===0){var _a87=_a86.value;if(_a87){_a84[_a86.name]=_a87;}}}_a80.widgetEvents=_a84;var _a88=root.getAttribute("iScope");if(!_a88){_a88=null;}_a80.iScope=_a88;var _a89=iwConstants.iDescriptorItems;var _a8a={};for(var j in _a89){if(Object.prototype.hasOwnProperty.call(_a89,j)){name=_a89[j];_a82=root.getAttribute(name);_a8a[name]=_a82;}}_a80.iDescriptor=_a8a;var _a8b={};_a85=root.attributes;for(i=0;i<_a85.length;i++){var att=_a85[i];if(att.name.indexOf("on")!==0&&!iwConstants.iDescriptorItems[att.name]&&!this.reservedAttributes[att.name]){_a82=att.value;if(typeof _a82!="undefined"&&_a82!==null){_a8b[att.name]=_a82;}}}_a80.simpleAttributes=_a8b;var _a8c=root.getAttribute("supportedWindowStates");if(!_a8c){_a8c="normal";}_a80.supportedWindowStates=_a8c;var _a8d=root.getAttribute("xml:base");if(_a8d){_a80.xmlBase=_a8d;}return _a80;},readMarkup:function(_a8e){var _a8f="readMarkup";var _a90=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_a90){this.LOGGER.entering(_a8f,arguments);}var _a91="/iw:iwidget/iw:content";var _a92=com.ibm.mashups.enabler.xml.XPath.evaluateXPath(_a91,_a8e,this.namespaces);var _a93={};var _a94="";var mode=null;if(_a92&&_a92.length>0){for(var i=0,l=_a92.length;i0||(lang&&_aac)){for(var v=0,vL=_aae.length;v=0){_b00=true;_b05.defaultLocale=lang;}else{_b05.value=_b04;}_b01.items[id]=_b05;if(_afe){_afa[_afc]=_b01;}else{_afb[_afc]=_b01;}}}}}_af6.shareableItemSetsArr=_afb;_af6.itemSetsArr=_afa;if(_af8){this.LOGGER.exiting(_af7,_afa);}},readPayloadDefs:function(_b06){var _b07="readPayloadDefs";var _b08=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_b08){this.LOGGER.entering(_b07,arguments);}var _b09={};return _b09;},readPublicEvents:function(_b0a,_b0b){var _b0c="readPublicEvents";var _b0d=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_b0d){this.LOGGER.entering(_b0c,arguments);}var _b0e={};if(_b0d){this.LOGGER.exiting(_b0c,itemSetsArr);}return _b0e;},readResources:function(_b0f){var _b10="readResources";var _b11=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_b11){this.LOGGER.entering(_b10,arguments);}var _b12=[];if(_b11){this.LOGGER.exiting(_b10,itemSetsArr);}return _b12;},readEventDescriptions:function(_b13){var _b14="readEventDescriptions";var _b15=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_b15){this.LOGGER.entering(_b14,arguments);}var _b16={};if(_b15){this.LOGGER.exiting(_b14,itemSetsArr);}return _b16;}});}if(!dojo._hasResource["com.ibm.mm.iwidget.parser.WidgetParserFactory"]){dojo._hasResource["com.ibm.mm.iwidget.parser.WidgetParserFactory"]=true;dojo.provide("com.ibm.mm.iwidget.parser.WidgetParserFactory");dojo.declare("com.ibm.mm.iwidget.parser.WidgetParserFactory",null,{getWidgetParser:function(_b17){var _b18=_b17.replace(/^\s+/,"").replace(/\s+$/,"");var _b19=this._isXML(_b18);var _b1a=this._isLegacy(_b18);var _b1b=this._isOpenSocialGadget(_b18);if(_b19&&_b1a&&!_b1b){return new com.ibm.mm.iwidget.parser.LegacyXMLParser(_b18);}else{if(_b19&&!_b1a&&!_b1b){return new com.ibm.mm.iwidget.parser.StandardXMLParser(_b18);}else{if(_b19&&_b1b){return new com.ibm.mm.iwidget.parser.OpenSocialXMLParser(_b18);}}}return null;},_isOpenSocialGadget:function(_b1c){var _b1d=true;var _b1e=_b1c.indexOf("");if(_b1e===-1){_b1d=false;}return _b1d;},_isXML:function(_b1f){var _b20=true;var _b21=_b1f.indexOf("=\"http://www.w3.org/1999/xhtml\"");if(_b21!=-1){_b20=false;}return _b20;},_isLegacy:function(_b22){var _b23=true;var _b24=_b22.indexOf("=\"http://www.ibm.com/xmlns/prod/iWidget\"");if(_b24!=-1){_b23=false;}return _b23;}});com.ibm.mm.iwidget.parser.WidgetParserFactory=new com.ibm.mm.iwidget.parser.WidgetParserFactory();}if(!dojo._hasResource["com.ibm.mm.iwidget.services.WidgetLoadServiceImpl"]){dojo._hasResource["com.ibm.mm.iwidget.services.WidgetLoadServiceImpl"]=true;dojo.provide("com.ibm.mm.iwidget.services.WidgetLoadServiceImpl");dojo.provide("com.ibm.mm.iwidget.services.WidgetLoadServiceImpl");dojo.declare("com.ibm.mm.iwidget.services.WidgetLoadServiceImpl",null,{constructor:function(){this.widgetDef={};this.LOADING_TOKEN="LOADING_TOKEN";this.LOADING_ERROR_TOKEN="LOADING_ERROR_TOKEN";this.waitingqueue={};this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.bIsLoggable=this.LOGGER.isLoggable(this.LOG_LEVEL);},getWidgetXML:function(_b25,sync,_b26,_b27){if(ibmConfig.dojotest){sync=true;}var _b28=this.widgetDef[_b25];if(_b28&&_b28==this.LOADING_TOKEN){if(!this.waitingqueue[_b25]){this.waitingqueue[_b25]=[];}var _b29={id:_b27,cb:_b26};this.waitingqueue[_b25].push(_b29);return;}else{if(_b28&&_b28.error&&_b28.error==this.LOADING_ERROR_TOKEN){return this.handleCallback(_b26,_b28.data,_b28.status);}else{if(_b28){return this.handleCallback(_b26,_b28,"200");}}}this.widgetDef[_b25]=this.LOADING_TOKEN;var me=this;var _b2a=_b25;if((_b2a.indexOf("http")===0)||(_b2a.indexOf("https")===0)||(_b2a.indexOf("endpoint")===0)){_b2a=com.ibm.mm.enabler.utils.URLHelper.rewriteURL(_b2a);}var args={url:_b2a,ibmMultipart:{context:com.ibm.mashups.enabler.io.XHRMultipartFactory.CONTEXT_ENABLER},load:function(data,_b2b){var xhr=_b2b.xhr;_b2b["com.ibm.mm.Multipart.forceOnNextResponse"]=true;var _b2c=com.ibm.mm.iwidget.parser.WidgetParserFactory.getWidgetParser(xhr.responseText);var _b2d=_b2c.parseWidgetDefinition();me.widgetDef[_b25]=_b2d;me.handleCallback(_b26,_b2d,xhr.status,xhr);var _b2e=me.waitingqueue[_b25];if(_b2e){for(var i in _b2e){if(Object.prototype.hasOwnProperty.call(_b2e,i)){me.handleCallback(_b2e[i].cb,_b2d,xhr.status,xhr);}}me.waitingqueue[_b25]=null;}},error:function(data,_b2f){var xhr=_b2f.xhr;if(xhr.status==404){me.LOGGER.warning("getWidgetXML","Error loading widget xml. "+data.message);}me.widgetDef[_b25]={error:me.LOADING_ERROR_TOKEN,data:data,status:xhr.status};me.handleCallback(_b26,data,xhr.status,xhr);var _b30=me.waitingqueue[_b25];if(_b30){for(var i in _b30){if(Object.prototype.hasOwnProperty.call(_b30,i)){me.handleCallback(_b30[i].cb,data,xhr.status,xhr);}}me.waitingqueue[_b25]=null;}},handleAs:"text",sync:sync};dojo.xhrGet(args);return;},handleCallback:function(_b31,data,_b32,xhr){if(_b31){_b31(data,_b32,xhr);}}});com.ibm.mashups.services.ServiceManager.setService("widgetLoadService",new com.ibm.mm.iwidget.services.WidgetLoadServiceImpl());}if(!dojo._hasResource["com.ibm.mm.enabler.logging.LegacyLoggerStatus"]){dojo._hasResource["com.ibm.mm.enabler.logging.LegacyLoggerStatus"]=true;dojo.provide("com.ibm.mm.enabler.logging.LegacyLoggerStatus");dojo.declare("com.ibm.mm.enabler.logging.LegacyLoggerStatus.StatusType",null,{constructor:function(id,_b33,_b34,_b35,_b36){this._id=id;this._styleClass=_b33;this._iconPath=_b34;this._iconAlt=_b35;this._color=_b36;}});dojo.declare("com.ibm.mm.enabler.logging.LegacyLoggerStatus.StatusMessage",null,{constructor:function(type,_b37,_b38){this._type=type;this._message=_b37;this._details=_b38;},render:function(_b39){var _b3a=com.ibm.mm.enabler.logging.LegacyLoggerStatus.statusTypesMap.getStatusType(this._type);var msg=[];msg[msg.length]="
";msg[msg.length]="
";msg[msg.length]="
";var _b3b=this._message;if(this._type==="error"){var _b3c=_b3b.split(":");var _b3d=_b3c.shift()+":";_b3b=_b3c.join(":");msg[msg.length]="
";msg[msg.length]=_b3d;msg[msg.length]="
";}msg[msg.length]="
";msg[msg.length]=_b3b;msg[msg.length]="
";if(this._details&&this._details.length>0){msg[msg.length]="
";msg[msg.length]=this._details;msg[msg.length]="
";}msg[msg.length]="
";_b39.innerHTML=msg.join("");}});dojo.declare("com.ibm.mm.enabler.logging.LegacyLoggerStatus.StatusTypesMap",null,{constructor:function(){this._baseURL=dojo.moduleUrl("com.ibm.mm.enabler","image/");this.constants={"ERROR":"error","WARN":"warn","INFO":"info"};this.internalStatusTypeMap=null;},getStatusType:function(type){if(this.internalStatusTypeMap===null){var _b3e=dojo.i18n.getLocalization("com.ibm.mm.enabler","iwStr");this.internalStatusTypeMap={};this.internalStatusTypeMap.error=new com.ibm.mm.enabler.logging.LegacyLoggerStatus.StatusType(0,"error",this._baseURL+"error.gif",_b3e.ERROR,"#FF0000");this.internalStatusTypeMap.warn=new com.ibm.mm.enabler.logging.LegacyLoggerStatus.StatusType(1,"warning",this._baseURL+"warning.gif",_b3e.WARNING,"FFFF00");this.internalStatusTypeMap.info=new com.ibm.mm.enabler.logging.LegacyLoggerStatus.StatusType(2,"info",this._baseURL+"info.gif",_b3e.INFO,"#0077FF");}return this.internalStatusTypeMap[type];}});com.ibm.mm.enabler.logging.LegacyLoggerStatus.statusTypesMap=new com.ibm.mm.enabler.logging.LegacyLoggerStatus.StatusTypesMap();}if(!dojo._hasResource["com.ibm.mm.enabler.logging.LegacyLogger"]){dojo._hasResource["com.ibm.mm.enabler.logging.LegacyLogger"]=true;dojo.provide("com.ibm.mm.enabler.logging.LegacyLogger");com.ibm.mm.enabler.logging.LegacyLogger.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger("com.ibm.mm.enabler.logging.LegacyLogger");com.ibm.mm.enabler.logging.LegacyLogger.Constants={MMLogging:"/mm/logging",MMStatusMsg:"/mm/statusMsg",MMTracing:"/mm/tracing",LOG:"log",INFO:"info",WARN:"warn",ERROR:"error"};com.ibm.mm.enabler.logging.LegacyLogger.getObjectArryFromArguments=function(args){if(args.length==1){return null;}var _b3f=[];for(var i=1;i/g,">");return _b46;};com.ibm.mm.enabler.logging.LegacyLogger.info=function(_b47){var _b48=com.ibm.mm.enabler.logging.LegacyLogger.getObjectArryFromArguments(arguments);var msg=com.ibm.mm.enabler.logging.LegacyLogger.LOGGER._getMessageString(_b48);com.ibm.mm.enabler.logging.LegacyLogger.LOGGER.info(_b47,msg);};com.ibm.mm.enabler.logging.LegacyLogger.warn=function(_b49){var _b4a=com.ibm.mm.enabler.logging.LegacyLogger.getObjectArryFromArguments(arguments);var msg=com.ibm.mm.enabler.logging.LegacyLogger.LOGGER._getMessageString(_b4a);com.ibm.mm.enabler.logging.LegacyLogger.LOGGER.warning(_b49,msg);};com.ibm.mm.enabler.logging.LegacyLogger.error=function(_b4b){var _b4c=com.ibm.mm.enabler.logging.LegacyLogger.getObjectArryFromArguments(arguments);var msg=com.ibm.mm.enabler.logging.LegacyLogger.LOGGER._getMessageString(_b4c);com.ibm.mm.enabler.logging.LegacyLogger.LOGGER.severe(_b4b,msg);};com.ibm.mm.enabler.logging.LegacyLogger._log=function(type,args){if(com.ibm.mm.enabler.logging.LegacyLogger.isLogging){if(args.length>=2&&dojo.isString(args[1])){var arr=[];arr.push(args[0]+args[1]);for(var i=2;i0){var _b77=_b76[0].getSourceWidgetID();_b75.removeWire(_b77);this.commit();_b76=_b75.getWires();}}var _b78=null;if(_b75){_b78=_b75.getTargets();}if(_b78){var _b79=com.ibm.mashups.iwidget.model.Factory.getGlobalWidgetModel();for(var i in _b78){if(Object.prototype.hasOwnProperty.call(_b78,i)){var _b7a=_b79.find(i);if(_b7a){var _b7b=_b7a.getIWidgetInstance().getWireModel();_b7b.removeWire(this.id);_b7a.commit();}}}}for(var i2 in this.subHandler){if(Object.prototype.hasOwnProperty.call(this.subHandler,i2)){for(var j in this.subHandler[i2]){if(Object.prototype.hasOwnProperty.call(this.subHandler[i2],j)){this.eventSvr.unsubscribeEvent(this.subHandler[i2][j]);}}}}this.eventSvr._getHubAdapter(this.id).removeIframeHubContainer(this.id);if(this.windowManager){this.windowManager=null;}},update2:function(span){return;},_getParent:function(){if(!this.parent){this.parent=com.ibm.mm.iwidget.Utils.getWidgetParent(this.rootElement);}this.parent=this.parent||null;return this.parent;},_setParent:function(_b7c){this.parent=_b7c;},_getPublishedEvents:function(){var _b7d=this.getWidgetPublishedEvents();var arr={};if(dojo.isArray(_b7d)){for(var i=0,l=_b7d.length;i ."+that.ns+"loading",that.rootElement).forEach(function(elem){com.ibm.mm.enabler.utils.Dom.destroyNode(elem);});dojo.query("."+that.currentMode,that.rootElement).style({"visibility":""});}});that.subHandler[id].push(_ba7);var _ba9=that.eventSvr.subscribeEvent(com.ibm.mashups.iwidget.Constants.RESIZE_WIDGET+"."+that.id,that,"handleSizeChanged");that.subHandler[id].push(_ba9);};if(_b9f.isLoaded()&&_b9e&&_b9e=="false"){_b9f.loaded=false;_b9f._getInstanceMarkup(eventCallbackContinue);}else{eventCallbackContinue(_b9d);}};var _baa=_b9f.eventSvr.subscribeEvent(_b9f.eventSvr.WIDGETEVENT_PREFIX+id+"."+"onFrameLoaded",null,eventCallback);_b9f.subHandler[id].push(_baa);var _bab=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME);var url=window.location.protocol;var host=window.location.hostname;var _bac=_bab.getValue(com.ibm.mashups.enabler.services.ConfigConstants.SERVERDOMAIN);if(_bac&&_bac!="null"){host=_bac;}var port=window.location.port;var path=window.location.pathname;var _bad=_bab.getValue(com.ibm.mashups.enabler.services.ConfigConstants.CONTEXT_ROOT);var _bae=null;if(path.indexOf(_bad)>0){_bae=path.slice(0,path.indexOf(_bad));}if(_b9f._getSubDomain()){var _baf=_b9f._getSubDomain()+"."+host;if(_bab.getValue("sandbox.disable.subdomains")){_baf=host;}if(port!=""){url+="//"+_baf+":"+port;}else{url+="//"+_baf;}if(_bae){url+=_bae;}url+=_bab.getValue(com.ibm.mashups.enabler.services.ConfigConstants.CONTEXT_ROOT_ENABLER);url+="/widgetsandbox";_b9f.eventSvr._getHubAdapter().createIframeHubContainer(id,root,url,_b9e,null,null,dojo.hitch(this,"_onSecurityAlert"));}else{var _bb0=_b9f.eventSvr._getHubAdapter().getSubDomainSize();var _bb1=unescape(_b9f.getIWidgetInstance().getIDescriptorItems().getItemValue("title",dojo.locale));if(!_bb1){_bb1=_b9f.getID();}var _bb2=_bab.getValue(com.ibm.mashups.enabler.services.ConfigConstants.SUBDOMAINREUSE);var fmt=_b9f.iwMessages.E_SUBDOMAIN_NOTAVAILABLE1_2;if(_bb2){fmt=_b9f.iwMessages.E_SUBDOMAIN_NOTAVAILABLE_2;}var _bb3=dojo.string.substitute(fmt,[_bb1,_bb0]);var _bb4=[];com.ibm.mm.iwidget.Utils.findElementByAttribute("query","> ."+_b9f.ns+"loading",_b9f.rootElement,_bb4,false);if(_bb4.length>0){aNode=_bb4[0];aNode.innerHTML="";com.ibm.mm.enabler.logging.LegacyLogger.logInlineMessage(aNode,"error",_bb3);}}},_onSecurityAlert:function(_bb5,_bb6){if(_bb6&&_bb6=="OpenAjax.hub.SecurityAlert.FramePhish"){var me=this;setTimeout(function(){me._handleIframeMove(_bb5);},0);}else{this.LOGGER.trace("_onSecurityAlert","securityAlert:"+_bb6);}},_handleIframeMove:function(_bb7){this.eventSvr._getHubAdapter(this.id).returnSubDomain(this._getSubDomain());var _bb8=this.windowManager[this.currentMode];var id=_bb8.id;var root=_bb8.root||null;if(root===null){var _bb9=this._getDefaultMode()||iwConstants.mode_view;var _bba=this.windowManager[_bb9]||null;if(_bba!==null){root=_bba.root||null;}}try{for(var j in this.subHandler[id]){if(Object.prototype.hasOwnProperty.call(this.subHandler[id],j)){this.eventSvr.unsubscribeEvent(this.subHandler[id][j]);}}}catch(e){this.LOGGER.trace("_handleIframeMove","FramePHishing"+" error:"+e.message);}this.eventSvr._getHubAdapter(id).removeIframeHubContainer(id);this._getInstanceMarkup(dojo.hitch(this,function(_bbb){this._createIframe(_bbb,root,id,"false",this);}));},_getSubDomain:function(){if(!this.subDomain){this.subDomain=this.eventSvr._getHubAdapter().getSubDomain();}return this.subDomain;},_handleDataSync:function(_bbc){if(_bbc&&_bbc.attributes){var _bbd=_bbc.attributes;this._syncModifiableProperties(_bbd,this.getIWidgetInstance().getAttributes());this._syncAttributes(_bbd,this.getAttributes());}if(_bbc&&_bbc.wiremodel){var _bbe=_bbc.wiremodel;this._syncWireModel(_bbe,this.getIWidgetInstance().getWireModel());}this.commit(true);},_syncWireModel:function(_bbf,_bc0){var _bc1=_bbf._wires;for(var i in _bc1){if(Object.prototype.hasOwnProperty.call(_bc1,i)){var _bc2=_bc1[i];if(_bc2._isDirty&&_bc2._type&&_bc2._type=="NEW"){_bc0.addWire(_bc2.SourceWidget,_bc2.SourceEvent,_bc2.TargetEvent);}else{if(_bc2._isDirty&&_bc2._type&&_bc2._type=="DELETE"){_bc0.removeWire(_bc2.SourceWidget,_bc2.SourceEvent,_bc2.TargetEvent);}}}}var _bc3=_bbf._targets;_bc0._targets=_bc3;},_syncModifiableProperties:function(_bc4,_bc5){_bc5._updateProperties(_bc4);},_syncAttributes:function(_bc6,_bc7){var _bc8="newItem";var _bc9="updatedValue";var _bca="removedItem";for(var att in _bc6){if(Object.prototype.hasOwnProperty.call(_bc6,att)){var item=_bc6[att];if(item._dirty){if(item._change.changeType==_bca){_bc7.removeItem(item.id);}else{_bc7.setItemValue(item.id,item.value,item.readOnly);}}}}_bc7.commit();},handleSizeChanged:function(_bcb){var _bcc=this.windowManager[this.currentMode];var id=this.id;if(!_bcc.main){id=this.id+"_"+this.currentMode;}var root=_bcc.root;var _bcd=root.childNodes[0];if(_bcb.newWidth){var _bce=parseInt(_bcb.newWidth,10);_bce=_bce-5;dojo.style(_bcd,"width",_bce+"px");}if(_bcb.newHeight){var _bcf=parseInt(_bcb.newHeight,10);_bcf=_bcf-5;dojo.style(_bcd,"height",_bcf+"px");}this.eventSvr._publishEvent(com.ibm.mashups.iwidget.Constants.RESIZE_WIDGET+id,_bcb);},getCSSUrl:function(){var that=this;if(this.themeCSS){return this.themeCSS;}dojo.forEach(document.getElementsByTagName("link"),function(_bd0){if(_bd0.href&&_bd0.href.indexOf("theme.css")!=-1){var _bd1=_bd0.href.length-9;if(_bd0.href.indexOf("theme.css")==_bd1){that.themeCSS=_bd0.href;}}else{if(_bd0.href&&_bd0.href.indexOf("theme_rtl.css")!=-1){var _bd2=_bd0.href.length-13;if(_bd0.href.indexOf("theme_rtl.css")==_bd2){that.themeCSS=_bd0.href;}}}});return this.themeCSS;},_handleOnNavStateChanged:function(_bd3){var _bd4=_bd3.payload;if(_bd4){var _bd5=com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel();var _bd6=com.ibm.mashups.enabler.model.state.AccessorFactory.getWidgetAccessor(_bd5,this.id);_bd6.setWidgetState("cp",_bd4);var _bd7=_bd5.commit();_bd7.start();}}});}if(!dojo._hasResource["com.ibm.mm.iwidget.RenderController"]){dojo._hasResource["com.ibm.mm.iwidget.RenderController"]=true;dojo.provide("com.ibm.mm.iwidget.RenderController");dojo.declare("com.ibm.mm.iwidget.RenderController",null,{constructor:function(_bd8){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.widgetwrapper=_bd8;this.widgetXMLUrl=this.widgetwrapper.getIWidgetInstance().widgetXMLUrl;this.iwStr=dojo.i18n.getLocalization("com.ibm.mm.enabler","iwStr");this.iwMessages=dojo.i18n.getLocalization("com.ibm.mm.enabler","iwMessages");},render:function(){this._loadWidgetDefinition();},_resourceBaseURL:dojo.moduleUrl("com.ibm.mm.iwidget","image/"),_setLoading:function(){var _bd9=document.createElement("div");_bd9.className=this.widgetwrapper.ns+"loading";if(ibmConfig&&ibmConfig.loadingHTML){_bd9.innerHTML=ibmConfig.loadingHTML;}else{if(ibmConfig&&ibmConfig["loadingHTML.imageURL"]){_bd9.innerHTML=""+this.iwStr.LOAD+" "+this.iwStr.LOAD;}else{_bd9.innerHTML=""+this.iwStr.LOAD+" "+this.iwStr.LOAD;}}this.widgetwrapper.rootElement.appendChild(_bd9);},_loadWidgetDefinition:function(){var _bda="_loadWidgetDefinition";var _bdb=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_bdb){this.LOGGER.entering(_bda,arguments);}var _bdc=this.widgetwrapper.rootElement;if(this.widgetwrapper.loaded){return false;}this._setLoading();if(this.widgetXMLUrl!==null){var _bdd=com.ibm.mashups.services.ServiceManager.getService("widgetLoadService");_bdd.getWidgetXML(this.widgetXMLUrl,false,dojo.hitch(this,"handleWidgetInfoRetrieved"),this.widgetwrapper.id);}else{return false;}if(_bdb){this.LOGGER.exiting(_bda,true);}return true;},handleWidgetInfoRetrieved:function(data,_bde,xhr){var _bdf="handleWidgetInfoRetrieved";var _be0=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_be0){this.LOGGER.entering(_bdf,arguments);}var _be1;if(_bde=="200"||_bde=="0"){this.widgetwrapper.setIWidgetDefinition(data);this.widgetDef=data;}else{if(!this._isWidgetInstalled()){this._handleInlineWidgetNotInstalledMessage(this.iwStr.WIDGET_NOT_INSTALLED,this.iwStr.WIDGET_NOT_INSTALLED_SUB,data.message);}else{_be1=unescape(this.widgetwrapper.getIWidgetInstance().getIDescriptorItems().getItemValue("title",dojo.locale));if(!_be1){_be1=this.widgetXMLUrl;}this._handleInlineMessage("error",dojo.string.substitute(this.iwMessages.E_IWIDGETDEF_NOTAVAILABLE_1,[_be1]),data.message);}return;}var _be2=this.isSandboxed();if(dojo.isIE<7&&_be2){_be1=unescape(this.widgetwrapper.getIWidgetInstance().getIDescriptorItems().getItemValue("title",dojo.locale));if(!_be1){_be1=this.widgetXMLUrl;}this._handleInlineMessage("error",dojo.string.substitute(this.iwMessages.E_NODISPLAY_UNSECUREWIDGET_1,[_be1]));return;}this._doRender(_be2);if(_be0){this.LOGGER.exiting(_bdf);}},_isWidgetInstalled:function(){try{var _be3=com.ibm.mashups.enabler.catalog.Factory.getCatalogCategoryModel();_be3.setStrategy(new com.ibm.mashups.enabler.strategy.ListLoadAheadStrategy(25));var _be4=null;var _be5=null;var _be6=_be3.getRoot().start();var _be7=_be3.getChildren(_be6);while(_be7.hasNext()){var _be8=_be7.next();_be4=_be3.getCatalogEntryModel(_be8);var _be9=_be4.iterator();_be9.setCursorPosition(0);while(_be9.hasNext()){var _bea=_be9.next();var _beb=decodeURIComponent(this.widgetXMLUrl);if(_beb.indexOf(_bea.getDefinitionURL(false))>=0){return true;}}}}catch(e){return true;}return false;},isSandboxed:function(){var _bec=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME);var _bed=_bec.getValue(com.ibm.mashups.enabler.services.ConfigConstants.SANDBOXENABLED);if(!_bed){return false;}var _bee=document.location+"";_bed=false;var _bef=this.widgetDef.getAttributes()||null;if(_bef){var _bf0=_bef.getItemValue("sandbox");if(typeof _bf0!="undefined"&&_bf0!==null){if(_bf0=="true"){_bed=true;}}}if(!_bed){if(this.widgetwrapper.rootElement.getAttribute("sandbox")!==null&&this.widgetwrapper.rootElement.getAttribute("sandbox")=="true"){_bed=true;}}if(!_bed){if(this.widgetwrapper.rootElement.className.indexOf(iwConstants.CSSCLASS_INSTANCE.iwSandbox)>0){_bed=true;}}if(_bed){if(this._isSandboxDisabledWidget(this.widgetXMLUrl)){_bed=false;}}return _bed;},_isSandboxDisabledWidget:function(_bf1){var _bf2=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME);var temp=_bf2.getValue(com.ibm.mashups.enabler.services.ConfigConstants.WIDGETDEFID_SANDBOX_DISABLED);var _bf3=temp;if(dojo.isString(_bf3)){_bf3=[temp];}if(_bf3.length===0){return false;}for(var i=0;i<_bf3.length;i++){if(dojo.string.trim(_bf1)===dojo.string.trim(_bf3[i])){return true;}else{if(dojo.string.trim(_bf1).indexOf(dojo.string.trim(_bf3[i]))!=-1&&dojo.string.trim(_bf3[i]).indexOf("/")!==0){return true;}else{if(dojo.string.trim(_bf1).indexOf(dojo.string.trim(_bf3[i]))!=-1&&dojo.string.trim(_bf3[i]).indexOf("/")===0&&dojo.string.trim(_bf1).indexOf(":")!=-1){var buf=_bf1.split("//");var _bf4=buf[0];var buf2=buf[1].split("/");var host=buf2[0];if(_bf4==window.location.protocol&&window.location.host==host){return true;}else{if(_bf4==window.location.protocol&&_bf4=="http:"&&host.indexOf(window.location.host)===0){if(host.substr(host.indexOf(":")+1)=="80"){return true;}}else{if(_bf4==window.location.protocol&&_bf4=="https:"&&host.indexOf(window.location.host)===0){if(host.substr(host.indexOf(":")+1)=="443"){return true;}}}}}}}}return false;},_handleInlineMessage:function(type,_bf5,_bf6){var _bf7=[];com.ibm.mm.iwidget.Utils.findElementByAttribute("query","> ."+this.widgetwrapper.ns+"loading",this.widgetwrapper.rootElement,_bf7,false);var _bf8=_bf7[0];_bf8.innerHTML="";com.ibm.mm.enabler.logging.LegacyLogger.logInlineMessage(_bf8,type,_bf5,_bf6);},_handleInlineWidgetNotInstalledMessage:function(_bf9,_bfa,_bfb){var _bfc=[];com.ibm.mm.iwidget.Utils.findElementByAttribute("query","> ."+this.widgetwrapper.ns+"loading",this.widgetwrapper.rootElement,_bfc,false);var _bfd=_bfc[0];var msg=[];msg[msg.length]="
";msg[msg.length]="
";msg[msg.length]="
";msg[msg.length]="
";msg[msg.length]=_bf9;msg[msg.length]="
";if(_bfa&&_bfa.length>0){msg[msg.length]="
";msg[msg.length]=_bfa;msg[msg.length]="
";}msg[msg.length]="
";_bfd.innerHTML=msg.join("");com.ibm.mm.enabler.logging.LegacyLogger._publishStatusMsg("info",_bf9,_bfb);},_doRender:function(_bfe){var _bff=com.ibm.mashups.services.ServiceManager.getService("eventService");if(_bfe){dojo.mixin(this.widgetwrapper,new com.ibm.mm.iwidget.widget.IWidgetWrapperStubImpl());}else{_bff._getHubAdapter().createInlineHubContainer(this.widgetwrapper.id);_bff._getHubAdapter().createInlineHubClient(this.widgetwrapper.id);}this.widgetwrapper.doRender();}});}if(!dojo._hasResource["com.ibm.mm.iwidget.model.WidgetModelExtended"]){dojo._hasResource["com.ibm.mm.iwidget.model.WidgetModelExtended"]=true;dojo.provide("com.ibm.mm.iwidget.model.WidgetModelExtended");dojo.declare("com.ibm.mm.iwidget.model.WidgetModelExtendedImpl",com.ibm.mm.iwidget.model.WidgetModelDefaultImpl,{_onWindowUnload:function(){var _c00=com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel();if(_c00){var _c01=com.ibm.mashups.enabler.model.state.AccessorFactory.getPageModeAccessor(_c00);_c01.setPageMode("unload");}try{var arr=[];for(var i in this.widgetArr){if(Object.prototype.hasOwnProperty.call(this.widgetArr,i)){this._unloadWidget(i);}}}catch(e){console.log("_onWindowUnload "+e.message);}},renderWidget:function(_c02){if(typeof _c02=="undefined"){return;}if(_c02.loaded||_c02.loading){return;}_c02.loading=true;var _c03=new com.ibm.mm.iwidget.RenderController(_c02);_c03.render();},getWidgetById:function(id){return this.find(id);}});com.ibm.mm.iwidget.model.WidgetModelImpl=com.ibm.mm.iwidget.model.WidgetModelExtendedImpl;}if(!dojo._hasResource["com.ibm.mm.iwidget.services.EventServiceExtended"]){dojo._hasResource["com.ibm.mm.iwidget.services.EventServiceExtended"]=true;dojo.provide("com.ibm.mm.iwidget.services.EventServiceExtended");dojo.declare("com.ibm.mm.iwidget.services.EventServiceExtendedImpl",com.ibm.mm.iwidget.services.EventServiceDefaultImpl,{registerExtServices:function(){var _c04=com.ibm.mashups.iwidget.Constants.WIDGET_WINDOWSTATECHANGED;var me=this;var _c05=function(_c06){var _c07=_c06.id;var _c08=_c06.newWindowState;var _c09=_c06.oldWindowState;me.fireEvent(_c07,"onWindowStateChanged",{newWindowState:_c08,oldWindowState:_c09});};this.subscribeEvent(_c04,null,_c05,null,null);},subscribeWire:function(_c0a,_c0b,_c0c,_c0d){if(this.bIsLoggable){this.LOGGER.entering("eventService.subscribeWire",[_c0a,_c0b,_c0c,_c0d]);}if(typeof _c0a=="undefined"||_c0a===null){return false;}if(typeof _c0b=="undefined"||_c0b===null){return false;}if(typeof _c0c=="undefined"||_c0c===null){return false;}if(typeof _c0d=="undefined"||_c0d===null){return false;}var rc=true;var that=this;function eventCallback(_c0e,_c0f,_c10){that.fireEvent(_c0c,_c0d,_c0f.payload,_c0f.payloadType,_c0a);};function callback(item,_c11,_c12){if(!_c11){console.log("eventService.subscribeWire subscribe failed "+"source:"+_c0a+" sourceEvent:"+_c0b+" targetWidget:"+_c0c+" targetEvent:"+_c0d);}};var _c13;var _c14=this.hubAdapter._getInlineHubClient(_c0c);if(_c14){var _c15=this._generateWireId(_c0a,_c0b,_c0c,_c0d);if(this.subMgr[_c15]){return true;}var _c16=_c14.subscribe(this.WIDGETEVENT_PREFIX+_c0a+"."+_c0b,eventCallback,null,callback);this.subMgr[_c15]=_c16;_c13={};_c13.targetWidget=_c0c;_c13.sourceEvent=_c0b;_c13.sourceWidget=_c0a;_c13.targetEvent=_c0d;this.fireEvent(_c0a,"onNewWire",_c13);}var _c17=this.hubAdapter.isInlineClient(_c0c);if(!_c17){var _c18="eventservice."+_c0c;_c13={};_c13.methodname="subscribeWire";_c13.sourceWidget=_c0a;_c13.sourceEvent=_c0b;_c13.targetWidget=_c0c;_c13.targetEvent=_c0d;_c13.hubclient="main";this._publishEvent(_c18,_c13);rc=true;}return rc;},publishWire:function(_c19,_c1a,_c1b,_c1c){_c1b=this._serializePayload(_c1b);if(this.bIsLoggable){this.LOGGER.entering("eventService.publishWire",[_c19,_c1a,_c1b,_c1c]);}if(typeof _c19=="undefined"||_c19===null){return false;}if(typeof _c1a=="undefined"||_c1a===null){return false;}var _c1d=this.hubAdapter._getInlineHubClient(_c19);if(_c1d){_c1d.publish(this.WIDGETEVENT_PREFIX+_c19+"."+_c1a,{"payload":_c1b,"payloadType":_c1c});}return true;},_serializePayload:function(_c1e){if(typeof _c1e=="object"&&_c1e.toJson){_c1e=_c1e.toJson();}return _c1e;},unSubscribeWire:function(_c1f,_c20,_c21,_c22){if(typeof _c1f=="undefined"||_c1f===null){return false;}if(typeof _c20=="undefined"||_c20===null){return false;}if(typeof _c21=="undefined"||_c21===null){return false;}if(typeof _c22=="undefined"||_c22===null){return false;}var _c23;var _c24=this.hubAdapter._getInlineHubClient(_c21);if(_c24){var _c25=this._generateWireId(_c1f,_c20,_c21,_c22);var _c26=this.subMgr[_c25];if(_c26){this.unsubscribeEvent(_c26,_c21);delete this.subMgr[_c25];}_c23={};_c23.targetWidget=_c21;_c23.targetEvent=_c22;_c23.sourceWidget=_c1f;_c23.sourceEvent=_c20;this.fireEvent(_c21,"onRemoveWire",_c23);this.fireEvent(_c1f,"onRemoveWire",_c23);this.publishEvent(iwConstants.EVENTS.unSubscribeWire,{wires:[_c23]});}var _c27=this.hubAdapter.isInlineClient(_c21);if(!_c27){var _c28="eventservice."+_c21;_c23={};_c23.methodname="unSubscribeWire";_c23.sourceWidget=_c1f;_c23.sourceEvent=_c20;_c23.targetWidget=_c21;_c23.targetEvent=_c22;_c23.hubclient="main";this._publishEvent(_c28,_c23);rc=true;}return true;},addWire:function(_c29,_c2a,_c2b,_c2c){if(this.bIsLoggable){this.LOGGER.entering("eventService.addWire",[_c29,_c2a,_c2b,_c2c]);}if(typeof _c29=="undefined"||_c29===null){return false;}if(typeof _c2a=="undefined"||_c2a===null){return false;}if(typeof _c2b=="undefined"||_c2b===null){return false;}if(typeof _c2c=="undefined"||_c2c===null){return false;}var rc=false;var _c2d=this.hubAdapter.isInlineClient(_c2b);if(!_c2d){var _c2e="eventservice."+_c2b;var _c2f={};_c2f.methodname="addWire";_c2f.params=arguments;_c2f.hubclient="main";this._publishEvent(event,_c2f);rc=true;}else{rc=this.subscribeWire(_c29,_c2a,_c2b,_c2c);if(rc){var _c30=com.ibm.mashups.iwidget.model.Factory.getGlobalWidgetModel().getWidgetById(_c2b);if(typeof _c30!="undefined"&&_c30!==null){var _c31={};_c31.SourceWidget=_c29;_c31.SourceEvent=_c2a;_c31.TargetEvent=_c2c;var _c32=_c30.getIWidgetInstance();var _c33=new com.ibm.mm.iwidget.widget.WireImpl(_c2b,_c31);_c32._addWire(_c33);}}}return rc;},removeWire:function(_c34,_c35,_c36,_c37){if(this.bIsLoggable){this.LOGGER.entering("eventService.removeWire",[_c34,_c35,_c36,_c37]);}if(typeof _c34=="undefined"||_c34===null){return false;}if(typeof _c35=="undefined"||_c35===null){return false;}if(typeof _c36=="undefined"||_c36===null){return false;}if(typeof _c37=="undefined"||_c37===null){return false;}var rc=false;var _c38=this.hubAdapter.isInlineClient(_c36);if(!_c38){var _c39="eventservice."+_c36;var _c3a={};_c3a.methodname="removeWire";_c3a.params=arguments;_c3a.hubclient="main";this._publishEvent(event,_c3a);rc=true;}else{rc=this.unSubscribeWire(_c34,_c35,_c36,_c37);if(rc){var _c3b=com.ibm.mashups.iwidget.model.Factory.getGlobalWidgetModel().getWidgetById(_c36);if(typeof _c3b!="undefined"&&_c3b!==null){var _c3c={};_c3c.SourceWidget=_c34;_c3c.SourceEvent=_c35;_c3c.TargetEvent=_c37;var _c3d=_c3b.getIWidgetInstance();var _c3e=new com.ibm.mm.iwidget.widget.WireImpl(_c36,_c3c);_c3d._removeWire(_c3e.getID());}}}return rc;}});if(!ibmConfig.insideSandbox){com.ibm.mashups.services.ServiceManager.setService("eventService","com.ibm.mm.iwidget.services.EventServiceExtendedImpl");}if((ibmConfig.enablerLayerModules)&&(dojo.indexOf(ibmConfig.enablerLayerModules,"CoreModel")>=0)){dojo["require"]("com.ibm.mm.enabler.iwidget.services.EventServiceModel");}}if(!dojo._hasResource["com.ibm.mm.iwidget.services.IFrameEventServiceImpl"]){dojo._hasResource["com.ibm.mm.iwidget.services.IFrameEventServiceImpl"]=true;dojo.provide("com.ibm.mm.iwidget.services.IFrameEventServiceImpl");dojo.declare("com.ibm.mm.iwidget.services.IFrameEventServiceImpl",com.ibm.mashups.iwidget.services.EventService,{constructor:function(){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.subMgr={};this.eventQueue=[];this._hubClient=null;this.getHubClient();this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.bIsLoggable=this.LOGGER.isLoggable(this.LOG_LEVEL);},getType:function(){return com.ibm.mm.iwidget.Constants.eventservice.type.IFRAME;},PREFIX_IFRAME:"_iframe_",getHubClient:function(){if(this._hubClient){return this._hubClient;}var that=this;function onHubClientSecurityAlert(_c3f,_c40){if(that.bIsLoggable){that.LOGGER.trace("onHubClientSecurityAlert","security alert from "+_c3f.getClientID());}};var _c41=new OpenAjax.hub.IframeHubClient({HubClient:{onSecurityAlert:onHubClientSecurityAlert}});function onHubClientConnect2(_c42,_c43,_c44){if(!_c43){if(that.bIsLoggable){that.LOGGER.trace("onHubClientConnect2","!! client connection error = id: '"+_c42.getClientID()+"' msg: '"+_c44);}}var id=_c42.getClientID();id=id.slice(8);that.setId(id);that._hubClient=_c42;that._subscribeEventService();for(var i in that.eventQueue){if(Object.prototype.hasOwnProperty.call(that.eventQueue,i)){var args=that.eventQueue[i];args[0]="widgetevents."+id+args[0];that._subscribeEvent.apply(that,args);}}};function onHubClientDisconnect(_c45,_c46,_c47){if(!_c46){if(that.bIsLoggable){that.LOGGER.trace("onHubClientDisconnect2","!! client disconnection error = id: '"+_c45.getClientID()+"' msg: '"+_c47);}}_c45.connect(onHubClientConnect2);};_c41.connect(onHubClientConnect2);return null;},disconnectHubClient:function(){if(!this._hubClient){return;}this._hubClient.disconnect();this._hubClient=null;},setId:function(id){this.id=id;},getId:function(){return this.id;},_subscribeEventService:function(){var that=this;function eventCallback(_c48,_c49,_c4a){var _c4b=_c49.methodname;if((_c4b=="subscribeWire")||(_c4b=="unSubscribeWire")){var fn=that[_c49.methodname];if(fn){fn.apply(that,[_c49.sourceWidget,_c49.sourceEvent,_c49.targetWidget,_c49.targetEvent]);}}else{if(_c4b){var fn=that[_c49.methodname];if(fn){fn.apply(that,_c49.params);}}}};this._hubClient.subscribe("eventservice."+this.getId(),eventCallback,this,this._subscribeCallback);},_subscribeCallback:function(_c4c,_c4d,_c4e){if(!_c4d){}},WIDGETEVENT_PREFIX:iwConstants.WIDGETEVENT_PREFIX,WILDCARD_PREFIX:iwConstants.WILDCARD_PREFIX,subscribeWire:function(_c4f,_c50,_c51,_c52){var _c53="subscribeWire";var _c54=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_c54){this.LOGGER.entering(_c53,arguments);}if(typeof _c4f=="undefined"||_c4f===null){return false;}if(typeof _c50=="undefined"||_c50===null){return false;}if(typeof _c51=="undefined"||_c51===null){return false;}if(typeof _c52=="undefined"||_c52===null){return false;}var rc=true;var that=this;function eventCallback(_c55,_c56,_c57){that.fireEvent(_c51,_c52,_c56.payload,_c56.payloadType,_c4f);};function callback(item,_c58,_c59){if(!_c58){if(that.bIsLoggable){that.LOGGER.trace("subscribeWire","eventService.subscribeWire subscribe failed "+"source:"+_c4f+" sourceEvent:"+_c50+" targetWidget:"+_c51+" targetEvent:"+_c52);}}};var _c5a=this._hubClient.subscribe(this.WIDGETEVENT_PREFIX+_c4f+"."+_c50,eventCallback,null,callback);var _c5b=this._generateWireId(_c4f,_c50,_c51,_c52);this.subMgr[_c5b]=_c5a;var _c5c={};_c5c.targetWidget=_c51;_c5c.sourceEvent=_c50;_c5c.sourceWidget=_c4f;_c5c.targetEvent=_c52;this.fireEvent(_c4f,"onNewWire",_c5c);return rc;},publishWire:function(_c5d,_c5e,_c5f,_c60){_c5f=this._serializePayload(_c5f);if(typeof _c5d=="undefined"||_c5d===null){return false;}if(typeof _c5e=="undefined"||_c5e===null){return false;}this._hubClient.publish(this.WIDGETEVENT_PREFIX+_c5d+"."+_c5e,{"payload":_c5f,"payloadType":_c60});return true;},_serializePayload:function(_c61){if(typeof _c61=="object"&&_c61.toJson){_c61=_c61.toJson();}return _c61;},unSubscribeWire:function(_c62,_c63,_c64,_c65){if(typeof _c62=="undefined"||_c62===null){return false;}if(typeof _c63=="undefined"||_c63===null){return false;}if(typeof _c64=="undefined"||_c64===null){return false;}if(typeof _c65=="undefined"||_c65===null){return false;}var _c66=this._generateWireId(_c62,_c63,_c64,_c65);var _c67=this.subMgr[_c66];if(_c67){this._unsubscribeEvent(_c67,_c65);delete this.subMgr[_c66];}var _c68={};_c68.targetWidget=_c64;_c68.targetEvent=_c65;_c68.sourceWidget=_c62;_c68.sourceEvent=_c63;this.fireEvent(_c64,"onRemoveWire",_c68);this.fireEvent(_c62,"onRemoveWire",_c68);this._publishEvent(iwConstants.EVENTS.unSubscribeWire,{wires:[_c68]});},fireEvent:function(_c69,_c6a,_c6b,_c6c,_c6d){var _c6e=new com.ibm.mm.iwidget.IEventImpl(_c6a,_c6c,_c6b,_c6d);var _c6f=com.ibm.mashups.iwidget.model.Factory.getGlobalWidgetModel();var _c70=_c6f.find(_c69);if(typeof _c70!="undefined"&&_c70!==null){if(_c70.isLoaded()){_c70.handleEvent(_c6e);}else{var _c71=dojox.uuid.generateRandomUuid();var cb=function(_c72,_c73,_c74){_c73.handleEvent(_c74);var _c75=_c72.subMgr[_c71];if(_c75){_c72._unsubscribeEvent(_c75);}};var _c76=this._subscribeEvent(com.ibm.mashups.iwidget.Constants.WIDGET_LOADED+"."+_c70.id,null,dojo.partial(cb,this,_c70,_c6e));this.subMgr[_c71]=_c76;}}else{var _c77={};_c77.methodname="fireEvent";_c77.hubclient=this.getId();_c77.params=[_c69,_c6a,_c6b,_c6c];this._publishEvent("eventservice.main",_c77);}},publishEvent:function(_c78,_c79,_c7a,_c7b){return;},_publishEvent:function(_c7c,_c7d,_c7e){if(typeof _c7d=="undefined"||_c7d===null){this._hubClient.publish(_c7c,"");}else{this._hubClient.publish(_c7c,_c7d);}},broadcastEvent:function(_c7f,_c80,_c81,_c82,_c83,_c84){return;},broadcastEvents:function(_c85,_c86,_c87,_c88){return;},_handleBroadcastEventsCache:function(){var _c89={};_c89.methodname="_handleBroadcastEventsCache";_c89.hubclient=this.getId();_c89.params=[];this._publishEvent("eventservice.main",_c89);},subscribeEvent:function(_c8a,_c8b,_c8c,_c8d,_c8e){return;},_subscribeEvent:function(_c8f,_c90,_c91,_c92,_c93){if(!this._hubClient){this.eventQueue.push(arguments);return;}var _c94=this._hubClient.subscribe(_c8f,function(_c95,data,_c96){if(_c90&&_c91){_c91=dojo.hitch(_c90,_c91);}if(_c91){_c91.apply(this,[data]);}},null,function(_c97,_c98,_c99){if(_c90&&_c92){_c92=dojo.hitch(_c90,_c92);}if(_c92){_c92.apply(this,[_c97,_c98,_c99]);}if(!_c98){return;}});return _c94;},_unsubscribeEvent:function(_c9a,_c9b){if(!_c9a){return;}this._hubClient.unsubscribe(_c9a);},unsubscribeEvent:function(_c9c,_c9d){return;},_generateWireId:function(_c9e,_c9f,_ca0,_ca1){return _c9e+"_"+_c9f+"_"+_ca0+"_"+_ca1;}});if(ibmConfig.insideSandbox){com.ibm.mashups.services.ServiceManager.setService("eventService","com.ibm.mm.iwidget.services.IFrameEventServiceImpl");}}if(!dojo._hasResource["com.ibm.mm.iwidget.widget.IWidgetDefinitionExtendedImpl"]){dojo._hasResource["com.ibm.mm.iwidget.widget.IWidgetDefinitionExtendedImpl"]=true;dojo.provide("com.ibm.mm.iwidget.widget.IWidgetDefinitionExtendedImpl");dojo.declare("com.ibm.mm.iwidget.widget.IWidgetDefinitionExtendedImpl",com.ibm.mm.iwidget.widget.IWidgetDefinitionDefaultImpl,{getResources:function(){if(!this.resources){this.resources=dojo.map(this.widgetDef.resources,function(_ca2){return new com.ibm.mm.iwidget.widget.ResourceImpl(_ca2);});}return this.resources;},getPublishedEventsNames:function(){var _ca3=[];if(this.widgetDef.publicEvents){com.ibm.mm.enabler.utils.Misc.forIn(this.widgetDef.publicEvents,function(temp,_ca4){if(!temp.isPublished||(temp.isPublished&&temp.isPublished=="true")){_ca3.push(_ca4);}});}return _ca3;},getHandledEventsNames:function(){var _ca5=[];if(this.widgetDef.publicEvents){com.ibm.mm.enabler.utils.Misc.forIn(this.widgetDef.publicEvents,function(temp,_ca6){if(temp.onEvent){_ca5.push(_ca6);}});}return _ca5;},getPublishedEvent:function(_ca7){if(!this.widgetDef.publicEvents){return null;}var _ca8=this.getPublicEvent(_ca7)||null;if(_ca8){if(!_ca8.isPublished||(_ca8.isPublished&&_ca8.isPublished=="false")){_ca8=null;}}return _ca8;},getHandledEvent:function(_ca9){if(!this.widgetDef.publicEvents){return null;}var _caa=this.getPublicEvent(_ca9)||null;if(_caa){if(!_caa.onEvent){_caa=null;}}return _caa;},getPublicEvent:function(_cab){if(!this.widgetDef.publicEvents){return null;}if(this.eventsCache&&this.eventsCache[_cab]){return new com.ibm.mm.iwidget.IEventDescriptionImpl(this.eventsCache[_cab]);}var data=this.widgetDef.publicEvents[_cab];var _cac=null;var obj={};if(data){obj.name=data.id;if(data.onEvent){obj.handlingFn=data.onEvent;obj.isHandled=true;}else{obj.isHandled=false;}obj.isPublished=!!data.isPublished;obj.attributes={};obj.localizedAttributes={};var _cad=null;com.ibm.mm.enabler.utils.Misc.forIn(data,function(d,i){if(i=="description"){_cad=d;}else{if(i!="id"&&i!="onEvent"){obj.attributes[i]=d;}}});var _cae=null;if(_cad){_cae=this._getEventDescription(_cad)||null;if(_cae){var _caf=_cae.lang;if(!_caf){_caf=this.getDefaultLanguage();if(!_caf){_caf="en";}}obj.lang=_caf;if(_cae.payloadType){obj.type=_cae.payloadType;}if(_cae.aliases){obj.attributes.aliases=_cae.aliases;}var _cb0=_cae.descriptions;if(_cb0){obj.localizedAttributes=_cae.descriptions;}if(typeof (obj.localizedAttributes[_caf])=="undefined"){obj.localizedAttributes[_caf]={};}if(_cae.title){obj.localizedAttributes[_caf].title=_cae.title;}if(_cae.description){obj.localizedAttributes[_caf].description=_cae.description;}if(_cae.descriptionURI){obj.localizedAttributes[_caf].descriptionURI=_cae.descriptionURI;}}}if(!this.eventsCache){this.eventsCache={};}this.eventsCache[_cab]=obj;_cac=new com.ibm.mm.iwidget.IEventDescriptionImpl(obj);}return _cac;},_getEventDescription:function(id){var _cb1=null;if(this.widgetDef.eventDescriptions){_cb1=this.widgetDef.eventDescriptions[id];}return _cb1;},_getPublicEvents:function(){var _cb2={};com.ibm.mm.enabler.utils.Misc.forIn(this.widgetDef.publicEvents,function(k,_cb3){var _cb4=this.getPublicEvent(_cb3)||null;if(_cb4){_cb2[_cb3]=_cb4;}},this);return _cb2;},getWidgetPublishedEvents:function(){return this.getPublishedEvents();},getWidgetHandledEvents:function(){return this.getHandledEvents();},getPublishedEvents:function(){var _cb5=[];dojo.forEach(this.getPublishedEventsNames(),function(_cb6){var _cb7=this.getPublicEvent(_cb6)||null;if(_cb7){_cb5.push(_cb7);}},this);return _cb5;},getHandledEvents:function(){var _cb8=[];dojo.forEach(this.getHandledEventsNames(),function(_cb9){var _cba=this.getPublicEvent(_cb9)||null;if(_cba){_cb8.push(_cba);}},this);return _cb8;},getPayloadDefs:function(){return this.widgetDef.payloadDefs;},getPayloadDef:function(name){var _cbb=this.widgetDef.payloadDefs[name];return (typeof _cbb=="undefined")?null:_cbb;},getPayloadDefNames:function(){var arr=[];com.ibm.mm.enabler.utils.Misc.forIn(this.widgetDef.payloadDefs,function(a){arr.push(a);});return arr;},_getShareableItemSets:function(){var _cbc=this.widgetDef.shareableItemSetsArr;if(_cbc){for(var i in _cbc){if(Object.prototype.hasOwnProperty.call(_cbc,i)){return _cbc;}}}return null;},toSpecObject:function(){if(this.specObject){return this.specObject;}var _cbd={};if(!this.xmlStr){return _cbd;}var _cbe=com.ibm.mm.enabler.xslt.loadXmlString(this.xmlStr);var expr="/iw:iwidget";var _cbf=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(expr,_cbe,this.namespaces);if(_cbf){this._addAttributesToJson(_cbf,_cbd);var _cc0=[];_cc0.push({elementName:"eventDescription",keyNames:["id"]});_cc0.push({elementName:"alt",keyNames:["lang","xml:lang"]});this._addElements(_cbf,_cc0,_cbd);_cc0=[];_cc0.push({elementName:"event",keyNames:["id"]});this._addElements(_cbf,_cc0,_cbd);_cc0=[];_cc0.push({elementName:"itemSet",keyNames:["id"]});_cc0.push({elementName:"item",keyNames:["id"]});_cc0.push({elementName:"alt",keyNames:["lang","xml:lang"]});this._addElements(_cbf,_cc0,_cbd);_cc0=[];_cc0.push({elementName:"resource",keyNames:["uri","src"],elemsAsAtt:["skipLoad"]});this._addElements(_cbf,_cc0,_cbd);_cc0=[];_cc0.push({elementName:"content",keyNames:["mode"]});this._addElements(_cbf,_cc0,_cbd,true);}this.specObject=_cbd;return _cbd;},_addAttributesToJson:function(node,_cc1){dojo.forEach(node.attributes,function(att){_cc1["_"+att.nodeName.replace(":","_")]=att.nodeValue;});},_addElements:function(node,_cc2,_cc3,_cc4){if(!dojo.isArray(_cc2)||_cc2.length===0){return;}var _cc5=_cc2[0].elementName;var _cc6=_cc2[0].keyNames;var _cc7=_cc2[0].elemsAsAtt;var _cc8=null;var _cc9=null;if(_cc2.length>1){_cc8=_cc2[1].elementName;_cc9=_cc2[1].keyNames;}var _cca=_cc3[_cc5+"s"]={};var _ccb=com.ibm.mashups.enabler.xml.XPath.evaluateXPath("iw:"+_cc5,node,this.namespaces);if(_ccb){dojo.forEach(_ccb,function(node){var _ccc;for(var j=0,kL=_cc6.length;j ."+ns+_cea,this._instance.rootElement,_ceb,true);var _cec=["SourceWidget","SourceEvent","TargetEvent"];var _ced=["SourceEvent","TargetEvent"];for(var i=0;i<_ceb.length;i++){var _cee=_ceb[i];var _cef={};var _cf0=true;for(var j=0;j<2;j++){var _cf1=[];com.ibm.mm.iwidget.Utils.findElementByAttribute("query","> ."+ns+_ced[j],_cee,_cf1,false);if(_cf1.length===0){_cf0=false;}else{if(j===0){var temp=_cf1[0].getAttribute("href")||null;if(temp!==null){var _cf2=temp.indexOf("#");if(_cf2!=-1){temp=temp.substring(_cf2+1);}_cef[_cec[0]]=temp;_cef[_cec[1]]=_cf1[0].innerHTML;}}else{_cef[_cec[2]]=_cf1[0].innerHTML;}}}if(_cf0){this._addWire(new com.ibm.mm.iwidget.widget.WireImpl(this._instance.id,_cef),true);}}},commit:function(){if(this.isDirty()===true){for(var i in this._wires){if(Object.prototype.hasOwnProperty.call(this._wires,i)){var _cf3=this._wires[i];if(_cf3.isDirty()&&_cf3.getType()!==null&&_cf3.getType()==_cf3.TYPE_NEW){this._addToDOM(_cf3);_cf3.setDirty(false);_cf3.setType(null);}else{if(_cf3.isDirty()&&_cf3.getType()!==null&&_cf3.getType()==_cf3.TYPE_DELETE){this._removeFromDOM(_cf3);this._wires.splice(i,1);}}}}this.setDirty(false);}},_addToDOM:function(_cf4){var _cf5=_cf4.getSourceWidgetID();var _cf6=_cf4.getSourceEventName();var _cf7=_cf4.getTargetEventName();var _cf8=document.createElement("span");_cf8.className=this._instance.ns+"ReceivedEvent";var _cf9=document.createElement("a");_cf9.className=this._instance.ns+"SourceEvent";_cf9.setAttribute("href","#"+_cf5);_cf9.innerHTML=_cf6;var _cfa=document.createElement("span");_cfa.className=this._instance.ns+"TargetEvent";_cfa.innerHTML=_cf7;_cf8.appendChild(_cf9);_cf8.appendChild(_cfa);this._instance.rootElement.appendChild(_cf8);},_removeFromDOM:function(_cfb){var _cfc=_cfb.getSourceWidgetID();var _cfd=_cfb.getSourceEventName();var _cfe=_cfb.getTargetEventName();var _cff=this._instance.rootElement;var _d00=dojo.query("."+this._instance.ns+"ReceivedEvent",_cff);var _d01=com.ibm.mashups.services.ServiceManager.getService("iwidgetFragmentService");for(var i=0;i<_d00.length;i++){var _d02=_d00[i];var _d03=dojo.query("."+this._instance.ns+"SourceEvent",_d02)[0];var _d04=_d03.innerHTML;var _d05=dojo.query("."+this._instance.ns+"TargetEvent",_d02)[0];if(_d01.getKeyFromHref(_d03)==_cfc&&_d04==_cfd&&_d05.innerHTML==_cfe){dojo.destroy(_d02);break;}}}});}if(!dojo._hasResource["com.ibm.mm.iwidget.widget.DOMWireProviderFactoryImpl"]){dojo._hasResource["com.ibm.mm.iwidget.widget.DOMWireProviderFactoryImpl"]=true;dojo.provide("com.ibm.mm.iwidget.widget.DOMWireProviderFactoryImpl");dojo.declare("com.ibm.mm.iwidget.widget.DOMWireProviderFactoryImpl",com.ibm.mashups.iwidget.widget.WireProviderFactory,{constructor:function(){this.modes=["DOM"];},createWireProvider:function(_d06,_d07){return new com.ibm.mm.iwidget.widget.ModifiableWireModelImpl(_d06);},getSupportedPersistenceMode:function(){return this.modes;}});}if(!dojo._hasResource["com.ibm.mm.iwidget.services.WireProviderFactoryServiceImpl"]){dojo._hasResource["com.ibm.mm.iwidget.services.WireProviderFactoryServiceImpl"]=true;dojo.provide("com.ibm.mm.iwidget.services.WireProviderFactoryServiceImpl");dojo.declare("com.ibm.mm.iwidget.services.WireProviderFactoryServiceImpl",com.ibm.mashups.iwidget.services.WireProviderFactoryService,{constructor:function(){this._factories={};this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.bIsLoggable=this.LOGGER.isLoggable(this.LOG_LEVEL);},createWireProvider:function(_d08,_d09){if(_d09){com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.iwidget.services.ContainerService.SERVICE_NAME).registerOnChangeListener(com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_WIRES,_d09);}var _d0a;var wID=_d08.id;_d0a=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.iwidget.services.ContainerService.SERVICE_NAME).getPersistenceMode(com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_WIRES);var _d0b=_d08.rootElement;if(dojo.hasClass(_d0b,com.ibm.mm.iwidget.services.WireProviderFactoryServiceImpl.STANDALONE_CLASS)||!_d0a){_d0a=com.ibm.mm.iwidget.services.WireProviderFactoryServiceImpl.DEFAULT_PERSISTENCE;}if(typeof _d0a!=="undefined"&&_d0a==com.ibm.mashups.enabler.widget.Constants.PERSISTENCE_MODE_MODEL){var _d0c=com.ibm.mashups.enabler.widget.Factory.getWidgetModel();var _d0d=com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel();var _d0e=com.ibm.mashups.enabler.model.state.AccessorFactory.getSpaceAccessor(_d0d);var _d0f=_d0e.getSpaceID();var _d10=com.ibm.mashups.enabler.model.state.AccessorFactory.getPageAccessor(_d0d,_d0f);var _d11=_d10.getPageID();var _d12=com.ibm.mm.iwidget.Utils.getModelID(wID);var wnd=_d0c.findWidgetWindow(_d12,_d11).start();if(!wnd){_d0a=com.ibm.mm.iwidget.services.WireProviderFactoryServiceImpl.DEFAULT_PERSISTENCE;if(this.widgetWrapper&&dojo.isFunction(this.widgetWrapper._getResourceBundle)){this.widgetWrapper._getResourceBundle();this.LOGGER.warning("createPersistentAttributes",widgetWrapper.iwMessages.W_STANDALONECLASS_MISSING_1,[wID]);}else{this.LOGGER.warning("createPersistentAttributes","widget "+wID+" is missing class "+com.ibm.mm.iwidget.Constants.CSSCLASS_PREFIXED_INSTANCE.iwStandalone);}}}if(!(_d0a in this._factories)){return null;}return this._factories[_d0a].createWireProvider(_d08,_d0a);},setFactory:function(_d13,_d14){this._factories[_d13]=_d14;},removeFactory:function(_d15){if(_d15 in this._factories){delete this._factories[_d15];}}});com.ibm.mm.iwidget.services.WireProviderFactoryServiceImpl.DEFAULT_PERSISTENCE=com.ibm.mashups.enabler.widget.Constants.PERSISTENCE_MODE_DOM;com.ibm.mm.iwidget.services.WireProviderFactoryServiceImpl.STANDALONE_CLASS=com.ibm.mm.iwidget.Constants.CSSCLASS_PREFIXED_INSTANCE.iwStandalone;com.ibm.mashups.services.ServiceManager.setService(com.ibm.mashups.iwidget.services.WireProviderFactoryService.SERVICE_NAME,new com.ibm.mm.iwidget.services.WireProviderFactoryServiceImpl());com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.iwidget.services.WireProviderFactoryService.SERVICE_NAME).setFactory(com.ibm.mashups.enabler.widget.Constants.PERSISTENCE_MODE_DOM,new com.ibm.mm.iwidget.widget.DOMWireProviderFactoryImpl());}if(!dojo._hasResource["com.ibm.mm.iwidget.widget.IWidgetInstanceExtendedImpl"]){dojo._hasResource["com.ibm.mm.iwidget.widget.IWidgetInstanceExtendedImpl"]=true;dojo.provide("com.ibm.mm.iwidget.widget.IWidgetInstanceExtendedImpl");dojo.declare("com.ibm.mm.iwidget.widget.IWidgetInstanceExtendedImpl",com.ibm.mm.iwidget.widget.IWidgetInstanceDefaultImpl,{_addWire:function(wire){return this.getWireModel()._addWire(wire);},_removeWire:function(id){return this.getWireModel()._removeWire(id);},addWire:function(_d16,_d17,_d18){return this.getWireModel().addWire(_d16,_d17,_d18);},removeWire:function(_d19,_d1a,_d1b){return this.getWireModel().removeWire(_d19,_d1a,_d1b);},getWires:function(){return this.getWireModel().getWires();},getWireModel:function(){if(!this.wiremodel){this.wiremodel=com.ibm.mashups.services.ServiceManager.getService("WireProviderFactoryService").createWireProvider(this,{context:this,callback:"_wireProviderModeChange",unregister:function(_d1c){this.wrapper.unregisterArray.push(_d1c);}});}return this.wiremodel;},_wireProviderModeChange:function(_d1d,_d1e,_d1f){var _d20=null;if(this.wiremodel){_d20=this.wiremodel.getTargets();}this.wiremodel=com.ibm.mashups.services.ServiceManager.getService("WireProviderFactoryService").createWireProvider(this);if(_d20){for(var id in _d20){var _d21=_d20[id];for(var i=0,l=_d21.length;i ."+this.ns+com.ibm.mm.iwidget.Constants.CSSCLASS_INSTANCE.iwEvent,this.rootElement,_d22,true);var _d23=[];com.ibm.mm.iwidget.Utils.findElementByAttribute("query","> ."+this.ns+com.ibm.mm.iwidget.Constants.CSSCLASS_INSTANCE.iwEventDescription,this.rootElement,_d23,true);if(_d22.length>0){for(var i=0;i<_d22.length;i++){var elem=_d22[i];var _d24=this._getEventDescription(elem,_d23);var id=elem.getAttribute("title");this.events[id]=_d24;}}}return this.events;},_getEventDescription:function(elem,_d25){var id=elem.getAttribute("title");var _d26=dojo.query("> ."+this.ns+com.ibm.mm.iwidget.Constants.CSSCLASS_INSTANCE.iwDescRef,elem);var _d27=null;if(_d26){_d27=_d26[0];}var _d28=null;if(_d27){_d28=_d27.getAttribute("href");if(_d28.indexOf("#")===0){_d28=_d28.slice(1);_d28=unescape(_d28);}}var _d29=null;for(var j=0;j<_d25.length;j++){var temp=_d25[j];if(temp.getAttribute("title")==_d28){_d29=temp;break;}}var obj={};obj.name=id;var _d2a=_d27.innerHTML;_d2a=_d2a.replace(/^\s*/,"").replace(/\s*$/,"");if(_d2a){obj.alias=_d2a;}var _d2b=elem.className;if(_d2b.indexOf(this.ns+com.ibm.mm.iwidget.Constants.CSSCLASS_INSTANCE.iwPublished)>0){obj.isPublished=true;}if(_d2b.indexOf(this.ns+com.ibm.mm.iwidget.Constants.CSSCLASS_INSTANCE.iwHandled)>0){obj.isHandled=true;}var list=[];list.push(this.ns+com.ibm.mm.iwidget.Constants.CSSCLASS_INSTANCE.iwHandler);list.push(this.ns+com.ibm.mm.iwidget.Constants.CSSCLASS_INSTANCE.iwNewWire);list.push(this.ns+com.ibm.mm.iwidget.Constants.CSSCLASS_INSTANCE.iwRemoveWire);for(var s=0;s ."+list[s],elem);if(_d2c){var _d2d=_d2c[0];if(_d2d){switch(s){case 0:obj.handlingFn=_d2d.innerHTML;break;case 1:obj.attributes=obj.attributes?obj.attributes:{};obj.attributes.onNewWire=_d2d.innerHTML;break;case 2:obj.attributes=obj.attributes?obj.attributes:{};obj.attributes.onRemoveWire=_d2d.innerHTML;break;default:break;}}}}if(_d29){var _d2e=this.ns+com.ibm.mm.iwidget.Constants.CSSCLASS_INSTANCE.iwPayloadType;var list=dojo.query("> ."+_d2e,_d29);if(list&&list[0]){obj.type=list[0].innerHTML.replace(/^\s*/,"").replace(/\s*$/,"");}obj.localizedAttributes={};var _d2f=this.ns+com.ibm.mm.iwidget.Constants.CSSCLASS_INSTANCE.iwTitle;var _d30=this.ns+com.ibm.mm.iwidget.Constants.CSSCLASS_INSTANCE.iwValue;var _d31=dojo.query("> ."+_d2f,_d29);if(_d31&&_d31[0]){dojo.query("> ."+_d30,_d31[0]).forEach(function(elem){var lang=elem.getAttribute("lang");var _d32=elem.innerHTML.replace(/^\s*/,"").replace(/\s*$/,"");if(!obj.localizedAttributes[lang]){obj.localizedAttributes[lang]={};}obj.localizedAttributes[lang].title=_d32;});}var _d33=this.ns+com.ibm.mm.iwidget.Constants.CSSCLASS_INSTANCE.iwDescription;var _d30=this.ns+com.ibm.mm.iwidget.Constants.CSSCLASS_INSTANCE.iwValue;var _d34=dojo.query("> ."+_d33,_d29);if(_d34&&_d34[0]){dojo.query("> ."+_d30,_d34[0]).forEach(function(elem){var lang=elem.getAttribute("lang");var _d35=elem.innerHTML.replace(/^\s*/,"").replace(/\s*$/,"");if(!obj.localizedAttributes[lang]){obj.localizedAttributes[lang]={};}obj.localizedAttributes[lang].description=_d35;});}}return new com.ibm.mm.iwidget.IEventDescriptionImpl(obj);}});com.ibm.mm.iwidget.widget.IWidgetInstanceImpl=com.ibm.mm.iwidget.widget.IWidgetInstanceExtendedImpl;}if(!dojo._hasResource["com.ibm.mashups.iwidget.services.WidgetEventModelFactoryService_API"]){dojo._hasResource["com.ibm.mashups.iwidget.services.WidgetEventModelFactoryService_API"]=true;dojo.provide("com.ibm.mashups.iwidget.services.WidgetEventModelFactoryService_API");dojo.provide("com.ibm.mashups.iwidget.services.WidgetEventModelFactoryService");dojo.declare("com.ibm.mashups.iwidget.services.WidgetEventModelFactoryService",null,{SERVICE_NAME:"WidgetEventModelFactoryService",createEventModel:function(_d36,_d37){},setFactory:function(_d38,_d39){},removeFactory:function(_d3a){}});}if(!dojo._hasResource["com.ibm.mashups.iwidget.services.WidgetEventModelFactoryService"]){dojo._hasResource["com.ibm.mashups.iwidget.services.WidgetEventModelFactoryService"]=true;dojo.provide("com.ibm.mashups.iwidget.services.WidgetEventModelFactoryService");com.ibm.mashups.iwidget.services.WidgetEventModelFactoryService.SERVICE_NAME=com.ibm.mashups.iwidget.services.WidgetEventModelFactoryService.prototype.SERVICE_NAME;}if(!dojo._hasResource["com.ibm.mashups.iwidget.model.EventModelFactory"]){dojo._hasResource["com.ibm.mashups.iwidget.model.EventModelFactory"]=true;dojo.provide("com.ibm.mashups.iwidget.model.EventModelFactory");dojo.declare("com.ibm.mashups.iwidget.model.EventModelFactory",null,{createEventModel:function(_d3b,_d3c){},getSupportedPersistenceMode:function(){}});}if(!dojo._hasResource["com.ibm.mashups.iwidget.model.EventModel"]){dojo._hasResource["com.ibm.mashups.iwidget.model.EventModel"]=true;dojo.provide("com.ibm.mashups.iwidget.model.EventModel");dojo.declare("com.ibm.mashups.iwidget.model.EventModel",null,{constructor:function(_d3d){this.wrapper=_d3d;},find:function(id){return null;},eventExists:function(id){return false;},createEvent:function(_d3e){return null;},removeEvent:function(_d3f){},isUpdateEventRequired:function(_d40){},updateEvent:function(_d41){},getEvents:function(_d42){}});}if(!dojo._hasResource["com.ibm.mm.enabler.utils.EventModelHelperImpl"]){dojo._hasResource["com.ibm.mm.enabler.utils.EventModelHelperImpl"]=true;dojo.provide("com.ibm.mm.enabler.utils.EventModelHelperImpl");dojo.declare("com.ibm.mm.enabler.utils.EventModelHelperImpl",null,{_PredefinedFields:{alias:"alias",name:"name",type:"type",lang:"lang",isPublished:"isPublished",isHandled:"isHandled",handlingFn:"handlingFn"},checkMatch:function(_d43,_d44){var rc=true;var _d45=[];var _d46;for(var i in _d44){if(Object.prototype.hasOwnProperty.call(_d44,i)){if(!_d44[i]){continue;}if(typeof (this._PredefinedFields[i])!="undefined"){if(i==this._PredefinedFields.isPublished&&(_d44[i]===true||_d44[i]=="true")){_d46=_d43.isPublished;if(!(_d46&&(_d46===true||_d46=="true"))){rc=false;break;}}else{if(i==this._PredefinedFields.isPublished&&(_d44[i]=="false"||_d44[i]===false)){_d46=_d43.isPublished;if(!(_d46&&(_d46===false||_d46=="false"))){rc=false;break;}}else{if(i==this._PredefinedFields.isPublished&&(_d44[i]=="false"||_d44[i]===false)){if(!this._checkBoolean(dojo.toJson(_d43),i,"false")){rc=false;break;}}else{if(i==this._PredefinedFields.isHandled&&(_d44[i]===true||_d44[i]=="true")){if(!_d43[this._PredefinedFields.handlingFn]){rc=false;break;}}else{if(i==this._PredefinedFields.isHandled&&(_d44[i]=="false"||_d44[i]===false)){if(_d43[this._PredefinedFields.handlingFn]){rc=false;break;}}else{if(!(_d43[i]&&_d43[i]==_d44[i])){rc=false;break;}}}}}}}else{if(!(_d43.attributes&&_d43.attributes[i]&&_d43.attributes[i]==_d44[i])){rc=false;break;}}}}return rc;},_checkBoolean:function(str,name,_d47){var rc=false;var temp="\""+name+"\""+":"+_d47;if(str.indexOf(temp)!=-1){return true;}temp="\""+name+"\""+":\""+_d47+"\"";if(str.indexOf(temp)!=-1){return true;}return false;}});dojo.declare("com.ibm.mashups.enabler.utils.EventModelHelper",null,{});com.ibm.mashups.enabler.utils.EventModelHelper=new com.ibm.mm.enabler.utils.EventModelHelperImpl();}if(!dojo._hasResource["com.ibm.mm.iwidget.model.DOMEventModelImpl"]){dojo._hasResource["com.ibm.mm.iwidget.model.DOMEventModelImpl"]=true;dojo.provide("com.ibm.mm.iwidget.model.DOMEventModelImpl");dojo.declare("com.ibm.mm.iwidget.model.DOMEventModelImpl",com.ibm.mashups.iwidget.model.EventModel,{constructor:function(_d48){this.wrapper=_d48;this.eventDescriptionPool={};var _d49=_d48.widgetDef._getPublicEvents();var _d4a=_d48.getIWidgetInstance()._getPublicEvents();var _d4b=_d49?_d49:null;if(_d4a){for(var j in _d4a){if(Object.prototype.hasOwnProperty.call(_d4a,j)){_d4b[j]=_d4a[j];}}}if(_d4b){var _d4c={};for(var i in _d4b){if(Object.prototype.hasOwnProperty.call(_d4b,i)){_d4c[i]=_d4b[i];}}this.eventDescriptionPool=_d4c;}},find:function(id){var _d4d=this.eventDescriptionPool[id];if(_d4d){return _d4d;}if(this.wrapper.handledEvents){if(this.wrapper.handledEvents[id]){return this.wrapper.handledEvents[id][0];}}if(this.wrapper.publishedEvents){if(this.wrapper.publishedEvents[id]){return this.wrapper.publishedEvents[id][0];}}return null;},eventExists:function(_d4e){var temp=this.eventDescriptionPool[_d4e];if(temp){return true;}else{return false;}},_getEventDescObj:function(_d4f){var obj=_d4f;var _d50=_d4f.declaredClass;if(typeof _d50=="undefined"||_d50===null){obj=new com.ibm.mm.iwidget.IEventDescriptionImpl(_d4f);}return obj;},createEvent:function(_d51){var _d52=this._getEventDescObj(_d51);var _d53=this.eventExists(_d52.name);if(_d53){return false;}else{this.eventDescriptionPool[_d52.name]=_d52;return true;}},removeEvent:function(_d54){var _d55=this.eventExists(_d54);if(_d55){delete this.eventDescriptionPool[_d54];return true;}else{return true;}},removeEvents:function(_d56){for(var i=0;i<_d56.length;i++){this.removeEvent(_d56[i]);}return true;},isUpdateEventRequired:function(_d57){var _d58=this._getEventDescObj(_d57);var _d59=this.eventExists(_d58.name);if(_d59){var _d5a=this.eventDescriptionPool[_d58.name];var _d5b=_d5a.type||"";_d5b=(_d5b.indexOf("}")==-1)?_d5b:_d5b.substring(_d5b.indexOf("}")+1);var _d5c=_d58.type||"";_d5c=(_d5c.indexOf("}")==-1)?_d5c:_d5c.substring(_d5c.indexOf("}")+1);if((_d5a.alias!=_d58.alias)||(_d5a.name!=_d58.name)||(_d5b!=_d5c)||(_d5a.isHandled!=_d58.isHandled)||(_d5a.isPublished!=_d58.isPublished)){return true;}return false;}else{return true;}},updateEvent:function(_d5d){var _d5e=this._getEventDescObj(_d5d);var _d5f=this.eventExists(_d5e.name);if(_d5f){this.eventDescriptionPool[_d5e.name]=_d5e;}else{return false;}return true;},setEvents:function(_d60){var rc=true;for(var i=0;i<_d60.length;i++){var _d61=_d60[i];var _d62=this.createEvent(_d61);_d62=_d62||false;if(_d62===false){_d62=this.updateEvent(_d61);}_d62=_d62||false;if(rc===true){rc=_d62;}}return rc;},getEvents:function(_d63){if(typeof _d63=="undefined"||_d63===null){return this._getEventsInArray(this.eventDescriptionPool);}var _d64=[];if(_d63.isHandled&&_d63.isHandled=="true"){if(this.wrapper.handledEvents){this._addEvents(_d64,this.wrapper.handledEvents);}}if(_d63.isPublished&&_d63.isPublished=="true"){if(this.wrapper.publishedEvents){this._addEvents(_d64,this.wrapper.publishedEvents);}}if(dojo.isString(_d63)){try{_d63=dojo.fromJson(_d63);}catch(e){return null;}}for(var j in this.eventDescriptionPool){if(Object.prototype.hasOwnProperty.call(this.eventDescriptionPool,j)){var _d65=this.eventDescriptionPool[j];var rc=com.ibm.mashups.enabler.utils.EventModelHelper.checkMatch(_d65._getInternalJsonObj(),_d63);if(rc){_d64.push(_d65);}}}if(_d64.length===0){return null;}else{return _d64;}},_getEventsInArray:function(arr){var _d66=[];for(var j in arr){if(Object.prototype.hasOwnProperty.call(arr,j)){_d66.push(arr[j]);}}if(_d66.length===0){return null;}else{return _d66;}},_addEvents:function(arr,_d67){for(var i in _d67){if(Object.prototype.hasOwnProperty.call(_d67,i)){var _d68=_d67[i];for(var j in _d68){if(Object.prototype.hasOwnProperty.call(_d68,j)){arr.push(_d68[j]);}}}}}});}if(!dojo._hasResource["com.ibm.mm.iwidget.model.DOMEventModelFactoryImpl"]){dojo._hasResource["com.ibm.mm.iwidget.model.DOMEventModelFactoryImpl"]=true;dojo.provide("com.ibm.mm.iwidget.model.DOMEventModelFactoryImpl");dojo.declare("com.ibm.mm.iwidget.model.DOMEventModelFactoryImpl",com.ibm.mashups.iwidget.model.EventModelFactory,{constructor:function(){this.modes=["DOM"];},createEventModel:function(_d69,_d6a){return new com.ibm.mm.iwidget.model.DOMEventModelImpl(_d69);},getSupportedPersistenceMode:function(){return this.modes;}});}if(!dojo._hasResource["com.ibm.mm.iwidget.services.WidgetEventModelFactoryServiceImpl"]){dojo._hasResource["com.ibm.mm.iwidget.services.WidgetEventModelFactoryServiceImpl"]=true;dojo.provide("com.ibm.mm.iwidget.services.WidgetEventModelFactoryServiceImpl");dojo.declare("com.ibm.mm.iwidget.services.WidgetEventModelFactoryServiceImpl",com.ibm.mashups.iwidget.services.WidgetEventModelFactoryService,{constructor:function(){this._factories={};this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.bIsLoggable=this.LOGGER.isLoggable(this.LOG_LEVEL);},createEventModel:function(_d6b,_d6c){if(_d6c){com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.iwidget.services.ContainerService.SERVICE_NAME).registerOnChangeListener(com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_EVENTS,_d6c);}return new com.ibm.mm.enabler.DeferredImpl(this,function(dfr,sync){var wID=_d6b.id;var _d6d=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.iwidget.services.ContainerService.SERVICE_NAME).getPersistenceMode(com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_EVENTS);var _d6e=_d6b.rootElement;if(dojo.hasClass(_d6e,com.ibm.mm.iwidget.services.WidgetEventModelFactoryServiceImpl.STANDALONE_CLASS)||!_d6d){_d6d=com.ibm.mm.iwidget.services.WidgetEventModelFactoryServiceImpl.DEFAULT_PERSISTENCE;}var _d6f;if(typeof _d6d!=="undefined"&&_d6d==com.ibm.mashups.enabler.widget.Constants.PERSISTENCE_MODE_MODEL){var _d70=com.ibm.mashups.enabler.widget.Factory.getWidgetModel();var _d71=com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel();var _d72=com.ibm.mashups.enabler.model.state.AccessorFactory.getSpaceAccessor(_d71);var _d73=_d72.getSpaceID();var _d74=com.ibm.mashups.enabler.model.state.AccessorFactory.getPageAccessor(_d71,_d73);var _d75=_d74.getPageID();var _d76=com.ibm.mm.iwidget.Utils.getModelID(wID);var _d77=_d70.findWidgetWindow(_d76,_d75);_d77.setFinishedCallback(dojo.hitch(this,function(wnd,_d78){if(!wnd){_d6d=com.ibm.mm.iwidget.services.WidgetEventModelFactoryServiceImpl.DEFAULT_PERSISTENCE;if(dojo.isFunction(_d6b._getResourceBundle)){_d6b._getResourceBundle();this.LOGGER.warning("createPersistentAttributes",_d6b.iwMessages.W_STANDALONECLASS_MISSING_1,[wID]);}else{this.LOGGER.warning("createPersistentAttributes","widget "+wID+" is missing class "+com.ibm.mm.iwidget.Constants.CSSCLASS_PREFIXED_INSTANCE.iwStandalone);}}if(!(_d6d in this._factories)){_d6f=null;}else{_d6f=this._factories[_d6d].createEventModel(_d6b,_d6d);}dfr.finish(_d6f,_d78);}));_d77.start(sync);}else{if(!_d6f){if(!(_d6d in this._factories)){_d6f=null;}else{_d6f=this._factories[_d6d].createEventModel(_d6b,_d6d);}}dfr.finish(_d6f,200);}return _d6f;});},setFactory:function(_d79,_d7a){this._factories[_d79]=_d7a;},removeFactory:function(_d7b){if(_d7b in this._factories){delete this._factories[_d7b];}}});com.ibm.mm.iwidget.services.WidgetEventModelFactoryServiceImpl.DEFAULT_PERSISTENCE=com.ibm.mashups.enabler.widget.Constants.PERSISTENCE_MODE_DOM;com.ibm.mm.iwidget.services.WidgetEventModelFactoryServiceImpl.STANDALONE_CLASS=com.ibm.mm.iwidget.Constants.CSSCLASS_PREFIXED_INSTANCE.iwStandalone;com.ibm.mashups.services.ServiceManager.setService(com.ibm.mashups.iwidget.services.WidgetEventModelFactoryService.SERVICE_NAME,new com.ibm.mm.iwidget.services.WidgetEventModelFactoryServiceImpl());com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.iwidget.services.WidgetEventModelFactoryService.SERVICE_NAME).setFactory(com.ibm.mashups.enabler.widget.Constants.PERSISTENCE_MODE_DOM,new com.ibm.mm.iwidget.model.DOMEventModelFactoryImpl());}if(!dojo._hasResource["com.ibm.mashups.iwidget.itemset.ShareableItemSet"]){dojo._hasResource["com.ibm.mashups.iwidget.itemset.ShareableItemSet"]=true;dojo.provide("com.ibm.mashups.iwidget.itemset.ShareableItemSet");dojo.declare("com.ibm.mashups.iwidget.itemset.ShareableItemSet",null,{constructor:function(){},setItemValue:function(_d7c,_d7d){return this;},getItemValue:function(_d7e){return null;},getAllNames:function(){return null;},removeItem:function(_d7f){return null;},commit:function(){return null;},addListener:function(_d80){return null;},removeListener:function(_d81){return true;}});}if(!dojo._hasResource["com.ibm.mm.iwidget.itemset.ShareableItemSetImpl"]){dojo._hasResource["com.ibm.mm.iwidget.itemset.ShareableItemSetImpl"]=true;dojo.provide("com.ibm.mm.iwidget.itemset.ShareableItemSetImpl");dojo.declare("com.ibm.mm.iwidget.itemset.ShareableItemSetImpl",com.ibm.mashups.iwidget.itemset.ShareableItemSet,{constructor:function(_d82,_d83,name){this.DELETE_TOKEN="DELETE_TOKEN";this.parent=_d82;if(name){this.id=name;}if(_d83){this.id=_d83.id;this.alias=_d83.alias?_d83.alias:null;this.defData=_d83;}this.mapping={};this.items={};if(_d83){var _d84=_d83.items;for(var i in _d84){if(Object.prototype.hasOwnProperty.call(_d84,i)){var id=i;var _d85=_d84[i].alias?_d84[i].alias:null;this.items[i]={id:id};if(_d85){this.mapping[_d85]=id;this.items[i].alias=_d85;}}}}this.navigationStateModel=com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel();var psid=this.alias;if(!psid){psid=this.id;}this.shareableAccessor=com.ibm.mashups.enabler.model.state.AccessorFactory.getShareableParameterSetAccessor(this.navigationStateModel,psid,"global");this._isDirty=false;this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.bIsLoggable=this.LOGGER.isLoggable(this.LOG_LEVEL);},addListener:function(fn){var id=this.alias;if(!id){id=this.id;}var me=this;var _d86=function(_d87){if(me._isSender){return;}var _d88=_d87.changes?_d87.changes:null;if(_d88){for(var i=0;i<_d88.length;i++){var _d89=_d88[i].alias;if(me.mapping){if(me.mapping[_d89]){var _d8a=me.mapping[_d89];_d88[i].id=_d8a;}}}}if(_d88.length>0){var _d8b=new com.ibm.mm.iwidget.IEventImpl("onItemSetChanged",null,_d87);if(dojo.isString(fn)){var _d8c=me.parent._getHandlerScope(fn);if(_d8c){fn=dojo.hitch(_d8c,fn);}}fn(_d8b);}};var _d8d=this.shareableAccessor.registerListener(_d86);return _d8d;},removeListener:function(_d8e){return this.shareableAccessor.removeListener(_d8e);},setItemValue:function(_d8f,_d90){if(!_d8f){return null;}if(!_d90){return null;}if(typeof (this._isDirty)!="undefined"&&!this._isDirty){this._isDirty=true;this._changedItems={};}var _d91=this._resolveMapping(_d8f);if(!_d91){_d91=_d8f;}this._changedItems=this._changedItems?this._changedItems:{};this._changedItems[_d91]=_d90;return this;},getItemValue:function(_d92){var id=this._resolveMapping(_d92);if(!id){id=_d92;}if(this._isDirty&&this._changedItems){if(this._changedItems[id]&&this._changedItems[id]!=this.DELETE_TOKEN){return this._changedItems[id];}else{if(this._changedItems[id]&&this._changedItems[id]==this.DELETE_TOKEN){return null;}}}var _d93=this.alias;if(!_d93){_d93=this.id;}var _d94=this.shareableAccessor.getItemValue(id);if(!_d94){_d94=null;}return _d94;},getAllNames:function(){var _d95=this.alias;if(!_d95){_d95=this.id;}var _d96=this.shareableAccessor.getAllNames();if(this._isDirty){var obj={};for(var i=0;i<_d96.length;i++){var _d97=_d96[i];obj[_d97]=_d97;}if(this._changedItems){for(var j in this._changedItems){if(this._changedItems[j]&&this._changedItems[j]==this.DELETE_TOKEN&&obj[j]){obj[j]=null;}else{if(this._changedItems[j]&&!obj[j]){obj[j]=j;}}}}var arr=[];for(var k in obj){if(Object.prototype.hasOwnProperty.call(obj,k)){arr.push(k);}}_d96=arr;}for(var s=0;s<_d96.length;s++){var id=_d96[s];if(this.mapping[id]){_d96[s]=this.mapping[id];}}if(_d96.length===0){return null;}return _d96;},removeItem:function(_d98){if(typeof (this._isDirty)!="undefined"&&!this._isDirty){this._isDirty=true;this._changedItems={};}var _d99=this.getAllNames();if(_d99===null){return null;}var _d9a=false;for(var i=0;i<_d99.length;i++){if(_d99[i]==_d98){_d9a=true;}}if(!_d9a){return null;}var id=this._resolveMapping(_d98);if(!id){id=_d98;}this._changedItems=this._changedItems?this._changedItems:{};this._changedItems[id]=this.DELETE_TOKEN;return this;},getItemSetDescription:function(){return null;},commit:function(){if(this._isDirty){this._isSender=true;var _d9b=this.alias;if(!_d9b){_d9b=this.id;}this.shareableAccessor._setItems(this._changedItems);var _d9c=this.navigationStateModel.commit();_d9c.start();this._isSender=false;}this._changedItems=null;this._isDirty=false;},_resolveMapping:function(name){if(!name){return null;}if(!this.items){return null;}if(this.items[name]&&this.items[name].alias){return this.items[name].alias;}return null;}});com.ibm.mm.iwidget.itemset.ShareableItemSetFactory=com.ibm.mm.iwidget.itemset.ShareableItemSetImpl;if((ibmConfig.enablerLayerModules)&&(dojo.indexOf(ibmConfig.enablerLayerModules,"CoreModel")>=0)){dojo["require"]("com.ibm.mm.iwidget.itemset.ShareableItemSetExtendedModelImpl");}}if(!dojo._hasResource["com.ibm.mm.iwidget.DeferredLiveTextUnprocessImpl"]){dojo._hasResource["com.ibm.mm.iwidget.DeferredLiveTextUnprocessImpl"]=true;dojo.provide("com.ibm.mm.iwidget.DeferredLiveTextUnprocessImpl");dojo.declare("com.ibm.mm.iwidget.DeferredLiveTextUnprocessImpl",com.ibm.mm.enabler.DeferredImpl,{constructor:function(_d9d){this.wrapper=_d9d;},start:function(sync){if(sync){return;}var _d9e=this.wrapper.getIWidgetInstance();if(dojo.isFunction(this.wrapper.iScope._onGetMarkup)){this.wrapper.iScope._onGetMarkup();}var _d9f=dojo.clone(this.wrapper.rootElement);dojo.publish("/com/ibm/mashups/livetext/livetextunchange",[_d9f,true,null,null,dojo.hitch(this,this._unchangeCompleteCallback),this.includeParent]);},setIncludeParent:function(_da0){this.includeParent=_da0;},getIncludeParent:function(){return this.includeParent;},_unchangeCompleteCallback:function(node){if(dojo.isFunction(this.getFinishedCallback())){this.finish(node,200);}}});}if(!dojo._hasResource["com.ibm.mm.iwidget.widget.IWidgetWrapperExtendedImpl"]){dojo._hasResource["com.ibm.mm.iwidget.widget.IWidgetWrapperExtendedImpl"]=true;dojo.provide("com.ibm.mm.iwidget.widget.IWidgetWrapperExtendedImpl");dojo.declare("com.ibm.mm.iwidget.widget.IWidgetWrapperExtendedImpl",com.ibm.mm.iwidget.widget.IWidgetWrapperDefaultImpl,{getMarkup:function(){return new com.ibm.mm.iwidget.DeferredLiveTextUnprocessImpl(this);},destroy:function(){if(this.widgetDef){var _da1=this.widgetDef._getShareableItemSets();if(_da1){var _da2=null;for(var i in _da1){if(Object.prototype.hasOwnProperty.call(_da1,i)){if(this.shareableItemSets.listeners[i]){for(var j=0,l=this.shareableItemSets.listeners[i].length;j ."+_da5.ns+"loading",_da5.rootElement).forEach(function(elem){elem.innerHTML="";var _da6=_da5.id;if(_da5.getIWidgetInstance().getIDescriptorItems().getItemValue("title",dojo.locale)){_da6=unescape(_da5.getIWidgetInstance().getIDescriptorItems().getItemValue("title",dojo.locale));com.ibm.mm.enabler.logging.LegacyLogger.logInlineMessage(elem,"error",dojo.string.substitute(_da5.iwMessages.E_WIDGET_DISPLAY_FAIL_2,[_da6,e.message]));}else{if(typeof (e)!=="undefined"&&null!==e){com.ibm.mm.enabler.logging.LegacyLogger.logInlineMessage(elem,"error",dojo.string.substitute(_da5.iwMessages.E_WIDGET_DISPLAY_FAIL_2,[_da6,e.message]));}else{elem.innerHTML=dojo.string.substitute(_da5.iwMessages.E_WIDGET_INCORRECTCONFIG_1,[_da6]);}}});},_logUpdateMarkupError:function(mode){this._getResourceBundle();var _da7=dojo.string.substitute(this.iwMessages.E_IWIDGETDEF_CONTENTNOTAVAILABLE_1,[mode]);},_loadWidgetSharedResource:function(cb2){var _da8=this.widgetDef.getResources();this._getResourceBundle();if(typeof _da8!="undefined"&&_da8!==null){var size=_da8.length-1;if(size==-1){cb2();}var _da9=[];var temp=[];for(var x in _da8){if(Object.prototype.hasOwnProperty.call(_da8,x)){var _daa=_da8[x];if(_daa.isImage()||_daa.isCSS()){temp.push(_daa);}else{_da9.push(_daa);}}}for(var y=0;y ."+me.ns+"loading",me.rootElement).forEach(function(elem){elem.innerHTML="";var _dad=me.getIWidgetInstance().getIDescriptorItems().getItemValue("title",dojo.locale);if(!_dad){_dad="'"+me.getIWidgetInstance().widgetXMLUrl+"'";}else{_dad="'"+unescape(_dad)+"'";}if(me.widgetDef){var _dae=me.widgetDef.getWidgetId();if(_dae){_dad="'"+_dae+"' ("+_dad+")";}}var _daf="";var _db0=(dojo.isArray(me.data))?me.data[0]:me.data;_daf="";for(var j in _db0){if(Object.prototype.hasOwnProperty.call(_db0,j)){if(j=="data"){_daf=_daf.concat("'"+_db0[j]+"'").concat("\n");}}}com.ibm.mm.enabler.logging.LegacyLogger.logInlineMessage(elem,"error",dojo.string.substitute(me.iwMessages.E_WIDGET_DISPLAY_FAIL_2,[_dad,_daf]));});me.error=null;me.data=null;}else{if(cb2){cb2();}}}};for(var i=0;i<_da9.length;i++){var _db1=_da9[i];if(typeof _db1!="undefined"&&_db1!==null){com.ibm.mashups.services.ServiceManager.getService("resourceLoadService").loadResource(_db1,this.id,dojo.partial(mycb,i,_db1));}}}},handleEvent:function(_db2){var _db3=_db2.declaredClass;if(typeof _db3!="undefined"&&_db3!==null&&_db3=="com.ibm.mm.iwidget.IEventImpl"){var _db4=_db2.name;return this._handleEvent(_db4,_db2);}var _db5=_db2.scope;if(typeof _db5!="undefined"&&_db5!==null){if(_db5=="instance"){_db5=this.getIWidgetInstance();}else{if(_db5=="eventmodel"){_db5=this._getPublicEvents();}}}else{_db5=this;}var _db6=_db2.methodname;if(typeof _db6!="undefined"&&_db6!==null){if(_db5[_db6]&&dojo.isFunction(_db5[_db6])){_db5[_db6].apply(_db5,_db2.params);}}},_handleEvent:function(_db7,_db8){var _db9="_handleEvent(eventName, iEvent)";if(this.bIsLoggable){this.LOGGER.entering(_db9,[_db7,dojo.toJson(_db8)]);}_db8=this._deserializePayload(_db8);if(typeof _db7=="undefined"||_db7===null){return false;}if(!this.loaded){if(!this._eventqueue){this._eventqueue={};}this._eventqueue[_db7]=_db8;return;}try{if(_db7==iwConstants.EVENTS.onNavStateChanged){return this._handleOnNavStateChanged(_db8);}if(_db7==iwConstants.EVENTS.onWindowStateChanged){var _dba=com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel();var _dbb=com.ibm.mashups.enabler.model.state.AccessorFactory.getWidgetAccessor(_dba,this.id);var _dbc=_db8.payload.newWindowState;_dbb.setWindowState(_dbc);var _dbd=dojo.contentBox(this.rootElement.parentNode);this.handleSizeChanged({"newWidth":Math.max(0,_dbd.w),"newHeight":Math.max(0,_dbd.h)});return this._handleEventInternal(_db7,_db8);}if(_db7==iwConstants.EVENTS.onModeChanged){if(this._inIframe()){var _dbe={};_dbe.methodname="_handleOnModeChange";_dbe.hubclient=this.hubId;_dbe.params=[_db8.payload];var id="_stub_"+this.id;this.eventSvr._publishEvent(iwConstants.WIDGETEVENT_PREFIX+id,_dbe,this.hubId);return;}return this._handleModeChange(_db8);}if(_db7=="onNewWire"){return this._handleNewWire(_db8);}if(_db7=="onRemoveWire"){return this._handleRemoveWire(_db8);}return this._handleEventInternal(_db7,_db8);}catch(e){var _dbf=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);_dbf.severe("_handleEvent","widget:"+this.hubId+"eventName:"+_db7+" HandleEventException:"+e);}},getPublicEventHandler:function(_dc0){var _dc1=this._getPublicEvents()||null;if(!_dc1){return null;}var _dc2=_dc1.find(_dc0)||null;if(!_dc2){return null;}var _dc3=_dc2.handlingFn||null;if(!_dc3){var _dc4=_dc2.getAttribute("isComplete");if(typeof _dc4!=="undefined"&&_dc4===false){var _dc5=iwConstants.EVENTS.onIncompleteEventDescription;var _dc6={eventDescription:_dc2};var _dc7=new com.ibm.mm.iwidget.IEventImpl(_dc5,null,_dc6);this._handleEventInternal(_dc5,_dc7);_dc2=_dc1.find(_dc0);_dc3=_dc2.handlingFn;}}var _dc8=null;if(_dc3){if(dojo.isFunction(_dc3)){_dc8=_dc3;}else{var _dc9=this._getHandlerScope(_dc3)||null;if(_dc9){_dc8=dojo.hitch(_dc9,_dc3);}}}return _dc8;},getPublishedEvents:function(){if(!this.publishedEvents){this.publishedEvents={};}return this.publishedEvents;},getHandledEvents:function(){if(!this.handledEvents){this.handledEvents={};}return this.handledEvents;},_inIframe:function(){if(this._isInIframe){return this._isInIframe;}var _dca=false;var type=this.eventSvr.getType();if(typeof type!="undefined"&&type==com.ibm.mm.iwidget.Constants.eventservice.type.IFRAME){_dca=true;}this._isInIframe=_dca;return this._isInIframe;},setMainframeId:function(_dcb){this._mainframeId=_dcb;},setModal:function(_dcc){this._isModal=_dcc;},isModal:function(){return this._isModal?this._isModal:false;},_handleDataSync:function(_dcd){if(typeof _dcd.attributes!="undefined"&&_dcd.attributes!==null){var _dce=_dcd.attributes;this._syncModifiableProperties(_dce,this.getIWidgetInstance().getAttributes());}if(typeof _dcd.idescriptors!="undefined"&&_dcd.idescriptors!==null){var _dcf=_dcd.idescriptors;this._syncModifiableProperties(_dcf,this.getIWidgetInstance().getIDescriptorItems());}if(typeof _dcd.wiremodel!="undefined"&&_dcd.wiremodel!==null){var _dd0=_dcd.wiremodel;this._syncWireModel(_dd0,this.getIWidgetInstance().getWireModel());}this.commit(true);},_syncModifiableProperties:function(_dd1,_dd2){var _dd3=_dd1._items;if(_dd1._dirty){for(var i in _dd3){if(Object.prototype.hasOwnProperty.call(_dd3,i)){var name=i;var temp=_dd3[i];if(dojo.isString(temp)){if(temp&&temp==_dd2.DELETE_TOKEN){_dd2.removeItem(name);}}else{var _dd4=(_dd3[i].readOnly)?_dd3[i].readOnly:false;var _dd5=_dd3[i].values;if(typeof _dd5!="undefined"&&_dd5!==null){for(var j in _dd5){if(Object.prototype.hasOwnProperty.call(_dd5,j)){var _dd6=_dd5[j];if(_dd6&&_dd6==_dd2.DELETE_TOKEN){_dd2.removeItemValue(name,j);}else{if(_dd6){_dd2.setItemValue(name,_dd6,_dd4,j);}}}}}}}}}},_syncWireModel:function(_dd7,_dd8){var _dd9=_dd7._wires;for(var i in _dd9){if(Object.prototype.hasOwnProperty.call(_dd9,i)){var _dda=_dd9[i];if(_dda._isDirty&&_dda._type&&_dda._type=="NEW"){_dd8.addWire(_dda.SourceWidget,_dda.SourceEvent,_dda.TargetEvent);}else{if(_dda._isDirty&&_dda._type&&_dda._type=="DELETE"){_dd8.removeWire(_dda.SourceWidget,_dda.SourceEvent,_dda.TargetEvent);}}}}var _ddb=_dd7._targets;_dd8._targets=_ddb;},setStateData:function(_ddc){this.stateData=_ddc;},updateState:function(){var _ddd;if(!this._inIframe()){var _dde=com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel();var _ddf=com.ibm.mashups.enabler.model.state.AccessorFactory.getWidgetAccessor(_dde,this.id)||null;if(_ddf){var _de0=_ddf.getWidgetState("cp");if(_de0){_ddd=new com.ibm.mm.iwidget.IEventImpl(iwConstants.EVENTS.onNavStateChanged,"json",_de0);this._handleEventInternal(iwConstants.EVENTS.onNavStateChanged,_ddd);}}}else{if(this.stateData){_ddd=new com.ibm.mm.iwidget.IEventImpl(iwConstants.EVENTS.onNavStateChanged,null,this.stateData);this._handleEventInternal(iwConstants.EVENTS.onNavStateChanged,_ddd);}}},_handleOnNavStateChanged:function(_de1){if(!this._inIframe()){var _de2=_de1.payload;if(_de2){var _de3=com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel();var _de4=com.ibm.mashups.enabler.model.state.AccessorFactory.getWidgetAccessor(_de3,this.id);_de4.setWidgetState("cp",_de2);var _de5=_de3.commit();_de5.start();}}else{var _de6={};_de6.methodname="_handleOnNavStateChanged";_de6.params=[_de1];this.eventSvr._publishEvent(this.eventSvr.WIDGETEVENT_PREFIX+"_stub_"+this.id,_de6);}},_initialize:function(_de7){var lang=this.widgetDef.getDefaultLanguage()||null;if(lang){this.defaultLanguage=lang;}else{this.defaultLanguage="en";}var _de8=this._getInitDefaultMode()||null;if(!_de8){_de8=iwConstants.mode_view;}this.currentMode=_de8;this._handleSaveMode();this._initManagedItemSet();this._getShareableItemSets();this._getPublicEvents(dojo.hitch(this,function(_de9){this.getWires();if(_de7){_de7();}}));},getPublicEvent:function(name){var _dea=this._getPublicEvents();return _dea.find(name);},_getPublicEvents:function(_deb){if(!this.publicEvents){var _dec=com.ibm.mashups.services.ServiceManager.getService("WidgetEventModelFactoryService");var dfr=_dec.createEventModel(this,{context:this,callback:"_eventProviderModeChange",unregister:function(_ded){this.unregisterArray.push(_ded);}});dfr.setFinishedCallback(dojo.hitch(this,function(_dee,_def){this.publicEvents=_dee;if(_deb){_deb(this.publicEvents);}}));var sync=(_deb)?false:true;if(ibmConfig.dojotest){sync=true;}dfr.start(sync);}return this.publicEvents;},_eventProviderModeChange:function(_df0,_df1,_df2){var _df3=this.publicEvents;var _df4=com.ibm.mashups.services.ServiceManager.getService("WidgetEventModelFactoryService");var dfr=_df4.createEventModel(this,{context:this,callback:"_eventProviderModeChange",unregister:function(_df5){this.unregisterArray.push(_df5);}});dfr.setFinishedCallback(dojo.hitch(this,function(_df6,_df7){this.publicEvents=_df6;}));dfr.start(true);var _df8={};_df8.isHandled="true";var _df9=_df3.getEvents(_df8);if(_df9){for(var i=0;i<_df9.length;i++){var _dfa=_df9[i];var _dfb=this.getPublicEvent(_dfa.name);if(_dfa&&_dfb){_dfb.copyRuntimeProperties(_dfa);}}}},_getPublishedEvents:function(){var _dfc=this.getWidgetPublishedEvents()||null;var arr={};if(_dfc){var i=0;for(i;i<_dfc.length;i++){arr[_dfc[i].name]=_dfc[i];}}return arr;},_getHandledEvents:function(){var _dfd=this.getWidgetHandledEvents()||null;var arr={};if(_dfd){var i=0;for(i;i<_dfd.length;i++){arr[_dfd[i].name]=_dfd[i];}}return arr;},getWidgetPublishedEvents:function(){var _dfe=this._getPublicEvents();if(_dfe){var _dff={};_dff.isPublished="true";return _dfe.getEvents(_dff);}return null;},getWidgetHandledEvents:function(){var _e00=this._getPublicEvents();if(_e00){var _e01={};_e01.isHandled="true";return _e00.getEvents(_e01);}return null;},getWires:function(){return this.getIWidgetInstance().getWires();},_handleNewWire:function(_e02){var _e03=_e02.payload;var _e04=this.getIWidgetInstance().getWireModel();_e04.registerTargets(_e03.targetWidget,_e03.targetEvent,_e03.sourceEvent);this.commit();var _e05=_e03.sourceEvent;var _e06=this._getPublicEvents();if(!_e06){return false;}var _e07=_e06.find(_e05);if(_e07){var _e08=_e07.getOnNewWire();if(_e08){var _e09=this._getHandlerScope(_e08);if(_e09&&dojo.isFunction(_e09)){_e09(_e02);}else{if(_e09&&dojo.isObject(_e09)){_e09[_e08](_e02);}}return true;}}return false;},_handleRemoveWire:function(_e0a){var _e0b=_e0a.payload;var _e0c=_e0b.targetEvent;if(this.id==_e0b.sourceWidget){_e0c=_e0b.sourceEvent;}var _e0d=this._getPublicEvents()||null;if(!_e0d){return false;}var _e0e=_e0d.find(_e0c)||null;if(_e0e){var _e0f=_e0e.getOnRemoveWire();if(_e0f){var _e10=this._getHandlerScope(_e0f);if(_e10&&dojo.isFunction(_e10)){_e10(_e0a);}else{if(_e10&&dojo.isObject(_e10)){_e10[_e0f](_e0a);}}return true;}}return false;},_getShareableItemSets:function(){if(this.shareableItemSets){return this.shareableItemSets;}this.shareableItemSets={};this.shareableItemSets.mapping={};this.shareableItemSets.itemsets={};this.shareableItemSets.listeners={};var _e11=this.widgetDef._getShareableItemSets();if(_e11){var _e12=null;for(var i in _e11){if(Object.prototype.hasOwnProperty.call(_e11,i)){_e12=new com.ibm.mm.iwidget.itemset.ShareableItemSetFactory(this,_e11[i]);var _e13=_e11[i].onItemSetChanged||null;if(_e13){if(!this.shareableItemSets.listeners[i]){this.shareableItemSets.listeners[i]=[];}this.shareableItemSets.listeners[i].push(_e12.addListener(_e13));}this.shareableItemSets.itemsets[i]=_e12;var _e14=_e11[i].alias||null;if(_e14){this.shareableItemSets.mapping[_e14]=_e14;}}}}return this.shareableItemSets;},_getShareableItemSet:function(id){var _e15=this._getShareableItemSets();if(_e15&&_e15.mapping[id]){var _e16=_e15.mapping[id];return _e15.itemsets[_e16];}else{if(_e15&&_e15.itemsets[id]){return _e15.itemsets[id];}}var _e17=new com.ibm.mm.iwidget.itemset.ShareableItemSetFactory(this.widgetwrapper,null,name);_e15.itemsets[id]=_e17;return _e15.itemsets[id];},_executeCallbackQueue:function(){com.ibm.mashups.services.ServiceManager.getService("resourceLoadService").executeCallbackQueue(this.id);},_handleSaveMode:function(){var _e18=com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel();var _e19=com.ibm.mashups.enabler.model.state.AccessorFactory.getWidgetAccessor(_e18,this.id);var _e1a=_e19.getWidgetMode();if(_e1a!=this.currentMode){if(!((_e1a===null)&&(this.currentMode==com.ibm.mm.iwidget.Constants.mode.VIEW))){_e19.setWidgetMode(this.currentMode);var _e1b=_e18.commit();_e1b.start();}}},_transform:function(_e1c,_e1d){var _e1e=this.getPublicEvent(_e1c);if(!(!_e1e||!_e1e.type||!_e1d.type)){var _e1f=new com.ibm.mm.iwidget.IEventImpl(_e1e.name,_e1e.type,_e1d.payload,null);var _e20=new com.ibm.mm.enabler.utils.EventTransformerImpl();var _e21=_e20._transform(_e1d,_e1f)||null;if(_e21){_e1d=_e21;}}return _e1d;},_getModeFromNavStateModel:function(){var _e22=com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel();var _e23=com.ibm.mashups.enabler.model.state.AccessorFactory.getWidgetAccessor(_e22,this.id);return _e23.getWidgetMode();}});com.ibm.mm.iwidget.widget.IWidgetWrapperImpl=com.ibm.mm.iwidget.widget.IWidgetWrapperExtendedImpl;if((ibmConfig.enablerLayerModules)&&(dojo.indexOf(ibmConfig.enablerLayerModules,"CoreModel")>=0)){dojo["require"]("com.ibm.mm.enabler.iwidget.widget.IWidgetWrapperModelImpl");}}if(!dojo._hasResource["com.ibm.mashups.livetext.CallbackModel"]){dojo._hasResource["com.ibm.mashups.livetext.CallbackModel"]=true;dojo.provide("com.ibm.mashups.livetext.CallbackModel");dojo.declare("com.ibm.mashups.livetext.CallbackModel",null,{preProcessCallbackFunc:function(_e24,_e25,_e26){},postProcessCallbackFunc:function(_e27,_e28,_e29,_e2a){}});}if(!dojo._hasResource["com.ibm.mashups.livetext.ConfigEntry_API"]){dojo._hasResource["com.ibm.mashups.livetext.ConfigEntry_API"]=true;dojo.provide("com.ibm.mashups.livetext.ConfigEntry_API");dojo.provide("com.ibm.mashups.livetext.ConfigEntry");dojo.declare("com.ibm.mashups.livetext.ConfigEntry",null,{constructor:function(_e2b,_e2c,_e2d,path,_e2e,_e2f,id){},isEqual:function(_e30){}});}if(!dojo._hasResource["com.ibm.mm.livetext.ConfigEntryImpl"]){dojo._hasResource["com.ibm.mm.livetext.ConfigEntryImpl"]=true;dojo.provide("com.ibm.mm.livetext.ConfigEntryImpl");dojo.declare("com.ibm.mm.livetext.ConfigEntryImpl",com.ibm.mashups.livetext.ConfigEntry,{constructor:function(_e31,_e32,_e33,path,_e34,_e35,id){this.match=_e31;this.wait=_e35;this.procEnc=_e32;this.mod=_e33;this.path=path;this.baseCls=_e34;this.id=id;},isEqual:function(_e36){return _e36&&_e36.match==this.match&&_e36.wait==this.wait&&_e36.procEnc==this.procEnc&&_e36.mod==this.mod&&_e36.path==this.path&&_e36.baseCls==this.baseCls&&_e36.id==this.id;}});com.ibm.mashups.livetext.ConfigEntry=com.ibm.mm.livetext.ConfigEntryImpl;}if(!dojo._hasResource["com.ibm.mashups.livetext.ConfigEntry"]){dojo._hasResource["com.ibm.mashups.livetext.ConfigEntry"]=true;dojo.provide("com.ibm.mashups.livetext.ConfigEntry");}if(!dojo._hasResource["com.ibm.mashups.livetext.Exception"]){dojo._hasResource["com.ibm.mashups.livetext.Exception"]=true;dojo.provide("com.ibm.mashups.livetext.Exception");dojo.declare("com.ibm.mashups.livetext.Exception",null,{constructor:function(_e37,_e38){},getMessage:function(_e39){}});}if(!dojo._hasResource["com.ibm.mashups.livetext.LivetextBatchModel"]){dojo._hasResource["com.ibm.mashups.livetext.LivetextBatchModel"]=true;dojo.provide("com.ibm.mashups.livetext.LivetextBatchModel");dojo.declare("com.ibm.mashups.livetext.LivetextBatchModel",null,{processTag:function(_e3a,_e3b){},unprocessTag:function(_e3c){}});}if(!dojo._hasResource["com.ibm.mashups.livetext.LivetextModel"]){dojo._hasResource["com.ibm.mashups.livetext.LivetextModel"]=true;dojo.provide("com.ibm.mashups.livetext.LivetextModel");dojo.declare("com.ibm.mashups.livetext.LivetextModel",null,{processTag:function(node){},unprocessTag:function(node){}});}if(!dojo._hasResource["com.ibm.mashups.livetext.ServiceModel_API"]){dojo._hasResource["com.ibm.mashups.livetext.ServiceModel_API"]=true;dojo.provide("com.ibm.mashups.livetext.ServiceModel_API");dojo.provide("com.ibm.mashups.livetext.ServiceModel");dojo.declare("com.ibm.mashups.livetext.ServiceModel",null,{SERVICE_NAME:"livetextService",init:function(_e3d){},onTagChanged:function(_e3e,_e3f,_e40,_e41){},onUnchangeTag:function(node,_e42,_e43,_e44,_e45){},onTagContentChanged:function(_e46,_e47,_e48,_e49){},onAddConfigEntry:function(_e4a,_e4b){},onRemoveConfigEntry:function(_e4c){}});com.ibm.mashups.livetext.ServiceModel.SERVICE_NAME=com.ibm.mashups.livetext.ServiceModel.prototype.SERVICE_NAME;}if(!dojo._hasResource["com.ibm.mm.livetext.ServiceModelImpl"]){dojo._hasResource["com.ibm.mm.livetext.ServiceModelImpl"]=true;dojo.provide("com.ibm.mm.livetext.ServiceModelImpl");dojo.declare("com.ibm.mm.livetext.ServiceModelImpl",com.ibm.mashups.livetext.ServiceModel,{_initialized:false,_tagTypes:null,_rootContainer:null,tagChanged:"/com/ibm/mashups/livetext/livetextchanged",unchangeTag:"/com/ibm/mashups/livetext/livetextunchange",tagStatusChange:"/com/ibm/mashups/livetext/livetextchanged",tagContentChanged:"/com/ibm/mashups/livetext/livetextcontentchanged",entryAdded:"/com/ibm/mashups/livetext/configentryadded",entryRemoved:"/com/ibm/mashups/livetext/configentryremoved",constructor:function(){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.bIsLoggable=this.LOGGER.isLoggable(this.LOG_LEVEL);this.LogLevel=com.ibm.mashups.enabler.logging.LogLevel.TRACE;if(com.ibm.mm.livetext.ServiceModelStatic){console.warn("WARNING: Do not create the LiveText Framework multiple times!");return;}com.ibm.mm.livetext.ServiceModelStatic=true;dojo.subscribe(this.entryAdded,this,"onAddConfigEntry");dojo.subscribe(this.entryRemoved,this,"onRemoveConfigEntry");},init:function(_e4d){if(this._initialized){console.warn("WARNING: Do not initialize the LiveText Framework multiple times!");return;}this._initialized=true;if(!_e4d){_e4d={};}this._loadTags(_e4d);dojo.subscribe(this.tagChanged,this,"onTagChanged");dojo.subscribe(this.unchangeTag,this,"onUnchangeTag");dojo.subscribe(this.tagContentChanged,this,"onTagContentChanged");dojo.publish(this.tagContentChanged,[_e4d.node||document,("continueAfterException" in _e4d)?_e4d.continueAfterException:true,_e4d.preProcessCallbackFunc,_e4d.postProcessCallbackFunc]);},_getNodes:function(node,_e4e){var k=[];if(_e4e=="undfined"||!_e4e){console.error("Why are we having tagType undefined ::::");return k;}var _e4f;var a;var _e50=0;if(_e4e.processEnclosedTags!="undefined"&&_e4e.processEnclosedTags){var _e51=_e4e.match;a=[];_e4f=dojo.query(_e51,node);_e4f.forEach(function(node,_e52,_e53){a.push(node);});return a;}else{var _e54=_e4e.match.split(",");a=[];var b=[];for(_e50=0,l=_e54.length;_e500){_e5a=a[0];_e5b=0;while(_e5b0){tag.loaded=tag.loaded||null;if(tag.loaded===null){this._loadTagHandler(tag);}var _e72=[];if(dojo.isFunction(_e6c)){try{_e6c(node,_e71,tag);}catch(error1){console.debug(error1);}}if(this.LOGGER.isLoggable(this.LogLevel.TRACE)){if(tag.tagHandler instanceof com.ibm.mashups.livetext.LivetextBatchModel){this.LOGGER.trace(_e6f,"calling processTag with tagHanlder ${0}",[tag.tagHandler.processTag]);}}if(this.LOGGER.isLoggable(this.LogLevel.TRACE)){this.LOGGER.trace(_e6f,"tagHanlder is Instanceof of LivetextBatchModel ${0}:",[(tag.tagHandler instanceof com.ibm.mashups.livetext.LivetextBatchModel)]);}if(tag.tagHandler instanceof com.ibm.mashups.livetext.LivetextBatchModel){try{tag.tagHandler.processTag(_e70,tag);}catch(error){this.LOGGER.trace("_processTypeTag","processTag tag:"+tag.baseClass+" error:"+error.message);_e72[_e72.length]=error;}}else{for(var _e73=0,l=_e70.length;_e730){tag.loaded=tag.loaded||null;if(tag.loaded===null){this._loadTagHandler(tag);}if(tag.tagHandler instanceof com.ibm.mashups.livetext.LivetextBatchModel){try{tag.tagHandler.unprocessTag(nodes,tag);}catch(error2){_e79[_e79.length]=error2;}}else{for(var _e7a=0,l=tags.length;_e7a0){_e7b=true;}dojo.destroy(copy.copyOfNode);dojo.destroy(copy.copyNodeParent);delete copy.copyOfNode;delete copy.copyNodeParent;delete copy.result;}return _e7b;},_loadTags:function(){var _e7c="_loadTags";this._tagTypes=this._tagTypes||null;if(this._tagTypes===null){var _e7d=this;if(ibmConfig.livetextService){this._tagTypes=ibmConfig.livetextService;}else{dojo.xhrGet({url:dojo.moduleUrl("com.ibm.mm.livetext","tagservice.entries.cfg"),ibmMultipart:{context:com.ibm.mashups.enabler.io.XHRMultipartFactory.CONTEXT_ENABLER},handleAs:"text",sync:true,load:function(_e7e){_e7d._tagTypes=dojo.fromJson(_e7e);if(_e7d.LOGGER.isLoggable(_e7d.LogLevel.TRACE)){_e7d.LOGGER.trace(_e7c,"got Inside _loadTags of ServiceModelImpl"+_e7d._tagTypes);}},error:function(data){console.dir(data);}});}}},onAddConfigEntry:function(_e7f,_e80){this._loadTags();if(!dojo.some(this._tagTypes,function(_e81){return _e7f.isEqual(_e81);})){if(_e80){this._tagTypes.unshift({"match":_e7f.match,"processEnclosedTags":_e7f.procEnc,"waitOnPreTag":_e7f.wait,"module":_e7f.mod,"path":_e7f.path,"baseClass":_e7f.baseCls,"id":_e7f.id});}else{this._tagTypes.push({"match":_e7f.match,"processEnclosedTags":_e7f.procEnc,"waitOnPreTag":_e7f.wait,"module":_e7f.mod,"path":_e7f.path,"baseClass":_e7f.baseCls,"id":_e7f.id});}}},onRemoveConfigEntry:function(_e82){this._loadTags();for(var i=0;;i\s*/,"");_e8d.allSkins[_e8b]=_e90;_e8d.allVars[_e8b]=_e91;_e8d.startAttatchSkin(_e8b,tag);},error:function(data){_e8d.allSkins[_e8b]=_e90;_e8d.startAttatchSkin(_e8b,tag);}});},error:function(data){this.LOGGER.severe("_getSkinTemplate",dojo.string.substitute(com.ibm.mm.builder.coreWidgetsMessages.E_SKIN_LOAD_TEMPLATE_FAIL_1,[data]));}});}else{this.startAttatchSkin(_e8b,tag);}},startAttatchSkin:function(_e92,tag){if(this.isProcessing===0){this.executeReplaceSkin(_e92,tag);}else{this.addToWaitingList(_e92,tag);}},chooseNext:function(){if(this.waitingList.length!==0){var _e93=this.waitingList.pop();this.executeReplaceSkin(_e93.skin,_e93.tag);}},addToWaitingList:function(_e94,tag){if(!this.subscribeHandler){this.subscribeHandler=dojo.subscribe(this.skinAttachEvent,this,"chooseNext");}var _e95={};_e95.skin=_e94;_e95.tag=tag;this.waitingList.push(_e95);},executeReplaceSkin:function(_e96,tag){this.isProcessing=1;var temp=this.allSkins[_e96];if(temp){var _e97=this._getNodeToReplace(tag);var _e98=_e97.parentNode;var anId=dojox.uuid.generateRandomUuid().replace(/\-/g,"");var args=this._getArgs(_e96,tag,anId);if(!args){this.LOGGER.severe("executeReplaceSkin",com.ibm.mm.builder.coreWidgetsMessages.E_SKIN_NOT_EXIST_0);return;}var _e99=this._getSkinResourceUrl(_e96,"skin.css");com.ibm.mm.builder.utils.htmlUtil.loadCss(_e99);if(builderConfig.isBidi){var _e9a=this._getSkinResourceUrl(_e96,"skin_rtl.css");com.ibm.mm.builder.utils.htmlUtil.loadCss(_e9a);}var _e9b=dojo.string.substitute(temp,args);_e9b=_e9b.replace(/\/>/g,">");var _e9c=this._getNodeFromMarkup(_e9b);dojo.addClass(_e9c,"mumWidgetTitleBar");_e98.replaceChild(_e9c,_e97);var _e9d=dojo.byId(anId);_e9d.parentNode.replaceChild(tag,_e9d);if(!(dojo.hasClass(_e97,"iw-iWidget")||dojo.hasClass(_e97,"mm_iWidget"))){}var para={};para.widgetId=tag.id;para.skinNodeId=_e9c.id;para.skinParam=args;com.ibm.mashups.services.ServiceManager.getService("eventService").broadcastEvent("com.ibm.mashups.builder.skinLoaded",para);}this.isProcessing=0;dojo.publish(this.skinAttachEvent,[null]);},_getSkinResourceUrl:function(_e9e,_e9f){try{var _ea0=com.ibm.mm.builder.utils.skinUtil._getSkinModel();var skin=com.ibm.mm.builder.utils.skinUtil.getSkinNode(_e9e)||com.ibm.mm.builder.utils.skinUtil.getDefaultSkin();var url=_ea0.findResourceURL(skin,_e9f);return url;}catch(ex){this.LOGGER.severe("_getSkinResourceUrl",dojo.string.substitute(com.ibm.mm.builder.coreWidgetsMessages.E_SKIN_LOAD_ROOT_FAIL_1,[ex.message]));}return null;},_getArgs:function(_ea1,tag,anId){var args={};var _ea2=this.allVars[_ea1];if(_ea2){dojo.mixin(args,_ea2);}args.widgetBody="
";args.skinId=this.skinIdPrefix+tag.id;if(!args.process){args.process=function(_ea3,_ea4){};}args.process(_ea1,tag.id);return args;},_getNodeMarkup:function(tag){var _ea5=document.createElement("div");_ea5.appendChild(tag.cloneNode(true));var _ea6=_ea5.innerHTML;_ea5.removeChild(_ea5.firstChild);return _ea6;},_getNodeFromMarkup:function(_ea7){var _ea8=document.createElement("div");_ea8.innerHTML=_ea7;return _ea8.removeChild(_ea8.firstChild);},_getNodeToReplace:function(tag){var node=dojo.byId(this.skinIdPrefix+tag.id);if(!node){node=tag;}return node;},_showParent:function(node){var _ea9=node.parentNode;while(_ea9){_ea9=_ea9.parentNode;}}});}if(!dojo._hasResource["tagservices.widgets"]){dojo._hasResource["tagservices.widgets"]=true;dojo.provide("tagservices.widgets");dojo.provide("com.ibm.mm.livetext.widgets");dojo.declare("tagservices.widgets",null,{queue:[],queueHandle:null,queueRendering:true,constructor:function(){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;var _eaa=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME);queueRendering=_eaa.getValue(com.ibm.mashups.enabler.services.ConfigConstants.QUEUE_RENDERING);},processTag:function(tag){var _eab="processTag";var _eac=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_eac){this.LOGGER.entering(_eab,arguments);}var id=dojo.attr(tag,"id");if(typeof id!="undefined"){var _ead=dojo.attr(tag,"lazyLoad");var _eae=com.ibm.mashups.iwidget.model.Factory.getGlobalWidgetModel().find(id);if(_eae===null){_eae=com.ibm.mashups.iwidget.model.Factory.getGlobalWidgetModel().createWidget(tag);}if(_eae){if(!_ead||(_ead&&_ead!="true")){if((queueRendering===true)&&!dojo.hasClass(tag,"iw-Standalone")){this.queue.push({priority:dojo.position(tag).y,widgetId:id});this.processQueue(false);}else{com.ibm.mashups.iwidget.model.Factory.getGlobalWidgetModel().renderWidget(_eae);}}else{_eae.lazyLoad=true;}}}},processQueue:function(_eaf){if(this.queue.length>0){if(_eaf){while(this.queue.length>0){var json=this.queue.shift();var _eb0=com.ibm.mashups.iwidget.model.Factory.getGlobalWidgetModel().find(json.widgetId);if(_eb0){com.ibm.mashups.iwidget.model.Factory.getGlobalWidgetModel().renderWidget(_eb0);break;}}}else{this.queue.sort(function(_eb1,_eb2){return _eb1.priority-_eb2.priority;});}if(!this.queueHandle){var that=this;this.queueHandle=setTimeout(function(){that.queueHandle=setTimeout(function(){that.queueHandle=null;dojo.hitch(that,that.processQueue)(true);},5);},0);}}},unprocessTag:function(tag){var ns=["iw-","mm_"];for(var n=0,l=ns.length;n0){for(var i=0,l=_ec3.length;i0){return dojo.map(md,function(item){return com.ibm.mm.enabler.utils.Dom.textContent(item);});}return [];},getMetaData:function(name,_ed7){var res=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(this.MODEL_METADATA+"[@name='"+name+"']/"+this.BASE_VALUE,this.xmlData,this.mdi_ns);if(res){res=res.getAttribute("value");}if(res&&_ed7){var _ed8=com.ibm.mm.enabler.EndpointUtils.checkForEndpoints(res);if(_ed8){return _ed8;}}return res;},setMetaData:function(name,_ed9){var _eda;var _edb=com.ibm.mashups.enabler.xml.XPath.evaluateXPath(this.MODEL_METADATA+"[@name='"+name+"']/"+this.BASE_VALUE,this.xmlData,this.mdi_ns);if(_edb&&_edb.length>0){_eda=_edb[0];for(var i=1,l=_edb.length;i0){_ee0=this.getMetaData(name);dojo.forEach(_ee1,function(item){dojo.destroy(item);},this);this._setDirty();}return _ee0||null;}});}if(!dojo._hasResource["com.ibm.mashups.enabler.ModifiableMetaData"]){dojo._hasResource["com.ibm.mashups.enabler.ModifiableMetaData"]=true;dojo.provide("com.ibm.mashups.enabler.ModifiableMetaData");}if(!dojo._hasResource["com.ibm.mashups.enabler.ThemeProvider"]){dojo._hasResource["com.ibm.mashups.enabler.ThemeProvider"]=true;dojo.provide("com.ibm.mashups.enabler.ThemeProvider");dojo.declare("com.ibm.mashups.enabler.ThemeProvider",null,{getTheme:function(){},setTheme:function(_ee2){},getThemeIdentifier:function(){},setThemeIdentifier:function(_ee3){}});}if(!dojo._hasResource["com.ibm.mashups.enabler.content.ContentNode"]){dojo._hasResource["com.ibm.mashups.enabler.content.ContentNode"]=true;dojo.provide("com.ibm.mashups.enabler.content.ContentNode");dojo.declare("com.ibm.mashups.enabler.content.ContentNode",[com.ibm.mashups.enabler.Identifiable],{});}if(!dojo._hasResource["com.ibm.mashups.enabler.content.ContentPage"]){dojo._hasResource["com.ibm.mashups.enabler.content.ContentPage"]=true;dojo.provide("com.ibm.mashups.enabler.content.ContentPage");dojo.declare("com.ibm.mashups.enabler.content.ContentPage",[com.ibm.mashups.enabler.content.ContentNode,com.ibm.mashups.enabler.ModifiableMetaData,com.ibm.mashups.enabler.Transformable,com.ibm.mashups.enabler.DirtyFlagProvider],{});}if(!dojo._hasResource["com.ibm.mashups.enabler.content.ContentProvider"]){dojo._hasResource["com.ibm.mashups.enabler.content.ContentProvider"]=true;dojo.provide("com.ibm.mashups.enabler.content.ContentProvider");dojo.declare("com.ibm.mashups.enabler.content.ContentProvider",null,{getContent:function(){throw new Error("Unimplemented API: com.ibm.mashups.enabler.content.ContentProvider.getContent");}});}if(!dojo._hasResource["com.ibm.mashups.enabler.navigation.NavigationElement_API"]){dojo._hasResource["com.ibm.mashups.enabler.navigation.NavigationElement_API"]=true;dojo.provide("com.ibm.mashups.enabler.navigation.NavigationElement_API");dojo.provide("com.ibm.mashups.enabler.navigation.NavigationElement");dojo.declare("com.ibm.mashups.enabler.navigation.NavigationElement",[com.ibm.mashups.enabler.Identifiable,com.ibm.mashups.enabler.ModifiableMetaData,com.ibm.mashups.enabler.ModifiableLocalized,com.ibm.mashups.enabler.DefaultLocalized,com.ibm.mashups.enabler.ThemeProvider,com.ibm.mashups.enabler.content.ContentProvider,com.ibm.mashups.enabler.ac.EffectiveAccess,com.ibm.mashups.enabler.Transformable,com.ibm.mashups.enabler.DirtyFlagProvider],{isHidden:function(){},setHidden:function(hide){},confirmSetHidden:function(hide){},getNavigationElementType:function(){}});}if(!dojo._hasResource["com.ibm.mashups.enabler.EditLinkProvider"]){dojo._hasResource["com.ibm.mashups.enabler.EditLinkProvider"]=true;dojo.provide("com.ibm.mashups.enabler.EditLinkProvider");dojo.declare("com.ibm.mashups.enabler.EditLinkProvider",null,{getEditLink:function(){}});}if(!dojo._hasResource["com.ibm.mashups.enabler.NextLinkProvider"]){dojo._hasResource["com.ibm.mashups.enabler.NextLinkProvider"]=true;dojo.provide("com.ibm.mashups.enabler.NextLinkProvider");dojo.declare("com.ibm.mashups.enabler.NextLinkProvider",null,{_getNextURI:function(){}});}if(!dojo._hasResource["com.ibm.mashups.enabler.ThreadingLinkProvider"]){dojo._hasResource["com.ibm.mashups.enabler.ThreadingLinkProvider"]=true;dojo.provide("com.ibm.mashups.enabler.ThreadingLinkProvider");dojo.declare("com.ibm.mashups.enabler.ThreadingLinkProvider",null,{getParentLink:function(){},getChildrenLink:function(){}});}if(!dojo._hasResource["com.ibm.mm.enabler.space.SpaceIdentifierAspect"]){dojo._hasResource["com.ibm.mm.enabler.space.SpaceIdentifierAspect"]=true;dojo.provide("com.ibm.mm.enabler.space.SpaceIdentifierAspect");dojo.declare("com.ibm.mm.enabler.space.SpaceIdentifierAspect",null,{getSpaceIdentifier:function(){}});}if(!dojo._hasResource["com.ibm.mm.enabler.persistence.PersistenceHandlerImpl"]){dojo._hasResource["com.ibm.mm.enabler.persistence.PersistenceHandlerImpl"]=true;dojo.provide("com.ibm.mm.enabler.persistence.PersistenceHandlerImpl");dojo.declare("com.ibm.mm.enabler.persistence.PersistenceHandlerImpl",null,{constructor:function(){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;},_initTransition:function(ctx,fn){this._transitionCtx=ctx;this._transitionFn=fn;},_initDelegators:function(_ee4,_ee5,_ee6){var _ee7=dojo.getObject(this.declaredClass).prototype;com.ibm.mm.enabler.utils.Misc.forIn(_ee4,function(f,fn){if(dojo.isFunction(f)&&!Object.prototype.hasOwnProperty.call(_ee7,fn)){if(!_ee6||!(_ee6&&_ee6[fn])){this[fn]=dojo.hitch(this,(function(fn){return function(){return (_ee5&&_ee5[fn])?this._delegate(fn,arguments,_ee5[fn]):this._delegate(fn,arguments);};})(fn));}}},this);},_delegate:function(fn,args,_ee8){var _ee9=this.LOGGER.isLoggable(this.LOG_LEVEL);var id;if(!dojo.isFunction(this._persistence[fn])){id=(this.getID)?this.getID():"unknown";if(_ee9){this.LOGGER.trace("com.ibm.mm.enabler.persistence.PersistenceHandlerImpl._delegate","No json implementation found for function '${0}' in object with id '${1}'; switching to xml.",[fn,id]);}this._transitionFn.apply(this._transitionCtx,[id]).start();}else{if(_ee8&&dojo.isFunction(this._persistence[_ee8])&&!this._persistence[_ee8].apply(this._persistence,args||[])){id=(this.getID)?this.getID():"unknown";if(_ee9){this.LOGGER.trace("com.ibm.mm.enabler.persistence.PersistenceHandlerImpl._delegate","Conditional function '${0}' indicated to switch to xml implementation for function '${1}' in object with id '${2}'.",[_ee8,fn,id]);}this._transitionFn.apply(this._transitionCtx,[id]).start();}}if(!dojo.isFunction(this._persistence[fn])){if(_ee9){this.LOGGER.trace("com.ibm.mm.enabler.persistence.PersistenceHandlerImpl._delegate","Function '${0}' not available in xml as well.",fn);}throw new Error("fn not available!");}return this._persistence[fn].apply(this._persistence,args||[]);},_getPersistence:function(){return this._persistence;},_setPersistence:function(p){this._persistence=p;},toString:function(){if(!this._persistence){return "";}return this._delegate("toString");}});}if(!dojo._hasResource["com.ibm.mm.enabler.navigation.NavigationElementImpl"]){dojo._hasResource["com.ibm.mm.enabler.navigation.NavigationElementImpl"]=true;dojo.provide("com.ibm.mm.enabler.navigation.NavigationElementImpl");dojo.declare("com.ibm.mm.enabler.IdentifiablePrivate",null,{_setRawID:function(){},_getRawID:function(){},setID:function(){}});dojo.declare("com.ibm.mm.enabler.navigation.NavigationElementImpl",[com.ibm.mashups.enabler.navigation.NavigationElement,com.ibm.mm.enabler.persistence.PersistenceHandlerImpl],{constructor:function(_eea){this.navModel=_eea;var e=com.ibm.mashups.enabler;this._initDelegators(e.DefaultLocalized.prototype);this._initDelegators(e.Identifiable.prototype);this._initDelegators(e.Localized.prototype);this._initDelegators(e.MetaData.prototype);this._initDelegators(e.ModifiableLocalized.prototype);this._initDelegators(e.ModifiableMetaData.prototype);this._initDelegators(e.NextLinkProvider.prototype);this._initDelegators(e.ThemeProvider.prototype);this._initDelegators(e.Transformable.prototype);this._initDelegators(e.EditLinkProvider.prototype);this._initDelegators(e.DirtyFlagProvider.prototype);var n=e.navigation;this._initDelegators(n.NavigationElement.prototype);var c=e.content;this._initDelegators(c.ServerRuntimeContent.prototype);this._initDelegators(c.ServerRuntimeContentProvider.prototype);this._initDelegators(c.ContentProvider.prototype,null,{getContent:true});this._initDelegators(e.ac.EffectiveAccess.prototype,{hasRole:"hasCachedHasRole"});this._initDelegators(e.ThreadingLinkProvider.prototype);this._initDelegators(com.ibm.mm.enabler.space.SpaceIdentifierAspect.prototype);this._initDelegators(com.ibm.mm.enabler.IdentifiablePrivate.prototype);var nm=com.ibm.mashups.enabler.navigation.Factory.getNavigationModel();this._initTransition(nm,nm.getModifiableNode);},getContent:function(){return new com.ibm.mm.enabler.DeferredImpl(this,function(_eeb,sync){var _eec="getContent";var _eed=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_eed){this.LOGGER.entering(_eec,arguments);}var _eee=null;var dfr=this._getPersistence().getContent();dfr.setFinishedCallback(dojo.hitch(this,function(node,_eef){if(node){_eee=this.navModel._wrapContent(node);}_eeb.finish(_eee,_eef);}));dfr.start(sync);if(_eed){this.LOGGER.exiting(_eec,_eee);}return _eee;});}});}if(!dojo._hasResource["com.ibm.mashups.enabler.navigation.NavigationElement"]){dojo._hasResource["com.ibm.mashups.enabler.navigation.NavigationElement"]=true;dojo.provide("com.ibm.mashups.enabler.navigation.NavigationElement");}if(!dojo._hasResource["com.ibm.mashups.enabler.content.ServerRuntimeContent"]){dojo._hasResource["com.ibm.mashups.enabler.content.ServerRuntimeContent"]=true;dojo.provide("com.ibm.mashups.enabler.content.ServerRuntimeContent");dojo.declare("com.ibm.mashups.enabler.content.ServerRuntimeContent",null,{getServerRuntimeMarkup:function(_ef0){throw new Error("Unimplemented API: com.ibm.mashups.enabler.content.ServerRuntimeContent.getServerRuntimeMarkup");}});}if(!dojo._hasResource["com.ibm.mashups.enabler.content.ServerRuntimeContentProvider"]){dojo._hasResource["com.ibm.mashups.enabler.content.ServerRuntimeContentProvider"]=true;dojo.provide("com.ibm.mashups.enabler.content.ServerRuntimeContentProvider");dojo.declare("com.ibm.mashups.enabler.content.ServerRuntimeContentProvider",null,{getServerRuntimeContent:function(){throw new Error("Unimplemented API: com.ibm.mashups.enabler.content.ServerRuntimeContentProvider.getServerRuntimeContent");},primeServerRuntimeContent:function(_ef1){throw new Error("Unimplemented SPI: com.ibm.mashups.enabler.content.ServerRuntimeContentProvider.primeServerRuntimeContent");}});}if(!dojo._hasResource["com.ibm.mashups.enabler.navigation.NavigationNode_API"]){dojo._hasResource["com.ibm.mashups.enabler.navigation.NavigationNode_API"]=true;dojo.provide("com.ibm.mashups.enabler.navigation.NavigationNode_API");dojo.provide("com.ibm.mashups.enabler.navigation.NavigationNode");dojo.declare("com.ibm.mashups.enabler.navigation.NavigationNode",[com.ibm.mashups.enabler.navigation.NavigationElement,com.ibm.mashups.enabler.content.ServerRuntimeContentProvider,com.ibm.mashups.enabler.RepresentationProvider],{getExportPageURL:function(){}});}if(!dojo._hasResource["com.ibm.mm.enabler.navigation.NavigationNodeImpl"]){dojo._hasResource["com.ibm.mm.enabler.navigation.NavigationNodeImpl"]=true;dojo.provide("com.ibm.mm.enabler.navigation.NavigationNodeImpl");dojo.declare("com.ibm.mm.enabler.navigation.NavigationNodeImpl",[com.ibm.mm.enabler.navigation.NavigationElementImpl],{constructor:function(){this._initDelegators(com.ibm.mashups.enabler.navigation.NavigationNode.prototype);this._initDelegators(com.ibm.mashups.enabler.content.ServerRuntimeContentProvider.prototype);}});}if(!dojo._hasResource["com.ibm.mashups.enabler.navigation.NavigationNode"]){dojo._hasResource["com.ibm.mashups.enabler.navigation.NavigationNode"]=true;dojo.provide("com.ibm.mashups.enabler.navigation.NavigationNode");}if(!dojo._hasResource["com.ibm.mashups.enabler.navigation.NavigationLabel_API"]){dojo._hasResource["com.ibm.mashups.enabler.navigation.NavigationLabel_API"]=true;dojo.provide("com.ibm.mashups.enabler.navigation.NavigationLabel_API");dojo.provide("com.ibm.mashups.enabler.navigation.NavigationLabel");dojo.declare("com.ibm.mashups.enabler.navigation.NavigationLabel",[com.ibm.mashups.enabler.navigation.NavigationElement],{});}if(!dojo._hasResource["com.ibm.mm.enabler.navigation.NavigationLabelImpl"]){dojo._hasResource["com.ibm.mm.enabler.navigation.NavigationLabelImpl"]=true;dojo.provide("com.ibm.mm.enabler.navigation.NavigationLabelImpl");dojo.declare("com.ibm.mm.enabler.navigation.NavigationLabelImpl",[com.ibm.mashups.enabler.navigation.NavigationLabel,com.ibm.mm.enabler.navigation.NavigationElementImpl],{constructor:function(){this._initDelegators(com.ibm.mashups.enabler.navigation.NavigationLabel.prototype);}});}if(!dojo._hasResource["com.ibm.mashups.enabler.navigation.NavigationLabel"]){dojo._hasResource["com.ibm.mashups.enabler.navigation.NavigationLabel"]=true;dojo.provide("com.ibm.mashups.enabler.navigation.NavigationLabel");}if(!dojo._hasResource["com.ibm.mashups.enabler.navigation.NavigationURL_API"]){dojo._hasResource["com.ibm.mashups.enabler.navigation.NavigationURL_API"]=true;dojo.provide("com.ibm.mashups.enabler.navigation.NavigationURL_API");dojo.provide("com.ibm.mashups.enabler.navigation.NavigationURL");dojo.declare("com.ibm.mashups.enabler.navigation.NavigationURL",[com.ibm.mashups.enabler.navigation.NavigationElement],{getURL:function(){},setURL:function(url){}});}if(!dojo._hasResource["com.ibm.mm.enabler.navigation.NavigationURLImpl"]){dojo._hasResource["com.ibm.mm.enabler.navigation.NavigationURLImpl"]=true;dojo.provide("com.ibm.mm.enabler.navigation.NavigationURLImpl");dojo.declare("com.ibm.mm.enabler.navigation.NavigationURLImpl",[com.ibm.mm.enabler.navigation.NavigationElementImpl],{constructor:function(){this._initDelegators(com.ibm.mashups.enabler.navigation.NavigationURL.prototype);}});}if(!dojo._hasResource["com.ibm.mashups.enabler.navigation.NavigationURL"]){dojo._hasResource["com.ibm.mashups.enabler.navigation.NavigationURL"]=true;dojo.provide("com.ibm.mashups.enabler.navigation.NavigationURL");}if(!dojo._hasResource["com.ibm.mm.enabler.EmptyModelIteratorImpl"]){dojo._hasResource["com.ibm.mm.enabler.EmptyModelIteratorImpl"]=true;dojo.provide("com.ibm.mm.enabler.EmptyModelIteratorImpl");dojo.declare("com.ibm.mm.enabler.EmptyModelIteratorImpl",[com.ibm.mm.enabler.DeferredIteratorImpl],{constructor:function(){},start:function(){this.finish(null,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK);},hasNext:function(dfr){if(dfr){dfr.finish(null,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK);}return false;},next:function(dfr){if(dfr){dfr.finish(null,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK);}return null;},setCursorPosition:function(){},getCursorPosition:function(){return 0;},size:function(){return new com.ibm.mm.enabler.DeferredImpl(this,this._size);},_size:function(dfr,sync){if(dfr){dfr.finish(0,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK);}return 0;}});}if(!dojo._hasResource["com.ibm.mm.enabler.navigation.persistence.FactoryImpl"]){dojo._hasResource["com.ibm.mm.enabler.navigation.persistence.FactoryImpl"]=true;dojo.provide("com.ibm.mm.enabler.navigation.persistence.FactoryImpl");dojo.declare("com.ibm.mm.enabler.navigation.persistence.FactoryImpl",null,{createNavigationElement:function(p,_ef2){var type=p.getNavigationElementType();var c=com.ibm.mashups.enabler.navigation.Constants;var w;switch(type){case c.NAVIGATION_PAGE:w=new com.ibm.mm.enabler.navigation.NavigationNodeImpl(_ef2);break;case c.NAVIGATION_LABEL:w=new com.ibm.mm.enabler.navigation.NavigationLabelImpl(_ef2);break;case c.NAVIGATION_URL:w=new com.ibm.mm.enabler.navigation.NavigationURLImpl(_ef2);break;default:console.warn("No navigation element type specified!");break;}w._setPersistence(p);p._setContext({getBaseContext:function(){return w;}});return w;}});com.ibm.mm.enabler.navigation.persistence.Factory=new com.ibm.mm.enabler.navigation.persistence.FactoryImpl();}if(!dojo._hasResource["com.ibm.mm.enabler.ModelIteratorOrderedBaseImpl"]){dojo._hasResource["com.ibm.mm.enabler.ModelIteratorOrderedBaseImpl"]=true;dojo.provide("com.ibm.mm.enabler.ModelIteratorOrderedBaseImpl");dojo.declare("com.ibm.mm.enabler.ModelIteratorOrderedBaseImpl",[com.ibm.mm.enabler.DeferredIteratorImpl],{constructor:function(_ef3,_ef4){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.persistenceProvider=_ef3;this.modelProvider=_ef4;this.entries=[];this.entryCache={};this.context=null;this.cursor=0;this.loadFurtherNodes=true;this.sizeValue=null;this._inboundNodes={};this._numInboundNodes=0;com.ibm.mm.enabler.utils.Misc.forIn(this.modelProvider.getCreatedNodes(),function(node,id){this._inboundNodes[id]=null;this._numInboundNodes++;},this);com.ibm.mm.enabler.utils.Misc.forIn(this.modelProvider.getInboundNodes(),function(node,id){this._inboundNodes[id]=null;this._numInboundNodes++;},this);this._outboundNodes={};this._numOutboundNodes=0;com.ibm.mm.enabler.utils.Misc.forIn(this.modelProvider.getDeletedNodes(),function(node,id){this._outboundNodes[id]=null;this._numOutboundNodes++;},this);com.ibm.mm.enabler.utils.Misc.forIn(this.modelProvider.getOutboundNodes(),function(node,id){this._outboundNodes[id]=null;this._numOutboundNodes++;},this);},hasNext:function(dfr,sync){if(typeof this.entries[this.cursor]=="undefined"){var _ef5=0;if(this.loadFurtherNodes){this._loadAheadInternal(dfr||null,true);_ef5=this.cursor;}else{this.entries[0]=null;}}var _ef6=this.entries[this.cursor];var _ef7=_ef6?true:false;if(_ef7&&this._outboundNodes[_ef6]===null){this.cursor++;return this.hasNext(dfr,sync);}return _ef7;},next:function(dfr,sync){if(this.hasNext(dfr||null,true)){var _ef8=this.entries[this.cursor++];var _ef9=this.modelProvider.lookupNodeInCacheByID(_ef8);return (typeof _ef9=="undefined")?this.entryCache[_ef8]:_ef9;}return null;},_insertInbound:function(_efa,_efb){for(var id in this._inboundNodes){_efa.splice(_efb,0,id);_efb++;}},setCursorPosition:function(_efc){if(_efc<0){return;}if(!this.loadFurtherNodes){if(_efc>=this.size().start()){return;}}this.cursor=_efc;this.persistenceProvider.setCursorPosition(this.context,this);},getCursorPosition:function(){return this.cursor;},size:function(){return new com.ibm.mm.enabler.DeferredImpl(this,this._size);},_size:function(dfr,sync){if(!this.sizeValue){this.hasNext(null,true);}var size=this.sizeValue+this._numInboundNodes-this._numOutboundNodes;if(size<0){size=0;}if(dfr){dfr.finish(size,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK);}return size;},start:function(sync){this._loadAheadInternal(this,sync,true);},_loadAheadInternal:function(_efd,sync,_efe){var _eff="_loadAhead";var _f00=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_f00){this.LOGGER.entering(_eff,arguments);}if(!this.context){this.context=this.persistenceProvider.getLoadAheadContext(null,this);}var _f01;var dfr=this.persistenceProvider.loadAhead(this.context);dfr.setFinishedCallback(dojo.hitch(this,function(_f02,_f03){if(_f02==null){this.loadFurtherNodes=false;this.sizeValue=0;this.entries[this.cursor]=null;this._insertInbound(this.entries,this.cursor);if(_efd){_efd.finish(null,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_BAD_REQUEST);}return;}this.loadFurtherNodes=_f02.loadFurtherNodes;this.sizeValue=_f02.size;if(_f02.size==0){this.entries[this.cursor]=null;this._insertInbound(this.entries,this.cursor);if(_efd){_efd.finish(null,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK);}return;}var c=0;if(_f02.nodes){for(var i=0,l=_f02.nodes.length;i0;}return _f44;},hasCachedHasChildren:function(_f46){return this._internalCache.pages[_f46];},findSpace:function(_f47,_f48,sync,_f49){var _f4a=function(_f4b){if(this._internalCache.spaces[_f4b]){return this._internalCache.spaces[_f4b];}return null;};var _f4c=_f4a.apply(this,[_f47])||null;if(_f4c){if(dojo.isFunction(_f48)){_f48(_f4c,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK);}}else{var _f4d=null;if(!com.ibm.mm.enabler.utils.Misc.isEmpty(this._internalCache.pages)){_f4d={"sections":["spaces"],"spaces":{"select":["current"]}};}this.findBySelection(this.COLLECTION,_f47,_f4d,dojo.hitch(this,function(_f4e){if(_f4e==com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK){_f4c=_f4a.apply(this,[_f47])||null;}if(dojo.isFunction(_f48)){_f48(_f4c,_f4e);}}),sync,_f49);}return _f4c;},getSpace:function(_f4f,_f50,sync,_f51){var _f52=function(_f53){if(this._page2SpaceMap[_f53]){var _f54=this._page2SpaceMap[_f53];if(_f54==this.MY_MASHUP_APPS){return this.MY_MASHUP_APPS;}else{if(this._internalCache.spaces[_f54]){return this._internalCache.spaces[_f54];}}}return null;};var _f55=null;var _f56=_f52.apply(this,[_f4f])||null;if(_f56){if(_f56==this.MY_MASHUP_APPS){if(dojo.isFunction(_f50)){_f50(null,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_NOT_FOUND);}}else{_f55=_f56;if(dojo.isFunction(_f50)){_f50(_f55,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK);}}}else{var _f57=null;if(!com.ibm.mm.enabler.utils.Misc.isEmpty(this._internalCache.spaces)){_f57={"sections":["spaces"],"spaces":{"select":["current"]}};}this.findBySelection(_f4f,null,_f57,dojo.hitch(this,function(_f58){if(_f58==com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK){_f55=_f52.apply(this,[_f4f])||null;if(!_f55){this._page2SpaceMap[_f4f]=this.MY_MASHUP_APPS;_f55=this.MY_MASHUP_APPS;}}if(dojo.isFunction(_f50)){_f50(_f55,_f58);}}),sync,_f51);}return _f55;},getFavoriteSpaces:function(_f59,sync,_f5a){var _f5b=this.COLLECTION;var _f5c=function(_f5d){if(this._internalCache.favorites.length>0){var _f5e=[];for(var i=0;i0;i--){this._internalCache.parents[_f89[i]]=_f89[i-1];}}if(_f86.topLevel){var tl=_f86.topLevel;this._internalCache.topLevels[_f87]=tl;}if(_f86.root){this._internalCache.rootNodes[_f87]=_f86.root;}else{if(_f86.trail){this._internalCache.rootNodes[this.MY_MASHUP_APPS]=_f86.trail[0];}}}for(var j=0,m=_f83.data.length;j0);},hasWidgetsCached:function(_f92){if(this._internalCache.widgets[_f92]){return true;}else{return false;}},invalidatePage:function(id,_f93){if(!id){this._internalCache.pages={};this._internalCache.trails={};this._internalCache.parents={};this._page2SpaceMap={};this._spaceForPage={};}else{if(_f93){var node=this._internalCache.pages[id];if(node){node.children=null;}}else{delete this._internalCache.pages[id];delete this._internalCache.trails[id];delete this._page2SpaceMap[id];delete this._spaceForPage[id];var _f94=this._internalCache.parents[id];if(_f94){var _f95=this._internalCache.pages[_f94];if(_f95){_f95.children=null;}}var _f96=[];for(var _f97 in this._internalCache.parents){_f94=this._internalCache.parents[_f97];if(_f94==id){_f96.push(_f97);}}for(var i=0,l=_f96.length;i1&&com.ibm.mm.enabler.utils.Misc.isEmpty(node.children[0])){var _f9c=com.ibm.mm.enabler.persistence.JsonPersistenceProvider;for(var i=1;i1){c.children=[];for(var j=0;j=this.filters.length){return;}if(this.changing){this.filters[this.current++].onChangingStyle(_103a,_103b,_103c,_103d,this);}else{this.filters[this.current++].onChangeStyle(_103a,_103b,_103c,this);}}});}if(!dojo._hasResource["com.ibm.mashups.enabler.runtime.skin.StyleFilterChain"]){dojo._hasResource["com.ibm.mashups.enabler.runtime.skin.StyleFilterChain"]=true;dojo.provide("com.ibm.mashups.enabler.runtime.skin.StyleFilterChain");}if(!dojo._hasResource["com.ibm.mashups.enabler.runtime.skin.StyleFilter"]){dojo._hasResource["com.ibm.mashups.enabler.runtime.skin.StyleFilter"]=true;dojo.provide("com.ibm.mashups.enabler.runtime.skin.StyleFilter");dojo.declare("com.ibm.mashups.enabler.runtime.skin.StyleFilter",null,{onChangingStyle:function(_103e,_103f,_1040,_1041,_1042){},onChangeStyle:function(_1043,_1044,_1045,_1046){},onChangeLayoutControl:function(_1047){}});}if(!dojo._hasResource["com.ibm.mashups.enabler.runtime.skin.RuntimeSkinModel_API"]){dojo._hasResource["com.ibm.mashups.enabler.runtime.skin.RuntimeSkinModel_API"]=true;dojo.provide("com.ibm.mashups.enabler.runtime.skin.RuntimeSkinModel_API");dojo.provide("com.ibm.mashups.enabler.runtime.skin.RuntimeSkinModel");dojo.declare("com.ibm.mashups.enabler.runtime.skin.RuntimeSkinModel",[com.ibm.mashups.enabler.ListModel,com.ibm.mashups.enabler.runtime.skin.RuntimeSkinLocator,com.ibm.mashups.enabler.Invalidatable],{addStyleFilter:function(_1048,_1049,_104a){},removeStyleFilter:function(_104b){},find:function(id){}});}if(!dojo._hasResource["com.ibm.mashups.enabler.runtime.skin.DynamicContentFilterChain_API"]){dojo._hasResource["com.ibm.mashups.enabler.runtime.skin.DynamicContentFilterChain_API"]=true;dojo.provide("com.ibm.mashups.enabler.runtime.skin.DynamicContentFilterChain_API");dojo.provide("com.ibm.mashups.enabler.runtime.skin.DynamicContentFilterChain");dojo.declare("com.ibm.mashups.enabler.runtime.skin.DynamicContentFilterChain",null,{doFilter:function(_104c,name,_104d,_104e,_104f){}});}if(!dojo._hasResource["com.ibm.mm.enabler.runtime.skin.DynamicContentFilterChainImpl"]){dojo._hasResource["com.ibm.mm.enabler.runtime.skin.DynamicContentFilterChainImpl"]=true;dojo.provide("com.ibm.mm.enabler.runtime.skin.DynamicContentFilterChainImpl");dojo.declare("com.ibm.mm.enabler.runtime.skin.DynamicContentFilterChainImpl",[com.ibm.mashups.enabler.runtime.skin.DynamicContentFilterChain],{constructor:function(_1050,_1051){this.filters=_1050;this.changing=_1051;this.current=0;},doFilter:function(_1052,name,_1053,_1054,_1055){if(this.current>=this.filters.length){return;}if(this.changing){this.filters[this.current++].onChangingDynamicContent(_1052,name,_1053,_1054,_1055,this);}else{this.filters[this.current++].onChangeDynamicContent(_1052,name,_1053,_1054,this);}}});}if(!dojo._hasResource["com.ibm.mashups.enabler.runtime.skin.DynamicContentFilterChain"]){dojo._hasResource["com.ibm.mashups.enabler.runtime.skin.DynamicContentFilterChain"]=true;dojo.provide("com.ibm.mashups.enabler.runtime.skin.DynamicContentFilterChain");}if(!dojo._hasResource["com.ibm.mashups.enabler.runtime.skin.DynamicContentFilter"]){dojo._hasResource["com.ibm.mashups.enabler.runtime.skin.DynamicContentFilter"]=true;dojo.provide("com.ibm.mashups.enabler.runtime.skin.DynamicContentFilter");dojo.declare("com.ibm.mashups.enabler.runtime.skin.DynamicContentFilter",null,{onChangingDynamicContent:function(_1056,name,_1057,_1058,_1059,_105a){},onChangeDynamicContent:function(_105b,name,_105c,_105d,_105e){}});}if(!dojo._hasResource["com.ibm.mm.enabler.runtime.skin.SystemStyleFilter"]){dojo._hasResource["com.ibm.mm.enabler.runtime.skin.SystemStyleFilter"]=true;dojo.provide("com.ibm.mm.enabler.runtime.skin.SystemStyleFilter");dojo.declare("com.ibm.mm.enabler.runtime.skin.SystemStyleFilter",[com.ibm.mashups.enabler.runtime.skin.StyleFilter],{constructor:function(_105f,_1060,_1061){this.navModel=_105f;this.layoutModel=_1060;this.rsModel=_1061;},onChangingStyle:function(_1062,_1063,_1064,_1065,_1066){_1066.doFilter(_1062,_1063,_1064,_1065);},onChangeStyle:function(_1067,_1068,_1069,_106a){var _106b=com.ibm.mm.enabler.runtime.skin.RuntimeSkinNodeImpl.prototype._serializeStyle(_1069);_1067.setMetaData("css-style",_106b);_106a.doFilter(_1067,_1068,_1069);}});}if(!dojo._hasResource["com.ibm.mm.enabler.runtime.skin.SystemDynamicContentFilter"]){dojo._hasResource["com.ibm.mm.enabler.runtime.skin.SystemDynamicContentFilter"]=true;dojo.provide("com.ibm.mm.enabler.runtime.skin.SystemDynamicContentFilter");dojo.declare("com.ibm.mm.enabler.runtime.skin.SystemDynamicContentFilter",null,{onChangingDynamicContent:function(_106c,name,_106d,_106e,_106f,_1070){_1070.doFilter(_106c,name,_106d,_106e,_106f,_1070);},onChangeDynamicContent:function(_1071,name,_1072,_1073,_1074){_1074.doFilter(_1071,name,_1072,_1073);if(!com.ibm.mm.enabler.utils.Misc.isInstanceOf(_1071,com.ibm.mashups.enabler.layout.LayoutControl)||(typeof _1073==="undefined"||null===_1073)||_1072===_1073){return;}var _1075=com.ibm.mashups.enabler.runtime.skin.Factory.getRuntimeSkinModel();var _1076=_1075.findByLayoutNode(_1071);var node=_1076.getDomElementForDynamicContent(name);if(!node){return;}if(name==com.ibm.mashups.enabler.runtime.skin.Constants.DYNAMIC_CONTENT_TITLE){node.innerHTML=_1073.replace(/&/g,"&").replace(/"/g,"\"").replace(/>/g,">").replace(/</g,"<");}else{if(name==com.ibm.mashups.enabler.runtime.skin.Constants.DYNAMIC_CONTENT_ICON){node.src=_1073;}}}});}if(!dojo._hasResource["com.ibm.mm.enabler.runtime.skin.RuntimeSkinModelImpl"]){dojo._hasResource["com.ibm.mm.enabler.runtime.skin.RuntimeSkinModelImpl"]=true;dojo.provide("com.ibm.mm.enabler.runtime.skin.RuntimeSkinModelImpl");dojo.declare("com.ibm.mm.enabler.runtime.skin.RuntimeSkinModelImpl",[com.ibm.mashups.enabler.runtime.skin.RuntimeSkinModel,com.ibm.mm.enabler.model.ModelImpl],{constructor:function(){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.modelMessages=dojo.i18n.getLocalization("com.ibm.mm.enabler","modelMessages");this.nodes=new dojox.collections.Dictionary();var ids=[];this.cursor=0;this.styleChains=new dojox.collections.Dictionary();this.dcChains=new dojox.collections.Dictionary();this.currentPage=null;this.navStateModel=com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel();this.navModel=com.ibm.mashups.enabler.navigation.Factory.getNavigationModel();this.styleFilters=new dojox.collections.SortedList();this.styleFilters.add(com.ibm.mashups.enabler.runtime.skin.Constants.ORDINAL_FIRST,new dojox.collections.ArrayList());this.styleFilters.add(com.ibm.mashups.enabler.runtime.skin.Constants.ORDINAL_LAST,new dojox.collections.ArrayList());this.styleFilterIDs=new dojox.collections.SortedList();this.dcFilters=new dojox.collections.SortedList();this.dcFilters.add(com.ibm.mashups.enabler.runtime.skin.Constants.ORDINAL_FIRST,new dojox.collections.ArrayList());this.dcFilters.add(com.ibm.mashups.enabler.runtime.skin.Constants.ORDINAL_LAST,new dojox.collections.ArrayList());this.dcFilterIDs=new dojox.collections.SortedList();},invalidate:function(node){if(node){var id=node.getLayoutNode().getID();if(this.styleChains.containsKey(id)){this.styleChains.remove(id);}}else{this.styleChains.clear();}},getInstance:function(){var _1077=com.ibm.mm.enabler.runtime.skin.RuntimeSkinModelImpl._instance;var ret=_1077?_1077:(com.ibm.mm.enabler.runtime.skin.RuntimeSkinModelImpl._instance=new com.ibm.mm.enabler.runtime.skin.RuntimeSkinModelImpl());ret.navStateModel=com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel();ret.navModel=com.ibm.mashups.enabler.navigation.Factory.getNavigationModel();return ret;},_buildIteratorNodes:function(node,lm){var _1078="buildIteratorNodes(node, lm)";var _1079=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_1079){this.LOGGER.entering(_1078,[node,lm]);}if(typeof node=="undefined"||null===node){if(_1079){this.LOGGER.exiting(_1078);}return;}if(com.ibm.mm.enabler.utils.Misc.isInstanceOf(node,com.ibm.mashups.enabler.layout.LayoutControl)||com.ibm.mm.enabler.utils.Misc.isInstanceOf(node,com.ibm.mashups.enabler.layout.LayoutContainer)){if(_1079){this.LOGGER.trace(_1078,"Adding runtime skin node with id: "+node.getID());}this.nodes.add(node.getID(),new com.ibm.mm.enabler.runtime.skin.RuntimeSkinNodeImpl(node,this));this.ids[this.ids.length]=node.getID();}var _107a=lm.getChildren(node);while(_107a.hasNext()){this._buildIteratorNodes(_107a.next(),lm);}if(_1079){this.LOGGER.exiting(_1078);}},iterator:function(){var _107b="iterator()";var _107c=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_107c){this.LOGGER.entering(_107b);}this.nodes.clear();this.ids=[];var page=this._getCurrentPage();this.cursor=0;if(page===null){if(_107c){this.LOGGER.exiting(_107b);}return this;}var _107d=this.navModel.getLayoutModel(page);if(_107d===null){if(_107c){this.LOGGER.exiting(_107b);}return this;}var root=_107d.getRoot().start();this._buildIteratorNodes(root,_107d);if(_107c){this.LOGGER.exiting(_107b);}return this;},start:function(sync){},hasNext:function(){return this.size()>this.cursor;},next:function(){if(!this.hasNext()){return null;}var ret=null;var id=this.ids[this.cursor++];ret=this.nodes.entry(id).valueOf()||null;return ret;},size:function(){return this.nodes.count;},setCursorPosition:function(_107e){this.cursor=_107e;},getCursorPosition:function(){return this.cursor;},_getCurrentPage:function(){var _107f="_getCurrentPage()";var _1080=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_1080){this.LOGGER.entering(_107f);}var _1081=com.ibm.mashups.enabler.model.state.AccessorFactory.getPageAccessor(this.navStateModel,null);var _1082=_1081.getPageID();if(_1080){this.LOGGER.trace(_107f,"page id is "+_1082);}if(typeof _1082=="undefined"||null===_1082){if(_1080){this.LOGGER.exiting(_107f,null);}return null;}var node=this.navModel.find(_1082).start();if(_1080){this.LOGGER.exiting(_107f,node);}return node;},_getLayoutModel:function(){var page=this._getCurrentPage();if(null===page){return null;}return this.navModel.getLayoutModel(page);},_hasPageChanged:function(page){if(this.currentPage===null||com.ibm.mm.enabler.utils.Utils.getIdFromIdentifiable(page)!=com.ibm.mm.enabler.utils.Utils.getIdFromIdentifiable(this.currentPage)){this.currentPage=page;this.nodes.clear();this.ids=[];return true;}return false;},_isLayoutNodeOnCurrentPage:function(_1083){return true;},find:function(id){var _1084="find(id)";var _1085=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_1085){this.LOGGER.entering(_1084,id);}if(typeof id=="undefined"||id===null){return null;}var page=this._getCurrentPage();this._hasPageChanged(page);if(!this._isLayoutNodeOnCurrentPage(id)){if(this.nodes.containsKey(id)){this.nodes.remove(id);}if(_1085){this.LOGGER.trace(_1084,id+" is not on the current page");this.LOGGER.exiting(_1084,null);}return null;}if(this.nodes.containsKey(id)){if(_1085){this.LOGGER.trace(_1084,id+" is cached");this.LOGGER.exiting(_1084,this.nodes.entry(id).valueOf());}return this.nodes.entry(id).valueOf();}var _1086=new com.ibm.mm.enabler.runtime.skin.RuntimeSkinNodeImpl(id,this);this.nodes.add(id,_1086);this.ids[this.ids.length]=id;if(_1085){this.LOGGER.exiting(_1084,_1086);}return _1086;},findByLayoutNode:function(_1087){var _1088="findByLayoutNode(layoutNode)";var _1089=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_1089){this.LOGGER.entering(_1088,_1087);}if(typeof _1087=="undefined"||null===_1087){if(_1089){this.LOGGER.exiting(_1088,null);}return null;}var _108a=this.find(_1087.getID());if(_108a){_108a._setLayoutNode(_1087);}if(_1089){this.LOGGER.exiting(_1088,_108a);}return _108a;},_generateFilterId:function(){if(!this._listenerCounter){this._listenerCounter=1;}else{this._listenerCounter++;}return this._listenerCounter;},addStyleFilter:function(_108b,_108c,_108d){var _108e="ordinal, filter, scopeObject";var _108f=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_108f){this.LOGGER.entering(_108e,[_108b,_108c,_108d]);}if(!com.ibm.mm.enabler.utils.Misc.isInstanceOf(_108c,com.ibm.mashups.enabler.runtime.skin.StyleFilter)){if(_108f){this.LOGGER.exiting(_108e,-1);}return -1;}var id=this._addFilter(_108b,_108c,_108d,this.styleFilterIDs,this.styleFilters,this.styleChains);if(_108f){this.LOGGER.exiting(_108e,id);}return id;},_addFilter:function(_1090,_1091,_1092,ids,_1093,_1094){var _1095="_addFilter(ordinal, filter, scopeObject, ids, filters)";var _1096=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_1096){this.LOGGER.entering(_1095,[_1090,_1091,_1092,ids,_1093]);}if(typeof _1090!="number"){this.LOGGER.trace(_1095,"ordinal is not a number");this.LOGGER.exiting(_1095,-1);return -1;}var _1097;var _1098=false;if(typeof _1092=="undefined"||null===_1092||!com.ibm.mm.enabler.utils.Misc.isInstanceOf(_1092,com.ibm.mashups.enabler.layout.LayoutNode)){_1097=null;if(_1096){this.LOGGER.trace(_1095,"no scope object");}}else{if(com.ibm.mm.enabler.utils.Misc.isInstanceOf(_1092,com.ibm.mashups.enabler.layout.LayoutControl)){_1097=_1092;if(_1096){this.LOGGER.trace(_1095,"scope object is a LayoutControl");}}else{if(com.ibm.mm.enabler.utils.Misc.isInstanceOf(_1092,com.ibm.mashups.enabler.layout.LayoutContainer)){_1097=_1092;_1098=true;if(_1096){this.LOGGER.trace(_1095,"scope object is a LayoutContainer");}}else{_1097=null;if(_1096){this.LOGGER.trace(_1095,"no scope object");}}}}var id=this._generateFilterId();var _1099={id:id,filter:_1091,scope:_1097,isContainer:_1098,ordinal:_1090};var list;if(com.ibm.mashups.enabler.runtime.skin.Constants.ORDINAL_FIRST>=_1090){list=_1093.item(com.ibm.mashups.enabler.runtime.skin.Constants.ORDINAL_FIRST);list.insert(0,_1099);ids.add(id,com.ibm.mashups.enabler.runtime.skin.Constants.ORDINAL_FIRST);}else{if(com.ibm.mashups.enabler.runtime.skin.Constants.ORDINAL_LAST<=_1090){list=_1093.item(com.ibm.mashups.enabler.runtime.skin.Constants.ORDINAL_LAST);list.add(_1099);ids.add(id,com.ibm.mashups.enabler.runtime.skin.Constants.ORDINAL_LAST);}else{list=_1093.item(_1090);if(typeof list==="undefined"||null===list){list=new dojox.collections.ArrayList();this.styleFilters.add(_1090,list);}list.add(_1099);ids.add(id,_1090);}}_1094.clear();if(_1096){this.LOGGER.exiting(_1095,id);}return id;},removeStyleFilter:function(_109a){this._removeFilter(_109a,this.styleFilterIDs,this.styleFilters,this.styleChains);},_removeFilter:function(_109b,ids,_109c,_109d){var _109e=ids.item(_109b);if(typeof _109e=="undefined"||null===_109e){return;}var list=_109c.item(_109e);if(typeof list!=="undefined"&&null!==list&&0 .component-container > .id-"+_10d2);if(!!_10d4&&_10d4.length>0){return _10d4;}_10d4=dojo.query("#layoutContainers > .hiddenWidgetsDiv > .component-container > .id-"+_10d2);if(!!_10d4&&_10d4.length>0){return _10d4;}return dojo.query(".id-"+_10d2);},_updateTitle:function(){var _10d5="_updateTitle()";if(this.bIsLoggable){this.LOGGER.entering(_10d5);}var _10d6=com.ibm.mm.iwidget.Utils.getModelID(this.id);var _10d7,elem;var _10d8=this._query(_10d6);if(_10d8.length!==1){if(this.bIsLoggable){this.LOGGER.trace(_10d5,_10d6+": no layout node; not updating title");this.LOGGER.exiting(_10d5);}return;}_10d7=_10d8[0];var elems=dojo.query("."+com.ibm.mashups.enabler.runtime.skin.Constants.DYNAMIC_CONTENT_TITLE,_10d7);if(elems.length!==1){if(this.bIsLoggable){this.LOGGER.trace(_10d5,_10d6+": no dynamic content title element; not updating title");this.LOGGER.exiting(_10d5);}return;}elem=elems[0];var title=com.ibm.mm.iwidget.Utils._getWidgetTitle(_10d6);if(title===null){title=this.widgetDef.getIDescriptorItems().getItemValue("title",dojo.locale);if(this.bIsLoggable){this.LOGGER.trace(_10d5,_10d6+": using title from widget xml: "+title);}}if(title!==null){elem.innerHTML=title;if(this.bIsLoggable){this.LOGGER.trace(_10d5,_10d6+": set title to: "+title);}}if(this.bIsLoggable){this.LOGGER.exiting(_10d5);}}});com.ibm.mm.iwidget.widget.IWidgetWrapperImpl=com.ibm.mm.enabler.iwidget.widget.IWidgetWrapperModelImpl;}if(!dojo._hasResource["com.ibm.mm.enabler.utils.Model"]){dojo._hasResource["com.ibm.mm.enabler.utils.Model"]=true;dojo.provide("com.ibm.mm.enabler.utils.Model");com.ibm.mm.enabler.utils.Model={LOGGER:com.ibm.mashups.enabler.logging.Logger.getLogger("com.ibm.mm.enabler.utils.Model"),LOG_LEVEL:com.ibm.mashups.enabler.logging.LogLevel.TRACE,getCurrentPageID:function(){var _10d9=com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel();var _10da=com.ibm.mashups.enabler.model.state.AccessorFactory.getPageAccessor(_10d9,null);var _10db=_10da.getPageID();return _10db;},getCurrentPageDeferred:function(){var _10dc="getCurrentPageDeferred()";var _10dd=com.ibm.mm.enabler.utils.Model.LOGGER.isLoggable(this.LOG_LEVEL);if(_10dd){com.ibm.mm.enabler.utils.Model.LOGGER.entering(_10dc);}var _10de=this.getCurrentPageID();if(_10dd){com.ibm.mm.enabler.utils.Model.LOGGER.trace(_10dc,"page id is "+_10de);}if(typeof _10de=="undefined"||null===_10de){if(_10dd){com.ibm.mm.enabler.utils.Model.LOGGER.exiting(_10dc,null);}return null;}var _10df=com.ibm.mashups.enabler.navigation.Factory.getNavigationModel();var _10e0=_10df.find(_10de);if(_10dd){this.LOGGER.exiting(_10dc,_10e0);}return _10e0;},getCurrentPageLayoutModel:function(){var _10e1="getCurrentPageLayoutModel()";var _10e2=com.ibm.mm.enabler.utils.Model.LOGGER.isLoggable(this.LOG_LEVEL);if(_10e2){com.ibm.mm.enabler.utils.Model.LOGGER.entering(_10e1);}var _10e3=com.ibm.mm.enabler.utils.Model.getCurrentPageDeferred().start();if(!_10e3){return null;}if(_10e2){com.ibm.mm.enabler.utils.Model.LOGGER.trace(_10e1,"page id is "+_10e3.getID());}var _10e4=com.ibm.mashups.enabler.navigation.Factory.getNavigationModel();var _10e5=_10e4.getLayoutModel(_10e3);if(_10e2){this.LOGGER.exiting(_10e1,_10e5);}return _10e5;}};}if(!dojo._hasResource["com.ibm.mm.iwidget.itemset.ShareableItemSetExtendedModelImpl"]){dojo._hasResource["com.ibm.mm.iwidget.itemset.ShareableItemSetExtendedModelImpl"]=true;dojo.provide("com.ibm.mm.iwidget.itemset.ShareableItemSetExtendedModelImpl");dojo.declare("com.ibm.mm.iwidget.itemset.ShareableItemSetExtendedModelImpl",com.ibm.mm.iwidget.itemset.ShareableItemSetImpl,{constructor:function(_10e6,_10e7,name){var _10e8=com.ibm.mashups.enabler.navigation.Factory.getNavigationModel();var dfd=com.ibm.mm.enabler.utils.Model.getCurrentPageDeferred();var scope;if(dfd){scope=this._getScope(dfd.start(),_10e8);}if(!scope){scope="global";}var psid=this.alias;if(!psid){psid=this.id;}this.shareableAccessor=com.ibm.mashups.enabler.model.state.AccessorFactory.getShareableParameterSetAccessor(this.navigationStateModel,psid,scope);},_getScope:function(_10e9,_10ea){if(_10e9){var scope=_10e9.getMetaData("param.sharing.scope");if(scope){return scope;}var _10eb=_10ea.getParent(_10e9);if(_10eb){var _10ec=_10eb.start();if(_10ec){return this._getScope(_10ec,_10ea);}}}return null;}});com.ibm.mm.iwidget.itemset.ShareableItemSetFactory=com.ibm.mm.iwidget.itemset.ShareableItemSetExtendedModelImpl;}if(!dojo._hasResource["com.ibm.mashups.enabler.ac.AccessControlModelFactory_API"]){dojo._hasResource["com.ibm.mashups.enabler.ac.AccessControlModelFactory_API"]=true;dojo.provide("com.ibm.mashups.enabler.ac.AccessControlModelFactory_API");dojo.provide("com.ibm.mashups.enabler.ac.AccessControlModelFactory");dojo.declare("com.ibm.mashups.enabler.ac.AccessControlModelFactory",null,{getAccessControlModel:function(_10ed){},getAccessControlModel:function(_10ee){},getAccessControlModel:function(_10ef){},getAccessControlModel:function(_10f0,_10f1){},getAccessControlModel:function(_10f2,_10f3){}});}if(!dojo._hasResource["com.ibm.mm.enabler.ac.AccessControlModelFactoryImpl"]){dojo._hasResource["com.ibm.mm.enabler.ac.AccessControlModelFactoryImpl"]=true;dojo.provide("com.ibm.mm.enabler.ac.AccessControlModelFactoryImpl");dojo.declare("com.ibm.mm.enabler.ac.AccessControlModelFactoryImpl",[com.ibm.mashups.enabler.ac.AccessControlModelFactory,com.ibm.mm.enabler.LazyLoadSupport],{modelMessages:null,_resourceACModels:null,_resourceSpaceACModels:null,constructor:function(){this._resourceACModels={};this._resourceSpaceACModels={};this.modelMessages=dojo.i18n.getLocalization("com.ibm.mm.enabler","modelMessages");},_transformXNode:function(xNode){if(com.ibm.mm.enabler.utils.Misc.isInstanceOf(xNode,com.ibm.mashups.enabler.layout.LayoutContainer)){xNode=xNode._getContent();dojo.deprecated("com.ibm.mashups.enabler.ac.AccessControlModelFactory.getAccessControlModel","The method com.ibm.mashups.enabler.ac.AccessControlModelFactory.getAccessControlModel used in conjunction with com.ibm.mashups.enabler.layout.LayoutNode is deprecated, please use com.ibm.mashups.enabler.content.ContentNode as parameter instead!");}else{if(com.ibm.mm.enabler.utils.Misc.isInstanceOf(xNode,com.ibm.mashups.enabler.layout.LayoutFragment)){dojo.deprecated("com.ibm.mashups.enabler.ac.AccessControlModelFactory.getAccessControlModel","The method com.ibm.mashups.enabler.ac.AccessControlModelFactory.getAccessControlModel used in conjunction with com.ibm.mashups.enabler.layout.LayoutFragment is deprecated, please use com.ibm.mashups.enabler.content.ContentNode as parameter instead!");}}return xNode;},_getResourceSpaceAccessControlModel:function(_10f4,xNode){var ret=null;var _10f5=_10f4.getID();var xID=xNode.getID();if(this._resourceSpaceACModels[_10f5]){ret=this._resourceSpaceACModels[_10f5][xID];}if(!ret){ret=new com.ibm.mm.enabler.ac.ResourceSpaceAccessControlModelImpl(_10f4,xNode);if(!this._resourceSpaceACModels[_10f5]){this._resourceSpaceACModels[_10f5]={};}this._resourceSpaceACModels[_10f5][xID]=ret;}return ret;},_getResourceAccessControlModel:function(xNode){var ret=null;var xID=xNode.getID();ret=this._resourceACModels[xID];if(!ret){ret=new com.ibm.mm.enabler.ac.ResourceAccessControlModelImpl(xNode);this._resourceACModels[xID]=ret;}return ret;},_getSpaceAccessControlModel:function(_10f6){return new com.ibm.mm.enabler.ac.SpaceAccessControlModelImpl(_10f6);},_getAccessControlModelFromSingleNode:function(xNode){xNode=this._transformXNode(xNode);var ret=null;if(com.ibm.mm.enabler.utils.Misc.isInstanceOf(xNode,com.ibm.mashups.enabler.space.SpaceNode)){ret=this._getSpaceAccessControlModel(xNode);}else{if(com.ibm.mm.enabler.utils.Misc.isInstanceOf(xNode,com.ibm.mashups.enabler.content.ContentNode)||com.ibm.mm.enabler.utils.Misc.isInstanceOf(xNode,com.ibm.mashups.enabler.layout.LayoutFragment)){ret=this._getResourceAccessControlModel(xNode);}else{throw new Error(dojo.string.substitute(this.modelMessages.E_INVALID_PARAM_TYPE_0,{num:1,type:"com.ibm.mashups.enabler.space.SpaceNode|com.ibm.mashups.enabler.content.ContentNode"}));}}return ret;},getAccessControlModel:function(){com.ibm.mashups.enabler.ac.AccessControlModelFactory.lazyLoadModules(["AccessControlModel","SpaceModel","LayoutModel"]);var xNode,ret=null;if(arguments.length===2&&arguments[0]===null){dojo.deprecated("com.ibm.mashups.enabler.ac.AccessControlModelFactory.getAccessControlModel","The method com.ibm.mashups.enabler.ac.AccessControlModelFactory.getAccessControlModel/2 used with null as first parameter is deprecated, please use com.ibm.mashups.enabler.ac.AccessControlModelFactory.getAccessControlModel/1 instead!");ret=this._getAccessControlModelFromSingleNode(arguments[1]);}else{if(arguments.length===2){var _10f7=arguments[0];xNode=arguments[1];if(!com.ibm.mm.enabler.utils.Misc.isInstanceOf(_10f7,com.ibm.mashups.enabler.space.SpaceNode)){throw new Error(dojo.string.substitute(this.modelMessages.E_INVALID_PARAM_TYPE_0,{num:1,type:"com.ibm.mashups.enabler.space.SpaceNode"}));}xNode=this._transformXNode(xNode);if(!com.ibm.mm.enabler.utils.Misc.isInstanceOf(xNode,com.ibm.mashups.enabler.content.ContentNode)&&!com.ibm.mm.enabler.utils.Misc.isInstanceOf(xNode,com.ibm.mashups.enabler.layout.LayoutFragment)){throw new Error(dojo.string.substitute(this.modelMessages.E_INVALID_PARAM_TYPE_0,{num:2,type:"com.ibm.mashups.enabler.content.ContentNode"}));}ret=this._getResourceSpaceAccessControlModel(_10f7,xNode);}else{if(arguments.length===1){ret=this._getAccessControlModelFromSingleNode(arguments[0]);}else{throw new Error(this.modelMessages.E_INVALID_PARAM_COUNT_0);}}}if(ret!==null&&dojo.isFunction(ret._init)&&dojo.isFunction(ret._loadAheadResource)){ret._init();ret._loadAheadResource(null,true);}return ret;}});com.ibm.mashups.enabler.ac.AccessControlModelFactory=new com.ibm.mm.enabler.ac.AccessControlModelFactoryImpl();}if(!dojo._hasResource["com.ibm.mashups.enabler.ac.AccessControlModelFactory"]){dojo._hasResource["com.ibm.mashups.enabler.ac.AccessControlModelFactory"]=true;dojo.provide("com.ibm.mashups.enabler.ac.AccessControlModelFactory");}if(!dojo._hasResource["com.ibm.mashups.enabler.ac.VirtualResourceType"]){dojo._hasResource["com.ibm.mashups.enabler.ac.VirtualResourceType"]=true;dojo.provide("com.ibm.mashups.enabler.ac.VirtualResourceType");dojo.declare("com.ibm.mashups.enabler.ac.VirtualResourceType",null,{ROOT:"wps.PORTAL",TEMPLATE:"wps.TEMPLATE_DEPLOYMENT",SPACE:"wps.APPLICATION_ENTITIES"});com.ibm.mashups.enabler.ac.VirtualResourceType=new com.ibm.mashups.enabler.ac.VirtualResourceType();}if(!dojo._hasResource["com.ibm.mashups.enabler.ac.AccessFactory_API"]){dojo._hasResource["com.ibm.mashups.enabler.ac.AccessFactory_API"]=true;dojo.provide("com.ibm.mashups.enabler.ac.AccessFactory_API");dojo.provide("com.ibm.mashups.enabler.ac.AccessFactory");dojo.declare("com.ibm.mashups.enabler.ac.AccessFactory",null,{getEffectiveAccess:function(node){},getEffectiveAccessVirtualResource:function(_10f8){}});}if(!dojo._hasResource["com.ibm.mm.enabler.ac.AccessFactoryImpl"]){dojo._hasResource["com.ibm.mm.enabler.ac.AccessFactoryImpl"]=true;dojo.provide("com.ibm.mm.enabler.ac.AccessFactoryImpl");dojo.declare("com.ibm.mm.enabler.ac.AccessFactoryImpl",[com.ibm.mashups.enabler.ac.AccessFactory],{getEffectiveAccess:function(node){if((node)&&(node.hasRole)){return node;}return null;},getEffectiveAccessVirtualResource:function(_10f9){var myUrl=com.ibm.mashups.enabler.model.url.ModelUrlFactory.createModelURL(com.ibm.mashups.enabler.model.url.ModelUrlFactory.AC_URL,null);myUrl.setNodes([{value:_10f9,isID:true,subModel:com.ibm.mashups.enabler.model.url.ModelUrlFactory.SUBMODEL_ACCESS}]);var _10fa=null;var _10fb=new com.ibm.mm.enabler.services.ModelRestServiceRequest(myUrl,null,null,false,true);_10fb.read(dojo.hitch(this,function(type,data,xhr,args){if(type==com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_LOAD){var nsf=com.ibm.mm.enabler.model.NameSpaceFactory;var ns=nsf.getNameSpaces([nsf.NS_ATOM]);var expr="//atom:entry";var node=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(expr,data,ns);if(node){_10fa=node;}}}));if(_10fa){var ret=new com.ibm.mm.enabler.ac.EffectiveAccessImpl();ret._init(_10fa);return ret;}return null;}});com.ibm.mashups.enabler.ac.AccessFactory=new com.ibm.mm.enabler.ac.AccessFactoryImpl();}if(!dojo._hasResource["com.ibm.mashups.enabler.ac.AccessFactory"]){dojo._hasResource["com.ibm.mashups.enabler.ac.AccessFactory"]=true;dojo.provide("com.ibm.mashups.enabler.ac.AccessFactory");}if(!dojo._hasResource["com.ibm.mashups.enabler.ac.operation.Constants"]){dojo._hasResource["com.ibm.mashups.enabler.ac.operation.Constants"]=true;dojo.provide("com.ibm.mashups.enabler.ac.operation.Constants");dojo.declare("com.ibm.mashups.enabler.ac.operation.Constants",null,{EDIT_PAGE_LAYOUT:"com.ibm.mashups.enabler.ac.operation.editpagelayout",EDIT_PAGE_PROPERTIES:"com.ibm.mashups.enabler.ac.operation.editpageproperties",ASSIGN_PAGE_PERMISSIONS:"com.ibm.mashups.enabler.ac.operation.assignpagepermissions",WIDGET_MODE_VIEW:"com.ibm.mashups.enabler.ac.operation.widgetmode.view",WIDGET_MODE_PERSONALIZE:"com.ibm.mashups.enabler.ac.operation.widgetmode.personalize",WIDGET_MODE_EDIT:"com.ibm.mashups.enabler.ac.operation.widgetmode.edit",WIDGET_MODE_CONFIG:"com.ibm.mashups.enabler.ac.operation.widgetmode.config"});com.ibm.mashups.enabler.ac.operation.Constants=new com.ibm.mashups.enabler.ac.operation.Constants();}if(!dojo._hasResource["com.ibm.mashups.enabler.ac.operation.Operation_API"]){dojo._hasResource["com.ibm.mashups.enabler.ac.operation.Operation_API"]=true;dojo.provide("com.ibm.mashups.enabler.ac.operation.Operation_API");dojo.provide("com.ibm.mashups.enabler.ac.operation.Operation");dojo.declare("com.ibm.mashups.enabler.ac.operation.Operation",null,{isAllowed:function(){}});}if(!dojo._hasResource["com.ibm.mashups.enabler.ac.operation.Operation"]){dojo._hasResource["com.ibm.mashups.enabler.ac.operation.Operation"]=true;dojo.provide("com.ibm.mashups.enabler.ac.operation.Operation");}if(!dojo._hasResource["com.ibm.mashups.enabler.ac.operation.AllowedOperationsModel_API"]){dojo._hasResource["com.ibm.mashups.enabler.ac.operation.AllowedOperationsModel_API"]=true;dojo.provide("com.ibm.mashups.enabler.ac.operation.AllowedOperationsModel_API");dojo.provide("com.ibm.mashups.enabler.ac.operation.AllowedOperationsModel");dojo.declare("com.ibm.mashups.enabler.ac.operation.AllowedOperationsModel",[com.ibm.mashups.enabler.model.Model],{getOperation:function(_10fc,_10fd){},setOperation:function(_10fe,_10ff){}});}if(!dojo._hasResource["com.ibm.mashups.enabler.ac.operation.AllowedOperationsModelFactory_API"]){dojo._hasResource["com.ibm.mashups.enabler.ac.operation.AllowedOperationsModelFactory_API"]=true;dojo.provide("com.ibm.mashups.enabler.ac.operation.AllowedOperationsModelFactory_API");dojo.provide("com.ibm.mashups.enabler.ac.operation.AllowedOperationsModelFactory");dojo.declare("com.ibm.mashups.enabler.ac.operation.AllowedOperationsModelFactory",null,{getAllowedOperationsModel:function(){}});}if(!dojo._hasResource["com.ibm.mm.enabler.ac.operation.AllowedOperationsModelFactoryImpl"]){dojo._hasResource["com.ibm.mm.enabler.ac.operation.AllowedOperationsModelFactoryImpl"]=true;dojo.provide("com.ibm.mm.enabler.ac.operation.AllowedOperationsModelFactoryImpl");dojo.declare("com.ibm.mm.enabler.ac.operation.AllowedOperationsModelFactoryImpl",com.ibm.mashups.enabler.ac.operation.AllowedOperationsModelFactory,{constructor:function(){},getAllowedOperationsModel:function(){return com.ibm.mm.enabler.ac.operation.AllowedOperationsModelImpl.prototype.getInstance();}});com.ibm.mashups.enabler.ac.operation.AllowedOperationsModelFactory=new com.ibm.mm.enabler.ac.operation.AllowedOperationsModelFactoryImpl();}if(!dojo._hasResource["com.ibm.mashups.enabler.ac.operation.AllowedOperationsModelFactory"]){dojo._hasResource["com.ibm.mashups.enabler.ac.operation.AllowedOperationsModelFactory"]=true;dojo.provide("com.ibm.mashups.enabler.ac.operation.AllowedOperationsModelFactory");}if(!dojo._hasResource["com.ibm.mm.enabler.ac.operation.AbstractOperationImpl"]){dojo._hasResource["com.ibm.mm.enabler.ac.operation.AbstractOperationImpl"]=true;dojo.provide("com.ibm.mm.enabler.ac.operation.AbstractOperationImpl");dojo.declare("com.ibm.mm.enabler.ac.operation.AbstractOperationImpl",[com.ibm.mashups.enabler.ac.operation.Operation],{constructor:function(_1100){this.context=_1100;this.roleCheck=null;},isAllowed:function(){this.context=this.context||null;if(this.context===null){return false;}if(!this.context.contentNode){return false;}var _1101=com.ibm.mashups.enabler.ac.AccessFactory.getEffectiveAccess(this.context.contentNode);_1101=_1101||null;if(_1101!==null&&_1101.hasRole(this.roleCheck)){return true;}return false;}});}if(!dojo._hasResource["com.ibm.mm.enabler.ac.operation.EditPageLayoutOperationImpl"]){dojo._hasResource["com.ibm.mm.enabler.ac.operation.EditPageLayoutOperationImpl"]=true;dojo.provide("com.ibm.mm.enabler.ac.operation.EditPageLayoutOperationImpl");dojo.declare("com.ibm.mm.enabler.ac.operation.EditPageLayoutOperationImpl",[com.ibm.mm.enabler.ac.operation.AbstractOperationImpl],{constructor:function(_1102){this.context=_1102;this.roleCheck=com.ibm.mashups.enabler.ac.RoleType.EDITOR;}});}if(!dojo._hasResource["com.ibm.mm.enabler.ac.operation.EditPagePropertiesOperationImpl"]){dojo._hasResource["com.ibm.mm.enabler.ac.operation.EditPagePropertiesOperationImpl"]=true;dojo.provide("com.ibm.mm.enabler.ac.operation.EditPagePropertiesOperationImpl");dojo.declare("com.ibm.mm.enabler.ac.operation.EditPagePropertiesOperationImpl",[com.ibm.mm.enabler.ac.operation.AbstractOperationImpl],{constructor:function(_1103){this.context=_1103;this.roleCheck=com.ibm.mashups.enabler.ac.RoleType.EDITOR;}});}if(!dojo._hasResource["com.ibm.mm.enabler.ac.operation.AssignPagePermissionsOperationImpl"]){dojo._hasResource["com.ibm.mm.enabler.ac.operation.AssignPagePermissionsOperationImpl"]=true;dojo.provide("com.ibm.mm.enabler.ac.operation.AssignPagePermissionsOperationImpl");dojo.declare("com.ibm.mm.enabler.ac.operation.AssignPagePermissionsOperationImpl",[com.ibm.mm.enabler.ac.operation.AbstractOperationImpl],{constructor:function(_1104){this.context=_1104;this.roleCheck=com.ibm.mashups.enabler.ac.RoleType.MANAGER;}});}if(!dojo._hasResource["com.ibm.mm.enabler.ac.operation.WidgetModeOperationImpl"]){dojo._hasResource["com.ibm.mm.enabler.ac.operation.WidgetModeOperationImpl"]=true;dojo.provide("com.ibm.mm.enabler.ac.operation.WidgetModeOperationImpl");dojo.declare("com.ibm.mm.enabler.ac.operation.WidgetModeOperationImpl",[com.ibm.mm.enabler.ac.operation.AbstractOperationImpl],{constructor:function(_1105,mode){this.context=_1105;this.mode=mode;if(this.mode==com.ibm.mm.iwidget.Constants.mode.PERSONALIZE){this.roleCheck=com.ibm.mashups.enabler.ac.RoleType.USER;}else{if(this.mode==com.ibm.mm.iwidget.Constants.mode.EDIT){this.roleCheck=com.ibm.mashups.enabler.ac.RoleType.EDITOR;}else{if(this.mode==com.ibm.mm.iwidget.Constants.mode.CONFIG){this.roleCheck=com.ibm.mashups.enabler.ac.RoleType.USER;}else{this.roleCheck=com.ibm.mashups.enabler.ac.RoleType.USER;}}}},_getCurrentMode:function(){var _1106=com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel();var _1107=com.ibm.mashups.enabler.model.state.AccessorFactory.getWidgetAccessor(_1106,this.context.id);return _1107.getWidgetMode();},_getCurrentPageID:function(){var _1108=com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel();return com.ibm.mashups.enabler.model.state.AccessorFactory.getPageAccessor(_1108).getPageID();},_getSupportModes:function(){var _1109=com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel();var _110a=com.ibm.mashups.enabler.widget.Factory.getWidgetModel();var _110b=_110a.findWidgetWindow(this.context.id,this._getCurrentPageID(_1109)).start();var _110c=_110a.getWidgetDefinitionByWindow(_110b).start();return _110c.getSupportedModes();},_isSupportedMode:function(){var _110d=com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel();var _110e=this._getSupportModes(_110d);var _110f=(dojo.indexOf(_110e,this.mode)>=0);if(_110f&&(this.mode==com.ibm.mm.iwidget.Constants.mode.CONFIG)){var _1110=com.ibm.mashups.enabler.widget.Factory.getWidgetModel();var _1111=_1110.findWidgetWindow(this.context.id,this._getCurrentPageID(_110d)).start();var _1112=_1110.getWidgetInstance(_1111).start();if(_1112.isSandboxed()){_110f=false;}}return _110f;},_isModeSwitchable:function(){var _1113=com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel();var _1114=this._getCurrentMode(_1113);var _1115=[com.ibm.mm.iwidget.Constants.mode.EDIT,com.ibm.mm.iwidget.Constants.mode.PERSONALIZE,com.ibm.mm.iwidget.Constants.mode.CONFIG];return (dojo.indexOf(_1115,_1114)<0||dojo.indexOf(_1115,this.mode)<0);},isAllowed:function(){if(!this._isSupportedMode()){return false;}if(!this._isModeSwitchable()){return false;}var _1116=this.inherited(arguments);if(_1116){if(this.mode==com.ibm.mm.iwidget.Constants.mode.PERSONALIZE){var _1117=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME);var _1118=_1117.getValue(com.ibm.mashups.enabler.services.ConfigConstants.WIDGET_PERSONALIZE_ENABLED);if(typeof _1118!="undefined"){if(!_1118){return false;}}var _1119=com.ibm.mashups.enabler.user.Factory.getUserModel().findCurrentUser().start();if(_1119&&_1119.isVirtual()){var _111a=_1119.getVirtualType();if(com.ibm.mashups.enabler.user.VirtualType.ANONYMOUS_USER==_111a){return false;}}}else{if(this.mode==com.ibm.mm.iwidget.Constants.mode.CONFIG){if(!ibmConfig["com.ibm.mm.internal.allowConfig"]){return false;}}}}return _1116;}});}if(!dojo._hasResource["com.ibm.mm.enabler.ac.operation.AllowedOperationsModelImpl"]){dojo._hasResource["com.ibm.mm.enabler.ac.operation.AllowedOperationsModelImpl"]=true;dojo.provide("com.ibm.mm.enabler.ac.operation.AllowedOperationsModelImpl");dojo.declare("com.ibm.mm.enabler.ac.operation.AllowedOperationsModelImpl",com.ibm.mashups.enabler.ac.operation.AllowedOperationsModel,{constructor:function(){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.additionalOperations=[];},getInstance:function(){var _111b=com.ibm.mm.enabler.ac.operation.AllowedOperationsModelImpl._instance;return _111b?_111b:(com.ibm.mm.enabler.ac.operation.AllowedOperationsModelImpl._instance=new com.ibm.mm.enabler.ac.operation.AllowedOperationsModelImpl());},getOperation:function(_111c,_111d){return new com.ibm.mm.enabler.DeferredImpl(this,this._getOperation,{"operationName":_111c,"jsonContext":_111d});},_getOperation:function(dfr,sync,_111e){var _111f="_getOperation";var _1120=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_1120){this.LOGGER.entering(_111f,arguments);}var _1121=_111e.operationName;var _1122=_111e.jsonContext;var _1123=null;if(_1121){var _1124=this.additionalOperations[_1121]||null;if(dojo.isFunction(_1124)){var _1125=function(_1126){_1123=_1126;dfr.finish(_1123,(_1123!==null)?com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK:com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_NOT_FOUND);};dojo.partial(_1124)(_1121,_1122,sync,_1125);if(_1120){this.LOGGER.exiting(_111f,[_1123]);}return _1123;}switch(_1121){case com.ibm.mashups.enabler.ac.operation.Constants.EDIT_PAGE_LAYOUT:_1123=new com.ibm.mm.enabler.ac.operation.EditPageLayoutOperationImpl(_1122);break;case com.ibm.mashups.enabler.ac.operation.Constants.EDIT_PAGE_PROPERTIES:_1123=new com.ibm.mm.enabler.ac.operation.EditPagePropertiesOperationImpl(_1122);break;case com.ibm.mashups.enabler.ac.operation.Constants.ASSIGN_PAGE_PERMISSIONS:_1123=new com.ibm.mm.enabler.ac.operation.AssignPagePermissionsOperationImpl(_1122);break;case com.ibm.mashups.enabler.ac.operation.Constants.WIDGET_MODE_VIEW:_1123=new com.ibm.mm.enabler.ac.operation.WidgetModeOperationImpl(_1122,com.ibm.mm.iwidget.Constants.mode.VIEW);break;case com.ibm.mashups.enabler.ac.operation.Constants.WIDGET_MODE_PERSONALIZE:_1123=new com.ibm.mm.enabler.ac.operation.WidgetModeOperationImpl(_1122,com.ibm.mm.iwidget.Constants.mode.PERSONALIZE);break;case com.ibm.mashups.enabler.ac.operation.Constants.WIDGET_MODE_EDIT:_1123=new com.ibm.mm.enabler.ac.operation.WidgetModeOperationImpl(_1122,com.ibm.mm.iwidget.Constants.mode.EDIT);break;case com.ibm.mashups.enabler.ac.operation.Constants.WIDGET_MODE_CONFIG:_1123=new com.ibm.mm.enabler.ac.operation.WidgetModeOperationImpl(_1122,com.ibm.mm.iwidget.Constants.mode.CONFIG);break;}}dfr.finish(_1123,(_1123!==null)?com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK:com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_NOT_FOUND);if(_1120){this.LOGGER.exiting(_111f,[_1123]);}return _1123;},setOperation:function(_1127,_1128){if(!_1127){return false;}if(!_1128){return false;}this.additionalOperations[_1127]=_1128;return true;}});}if(!dojo._hasResource["com.ibm.mashups.enabler.ac.operation.AllowedOperationsModel"]){dojo._hasResource["com.ibm.mashups.enabler.ac.operation.AllowedOperationsModel"]=true;dojo.provide("com.ibm.mashups.enabler.ac.operation.AllowedOperationsModel");}if(!dojo._hasResource["com.ibm.mashups.enabler.catalog.Factory_API"]){dojo._hasResource["com.ibm.mashups.enabler.catalog.Factory_API"]=true;dojo.provide("com.ibm.mashups.enabler.catalog.Factory_API");dojo.provide("com.ibm.mashups.enabler.catalog.Factory");dojo.declare("com.ibm.mashups.enabler.catalog.Factory",null,{getCatalogCategoryModel:function(){}});}if(!dojo._hasResource["com.ibm.mm.enabler.catalog.FactoryImpl"]){dojo._hasResource["com.ibm.mm.enabler.catalog.FactoryImpl"]=true;dojo.provide("com.ibm.mm.enabler.catalog.FactoryImpl");dojo.declare("com.ibm.mm.enabler.catalog.FactoryImpl",[com.ibm.mashups.enabler.catalog.Factory,com.ibm.mm.enabler.LazyLoadSupport],{getCatalogCategoryModel:function(){com.ibm.mashups.enabler.catalog.Factory.lazyLoadModules(["CatalogModel"]);return com.ibm.mm.enabler.catalog.CatalogCategoryModelImpl.prototype.getInstance();}});com.ibm.mashups.enabler.catalog.Factory=new com.ibm.mm.enabler.catalog.FactoryImpl();}if(!dojo._hasResource["com.ibm.mashups.enabler.catalog.Factory"]){dojo._hasResource["com.ibm.mashups.enabler.catalog.Factory"]=true;dojo.provide("com.ibm.mashups.enabler.catalog.Factory");}if(!dojo._hasResource["com.ibm.mashups.enabler.content.RuntimeContent_API"]){dojo._hasResource["com.ibm.mashups.enabler.content.RuntimeContent_API"]=true;dojo.provide("com.ibm.mashups.enabler.content.RuntimeContent_API");dojo.provide("com.ibm.mashups.enabler.content.RuntimeContent");dojo.declare("com.ibm.mashups.enabler.content.RuntimeContent",null,{getRuntimeMarkup:function(){throw new Error("Unimplemented API: com.ibm.mashups.enabler.content.RuntimeContent.getRuntimeMarkup");}});}if(!dojo._hasResource["com.ibm.mm.enabler.content.RuntimeContentImpl"]){dojo._hasResource["com.ibm.mm.enabler.content.RuntimeContentImpl"]=true;dojo.provide("com.ibm.mm.enabler.content.RuntimeContentImpl");dojo.declare("com.ibm.mm.enabler.content.RuntimeContentImpl",com.ibm.mashups.enabler.content.RuntimeContent,{_scope:null,constructor:function(scope,func){this._scope=scope;this._getRuntimeMarkup=func||(function(){});},getRuntimeMarkup:function(){return new com.ibm.mm.enabler.DeferredImpl(this._scope||null,this._getRuntimeMarkup);}});}if(!dojo._hasResource["com.ibm.mashups.enabler.content.RuntimeContent"]){dojo._hasResource["com.ibm.mashups.enabler.content.RuntimeContent"]=true;dojo.provide("com.ibm.mashups.enabler.content.RuntimeContent");}if(!dojo._hasResource["com.ibm.mashups.enabler.content.RuntimeContentProvider"]){dojo._hasResource["com.ibm.mashups.enabler.content.RuntimeContentProvider"]=true;dojo.provide("com.ibm.mashups.enabler.content.RuntimeContentProvider");dojo.declare("com.ibm.mashups.enabler.content.RuntimeContentProvider",null,{getRuntimeContent:function(){throw new Error("Unimplemented API: com.ibm.mashups.enabler.content.RuntimeContentProvider.getRuntimeContent");}});}if(!dojo._hasResource["com.ibm.mashups.enabler.layout.Constants"]){dojo._hasResource["com.ibm.mashups.enabler.layout.Constants"]=true;dojo.provide("com.ibm.mashups.enabler.layout.Constants");dojo.declare("com.ibm.mashups.enabler.layout.Constants",null,{LAYOUT_CONTROL:"LayoutControl",LAYOUT_CONTAINER:"LayoutContainer",CONTEXT_WIDGET_DEFINITION_ID:"WidgetDefinitionID",CONTEXT_WIDGET_DEFINITION_URL:"WidgetDefinitionURL",DISPLAY_TITLE:"displayTitle",CONTEXT_TYPE:"type"});com.ibm.mashups.enabler.layout.Constants=new com.ibm.mashups.enabler.layout.Constants();}if(!dojo._hasResource["com.ibm.mashups.enabler.layouttemplate.Factory_API"]){dojo._hasResource["com.ibm.mashups.enabler.layouttemplate.Factory_API"]=true;dojo.provide("com.ibm.mashups.enabler.layouttemplate.Factory_API");dojo.provide("com.ibm.mashups.enabler.layouttemplate.Factory");dojo.declare("com.ibm.mashups.enabler.layouttemplate.Factory",null,{getTemplateModel:function(){}});}if(!dojo._hasResource["com.ibm.mm.enabler.layouttemplate.Factory"]){dojo._hasResource["com.ibm.mm.enabler.layouttemplate.Factory"]=true;dojo.provide("com.ibm.mm.enabler.layouttemplate.Factory");dojo.declare("com.ibm.mm.enabler.layouttemplate.Factory",[com.ibm.mashups.enabler.layouttemplate.Factory,com.ibm.mm.enabler.LazyLoadSupport],{getTemplateModel:function(){if(!com.ibm.mashups.enabler.layouttemplate.Factory._model){com.ibm.mashups.enabler.layouttemplate.Factory.lazyLoadModules(["LayoutTemplateModel"]);com.ibm.mashups.enabler.layouttemplate.Factory._model=new com.ibm.mm.enabler.layouttemplate.LayoutTemplateModel();}return com.ibm.mashups.enabler.layouttemplate.Factory._model;}});com.ibm.mashups.enabler.layouttemplate.Factory=new com.ibm.mm.enabler.layouttemplate.Factory();}if(!dojo._hasResource["com.ibm.mashups.enabler.layouttemplate.Factory"]){dojo._hasResource["com.ibm.mashups.enabler.layouttemplate.Factory"]=true;dojo.provide("com.ibm.mashups.enabler.layouttemplate.Factory");}if(!dojo._hasResource["com.ibm.mashups.enabler.theme.Factory_API"]){dojo._hasResource["com.ibm.mashups.enabler.theme.Factory_API"]=true;dojo.provide("com.ibm.mashups.enabler.theme.Factory_API");dojo.provide("com.ibm.mashups.enabler.theme.Factory");dojo.declare("com.ibm.mashups.enabler.theme.Factory",null,{getThemeModel:function(){}});}if(!dojo._hasResource["com.ibm.mm.enabler.theme.FactoryImpl"]){dojo._hasResource["com.ibm.mm.enabler.theme.FactoryImpl"]=true;dojo.provide("com.ibm.mm.enabler.theme.FactoryImpl");dojo.declare("com.ibm.mm.enabler.theme.FactoryImpl",[com.ibm.mashups.enabler.theme.Factory,com.ibm.mm.enabler.LazyLoadSupport],{getThemeModel:function(){com.ibm.mashups.enabler.theme.Factory.lazyLoadModules(["ThemeModel"]);return com.ibm.mm.enabler.theme.ThemeModelImpl.prototype.getInstance();}});com.ibm.mashups.enabler.theme.Factory=new com.ibm.mm.enabler.theme.FactoryImpl();}if(!dojo._hasResource["com.ibm.mashups.enabler.theme.Factory"]){dojo._hasResource["com.ibm.mashups.enabler.theme.Factory"]=true;dojo.provide("com.ibm.mashups.enabler.theme.Factory");}if(!dojo._hasResource["com.ibm.mashups.enabler.user.VirtualType"]){dojo._hasResource["com.ibm.mashups.enabler.user.VirtualType"]=true;dojo.provide("com.ibm.mashups.enabler.user.VirtualType");dojo.declare("com.ibm.mashups.enabler.user.VirtualType",null,{ALL_AUTHENTICATED_GROUP:"all authenticated group",ALL_PORTAL_GROUP:"all portal group",ANONYMOUS_USER:"anonymous user",UNKNOWN:"unknown"});com.ibm.mashups.enabler.user.VirtualType=new com.ibm.mashups.enabler.user.VirtualType();}if(!dojo._hasResource["com.ibm.mashups.enabler.user.Entity_API"]){dojo._hasResource["com.ibm.mashups.enabler.user.Entity_API"]=true;dojo.provide("com.ibm.mashups.enabler.user.Entity_API");dojo.provide("com.ibm.mashups.enabler.user.Entity");dojo.declare("com.ibm.mashups.enabler.user.Entity",[com.ibm.mashups.enabler.Identifiable],{getDisplayName:function(){},getCN:function(){},getAttribute:function(name){},getReadOnlyAttributeNames:function(){},getReadWriteAttributeNames:function(){},getAttributeNames:function(){},isVirtual:function(){},getVirtualType:function(){},getEntityType:function(){}});}if(!dojo._hasResource["com.ibm.mm.enabler.user.EntityImpl"]){dojo._hasResource["com.ibm.mm.enabler.user.EntityImpl"]=true;dojo.provide("com.ibm.mm.enabler.user.EntityImpl");dojo.declare("com.ibm.mm.enabler.user.EntityImpl",[com.ibm.mashups.enabler.user.Entity,com.ibm.mm.enabler.persistence.PersistenceHandlerImpl],{constructor:function(){var e=com.ibm.mashups.enabler;this._initDelegators(e.Identifiable.prototype);var u=e.user;this._initDelegators(u.Entity.prototype);var um=com.ibm.mashups.enabler.user.Factory.getUserModel();this._initTransition(um,um.getModifiableNode);}});}if(!dojo._hasResource["com.ibm.mashups.enabler.user.Entity"]){dojo._hasResource["com.ibm.mashups.enabler.user.Entity"]=true;dojo.provide("com.ibm.mashups.enabler.user.Entity");}if(!dojo._hasResource["com.ibm.mashups.enabler.user.User_API"]){dojo._hasResource["com.ibm.mashups.enabler.user.User_API"]=true;dojo.provide("com.ibm.mashups.enabler.user.User_API");dojo.provide("com.ibm.mashups.enabler.user.User");dojo.declare("com.ibm.mashups.enabler.user.User",[com.ibm.mashups.enabler.user.Entity],{getLoginName:function(){},getSN:function(){},getEmail:function(){},setAttribute:function(name,value){},removeAttribute:function(name){}});}if(!dojo._hasResource["com.ibm.mm.enabler.user.UserImpl"]){dojo._hasResource["com.ibm.mm.enabler.user.UserImpl"]=true;dojo.provide("com.ibm.mm.enabler.user.UserImpl");dojo.declare("com.ibm.mm.enabler.user.UserImpl",[com.ibm.mashups.enabler.user.User,com.ibm.mm.enabler.user.EntityImpl],{constructor:function(){this._initDelegators(com.ibm.mashups.enabler.user.User.prototype);}});}if(!dojo._hasResource["com.ibm.mashups.enabler.user.User"]){dojo._hasResource["com.ibm.mashups.enabler.user.User"]=true;dojo.provide("com.ibm.mashups.enabler.user.User");}if(!dojo._hasResource["com.ibm.mashups.enabler.user.CurrentUser_API"]){dojo._hasResource["com.ibm.mashups.enabler.user.CurrentUser_API"]=true;dojo.provide("com.ibm.mashups.enabler.user.CurrentUser_API");dojo.provide("com.ibm.mashups.enabler.user.CurrentUser");dojo.declare("com.ibm.mashups.enabler.user.CurrentUser",[com.ibm.mashups.enabler.user.User],{getJ2EEPrincipalName:function(){}});}if(!dojo._hasResource["com.ibm.mm.enabler.user.CurrentUserImpl"]){dojo._hasResource["com.ibm.mm.enabler.user.CurrentUserImpl"]=true;dojo.provide("com.ibm.mm.enabler.user.CurrentUserImpl");dojo.declare("com.ibm.mm.enabler.user.CurrentUserImpl",[com.ibm.mashups.enabler.user.CurrentUser,com.ibm.mm.enabler.user.UserImpl],{constructor:function(){this._initDelegators(com.ibm.mashups.enabler.user.CurrentUser.prototype);}});}if(!dojo._hasResource["com.ibm.mashups.enabler.user.CurrentUser"]){dojo._hasResource["com.ibm.mashups.enabler.user.CurrentUser"]=true;dojo.provide("com.ibm.mashups.enabler.user.CurrentUser");}if(!dojo._hasResource["com.ibm.mashups.enabler.user.Group_API"]){dojo._hasResource["com.ibm.mashups.enabler.user.Group_API"]=true;dojo.provide("com.ibm.mashups.enabler.user.Group_API");dojo.provide("com.ibm.mashups.enabler.user.Group");dojo.declare("com.ibm.mashups.enabler.user.Group",[com.ibm.mashups.enabler.user.Entity],{});}if(!dojo._hasResource["com.ibm.mm.enabler.user.GroupImpl"]){dojo._hasResource["com.ibm.mm.enabler.user.GroupImpl"]=true;dojo.provide("com.ibm.mm.enabler.user.GroupImpl");dojo.declare("com.ibm.mm.enabler.user.GroupImpl",[com.ibm.mashups.enabler.user.Group,com.ibm.mm.enabler.user.EntityImpl],{constructor:function(){this._initDelegators(com.ibm.mashups.enabler.user.Group.prototype);}});}if(!dojo._hasResource["com.ibm.mashups.enabler.user.Group"]){dojo._hasResource["com.ibm.mashups.enabler.user.Group"]=true;dojo.provide("com.ibm.mashups.enabler.user.Group");}if(!dojo._hasResource["com.ibm.mashups.enabler.user.Attribute_API"]){dojo._hasResource["com.ibm.mashups.enabler.user.Attribute_API"]=true;dojo.provide("com.ibm.mashups.enabler.user.Attribute_API");dojo.provide("com.ibm.mashups.enabler.user.Attribute");dojo.declare("com.ibm.mashups.enabler.user.Attribute",null,{getName:function(){},getType:function(){}});}if(!dojo._hasResource["com.ibm.mm.enabler.user.AttributeImpl"]){dojo._hasResource["com.ibm.mm.enabler.user.AttributeImpl"]=true;dojo.provide("com.ibm.mm.enabler.user.AttributeImpl");dojo.declare("com.ibm.mm.enabler.user.AttributeImpl",[com.ibm.mashups.enabler.user.Attribute,com.ibm.mm.enabler.persistence.PersistenceHandlerImpl],{constructor:function(){var u=com.ibm.mashups.enabler.user;this._initDelegators(u.Attribute.prototype);var um=com.ibm.mashups.enabler.user.Factory.getUserModel();this._initTransition(um,um.getModifiableNode);}});}if(!dojo._hasResource["com.ibm.mashups.enabler.user.Attribute"]){dojo._hasResource["com.ibm.mashups.enabler.user.Attribute"]=true;dojo.provide("com.ibm.mashups.enabler.user.Attribute");}if(!dojo._hasResource["com.ibm.mashups.enabler.model.UserModel_API"]){dojo._hasResource["com.ibm.mashups.enabler.model.UserModel_API"]=true;dojo.provide("com.ibm.mashups.enabler.model.UserModel_API");dojo.provide("com.ibm.mashups.enabler.model.UserModel");dojo.declare("com.ibm.mashups.enabler.model.UserModel",[com.ibm.mashups.enabler.Commitable,com.ibm.mashups.enabler.ListModel,com.ibm.mashups.enabler.Locator],{getAnonymousMode:function(){},findCurrentUser:function(){},findUsersByAttribute:function(_1129,_112a){},findGroupByID:function(id){return new Deferred();},findGroupsByAttribute:function(_112b,_112c){return new Deferred();},findGroupAttributes:function(){return [];},findUserAttributes:function(){return [];},getVirtualUsers:function(){return [];},getVirtualGroups:function(){return [];},getLookasideAttributeNames:function(){return [];}});}if(!dojo._hasResource["com.ibm.mm.enabler.user.AllAuthGroupImpl"]){dojo._hasResource["com.ibm.mm.enabler.user.AllAuthGroupImpl"]=true;dojo.provide("com.ibm.mm.enabler.user.AllAuthGroupImpl");dojo.declare("com.ibm.mm.enabler.user.AllAuthGroupImpl",[com.ibm.mm.enabler.user.EntityImpl],{constructor:function(_112d,_112e){this.allAuthID=_112d;this.allAuthIDEncoded=_112e;},getID:function(){return this.allAuthID;},getCN:function(){return "all authenticated portal users";},getDisplayName:function(){this.iwStr=dojo.i18n.getLocalization("com.ibm.mm.enabler","iwStr");return this.iwStr.ALL_AUTH;},getEntityType:function(){return "group";},getAttribute:function(_112f){return null;},isVirtual:function(){return true;},getVirtualType:function(){return com.ibm.mashups.enabler.user.VirtualType.ALL_AUTHENTICATED_GROUP;}});}if(!dojo._hasResource["com.ibm.mm.enabler.user.AllPortalGroupImpl"]){dojo._hasResource["com.ibm.mm.enabler.user.AllPortalGroupImpl"]=true;dojo.provide("com.ibm.mm.enabler.user.AllPortalGroupImpl");dojo.declare("com.ibm.mm.enabler.user.AllPortalGroupImpl",[com.ibm.mm.enabler.user.EntityImpl],{constructor:function(_1130,_1131){this.allPortalID=_1130;this.allPortalIDEncoded=_1131;},getID:function(){return this.allPortalID;},getCN:function(){return "all portal users";},getDisplayName:function(){this.iwStr=dojo.i18n.getLocalization("com.ibm.mm.enabler","iwStr");return this.iwStr.ALL_PORTAL;},getEntityType:function(){return "group";},getAttribute:function(_1132){return null;},isVirtual:function(){return true;},getVirtualType:function(){return com.ibm.mashups.enabler.user.VirtualType.ALL_PORTAL_GROUP;}});}if(!dojo._hasResource["com.ibm.mm.enabler.user.AnonUserImpl"]){dojo._hasResource["com.ibm.mm.enabler.user.AnonUserImpl"]=true;dojo.provide("com.ibm.mm.enabler.user.AnonUserImpl");dojo.declare("com.ibm.mm.enabler.user.AnonUserImpl",[com.ibm.mm.enabler.user.EntityImpl],{constructor:function(_1133,_1134){this.anonUserID=_1133;this.anonUserIDEncoded=_1134;},getAttribute:function(_1135){return null;},getAttributeNames:function(){return [];},getID:function(){return this.anonUserID;},getLoginName:function(){return "anonymous portal user";},getSN:function(){return "anonymous portal user";},getCN:function(){return "anonymous portal user";},getEmail:function(){return null;},getDisplayName:function(){this.iwStr=dojo.i18n.getLocalization("com.ibm.mm.enabler","iwStr");return this.iwStr.ANON;},getEntityType:function(){return "user";},setAttribute:function(name,value){return null;},removeAttribute:function(name){return null;},getChangedAttributeNames:function(){return {};},getAddedAttributeNames:function(){return {};},getRemovedAttributeNames:function(){return {};},clearChangedAttributeNames:function(){},isVirtual:function(){return true;},getVirtualType:function(){return com.ibm.mashups.enabler.user.VirtualType.ANONYMOUS_USER;}});}if(!dojo._hasResource["com.ibm.mm.enabler.user.UserModelImpl"]){dojo._hasResource["com.ibm.mm.enabler.user.UserModelImpl"]=true;dojo.provide("com.ibm.mm.enabler.user.UserModelImpl");dojo.provide("com.ibm.mm.enabler.model.UserModel.iConfig");dojo.declare("com.ibm.mm.enabler.user.UserModelImpl",[com.ibm.mashups.enabler.ListModel,com.ibm.mm.enabler.model.ModelImpl,com.ibm.mm.enabler.LazyLoadSupport],{constructor:function(){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;var _1136=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME);var eps=_1136.getValue("ConfigProvider.Endpoints");this.anonUserID=_1136.getValue(com.ibm.mashups.enabler.services.ConfigConstants.ANON_VIRTUAL_USER_ID);if((typeof this.anonUserID=="undefined")||(this.anonUserID===null)){this.anonUserID="anonymous portal user";}this.allAuthID=_1136.getValue(com.ibm.mashups.enabler.services.ConfigConstants.ALL_AUTH_VIRTUAL_GROUP_ID);if((typeof this.allAuthID=="undefined")||(this.allAuthID===null)){this.allAuthID="all authenticated portal users";}this.allPortalID=_1136.getValue(com.ibm.mashups.enabler.services.ConfigConstants.ALL_PORTAL_VIRTUAL_GROUP_ID);if((typeof this.allPortalID=="undefined")||(this.allPortalID===null)){this.allPortalID="all portal users";}this.anonEnabled=false;var _1137=_1136.getValue(com.ibm.mashups.enabler.services.ConfigConstants.ANON_MODE_ENABLED)||false;if(_1137===true||_1137=="true"||_1137=="on"||_1137=="TRUE"||_1137=="ON"){this.anonEnabled=true;}this.anonUserIDEncoded=encodeURIComponent(this.anonUserID);this.allAuthIDEncoded=encodeURIComponent(this.allAuthID);this.allPortalIDEncoded=encodeURIComponent(this.allPortalID);this.anonUser=null;this.allAuth=null;this.allPortal=null;this.currentUser=null;this.loadedUsers={};},_lazyInit:function(){if(this.anonUser){return;}this.anonUser=new com.ibm.mm.enabler.user.AnonUserImpl(this.anonUserID,this.anonUserIDEncoded);this.allAuth=new com.ibm.mm.enabler.user.AllAuthGroupImpl(this.allAuthID,this.allAuthIDEncoded);this.allPortal=new com.ibm.mm.enabler.user.AllPortalGroupImpl(this.allPortalID,this.allPortalIDEncoded);},_getPersistenceModel:function(){var m=this._getJsonModel();return m?m:this._getXmlModel();},_hasXmlModel:function(){return !!this._xmlModel;},_getXmlModel:function(){if(!this._xmlModel){this.lazyLoadModules(["UserModelXml"]);dojo["require"]("com.ibm.mm.enabler.user.persistence.xml.UserModelImpl");this._xmlModel=com.ibm.mm.enabler.user.persistence.xml.UserModelImpl.prototype._getInstance(this.anonUserID,this.anonUserIDEncoded,this.anonUser,this.allAuthID,this.allAuthIDEncoded,this.allAuth,this.allPortalID,this.allPortalIDEncoded,this.allPortal);}return this._xmlModel;},_hasJsonModel:function(){return !!this._jsonModel;},_getJsonModel:function(){if((ibmConfig)&&(ibmConfig.json)&&(ibmConfig.json.userAttributes)&&(ibmConfig.json.user)){if(!this._jsonModel){dojo["require"]("com.ibm.mm.enabler.user.persistence.json.UserModelImpl");this._jsonModel=com.ibm.mm.enabler.user.persistence.json.UserModelImpl.prototype._getInstance(this.anonUserID,this.anonUserIDEncoded,this.anonUser,this.allAuthID,this.allAuthIDEncoded,this.allAuth,this.allPortalID,this.allPortalIDEncoded,this.allPortal);}return this._jsonModel;}return null;},_getInstance:function(){var _1138=com.ibm.mm.enabler.user.UserModelImpl._instance;return _1138?_1138:(com.ibm.mm.enabler.user.UserModelImpl._instance=new com.ibm.mm.enabler.user.UserModelImpl());},getAnonymousMode:function(){return com.ibm.mm.enabler.AnonymousHelper.getAnonymousMode();},getVirtualUsers:function(){return new com.ibm.mm.enabler.DeferredImpl(this,this._getVirtualUsers);},_getVirtualUsers:function(dfr,sync){this._lazyInit();var users=[];if(this.anonEnabled){users.push(this.anonUser);}return users;},getVirtualGroups:function(){return new com.ibm.mm.enabler.DeferredImpl(this,this._getVirtualGroups);},_getVirtualGroups:function(dfr,sync){this._lazyInit();var _1139=[];_1139.push(this.allAuth);_1139.push(this.allPortal);return _1139;},find:function(uri){return new com.ibm.mm.enabler.DeferredImpl(this,function(dfr,sync,id){var _113a="find";var _113b=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_113b){this.LOGGER.entering(_113a,arguments);}this._lazyInit();if(this.currentUser!==null&&this.currentUser.getID()==id){if(dfr){dfr.finish(this.currentUser,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK);}return this.currentUser;}if((id===this.anonUserID)||(id===this.anonUserIDEncoded)){this.entry=this.anonUser;if(dfr){dfr.finish(this.entry,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK);}return this.anonUser;}if((id===this.allAuthID)||(id===this.allAuthIDEncoded)){this.entry=this.allAuth;if(dfr){dfr.finish(this.entry,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK);}return this.allAuth;}if((id===this.allPortalID)||(id===this.allPortalIDEncoded)){this.entry=this.allPortal;if(dfr){dfr.finish(this.entry,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK);}return this.allPortal;}if(id in this.loadedUsers){this.entry=this.loadedUsers[id];if(dfr){dfr.finish(this.entry,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK);}return this.entry;}var _113c=null;var _113d=this._getXmlModel().find(id);_113d.setFinishedCallback(dojo.hitch(this,function(node,_113e){if(node){var _113f=new com.ibm.mm.enabler.user.UserImpl();_113f._setPersistence(node);_113c=this.loadedUsers[_113f.getID()]=_113f;}dfr.finish(_113c,_113e);}));_113d.start(sync);if(_113b){this.LOGGER.exiting(_113a);}return _113c;},uri);},getModifiableNode:function(node){return new com.ibm.mm.enabler.DeferredImpl(this,function(_1140,sync,node){var _1141="getModifiable";var _1142=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_1142){this.LOGGER.entering(_1141,arguments);}var id=com.ibm.mm.enabler.utils.Utils.getIdFromIdentifiable(node);var _1143;if(!(this.loadedUsers[id])||!this.loadedUsers[id]._getPersistence().data.ownerDocument){var dfr;if(com.ibm.mm.enabler.utils.Misc.isInstanceOf(node,com.ibm.mashups.enabler.user.CurrentUser)){dfr=this._getXmlModel().findCurrentUser(id);dfr.setFinishedCallback(dojo.hitch(this,function(node,_1144){if(node){if(this.currentUser){this.currentUser._setPersistence(node);this.loadedUsers[id]=this.currentUser;}else{var _1145=new com.ibm.mm.enabler.user.CurrentUserImpl();_1145._setPersistence(node);this.currentUser=_1145;this.loadedUsers[id]=_1145;}_1143=this.loadedUsers[id];}_1140.finish(_1143,_1144);}));dfr.start();}else{dfr=this._getXmlModel().find(id);dfr.setFinishedCallback(dojo.hitch(this,function(node,_1146){if(node){if(this.loadedUsers[id]){this.loadedUsers[id]._setPersistence(node);}else{var _1147=new com.ibm.mm.enabler.user.UserImpl();_1147._setPersistence(node);this.loadedUsers[id]=_1147;}_1143=this.loadedUsers[id];}_1140.finish(_1143,_1146);}));dfr.start();}if(_1140){_1140.finish(this.loadedUsers[id],com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK);}_1143=this.loadedUsers[id];}if(_1142){this.LOGGER.exiting(_1141,_1143);}return _1143;},node);},findUserAttributes:function(){return new com.ibm.mm.enabler.DeferredImpl(this,function(dfr,sync){var _1148="findUserAttributes";var _1149=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_1149){this.LOGGER.entering(_1148,arguments);}var _114a=null;var _114b=this._getPersistenceModel().findUserAttributes();_114b.setFinishedCallback(dojo.hitch(this,function(nodes,_114c){if(nodes){_114a=[];for(var i=0;i0;i--){var _1161=this._filters[p][i-1];try{_1160=_1161.fn.apply(_1161.scope||null,[data]);}catch(e){this.LOGGER.warning("_getType","Type mapping filter failed to execute; skipping. Reason: "+e.message);}if(_1160){break;}}return _1160||null;}});com.ibm.mashups.enabler.navigation.persistence.TypeMappingRegistry=new com.ibm.mm.enabler.navigation.persistence.TypeMappingRegistryImpl();}if(!dojo._hasResource["com.ibm.mashups.enabler.navigation.persistence.TypeMappingRegistry"]){dojo._hasResource["com.ibm.mashups.enabler.navigation.persistence.TypeMappingRegistry"]=true;dojo.provide("com.ibm.mashups.enabler.navigation.persistence.TypeMappingRegistry");}if(!dojo._hasResource["com.ibm.mashups.enabler.persistence.Constants"]){dojo._hasResource["com.ibm.mashups.enabler.persistence.Constants"]=true;dojo.provide("com.ibm.mashups.enabler.persistence.Constants");dojo.declare("com.ibm.mashups.enabler.persistence.Constants",null,{NAVIGATION_MODEL_PERSISTENCE_PROVIDER:"NavigationModelPersistenceProvider",SPACE_MODEL_PERSISTENCE_PROVIDER:"SpaceModelPersistenceProvider"});com.ibm.mashups.enabler.persistence.Constants=new com.ibm.mashups.enabler.persistence.Constants();}if(!dojo._hasResource["com.ibm.mashups.enabler.persistence.ModelPersistenceProvider"]){dojo._hasResource["com.ibm.mashups.enabler.persistence.ModelPersistenceProvider"]=true;dojo.provide("com.ibm.mashups.enabler.persistence.ModelPersistenceProvider");dojo.declare("com.ibm.mashups.enabler.persistence.ModelPersistenceProvider",null,{findBySelection:function(url,_1162,_1163,_1164){},create:function(_1165){},remove:function(_1166,_1167,_1168){},store:function(_1169,_116a,_116b){},getModifiable:function(node){}});}if(!dojo._hasResource["com.ibm.mashups.enabler.persistence.NavigationModelPersistenceProvider"]){dojo._hasResource["com.ibm.mashups.enabler.persistence.NavigationModelPersistenceProvider"]=true;dojo.provide("com.ibm.mashups.enabler.persistence.NavigationModelPersistenceProvider");dojo.declare("com.ibm.mashups.enabler.persistence.NavigationModelPersistenceProvider",[com.ibm.mashups.enabler.persistence.ModelPersistenceProvider],{find:function(url,_116c,_116d){},findBySelection:function(url,_116e,_116f,_1170){},create:function(_1171){}});}if(!dojo._hasResource["com.ibm.mashups.enabler.persistence.SpaceModelPersistenceProvider"]){dojo._hasResource["com.ibm.mashups.enabler.persistence.SpaceModelPersistenceProvider"]=true;dojo.provide("com.ibm.mashups.enabler.persistence.SpaceModelPersistenceProvider");dojo.declare("com.ibm.mashups.enabler.persistence.SpaceModelPersistenceProvider",[com.ibm.mashups.enabler.persistence.ModelPersistenceProvider],{find:function(url,_1172,_1173){},findBySelection:function(url,_1174,_1175,_1176){},create:function(_1177){}});}if(!dojo._hasResource["com.ibm.mashups.enabler.persistence.Factory_API"]){dojo._hasResource["com.ibm.mashups.enabler.persistence.Factory_API"]=true;dojo.provide("com.ibm.mashups.enabler.persistence.Factory_API");dojo.provide("com.ibm.mashups.enabler.persistence.Factory");dojo.declare("com.ibm.mashups.enabler.persistence.Factory",null,{getModelPersistenceProvider:function(type){}});}if(!dojo._hasResource["com.ibm.mashups.enabler.persistence.Factory"]){dojo._hasResource["com.ibm.mashups.enabler.persistence.Factory"]=true;dojo.provide("com.ibm.mashups.enabler.persistence.Factory");}if(!dojo._hasResource["com.ibm.mashups.enabler.services.StrategyService_API"]){dojo._hasResource["com.ibm.mashups.enabler.services.StrategyService_API"]=true;dojo.provide("com.ibm.mashups.enabler.services.StrategyService_API");dojo.provide("com.ibm.mashups.enabler.services.StrategyService");dojo.declare("com.ibm.mashups.enabler.services.StrategyService",null,{SERVICE_NAME:"strategyService",setStrategy:function(model,_1178){},getStrategies:function(model){},getStrategy:function(model,_1179){},addStrategy:function(model,_117a){},removeStrategy:function(model,_117b){}});com.ibm.mashups.enabler.services.StrategyService.SERVICE_NAME="strategyService";}if(!dojo._hasResource["com.ibm.mm.enabler.services.StrategyServiceImpl"]){dojo._hasResource["com.ibm.mm.enabler.services.StrategyServiceImpl"]=true;dojo.provide("com.ibm.mm.enabler.services.StrategyServiceImpl");dojo.declare("com.ibm.mm.enabler.services.StrategyServiceImpl",[com.ibm.mashups.enabler.services.StrategyService],{constructor:function(){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.map={};this.map["com.ibm.mashups.enabler.widget.WidgetModel"]=new com.ibm.mm.enabler.model.ModelImpl();this.map["com.ibm.mashups.enabler.layout.LayoutModel"]=new com.ibm.mm.enabler.model.ModelImpl();},setStrategy:function(model,_117c){var _117d=this.map[model];if(_117d){_117d.setStrategy(_117c);}},getStrategies:function(model){var _117e=this.map[model];if(_117e){return _117e.getStrategies(strategy);}return null;},getStrategy:function(model,_117f){var _1180=this.map[model];if(_1180){return _1180.getStrategy(_117f);}return null;},addStrategy:function(model,_1181){var _1182=this.map[model];if(_1182){_1182.addStrategy(_1181);}},removeStrategy:function(model,_1183){var _1184=this.map[model];if(_1184){_1184.removeStrategy(_1183);}}});com.ibm.mashups.services.ServiceManager.setService("strategyService","com.ibm.mm.enabler.services.StrategyServiceImpl");}if(!dojo._hasResource["com.ibm.mashups.enabler.services.StrategyService"]){dojo._hasResource["com.ibm.mashups.enabler.services.StrategyService"]=true;dojo.provide("com.ibm.mashups.enabler.services.StrategyService");}if(!dojo._hasResource["com.ibm.mashups.enabler.strategy.CatalogCategoryLoadAheadStrategy"]){dojo._hasResource["com.ibm.mashups.enabler.strategy.CatalogCategoryLoadAheadStrategy"]=true;dojo.provide("com.ibm.mashups.enabler.strategy.CatalogCategoryLoadAheadStrategy");dojo.declare("com.ibm.mashups.enabler.strategy.CatalogCategoryLoadAheadStrategy",com.ibm.mashups.enabler.strategy.Strategy,{constructor:function(_1185){this.loadAheadCatalogCategoryModel=_1185;this.catalogCategoryModel=null;},isLoadAheadCatalogCategoryModel:function(){return this.loadAheadCatalogCategoryModel;},setCatalogCategoryModel:function(_1186){this.catalogCategoryModel=_1186||null;},getCatalogCategoryModel:function(){if(null===this.catalogCategoryModel){this.catalogCategoryModel=com.ibm.mashups.enabler.catalog.Factory.getCatalogCategoryModel();}return this.catalogCategoryModel;}});}if(!dojo._hasResource["com.ibm.mashups.enabler.strategy.PageLoadAheadStrategy_API"]){dojo._hasResource["com.ibm.mashups.enabler.strategy.PageLoadAheadStrategy_API"]=true;dojo.provide("com.ibm.mashups.enabler.strategy.PageLoadAheadStrategy_API");dojo.provide("com.ibm.mashups.enabler.strategy.PageLoadAheadStrategy");dojo.declare("com.ibm.mashups.enabler.strategy.PageLoadAheadStrategy",com.ibm.mashups.enabler.strategy.Strategy,{constructor:function(_1187,_1188,_1189){},isLoadAheadLayoutModel:function(){return this.loadAheadLayoutModel;},isLoadAheadTheme:function(){return this.loadAheadTheme;}});}if(!dojo._hasResource["com.ibm.mm.enabler.strategy.PageLoadAheadStrategyImpl"]){dojo._hasResource["com.ibm.mm.enabler.strategy.PageLoadAheadStrategyImpl"]=true;dojo.provide("com.ibm.mm.enabler.strategy.PageLoadAheadStrategyImpl");dojo.declare("com.ibm.mm.enabler.strategy.PageLoadAheadStrategyImpl",[com.ibm.mashups.enabler.strategy.PageLoadAheadStrategy,com.ibm.mm.enabler.ServiceDocConsumer],{constructor:function(_118a,_118b,_118c){this.loadAheadLayoutModel=!!_118a;this.loadAheadUser=!!_118c;this.userModel=null;var _118d=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME);var _118e=_118d.getValue(com.ibm.mashups.enabler.services.ConfigConstants.PAGE_LOAD_OPTIMIZATION_THEME);if(_118e===true){this.loadAheadTheme=!!_118b;}else{this.loadAheadTheme=false;}},_initServiceDoc:function(){this.inherited("_initServiceDoc",arguments);this.serviceJson=com.ibm.mm.enabler.model.ServiceDocumentModel.getCollectionData(com.ibm.mm.enabler.model.ServiceDocumentModel.SERVICE_NAVIGATION);var nsf=com.ibm.mm.enabler.model.NameSpaceFactory;this.ns=dojo.delegate(this.serviceJson.namespaces,nsf.getNameSpaces([nsf.NS_ATOM,nsf.NS_THR,nsf.NS_XML,nsf.NS_OPENSEARCH]));this.prefix=this.serviceJson.idprefix;},isLoadAheadLayoutModel:function(){return this.loadAheadLayoutModel;},isLoadAheadTheme:function(){return this.loadAheadTheme;},isLoadAheadUser:function(){return this.loadAheadUser;},setUserModel:function(_118f){this.userModel=_118f;},getUserModel:function(){if(!this.userModel){this.userModel=com.ibm.mashups.enabler.user.Factory.getUserModel();}return this.userModel;},_processLoadAhead:function(_1190,sync){if(!com.ibm.mashups.enabler.io.XHRMultipartFactory.isMultipartEnabled()){return;}var _1191=com.ibm.mashups.enabler.io.XHRMultipartFactory.create();_1191.startTransaction();if(this.loadAheadUser){var _1192=this.getUserModel();_1192.findCurrentUser().start();}this._initServiceDoc();for(var i=0;i<_1190.length;i++){if(this.loadAheadLayoutModel){var href=null;var id=null;var expr="atom:link[@rel='related' and @ext:class='content-node']";var node=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(expr,_1190[i].xmlData,this.ns);if(node){href=node.getAttribute("href");id=com.ibm.mm.enabler.utils.Utils.getIdFromExtUri(this.prefix,node);}var _1193=(id!==null)?id:_1190[i].getID();var myUrl=com.ibm.mashups.enabler.model.url.ModelUrlFactory.getModelURL(href,null);var _1194=new com.ibm.mm.enabler.services.ModelRestServiceRequest(myUrl,null,null,false,sync);_1194.read(dojo.hitch(this,function(type,data,xhr,args){if((type==com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_LOAD)&&(args.node)){var _1195=com.ibm.mashups.enabler.xml.XPath.evaluateEntry("atom:feed/atom:entry",data,this.ns);if(_1195){args.node._setFragmentData(_1195);}}}),{"node":_1190[i]});myUrl=com.ibm.mashups.enabler.model.url.ModelUrlFactory.createModelURL(com.ibm.mashups.enabler.model.url.ModelUrlFactory.FRAGMENT_MEDIA_URL,null);myUrl.setNodes([{value:_1193,isID:true},{value:"index.html",isID:false}]);_1194=new com.ibm.mm.enabler.services.ModelRestServiceRequest(myUrl,null,null,true,sync);_1194.read(dojo.hitch(this,function(type,data,xhr,args){if((type==com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_LOAD)&&(args.node)){args.node._setFragmentMediaData(data);}}),{"node":_1190[i]});}if(this.loadAheadTheme){var _1196=_1190[i].getThemeIdentifier().getID();if(_1196!==null){var _1197=com.ibm.mashups.enabler.theme.Factory.getThemeModel();_1197.find(_1196).start();}}}_1191.endTransactionDeferred().start();},_processFind:function(node,sync){if(this.loadAheadLayoutModel){this._initServiceDoc();var myUrl=com.ibm.mashups.enabler.model.url.ModelUrlFactory.createModelURL(com.ibm.mashups.enabler.model.url.ModelUrlFactory.FRAGMENT_URL,null);var uri="0";myUrl.setNodes([{value:uri,isID:true}]);serviceReq=new com.ibm.mm.enabler.services.ModelRestServiceRequest(myUrl,null,null,false,sync);serviceReq.read(dojo.hitch(this,function(type,data,xhr,args){if((type==com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_LOAD)&&(node)){var _1198=com.ibm.mashups.enabler.xml.XPath.evaluateEntry("atom:feed/atom:entry",data,this.ns);if(_1198){node._setFragmentData(_1198);}}}));myUrl=com.ibm.mashups.enabler.model.url.ModelUrlFactory.createModelURL(com.ibm.mashups.enabler.model.url.ModelUrlFactory.FRAGMENT_MEDIA_URL,null);myUrl.setNodes([{value:uri,isID:true},{value:"index.html",isID:false}]);serviceReq=new com.ibm.mm.enabler.services.ModelRestServiceRequest(myUrl,null,null,true,sync);serviceReq.read(dojo.hitch(this,function(type,data,xhr,args){if((type==com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_LOAD)&&(node)){node._setFragmentMediaData(data);}}));}if(this.loadAheadTheme){var _1199=com.ibm.mashups.enabler.theme.Factory.getThemeModel();_1199.find("0").start();}}});com.ibm.mashups.enabler.strategy.PageLoadAheadStrategy=com.ibm.mm.enabler.strategy.PageLoadAheadStrategyImpl;}if(!dojo._hasResource["com.ibm.mashups.enabler.strategy.PageLoadAheadStrategy"]){dojo._hasResource["com.ibm.mashups.enabler.strategy.PageLoadAheadStrategy"]=true;dojo.provide("com.ibm.mashups.enabler.strategy.PageLoadAheadStrategy");}if(!dojo._hasResource["com.ibm.mashups.enabler.strategy.WidgetWindowLoadAheadStrategy"]){dojo._hasResource["com.ibm.mashups.enabler.strategy.WidgetWindowLoadAheadStrategy"]=true;dojo.provide("com.ibm.mashups.enabler.strategy.WidgetWindowLoadAheadStrategy");dojo.declare("com.ibm.mashups.enabler.strategy.WidgetWindowLoadAheadStrategy",com.ibm.mashups.enabler.strategy.Strategy,{constructor:function(_119a){this.windowMap=_119a;},getWidgetWindowMap:function(){return this.windowMap;}});}if(!dojo._hasResource["com.ibm.mashups.enabler.widget.Factory_API"]){dojo._hasResource["com.ibm.mashups.enabler.widget.Factory_API"]=true;dojo.provide("com.ibm.mashups.enabler.widget.Factory_API");dojo.provide("com.ibm.mashups.enabler.widget.Factory");dojo.declare("com.ibm.mashups.enabler.widget.Factory",null,{getWidgetModel:function(){}});}if(!dojo._hasResource["com.ibm.mm.enabler.widget.FactoryImpl"]){dojo._hasResource["com.ibm.mm.enabler.widget.FactoryImpl"]=true;dojo.provide("com.ibm.mm.enabler.widget.FactoryImpl");dojo.declare("com.ibm.mm.enabler.widget.FactoryImpl",[com.ibm.mashups.enabler.widget.Factory,com.ibm.mm.enabler.LazyLoadSupport],{getWidgetModel:function(){com.ibm.mashups.enabler.widget.Factory.lazyLoadModules(["WidgetModel"]);return com.ibm.mm.enabler.widget.WidgetModelImpl.prototype.getInstance();}});com.ibm.mashups.enabler.widget.Factory=new com.ibm.mm.enabler.widget.FactoryImpl();}if(!dojo._hasResource["com.ibm.mashups.enabler.widget.Factory"]){dojo._hasResource["com.ibm.mashups.enabler.widget.Factory"]=true;dojo.provide("com.ibm.mashups.enabler.widget.Factory");}if(!dojo._hasResource["com.ibm.mashups.enabler.model.Constants"]){dojo._hasResource["com.ibm.mashups.enabler.model.Constants"]=true;dojo.provide("com.ibm.mashups.enabler.model.Constants");dojo.declare("com.ibm.mashups.enabler.model.Constants",null,{constructor:function(){this.SCHEME_SEPARATOR=":";this.CLIENT_ID_SCHEME="cid";this.CLIENT_ID_PREFIX=this.CLIENT_ID_SCHEME+this.SCHEME_SEPARATOR;}});com.ibm.mashups.enabler.model.Constants=new com.ibm.mashups.enabler.model.Constants();}if(!dojo._hasResource["com.ibm.mm.enabler.persistence.PersistenceImpl"]){dojo._hasResource["com.ibm.mm.enabler.persistence.PersistenceImpl"]=true;dojo.provide("com.ibm.mm.enabler.persistence.PersistenceImpl");dojo.declare("com.ibm.mm.enabler.persistence.PersistenceImpl",null,{_setContext:function(ctx){this._ctx=ctx;},_getContext:function(){return this._ctx;},_getBaseContext:function(){var base;var ctx=this._getContext();if(ctx&&dojo.isFunction(ctx.getBaseContext)){base=ctx.getBaseContext();}return base||this;}});}if(!dojo._hasResource["com.ibm.mm.enabler.persistence.json.JsonPersistenceImpl"]){dojo._hasResource["com.ibm.mm.enabler.persistence.json.JsonPersistenceImpl"]=true;dojo.provide("com.ibm.mm.enabler.persistence.json.JsonPersistenceImpl");dojo.declare("com.ibm.mm.enabler.persistence.json.JsonPersistenceImpl",[com.ibm.mm.enabler.persistence.PersistenceImpl],{constructor:function(d){this.data=d;},toString:function(){return dojo.toJson(this.data);},_getJsonData:function(){return this.data;}});}if(!dojo._hasResource["com.ibm.mm.enabler.persistence.json.IdentifiableJsonImpl"]){dojo._hasResource["com.ibm.mm.enabler.persistence.json.IdentifiableJsonImpl"]=true;dojo.provide("com.ibm.mm.enabler.persistence.json.IdentifiableJsonImpl");dojo.declare("com.ibm.mm.enabler.persistence.json.IdentifiableJsonImpl",[com.ibm.mashups.enabler.Identifiable],{getID:function(){return this.data.id;},isDirty:function(){return false;}});}if(!dojo._hasResource["com.ibm.mm.enabler.persistence.json.MetaDataJsonImpl"]){dojo._hasResource["com.ibm.mm.enabler.persistence.json.MetaDataJsonImpl"]=true;dojo.provide("com.ibm.mm.enabler.persistence.json.MetaDataJsonImpl");dojo.declare("com.ibm.mm.enabler.persistence.json.MetaDataJsonImpl",[com.ibm.mm.enabler.persistence.meta.MetaDataMetaImpl],{getMetaDataNames:function(){var _119b=[];com.ibm.mm.enabler.utils.Misc.forIn(this.data.metadata,function(value,name){_119b.push(name);},this);return _119b;},getMetaData:function(name){return this.data.metadata?(this.data.metadata[name]||null):null;}});}if(!dojo._hasResource["com.ibm.mm.enabler.persistence.json.EffectiveAccessJsonImpl"]){dojo._hasResource["com.ibm.mm.enabler.persistence.json.EffectiveAccessJsonImpl"]=true;dojo.provide("com.ibm.mm.enabler.persistence.json.EffectiveAccessJsonImpl");dojo.declare("com.ibm.mm.enabler.persistence.json.EffectiveAccessJsonImpl",[com.ibm.mashups.enabler.ac.EffectiveAccess],{hasRole:function(_119c){if(dojo.isString(_119c)){_119c=_119c.toUpperCase();}if(this.data.roles&&dojo.isArray(this.data.roles)){for(var i=0,l=this.data.roles.length;i0){for(var i=0;i<_122d.length;i++){var node=new com.ibm.mm.enabler.ac.MemberNodeImpl(this.roleID,_122d[i],this.um);this.accessControlModel.membersEntries[this.roleID][this.accessControlModel.membersCursor[this.roleID]+i]=node.getID();this.accessControlModel._cacheNodeMembers(this.roleID,node);}var len=this.accessControlModel.membersEntries[this.roleID].length;this.accessControlModel.membersEntries[this.roleID][len]=null;}else{this.accessControlModel.membersEntries[this.roleID]=[];this.accessControlModel.membersEntries[this.roleID][0]=null;}}},create:function(_122e){if(!_122e){throw new Error("MemberModelImpl.create: no context");}if(!_122e.type){throw new Error("MemberModelImpl.create: no type context");}if(!_122e.id){throw new Error("MemberModelImpl.create: no type context");}var entry=com.ibm.mm.enabler.utils.Utils.createNode("atom:entry",this.ns.atom);entry.appendChild(com.ibm.mm.enabler.utils.Utils.createNode("atom:id",this.ns.atom));var title=com.ibm.mm.enabler.utils.Utils.createNode("atom:title",this.ns.atom);com.ibm.mm.enabler.utils.Dom.textContent(title,"Member");entry.appendChild(title);var _122f=com.ibm.mm.enabler.utils.Utils.createNode("atom:updated",this.ns.atom);var time=new Date();com.ibm.mm.enabler.utils.Dom.textContent(_122f,time.toGMTString());entry.appendChild(_122f);var _1230=com.ibm.mm.enabler.utils.Utils.createNode("atom:content",this.ns.atom);_1230.setAttribute("type","application/xml");var _1231=com.ibm.mm.enabler.utils.Utils.createNode("ac:member",this.ns.ac);com.ibm.mm.enabler.utils.Utils.setAttributeWithNS(_1231,"ac:id",this.nsf.getNameSpaceUri(this.nsf.NS_AC),_122e.id);com.ibm.mm.enabler.utils.Utils.setAttributeWithNS(_1231,"ac:type",this.nsf.getNameSpaceUri(this.nsf.NS_AC),_122e.type);_1230.appendChild(_1231);entry.appendChild(_1230);var _1232=new com.ibm.mm.enabler.ac.MemberNodeImpl(this.roleID,entry,this.um);return _1232;},iterator:function(){return this;},start:function(sync){while(this._hasNext(this,sync)){if(this._next(this,sync)){continue;}else{break;}}},hasNext:function(){return this._hasNext(null,true);},_hasNext:function(_1233,sync){var _1234=false;var next=this.accessControlModel.membersEntries[this.roleID][this.accessControlModel.membersCursor[this.roleID]];if(next!==null&&next!==undefined){_1234=true;}return _1234;},next:function(){return this._next(null,true);},_next:function(_1235,sync){var _1236=this._hasNext(_1235,sync);var _1237=this.accessControlModel.membersEntries[this.roleID];var _1238=this.accessControlModel.membersLoadedNodes[this.roleID];var ret=_1236?_1238[_1237[this.accessControlModel.membersCursor[this.roleID]]]:null;this.accessControlModel.membersCursor[this.roleID]++;return ret;},size:function(){return this.accessControlModel.membersSizeValue[this.roleID];},setCursorPosition:function(_1239){this.accessControlModel.membersCursor[this.roleID]=_1239;},getCursorPosition:function(){return this.accessControlModel.membersCursor[this.roleID];},insert:function(node,_123a){if(!this.accessControlModel.changedProperties.role){this.accessControlModel.changedProperties.role=this.accessControlModel.getRoleModel()._getRoles();}this.accessControlModel.membersCreatedNodes[this.roleID][node.getID()]=node;var _123b=this.accessControlModel.membersEntries[this.roleID].length;if((!_123b)||(_123b===0)){this.accessControlModel.membersEntries[this.roleID][0]=node.getID();this.accessControlModel.membersEntries[this.roleID][1]=null;}else{this.accessControlModel.membersEntries[this.roleID][_123b-1]=node.getID();this.accessControlModel.membersEntries[this.roleID][_123b]=null;}this.accessControlModel._cacheNodeMembers(this.roleID,node);},find:function(id){return new com.ibm.mm.enabler.DeferredImpl(this,this._find,id);},_find:function(_123c,sync,id){if(id in this.accessControlModel.membersDeletedNodes[this.roleID]){if(_123c){_123c.finish(null,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_NOT_FOUND);}return null;}if(id in this.accessControlModel.membersLoadedNodes[this.roleID]){if(_123c){_123c.finish(this.accessControlModel.membersLoadedNodes[this.roleID][id],com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK);}return this.accessControlModel.membersLoadedNodes[this.roleID][id];}var myUrl=com.ibm.mashups.enabler.model.url.ModelUrlFactory.createModelUrl(com.ibm.mashups.enabler.model.url.ModelUrlFactory.AC_URL,this);myUrl.setNodes([{value:id,isID:true}]);var _123d=new com.ibm.mm.enabler.services.ModelRestServiceRequest(myUrl,null,null,false,sync);var entry=null;var _123e={};_123e.node=null;_123d.read(dojo.hitch(this,function(type,data,xhr,args){if(type!=com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_ERROR){var nodes=com.ibm.mashups.enabler.xml.XPath.evaluateEntry("//atom:entry",data,this.ns);if(nodes){var _123f=new com.ibm.mm.enabler.ac.MemberNodeImpl(nodes,this);this.accessControlModel.membersNewid[this.roleID]=_123f.getID();this.membersLoadedNodes[this.roleID][this.membersNewid[this.roleID]]=_123f;_123e.node=this.accessControlModel.membersLoadedNodes[this.roleID][this.membersNewid[this.roleID]];}else{if(sync){_123e.status=com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_NOT_FOUND;}}}if(_123c){_123c.finish(_123e.node||null,xhr.status);}if(sync&&type==com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_ERROR){if(xhr.status!=com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_NOT_FOUND){_123e.status=xhr.status;}}}));if(_123e.status){throw new Error(dojo.string.substitute(this.modelMessages.E_COMNODE_NOTFOUND_1,[id,_123e.status]));}retVal=_123e.node;return retVal;},remove:function(node){if(!this.accessControlModel.changedProperties.role){this.accessControlModel.changedProperties.role=this.accessControlModel.getRoleModel()._getRoles();}var id=node.getID();if(!(id in this.accessControlModel.membersDeletedNodes[this.roleID])){this.accessControlModel.membersDeletedNodesMemberIDs[this.roleID][id]=node.getEntity().getID();this.accessControlModel.membersDeletedNodes[this.roleID][id]=node;}if(id in this.accessControlModel.membersLoadedNodes[this.roleID]){delete this.accessControlModel.membersLoadedNodes[this.roleID][id];}}});}if(!dojo._hasResource["com.ibm.mashups.enabler.ac.MemberModel"]){dojo._hasResource["com.ibm.mashups.enabler.ac.MemberModel"]=true;dojo.provide("com.ibm.mashups.enabler.ac.MemberModel");}if(!dojo._hasResource["com.ibm.mashups.enabler.ac.RoleModel_API"]){dojo._hasResource["com.ibm.mashups.enabler.ac.RoleModel_API"]=true;dojo.provide("com.ibm.mashups.enabler.ac.RoleModel_API");dojo.provide("com.ibm.mashups.enabler.ac.RoleModel");dojo.declare("com.ibm.mashups.enabler.ac.RoleModel",[com.ibm.mashups.enabler.ListModelController],{create:function(_1240){},getMemberModel:function(_1241){}});}if(!dojo._hasResource["com.ibm.mm.enabler.ac.RoleModelImpl"]){dojo._hasResource["com.ibm.mm.enabler.ac.RoleModelImpl"]=true;dojo.provide("com.ibm.mm.enabler.ac.RoleModelImpl");dojo.declare("com.ibm.mm.enabler.ac.RoleModelImpl",[com.ibm.mashups.enabler.ac.RoleModel,com.ibm.mashups.enabler.ListModel,com.ibm.mm.enabler.DeferredIteratorImpl,com.ibm.mm.enabler.model.ModelImpl,com.ibm.mm.enabler.ConfirmableModelImpl],{constructor:function(_1242,_1243){this.accessControlModel=_1242;this.um=_1243;this.modelMessages=dojo.i18n.getLocalization("com.ibm.mm.enabler","modelMessages");this.serviceJson=com.ibm.mm.enabler.model.ServiceDocumentModel.getCollectionData(com.ibm.mm.enabler.model.ServiceDocumentModel.SERVICE_NAVIGATION);this.nsf=com.ibm.mm.enabler.model.NameSpaceFactory;this.ns=dojo.delegate(this.serviceJson.namespaces,this.nsf.getNameSpaces([this.nsf.NS_ATOM,this.nsf.NS_AC,this.nsf.NS_AI]));this.prefix="role";this.xmlDom=com.ibm.mm.enabler.utils.Dom.createDocument();this.cid=0;},create:function(_1244){if(!_1244){throw new Error("RoleModelImpl.create: no context");}if(!_1244.roletype){throw new Error("RoleModelImpl.create: no roletype context");}var _1245=this.getCursorPosition();this.setCursorPosition(0);var _1246=this.iterator();while(_1246.hasNext()){var role=_1246.next();if(role.getRoleType()==_1244.roletype){if(_1245){this.setCursorPosition(_1245);}else{this.setCursorPosition(0);}return null;}}var entry=com.ibm.mm.enabler.utils.Utils.createNode("atom:entry",this.ns.atom);entry.appendChild(com.ibm.mm.enabler.utils.Utils.createNode("atom:id",this.ns.atom));var title=com.ibm.mm.enabler.utils.Utils.createNode("atom:title",this.ns.atom);com.ibm.mm.enabler.utils.Dom.textContent(title,"Role");entry.appendChild(title);var _1247=com.ibm.mm.enabler.utils.Utils.createNode("atom:updated",this.ns.atom);var time=new Date();com.ibm.mm.enabler.utils.Dom.textContent(_1247,time.toGMTString());entry.appendChild(_1247);var _1248=com.ibm.mm.enabler.utils.Utils.createNode("atom:content",this.ns.atom);_1248.setAttribute("type","application/xml");var _1249=com.ibm.mm.enabler.utils.Utils.createNode("ac:role",this.ns.ac);var _124a=this.accessControlModel._getCreationRoleName(_1244.roletype);if(!_124a){_124a=_1244.roletype;}com.ibm.mm.enabler.utils.Utils.setAttributeWithNS(_1249,"ac:type",this.nsf.getNameSpaceUri(this.nsf.NS_AC),_124a);com.ibm.mm.enabler.utils.Dom.setAttributeWithNS(this.xmlDom,_1249,"creation-context:role-types","role-types",this.ns["creation-context"],_1244.roletype);var _124b=this.accessControlModel._getCreationResourceID();com.ibm.mm.enabler.utils.Dom.setAttributeWithNS(this.xmlDom,_1249,"creation-context:resource-id","resource-id",this.ns["creation-context"],_124b);_1248.appendChild(_1249);entry.appendChild(_1248);var _124c=new com.ibm.mm.enabler.ac.RoleNodeImpl(entry,this.um,_1244.roletype);_124c.setID(""+(this.cid++));return _124c;},remove:function(role){if(!this.accessControlModel.changedProperties.role){this.accessControlModel.changedProperties.role=this._getRoles();}var _124d=role.getID();for(var i=this.accessControlModel.rolesEntries.length;i>0;i--){if(this.accessControlModel.rolesEntries[i]==_124d){this.accessControlModel.rolesEntries.splice(i,1);break;}}this.accessControlModel._removeNodeRoles(role);},iterator:function(){return this;},start:function(sync){while(this._hasNext(this,sync)){if(this._next(this,sync)){continue;}else{break;}}},hasNext:function(){return this._hasNext(null,true);},_hasNext:function(_124e,sync){var _124f=false;var next=this.accessControlModel.rolesEntries[this.accessControlModel.rolesCursor];if(next!==null&&next!==undefined){_124f=true;}return _124f;},next:function(){return this._next(null,true);},_next:function(_1250,sync){var _1251=this._hasNext(_1250,sync);var _1252=this.accessControlModel.rolesEntries;var _1253=this.accessControlModel.rolesLoadedNodes;var ret=_1251?_1253[_1252[this.accessControlModel.rolesCursor]]:null;this.accessControlModel.rolesCursor++;return ret;},size:function(){return this.accessControlModel.rolesSizeValue;},setCursorPosition:function(_1254){this.accessControlModel.rolesCursor=_1254;},getCursorPosition:function(){return this.accessControlModel.rolesCursor;},insert:function(node,_1255){if(!this.accessControlModel.changedProperties.role){this.accessControlModel.changedProperties.role=this._getRoles();}this.accessControlModel.rolesCreatedNodes[node.getID()]=node;var _1256=this.accessControlModel.rolesEntries.length;if((!_1256)||(_1256===0)){this.accessControlModel.rolesEntries[0]=node.getID();this.accessControlModel.rolesEntries[1]=null;}else{this.accessControlModel.rolesEntries[_1256-1]=node.getID();this.accessControlModel.rolesEntries[_1256]=null;}this.accessControlModel._cacheNodeRoles(node);},_getRoles:function(){var roles={};this.setCursorPosition(0);var _1257=this.iterator();while(_1257.hasNext()){var role=_1257.next();var _1258=role.getID();roles[_1258]=_1258;}return roles;},find:function(id){return new com.ibm.mm.enabler.DeferredImpl(this,this._find,id);},_find:function(_1259,sync,id){if(id in this.accessControlModel.rolesLoadedNodes){if(_1259){_1259.finish(this.accessControlModel.rolesLoadedNodes[id],com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK);}return this.accessControlModel.rolesLoadedNodes[id];}if(id in this.accessControlModel.rolesDeletedNodes){if(_1259){_1259.finish(null,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_NOT_FOUND);}return null;}var myUrl=com.ibm.mashups.enabler.model.url.ModelUrlFactory.createModelURL(com.ibm.mashups.enabler.model.url.ModelUrlFactory.AC_URL,this);myUrl.setNodes([{value:id,isID:true}]);var _125a=new com.ibm.mm.enabler.services.ModelRestServiceRequest(myUrl,null,null,false,sync);var entry=null;var _125b={};_125b.node=null;_125a.read(dojo.hitch(this,function(type,data,xhr,args){if(type!=com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_ERROR){var node=com.ibm.mashups.enabler.xml.XPath.evaluateEntry("//atom:entry",data,this.ns);if(node){var _125c=new com.ibm.mm.enabler.ac.RoleNodeImpl(node,this);this.accessControlModel.rolesNewid=_125c.getID();this.rolesLoadedNodes[this.rolesNewid]=_125c;_125b.node=this.accessControlModel.rolesLoadedNodes[this.rolesNewid];}else{if(sync){_125b.status=com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_NOT_FOUND;}}}if(_1259){_1259.finish(_125b.node,xhr.status);}if(sync&&type==com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_ERROR){if(xhr.status!=com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_NOT_FOUND){_125b.status=xhr.status;}}}));if(_125b.status){throw new Error(dojo.string.substitute(this.modelMessages.E_COMNODE_NOTFOUND_1,[id,_125b.status]));}retVal=_125b.node;return retVal;},getMemberModel:function(_125d){if(!_125d){return null;}var id=_125d.getID();if(!id){return null;}if(this.accessControlModel.memberModel){if(this.accessControlModel.memberModel[id]){return this.accessControlModel.memberModel[id];}}this.accessControlModel._loadAheadMember(_125d,null,true);if(this.accessControlModel.memberModel[id]){return this.accessControlModel.memberModel[id];}return null;}});}if(!dojo._hasResource["com.ibm.mashups.enabler.ac.RoleModel"]){dojo._hasResource["com.ibm.mashups.enabler.ac.RoleModel"]=true;dojo.provide("com.ibm.mashups.enabler.ac.RoleModel");}if(!dojo._hasResource["com.ibm.mashups.enabler.ac.AccessControlModel_API"]){dojo._hasResource["com.ibm.mashups.enabler.ac.AccessControlModel_API"]=true;dojo.provide("com.ibm.mashups.enabler.ac.AccessControlModel_API");dojo.provide("com.ibm.mashups.enabler.ac.AccessControlModel");dojo.declare("com.ibm.mashups.enabler.ac.AccessControlModel",[com.ibm.mashups.enabler.model.Model],{isInitialized:function(){},getOwner:function(){},setOwner:function(user){},confirmSetOwner:function(user){},getRoleModel:function(){},getRoleModel:function(_125e){},confirmGetRoleModel:function(){},commit:function(){}});}if(!dojo._hasResource["com.ibm.mm.enabler.ACLinkProviderImpl"]){dojo._hasResource["com.ibm.mm.enabler.ACLinkProviderImpl"]=true;dojo.provide("com.ibm.mm.enabler.ACLinkProviderImpl");dojo.declare("com.ibm.mm.enabler.ACLinkProviderImpl",null,{constructor:function(){var _125f=com.ibm.mm.enabler.model.ServiceDocumentModel.getCollectionData(com.ibm.mm.enabler.model.ServiceDocumentModel.SERVICE_NAVIGATION);var nsf=com.ibm.mm.enabler.model.NameSpaceFactory;this.ns_acrlp=dojo.delegate(_125f.namespaces,nsf.getNameSpaces([nsf.NS_ATOM,nsf.NS_XML,nsf.NS_EXT,nsf.NS_AC,nsf.NS_CA]));this.AC_RESOURCE_ATOM_LINK="atom:link[@ext:rel='ac-resource-config']";this.AC_ROLES_ATOM_LINK="atom:link[@ext:rel='roles']";this.CA_ROLES_ATOM_LINK="atom:link[@ca:rel='roles']";this.AC_MEMBERS_ATOM_LINK="atom:link[@ac:rel='members']";},getACResourceLink:function(_1260){var _1261=null;var node=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(this.AC_RESOURCE_ATOM_LINK,_1260,this.ns_acrlp);if(node){_1261=node.getAttribute("href");}return _1261;},getACRolesLink:function(_1262){var _1263=null;var node=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(this.AC_ROLES_ATOM_LINK,_1262,this.ns_acrlp);if(node){_1263=node.getAttribute("href");}return _1263;},getCARolesLink:function(_1264){var _1265=null;var node=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(this.CA_ROLES_ATOM_LINK,_1264,this.ns_acrlp);if(node){_1265=node.getAttribute("href");}return _1265;},getACMembersLink:function(_1266){var _1267=null;var node=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(this.AC_MEMBERS_ATOM_LINK,_1266,this.ns_acrlp);if(node){_1267=node.getAttribute("href");}return _1267;}});}if(!dojo._hasResource["com.ibm.mm.enabler.ac.AccessControlModelImpl"]){dojo._hasResource["com.ibm.mm.enabler.ac.AccessControlModelImpl"]=true;dojo.provide("com.ibm.mm.enabler.ac.AccessControlModelImpl");dojo.declare("com.ibm.mm.enabler.ac.AccessControlModelImpl",[com.ibm.mashups.enabler.ac.AccessControlModel,com.ibm.mm.enabler.model.ModelImpl,com.ibm.mm.enabler.persistence.xml.IdentifiableXmlImpl,com.ibm.mm.enabler.ACLinkProviderImpl,com.ibm.mm.enabler.ConfirmableModelImpl],{constructor:function(_1268){this.mainResource=_1268;this.url=com.ibm.mashups.enabler.model.url.ModelUrlFactory.AI_URL;},_init:function(){this.initialContentsMembers=null;this.rolesLoadedNodes={};this.rolesCreatedNodes={};this.rolesDeletedNodes={};var _1269;this.roleModel=_1269;this.rolesStart=null;this.rolesNum=null;this.rolesSizeValue=9999;this.rolesEntries=[];this.rolesCursor=0;this.rolesSize=null;this.membersLoadedNodes={};this.membersCreatedNodes={};this.membersDeletedNodes={};this.membersDeletedNodesMemberIDs={};this.memberModel={};this.membersEntries={};this.membersCursor={};this.membersSize={};this.xmlDataMember={};this.initialContentsMember={};this.owner=null;this.modelMessages=dojo.i18n.getLocalization("com.ibm.mm.enabler","modelMessages");this.um=com.ibm.mashups.enabler.user.Factory.getUserModel();this.prefix="resource";this.nsf=com.ibm.mm.enabler.model.NameSpaceFactory;this.ns=this.nsf.getNameSpaces([this.nsf.NS_ATOM,this.nsf.NS_XML,this.nsf.NS_OPENSEARCH,this.nsf.NS_AC,this.nsf.NS_AI,this.nsf.NS_APP,this.nsf.NS_CA]);this.changedProperties={};},getResource:function(){return this.mainResource;},_isPageInSpace:function(){return false;},_getPossibleRoles:function(){return null;},_getRolesLink:function(){return null;},_getMembersLink:function(_126a){return null;},_getCreationRoleName:function(_126b){return null;},_getCreationResourceID:function(){return this.mainResource.getID();},_filterRole:function(node){return false;},setID:function(id){throw new Error(this.modelMessages.E_UNSUPPORTED_OP_0);},isInitialized:function(){return true;},getRoleModel:function(){if(this.roleModel===undefined){this._loadAheadRole(null,true);}return this.roleModel;},getRoleModel:function(_126c){if(this.roleModel===undefined){this._loadAheadRole(null,true);}return this.roleModel;},confirmGetRoleModel:function(){if(com.ibm.mm.enabler.AnonymousHelper.getAnonymousMode()==com.ibm.mashups.enabler.user.AnonymousMode.ANONYMOUS){return false;}return this.mainResource.hasRole(com.ibm.mashups.enabler.ac.RoleType.MANAGER);},_loadAheadRole:function(_126d,sync){var myUrl;var _126e;this.rolesEntries=[];this.rolesStart=0;this.rolesCursor=0;var _126f=this._getPossibleRoles();if((this._isPageInSpace())&&(_126f)){var i=0;for(var _1270 in _126f){if(Object.prototype.hasOwnProperty.call(_126f,_1270)){var _1271=_126f[_1270];myUrl=com.ibm.mashups.enabler.model.url.ModelUrlFactory.createModelURL(this.url,this);_126e=[{value:"collection",isID:false,subModel:com.ibm.mashups.enabler.model.url.ModelUrlFactory.SUBMODEL_ROLE},{value:this.mainResource.getID(),isID:true}];myUrl.setNodes(_126e);myUrl.setParameter("filter","type="+_1271);this.__loadAheadRole(myUrl,_126d,sync,i,_1270);i++;}}this.roleModel=new com.ibm.mm.enabler.ac.RoleModelImpl(this,this.um);}else{if(!this.rolesNextLink){var link=this._getRolesLink();if(link){myUrl=com.ibm.mashups.enabler.model.url.ModelUrlFactory.getModelURL(link,this);}else{myUrl=com.ibm.mashups.enabler.model.url.ModelUrlFactory.createModelURL(this.url,this);_126e=[{value:"collection",isID:false,subModel:com.ibm.mashups.enabler.model.url.ModelUrlFactory.SUBMODEL_ROLE},{value:this.mainResource.getID(),isID:true}];myUrl.setNodes(_126e);}}else{myUrl=com.ibm.mashups.enabler.model.url.ModelUrlFactory.getModelURL(this.rolesNextLink,this);}myUrl.setParameter("start",this.rolesPosition);if(this.url===com.ibm.mashups.enabler.model.url.ModelUrlFactory.AC_URL){myUrl.setParameter("filter","all");}if(this.strategy){for(var x in this.strategy){if(com.ibm.mm.enabler.utils.Misc.isInstanceOf(this.strategy[x],com.ibm.mm.enabler.strategy.PageLoadAheadStrategyImpl)){myUrl.setParameter("num",this.strategy[x].getInterval());break;}}}this.__loadAheadRole(myUrl,_126d,sync,null);}},__loadAheadRole:function(myUrl,_1272,sync,_1273,_1274){var _1275=new com.ibm.mm.enabler.services.ModelRestServiceRequest(myUrl,null,null,false,sync);_1273=_1273||null;_1275.read(dojo.hitch(this,function(type,data,xhr,args){if(type==com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_LOAD){var expr,nodes;if(_1273===null){if(!this.rolesSizeValue){expr="atom:feed/openSearch:totalResults";var _1276=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(expr,data,this.ns);if(_1276){this.rolesSizeValue=com.ibm.mm.enabler.utils.Dom.textContent(_1276);}}this.rolesNextLink=null;expr="atom:feed/atom:link[@rel='next']";nodes=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(expr,data,this.ns);if(nodes){this.rolesNextLink=nodes.getAttribute("href");}}nodes=com.ibm.mashups.enabler.xml.XPath.evaluateXPath("//atom:entry",data,this.ns);if(nodes.length>0){var i,c,l,node;if(_1273===null){for(i=0,c=0,l=nodes.length;i0){for(var i=0,l=nodes.length;i0){for(var i=0,l=_1293.length;i0);},_getRolesLink:function(){return this.getCARolesLink(this.mainResource.getXml());},_getMembersLink:function(_12d4){return this.getACMembersLink(_12d4);},getOwner:function(){return this.mainResource.getOwner();},getOwnerDeferred:function(){return this.mainResource.getOwnerDeferred();},setOwner:function(user){this.mainResource.setOwner(user);},confirmSetOwner:function(user){return this.mainResource.hasRole(com.ibm.mashups.enabler.ac.RoleType.MANAGER);},commit:function(){return new com.ibm.mm.enabler.DeferredOperationImpl(this,this._commit);},_commit:function(_12d5,sync){var e=com.ibm.mashups.enabler;if((typeof e.space!="undefined")&&(typeof e.space.Factory!="undefined")){var _12d6=e.space.Factory.getSpaceModel();_12d6.commit().start();}this.__commit(_12d5,sync);}});}if(!dojo._hasResource["com.ibm.mashups.enabler.ac.SpaceAccessControlModel"]){dojo._hasResource["com.ibm.mashups.enabler.ac.SpaceAccessControlModel"]=true;dojo.provide("com.ibm.mashups.enabler.ac.SpaceAccessControlModel");}if(!dojo._hasResource["com.ibm.mashups.enabler.ac.ResourceSpaceAccessControlModel_API"]){dojo._hasResource["com.ibm.mashups.enabler.ac.ResourceSpaceAccessControlModel_API"]=true;dojo.provide("com.ibm.mashups.enabler.ac.ResourceSpaceAccessControlModel_API");dojo.provide("com.ibm.mashups.enabler.ac.ResourceSpaceAccessControlModel");dojo.declare("com.ibm.mashups.enabler.ac.ResourceSpaceAccessControlModel",com.ibm.mashups.enabler.ac.SpaceAccessControlModel,{});}if(!dojo._hasResource["com.ibm.mm.enabler.ac.ResourceSpaceAccessControlModelImpl"]){dojo._hasResource["com.ibm.mm.enabler.ac.ResourceSpaceAccessControlModelImpl"]=true;dojo.provide("com.ibm.mm.enabler.ac.ResourceSpaceAccessControlModelImpl");dojo.declare("com.ibm.mm.enabler.ac.ResourceSpaceAccessControlModelImpl",[com.ibm.mashups.enabler.ac.ResourceSpaceAccessControlModel,com.ibm.mm.enabler.ac.ResourceAccessControlModelImpl],{_metaPrefix:"com.ibm.mashups.acl.role.",constructor:function(_12d7,_12d8){this.mainResource=_12d7;this.subResource=_12d8;this.url=com.ibm.mashups.enabler.model.url.ModelUrlFactory.AI_URL;this.url2=com.ibm.mashups.enabler.model.url.ModelUrlFactory.AC_URL;},_getRolesLink:function(){return this.getACRolesLink(this.mainResource.getXml());},_getResourceLink:function(){return this.getACResourceLink(this.subResource.getXml());},_getCreationRoleName:function(_12d9){return _12d9+"@"+this.subResource.getID();},_getCreationResourceID:function(){return this.subResource.getID();},_isPageInSpace:function(){return true;},_getPossibleRoles:function(){var roles={};var names=this.subResource.getMetaDataNames();for(var i=0,l=names.length;i0){this._deferreds.forEach(function(_12e7){_12e7.start(sync);},this);}else{this._finish();}}}});}if(!dojo._hasResource["com.ibm.mm.enabler.DeferredSet"]){dojo._hasResource["com.ibm.mm.enabler.DeferredSet"]=true;dojo.provide("com.ibm.mm.enabler.DeferredSet");dojo.declare("com.ibm.mm.enabler.DeferredSet",com.ibm.mm.enabler.DeferredSetImpl,{});}if(!dojo._hasResource["com.ibm.mm.enabler.layout.LayoutContainerImpl"]){dojo._hasResource["com.ibm.mm.enabler.layout.LayoutContainerImpl"]=true;dojo.provide("com.ibm.mm.enabler.layout.LayoutContainerImpl");dojo.declare("com.ibm.mm.enabler.layout.LayoutContainerImpl",[com.ibm.mashups.enabler.layout.LayoutContainer,com.ibm.mm.enabler.layout.LayoutNodeImpl,com.ibm.mashups.enabler.content.RuntimeContentProvider],{constructor:function(){this._type=com.ibm.mashups.enabler.layout.Constants.LAYOUT_CONTAINER;},_getContent:function(){return this._getLayoutModel()._getNavigationNode().getContent().start(true);},_templates:{baseMarkup:dojo.string.trim(dojo.cache("com.ibm.mm.enabler.layout","templates/LayoutContainerFragment.html","
\n ${childrenMarkup}\n
\n"))},getRuntimeContent:function(){return new com.ibm.mm.enabler.content.RuntimeContentImpl(this,this._getRuntimeMarkup);},_templateFunc:function(_12e8,sync,_12e9){var ret=null;var _12ea=this.getMetaData("css-classes");var cName=this.getMetaData("com.ibm.portal.layoutnode.localname");ret=dojo.string.substitute(this._templates.baseMarkup,{containerClass:_12ea||"",containerId:com.ibm.mm.enabler.utils.Utils.getIdFromIdentifiable(this),containerName:cName||"",childrenMarkup:_12e9||""});if(_12e8){_12e8.finish(ret,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK);}return ret;},_getRuntimeMarkup:function(_12eb,sync){var chain=new com.ibm.mm.enabler.DeferredSet();if(this._getLayoutModel().hasChildren(this)){var _12ec=this._getLayoutModel().getChildren(this);while(_12ec.hasNext()){var child=_12ec.next();var _12ed=child.getRuntimeContent().getRuntimeMarkup();chain.addDeferred(_12ed);}}var ret=null;chain.setFinishedCallback(dojo.hitch(this,function(_12ee,_12ef,args){var _12f0=args.origDf;if(_12ef==com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK){var _12f1=[];_12ee.forEach(function(item,idx,arr){this.push(item.result);},_12f1);ret=this._templateFunc(_12f0,sync,_12f1.join("\n"));}else{if(_12f0){_12f0.finish(null,_12ef);}}return ret;}),{origDf:_12eb});chain.start(sync);return ret;},getLayoutNodeType:function(){return this._type;}});}if(!dojo._hasResource["com.ibm.mashups.enabler.layout.LayoutContainer"]){dojo._hasResource["com.ibm.mashups.enabler.layout.LayoutContainer"]=true;dojo.provide("com.ibm.mashups.enabler.layout.LayoutContainer");}if(!dojo._hasResource["com.ibm.mashups.enabler.layout.LayoutControl_API"]){dojo._hasResource["com.ibm.mashups.enabler.layout.LayoutControl_API"]=true;dojo.provide("com.ibm.mashups.enabler.layout.LayoutControl_API");dojo.provide("com.ibm.mashups.enabler.layout.LayoutControl");dojo.declare("com.ibm.mashups.enabler.layout.LayoutControl",[com.ibm.mashups.enabler.layout.LayoutNode,com.ibm.mashups.enabler.ModifiableLocalized,com.ibm.mashups.enabler.content.RuntimeContentProvider],{getSkin:function(){throw new Error("Unimplemented API: com.ibm.mashups.enabler.layout.LayoutControl.getSkin");},setSkin:function(id){throw new Error("Unimplemented API: com.ibm.mashups.enabler.layout.LayoutControl.setSkin");},getWidgetBody:function(){}});}if(!dojo._hasResource["com.ibm.mm.enabler.persistence.xml.LocalizedXmlImpl"]){dojo._hasResource["com.ibm.mm.enabler.persistence.xml.LocalizedXmlImpl"]=true;dojo.provide("com.ibm.mm.enabler.persistence.xml.LocalizedXmlImpl");dojo.declare("com.ibm.mm.enabler.persistence.xml.LocalizedXmlImpl",[com.ibm.mashups.enabler.ModifiableLocalized,com.ibm.mm.enabler.ac.EffectiveAccessImpl],{constructor:function(){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;var _12f2=com.ibm.mm.enabler.model.ServiceDocumentModel.getCollectionData(com.ibm.mm.enabler.model.ServiceDocumentModel.SERVICE_NAVIGATION);var nsf=com.ibm.mm.enabler.model.NameSpaceFactory;this.li_ns=dojo.delegate(_12f2.namespaces,nsf.getNameSpaces([nsf.NS_ATOM,nsf.NS_XML]));this.enforcementHelper=com.ibm.mm.enabler.utils.APIEnforcementHelper;this.BASE_NLS_TITLE_STRING="base:nls-string";this.BASE_NLS_DESCRIPTION_STRING="base:nls-string";this.BASE_NS=this.li_ns.base;this.TITLE_ELEMENT="atom:content/*/model:title";this.TITLE=this.TITLE_ELEMENT+"/"+this.BASE_NLS_TITLE_STRING;this.DESCRIPTION_ELEMENT="atom:content/*/model:description";this.DESCRIPTION=this.DESCRIPTION_ELEMENT+"/"+this.BASE_NLS_DESCRIPTION_STRING;},_normalizeLocale:function(loc){return (dojo.isString(loc)&&loc.length>0)?loc.replace(/_/g,"-").toLowerCase():null;},getLocales:function(){this._readLocales();var _12f3=[];com.ibm.mm.enabler.utils.Misc.forIn(this._cache.titles,function(title,loc){_12f3.push(loc);});return _12f3;},getTitle:function(loc){this.enforcementHelper.enforceDefinedNotNull(loc,this.modelMessages.E_PARAM_ISNULL_OR_UNDEFINED_3,["locale",this.declaredClass,"getTitle(locale)"]);this._readLocales();var title=this._cache.titles[this._normalizeLocale(loc)];return (typeof title=="undefined")?null:title;},getTitles:function(loc){this._readLocales();var _12f4={};if(loc){var nLoc=this._normalizeLocale(loc);com.ibm.mm.enabler.utils.Misc.forIn(this._cache.titles,function(title,l){if(l.indexOf(nLoc)===0){_12f4[l]=title;}});}else{_12f4=dojo.clone(this._cache.titles);}return _12f4;},getDescription:function(loc){this.enforcementHelper.enforceDefinedNotNull(loc,this.modelMessages.E_PARAM_ISNULL_OR_UNDEFINED_3,["locale",this.declaredClass,"getDescription(locale)"]);this._readLocales();var _12f5=this._cache.descriptions[this._normalizeLocale(loc)];return (typeof _12f5=="undefined")?null:_12f5;},getDescriptions:function(loc){this._readLocales();var _12f6={};if(loc){var nLoc=this._normalizeLocale(loc);com.ibm.mm.enabler.utils.Misc.forIn(this._cache.descriptions,function(_12f7,l){if(l.indexOf(nLoc)===0){_12f6[l]=_12f7;}});}else{_12f6=dojo.clone(this._cache.descriptions);}return _12f6;},_getLang:function(node){return com.ibm.mm.enabler.utils.Dom.getAttributeWithNS(node,"xml:lang","lang",this.li_ns.xml);},_readLocales:function(){if(!this._cache){this._cache={titles:{},descriptions:{}};var _12f8=com.ibm.mashups.enabler.xml.XPath.evaluateXPath(this.TITLE,this.xmlData,this.li_ns);if(_12f8){for(var i=_12f8.length;i>0;i--){var title=_12f8[i-1];this._cache.titles[this._normalizeLocale(this._getLang(title))]=com.ibm.mm.enabler.utils.Dom.textContent(title);}}var _12f9=com.ibm.mashups.enabler.xml.XPath.evaluateXPath(this.DESCRIPTION,this.xmlData,this.li_ns);if(_12f9){for(var j=_12f9.length;j>0;j--){var _12fa=_12f9[j-1];this._cache.descriptions[this._normalizeLocale(this._getLang(_12fa))]=com.ibm.mm.enabler.utils.Dom.textContent(_12fa);}}}},setTitle:function(title,loc){this.enforcementHelper.enforceDefinedNotNull(title,this.modelMessages.E_PARAM_ISNULL_OR_UNDEFINED_3,["title",this.declaredClass,"setTitle(title, locale)"]);this.enforcementHelper.enforceDefinedNotNull(loc,this.modelMessages.E_PARAM_ISNULL_OR_UNDEFINED_3,["locale",this.declaredClass,"setTitle(title, locale)"]);if(dojo.isString(title)&&loc){if(this.getTitle(loc)==title){return;}var _12fb=com.ibm.mashups.enabler.xml.XPath.createXPath(this.TITLE_ELEMENT,this.xmlData,this.li_ns);var _12fc=com.ibm.mashups.enabler.xml.XPath.evaluateXPath(this.BASE_NLS_TITLE_STRING,_12fb,this.li_ns);var nLoc=this._normalizeLocale(loc);var _12fd=false;var i=_12fc.length;while(--i>=0){var t=_12fc[i];var lang=this._getLang(t);if(lang!==null&&this._normalizeLocale(lang)==nLoc){com.ibm.mm.enabler.utils.Dom.textContent(t,title);_12fd=true;break;}}if(!_12fd){var _12fe=this.xmlData.ownerDocument;var node=com.ibm.mm.enabler.utils.Dom.createElement(_12fe,this.BASE_NLS_TITLE_STRING,this.BASE_NS);com.ibm.mm.enabler.utils.Dom.setAttributeWithNS(_12fe,node,"xml:lang","lang",this.li_ns.xml,loc);com.ibm.mm.enabler.utils.Dom.textContent(node,title);_12fb.appendChild(node);}this._cache.titles[nLoc]=title;this._setDirty();}},confirmSetTitle:function(title,_12ff){return this.hasRole(com.ibm.mashups.enabler.ac.RoleType.EDITOR);},removeTitle:function(loc){this.enforcementHelper.enforceDefinedNotNull(loc,this.modelMessages.E_PARAM_ISNULL_OR_UNDEFINED_3,["locale",this.declaredClass,"removeTitle(locale)"]);if(loc){var _1300=com.ibm.mashups.enabler.xml.XPath.evaluateXPath(this.TITLE,this.xmlData,this.li_ns);if(_1300&&_1300.length>0){v