var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.findInternal=function(n,X,Y){n instanceof String&&(n=String(n));for(var ja=n.length,pa=0;pa<ja;pa++){var J=n[pa];if(X.call(Y,J,pa,n))return{i:pa,v:J}}return{i:-1,v:void 0}};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.SIMPLE_FROUND_POLYFILL=!1;$jscomp.ISOLATE_POLYFILLS=!1;$jscomp.FORCE_POLYFILL_PROMISE=!1;$jscomp.FORCE_POLYFILL_PROMISE_WHEN_NO_UNHANDLED_REJECTION=!1;
$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(n,X,Y){if(n==Array.prototype||n==Object.prototype)return n;n[X]=Y.value;return n};$jscomp.getGlobal=function(n){n=["object"==typeof globalThis&&globalThis,n,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var X=0;X<n.length;++X){var Y=n[X];if(Y&&Y.Math==Math)return Y}throw Error("Cannot find global object");};$jscomp.global=$jscomp.getGlobal(this);
$jscomp.IS_SYMBOL_NATIVE="function"===typeof Symbol&&"symbol"===typeof Symbol("x");$jscomp.TRUST_ES6_POLYFILLS=!$jscomp.ISOLATE_POLYFILLS||$jscomp.IS_SYMBOL_NATIVE;$jscomp.polyfills={};$jscomp.propertyToPolyfillSymbol={};$jscomp.POLYFILL_PREFIX="$jscp$";var $jscomp$lookupPolyfilledValue=function(n,X){var Y=$jscomp.propertyToPolyfillSymbol[X];if(null==Y)return n[X];Y=n[Y];return void 0!==Y?Y:n[X]};
$jscomp.polyfill=function(n,X,Y,ja){X&&($jscomp.ISOLATE_POLYFILLS?$jscomp.polyfillIsolated(n,X,Y,ja):$jscomp.polyfillUnisolated(n,X,Y,ja))};$jscomp.polyfillUnisolated=function(n,X,Y,ja){Y=$jscomp.global;n=n.split(".");for(ja=0;ja<n.length-1;ja++){var pa=n[ja];if(!(pa in Y))return;Y=Y[pa]}n=n[n.length-1];ja=Y[n];X=X(ja);X!=ja&&null!=X&&$jscomp.defineProperty(Y,n,{configurable:!0,writable:!0,value:X})};
$jscomp.polyfillIsolated=function(n,X,Y,ja){var pa=n.split(".");n=1===pa.length;ja=pa[0];ja=!n&&ja in $jscomp.polyfills?$jscomp.polyfills:$jscomp.global;for(var J=0;J<pa.length-1;J++){var wa=pa[J];if(!(wa in ja))return;ja=ja[wa]}pa=pa[pa.length-1];Y=$jscomp.IS_SYMBOL_NATIVE&&"es6"===Y?ja[pa]:null;X=X(Y);null!=X&&(n?$jscomp.defineProperty($jscomp.polyfills,pa,{configurable:!0,writable:!0,value:X}):X!==Y&&(void 0===$jscomp.propertyToPolyfillSymbol[pa]&&(Y=1E9*Math.random()>>>0,$jscomp.propertyToPolyfillSymbol[pa]=
$jscomp.IS_SYMBOL_NATIVE?$jscomp.global.Symbol(pa):$jscomp.POLYFILL_PREFIX+Y+"$"+pa),$jscomp.defineProperty(ja,$jscomp.propertyToPolyfillSymbol[pa],{configurable:!0,writable:!0,value:X})))};$jscomp.polyfill("Array.prototype.find",function(n){return n?n:function(X,Y){return $jscomp.findInternal(this,X,Y).v}},"es6","es3");$jscomp.polyfill("Object.is",function(n){return n?n:function(X,Y){return X===Y?0!==X||1/X===1/Y:X!==X&&Y!==Y}},"es6","es3");
$jscomp.polyfill("Array.prototype.includes",function(n){return n?n:function(X,Y){var ja=this;ja instanceof String&&(ja=String(ja));var pa=ja.length;Y=Y||0;for(0>Y&&(Y=Math.max(Y+pa,0));Y<pa;Y++){var J=ja[Y];if(J===X||Object.is(J,X))return!0}return!1}},"es7","es3");
$jscomp.checkStringArgs=function(n,X,Y){if(null==n)throw new TypeError("The 'this' value for String.prototype."+Y+" must not be null or undefined");if(X instanceof RegExp)throw new TypeError("First argument to String.prototype."+Y+" must not be a regular expression");return n+""};$jscomp.polyfill("String.prototype.includes",function(n){return n?n:function(X,Y){return-1!==$jscomp.checkStringArgs(this,X,"includes").indexOf(X,Y||0)}},"es6","es3");
$jscomp.arrayIteratorImpl=function(n){var X=0;return function(){return X<n.length?{done:!1,value:n[X++]}:{done:!0}}};$jscomp.arrayIterator=function(n){return{next:$jscomp.arrayIteratorImpl(n)}};$jscomp.initSymbol=function(){};
$jscomp.polyfill("Symbol",function(n){if(n)return n;var X=function(J,wa){this.$jscomp$symbol$id_=J;$jscomp.defineProperty(this,"description",{configurable:!0,writable:!0,value:wa})};X.prototype.toString=function(){return this.$jscomp$symbol$id_};var Y="jscomp_symbol_"+(1E9*Math.random()>>>0)+"_",ja=0,pa=function(J){if(this instanceof pa)throw new TypeError("Symbol is not a constructor");return new X(Y+(J||"")+"_"+ja++,J)};return pa},"es6","es3");
$jscomp.polyfill("Symbol.iterator",function(n){if(n)return n;n=Symbol("Symbol.iterator");for(var X="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),Y=0;Y<X.length;Y++){var ja=$jscomp.global[X[Y]];"function"===typeof ja&&"function"!=typeof ja.prototype[n]&&$jscomp.defineProperty(ja.prototype,n,{configurable:!0,writable:!0,value:function(){return $jscomp.iteratorPrototype($jscomp.arrayIteratorImpl(this))}})}return n},"es6",
"es3");$jscomp.iteratorPrototype=function(n){n={next:n};n[Symbol.iterator]=function(){return this};return n};$jscomp.iteratorFromArray=function(n,X){n instanceof String&&(n+="");var Y=0,ja=!1,pa={next:function(){if(!ja&&Y<n.length){var J=Y++;return{value:X(J,n[J]),done:!1}}ja=!0;return{done:!0,value:void 0}}};pa[Symbol.iterator]=function(){return pa};return pa};
$jscomp.polyfill("Array.prototype.keys",function(n){return n?n:function(){return $jscomp.iteratorFromArray(this,function(X){return X})}},"es6","es3");
(function(){function n(){this.setWidgets=function(ma){};this.getWidgets=function(){};this.removeWidget=function(ma){};this.getWidgetCount=function(){};this.setGridEventListener=function(ma){};this.setDroppableEventListener=function(ma){};this.setStaticWidgetPainter=function(ma){};this.setChangingWidgetPainter=function(ma){};this.setWidgetDefaultInfoGetter=function(ma){}}function X(){var ma,ra,T,sa,ya,Fa,Z,za,Ha={};this.setId=function(qa){ma=qa};this.getId=function(){return ma};this.setName=function(qa){ra=
qa};this.getName=function(){return ra};this.setType=function(qa){sa=qa};this.getType=function(){return sa};this.setDisplayName=function(qa){T=qa};this.getDisplayName=function(){return T};this.setX=function(qa){ya=qa};this.getX=function(){return ya};this.setY=function(qa){Fa=qa};this.getY=function(){return Fa};this.setW=function(qa){Z=qa};this.getW=function(){return Z};this.setH=function(qa){za=qa};this.getH=function(){return za};this.getExtInfo=function(){return Ha};this.setExtInfo=function(qa){Ha=
qa};this.addExtInfo=function(qa,La){Ha[qa]=La};this.fromJsonObject=function(qa){this.setId(qa.id);this.setName(qa.name);this.setDisplayName(qa.displayName);this.setType(qa.type);this.setX(qa.x);this.setY(qa.y);this.setW(qa.w);this.setH(qa.h);this.setExtInfo(qa.extInfo)};this.toJsonObject=function(){return{id:ma,name:ra,displayName:T,type:sa,x:ya,y:Fa,w:Z,h:za,extInfo:Ha}}}function Y(ma){function ra(m,B,M,R,Aa,Za,Sa){var Wa=R.id;B=R.type;if("QingReport"!==B&&"Dashboard"!==B&&"Square"!==B)Sa();else{var db=
R.x*Aa,Pa=R.y*Za;if(Pa>M)Sa();else{R=$(".qing-grid").find("[gs-id='"+Wa+"']");M=R.find(".qing-grid-item-content");R=R.find("iframe");var Ba=window.devicePixelRatio||1,Ca=R.width()*Ba,Qa=R.height()*Ba,Ya=0,Ua=0;M.offset()&&R.offset()&&(Ya=Math.abs(M.offset().left-R.offset().left),Ua=Math.abs(M.offset().top-R.offset().top));if(R&&0!=R.length)if("Square"===B){if(Ca>Qa&&2<Ca/Qa){var Ga=.9*Qa;var Ra=2*Ga}else Ra=.9*Ca,Ga=Ra/2;var b=(Ca-Ra)/2;var c=(Qa-Ga)/2;var e=new Image;e.src="data:image/png;base64, ";
e.onload=function(){m.drawImage(e,(db+Ya+5+b)*Ba,(Pa+Ua+5+c)*Ba,Ra,Ga);Sa()}}else{var l=["iframe"];html2canvas(R[0].contentDocument.body,{width:Ca,height:Qa,allowTaint:!0,useCORS:!0,logging:!1,ignoreElements:function(A){var w=A.getBoundingClientRect();return w&&(w.left>Ca||0>w.right||w.top>Qa||0>w.bottom)?!0:T(A,l)}}).then(function(A){m.drawImage(A,(db+Ya+5)*Ba,(Pa+Ua+5)*Ba);Sa()})}else Sa()}}}function T(m,B){m=$(m).prop("tagName").toLowerCase();return B.includes(m)}function sa(m){return!0}function ya(m){eb=
$(m.target).attr("gs-id");if(null===eb||void 0===eb)return null;eb=eb+"#"+(new Date).getTime();return D(eb)[0]}function Fa(m,B){m=eb;eb=null;B.setId(m);var M=B.toJsonObject();Da(M);g(M);B.setType(M.type);B.setName(M.name);B.setMinW(M.minW);B.setMaxW(M.maxW);B.setMinH(M.minH);B.setMaxH(M.maxH);B.setExtInfo(M.extInfo);var R=new X;R.fromJsonObject(M);W(R);B=$(B.getEl());ka?(M=ha(m),M=ka(Na,m,M,L)):M=void 0;B.removeClass();B.attr("title","");B.find(".qing-grid-item-content").remove();B.addClass("qing-grid-item");
B.attr("gs-id",m);m=$("<div></div>");m.addClass("qing-grid-item-content");m.append(M);B.append(m);B.children().not(".qing-grid-item-content, .ui-resizable-handle, .ui-draggable-handle").remove();u(!0)}function Z(m,B){u(!1);Ja("dropOver")}function za(m,B){u(!0);Ja("dropOut")}function Ha(m,B){hb=$(B).attr("gs-id");m=$(B);B=D(B.getAttribute("gs-id"));B.css("width","100%");B.css("height","100%");m=m.find(".qing-grid-item-content");m.children().hide();m.append(B);u(!1);Ja("resizeStart",hb)}function qa(m,
B){m=$(B);B=D(B.getAttribute("gs-id"));B.css("width","100%");B.css("height","100%");m=m.find(".qing-grid-item-content");m.find("."+B.attr("class")).remove();m.children().show();u(!0);Ja("resizeStop",hb);hb=null}function La(m,B){hb=$(B).attr("gs-id");u(!1);Ja("dragStart",B)}function Ea(m,B){u(!0);hb=null;Ja("dragStop",B)}function Va(m,B,M){ib=B;da=M;Ja("cellResize")}function Ja(m,B){setTimeout(function(){P&&(-1<["added","removed","change","cellResize"].indexOf(m)?P(Na,m,L):P(Na,m,B))})}function Da(m){var B=
m.id;if(B){for(var M,R=0;R<$a.length;R++)if($a[R].getId()===B){M=$a[R].toJsonObject();break}!M&&Xa&&(M=Xa(Na,B));M&&(!m.minW&&M.minW&&(m.minW=M.minW),!m.minH&&M.minH&&(m.minH=M.minH),!m.maxW&&M.maxW&&(m.maxW=M.maxW),!m.maxH&&M.maxH&&(m.maxH=M.maxH),!m.type&&M.type&&(m.type=M.type),!m.name&&M.name&&(m.name=M.name),!m.displayName&&M.displayName&&(m.displayName=M.displayName))}}function g(m){var B=m.id;if(B){var M;ab&&(M=ab(Na,B));M&&(m.extInfo=M)}}function u(m){var B=ma.getObject(),M=B.gridItemClass;
$("."+B.gridClass).find("."+M).each(function(){var R=$(this);R.attr("gs-id")!==hb&&(m?R.removeClass("qing-grid-disable-mouse-events"):R.addClass("qing-grid-disable-mouse-events"))})}function D(m){if(ea){var B=ha(m);m=ea(Na,m,B,L);B=m.attr("gs-w");var M=m.attr("gs-h");ib||da||(ib=F.getCellWidth(),da=F.getCellHeight());B&&M&&ib&&da&&(m.css("width",B*ib+"px"),m.css("height",M*da+"px"));return m}}function ha(m){for(var B=0;B<$a.length;B++)if($a[B].getId()===m)return $a[B]}function W(m){if(Array.isArray(m))for(var B=
0;B<m.length;B++)$a.push(m[B]);else $a.push(m)}var L=this,F,P,ka,ea,Xa,ab,bb,fb,hb,eb,ib,da,$a=[],Na;n.call(this);(function(){Na=ma.getBizId();var m={id:ma.getObject().id,gridParentClass:ma.getObject().id,gridClass:ma.getObject().gridClass,widgetItemClass:ma.getObject().gridItemClass,widgetDragCancelClass:[".workbench-div-card-content",".workbench-ctrl-common-modallayer",".sa-extra",".sa-extrafilter-popup"],column:ma.getObject().columns,minRow:ma.getObject().minRows,maxRow:ma.getObject().maxRows,
cellScale:ma.getObject().cellScale,"float":!1,marginTop:5,marginLeft:5,marginBottom:5,marginRight:5,widgetResizeHandles:"se",widgetResizeHandleAutoHide:!0,widgetDragHandleHide:!0,widgetDragHandleAutoHide:!1,funAcceptWidget:sa};F=pa.init(m);F.on("dropped",Fa);F.on("resizeStart",Ha);F.on("resizeStop",qa);F.on("dragStart",La);F.on("dragStop",Ea);F.on("dropOver",Z);F.on("dropOut",za);F.on("cellResize",Va);F.on("added",Ja);F.on("removed",Ja);F.on("change",Ja)})();this.getGridOption=function(){return ma};
this.destroy=function(){F.destroy()};this.setWidgets=function(m){W(m);for(var B=[],M=0;M<m.length;M++){var R=m[M],Aa={id:R.getId(),x:R.getX(),y:R.getY(),w:R.getW(),h:R.getH()};if(R=Xa&&Xa(Na,R.getId(),R))Aa.name=R.name,Aa.displayName=R.displayName,Aa.type=R.type,Aa.minW=R.minW,Aa.maxW=R.maxW,Aa.minH=R.minH,Aa.maxH=R.maxH;B.push(Aa)}F.load(B,!0);for(M=0;M<m.length;M++)R=m[M],B=R.getId(),R={content:ka&&ka(Na,B,R,L)},F.updateWidget(B,R)};this.getWidgets=function(){for(var m=[],B=F.save(),M=0;M<B.length;M++){var R=
B[M];if(R.id){Da(R);g(R);var Aa=new X;Aa.fromJsonObject(R);m.push(Aa)}}return m};this.addWidget=function(m){W(m);var B={id:m.getId(),w:m.getW(),h:m.getH(),name:m.getName(),displayName:m.getDisplayName(),type:m.getType()};B=F.loadOne(B);var M=m.getId();m={content:ka&&ka(Na,M,m,L)};F.updateWidget(M,m);m=($(B).attr("gs-y")||0)*F.getCellHeight();$("."+ma.getObject().gridClass).parent().scrollTop(m)};this.getWidgetById=function(m){for(var B=F.save(),M=0;M<B.length;M++){var R=B[M];if(R.id===m)return Da(R),
g(R),m=new X,m.fromJsonObject(R),m}return null};this.removeWidget=function(m){var B=F.removeWidgetById(m);if(B)for(var M=0;M<$a.length;M++)if($a[M].getId()===m){$a.splice(M,1);break}return B};this.getWidgetCount=function(){return F.getWidgetCount()};this.updateWidgetName=function(m,B){F.updateWidget(m,{name:B})};this.updateWidgetDisplayName=function(m,B){F.updateWidget(m,{displayName:B});(m=ha(m))&&m.setDisplayName(B)};this.updateWidgetId=function(m,B){F.updateWidget(m,{id:B});$(".qing-grid").find("[gs-id='"+
m+"']").attr("gs-id",B)};this.setGridEventListener=function(m){P=m};this.setStaticWidgetPainter=function(m){ka=m};this.setChangingWidgetPainter=function(m){ea=m};this.setWidgetDefaultInfoGetter=function(m){Xa=m};this.setWidgetExtInfoGetter=function(m){ab=m};this.setDroppableEventListener=function(m){bb=m};this.setDraggableEventListener=function(m){fb=m};this.setupDragIn=function(m){m=$("."+m);var B=ma.getObject().gridDragInClass,M=new wa;M.setAppendTo("body");M.setShowDragHandle(!1);M.setHelperCreator(ya);
M.setFunDragStart(function(R){fb&&fb(Na,"dragStart",R.target)});M.setFunDragStop(function(R){fb&&fb(Na,"dragStop",R.target)});F.setupDragIn(B,M,m[0])};this.setupDragInWithoutEvent=function(m,B,M,R){m=$("."+m).filter(function(){return 0!==$(this).width()&&0!==$(this).height()});B="."+B;var Aa=new wa;Aa.setAppendTo("body");Aa.setShowDragHandle(!1);Aa.setHelperCreator(ya);M&&Aa.setFunDragStart(M);R&&Aa.setFunDragStop(R);F.setupDragIn(B,Aa,m[0])};this.setupDroppable=function(m,B){var M=new J;M.setAccept(function(R){return bb&&
bb(Na,"dropCheck",R)});M.setFunDropped(function(R,Aa){Aa&&$(Aa).hasClass(ma.getObject().gridItemClass)&&F.removeDraggingHelper();bb&&bb(Na,"dropped",Aa)});M.setFunDropOver(function(R,Aa){Aa&&$(Aa).hasClass(ma.getObject().gridItemClass)&&F.createDraggingHelper(function(Za,Sa){Za=D(Za);if(Sa){var Wa=$(Sa).css("width");Za.css("width",Wa);Sa=$(Sa).css("height");Za.css("height",Sa)}return Za[0]});bb&&bb(Na,"dropOver",Aa)});M.setFunDropOut(function(R,Aa){Aa&&$(Aa).hasClass(ma.getObject().gridItemClass)&&
F.resetDraggingHelper();bb&&bb(Na,"dropOut",Aa)});F.setupDroppable("."+m,M,B)};this.screenShot=function(m){function B(){Qa++;if(Qa>=Ya){var Ga=Wa,Ra=window.devicePixelRatio||1,b=640*Ra;Ra*=360;var c=aa.createCanvas(),e=aa.createContext2d(c,b,Ra),l=Ga.width,A=Ga.height;e.fillStyle="#E2E7EF";e.fillRect(0,0,c.width,c.height);e.drawImage(Ga,0,0,l,A,0,0,b,Ra);Ga=c.toDataURL("image/jpeg",.8);m&&m(Ga)}}var M=ma.getObject(),R=$("."+M.id),Aa=R.find("."+M.gridClass);R=R.width();var Za=R/M.columns,Sa=Za*M.cellScale;
M=window.devicePixelRatio||1;var Wa=aa.createCanvas(),db=R*M,Pa=9*R/16*M,Ba=aa.createContext2d(Wa,db,Pa),Ca=F.save(),Qa=0,Ya=Ca.length,Ua=["iframe"];html2canvas(Aa[0],{width:db,height:Pa,logging:!1,ignoreElements:function(Ga){return T(Ga,Ua)}}).then(function(Ga){if(Ga&&(0!==Ga.width||0!==Ga.height))for(Ba.drawImage(Ga,0,0),Ga=0;Ga<Ca.length;Ga++){var Ra=Ca[Ga];try{ra(Ba,db,Pa,Ra,Za,Sa,B)}catch(b){console.log(b),B()}}})}}"undefined"==typeof com&&(com={});"undefined"==typeof com.kingdee&&(com.kingdee=
{});"undefined"==typeof com.kingdee.bos&&(com.kingdee.bos={});"undefined"==typeof com.kingdee.bos.qing&&(com.kingdee.bos.qing={});"undefined"==typeof com.kingdee.bos.qing.workbench&&(com.kingdee.bos.qing.workbench={});var ja=com.kingdee.bos.qing.workbench;ja.GridOption=function(){var ma,ra,T,sa=15,ya=16,Fa=240,Z=.9,za="qing-grid",Ha="qing-grid-item",qa="qing-grid-item";this.getBizId=function(){return ma};this.setBizId=function(La){ma=La};this.getBizName=function(){return ra};this.setBizName=function(La){ra=
La};this.setGridId=function(La){T=La};this.setGridColumnRowNumber=function(La,Ea,Va){sa=La;ya=Ea;Fa=Va};this.getGridColumns=function(){return sa};this.getGridRows=function(){return Fa};this.setGridCellScale=function(La){Z=La};this.setGridClass=function(La,Ea,Va){za=La;Ha=Ea;qa=Va};this.getObject=function(){return{id:T,bizId:ma,bizName:ra,columns:sa,minRows:ya,maxRows:Fa,cellScale:Z,gridClass:za,gridItemClass:Ha,gridDragInClass:qa}}};ja.GridWidget=X;ja.QingGrid=Y;var pa,J,wa,aa;(function(){var ma=
com.kingdee.bos.qing.ui.grid;pa=ma.QingGridFramework;ma=com.kingdee.bos.qing.ui.grid.model;J=ma.QingGridDroppableOptions;wa=ma.QingGridDraggableOptions;ma=com.kingdee.bos.qing.common;aa=ma.CanvasUtil})();Y.DEFAULT_GRID_CLASS="qing-grid";Y.DEFAULT_GRID_WIDGET_CLASS="qing-grid-item";Y.DEFAULT_GRID_WIDGET_CONTENT_CLASS="qing-grid-item-content";Y.DEFAULT_GRID_DRAG_IN_CLASS="qing-grid-draggable"})();(function(){function n(){var g,u,D,ha,W;this.setParentNode=function(L){g=L};this.getParentNode=function(){return g};this.setDirectoryType=function(L){ha=L};this.getDirectoryType=function(){return ha};this.setHidden=function(L){u=L};this.isHidden=function(){return u};this.setPreset=function(L){D=L};this.isPreset=function(){return D};this.setSearch=function(L){W=L};this.isSearch=function(){return W};this.getSubNodeLevel=function(){for(var L=0,F=g;F;)L++,F=F.getParentNode();return L}}function X(){n.call(this);
var g=this,u,D,ha,W;this.getSource=function(){return u};this.setSource=function(L){u=L};this.getId=function(){return D};this.setId=function(L){D=L};this.getName=function(){return ha};this.setName=function(L){ha=L};this.setRefType=function(L){W=L};this.getRefType=function(){return W};this.fromJsonObject=function(L){g.setSource(L.source);g.setId(L.id);g.setName(L.name);g.setPreset(L.isPreset);g.setRefType(L.refType)};this.toJsonObject=function(){var L={};L.source=u;L.id=D;L.name=ha;L.refType=W;L.type=
g.getDirectoryType();L.isPreset=g.isPreset();return L}}function Y(){n.call(this);var g=this,u,D=[],ha,W=0;this.setGroupName=function(L){u=L};this.getGroupName=function(){return u};this.getChildren=function(){return D};this.setChildren=function(L){D=L};this.setOpenDir=function(L){ha=L};this.isOpenDir=function(){return ha};this.addSearchedNumber=function(){W+=1};this.getSearchedNumber=function(){return W};this.clearSearchNumber=function(){W=0};this.fromJsonObject=function(L){var F=L.groupName;"c81a0135-1157-41a4-8e08-de55179916c1"==
L.groupId&&"\u6211\u7684\u8f7b\u5206\u6790"==F?g.setGroupName(Va.get("myQingCenter",F)):g.setGroupName(F);g.setOpenDir(!0);var P=L.children;if(P)for(F=0;F<P.length;F++){var ka=new Y;ka.setDirectoryType(g.getDirectoryType());ka.fromJsonObject(P[F]);ka.setParentNode(g);D.push(ka)}if(P=L.publishedList)for(F=0;F<P.length;F++)if(L=P[F])ka=Ea.LeafNodeFactory.createLeafNode(g.getDirectoryType()),ka.fromJsonObject(L),ka.setParentNode(g),ka.setDirectoryType(g.getDirectoryType()),D.push(ka)}}function ja(){X.call(this);
var g=this,u;this.getScene=function(){switch(g.getSource()){case Da.DASHBOARD:var D=aa.WidgetType_Dashboard;break;case Da.REPORT:case Da.EXTREPORT:D=aa.WidgetType_QingReport;break;case Da.BILL:case Da.SUBJECT:case Da.CONTROL:D=aa.WidgetType_Square;break;default:throw Error("do not support this type!");}return D};this.getSchemaId=function(){return u};this.setSchemaId=function(D){u=D};this.fromJsonObject=function(D){g.setId(D.id);g.setSource(D.source);g.setName(D.name);g.setSchemaId(D.schemaId);g.setRefType(D.refType);
g.setPreset(D.isPreset)};this.toJsonObject=function(){var D={};D.id=g.getId();D.source=g.getSource();D.name=g.getName();D.schemaId=u;D.refType=g.getRefType();D.type=g.getDirectoryType();D.isPreset=g.isPreset();return D}}function pa(){X.call(this);var g=this;this.getScene=function(){switch(g.getSource()){case Da.DASHBOARD:var u=aa.WidgetType_Dashboard;break;case Da.REPORT:case Da.EXTREPORT:u=aa.WidgetType_QingReport;break;case Da.BILL:case Da.SUBJECT:case Da.CONTROL:u=aa.WidgetType_Longer;break;default:throw Error("do not support this type!");
}return u}}function J(){X.call(this);var g=this,u,D;this.setCatalogId=function(W){u=W};this.getCatalogId=function(){return u};this.setNumber=function(W){D=W};this.getNumber=function(){return D};this.getScene=function(){return aa.WidgetType_Metrics};var ha=g.fromJsonObject;this.fromJsonObject=function(W){ha(W);g.setSource(W.source);g.setId(W.id);g.setName(W.name);g.setPreset(W.isPreset);g.setCatalogId(W.catalogId);g.setNumber(W.number);g.setName(W.metricName)};this.toJsonObject=function(){var W={};
W.id=g.getId();W.catalogId=u;W.number=D;W.metricName=g.getName();W.source=g.getSource();W.type=g.getDirectoryType();return W}}function wa(){var g=this,u,D,ha,W,L;this.getWorkbenchId=function(){return u};this.setWorkbenchId=function(F){u=F};this.getWorkbenchName=function(){return D};this.setWorkbenchName=function(F){D=F};this.getImagePath=function(){return ha};this.setImagePath=function(F){ha=F};this.isPreset=function(){return W};this.setPreset=function(F){W=F};this.isDefault=function(){return L};
this.setDefault=function(F){L=F};this.fromJsonObject=function(F){g.setWorkbenchId(F.workbenchId);g.setWorkbenchName(F.workbenchName);g.setImagePath(F.imagePath);g.setPreset(F.isPreset);g.setDefault(F.isDefault)};this.toJsonObject=function(){var F={};F.workbenchId=u;F.workbenchName=D;F.imagePath=ha;F.isPreset=W;F.isDefault=L;return F};this.toPinBarJsonObject=function(){var F={};F.refId=u;F.publishName=D;F.publishSourceType=wa.Constants.PIN_TAB_SOURCE_WORKBENCH;F.publishTargetType=wa.Constants.PIN_TAB_TYPE_WORKBENCH;
return F};this.fromPinBarJsonObject=function(F){g.setId(F.refId);g.setName(F.publishName);g.setItemOrder(F.itemOrder)}}function aa(){var g;this.getPage=function(){return g};this.setPage=function(u){g=u};this.toJsonObject=function(){var u={};u.page=g.toJsonObject();return u};this.fromJsonObject=function(u){u=u.page;g=new sa;g.fromJsonObject(u)}}function ma(){var g=this,u,D,ha,W,L,F;this.getWidgetTypeName=function(){throw Error("Override me");};this.getName=function(){return u};this.setName=function(P){u=
P};this.getDisplayName=function(){return D};this.setDisplayName=function(P){D=P};this.getX=function(){return ha};this.setX=function(P){ha=P};this.getY=function(){return W};this.setY=function(P){W=P};this.getWidth=function(){return L};this.setWidth=function(P){L=P};this.getHeight=function(){return F};this.setHeight=function(P){F=P};this.toJsonObject=function(){var P={};P.widgetType=g.getWidgetTypeName();P.name=u;P.displayName=D;P.x=ha;P.y=W;P.width=L;P.height=F;g.protectedToJsonObject(P);return P};
this.fromJsonObject=function(P){u=P.name;D=P.displayName;ha=P.x;W=P.y;L=P.width;F=P.height;g.protectedFromJsonObject(P)};this.protectedToJsonObject=function(P){throw Error("Override");};this.protectedFromJsonObject=function(P){throw Error("Override");};this.protectedMethod={}}function ra(){ma.call(this);var g=this,u=[];this.getWidgets=function(){return u};this.addWidget=function(D){u.push(D)};this.removeWidget=function(D){for(var ha=0;ha<u.length;ha++)u[ha]==D&&u.splice(ha,1);return-1};this.protectedMethod.containerToJsonObject=
function(D){for(var ha=[],W=0;W<u.length;W++){var L=u[W].toJsonObject();ha.push(L)}D.widgets=ha};this.protectedMethod.containerFromJsonObject=function(D){D=D.widgets;for(var ha=0;ha<D.length;ha++){var W=D[ha],L=Ea.WorkbenchUtil.createWidgetModel(W.widgetType);L.fromJsonObject(W);g.addWidget(L)}}}function T(){var g;this.setReferenceCustomMap=function(u){g=u};this.getReferenceCustomMap=function(){return g};this.protectedMethod.referableToJsonObject=function(u){u.ref=g};this.protectedMethod.referableFromJsonObject=
function(u){g=u.ref}}function sa(){ra.call(this);var g=this.protectedMethod;this.getWidgetTypeName=function(){return aa.WidgetType_Page};this.protectedToJsonObject=function(u){g.containerToJsonObject(u)};this.protectedFromJsonObject=function(u){g.containerFromJsonObject(u)}}function ya(){ma.call(this);T.call(this);var g=this.protectedMethod;this.getWidgetTypeName=function(){return aa.WidgetType_Square};this.protectedToJsonObject=function(u){g.referableToJsonObject(u)};this.protectedFromJsonObject=
function(u){g.referableFromJsonObject(u)}}function Fa(){ma.call(this);T.call(this);var g=this.protectedMethod;this.getWidgetTypeName=function(){return aa.WidgetType_Longer};this.protectedToJsonObject=function(u){g.referableToJsonObject(u)};this.protectedFromJsonObject=function(u){g.referableFromJsonObject(u)}}function Z(){ma.call(this);T.call(this);var g=this.protectedMethod;this.getWidgetTypeName=function(){return aa.WidgetType_Dashboard};this.protectedToJsonObject=function(u){g.referableToJsonObject(u)};
this.protectedFromJsonObject=function(u){g.referableFromJsonObject(u)}}function za(){ma.call(this);T.call(this);var g=this.protectedMethod;this.getWidgetTypeName=function(){return aa.WidgetType_QingReport};this.protectedToJsonObject=function(u){g.referableToJsonObject(u)};this.protectedFromJsonObject=function(u){g.referableFromJsonObject(u)}}function Ha(){ma.call(this);T.call(this);var g=this.protectedMethod;this.getWidgetTypeName=function(){return aa.WidgetType_Metrics};this.protectedToJsonObject=
function(u){g.referableToJsonObject(u)};this.protectedFromJsonObject=function(u){g.referableFromJsonObject(u)}}function qa(){var g,u,D,ha,W,L;this.setRefId=function(F){g=F};this.getRefId=function(){return g};this.setName=function(F){u=F};this.getName=function(){return u};this.setSourceType=function(F){D=F};this.getSourceType=function(){return D};this.setPathType=function(F){ha=F};this.getPathType=function(){return ha};this.setItemOrder=function(F){W=F};this.getItemOrder=function(){return W};this.getStatus=
function(){return L};this.setStatus=function(F){L=F};this.toJsonObject=function(){var F={};F.refId=g;F.name=u;F.sourceType=D;F.pathType=ha;F.status=L;return F};this.fromJsonObject=function(F){g=F.refId;u=F.name;D=F.sourceType;ha=F.pathType;W=F.itemOrder;L=F.status}}function La(){var g,u,D,ha,W,L={},F,P,ka;this.setWorkbenchId=function(ea){g=ea};this.getWorkbenchId=function(){return g};this.setBizId=function(ea){u=ea};this.getBizId=function(){return u};this.setBizName=function(ea){ha=ea};this.getBizName=
function(){return ha};this.setBizType=function(ea){D=ea};this.getBizType=function(){return D};this.setRef=function(ea){W=ea};this.getRef=function(){return W};this.addInfo=function(ea,Xa){L[ea]=Xa};this.setInfo=function(ea){L=ea};this.getInfo=function(){return L};this.setJsonModelBook=function(ea){F=ea};this.getJsonModelBook=function(){return F};this.setErrorCode=function(ea){P=ea};this.getErrorCode=function(){return P};this.setErrorMessage=function(ea){ka=ea};this.getErrorMessage=function(){return ka};
this.toJsonObject=function(){var ea={};ea.workbenchId=g;ea.bizId=u;ea.bizName=ha;ea.bizType=D;ea.ref=W;ea.info=L;ea.jsonModelBook=F;ea.errorCode=P;ea.errorMessage=ka;return ea};this.clone=function(){var ea=new La;ea.setWorkbenchId(g);ea.setBizId(u);ea.setBizType(D);ea.setBizName(ha);ea.setJsonModelBook(F);ea.setErrorCode(P);ea.setErrorMessage(ka);var Xa={},ab;for(ab in W)Xa[ab]=W[ab];ea.setRef(Xa);Xa={};for(ab in L)Xa[ab]=L[ab];ea.setInfo(Xa);return ea}}"undefined"==typeof com&&(com={});"undefined"==
typeof com.kingdee&&(com.kingdee={});"undefined"==typeof com.kingdee.bos&&(com.kingdee.bos={});"undefined"==typeof com.kingdee.bos.qing&&(com.kingdee.bos.qing={});"undefined"==typeof com.kingdee.bos.qing.workbench&&(com.kingdee.bos.qing.workbench={});"undefined"==typeof com.kingdee.bos.qing.workbench.model&&(com.kingdee.bos.qing.workbench.model={});var Ea=com.kingdee.bos.qing.workbench.model,Va;Ea.MenuNode=function(g){var u=[];this.getChildren=function(){return u};this.fromJsonObject=function(D){if(D=
D.children)for(var ha=0;ha<D.length;ha++){var W=new Y;W.setDirectoryType(g);W.fromJsonObject(D[ha]);u.push(W)}}};Ea.MenuFolderNode=Y;Ea.CardLeafNode=ja;Ea.CenterLeafNode=pa;Ea.DropdownOption=function(g,u){this.getDisplayName=function(){return g};this.getValue=function(){return u}};Ea.Workbench=wa;Ea.WorkbenchUtil=new function(){this.convertLeafNodeToPinBarItem=function(g){var u=new qa;u.setRefId(g.getId());u.setName(g.getName());u.setSourceType(g.getSource());u.setPathType(g.getDirectoryType());return u};
this.convertWorkbenchToPinBarItem=function(g){var u=new qa;u.setRefId(g.getWorkbenchId());u.setName(g.getWorkbenchName());u.setSourceType(wa.Constants.PIN_TAB_SOURCE_WORKBENCH);u.setPathType(wa.Constants.PIN_TAB_TYPE_WORKBENCH);return u};this.convertPinBarItemToWorkbench=function(g){var u=new wa;u.setWorkbenchId(g.getRefId());u.setWorkbenchName(g.getName());return u};this.convertPinBarItemToLeafNode=function(g){var u=Ja.QINGCENTER===g.getPathType()||Ja.APPMENU===g.getPathType()?new pa:Ja.METRICLIBRARY===
g.getPathType()?new J:new ja;u.setId(g.getRefId());u.setName(g.getName());u.setSource(g.getSourceType());u.setDirectoryType(g.getPathType());return u};this.createWidgetModel=function(g){if(g===aa.WidgetType_Page)return new sa;if(g===aa.WidgetType_Square)return new ya;if(g===aa.WidgetType_Longer)return new Fa;if(g===aa.WidgetType_Dashboard)return new Z;if(g===aa.WidgetType_QingReport)return new za;if(g===aa.WidgetType_Metrics)return new Ha}};Ea.WorkbenchModel=aa;Ea.Page=sa;Ea.WidgetSquare=ya;Ea.WidgetLonger=
Fa;Ea.WidgetDashboard=Z;Ea.WidgetQingReport=za;Ea.WidgetMetric=Ha;Ea.SchemaContext=function(){var g,u,D,ha;this.setCurrentSchemaId=function(W){g=W};this.getCurrentSchemaId=function(){return g};this.setCurrentSchemaName=function(W){u=W};this.getCurrentSchemaName=function(){return u};this.getCurrentSchemaType=function(){return D};this.setCurrentSchemaType=function(W){D=W};this.setSelectedSchemaName=function(W){ha=W};this.getSelectedSchemaName=function(){return ha}};Ea.PinTabBarItem=qa;Ea.LeafNodeFactory=
new function(){var g={};this.createLeafNode=function(u){if(u=g[u])return new u;throw Error("unknown sScene");};this.register=function(u,D){g[u]=D}};Ea.WorkbenchGptModel=La;Ea.RefType={CARD:"card",SUBJECT:"subject",CARD_DSB:"card_dsb",QINGCENTER_QING:"qingcenter_qing",QINGCENTER_RPT:"qingcenter_rpt",QINGCENTER_DSB:"qingcenter_dsb",APPMENU_QING:"appmenu_qing",APPMENU_RPT:"appmenu_rpt",APPMENU_DSB:"appmenu_dsb",METRIC_LIBRARY:"metric_library"};var Ja={APPMENU:1,CARDLIBRARY:2,QINGCENTER:3,METRICLIBRARY:4,
WORKBENCH:5};Ea.RefPathType=Ja;var Da={SUBJECT:"subject",BILL:"bill",DASHBOARD:"dashboard",REPORT:"report",CONTROL:"control",EXTREPORT:"extreport"};(function(){var g=com.kingdee.bos.qing.framework.common;console.log("NS:",Ea);Va=g.MultilanguageManager.createPackageAccessor(Ea)})();Ea.LeafNodeFactory.register(Ja.APPMENU,pa);Ea.LeafNodeFactory.register(Ja.CARDLIBRARY,ja);Ea.LeafNodeFactory.register(Ja.QINGCENTER,pa);Ea.LeafNodeFactory.register(Ja.METRICLIBRARY,J);wa.Constants={PIN_TAB_SOURCE_WORKBENCH:"workbench",
PIN_TAB_TYPE_WORKBENCH:5};aa.WidgetType_Page="Page";aa.WidgetType_Square="Square";aa.WidgetType_Longer="LongPainting";aa.WidgetType_Dashboard="Dashboard";aa.WidgetType_QingReport="QingReport";aa.WidgetType_Metrics="Metrics";qa.status={deleted:"deleted",noPermission:"noPermission"}})();(function(){"undefined"==typeof com&&(com={});"undefined"==typeof com.kingdee&&(com.kingdee={});"undefined"==typeof com.kingdee.bos&&(com.kingdee.bos={});"undefined"==typeof com.kingdee.bos.qing&&(com.kingdee.bos.qing={});"undefined"==typeof com.kingdee.bos.qing.workbench&&(com.kingdee.bos.qing.workbench={});"undefined"==typeof com.kingdee.bos.qing.workbench.common&&(com.kingdee.bos.qing.workbench.common={});var n=com.kingdee.bos.qing.workbench.common;n.Facade=function(J,wa,aa,ma){X.call(this,J,wa,
aa,ma);var ra=this.protectedMethod;this.loadWorkbenchGroupPublished=function(T,sa,ya,Fa){ra.remote("loadWorkbenchGroupPublished",{publishTargetType:T,isPresetPublish:sa,directoryGroup:ya,systemId:Fa})};this.pinTabBarList=function(T){T={pinTabBarList:JSON.stringify(T)};ra.remote("pinTabBarList",T)};this.loadPinTabBarList=function(){ra.remote("loadPinTabBarList",{})};this.loadWorkbenches=function(){ra.remote("loadWorkbenches",{})};this.saveOrUpdateWorkbench=function(T){T={workbench:JSON.stringify(T)};
ra.remote("saveOrUpdateWorkbench",T)};this.deleteWorkbench=function(T){ra.remote("deleteWorkbench",{workbenchID:T})};this.setDefaultWorkbench=function(T){T={workbench:JSON.stringify(T)};ra.remote("setDefaultWorkbench",T)};this.saveWorkbenchModel=function(T,sa){T={workbenchID:T,model:JSON.stringify(sa)};ra.remote("saveWorkbenchModel",T)};this.loadWorkbenchModel=function(T){ra.remote("loadWorkbenchModel",{workbenchID:T})};this.saveSchema=function(T,sa,ya){T={workbenchID:T,ref:JSON.stringify(sa),model:JSON.stringify(ya)};
ra.remote("saveSchema",T)};this.saveOriginalSchema=function(T,sa,ya){T={workbenchID:T,ref:JSON.stringify(sa),model:JSON.stringify(ya)};ra.remote("saveOriginalSchema",T)};this.getPublishSchema=function(T,sa){ra.remote("getPublishSchema",{workbenchID:T,publishId:sa})};this.getPublishReferenceMap=function(T,sa,ya,Fa){ra.remote("getPublishReferenceMap",{refToId:T,schemaId:sa,workbenchID:Fa,publishType:ya})};this.loadSchema=function(T,sa){T={workbenchID:T,ref:JSON.stringify(sa)};ra.remote("loadSchema",
T)};this.updateWorkbenchThumbnail=function(T,sa){ra.remote("updateWorkbenchThumbnail",{workbenchID:T,thumbnailFileName:sa})};this.deleteWorkbenchThumbnail=function(T){ra.remote("deleteWorkbenchThumbnail",{workbenchID:T})};this.resetSchema=function(T,sa){T={workbenchID:T,ref:JSON.stringify(sa)};ra.remote("resetSchema",T)};this.checkLicenseForPublish=function(T){ra.remote("checkLicenseForPublish",{publishId:T})};this.getReferenceMap=function(T,sa){ra.remote("getReferenceMap",{refToId:T,refType:sa})};
this.loadMetricSystems=function(){ra.remote("loadMetricSystems",{})};this.loadWorkbenchCard=function(T,sa){T={workbenchID:T,ref:JSON.stringify(sa)};ra.remote("loadWorkbenchCard",T)};this.checkPermission=function(T){ra.remote("checkPermission",{bizId:T})}};n.RemoteImpl=function(){Y.call(this);var J,wa;this.getRemoteUrl=function(aa){aa.tag=wa;return J};this.setRemoteUrl=function(aa){J=aa};this.setTag=function(aa){wa=aa}};n.AbstractDroppableHandler=function(){this.getDroppableAreaClassName=function(J){throw Error("override me");
};this.dropOverHandler=function(J){throw Error("override me");};this.dropOutHandler=function(J){throw Error("override me");};this.droppedHandler=function(J){throw Error("override me");}};n.AbstractWorkbenchHandler=function(){this.getWorkbenchId=function(){throw Error("override me");};this.addWidgetFromGpt=function(J){throw Error("override me");};this.getWorkbenchGptModelByWidgetId=function(J){throw Error("override me");};this.getWorkbenchGptModelByRefUid=function(){throw Error("override me");};this.setupGptSquareDragIn=
function(J,wa){throw Error("override me");}};n.AbstractMetricHelper=function(){this.getMetricReferenceMap=function(J,wa,aa){throw Error("override me");};this.getMetricSquareEntrance=function(J){throw Error("override me");}};var X,Y,ja,pa;(function(){var J=com.kingdee.bos.qing.framework.common;Y=J.AbstractRemoteCall;X=J.AbstractFacade;ja=J.FileUploader;pa=J.RemoteFrameworkRegister})();n.Integration=new function(){var J={staticWidgetPainter:null,changingWidgetPainter:null,widgetDefaultInfoGetter:null,
widgetExtInfoGetter:null,gridEventListener:null,menuChangeListener:null},wa,aa,ma,ra,T,sa,ya;this.setStaticWidgetPainter=function(Z){J.staticWidgetPainter=Z};this.fireStaticWidgetPainter=function(Z,za,Ha,qa){if(J.staticWidgetPainter)return J.staticWidgetPainter(Z,za,Ha,qa)};this.setChangingWidgetPainter=function(Z){J.changingWidgetPainter=Z};this.fireChangingWidgetPainter=function(Z,za,Ha,qa){if(J.changingWidgetPainter)return J.changingWidgetPainter(Z,za,Ha,qa)};this.setWidgetDefaultInfoGetter=function(Z){J.widgetDefaultInfoGetter=
Z};this.fireWidgetDefaultInfoGetter=function(Z,za,Ha){if(J.widgetDefaultInfoGetter)return J.widgetDefaultInfoGetter(Z,za,Ha)};this.setWidgetExtInfoGetter=function(Z){J.widgetExtInfoGetter=Z};this.fireWidgetExtInfoGetter=function(Z,za,Ha){if(J.widgetExtInfoGetter)return J.widgetExtInfoGetter(Z,za,Ha)};this.setGridEventListener=function(Z){J.gridEventListener=Z};this.fireGridEventListener=function(Z,za,Ha){if(J.gridEventListener)return J.gridEventListener(Z,za,Ha)};this.setMenuChangeListener=function(Z){J.menuChangeListener=
Z};this.fireMenuChangeListener=function(){if(J.menuChangeListener)return J.menuChangeListener()};var Fa={droppableEventListener:null,draggableEventListener:null,getWorkbenchGptModelByWidgetIdHandler:null,getWorkbenchGptModelByRefUidHandler:null,addWidgetFromGptGridListener:null};this.setDroppableEventListener=function(Z){Fa.droppableEventListener=Z};this.fireDroppableEventListener=function(Z,za,Ha){if(Fa.droppableEventListener)return Fa.droppableEventListener(Z,za,Ha)};this.setDraggableEventListener=
function(Z){Fa.draggableEventListener=Z};this.fireDraggableEventListener=function(Z,za,Ha){if(Fa.draggableEventListener)return Fa.draggableEventListener(Z,za,Ha)};this.setGetWorkbenchGptModelByWidgetIdHandler=function(Z){Fa.getWorkbenchGptModelByWidgetIdHandler=Z};this.fireGetWorkbenchGptModelByWidgetIdHandler=function(Z,za){if(Fa.getWorkbenchGptModelByWidgetIdHandler)return Fa.getWorkbenchGptModelByWidgetIdHandler(Z,za)};this.setGetWorkbenchGptModelByRefUidHandler=function(Z){Fa.getWorkbenchGptModelByRefUidHandler=
Z};this.fireGetWorkbenchGptModelByRefUidHandler=function(Z,za){if(Fa.getWorkbenchGptModelByRefUidHandler)return Fa.getWorkbenchGptModelByRefUidHandler(Z,za)};this.setAddWidgetFromGptListener=function(Z){J.addWidgetFromGptListener=Z};this.fireAddWidgetFromGptListener=function(Z,za){if(J.addWidgetFromGptListener)return J.addWidgetFromGptListener(Z,za)};this.setFunMessageBoxPainter=function(Z){wa=Z};this.createMessageBoxUi=function(Z){wa&&wa(Z)};this.setFunGetOpenAnalysisUrl=function(Z){aa=Z};this.getOpenAnalysisUrl=
function(Z,za,Ha,qa,La){return aa&&aa(Z,za,Ha,qa,La)};this.setLinkageRemoteURL=function(Z){ya=Z};this.getLinkageRemoteURL=function(){return ya};this.getWorkbenchRemoteUrl=function(){return ma};this.setWorkbenchRemoteUrl=function(Z){ma=Z};this.getCoreRemoteUrl=function(){return ra};this.setCoreRemoteUrl=function(Z){ra=Z};this.getDsbIFrameUrl=function(Z){return T&&T(Z)};this.setFunGetDsbIFrameUrl=function(Z){T=Z};this.getReportIFrameUrl=function(Z,za,Ha,qa,La){return sa&&sa(Z,za,Ha,qa,La)};this.setFunGetReportIFrameUrl=
function(Z){sa=Z}};n.WorkbenchHelper=new function(){this.uploadBase64Image=function(J,wa,aa){J=atob(J.split(",")[1]);for(var ma=[],ra=0;ra<J.length;ra++)ma.push(J.charCodeAt(ra));J=new Blob([new Uint8Array(ma)],{type:"image/jpeg"});var T=new File([J],(new Date).getTime()+".jpeg");J=new ja;J.setShowBlocking(!1);J.setRequestPreparer(function(sa){sa.append("filename",T)});J.setFinishedHandler(function(sa,ya,Fa){sa&&(3099003==ya?aa&&aa(ya,Fa):aa&&aa(500,"fail to upload thumbnail"))});J.setSuccessHandler(function(sa){wa(sa.data)});
ma=pa.getUploadUrl();J.uploadTo(ma)}};n.MetricIntegration=new function(){var J;this.registerImpl=function(wa){J=wa};this.remoteSchemaContent=function(wa,aa,ma){if(!J)throw Error("no metricHelper impl");J.getMetricReferenceMap(wa,aa,ma)};this.getMetricSquareEntrance=function(wa){if(!J)throw Error("no metricHelper impl");return J.getMetricSquareEntrance(wa)}};n.WorkbenchBehavior=new function(){this.interestInBehavior=function(J,wa){J&&wa&&com.kingdee.bos.qing.behavior.BehaviorManager.interestInBehavior(J,
wa)};this.getMenuDirOperationBehaviorByRefPathType=function(J){if(J===com.kingdee.bos.qing.workbench.model.RefPathType.QINGCENTER)return n.WorkbenchBehavior.WORKBENCH_MENU_DIR_OPERTAION_MYDIR;if(J===com.kingdee.bos.qing.workbench.model.RefPathType.CARDLIBRARY)return n.WorkbenchBehavior.WORKBENCH_MENU_DIR_OPERTAION_MYCARD;if(J===com.kingdee.bos.qing.workbench.model.RefPathType.APPMENU)return n.WorkbenchBehavior.WORKBENCH_MENU_DIR_OPERTAION_MYMENU};this.getMenuDirOperationBehaviorByGroupType=function(J){if("\u6309\u53d1\u5e03\u4eba"===
J)return n.WorkbenchBehavior.WORKBENCH_MENU_DIR_OPERTAION_BY_PUBLISHER;if("\u6309\u76ee\u5f55"===J)return n.WorkbenchBehavior.WORKBENCH_MENU_DIR_OPERTAION_BY_DIRECTORY};this.getMenuDirOperationBehaviorByContentType=function(J){if("\u53d1\u5e03\u5185\u5bb9"===J)return n.WorkbenchBehavior.WORKBENCH_MENU_DIR_OPERTAION_PUBLISH_CONTENT;if("\u9884\u7f6e\u5185\u5bb9"===J)return n.WorkbenchBehavior.WORKBENCH_MENU_DIR_OPERTAION_PRESET_CONTENT};this.getMenuNodeClickOperation=function(J){if(J===com.kingdee.bos.qing.workbench.model.WorkbenchModel.WidgetType_Longer)return n.WorkbenchBehavior.WORKBENCH_MENU_NODE_CLICK_OPERATION_LONGER;
if(J===com.kingdee.bos.qing.workbench.model.WorkbenchModel.WidgetType_Square)return n.WorkbenchBehavior.WORKBENCH_MENU_NODE_CLICK_OPERATION_SQUARE;if(J===com.kingdee.bos.qing.workbench.model.WorkbenchModel.WidgetType_Dashboard)return n.WorkbenchBehavior.WORKBENCH_MENU_NODE_CLICK_OPERATION_DSB;if(J===com.kingdee.bos.qing.workbench.model.WorkbenchModel.WidgetType_QingReport)return n.WorkbenchBehavior.WORKBENCH_MENU_NODE_CLICK_OPERATION_REPORT};this.getMenuNodeDragOperation=function(J){if(J===com.kingdee.bos.qing.workbench.model.WorkbenchModel.WidgetType_Longer)return n.WorkbenchBehavior.WORKBENCH_MENU_NODE_DRAG_OPERATION_LONGER;
if(J===com.kingdee.bos.qing.workbench.model.WorkbenchModel.WidgetType_Square)return n.WorkbenchBehavior.WORKBENCH_MENU_NODE_DRAG_OPERATION_SQUARE;if(J===com.kingdee.bos.qing.workbench.model.WorkbenchModel.WidgetType_Dashboard)return n.WorkbenchBehavior.WORKBENCH_MENU_NODE_DRAG_OPERATION_DSB;if(J===com.kingdee.bos.qing.workbench.model.WorkbenchModel.WidgetType_QingReport)return n.WorkbenchBehavior.WORKBENCH_MENU_NODE_DRAG_OPERATION_REPORT}};n.WorkbenchBehavior.WORKBENCH_MENU_DIR_OPERTAION="wb-menu-dir-operation";
n.WorkbenchBehavior.WORKBENCH_MENU_DIR_OPERTAION_MYDIR="\u9605\u89c8\u5939";n.WorkbenchBehavior.WORKBENCH_MENU_DIR_OPERTAION_MYCARD="\u5361\u7247\u5e93";n.WorkbenchBehavior.WORKBENCH_MENU_DIR_OPERTAION_MYMENU="\u83dc\u5355\u9879";n.WorkbenchBehavior.WORKBENCH_MENU_DIR_OPERTAION_PUBLISH_CONTENT="\u53d1\u5e03\u5185\u5bb9";n.WorkbenchBehavior.WORKBENCH_MENU_DIR_OPERTAION_PRESET_CONTENT="\u9884\u7f6e\u5185\u5bb9";n.WorkbenchBehavior.WORKBENCH_MENU_DIR_OPERTAION_BY_PUBLISHER="\u6309\u53d1\u5e03\u4eba";
n.WorkbenchBehavior.WORKBENCH_MENU_DIR_OPERTAION_BY_DIRECTORY="\u6309\u76ee\u5f55";n.WorkbenchBehavior.WORKBENCH_MENU_TREE_OPERATION="wb-menu-tree-operation";n.WorkbenchBehavior.WORKBENCH_MENU_TREE_OPERATION_SEARCH="\u641c\u7d22";n.WorkbenchBehavior.WORKBENCH_MENU_TREE_OPERATION_FLODER="\u5c55\u5f00\u6536\u8d77";n.WorkbenchBehavior.WORKBENCH_MENU_NODE_CLICK_OPERATION="wb-menu-node-click-operation";n.WorkbenchBehavior.WORKBENCH_MENU_NODE_CLICK_OPERATION_LONGER="\u70b9\u51fb\u6570\u636e\u5206\u6790";
n.WorkbenchBehavior.WORKBENCH_MENU_NODE_CLICK_OPERATION_SQUARE="\u70b9\u51fb\u6570\u636e\u6597\u65b9";n.WorkbenchBehavior.WORKBENCH_MENU_NODE_CLICK_OPERATION_DSB="\u70b9\u51fb\u4eea\u8868\u677f";n.WorkbenchBehavior.WORKBENCH_MENU_NODE_CLICK_OPERATION_REPORT="\u70b9\u51fb\u62a5\u8868";n.WorkbenchBehavior.WORKBENCH_MENU_NODE_DRAG_OPERATION="wb-menu-node-drag-operation";n.WorkbenchBehavior.WORKBENCH_MENU_NODE_DRAG_OPERATION_LONGER="\u62d6\u52a8\u6570\u636e\u5206\u6790";n.WorkbenchBehavior.WORKBENCH_MENU_NODE_DRAG_OPERATION_SQUARE=
"\u62d6\u52a8\u6570\u636e\u6597\u65b9";n.WorkbenchBehavior.WORKBENCH_MENU_NODE_DRAG_OPERATION_DSB="\u62d6\u52a8\u4eea\u8868\u677f";n.WorkbenchBehavior.WORKBENCH_MENU_NODE_DRAG_OPERATION_REPORT="\u62d6\u52a8\u62a5\u8868";n.WorkbenchBehavior.WORKBENCH_SCHEMA_LIST_OPERATION="wb-schema-list-operation";n.WorkbenchBehavior.WORKBENCH_SCHEMA_LIST_OPERATION_NEW="\u65b0\u5efa\u5de5\u4f5c\u53f0";n.WorkbenchBehavior.WORKBENCH_SCHEMA_LIST_OPERATION_MODIFY_NAME="\u4fee\u6539\u5de5\u4f5c\u53f0\u540d\u79f0";n.WorkbenchBehavior.WORKBENCH_SCHEMA_LIST_OPERATION_SET_DEFAULT=
"\u8bbe\u4e3a\u9ed8\u8ba4\u5de5\u4f5c\u53f0";n.WorkbenchBehavior.WORKBENCH_SCHEMA_LIST_OPERATION_NEW_TAB="\u5728\u65b0\u9875\u7b7e\u6253\u5f00";n.WorkbenchBehavior.WORKBENCH_SCHEMA_LIST_OPERATION_DELETE="\u5220\u9664\u5de5\u4f5c\u53f0";n.WorkbenchBehavior.WORKBENCH_TAB_OPERATION="wb-tab-operation";n.WorkbenchBehavior.WORKBENCH_TAB_OPERATION_SCHEMA="\u5c55\u5f00\u5de5\u4f5c\u53f0\u5217\u8868";n.WorkbenchBehavior.WORKBENCH_TAB_OPERATION_PIN="\u9489\u4f4f/\u53d6\u6d88\u9489\u4f4f";n.WorkbenchBehavior.WORKBENCH_GRID_CARD_DESIGN_OPERATION=
"wb-grid-design-operation";n.WorkbenchBehavior.WORKBENCH_GRID_CARD_DESIGN_OPERATION_DRAG="\u62d6\u62fd\u5361\u7247(\u8c03\u6574\u4f4d\u7f6e)";n.WorkbenchBehavior.WORKBENCH_GRID_CARD_DESIGN_OPERATION_RESIZE="\u53d8\u66f4\u5927\u5c0f(\u8c03\u6574\u5927\u5c0f)";n.WorkbenchBehavior.WORKBENCH_GRID_LONGER_OPERATION="wb-grid-long-card-operation";n.WorkbenchBehavior.WORKBENCH_GRID_LONGER_OPERATION_DESIGNER="\u8fdb\u5165\u8bbe\u8ba1\u5668";n.WorkbenchBehavior.WORKBENCH_GRID_LONGER_OPERATION_DESIGNER_FINISH=
"\u8fdb\u5165\u8bbe\u8ba1\u5668-\u5b8c\u6210";n.WorkbenchBehavior.WORKBENCH_GRID_LONGER_OPERATION_DESIGNER_RESET="\u8fdb\u5165\u8bbe\u8ba1\u5668-\u91cd\u7f6e";n.WorkbenchBehavior.WORKBENCH_GRID_LONGER_OPERATION_SELECT_SCHEMA="\u9009\u62e9\u5206\u6790\u65b9\u6848";n.WorkbenchBehavior.WORKBENCH_GRID_SQUARE_OPERATION="wb-grid-square-card-operation";n.WorkbenchBehavior.WORKBENCH_GRID_SQUARE_OPERATION_ANALYSIS='\u8fdb\u5165"\u6570\u636e\u5206\u6790"';n.WorkbenchBehavior.WORKBENCH_GRID_SQUARE_OPERATION_ANALYSIS_SAVE=
'\u8fdb\u5165"\u6570\u636e\u5206\u6790"-\u4fdd\u5b58';n.WorkbenchBehavior.WORKBENCH_GRID_SQUARE_OPERATION_ANALYSIS_SAVEAS='\u8fdb\u5165"\u6570\u636e\u5206\u6790"-\u53e6\u5b58\u4e3a';n.WorkbenchBehavior.WORKBENCH_GRID_SQUARE_OPERATION_DESIGNER="\u8fdb\u5165\u8bbe\u8ba1\u5668";n.WorkbenchBehavior.WORKBENCH_GRID_SQUARE_OPERATION_DESIGNER_FINISH="\u8fdb\u5165\u8bbe\u8ba1\u5668-\u5b8c\u6210";n.WorkbenchBehavior.WORKBENCH_GRID_SQUARE_OPERATION_DESIGNER_RESET="\u8fdb\u5165\u8bbe\u8ba1\u5668-\u91cd\u7f6e";
n.WorkbenchBehavior.WORKBENCH_GRID_DSB_OPERATION="wb-grid-dsb-card-operation";n.WorkbenchBehavior.WORKBENCH_GRID_DSB_OPERATION_FULLSCREEN="\u9605\u89c8\u8005\u83dc\u5355-\u5168\u5c4f";n.WorkbenchBehavior.WORKBENCH_GRID_DSB_OPERATION_OTHER="\u9605\u89c8\u8005\u83dc\u5355-\u5176\u4ed6";n.WorkbenchBehavior.WORKBENCH_GRID_REPORT_OPERATION="wb-grid-report-card-operation";n.WorkbenchBehavior.WORKBENCH_GRID_REPORT_OPERATION_FILTRATE="\u8fc7\u6ee4";n.WorkbenchBehavior.WORKBENCH_GRID_REPORT_OPERATION_FULLSCREEN=
"\u5168\u5c4f";n.WorkbenchBehavior.WORKBENCH_AI_ARRIVE_OPERATION="wb-ai-arrive-operation";n.WorkbenchBehavior.WORKBENCH_AI_ARRIVE_OPERATION_COSMIC="\u70b9\u51fbCosmicAI\u52a9\u624b\u5165\u53e3";n.WorkbenchBehavior.WORKBENCH_AI_ARRIVE_OPERATION_RECOMMEND="\u70b9\u51fb\u9ed8\u8ba4\u63a8\u8350\u95ee\u9898";n.WorkbenchBehavior.WORKBENCH_AI_CONTENT_OPERATION="wb-ai-content-operation";n.WorkbenchBehavior.WORKBENCH_AI_CONTENT_OPERATION_DRAG_FROM_MENU="\u62d6\u62fd\u5de6\u4fa7\u6811\u5f62\u83dc\u5355\u5185\u5bb9\u5230\u5bf9\u8bdd\u6846";
n.WorkbenchBehavior.WORKBENCH_AI_CONTENT_OPERATION_DRAG_FROM_GRID="\u62d6\u62fd\u5de5\u4f5c\u53f0\u5185\u5bb9\u5230\u5bf9\u8bdd\u6846";n.WorkbenchBehavior.WORKBENCH_AI_QUESTION_OPERATION="wb-ai-question-operation";n.WorkbenchBehavior.WORKBENCH_AI_QUESTION_OPERATION_USER_INPUT="\u7528\u6237\u8f93\u5165\u95ee\u9898";n.WorkbenchBehavior.WORKBENCH_AI_QUESTION_OPERATION_USER_SELECT="\u7528\u6237\u9009\u62e9\u63a8\u8350\u95ee\u9898";n.WorkbenchBehavior.WORKBENCH_AI_CHART_CLICK_OPERATION="wb-ai-chart-drag-operation";
n.WorkbenchBehavior.WORKBENCH_AI_CHART_CLICK_OPERATION_CHART_INFO="\u67e5\u770b\u56fe\u8868\u4fe1\u606f";n.WorkbenchBehavior.WORKBENCH_AI_CHART_CLICK_OPERATION_CHART_TYPE="\u5207\u6362\u56fe\u8868\u7c7b\u578b";n.WorkbenchBehavior.WORKBENCH_AI_CHART_CLICK_OPERATION_CHART_EDIT="\u7f16\u8f91\u56fe\u8868";n.WorkbenchBehavior.WORKBENCH_AI_CHART_CLICK_OPERATION_ADD_TO_GRID="\u6dfb\u52a0\u81f3\u5de5\u4f5c\u53f0";n.WorkbenchBehavior.WORKBENCH_AI_CHART_DRAG_OPERATION="wb-ai-chart-drag-operation";n.WorkbenchBehavior.WORKBENCH_AI_CHART_DRAG_OPERATION_TO_GRID=
"\u62d6\u62fd\u56fe\u8868\u81f3\u5de5\u4f5c\u53f0";n.WorkbenchBehavior.WORKBENCH_AI_PANEL_OPERATION="wb-ai-panel-operation";n.WorkbenchBehavior.WORKBENCH_AI_PANEL_OPERATION_NEW_DAILOG="\u65b0\u5efa\u5bf9\u8bdd";n.WorkbenchBehavior.WORKBENCH_AI_PANEL_OPERATION_PIN="\u56fa\u5b9a\u81f3\u5f53\u524d\u5de5\u4f5c\u53f0";n.WorkbenchBehavior.WORKBENCH_AI_PANEL_OPERATION_EXPAND="\u6700\u5927\u5316"})();(function(){function n(){var b=this,c,e,l,A,w,r=!1,q,H;this.getJqUi=function(){if(c)return c;c=$("<div>");c.addClass("workbench-tab-fixed-head");A=$("<div>");A.addClass("workbench-tab-fixed-head-tab-icon");D.background(A,"icon_workbench_fixed");A.on("click",z);A.appendTo(c);e=$("<div>");e.addClass("workbench-tab-fixed-head-text");e.text(w);e.attr("title",w);e.on("click",z);e.appendTo(c);l=$("<div>");l.addClass("workbench-tab-fixed-head-arrow-icon");l.addClass("workbench-tab-fixed-head-arrow-icon-arrow-down");
l.on("click",k);l.appendTo(c);l.on("mouseover",function(){l.addClass(r?"workbench-tab-fixed-head-arrow-icon-selected1":"workbench-tab-fixed-head-arrow-icon-selected2")});l.on("mouseout",function(){l.removeClass("workbench-tab-fixed-head-arrow-icon-selected1");l.removeClass("workbench-tab-fixed-head-arrow-icon-selected2")});return c};this.updateUi=function(){if(e){e.text(w);e.attr("title",w);var f=20,C=e[0].clientWidth;70>C&&(f=(95-C)/2);C=f+17+8+C+f;u.layoutCtrlWithLRTB(A,f-2,null,null,null,null,
null);u.layoutCtrlWithLRTB(e,f+17+8-2,null,null,null,null,null);c.css("width",C+"px")}};this.setTitle=function(f){w=f;b.updateUi()};this.setSelected=function(f){f?c.addClass("workbench-tab-fixed-head_selected"):c.removeClass("workbench-tab-fixed-head_selected")};this.setOpenSchema=function(f){r=f;l.removeClass("workbench-tab-fixed-head-arrow-icon-arrow-down");l.removeClass("workbench-tab-fixed-head-arrow-icon-arrow-up");l.addClass(r?"workbench-tab-fixed-head-arrow-icon-arrow-up":"workbench-tab-fixed-head-arrow-icon-arrow-down")};
this.setShowSchemaAreaHandler=function(f){q=f};this.setFixedTabClickHandler=function(f){H=f};var z=function(f){H&&H(f)},k=function(f){l.removeClass("workbench-tab-fixed-head-arrow-icon-arrow-down");l.removeClass("workbench-tab-fixed-head-arrow-icon-arrow-up");l.removeClass("workbench-tab-fixed-head-arrow-icon-selected1");l.removeClass("workbench-tab-fixed-head-arrow-icon-selected2");r=!r;l.addClass(r?"workbench-tab-fixed-head-arrow-icon-arrow-up":"workbench-tab-fixed-head-arrow-icon-arrow-down");
l.addClass(r?"workbench-tab-fixed-head-arrow-icon-selected1":"workbench-tab-fixed-head-arrow-icon-selected2");q&&q(r);H&&H(f)}}function X(){var b,c,e,l,A=!0;this.setLock=function(w){b=w};this.isLock=function(){return b};this.setFunSwitchLockStateChecker=function(w){c=w};this.doFunSwitchLockStateChecker=function(){return c?c(l):!0};this.setFunSwitchLockState=function(w){e=w};this.doFunSwitchLockState=function(){e&&e()};this.setUserObject=function(w){l=w};this.getUserObject=function(){return l};this.isLockAble=
function(){return A};this.setLockAble=function(w){A=w}}function Y(){ab.AbstractTabPane.call(this);var b,c,e=!1,l,A;this.protectedAskCloseable=function(w){A&&A(w)};this.getAlreadyInit=function(){return e};this.setWorkbench=function(w){b=w};this.getWorkbench=function(){return b};this.setInitGridAction=function(w){l=w};this.doInitGridAction=function(){l&&l();e=!0};this.setBeforeCloseAction=function(w){A=w};this.setInitGridWidgets=function(w){c=w};this.getInitGridWidgets=function(){return c};this.showWorkbenchGrid=
function(){throw Error("Override me");};this.getWorkbenchGrid=function(){throw Error("Override me");};this.getId=function(){return b.getWorkbenchId()};this.getTitle=function(){return b.getWorkbenchName()};this.getIconName=function(){return"icon_workbench"}}function ja(){Y.call(this);var b=this,c,e,l;this.getJqUi=function(){c||(c=$("<div>"),c.addClass("workbench-rightpane-tab-fixed"));return c};this.getCloseable=function(){return!1};this.setSelected=function(A){A?c.show():c.hide()};this.showWorkbenchGrid=
function(){l=new Ya;e=new J;e.setWorkbench(b.getWorkbench());e.setInitGridWidgets(b.getInitGridWidgets());l.setWorkbenchHandler(e);e.setDroppableHandler(l);c.append(e.getJqUi());c.append(l.getJqUi(c))};this.getWorkbenchGrid=function(){return e};this.getDroppableHandler=function(){return l}}function pa(){Y.call(this);X.call(this);var b=this,c,e,l;this.getJqUi=function(){c||(c=$("<div>"),c.addClass("workbench-rightpane-tab-grid"));return c};this.showWorkbenchGrid=function(){l=new Ya;e=new J;e.setWorkbench(b.getWorkbench());
e.setInitGridWidgets(b.getInitGridWidgets());l.setWorkbenchHandler(e);e.setDroppableHandler(l);c.append(e.getJqUi());c.append(l.getJqUi(c))};this.getWorkbenchGrid=function(){return e};this.getDroppableHandler=function(){return l}}function J(){com.kingdee.bos.qing.workbench.common.AbstractWorkbenchHandler.call(this);var b=this,c,e,l,A,w,r,q;this.getWorkbenchId=function(){return A.getWorkbenchId()};this.addWidgetFromGpt=function(k){var f=k.getWorkbenchId();L.fireAddWidgetFromGptListener(f,k)};this.getWorkbenchGptModelByWidgetId=
function(k){return L.fireGetWorkbenchGptModelByWidgetIdHandler(A.getWorkbenchId(),k)};this.getWorkbenchGptModelByRefUid=function(k){return L.fireGetWorkbenchGptModelByRefUidHandler(A.getWorkbenchId(),k)};this.setupGptSquareDragIn=function(k,f){e.setupDragInWithoutEvent(k,f,function(){P.interestInBehavior(P.WORKBENCH_AI_CHART_DRAG_OPERATION,P.WORKBENCH_AI_CHART_DRAG_OPERATION_TO_GRID)},function(){})};this.setupDragIn=function(k){e&&e.setupDragIn(k)};this.updateWidgetName=function(k,f){e.updateWidgetName(k,
f)};this.updateWidgetDisplayName=function(k,f){e.updateWidgetDisplayName(k,f)};this.updateWidgetId=function(k,f){e.updateWidgetId(k,f)};this.setWorkbench=function(k){A=k};this.setInitGridWidgets=function(k){w=k};this.setDroppableHandler=function(k){q=k};this.getJqUi=function(){if(!c){l="qing-grid_"+A.getWorkbenchId()+"_"+eb.createUUID();c=$("<div>");c.addClass(l);c.css("padding","5px");var k=$("<div>");k.addClass(ha.DEFAULT_GRID_CLASS);c.append(k);k=z();c.append(k);setTimeout(function(){H()})}return c};
this.getGrid=function(){return e};this.getGridOption=function(){return e.getGridOption()};this.getWidgets=function(){return e.getWidgets()};this.getWidgetById=function(k){return e.getWidgetById(k)};this.addWidget=function(k){e.addWidget(k)};var H=function(){var k=new W;k.setBizId(A.getWorkbenchId());k.setBizName(A.getWorkbenchName());k.setGridId(l);k.setGridColumnRowNumber(15,8,240);k.setGridClass(ha.DEFAULT_GRID_CLASS,ha.DEFAULT_GRID_WIDGET_CLASS,ha.DEFAULT_GRID_DRAG_IN_CLASS);k=new ha(k);k.setGridEventListener(function(C,
t,y){"dropOver"===t&&b.changeCoverHintStatus(!1);"dropOut"!==t&&"removed"!==t||b.changeCoverHintStatus(!0);L.fireGridEventListener(C,t,y)});k.setStaticWidgetPainter(L.fireStaticWidgetPainter);k.setChangingWidgetPainter(L.fireChangingWidgetPainter);k.setWidgetDefaultInfoGetter(L.fireWidgetDefaultInfoGetter);k.setWidgetExtInfoGetter(L.fireWidgetExtInfoGetter);k.setDroppableEventListener(L.fireDroppableEventListener);k.setDraggableEventListener(L.fireDraggableEventListener);k.setupDragIn("workbench-leftpane-tree");
if(q){var f=q.getDroppableAreaClassName();k.setupDroppable(f,c.parent())}e=k;w&&0<w.length&&(e.setWidgets(w),b.changeCoverHintStatus(!1))},z=function(){if(!r){r=$("<div class='qing-grid-cover'>");var k=$("<div class='qing-grid-cover-background'>");D.background(k,"icon_open_tips_background");var f=$("<div class='qing-grid-cover-hint'>");f.text(g.get("backgroundTips","\u4ece\u5de6\u4fa7\u62d6\u5165\u6570\u636e\u5185\u5bb9\uff0c\u5f00\u59cb\u4f7f\u7528\u6570\u636e\u5de5\u4f5c\u53f0"));r.append(k);r.append(f);
c.append(r)}return r};this.changeCoverHintStatus=function(k){k?k&&0===e.getWidgetCount()&&r&&r.show():r&&r.hide()}}function wa(){var b=this,c=1,e=2,l=3,A=4,w=5,r=6,q=7,H,z,k,f,C,t,y,N,Q,ua,O,K,G,S,ba,x,ca;this.setData=function(V,la,Oa,nb){H=V;z=Oa;k=nb;la&&(O=la.funSchemaDefaultHandler,K=la.funSchemaOpenNewHandler,G=la.funSchemaShareHandler,S=la.funSchemaDeleteHandler,ba=la.funSchemaCopyHandler,x=la.funSchemaNameModifyHandler,ca=la.funSchemaOpenFixedHandler)};this.setSelected=function(V){V?f.addClass("workbench-schema-item-default"):
f.removeClass("workbench-schema-item-default")};this.setDefault=function(V){V?(t.attr("title",g.get("cancelDefaultWorkbench","\u53d6\u6d88\u8bbe\u4e3a\u9ed8\u8ba4\u5de5\u4f5c\u53f0")),D.background(t,"icon_default")):(t.attr("title",g.get("setDefaultWorkbench","\u8bbe\u4e3a\u9ed8\u8ba4\u5de5\u4f5c\u53f0")),D.background(t,"icon_undefault"));z.setDefault(V)};this.setWorkbenchName=function(V){ua.text(V);ua.attr("title",V)};this.setPreviewPic=function(V){var la=!1;V||(la=!0,V=hb.getIconUrl("workbench",
"workbench-background-thumbnail.png"));if(C){var Oa=C.find(".workbench-schema-item-img");Oa.attr("src",V);la?(Oa.css("width",""),Oa.addClass("workbench-schema-item-img-placeholder")):(Oa.css("width","100%"),Oa.removeClass("workbench-schema-item-img-placeholder"))}};this.getWorkbenchId=function(){if(z)return z.getWorkbenchId()};this.getJqUi=function(){if(f)return f;f=$("<div/>");f.addClass("workbench-schema-item");na();va();Ka();f.on("click",function(V){U(q)});return f};var na=function(){var V=$("<div/>");
V.addClass("workbench-schema-item-upper-bar");H?(y=$("<div/>"),D.background(y,"icon_delete"),k?(y.on("click",function(la){Va(la);U(A)}),y.attr("title",g.get("deleteWorkbench","\u5220\u9664\u5de5\u4f5c\u53f0")),y.on("mouseout",function(la){D.background(y,"icon_delete")}),y.on("mouseover",function(la){D.background(y,"icon_delete_hover")})):(y.attr("title",g.get("deleteWorkbenchTip","\u65e0\u6cd5\u5220\u9664\uff0c\u9ed8\u8ba4\u9700\u8981\u4fdd\u7559\u4e00\u4e2a\u5de5\u4f5c\u53f0\u3002\u60a8\u53ef\u4ee5\u65b0\u5efa\u4e00\u4e2a\u5de5\u4f5c\u53f0\u540e\u518d\u5220\u9664\u8be5\u5de5\u4f5c\u53f0\u3002")),
y.css({opacity:"0.6","z-index":1,cursor:"default"}),y.on("click",function(la){Va(la)})),y.addClass("workbench-schema-item-upper-bar-icon"),V.append(y)):(N=$("<div/>"),N.on("click",function(la){Va(la);U(w)}),N.addClass("workbench-schema-item-upper-bar-icon"),D.background(N,"icon_copy"),V.append(N));Q=$("<div/>");Q.on("click",function(la){Va(la);U(e)});Q.addClass("workbench-schema-item-upper-bar-icon");Q.css("scale","0.9");Q.attr("title",g.get("openNewTab","\u5728\u65b0\u9875\u7b7e\u6253\u5f00"));Q.on("mouseover",
function(la){D.background(Q,"icon_open_tab_hover")});Q.on("mouseout",function(la){D.background(Q,"icon_open_tab")});D.background(Q,"icon_open_tab");V.append(Q);t=$("<div/>");t.on("click",function(la){Va(la);U(c)});t.addClass("workbench-schema-item-upper-bar-icon");t.attr("title",z.isDefault()?g.get("cancelDefaultWorkbench","\u53d6\u6d88\u8bbe\u4e3a\u9ed8\u8ba4\u5de5\u4f5c\u53f0"):g.get("setDefaultWorkbench","\u8bbe\u4e3a\u9ed8\u8ba4\u5de5\u4f5c\u53f0"));t.on("mouseout",function(la){D.background(t,
z.isDefault()?"icon_default":"icon_undefault")});t.on("mouseover",function(la){D.background(t,"icon_default")});D.background(t,z.isDefault()?"icon_default":"icon_undefault");V.append(t);f.append(V)},va=function(){C=$("<div/>");C.addClass("workbench-schema-item-pic");var V=$("<img class='workbench-schema-item-img'>");C.append(V);f.append(C);V=(V=z)&&V.getImagePath()?com.kingdee.bos.qing.framework.common.RemoteFramework.getLoadImgUrl(V.getImagePath(),"workbench-thumbnail"):null;b.setPreviewPic(V)},
Ka=function(){var V=$("<div/>");V.addClass("workbench-schema-item-lower-bar");ua=$("<div/>");ua.addClass("workbench-schema-item-lower-bar-name");ua.text(z.getWorkbenchName());ua.attr("title",z.getWorkbenchName());V.append(ua);var la=$("<span/>");la.addClass("workbench-schema-item-lower-bar-icon");Aa.backgroundWithHover(la,"btn-edit");la.on("click",function(Oa){Va(Oa);U(r)});V.append(la);la=$("<div/>");la.addClass("workbench-schema-item-lower-bar-owner");V.append(la);f.append(V)},U=function(V){V===
c?O&&O(z):V===e?K&&K(z):V===l?G&&G(z):V===A?S&&S(z):V===w?ba&&ba(z):V===r?x&&x(z):V===q&&ca&&ca(z)}}function aa(b){B.call(this);var c=this,e=c.protectedMethod,l,A,w,r=!1,q;(function(){c.setSize(390,200);var z=b?g.get("modifyWorkbenchName","\u4fee\u6539\u5de5\u4f5c\u53f0\u540d\u79f0"):g.get("newWorkbenchSchema","\u65b0\u5efa\u5de5\u4f5c\u53f0\u65b9\u6848");e.setTitle(z);e.setContentPaneCreator(function(){l||H();return l});e.setClosingChecker(function(k){k=A.getText().trim();var f=!0;if(!k)return e.getMessageCurtain().showPrompt(g.get("workbenchIsBlank",
"\u8bf7\u8f93\u5165\u5de5\u4f5c\u53f0\u540d\u79f0\u3002")),!1;if(50<k.length)return e.getMessageCurtain().showPrompt(g.get("nameTooLong","\u540d\u79f0\u957f\u5ea6\u4e0d\u80fd\u8d85\u8fc750\u4e2a\u5b57\u7b26\u3002")),!1;b?f=k!==b.getWorkbenchName():(b=new ib,b.setDefault(r));if(f&&q(k))return e.getMessageCurtain().showPrompt(g.get("workbenchNameDuplicate","\u5de5\u4f5c\u53f0\u540d\u79f0\u5df2\u5b58\u5728\u3002")),!1;b.setWorkbenchName(k);f&&w&&w(b);return!0});e.setClosingAction(function(){e.destroy();
return!0})})();this.setFunCloseDialogCallBack=function(z){w=z};this.setFunWorkbenchNameCheck=function(z){q=z};var H=function(){l=$("<div>");var z=new ka;z.setRequired(!0);z.setText(g.get("newWorkbenchSchemaName","\u5de5\u4f5c\u53f0\u540d\u79f0"));z=z.getJqUi();z.attr("title",g.get("newWorkbenchSchemaName","\u5de5\u4f5c\u53f0\u540d\u79f0"));l.append(z);u.layoutCtrl(z,18,15,70,23);A=new ea;b&&A.setText(b.getWorkbenchName());z=A.getJqUi();l.append(z);u.layoutCtrl(z,96,15,210,23);if(!b){var k=$("<div>");
D.background(k,"icon_undefault");k.attr("title",g.get("setDefaultWorkbench","\u8bbe\u4e3a\u9ed8\u8ba4\u5de5\u4f5c\u53f0"));k.css("cursor","pointer");k.on("click",function(f){r=!r;D.background(k,r?"icon_default":"icon_undefault")});l.append(k);u.layoutCtrl(k,310,22,18,18)}}}function ma(){var b=this,c=$("<div>"),e,l=$("<div>"),A=$("<div>"),w=$("<div>"),r=[],q=[],H,z,k,f,C,t=[],y;this.resize=function(){H?O(H):na(0);K();ba()};this.setWorkbenchFixedTabHead=function(E){y=E};this.getJqUi=function(){if(!e){c.addClass("workbench-dynamictab");
e=$("<div>");e.addClass("workbench-dynamictab-container");e.appendTo(c);if(y){y.getJqUi().appendTo(c);var E=$("<div>");E.addClass("workbench-dynamictab-header-split");E.appendTo(c)}A.addClass("workbench-dynamictab-arrow-left");A.appendTo(c);A.hide();A.on("click",function(fa){ca();fa=ua();var ia=105,oa=null;if(null!=f){for(var ta=f;0<=ta;ta--)if(ia+=U(q[ta]),ia+50>fa){oa=ta+1;break}Q(q[null==oa?0:oa],!1)}});w.addClass("workbench-dynamictab-arrow-right");w.appendTo(c);w.hide();w.on("click",function(fa){null!=
C&&(fa=C,Q(q[null==fa?q.length-1:fa],!1))});l.addClass("workbench-dynamictab-hide-fold");l.appendTo(c);l.hide();l.text("\u25b2");l.on("click",function(fa){var ia=[];if(null!=f)for(var oa=0;oa<=f;oa++)ia.push(q[oa]);if(null!=C)for(oa=C;oa<q.length;oa++)ia.push(q[oa]);ia&&0<ia.length&&(oa=$(fa.target),fa=$(fa.currentTarget),(k=fa.data("oDropdownSelectorMenu"))?ba():(k=new bb,k.setCustomItemPainter(G),k.addSelectedChangedListener(x),k.setUserObject(ia),k.setItemModels(ia),fa.data("oDropdownSelectorMenu",
k),fa=k.getJqUi(),fa.data("whoCallMe",oa[0]),fa.appendTo(c),fa.addClass("workbench-dynamic-tab-hide-fold-drop"),fa.css("height",28*ia.length+6+"px"),fa.css("z-index",65535),$(document.body).on("mousedown",S)))});H&&Oa(H)}c.resize(Ka);return c};this.updateAllTabTitle=function(){if(q&&0<q.length)for(var E=0;E<q.length;E++)b.updateTabTitle(q[E])};this.updateTabTitle=function(E){var fa=c.children("#"+E.getId()),ia=$(fa).find(".workbench-dynamictab-head-icon").first(),oa=$(fa).find(".workbench-dynamictab-head-text").first();
ia&&0<ia.length&&oa&&0<oa.length&&(oa.attr("title",E.getTitle()),oa.text(E.getTitle()),sb(fa,ia,oa))};var N=function(E){function fa(pb){b.setSelectedTabPane(E);Oa(E)}var ia=E.getId(),oa=E.getCloseable(),ta=E.isLockAble(),Ma=$("<div>");Ma.addClass("workbench-dynamictab-head");var kb=$("<div>");kb.addClass("workbench-dynamictab-head-text");Ma.attr("id",ia);Ma.appendTo(b.getJqUi());kb.text(E.getTitle());kb.attr("title",E.getTitle());if(E.getIconName()){var mb=$("<div>");mb.addClass("workbench-dynamictab-head-icon");
D.background(mb,E.getIconName());mb.on("click",fa);mb.appendTo(Ma)}kb.appendTo(Ma);kb.on("click",fa);if(oa){Ma.css("width",kb[0].clientWidth+45+"px");E.setCloseCallback(function(pb){b.removeTab(pb);for(var qb=0;qb<t.length;qb++)(0,t[qb])(b,pb)});var cb=$("<div class='workbench-container-head-right-icon'>");D.background(cb,"icon_close");cb.addClass("workbench-container-head-right-close-icon");cb.on("mouseover",function(){D.background(cb,"icon_close_hover")});cb.on("mouseout",function(){D.background(cb,
"icon_close")});cb.on("click",function(){E.onClose()});cb.hide();cb.appendTo(Ma);var jb=$("<div class='workbench-container-head-right-icon'>"),ob=$("<div class='workbench-container-lock-icon'>");ob.appendTo(jb);jb.addClass("workbench-container-head-right-lock-icon");D.background(ob,"icon_unlock");jb.on("mouseover",function(){D.background(ob,E.isLock()?"icon_lock_hover":"icon_unlock_hover")});jb.on("mouseout",function(){D.background(ob,E.isLock()?"icon_lock":"icon_unlock")});jb.on("click",function(){E.doFunSwitchLockStateChecker()&&
(E.setLock(!E.isLock()),E.isLock()?cb.hide():cb.show(),D.background(ob,E.isLock()?"icon_lock_hover":"icon_unlock_hover"),E.doFunSwitchLockState())});Ma.on("mouseover",function(){E.isLock()||cb.show();jb.show()});Ma.on("mouseout",function(){cb.hide();jb.hide()});jb.hide();sb(Ma,mb,kb);ta&&jb.appendTo(Ma)}};this.addTab=function(E,fa){if(!E)throw Error("Add Tab Error: Tab cannot be null!");for(var ia=null,oa=E.getId(),ta=null,Ma=0;Ma<q.length;Ma++)if(oa===q[Ma].getId()){ia=q[Ma];(oa=V(ia))&&"none"===
oa[0].style.display&&(ta=Ma);break}if(fa){if(null!=ta){Q(ia,!0);return}if(ia){H&&ia.getId()===H.getId()||(b.setSelectedTabPane(E),Oa(ia));return}}else if(null!=ta||ia)return;q.push(E);N(E);Ka(E);fa&&(b.setSelectedTabPane(E),Oa(E))};var Q=function(E,fa){fa&&b.setSelectedTabPane(E);e&&E&&(O(E),K(),fa&&Oa(E))};this.setSelectedTabPane=function(E){z=H;H=E};this.getDynamicTabPanes=function(){return q};this.removeTab=function(E){if(!E)throw Error("Close Tab Error: Tab cannot be null!");var fa=E.getId(),
ia=va(fa),oa=H;if(H){va(H.getId());var ta=q[q.length-1];fa===H.getId()&&(oa=fa===ta.getId()?Number(ia)-1:Number(ia)+1,oa=q[oa])}q.splice(ia,1);ia=E.getJqUi();$(ia[0]).remove();(E=V(E))&&E.remove();Q(oa,!0);K()};this.addTabSelectedListener=function(E){r.push(E)};this.removeSelected=function(E){c.children(".workbench-dynamictab-head").removeClass("workbench-dynamictab-head_selected");E=E.getJqUi();for(var fa=e.children(),ia=0;ia<fa.length;ia++)fa[ia]==E[0]&&$(fa[ia]).hide()};var ua=function(){return y?
c.prop("clientWidth")-y.getJqUi().prop("clientWidth"):c.prop("clientWidth")};this.addTabCloseListener=function(E){t.push(E)};var O=function(E){E&&(E=va(E.getId()))&&na(E)},K=function(){f=0>f?null:f;null==f&&null==C?(l.hide(),w.hide(),A.hide()):(l.show(),w.show(),A.show(),null==f&&null!=C?A.hide():null!=f&&null==C&&w.hide())},G=function(E,fa){E.addClass("workbench-dropdown-lists");var ia=$("<div>");ia.text(fa.getTitle());ia.addClass("workbench-dropdown-lists-text");E.append(ia)},S=function(E){E=E.target;
if(E!==k.getJqUi().data("whoCallMe")){for(;E&&E!==document.body;){if(E===k.getJqUi()[0])return;E=$(E).parent()[0]}ba()}},ba=function(){$(document.body).off("mousedown",S);k&&(l.data("oDropdownSelectorMenu",null),k.getJqUi().remove())},x=function(E,fa,ia){E=ia[0].getId();if(E=va(E))Q(q[E],!0),ba()},ca=function(){for(var E=0;E<q.length;E++)c.children("#"+q[E].getId()).show()},na=function(E){ca();for(var fa=ua(),ia=105,oa=null,ta=E;ta<q.length;ta++)if(ia+=U(q[ta]),ia+50>fa){oa=ta-1;break}if(null==oa)for(ta=
E-1;0<=ta;ta--){ia+=U(q[ta]);if(ia+50>fa){E=ta+1;break}0==ta&&(E=null)}fa=null==oa?q.length-1:oa;for(ta=null==E?0:E;ta<=fa;ta++)c.children("#"+q[ta].getId()).show();if(null!=E){for(ta=0;ta<E;ta++)la(q[ta]);f=E-1}else f=null;if(null!=oa){for(ta=oa+1;ta<q.length;ta++)la(q[ta]);C=oa+1}else C=null},va=function(E){var fa=null;if(E)for(var ia in q)if(E==q[ia].getId()){fa=ia;break}return fa},Ka=function(E){var fa=ua();if(q&&0<q.length){E=105+U(E);for(var ia=null,oa=q.length-2;0<=oa;oa--)if(E+=U(q[oa]),E+
50>fa){ia=oa;break}if(null!=ia){for(oa=0;oa<=ia;oa++)la(q[oa]);f=ia;K()}}},U=function(E){return V(E).prop("offsetWidth")},V=function(E){return c.children("#"+E.getId())},la=function(E){c.children("#"+E.getId()).hide()},Oa=function(E){var fa=V(E);c.children(".workbench-dynamictab-head").removeClass("workbench-dynamictab-head_selected");fa.addClass("workbench-dynamictab-head_selected");fa=E.getJqUi();for(var ia=e.children(),oa=!1,ta=0;ta<ia.length;ta++)ia[ta]==fa[0]?(oa=!0,$(ia[ta]).show(),rb(E)):$(ia[ta]).hide();
oa||(u.layoutCtrlWithLRTB(fa,0,0,null,0,0,null),fa.appendTo(e),rb(E))},nb=function(E){for(var fa=0;fa<r.length;fa++)(0,r[fa])(b,E,z)},rb=function(E){u.isInDomTree(E.getJqUi()[0])?nb(E):setTimeout(function(){nb(E)},10)},sb=function(E,fa,ia){var oa=12,ta=17,Ma=ia[0].clientWidth;70>Ma&&(oa=(115-ta-6-Ma)/2);Ma=oa+ta+6+Ma+oa;fa?u.layoutCtrlWithLRTB(fa,oa-2,null,null,null,null,null):ta=0;u.layoutCtrlWithLRTB(ia,oa+ta+6-2,null,null,null,null,null);E.css("width",Ma+"px")}}function ra(){var b=this,c,e,l,A,
w,r,q,H,z,k,f,C,t,y,N,Q,ua,O,K,G,S,ba=!1,x,ca;this.getScene=function(){throw Error("override me");};this.getCardId=function(){return c+k};this.setMenuItemInfo=function(U){t=U};this.setWorkbenchId=function(U){c=U};this.setFunRemoveSelf=function(U){H=U};this.setFunRefChangeCallback=function(U){N=U};this.setFunCardTitleChangeCallback=function(U){Q=U};this.setFunUpdateWidgetIdCallback=function(U){O=U};this.show=function(U){e=U;na().appendTo(U);q||(q=$("<div>"),u.layoutCtrlWithLRTB(q,0,0,null,0,0,null),
q.css({"z-index":"-1",background:"#fff"}));q.appendTo(U)};var na=function(){l||(l=$("<div class='workbench-card-main'>"),w=$("<div class='workbench-card-head'>"),r=$("<div>"),r.addClass(b.getContentStyleClass()),b.protectedCustomHead(l),b.protectedCustomContent(r),w.appendTo(l),r.appendTo(l));return l};this.protectedCustomContent=function(U){throw Error("override me");};this.initHeadTitle=function(){l.addClass("workbench-div-card-main");x=$("<div class='workbench-card-title-area-showall'>");$(e).on("mouseover",
function(){x.addClass("workbench-card-title-area")});$(e).on("mouseout",function(){x.removeClass("workbench-card-title-area")});A=$("<div class='workbench-card-title sa-qing-publish-fontfamily'>");A.text(z);A.attr("title",z);var U=$("<div>");D.background(U,b.getScene());U.addClass("workbench-card-icon");var V=$("<div/>");V.addClass("workbench-card-title-edit-icon");D.backgroundWithHover(V,"card_edit");V.on("click",Ka);var la=$("<div class='workbench-card-drag-cover'>");x.on("mouseover",function(Oa){ba&&
V.show()});x.on("mouseout",function(Oa){V.hide()});V.hide();la.appendTo(w);U.appendTo(x);A.appendTo(x);V.appendTo(x);x.appendTo(w)};this.protectedCustomHead=function(U){throw Error("override me");};this.redraw=function(){throw Error("override me");};this.getContentStyleClass=function(){return"workbench-div-card-content"};this.setJsonReferenceMap=function(U){C=U;N&&N()};this.getJsonReferenceMap=function(){return C};this.protectedRemoveSelf=function(){H&&H()};this.changeTitle=function(U){z=U;A&&A.text(U);
A&&A.attr("title",U)};this.isNeedShowOptBtn=function(){return ba};this.setNeedShowOptBtn=function(U){ba=U};this.setTitle=function(U){z=U};this.setWidgetId=function(U){k=U};this.getWidgetId=function(){return k};this.setWidgetBizId=function(U){f=U};var va=function(){if(!y){y=new M;var U=L.getWorkbenchRemoteUrl();y.setRemoteUrl(U)}return y};this.setExecutedCallback=function(U){ua=U};this.getExecutedStatus=function(){return K};this.setFunOpenNewTab=function(U){G=U};this.getFunOpenNewTab=function(){return G};
this.fireOpenNewTab=function(U,V){G&&G(U,V)};var Ka=function(){var U=new Ja(z);U.setFunCloseDialogCallBack(function(V){b.changeTitle(V);Q&&Q(V)});U.showDialog()};this.customHandleError=function(){};this.refreshCardTitle=function(U){(new da(va(),function(V){var la=Qa.createWidgetModel(V.widgetType);la.fromJsonObject(V);b.changeTitle(la.getDisplayName()?la.getDisplayName():la.getName());U&&U()},function(V,la,Oa){U&&U();return!0})).loadWorkbenchCard(c,C)};this.destroy=function(){};this.getErrorCode=
function(){return ca};this.protectedMethod={getContentUi:function(){return r},getRefType:function(){var U=b.getJsonReferenceMap();return U?U.refType:t.getRefType()},getMainUi:na,getWidgetBizId:function(){return f},getRefMapUid:function(){var U=b.getJsonReferenceMap();if(U)return U.uid},getTitle:function(){return z},appendOperateBtnUI:function(U){for(var V=5,la=0,Oa=U.length;la<Oa;la++)U[la].css({position:"absolute",top:"2px",right:V+"px"}),V+=25,w.append(U[la])},getWorkbenchId:function(){return c},
getMenuItemInfo:function(){return t},getWorkbenchRemoteImpl:va,getJqHead:function(){return w},getJqOwner:function(){return e},setExecutedStatus:function(U){K=U},getExecutedCallback:function(){return ua},createEditTitleDialog:Ka,handleError:function(U,V,la,Oa){ca=U;!1!==Oa&&(ba=!1,S||(S=new com.kingdee.bos.qing.scene.common.square.exhibition.CardErrorUi(r)),S.show(U,V,la),b.customHandleError())},getFunUpdateWidgetIdCallback:function(){return O}}}function T(){ra.call(this);var b=this,c=this.protectedMethod,
e,l=eb.createUUID(),A,w,r=T.SCHEMA_BIZ_VERSION;this.getCardExhibition=function(){throw Error("override me");};this.remoteReferenceMap=function(t,y){if(b.getJsonReferenceMap())t&&t();else{var N=c.getContentUi(),Q=c.getWidgetBizId(),ua=c.getMenuItemInfo().getRefType();y=new da(c.getWorkbenchRemoteImpl(),function(O){b.setJsonReferenceMap(O.ref);t&&t()},y);y.setBlockingJqUi(N);y.getReferenceMap(Q,ua)}};this.remoteSchemaContent=function(t,y){throw Error("override me");};this.resetSchema=function(t,y,N){(new da(c.getWorkbenchRemoteImpl(),
y,N)).resetSchema(c.getWorkbenchId(),t)};this.setJsonModelBook=function(t){A=t};this.getJsonModelBook=function(){return A};this.setModelBookVersion=function(t){r=t};this.getModelBookVersion=function(){return r};this.setJsonOperation=function(t){w=t};this.protectedCustomContent=function(t){t.empty();c.setExecutedStatus(!1);var y=function(N,Q,ua){c.handleError(N,Q,ua);return!0};b.remoteReferenceMap(function(){z(t,function(N){b.remoteSchemaContent(function(){k(N,b.getJsonModelBook())},y)})},function(N,
Q,ua){c.handleError(N,Q,ua);return!0})};this.protectedRefreshChart=function(t,y){t.empty();var N=$("<div>");N.appendTo(t);u.layoutCtrlWithLRTB(N,0,0,null,0,0,null);k(t,y);c.setExecutedStatus(!1)};this.protectedOpenDesigner=function(t,y,N){var Q=new za,ua=function(O){Q.hide();O&&(b.setModelBookVersion(T.SCHEMA_MODIFIED_VERSION),N(O))};Q.setIsSquare(y);Q.setRemoteUrl(L.getCoreRemoteUrl());Q.setRemoteTag(l);Q.setTag(l);Q.setSquareOrLonger(y);Q.setClosable(!0);Q.setDesignerOperationJudger(e.getDesignerOperationJudger());
Q.setFunOpenNewTab(b.getFunOpenNewTab());Q.setSchemaLoader(function(O,K){O.setJsonModelBook(A);K(!0)});Q.setSchemaSaver(function(O){O.getConductor().isDirty()?(b.getScene()===Ba.WidgetType_Square?P.interestInBehavior(P.WORKBENCH_GRID_SQUARE_OPERATION,P.WORKBENCH_GRID_SQUARE_OPERATION_DESIGNER_FINISH):b.getScene()===Ba.WidgetType_Longer&&P.interestInBehavior(P.WORKBENCH_GRID_LONGER_OPERATION,P.WORKBENCH_GRID_LONGER_OPERATION_DESIGNER_FINISH),q(O,ua)):ua()});Q.setSchemaReseter(function(O){b.getScene()===
Ba.WidgetType_Square?P.interestInBehavior(P.WORKBENCH_GRID_SQUARE_OPERATION,P.WORKBENCH_GRID_SQUARE_OPERATION_DESIGNER_RESET):b.getScene()===Ba.WidgetType_Longer&&P.interestInBehavior(P.WORKBENCH_GRID_LONGER_OPERATION,P.WORKBENCH_GRID_LONGER_OPERATION_DESIGNER_RESET);H(ua)});Q.show(t,function(){ua(null)});c.setExecutedStatus(!1)};this.saveSchema=function(t,y,N,Q){(new da(c.getWorkbenchRemoteImpl(),N,Q)).saveSchema(c.getWorkbenchId(),t,y)};this.getExhibition=function(){return e};this.redraw=function(){f();
e&&e.redraw()};var q=function(t,y){var N=t.getJsonModelBook();b.saveSchema(b.getJsonReferenceMap(),N,function(Q){y(N);b.setJsonReferenceMap(b.getJsonReferenceMap())},function(Q,ua){if(909002===Q)return Q=R.createFeedbackDialog(),Q.setMessage(g.get("noSelectMapTemplate","\u8bf7\u9009\u62e9\u5730\u56fe\u6a21\u677f")),Q.setMsgImageType(R.MSG_WARNING),Q.setOptionType(R.OPTION_OK),Q.setButtonText(R.OPTION_OK,g.get("iknow","\u6211\u77e5\u9053\u4e86")),Q.showDialog(),!0;y();return!0})},H=function(t){b.resetSchema(b.getJsonReferenceMap(),
function(y){t(y);b.setJsonReferenceMap(b.getJsonReferenceMap())},function(y,N){t();return!0})},z=function(t,y){var N=$("<div>");N.appendTo(t);u.layoutCtrlWithLRTB(N,0,0,null,0,0,null);var Q=new com.kingdee.bos.qing.prepare.WorkbenchCardDataExtractor;Q.setTag(l);Q.setWidgetBizId(c.getWidgetBizId());Q.setJsonReferenceMap(b.getJsonReferenceMap());Q.setRefType(c.getRefType());Q.setWidgetScene(b.getScene());Q.getJqUi().appendTo(t);Q.start();Q.setErrorCallback(function(ua,O,K){b.setNeedShowOptBtn(!1);C(!1);
c.handleError(ua,O,K,!1)});Q.setExtractDataFinishedSuccessCallback(function(){b.setNeedShowOptBtn(!0);y(N)})},k=function(t,y){f();var N=L.getCoreRemoteUrl();e=b.getCardExhibition();e.setRemoteUrl(N);e.setRemoteTag(l);e.setExecutedListener(C);e.setSchemaContent(y);w&&w.operation&&e.setNoOperValue(w.operation["2"]|w.operation["1"]);e.show(t)};this.getTag=function(){return l};var f=function(){var t=c.getMainUi(),y=c.getContentUi(),N=t.width(),Q=t.height();t=parseInt(y.css("left").replace("px",""));var ua=
parseInt(y.css("top").replace("px","")),O=parseInt(y.css("right").replace("px","")),K=parseInt(y.css("bottom").replace("px",""));Q=Math.floor(Q-ua-K);y.css("width",Math.floor(N-t-O));y.css("height",Q)},C=function(t){c.setExecutedStatus(!0);var y=c.getExecutedCallback();y&&y(t)}}function sa(){ra.call(this);var b=this,c=this.protectedMethod,e,l;this.redraw=function(){};this.protectedCustomContent=function(r){A(r);c.setExecutedStatus(!1);setTimeout(function(){c.setExecutedStatus(!0);var q=c.getExecutedCallback();
q&&q()},5E3)};this.loadContent=function(r){throw Error("override me");};var A=function(r){if(b.getJsonReferenceMap())b.setNeedShowOptBtn(!0),b.loadContent(r);else{var q=new da(c.getWorkbenchRemoteImpl(),function(H){H=H.ref;var z=c.getFunUpdateWidgetIdCallback();z&&H.refToId&&H.uid&&z(H.refToId+"#"+H.uid);b.setNeedShowOptBtn(!0);b.setJsonReferenceMap(H);b.loadContent(r)},function(H,z,k){c.handleError(H,z,k);return!0});q.setBlockingJqUi(r);q.getReferenceMap(c.getWidgetBizId(),b.getPublishType())}};
this.addOperateIcon=function(r){e=$("<div class = 'sa-qing-publish-card-icon'>");l=$("<div class = 'sa-qing-publish-card-icon'>");e.on("click",w);m.background(e,"btn-refresh");e.on("mouseover",function(q){m.background(e,"btn-refresh-on")});e.on("mouseout",function(q){m.background(e,"btn-refresh")});e.attr("title",Ca.get("cardRefresh","\u5237\u65b0"));$(c.getJqOwner()).on("mouseenter",function(){e.show();l.show()});$(c.getJqOwner()).on("mouseleave",function(){e.hide();l.hide()});l.on("click",b.protectedRemoveSelf);
D.background(l,"icon_delete");l.on("mouseover",function(q){D.background(l,"icon_delete_hover")});l.on("mouseout",function(q){D.background(l,"icon_delete")});l.attr("title",g.get("delete","\u5220\u9664"));e.appendTo(r);e.hide();l.appendTo(r);l.hide();c.appendOperateBtnUI([l,e])};var w=function(){b.refreshCardTitle();b.protectedCustomContent(c.getContentUi())}}function ya(){var b=this,c;this.setNoOperValue=function(e){c=e};this.getNoOperValue=function(){return c};this.checkOperatePermAndPrompt=function(e,
l){if(!c)return!0;var A=!0;if(l===ya.PERM_TYPE_ENTER_ANALYSIS){if(0!==(c&1)){A=!1;var w=g.get("enterAnalysis","\u8fdb\u5165\u201c\u6570\u636e\u5206\u6790\u201d")}}else if(l===ya.PERM_TYPE_ENTER_SQUARE)0!==(c&128)&&(A=!1,w=g.get("enterEdit","\u8fdb\u5165\u8bbe\u8ba1\u5668"));else throw Error("unknown permType");A||(l=g.get("cardEditUnaccessable","\u60a8\u6ca1\u6709#1\u7684\u6743\u9650").replace("#1",w),b.displayPrompt(e,l));return A};this.displayPrompt=function(e,l){throw Error("override me.");};this.getDesignerOperationJudger=
function(){throw Error("override me.");}}function Fa(){com.kingdee.bos.qing.AbstractSquareDivScene.call(this);ya.call(this);var b=this,c;this.setSchemaContent=function(e){c=e};this.protectedLoadingImpl=function(e){e(c)};this.displayPrompt=function(e,l){b.displayActionPrompt(e,l)};this.protectedCustomInitEnv=function(){var e=L.getLinkageRemoteURL(),l=new com.kingdee.bos.qing.linkage.LinkageManage;l.setCurrentLinkageTag(b.protectedGetRemoteTag());l.initRuntime(e,com.kingdee.bos.qing.integration.LinkageJumper.jump)};
this.getDesignerOperationJudger=function(){}}function Z(){com.kingdee.bos.qing.AbstractLongerDivScene.call(this);ya.call(this);var b=this,c,e;this.setSchemaContent=function(l){c=l};this.protectedLoadingImpl=function(l){l(c)};this.displayPrompt=function(l,A){b.displayActionPrompt(l,A)};this.protectedCustomInitEnv=function(){var l=L.getLinkageRemoteURL(),A=new com.kingdee.bos.qing.linkage.LinkageManage;A.setCurrentLinkageTag(b.protectedGetRemoteTag());A.initRuntime(l,com.kingdee.bos.qing.integration.LinkageJumper.jump)};
this.protectedLoadDesignerOperationJudger=function(l){e||(e=new com.kingdee.bos.qing.publish.model.LongerDesignerOperationJudgerModel(b.getNoOperValue()));l(e)};this.getDesignerOperationJudger=function(){e||(e=new com.kingdee.bos.qing.publish.model.LongerDesignerOperationJudgerModel(b.getNoOperValue()));return e}}function za(){com.kingdee.bos.qing.AbstractModalDesignerScene.call(this);var b,c,e,l,A=!0,w,r=!0,q,H,z=!0;this.setIsSquare=function(f){A=f};this.protectedIsSquare=function(){return A};this.setTag=
function(f){q=f};this.setFunOpenNewTab=function(f){H=f};this.hideResetBtn=function(){z=!1};this.protectedInitDesigner=function(f){k();var C=Ca.get("finish","\u5b8c\u6210");f.getConductor().insertToolbarButton(function(y){c(f)},"btn_save",C,null);if(z){C=new Za;var t=new Sa(function(y){y=new Wa;y.setText(Ca.get("resetConfirmTips","\u60a8\u786e\u5b9a\u8981\u91cd\u7f6e\u5230\u53d1\u5e03\u6700\u521d\u59cb\u7684\u72b6\u6001\uff0c\u5e76\u9000\u51fa\u5417\uff1f"));y.setConfirmedListener(function(Q){Q&&e(f)});
var N=l.getJqUi();y.show(N)});t.setText(Ca.get("resetAndBack","\u91cd\u7f6e\u5e76\u8fd4\u56de"));C.addItemModel(t);l=f.getConductor().insertToolbarMenu(C,"btn_reset",Ca.get("reset","\u91cd\u7f6e"),null)}f.setDesignerOperationJudger(r?null:w,r?w:null);(C=window.com.kingdee.bos.qing.AnalysisSceneOuterApi)&&C.setFunOpenNewTab&&C.setFunOpenNewTab(H)};this.protectedLoading=function(f,C){b(f,C)};this.setSchemaLoader=function(f){b=f};this.setSchemaSaver=function(f){c=f};this.setSchemaReseter=function(f){e=
f};this.setDesignerOperationJudger=function(f){w=f};this.setSquareOrLonger=function(f){r=f};this.protectedIsSquare=function(){return r};var k=function(){var f=L.getLinkageRemoteURL(),C=new com.kingdee.bos.qing.linkage.LinkageManage;C.setCurrentLinkageTag(q);C.initDesigntime(f,com.kingdee.bos.qing.integration.LinkageJumper.jump)}}function Ha(b,c,e,l){var A=this,w,r,q,H,z,k,f;this.setJsonReferenceMap=function(N){f=N};this.setChangeSchemaListener=function(N){z=N};this.setChangeSchemaChecker=function(N){k=
N};this.setRemoteImpl=function(N){r=N};this.getJqUi=function(){w||(q||(q=new qa),q.addActionListeners(t),w=q.getJqUi());return w};this.resize=function(){q.initSchemaList();H&&H.setAnimateHeight(A.getHeight(),C)};this.loadAttrs=function(N){q||(q=new qa);N=new da(r,function(Q){if(Q){for(var ua=[],O=0;O<Q.length;O++){var K=new db;K.fromJsonObject(Q[O]);ua.push(K)}q.setAllSchemas(ua);q.setSchemas(ua);q.initSchemaList();H&&H.setAnimateHeight(A.getHeight(),C)}},function(Q){return!0});N.setBlockingJqUi(l);
N.getPublishSchema(c,b)};this.getHeight=function(){return w.prop("offsetHeight")+1};var C=function(){var N=H.getMaxHeight();null!=N&&q.setMaxHeight(N-25)},t={itemClickListener:function(N){k?k(y,N):y()},selectedChangedListener:function(N){N=N.getSelected();q.setSelectedSchema(N)}},y=function(){var N=q.getSelectedSchema();N&&null!=N.getFId()&&f&&(f.schemaId=N.getFId(),(new da(r,function(Q){Q&&H&&(H.setAnimateHeight(0),z&&z(Q.model,f,Q.version))},function(Q){return!0})).loadSchema(c,f))};this.setParameterPassToUI=
function(N){H=N}}function qa(){var b,c,e;this.setAllSchemas=function(w){e=w};this.getAllSchemas=function(){return e};this.setSchemas=function(w){c.getJqUi().css("top","0");c.setItemModels(w)};this.setMaxHeight=function(w){var r=b.find(".schema-frequentlyused").css("marginTop"),q=0;null!=r&&2<r.length&&(q=r.substring(0,r.length-2));b.css("max-height",w+"px");c.getJqUi().css("max-height",w-c.getJqUi().parent().prop("offsetTop")-c.getJqUi().prop("offsetTop")-q-2+"px")};this.setSelectedSchema=function(w){c.setSelected(w)};
this.getSelectedSchema=function(){return c.getSelected()};this.getSchemas=function(){return c.getItemModels()};this.addActionListeners=function(w){c.addItemClickListener(function(r,q){w.itemClickListener(r)});c.addSelectedChangedListener(function(r){w.selectedChangedListener(r)})};this.getJqUi=function(){return b};this.initSchemaList=function(){var w=c.getJqUi();0<w.length&&(c.getJqUi().css("height","30px"),c.getJqUi().css("height",w.prop("scrollHeight")))};var l=function(w,r,q){q.text(r.getSchemaName());
q.prop("title",r.getSchemaName());r&&r.IsDefault()&&(q.text(g.get("def","(\u9ed8\u8ba4)")+r.getSchemaName()),q.prop("title",g.get("def","(\u9ed8\u8ba4)")+r.getSchemaName()),q.css("font-weight","bold"));w.append(q)},A=function(){c=new Pa;c.setCustomItemPainter(l);var w=$("<div>");w.addClass("schema-content-div");w.append(c.getJqUi());var r=$("<div>");r.addClass("schema-frequentlyused");r.addClass("schema-default");r.append(w);return r};(function(){b=$("<div>");b.on("click",function(w){Va(w)});b.addClass("schema-mainPan");
b.append(A())})()}function La(b){this.getMaxHeight=function(){var c=b.getJqContainer().parent().css("maxHeight");return null!=c&&2<c.length?c.substring(0,c.length-2):null};this.setAnimateHeight=function(c,e){b.animateHeight(c,e)}}function Ea(b){var c,e,l,A;(function(){c=$("<div>");c.addClass("workbench-ctrl-common-modallayer");c.appendTo(b);c.on("click",function(q){w()});e=$("<div>");e.addClass("workbench-toolbar-dropdown-area");e.appendTo(c);e.css("max-height",Math.floor(c.prop("clientHeight")-e.prop("offsetTop")-
30));l=$("<div>");l.addClass("workbench-toolbar-dropdown-container");l.appendTo(e);A=$("<div>");A.addClass("workbench-toolbar-dropdown-collapse");A.appendTo(e);var r=$("<div>");r.text("<<");r.addClass("workbench-toolbar-dropdown-collapse-text");r.appendTo(A)})();this.getJqContainer=function(){return l};this.animateHeight=function(r,q){0===r?w():(r+=A.prop("offsetHeight"),e&&e.animate({height:r},{duration:100,queue:!1,complete:function(){q&&q()}}))};var w=function(){e&&(e.animate({height:0},function(){c.remove()}),
e=null)}}function Va(b){b&&b.stopPropagation?b.stopPropagation():window.event&&(window.event.cancelBubble=!0)}function Ja(b){B.call(this);var c=this,e=c.protectedMethod,l,A,w;(function(){c.setSize(390,200);var r=g.get("modifyCardTitle","\u4fee\u6539\u5361\u7247\u540d\u79f0");e.setTitle(r);e.setContentPaneCreator(function(){if(!l){l=$("<div>");var q=new ka;q.setRequired(!0);q.setText(g.get("cardName","\u5361\u7247\u540d\u79f0"));q=q.getJqUi();q.attr("title",g.get("cardName","\u5361\u7247\u540d\u79f0"));
l.append(q);u.layoutCtrl(q,25,15,70,23);A=new ea;A.setText(b);q=A.getJqUi();l.append(q);u.layoutCtrl(q,103,15,217,23)}return l});e.setClosingChecker(function(q){q=A.getText().trim();if(!q)return e.getMessageCurtain().showPrompt(g.get("cardNameIsBlank","\u5361\u7247\u540d\u79f0\u4e0d\u80fd\u4e3a\u7a7a\u3002")),!1;if(50<q.length)return e.getMessageCurtain().showPrompt(g.get("nameTooLong","\u540d\u79f0\u957f\u5ea6\u4e0d\u80fd\u8d85\u8fc750\u4e2a\u5b57\u7b26\u3002")),!1;q!==b&&w&&w(q);return!0});e.setClosingAction(function(){e.destroy();
return!0})})();this.setFunCloseDialogCallBack=function(r){w=r}}"undefined"==typeof com&&(com={});"undefined"==typeof com.kingdee&&(com.kingdee={});"undefined"==typeof com.kingdee.bos&&(com.kingdee.bos={});"undefined"==typeof com.kingdee.bos.qing&&(com.kingdee.bos.qing={});"undefined"==typeof com.kingdee.bos.qing.workbench&&(com.kingdee.bos.qing.workbench={});var Da=com.kingdee.bos.qing.workbench;Da.WorkbenchTabContainer=function(){var b=this,c,e,l,A,w,r,q,H=[],z;this.setMessageCurtain=function(G){z=
G};this.getJqUi=function(){c||(c=$("<div>"),e=new ma,e.addTabSelectedListener(f),e.addTabCloseListener(C),A=new n,A.setShowSchemaAreaHandler(t),A.setFixedTabClickHandler(function(G){y(!0)}),e.setWorkbenchFixedTabHead(A),L.createMessageBoxUi(e.getJqUi()),c.append(e.getJqUi()),k());return c};var k=function(){com.kingdee.bos.qing.assistant.common.Integration.setOpenQingGPTListener(function(ba){if(com.kingdee.bos.qing.assistant.common.Integration.isShowAssistantPanel()){var x=b.getSelectedTab();x instanceof
pa||x instanceof ja?x.getDroppableHandler().openQingGPT(ba):"click"==ba.triggerEvent&&z&&z.showPrompt(g.get("unSupportCosmicTips","\u5f53\u524d\u9875\u7b7e\u6682\u4e0d\u652f\u6301\u201cCosmic \u667a\u80fd\u6570\u636e\u5206\u6790\u201d\u529f\u80fd\uff0c\u8bf7\u524d\u5f80\u201c\u5de5\u4f5c\u53f0\u201d\u7c7b\u578b\u7684\u9875\u7b7e\u4e2d\u4f7f\u7528\u3002"))}else"click"==ba.triggerEvent&&(ba=com.kingdee.bos.qing.ui.component.MessageDialog,x=ba.createFeedbackDialog(),x.setTitle(g.get("operationTips",
"\u64cd\u4f5c\u63d0\u9192")),x.setMsgImageType(ba.MSG_CONFIRM),x.setOptionType(ba.OPTION_OK),x.setButtonText(ba.RETURN_OK,g.get("close","\u5173\u95ed")),x.setMessage(g.get("cosmicComingTips","\u667a\u80fd\u5206\u6790\u52a9\u624b\u5373\u5c06\u4e0a\u7ebf\uff0c\u656c\u8bf7\u671f\u5f85\uff01")),x.showDialog())});if(-1!=location.href.indexOf("devtest.kingdee.com")){var G=$(top.document.querySelector("#gpt_gai_panel")),S=$(top.document.querySelector(".gptDragBox--fWxAX"));S&&S.remove();G.off("click");G.on("click",
function(){for(var ba={type:"openQingGPT",data:{triggerEvent:"click",switchSide:"true"}},x=top.window.frames,ca=0;ca<x.length;ca++)x[ca].postMessage(JSON.stringify(ba),"*")})}};this.getFixedTabHeadUi=function(){return A.getJqUi()};this.updateTabHeadUi=function(){A.updateUi();e&&e.updateAllTabTitle()};this.getSelectedTab=function(){return r?l:w};var f=function(G,S,ba){w=S;y(!1);K(S)},C=function(G,S){0===G.getDynamicTabPanes().length&&y(!0);Q(S)};this.checkNeedLoadWorkbenchGrid=function(G,S,ba){var x=
ua(G.getWorkbenchId());if(!x)return t(!1),!0;S?x instanceof ja?(t(!1),b.setFixedTab(x,!0)):(t(!1),b.addGridTab(x,!0)):x instanceof pa?(t(!1),b.addGridTab(x,!0)):ba(G,S);return!1};this.updateWorkbenchGridTabPaneTitle=function(G){if(G&&G.getWorkbenchId()&&G.getWorkbenchName()){var S=G.getWorkbenchId(),ba=G.getWorkbenchName();if(S=ua(S))S.setWorkbench(G),S instanceof pa?e.updateTabTitle(S,ba):S instanceof ja&&A.setTitle(ba)}};this.addTab=function(G,S){e.addTab(G,S)};this.addGridTab=function(G,S){N(G);
e.addTab(G,S);S&&K(G)};this.setFixedTab=function(G,S){l===G?y(!0):l?l&&(l.setCloseCallback(function(){y(!0);Q(l);l.getJqUi().remove();l.getWorkbenchGrid().getGrid().destroy();O(G);K(G)}),l.onClose()):(O(G),K(G),y(!0))};this.getWorkbenchGridTabPane=function(G){return ua(G)};this.removeWorkbenchGridTabPane=function(G){G=ua(G);if(G instanceof pa)e.removeTab(G);else if(G instanceof ja)G.onClose()};this.setShowSchemaArea=function(G){q=G};this.onSchemaAreaOpended=function(G){A.setOpenSchema(G)};var t=function(G){q&&
q(G)},y=function(G){(r=G)?(A.setSelected(!0),l.setSelected(!0),w&&e.removeSelected(w),e.setSelectedTabPane(null)):(A.setSelected(!1),l.setSelected(!1));L.fireMenuChangeListener()};this.getDynamicTabPanes=function(){return e.getDynamicTabPanes()};this.resize=function(){e.resize()};var N=function(G){if(ua(G.getId()))return!1;H.push(G);return!0},Q=function(G){for(var S=0;S<H.length;S++)if(H[S].getId()===G.getId())return H.splice(S,1),!0;return!1},ua=function(G){for(var S=0;S<H.length;S++)if(H[S].getId()===
G)return H[S]},O=function(G){l=G;N(G);e.getJqUi().find(".workbench-dynamictab-container").append(l.getJqUi());G=l.getTitle();A.setTitle(G)},K=function(G){(G instanceof ja||G instanceof pa)&&!G.getAlreadyInit()&&G.doInitGridAction()}};Da.WorkbenchIFrameTabPane=function(b,c){ab.AbstractTabPane.call(this);X.call(this);var e,l=this,A,w,r,q,H;this.setIconName=function(f){e=f};this.getIconName=function(){return e};this.setFunOpenNewTab=function(f){H=f};this.getId=function(){return b};this.setTitle=function(f){A=
f};this.getTitle=function(){return A};this.getJqUi=function(){w||(w=$("<div>"),r=$("<iframe>"),r.on("load",function(){try{var f=r[0].contentWindow;if(f&&f.com&&f.com.kingdee&&f.com.kingdee.bos&&f.com.kingdee.bos.qing){var C=f.com.kingdee.bos.qing.AnalysisSceneOuterApi;C&&(C.setClosingRequestListener(l.onClose),C.setFunOpenNewTab&&C.setFunOpenNewTab(H))}}catch(t){}}),r.attr("src",c),r.attr("name","QING_CONTEXT_TAB"),r.attr("allowFullscreen",!0),r.attr("allowtransparency",!0),r.attr("loading","lazy"),
r.addClass("workbench-rightpane-tab-iframe ."+b),w.addClass("workbench-rightpane-tab-iframe"),w.append(r));return w};this.protectedAskCloseable=function(f){try{if(r){var C=r[0].contentWindow;if(C&&C.com&&C.com.kingdee&&C.com.kingdee.bos&&C.com.kingdee.bos.qing)var t=C.com.kingdee.bos.qing.AnalysisSceneOuterApi;t&&t.isDirtyToForbidClosing()?k(f):f(!0)}else f(!0)}catch(y){f(!0)}};this.toggleMask=function(f){if(!q){var C=$("<div>"),t=$("<div>");t.addClass("sa-ctrl-msgct");t.addClass("sa-ctrl-msgct_prompt");
var y=$("<div>");y.addClass("sa-ctrl-msgct-icon");Xa.background(y,"msg-prompt");y.appendTo(t);y=$("<div>");y.addClass("sa-ctrl-msgct-title");y.text(g.get("workbenchIframeDragHintTitle","\u63d0\u793a"));y.appendTo(t);y=$("<div>");y.addClass("sa-ctrl-msgct-text");y.text(g.get("workbenchIframeDragHintText","\u5f53\u524d\u6253\u5f00\u7684\u9875\u7b7e\u4e0d\u662f\u5de5\u4f5c\u53f0\u9875\u7b7e\uff0c\u65e0\u6cd5\u5c06\u5de6\u4fa7\u5185\u5bb9\u62d6\u62fd\u5230\u5f53\u524d\u9875\u7b7e\u3002"));y.appendTo(t);
t.appendTo(C);t=$("<div>");u.layoutCtrlWithLRTB(t,0,0,null,0,0);t.css("background-color","#3737377f");t.appendTo(C);u.layoutCtrlWithLRTB(C,0,0,null,0,0);C.appendTo(w);q=C}f?q.show():q.hide()};var z=!0,k=function(f){if(z){var C=com.kingdee.bos.qing.ui.component.MessageDialog,t=C.createFeedbackDialog();t.setMsgImageType(C.MSG_CONFIRM);t.setButtonText(C.RETURN_OK,g.get("sureExit","\u76f4\u63a5\u9000\u51fa"));t.setButtonText(C.RETURN_CANCEL,g.get("sureReturn","\u8fd4\u56de\u7f16\u8f91"));var y=A;y&&25<
y.length&&(y=y.substring(0,25)+"...");t.setMessage(g.get("confirmExit","\u201c#1\u201d \u68c0\u6d4b\u5230\u60a8\u6709\u66f4\u6539\u5185\u5bb9\uff0c\u662f\u5426\u4e0d\u4fdd\u5b58\u76f4\u63a5\u9000\u51fa\uff1f\u82e5\u4e0d\u4fdd\u5b58\uff0c\u5c06\u4e22\u5931\u8fd9\u4e9b\u66f4\u6539\u3002").replace("#1",y));t.showDialog();t.setClosingChecker(function(N){N==C.RETURN_OK?((N=r[0].contentWindow.com.kingdee.bos.qing.AnalysisSceneOuterApi)&&N.doBeforeClosing(),f(!0)):f(!1);return!0});t.setClosedAction(function(N){z=
!0});z=!1}}};Da.WorkbenchFixedTabPane=ja;Da.WorkbenchGridTabPane=pa;Da.WorkBenchMenuPane=function(){var b,c=[],e,l,A,w,r,q,H,z=!1,k=new Ra;this.getJqUi=function(){if(!b){b=$("<div>");b.addClass("workbench-menu-lists");f();var O=e.getJqUi(),K=O.find(".sa-ctrl-common-border");K&&K.css("border","0px solid #dbdbdb");b.append(O)}return b};this.setSearchText=function(O){r=O};this.getCurrentSelectedNode=function(){return w};this.setSelected=function(O){z=!0;e.setSelecteds(O)};var f=function(){e||(e=new bb,
e.setCustomItemPainter(N),e.addSelectedChangedListener(C),e.setUserObject(c),e.setItemModels(c),setTimeout(function(){L.fireMenuChangeListener()},500))},C=function(O,K,G){w=G=G&&0<G.length?G[0]:K[0]?K[0]:A;z||(G instanceof fb?(G.setOpenDir(!G.isOpenDir()),y(G,!1),ua(O.getUserObject())):l&&l(G));K=(K=(K=K[0])?K:A)?K:G;var S=O.getJqUi().find(".workbench-menu-lists-item-selected");S&&S.removeClass("workbench-menu-lists-item-selected");(S=O.getJqUi().find(".workbench-lower-triangle-selected"))&&S.removeClass("workbench-lower-triangle-selected");
(S=O.getJqUi().find(".workbench-right-triangle-selected"))&&S.removeClass("workbench-right-triangle-selected");S=O.getItemUiByModel(G);S.addClass("sa-ctrl-list-item_selected_enabled");var ba=S.find(".workbench-menu-lists-dir-text");ba&&ba.addClass("workbench-menu-lists-item-selected");K instanceof fb||(ba=O.getItemUiByModel(K).find(".workbench-menu-lists-item-icon"),D.background(ba,K.getScene()),K.isPreset()&&(O=O.getJqUi().find(".workbench-menu-lists-item-preset-selected"))&&O.removeClass("workbench-menu-lists-item-preset-selected"));
G instanceof fb?(O=S.find(".workbench-menu-lists-dir-icon"),t(G.isOpenDir(),O,!0)):((O=S.find(".workbench-menu-lists-item-icon"))&&D.background(O,G.getScene()+"-selected"),G.isPreset()&&(G=S.find(".workbench-menu-lists-item-preset-tag"))&&G.addClass("workbench-menu-lists-item-preset-selected"));z=!1},t=function(O,K,G){O?(K.addClass("workbench-lower-triangle"),G&&K.addClass("workbench-lower-triangle-selected"),K.removeClass("workbench-right-triangle"),K.removeClass("workbench-right-triangle-selected")):
(K.addClass("workbench-right-triangle"),G&&K.addClass("workbench-right-triangle-selected"),K.removeClass("workbench-lower-triangle"),K.removeClass("workbench-lower-triangle-selected"))},y=function(O,K){O.setHidden(K);K=O.getChildren();if(O.getChildren())for(O=0;O<K.length;O++)K[O]instanceof fb?K[O].getParentNode().isOpenDir()&&!K[O].getParentNode().isHidden()?y(K[O],!K[O].isHidden()):y(K[O],!0):K[O].getParentNode().isHidden()||!K[O].getParentNode().isOpenDir()?K[O].setHidden(!0):K[O].setHidden(!K[O].isHidden())},
N=function(O,K){if(K){if(K instanceof fb){O.addClass("workbench-menu-lists-dir");var G=$("<div>"),S=$("<span>"),ba=K.getGroupName(),x=Ga.createWarning();u.layoutCtrl(x,0,10);ba===Ua.CLOUD_HAS_BEEN_DELETED?(ba=g.get("cloudHasBeenDeleted","\u8be5\u670d\u52a1\u4e91\u5df2\u88ab\u5220\u9664"),S.css({"margin-left":"16px"}),G.append(x)):ba===Ua.APP_HAS_BEEN_DELETED?(ba=g.get("appHasBeenDeleted","\u8be5\u5e94\u7528\u5df2\u88ab\u5220\u9664"),S.css({"margin-left":"16px"}),G.append(x)):ba===Ua.APP_MENU_HAS_BEEN_DELETED&&
(ba=g.get("appMenuHasBeenDeleted","\u8be5\u5e94\u7528\u83dc\u5355\u5df2\u88ab\u5220\u9664"),S.css({"margin-left":"16px"}),G.append(x));r?S.text(ba+" ("+K.getSearchedNumber()+")"):S.text(ba);x.attr("title",ba);G.append(S);G.addClass("workbench-menu-lists-dir-text");G.css("margin-left",22*(K.getSubNodeLevel()+1)+"px");O.attr("title",ba);S=$("<div>");S.addClass("workbench-menu-lists-dir-icon");S.css("margin-left",22*K.getSubNodeLevel()+"px");t(K.isOpenDir(),S,!1);O.append(G);O.append(S);O.on("click",
function(na){P.interestInBehavior(P.WORKBENCH_MENU_DIR_OPERTAION,P.WORKBENCH_MENU_TREE_OPERATION_FLODER);A=e.getSelecteds()[0];e.setSelecteds([])})}else{O.addClass("workbench-menu-lists-dir");O.addClass(ha.DEFAULT_GRID_DRAG_IN_CLASS);G=$("<div>");r?Q(G,K.getName(),K.getId()):G.text(K.getName());G.addClass("workbench-menu-lists-dir-text");G.css({"margin-left":22*K.getSubNodeLevel()+23+"px"});G.attr("gs-id",K.getId());O.attr("title",K.getName());O.attr("gs-id",K.getId());S=$("<span>");S.addClass("workbench-menu-lists-item-icon");
S.attr("gs-id",K.getId());S.css("margin-left",22*K.getSubNodeLevel()+"px");D.background(S,K.getScene());O.append(G);O.append(S);if(K.isPreset()){ba=$("<div>");x=g.get("preset","\u9884\u7f6e");var ca=k.measureWidth(x)+14;ba.text(x);ba.addClass("workbench-menu-lists-item-preset-tag");ba.css("margin-left",22*K.getSubNodeLevel()+"px");S.css("margin-left",22*K.getSubNodeLevel()+ca+"px");G.css("margin-left",22*K.getSubNodeLevel()+ca+24+"px");O.append(ba)}O.on("mousedown",function(na){q=na.offsetX;H=na.offsetY});
O.on("mouseup",function(na){q===na.offsetX&&H===na.offsetY&&(A=e.getSelecteds()[0],e.setSelecteds([]))})}K.isHidden()&&O.hide()}},Q=function(O,K,G){var S=r.toUpperCase(),ba=K.toUpperCase(),x=ba.split(S),ca=S.length,na=$("<div>");na.attr("gs-id",G);for(var va in x){var Ka=ba.indexOf(x[va]),U=K.substr(0,x[va].length);Ka+=x[va].length;var V=ba.length-Ka;ba=ba.substr(Ka,V);K=K.substr(Ka,V);Ka=$("<span>");Ka.attr("gs-id",G);Ka.text(U);Ka.appendTo(na);if(1<x.length){V=ba.indexOf(S);U=K.substr(V,ca);V+=
ca;var la=ba.length-V;ba=ba.substr(V,la);K=K.substr(V,la);V=$("<span>");V.text(U);V.css("color","#FF0000");V.attr("gs-id",G);V.appendTo(Ka)}}na.appendTo(O);na.attr("title",na.text())},ua=function(O){var K=b.find(".sa-ctrl-list-owner");K.empty();for(var G=$(document.createDocumentFragment()),S=0;S<O.length;S++){var ba=$("<div>");ba.addClass("sa-ctrl-list-item");ba.addClass("sa-ctrl-list-item_enabled");ba.addClass("sa-ctrl-list-item-defaultlayout");ba.css("height","32px");ba.css("line-height","32px");
var x=O[S];ba.data("model",x);N(ba,x);G.append(ba)}K.append(G);setTimeout(function(){L.fireMenuChangeListener()},500)};this.setItemModels=function(O){c=O};this.setSubItemSelectedListener=function(O){l=O}};Da.WorkbenchSchemaArea=function(){var b=this,c,e,l,A,w,r,q=[],H,z,k,f,C,t,y=[];this.setRemoteImpl=function(x){w=x};this.setLoadWorkbenchFinishHandler=function(x){f=x};this.setModifyNameFinishHandler=function(x){C=x};this.setOpenInNewTabHandler=function(x){H=x};this.setOpenInFixedTabHandler=function(x){z=
x};this.setDeletedWorkbenchHandler=function(x){k=x};this.setMessageCurtain=function(x){r=x};this.getJqUi=function(){if(c)return c;c=$("<div/>");c.addClass("workbench-schema-area");O();c.append(e);r||(r=new $a,r.getJqUi().appendTo(c));return c};this.loadWorkbench=function(x){var ca=new da(w,function(na){if(na.myWorkbenches){for(var va=[],Ka=0;Ka<na.myWorkbenches.length;Ka++){var U=new ib;U.fromJsonObject(na.myWorkbenches[Ka]);va.push(U)}A=va}if(na=q)for(var V in na)na[V].getJqUi().remove();V=A;q=[];
for(na=0;na<V.length;na++){Ka=V[na];U=K();var la=new wa;la.setData(!0,U,Ka,1<A.length);l.append(la.getJqUi());u.layoutCtrl(la.getJqUi(),418*na,0,400,256);q.push(la)}0===va.length?(va=new ib,va.setWorkbenchName(g.get("defaultWorkbenchName","\u6211\u7684\u5de5\u4f5c\u53f0")),va.setDefault(!0),N(va)):(t=b.getSelectedWorkbench(x),b.selectWorkbench(t),f&&f())},function(na,va){return!1});ca.setShowBlocking(!1);ca.loadWorkbenches()};var N=function(x){var ca=new da(w,function(na){x.getWorkbenchId()?(r.showSuccess(g.get("modifyWBNameSuc",
"\u4fee\u6539\u5de5\u4f5c\u53f0\u540d\u79f0\u6210\u529f\u3002")),S(x.getWorkbenchId()).setWorkbenchName(x.getWorkbenchName()),C&&C(x)):(r.showSuccess(g.get("createWorkbenchSuccess","\u65b0\u5efa\u5de5\u4f5c\u53f0\u65b9\u6848\u6210\u529f\u3002")),b.loadWorkbench(na))},function(na,va){return 1011003===na?(r.showPrompt(g.get("workbenchNameDuplicate","\u5de5\u4f5c\u53f0\u540d\u79f0\u5df2\u5b58\u5728\u3002")),!0):1011015===na?(r.showPrompt(g.get("workbenchNumLimit","\u5f53\u524d\u5de5\u4f5c\u53f0\u6570\u91cf\u5df2\u8fbe\u5230\u6700\u5927\u9650\u5236\uff0c\u4e0d\u80fd\u65b0\u5efa\u66f4\u591a\u7684\u5de5\u4f5c\u53f0\u3002")),
!0):!1});ca.setShowBlocking(!1);ca.saveOrUpdateWorkbench(x.toJsonObject())},Q=function(x,ca,na){var va=!x.isDefault();va&&y&&-1!==y.indexOf(x.getWorkbenchId())?(va=g.get("setDefaultWorkbenchWarning",'\u5de5\u4f5c\u53f0"#1"\u5df2\u7ecf\u56fa\u5b9a\u5728\u9875\u7b7e\u680f\u4e2d\uff0c\u4e0d\u80fd\u8bbe\u4e3a\u9ed8\u8ba4\u5de5\u4f5c\u53f0\u3002'),va=va.replace("#1",x.getWorkbenchName()),r.showPrompt(va)):(x.setDefault(va),va&&P.interestInBehavior(P.WORKBENCH_SCHEMA_LIST_OPERATION,P.WORKBENCH_SCHEMA_LIST_OPERATION_SET_DEFAULT),
va=new da(w,function(Ka){ca?b.loadWorkbench(na):(x.isDefault()?r.showSuccess(g.get("setDefaultWorkbenchSuc","\u8bbe\u7f6e\u9ed8\u8ba4\u5de5\u4f5c\u53f0\u6210\u529f\u3002")):r.showSuccess(g.get("cancelDefaultWorkbenchSuc","\u53d6\u6d88\u8bbe\u4e3a\u9ed8\u8ba4\u5de5\u4f5c\u53f0\u6210\u529f\u3002")),b.setDefaultWorkbench(x))},function(Ka,U){return!1}),va.setShowBlocking(!1),va.setDefaultWorkbench(x.toJsonObject()))};this.setDefaultWorkbench=function(x){for(var ca=0;ca<q.length;ca++)x.getWorkbenchId()===
q[ca].getWorkbenchId()?q[ca].setDefault(x.isDefault()):q[ca].setDefault(!1)};var ua=function(x){if(t&&x.getWorkbenchId()===t.getWorkbenchId()){var ca=g.get("closeInCurTabBeforeDelete","\u5de5\u4f5c\u53f0 \"'#1'\" \u5df2\u7ecf\u5728\u5f53\u524d\u9875\u7b7e\u4e2d\u6253\u5f00\uff0c\u8bf7\u5173\u95ed\u540e\u518d\u5220\u9664\u3002");ca=ca.replace("#1",x.getWorkbenchName());b.showHint(!1,ca)}else{ca=g.get("deleteWorkbenchWarning",'\u786e\u5b9a\u8981\u5220\u9664\u5de5\u4f5c\u53f0"#1"\u5417\uff1f');y&&-1!==
y.indexOf(x.getWorkbenchId())&&(ca=g.get("deleteWorkbenchPinWarning",'\u5de5\u4f5c\u53f0"#1"\u5df2\u7ecf\u5728\u9875\u7b7e\u680f\u4e2d\u56fa\u5b9a\uff0c\u786e\u8ba4\u5220\u9664\u8be5\u5de5\u4f5c\u53f0\u5417\uff1f'));ca=ca.replace("#1",x.getWorkbenchName());var na=R.createFeedbackDialog();na.setOptionType(R.OPTION_OK_CANCEL);na.setMsgImageType(R.MSG_DELETE);na.setMessage(ca);na.setClosingChecker(function(va){va===R.RETURN_OK&&(t&&t.getWorkbenchId()===x.getWorkbenchId()&&(t=null),va=new da(w,function(Ka){b.showHint(!0,
g.get("deleteSuccess","\u5220\u9664\u6210\u529f\u3002"));b.loadWorkbench();k&&k(x)},function(Ka,U){return 1011014===Ka?(r.showError(g.get("deleteWorkbenchTip","\u65e0\u6cd5\u5220\u9664\uff0c\u9ed8\u8ba4\u9700\u8981\u4fdd\u7559\u4e00\u4e2a\u5de5\u4f5c\u53f0\u3002")),!0):!1}),va.setShowBlocking(!1),va.deleteWorkbench(x.getWorkbenchId()));return!0});na.showDialog()}};this.selectWorkbench=function(x){t=x;for(var ca=0;ca<q.length;ca++)q[ca].setSelected(!1);S(x.getWorkbenchId()).setSelected(!0)};this.getSelectedWorkbench=
function(x){if(x){a:{for(var ca=A,na=0;na<ca.length;na++)if(ca[na].getWorkbenchId()===x){x=ca[na];break a}x=null}return x}return t?t:(x=ba(A))?x:A[0]};this.setWorkbenchPreviewPic=function(x,ca){(x=S(x))&&x.setPreviewPic(ca)};this.showHint=function(x,ca){x?r.showSuccess(ca):r.showPrompt(ca)};this.setPinTabIdList=function(x){y=x};this.getDefaultWorkbench=function(){return ba(A)};this.checkWorkbenchExist=function(x){return S(x)?!0:!1};this.updateScrollToSelected=function(){var x=t.getWorkbenchId();if(x=
S(x))x=x.getJqUi().position().left,e.scrollLeft(x)};var O=function(){e=$("<div class='workbench-schema-area-part'/>");var x=$("<div class='workbench-schema-area-part-label'/>"),ca=$("<div class='workbench-schema-area-part-new-scheme'/>"),na=$("<div class='workbench-schema-area-part-new-schema-icon'/>");D.background(na,"icon_add_on");na.appendTo(x);var va=$("<div/>");va.text(g.get("createSchema","\u65b0\u5efa\u5de5\u4f5c\u53f0"));va.css("float","left");ca.append(na);ca.append(va);ca.on("click",function(){P.interestInBehavior(P.WORKBENCH_SCHEMA_LIST_OPERATION,
P.WORKBENCH_SCHEMA_LIST_OPERATION_NEW);var Ka=q&&10<=q.length?!1:!0;Ka?G(null):r.showPrompt(g.get("workbenchNumLimit","\u5f53\u524d\u5de5\u4f5c\u53f0\u6570\u91cf\u5df2\u8fbe\u5230\u6700\u5927\u9650\u5236\uff0c\u4e0d\u80fd\u65b0\u5efa\u66f4\u591a\u7684\u5de5\u4f5c\u53f0\u3002"))});ca.appendTo(x);x.appendTo(e);l=$("<div class='workbench-schema-area-part-content'/>");l.appendTo(e)},K=function(){return{funSchemaDeleteHandler:function(x){P.interestInBehavior(P.WORKBENCH_SCHEMA_LIST_OPERATION,P.WORKBENCH_SCHEMA_LIST_OPERATION_DELETE);
ua(x)},funSchemaDefaultHandler:function(x){Q(x)},funSchemaNameModifyHandler:function(x){P.interestInBehavior(P.WORKBENCH_SCHEMA_LIST_OPERATION,P.WORKBENCH_SCHEMA_LIST_OPERATION_MODIFY_NAME);G(x)},funSchemaOpenNewHandler:function(x){P.interestInBehavior(P.WORKBENCH_SCHEMA_LIST_OPERATION,P.WORKBENCH_SCHEMA_LIST_OPERATION_NEW_TAB);H&&H(x)},funSchemaOpenFixedHandler:function(x){z&&z(x)}}},G=function(x){x=new aa(x);x.setFunCloseDialogCallBack(N);x.setFunWorkbenchNameCheck(function(ca){if(A)for(var na=
0;na<A.length;na++)if(A[na].getWorkbenchName()===ca)return!0;return!1});x.showDialog()},S=function(x){for(var ca=0;ca<q.length;ca++)if(x===q[ca].getWorkbenchId())return q[ca]},ba=function(x){for(var ca=0;ca<x.length;ca++)if(x[ca].isDefault())return x[ca];return null}};Da.DesignerScene=za;Da.WorkbenchCardContainerFactory=new function(){var b={};this.getCardContainer=function(c){if(c=b[c])return new c};this.register=function(c,e){b[c]=e}};var g,u,D,ha,W,L,F,P,ka,ea,Xa,ab,bb,fb,hb,eb,ib,da,$a,Na,m,B,
M,R,Aa,Za,Sa,Wa,db,Pa,Ba,Ca,Qa,Ya,Ua,Ga,Ra;(function(){var b=com.kingdee.bos.qing;hb=b.CodeLoader;b=com.kingdee.bos.qing.common;eb=b.Util;u=b.DomUtil;Ra=b.TextMeasurer;b=com.kingdee.bos.qing.framework.common;g=b.MultilanguageManager.createPackageAccessor(Da);Ca=b.MultilanguageManager.createPackageAccessor(com.kingdee.bos.qing.scene);b=com.kingdee.bos.qing.ui.component;Xa=b.Icons;bb=b.List;ka=b.Label;ea=b.TextField;ab=b.DynamicTabContainer;B=b.AbstractModalDialog;$a=b.MessageCurtain;R=b.MessageDialog;
Za=b.MenuModel;Sa=b.MenuItemModel;Wa=b.SimpleConfirmer;b=com.kingdee.bos.qing.workbench;D=b.MyIcons;ha=b.QingGrid;W=b.GridOption;b=com.kingdee.bos.qing.workbench.common;L=b.Integration;da=b.Facade;M=b.RemoteImpl;F=b.MetricIntegration;P=b.WorkbenchBehavior;b=com.kingdee.bos.qing.workbench.model;fb=b.MenuFolderNode;ib=b.Workbench;Ba=b.WorkbenchModel;Qa=b.WorkbenchUtil;b=com.kingdee.bos.qing.scene.cardExhibition;Na=b.IconContainer;m=b.Icons;b=com.kingdee.bos.qing.theme.common;Aa=b.Icons;b=com.kingdee.bos.qing.schemamanage.model;
db=b.SchemaAttrModel;b=com.kingdee.bos.qing.schemamanage.ui;Pa=b.List;b=com.kingdee.bos.qing.assistant;Ya=b.AssistantPanel;b=com.kingdee.bos.qing.publish.env;Ua=b.AbstractPublishAppMenuNode;b=com.kingdee.bos.qing.common.ui;Ga=b.CommonIconUtil})();T.SCHEMA_BIZ_VERSION=-1;T.SCHEMA_MODIFIED_VERSION=1;Da.WorkbenchCardContainerFactory.register(Ba.WidgetType_Square,function(){T.call(this);var b=this,c=this.protectedMethod,e=new Na;this.getCardExhibition=function(){return new Fa};this.protectedCustomHead=
function(q){b.initHeadTitle();l(q)};var l=function(q){var H=$("<div class='sa-qing-publish-card-icon'>"),z=$("<div class='sa-qing-publish-card-icon'>"),k=$("<div class = 'sa-qing-publish-card-icon'>"),f=$("<div class= 'sa-qing-publish-card-icon'>"),C=$("<div class= 'sa-qing-publish-card-icon'>");z.on("click",function(){P.interestInBehavior(P.WORKBENCH_GRID_SQUARE_OPERATION,P.WORKBENCH_GRID_SQUARE_OPERATION_DESIGNER);var y=c.getMainUi(),N=ya.PERM_TYPE_ENTER_SQUARE;b.getExhibition().checkOperatePermAndPrompt(y,
N)&&(y=g.get("modifyWorkbenchSquareWidget","\u7f16\u8f91\u6570\u636e\u6597\u65b9\uff1a#1").replace("#1",c.getTitle()),b.protectedOpenDesigner(y,!0,w))});m.background(z,"btn-edit");z.on("mouseover",function(y){m.background(z,"btn-edit-on")});z.on("mouseout",function(y){m.background(z,"btn-edit")});z.attr("title",Ca.get("enterEdit","\u8fdb\u5165\u8bbe\u8ba1\u5668"));H.on("click",function(){P.interestInBehavior(P.WORKBENCH_GRID_SQUARE_OPERATION,P.WORKBENCH_GRID_SQUARE_OPERATION_ANALYSIS);var y=c.getMainUi(),
N=ya.PERM_TYPE_ENTER_ANALYSIS;b.getExhibition().checkOperatePermAndPrompt(y,N)&&(y=L.getOpenAnalysisUrl(b.getTag(),c.getWidgetBizId(),c.getWorkbenchId(),c.getRefType(),c.getRefMapUid()),N=g.get("widgetTypeLonger","\u6570\u636e\u5206\u6790")+"-"+c.getTitle(),b.fireOpenNewTab(N,y))});m.background(H,"btn-analysis");H.on("mouseover",function(y){m.background(H,"btn-analysis-on")});H.on("mouseout",function(y){m.background(H,"btn-analysis")});H.attr("title",Ca.get("enterAnalysis","\u8fdb\u5165\u201c\u6570\u636e\u5206\u6790\u201d"));
k.on("click",A);m.background(k,"btn-refresh");k.on("mouseover",function(y){m.background(k,"btn-refresh-on")});k.on("mouseout",function(y){m.background(k,"btn-refresh")});k.attr("title",Ca.get("cardRefresh","\u5237\u65b0"));f.on("click",function(){b.getExhibition().showExtraFilter(c.getMainUi())});m.background(f,"btn-filter");f.on("mouseover",function(y){m.background(f,"btn-filter-on")});f.on("mouseout",function(y){m.background(f,"btn-filter")});f.attr("title",Ca.get("cardFilter","\u8fc7\u6ee4\u6761\u4ef6"));
f.hide();C.on("click",b.protectedRemoveSelf);D.background(C,"icon_delete");C.on("mouseover",function(y){D.background(C,"icon_delete_hover")});C.on("mouseout",function(y){D.background(C,"icon_delete")});C.attr("title",g.get("delete","\u5220\u9664"));C.hide();e.addIconUi(z);e.addIconUi(H);e.addIconUi(k);var t=e.getJqUi();e.setParent(q);e.hide();$(c.getJqOwner()).on("mouseenter",function(){b.isNeedShowOptBtn()&&(f.show(),e.show());C.show()});$(c.getJqOwner()).on("mouseleave",function(){f.hide();e.hide();
C.hide()});c.appendOperateBtnUI([C,t,f])},A=function(){b.refreshCardTitle();b.protectedCustomContent(c.getContentUi())},w=function(q){q&&b.setJsonModelBook(q);b.protectedRefreshChart(c.getContentUi(),q)};this.getScene=function(){return Ba.WidgetType_Square};this.remoteSchemaContent=function(q,H){r(q,H)};var r=function(q,H){var z=c.getContentUi();b.getJsonReferenceMap().tag=b.getTag();H=new da(c.getWorkbenchRemoteImpl(),function(k){var f=k.operation;b.setJsonModelBook(k.model);b.setJsonOperation(f);
q&&q(k)},H);H.setBlockingJqUi(z);H.loadSchema(c.getWorkbenchId(),b.getJsonReferenceMap())}});Da.WorkbenchCardContainerFactory.register(Ba.WidgetType_Longer,function(){T.call(this);var b=this,c=this.protectedMethod,e=new Na;this.getCardExhibition=function(){return new Z};this.protectedCustomHead=function(H){b.initHeadTitle();l(H)};var l=function(H){var z=$("<div class='sa-qing-publish-card-icon'>"),k=$("<div class = 'sa-qing-publish-card-icon'>"),f=$("<div class= 'sa-qing-publish-card-icon'>"),C=$("<div class= 'sa-qing-publish-card-icon'>");
z.on("click",function(){P.interestInBehavior(P.WORKBENCH_GRID_LONGER_OPERATION,P.WORKBENCH_GRID_LONGER_OPERATION_DESIGNER);var t=c.getMainUi(),y=ya.PERM_TYPE_ENTER_SQUARE;b.getExhibition().checkOperatePermAndPrompt(t,y)&&(t=g.get("modifyWorkbenchLongerWidget","\u7f16\u8f91\u6570\u636e\u5206\u6790\uff1a#1").replace("#1",c.getTitle()),b.protectedOpenDesigner(t,!1,w))});m.background(z,"btn-edit");z.on("mouseover",function(t){m.background(z,"btn-edit-on")});z.on("mouseout",function(t){m.background(z,
"btn-edit")});z.attr("title",Ca.get("enterEdit","\u8fdb\u5165\u8bbe\u8ba1\u5668"));k.on("click",A);m.background(k,"btn-refresh");k.on("mouseover",function(t){m.background(k,"btn-refresh-on")});k.on("mouseout",function(t){m.background(k,"btn-refresh")});k.attr("title",Ca.get("cardRefresh","\u5237\u65b0"));C.on("click",r);D.backgroundWithHover(C,"icon_schema_list");C.attr("title",g.get("switchScheme","\u9009\u62e9\u5206\u6790\u65b9\u6848"));f.on("click",b.protectedRemoveSelf);D.background(f,"icon_delete");
f.on("mouseover",function(t){D.background(f,"icon_delete_hover")});f.on("mouseout",function(t){D.background(f,"icon_delete")});f.attr("title",g.get("delete","\u5220\u9664"));f.hide();e.addIconUi(C);e.addIconUi(z);e.addIconUi(k);C=e.getJqUi();e.setParent(H);e.hide();$(c.getJqOwner()).on("mouseenter",function(){b.isNeedShowOptBtn()&&e.show();f.show()});$(c.getJqOwner()).on("mouseleave",function(){e.hide();f.hide()});c.appendOperateBtnUI([f,C])},A=function(){b.refreshCardTitle();b.protectedCustomContent(c.getContentUi())};
this.getScene=function(){return Ba.WidgetType_Longer};var w=function(H,z,k){z&&b.setJsonReferenceMap(z);H&&b.setJsonModelBook(H);k&&b.setModelBookVersion(k);b.protectedRefreshChart(c.getContentUi(),H)},r=function(){var H=new Ea(c.getMainUi()),z=new Ha(c.getWidgetBizId(),c.getWorkbenchId(),c.getMenuItemInfo(),c.getMainUi());z.setRemoteImpl(c.getWorkbenchRemoteImpl());z.setChangeSchemaChecker(q);z.setChangeSchemaListener(function(f,C,t){P.interestInBehavior(P.WORKBENCH_GRID_LONGER_OPERATION,P.WORKBENCH_GRID_LONGER_OPERATION_SELECT_SCHEMA);
w(f,C,t)});z.setJsonReferenceMap(b.getJsonReferenceMap());var k=new La(H);z.setParameterPassToUI(k);H.getJqContainer().append(z.getJqUi());z.loadAttrs(H)};this.remoteSchemaContent=function(H,z){var k=c.getContentUi();z=new da(c.getWorkbenchRemoteImpl(),function(f){var C=f.operation,t=f.version;b.setJsonModelBook(f.model);b.setJsonOperation(C);b.setModelBookVersion(t);H&&H(f)},z);z.setBlockingJqUi(k);z.loadSchema(c.getWorkbenchId(),b.getJsonReferenceMap())};var q=function(H,z){z=z.getFId()===b.getJsonReferenceMap().schemaId;
var k=b.getModelBookVersion()===T.SCHEMA_MODIFIED_VERSION;!z&&k?(z=R.createFeedbackDialog(),z.setOptionType(R.OPTION_OK_CANCEL),z.setMsgImageType(R.MSG_DELETE),z.setMessage(g.get("switchSchemaPrompt","\u5f53\u524d\u663e\u793a\u7684\u65b9\u6848\u4e3a\u4fee\u6539\u540e\u7684\u4e2a\u6027\u5316\u65b9\u6848\uff0c\u5207\u6362\u540e\u8be5\u65b9\u6848\u5c06\u4e0d\u4f1a\u4fdd\u5b58\u3002\u786e\u8ba4\u8981\u5207\u6362\u65b9\u6848\u5417\uff1f")),z.setClosingChecker(function(f){f===R.RETURN_OK&&H();return!0}),
z.showDialog()):H()}});Da.WorkbenchCardContainerFactory.register(Ba.WidgetType_Dashboard,function(){sa.call(this);var b=this.protectedMethod,c=this,e;this.getPublishType=function(){return b.getMenuItemInfo().getRefType()};this.protectedCustomHead=function(l){c.initHeadTitle();c.addOperateIcon(l)};this.loadContent=function(l){l.empty();var A=L.getDsbIFrameUrl(b.getWidgetBizId());e=$("<iframe>");e.addClass("workbench-iframe-card");e.attr("src",A);e.on("load",function(){var w=e[0].contentWindow.com.kingdee.bos.qing.AnalysisSceneOuterApi;
w&&w.setFunOpenNewTab&&w.setFunOpenNewTab(c.getFunOpenNewTab())});e.appendTo(l)};this.getScene=function(){return Ba.WidgetType_Dashboard}});Da.WorkbenchCardContainerFactory.register(Ba.WidgetType_QingReport,function(){function b(f){try{var C=f.data;if(C.targetWidgetId===l.attr("id"))if("remove"===C.operation?e.protectedRemoveSelf():"QingRpt"===C.messageFrom?e.getJsonReferenceMap().filterValues=C.filterValues:"showEditTitleDialog"===C.operation&&c.createEditTitleDialog(),"getCardEditIconPosition"===
C.operation){c.getJqHead().empty();z();var t=C.value;A.css("width",t+10+"px");w.css("left",t+27+"px")}else"refreshCardTitle"===C.operation?k():"loadCompleted"===C.operation&&(c.getJqHead().empty(),z())}catch(y){}}sa.call(this);var c=this.protectedMethod,e=this,l,A,w,r;window.addEventListener("message",b);this.protectedCustomHead=function(f){q(f);z()};this.getContentStyleClass=function(){return"workbench-iframe-card-content"};this.getPublishType=function(){return c.getMenuItemInfo().getRefType()};
this.loadContent=function(f){var C="workbench-"+e.getCardId().replace("#",""),t=L.getReportIFrameUrl(c.getWidgetBizId(),"workbench-card",H(),C,c.getTitle());l=$("<iframe>");l.css({position:"absolute",left:0,top:0,height:"100%",width:"100%",border:"none",background:"#FFF"});l.attr("allowfullscreen","true");l.attr("id",C);l.attr("src",t);C={cardName:c.getTitle(),isDesignTime:!1,exhibitionScene:"workbench-card",iFrameId:C,isRequireDecorateCard:!1,isRequireOpacity:!1,isInWidgetPanel:!1,affectedParams:!1};
l.data("extreportWidgetInfo",C);l.on("load",function(){var y=l[0].contentWindow.com.kingdee.bos.qing.AnalysisSceneOuterApi;y&&y.setFunOpenNewTab&&y.setFunOpenNewTab(e.getFunOpenNewTab())});l.appendTo(f)};this.changeTitle=function(f){e.setTitle(f);l&&l[0].contentWindow.postMessage({workbenchExtReportCardMsg:"updateCardTitle",param:f},"*")};var q=function(f){r=$("<div class = 'sa-qing-publish-card-icon'>");$(c.getJqOwner()).on("mouseenter",function(){r.show()});$(c.getJqOwner()).on("mouseleave",function(){r.hide()});
r.on("click",e.protectedRemoveSelf);D.background(r,"icon_delete");r.addClass("workbench-exeport-delete-icon");r.on("mouseover",function(C){D.background(r,"icon_delete_hover")});r.on("mouseout",function(C){D.background(r,"icon_delete")});r.attr("title",g.get("delete","\u5220\u9664"));r.appendTo(f);r.hide();c.getJqHead().append(r)},H=function(){var f=e.getJsonReferenceMap().refType,C;f&&0===f.indexOf("appmenu")?C=0:f&&0===f.indexOf("qingcenter")&&(C=1);return C},z=function(){A=$("<div class='workbench-card-drag-cover'>");
A.css("height","12px");A.appendTo(c.getJqHead());w=$("<div class='workbench-card-drag-cover'>");w.appendTo(c.getJqHead())},k=function(){e.refreshCardTitle(function(){l&&l[0].contentWindow.postMessage({workbenchExtReportCardMsg:"refreshCard"},"*")})};this.getScene=function(){return Ba.WidgetType_QingReport};this.customHandleError=function(){A.css("width",0);w.css("width",0);c.getMainUi().removeClass("workbench-div-card-main");c.getContentUi().removeClass(e.getContentStyleClass());c.getJqHead().empty();
e.initHeadTitle();e.addOperateIcon(c.getContentUi())};this.destroy=function(){window.removeEventListener("message",b)}});Da.WorkbenchCardContainerFactory.register(Ba.WidgetType_Metrics,function(){T.call(this);var b=this,c=this.protectedMethod,e=new Na;this.getScene=function(){return Ba.WidgetType_Metrics};this.getCardExhibition=function(){return new Fa};this.protectedCustomHead=function(r){b.initHeadTitle();l(r)};this.getScene=function(){return Ba.WidgetType_Metrics};this.remoteSchemaContent=function(r,
q){var H=c.getContentUi();if(b.getJsonReferenceMap()){var z=c.getWorkbenchRemoteImpl();z=new da(z,function(k){var f=k.operation;b.setJsonModelBook(k.model);b.setJsonOperation(f);r&&r(k)},function(k,f,C){q&&q(k,f,C)});z.setBlockingJqUi(H);b.getJsonReferenceMap().tag=b.getTag();z.loadSchema(c.getWorkbenchId(),b.getJsonReferenceMap())}else F.remoteSchemaContent(c.getWorkbenchId(),c.getWidgetBizId(),function(k){var f=k.model;b.setJsonReferenceMap(k.ref);b.setJsonModelBook(f);r&&r(k)})};var l=function(r){var q=
$("<div class='sa-qing-publish-card-icon'>"),H=$("<div class='sa-qing-publish-card-icon'>"),z=$("<div class = 'sa-qing-publish-card-icon'>"),k=$("<div class= 'sa-qing-publish-card-icon'>"),f=$("<div class= 'sa-qing-publish-card-icon'>");H.on("click",function(){var t=g.get("modifyWorkbenchSquareWidget","\u7f16\u8f91\u6570\u636e\u6597\u65b9\uff1a#1").replace("#1",c.getTitle());b.protectedOpenDesigner(t,!0,A)});m.background(H,"btn-edit");H.on("mouseover",function(t){m.background(H,"btn-edit-on")});H.on("mouseout",
function(t){m.background(H,"btn-edit")});H.attr("title",Ca.get("enterEdit","\u8fdb\u5165\u8bbe\u8ba1\u5668"));q.on("click",function(){var t=L.getOpenAnalysisUrl(b.getTag(),c.getWidgetBizId(),c.getWorkbenchId(),c.getRefType(),c.getRefMapUid()),y=g.get("widgetTypeLonger","\u6570\u636e\u5206\u6790")+"-"+c.getTitle();b.fireOpenNewTab(y,t)});m.background(q,"btn-analysis");q.on("mouseover",function(t){m.background(q,"btn-analysis-on")});q.on("mouseout",function(t){m.background(q,"btn-analysis")});q.attr("title",
Ca.get("enterAnalysis","\u8fdb\u5165\u201c\u6570\u636e\u5206\u6790\u201d"));z.on("click",w);m.background(z,"btn-refresh");z.on("mouseover",function(t){m.background(z,"btn-refresh-on")});z.on("mouseout",function(t){m.background(z,"btn-refresh")});z.attr("title",Ca.get("cardRefresh","\u5237\u65b0"));k.on("click",function(){b.getExhibition().showExtraFilter(c.getMainUi())});m.background(k,"btn-filter");k.on("mouseover",function(t){m.background(k,"btn-filter-on")});k.on("mouseout",function(t){m.background(k,
"btn-filter")});k.attr("title",Ca.get("cardFilter","\u8fc7\u6ee4\u6761\u4ef6"));k.hide();f.on("click",b.protectedRemoveSelf);D.background(f,"icon_delete");f.on("mouseover",function(t){D.background(f,"icon_delete_hover")});f.on("mouseout",function(t){D.background(f,"icon_delete")});f.attr("title",g.get("delete","\u5220\u9664"));f.hide();e.addIconUi(H);e.addIconUi(q);e.addIconUi(z);var C=e.getJqUi();e.setParent(r);e.hide();$(c.getJqOwner()).on("mouseenter",function(){b.isNeedShowOptBtn()&&(k.show(),
e.show());f.show()});$(c.getJqOwner()).on("mouseleave",function(){k.hide();e.hide();f.hide()});c.appendOperateBtnUI([f,C,k])},A=function(r){r&&b.setJsonModelBook(r);b.protectedRefreshChart(c.getContentUi(),r)},w=function(){b.refreshCardTitle();b.protectedCustomContent(c.getContentUi())}});ya.PERM_TYPE_ENTER_ANALYSIS="enter_analysis";ya.PERM_TYPE_ENTER_SQUARE="enter_square"})();(function(){"undefined"==typeof com&&(com={});"undefined"==typeof com.kingdee&&(com.kingdee={});"undefined"==typeof com.kingdee.bos&&(com.kingdee.bos={});"undefined"==typeof com.kingdee.bos.qing&&(com.kingdee.bos.qing={});"undefined"==typeof com.kingdee.bos.qing.workbench&&(com.kingdee.bos.qing.workbench={});var n=com.kingdee.bos.qing.workbench;n.WorkbenchEntrance=function(){function da(a){var d=k.getWorkbenchGridTabPane(a).getWorkbenchGrid().getGrid();a=d.getGridOption();d=d.getWidgets();d=Cb(a,
d);$a(a.getBizId(),d.toJsonObject())}function $a(a,d,h){var p=new g(B.getRemoteImpl(),function(){console.log("save workbench model success");h&&h(a);return!0},function(v,I){console.log("save workbench model fail");return!0});p.setShowBlocking(!1);p.saveWorkbenchModel(a,d)}function Na(a,d,h){var p=new g(B.getRemoteImpl(),function(v){console.log("load workbench model success");d&&d(v);return!0},function(v,I){console.log("load workbench model fail");h&&h();return!1});p.setShowBlocking(!0);p.loadWorkbenchModel(a)}
function m(a,d){var h=k.getSelectedTab(),p=k.getWorkbenchGridTabPane(a);if(p&&h===p)if((h=p.getWorkbenchGrid().getGrid())&&0<h.getWidgetCount())try{h.screenShot(function(v){f.setWorkbenchPreviewPic(a,v);Gb(a,v);d&&d()})}catch(v){console.log(v)}else f.setWorkbenchPreviewPic(a,null),Hb(a),d&&d();else d&&d()}var B=this,M=[new Ja(aa.get("myDirectory","\u9605\u89c8\u5939"),Da.QINGCENTER),new Ja(aa.get("myCard","\u5361\u7247\u5e93"),Da.CARDLIBRARY),new Ja(aa.get("myMenu","\u83dc\u5355\u9879"),Da.APPMENU)],
R=[new Ja(aa.get("publishContent","\u53d1\u5e03\u5185\u5bb9"),!1),new Ja(aa.get("presetContent","\u9884\u7f6e\u5185\u5bb9"),!0)],Aa=[new Ja(aa.get("byPublisher","\u6309\u53d1\u5e03\u4eba"),"by_publisher"),new Ja(aa.get("byDirectory","\u6309\u76ee\u5f55"),"by_directory")],Za=new Ja(aa.get("all","\u5168\u90e8"),""),Sa,Wa,db,Pa,Ba,Ca,Qa,Ya,Ua,Ga,Ra,b,c,e,l,A,w,r=Da.QINGCENTER,q=R[0],H=Aa[0],z=Za,k,f,C=[],t=[],y,N,Q={},ua=!1,O=[78,34],K;this.getJqUi=function(a){db=a;G();db.append(Wa);return Wa};var G=
function(){if(!Wa){B.protectedCustomInitEnv();Wa=$("<div>");Wa.addClass("workbench-body");var a=new wa;a.setCallbackImmediately(function(){document.body.style.height=document.documentElement.clientHeight+"px";b&&b.resize();k&&k.updateTabHeadUi()});a.setDelay(250);a.observe();x();ca();W.setGridEventListener(ob);W.setStaticWidgetPainter(qb);W.setChangingWidgetPainter(Ib);W.setWidgetDefaultInfoGetter(Jb);W.setWidgetExtInfoGetter(Kb);W.setDroppableEventListener(Lb);W.setDraggableEventListener(Mb);W.setGetWorkbenchGptModelByWidgetIdHandler(vb);
W.setGetWorkbenchGptModelByRefUidHandler(Nb);W.setAddWidgetFromGptListener(Ob);W.setMenuChangeListener(Pb)}};this.loadWorkbenchGroupPublished=function(){var a=new g(B.getRemoteImpl(),function(d){if(d){var h=new ma(r);h.fromJsonObject(d);d=h.getChildren();h=[];for(var p=0;p<d.length;p++)ba(h,d[p]);C=h;0<C.length?(na(C),y&&mb()):S()}else S()},function(d,h){S();return!0});a.setShowBlocking(!0);a.setBlockingJqUi(Ga);a.loadWorkbenchGroupPublished(r,q.getValue(),H.getValue(),z.getValue())};var S=function(){C=
[];Ga&&Ga.remove();Ra&&Ra.remove();Ra=$("<div>");var a=$("<div>"),d=aa.get("emptyTips","\u6682\u65e0\u53d1\u5e03\u8bb0\u5f55");X.background(a,"icon_empty_background");a.addClass("workbench-empty-background");a.css("background-position","center");var h=$("<div>");h.addClass("workbench-message-text");h.text(d);Ra.append(a);Ra.append(h);Ua.append(Ra)},ba=function(a,d){-1===a.indexOf(d)&&a.push(d);if(d=d.getChildren())for(var h=0;h<d.length;h++)1<d[h].getSubNodeLevel()&&d[h].setHidden(!0),d[h]instanceof
ra?(0<d[h].getSubNodeLevel()&&d[h].setOpenDir(!1),ba(a,d[h])):-1===a.indexOf(d[h])&&a.push(d[h])},x=function(){b=new Y;b.setHorizontalSplit(!0);b.setSplitLineWide(5);b.setResizeMode(Y.RESIZE_MODE_FIRST_FIXED);b.setFirstSize(220,220,640);b.setSecondSize(db.width()-220-5,0,-1);b.getJqUi().addClass("workbench-pane");Ua=$("<div>");Ua.addClass("workbench-leftpane");Oa();b.setFirstChild(Y.createChildWrapper(Ua,Ka));B.loadWorkbenchGroupPublished();var a=$("<div>");a.addClass("workbench-rightpane");K=new ib;
K.getJqUi().appendTo(a);var d=U();a.append(d);b.setSecondChild(Y.createChildWrapper(a));Wa.append(b.getJqUi())},ca=function(){Pa||(Pa=$("<div>"),Pa.addClass("workbench-tool-bar"),la().appendTo(Pa),b.getJqUi().append(Pa));Ca||(Ca=$("<div>"),Ca.addClass("workbench-search-icon"),Ca.attr("title",aa.get("search","\u641c\u7d22")),X.background(Ca,"icon_search"),Ca.on("mouseover",function(d){X.background(Ca,"icon_search_on")}),Ca.on("mouseout",function(d){X.background(Ca,"icon_search")}),Ca.on("click",sb),
Pa.append(Ca));Qa||(Qa=$("<div>"),Qa.addClass("workbench-refresh-icon"),X.background(Qa,"icon_refresh"),Qa.on("mouseover",function(d){X.background(Qa,"icon_refresh_on")}),Qa.on("mouseout",function(d){X.background(Qa,"icon_refresh")}),Qa.attr("title",aa.get("refresh","\u5237\u65b0")),Qa.on("click",B.loadWorkbenchGroupPublished),Pa.append(Qa));if(!Ba){Ba=$("<div>");Ba.addClass("workbench-collapse");Ba.attr("title",aa.get("collapse","\u6536\u8d77"));var a=$("<div>");a.addClass("workbench-collapse-icon");
X.background(a,"icon_left");a.on("mouseover",function(d){X.background(a,"icon_left_on")});a.on("mouseout",function(d){X.background(a,"icon_left")});Ba.append(a);Ba.on("click",va);Pa.append(Ba)}},na=function(a){Ga&&Ga.remove();Ra&&Ra.remove();var d=$("<div>");d.addClass("workbench-leftpane-tree");Ya=new za;Ya.setItemModels(a);y&&y.getText().trim()&&Ya.setSearchText(y.getText().trim());Ya.setSubItemSelectedListener(E);a=Ya.getJqUi();d.append(a);Ga=d;Ua.append(Ga);N&&"block"===N.css("display")&&Ua.css("margin-top",
O[0]+"px")},va=function(a){a&&a.stopPropagation();b.getNonemptyFirstWide()?(c=b.getNonemptyFirstWide(),b.setFirstSize(0,220,640),b.setSecondSize(db.width()-13,0,-1)):(a=13<c?c:220,b.setFirstSize(a,220,640),b.setSecondSize(db.width()-a-5,0,-1))},Ka=function(){if(Ba){Ba.css({left:b.getNonemptyFirstWide()+"px"});if(b.getNonemptyFirstWide()){var a=Ba.find(".workbench-collapse-icon");a&&a.removeClass("workbench-collapse-icon-right");e&&e.getJqUi().show();b.getJqUi().css({left:"0px",background:"#fff"});
Pa&&Pa.css({width:b.getNonemptyFirstWide()+5+"px"});Ba.attr("title",aa.get("collapse","\u6536\u8d77"));N&&N.removeClass("workbench-leftpane-searchbox-none")}else(a=Ba.find(".workbench-collapse-icon"))&&a.addClass("workbench-collapse-icon-right"),e&&e.getJqUi().hide(),b.getJqUi().css({left:"10px",background:"#e2e7ef"}),Pa&&Pa.css({width:b.getNonemptyFirstWide()+"px"}),Ba.attr("title",aa.get("expand","\u5c55\u5f00")),N&&N.addClass("workbench-leftpane-searchbox-none");N&&N.css({width:b.getNonemptyFirstWide()-
13+"px"})}k&&k.resize()},U=function(){var a=$("<div>");a.addClass("workbench-rightpane-tab");var d=$("<div>");d.addClass("workbench-schema-area-background");d.hide();a.append(d);f=new Ha;f.setRemoteImpl(B.getRemoteImpl());f.setOpenInFixedTabHandler(Db);f.setOpenInNewTabHandler(Qb);f.setLoadWorkbenchFinishHandler(function(){var p=f.getSelectedWorkbench();Db(p,function(){V()})});f.setDeletedWorkbenchHandler(function(p){k.removeWorkbenchGridTabPane(p.getWorkbenchId())});f.setModifyNameFinishHandler(function(p){k.updateWorkbenchGridTabPaneTitle(p);
k.resize()});f.setMessageCurtain(K);f.loadWorkbench();f.getJqUi().hide();d.append(f.getJqUi());k=new sa;k.setShowSchemaArea(function(p){p?(ka.interestInBehavior(ka.WORKBENCH_TAB_OPERATION,ka.WORKBENCH_TAB_OPERATION_SCHEMA),k.onSchemaAreaOpended(!0),f.getJqUi().show(),d.show(),f.updateScrollToSelected(),$(document.body).on("mousedown",h)):(k.onSchemaAreaOpended(!1),f.getJqUi().hide(),d.hide(),$(document.body).off("mousedown",h))});k.setMessageCurtain(K);a.append(k.getJqUi());var h=function(p){pa.isDescendent(p.target,
f.getJqUi()[0])||pa.isDescendent(p.target,k.getFixedTabHeadUi()[0])||0<$(".sa-ctrl-dialog").length||(f.getJqUi().hide(),k.onSchemaAreaOpended(!1),d.hide(),$(document.body).off("mousedown",h))};return a},V=function(){if(!ua){var a=new g(B.getRemoteImpl(),function(d){ua=!0;if(null!=d){for(var h=[],p=[],v=0;v<d.length;v++){var I=new F;I.fromJsonObject(d[v]);h.push(I)}h.sort(function(xa,Ia){return xa.getItemOrder()-Ia.getItemOrder()});for(v=0;v<h.length;v++)h[v].getPathType()===L.Constants.PIN_TAB_TYPE_WORKBENCH?
(d=P.convertPinBarItemToWorkbench(h[v]),fa(d)):(d=P.convertPinBarItemToLeafNode(h[v]),ia(d,!0,!1)),p.push(h[v].getRefId());f.setPinTabIdList(p)}},function(d,h){return!1});a.setShowBlocking(!1);a.loadPinTabBarList()}},la=function(){e=new T;e.setItemModels(M);e.setSelected(M[0]);e.setDropdownAsLongAsPossible(!0);e.setCustomPainter(function(d,h,p){h.text(p.getDisplayName());h.attr("title",p.getDisplayName())});e.addSelectedChangedListener(function(d,h,p){r=p.getValue();Oa();ka.interestInBehavior(ka.WORKBENCH_MENU_DIR_OPERTAION,
ka.getMenuDirOperationBehaviorByRefPathType(r));B.loadWorkbenchGroupPublished()});var a=e.getJqUi();pa.layoutCtrl(a,0,0,100,32);a.addClass("workbench-message-searchtype-combobox");return a},Oa=function(){l&&l.remove();A&&A.remove();w&&w.remove();if(r===Da.CARDLIBRARY){var a=rb();l=a.getJqUi();l.addClass("workbench-filter-type-combobox-left");a=new T;a.setItemModels(Aa);a.setSelected(H);a.setCustomPainter(function(h,p,v){p.text(v.getDisplayName());p.attr("title",v.getDisplayName())});a.addSelectedChangedListener(function(h,
p,v){H=v;ka.interestInBehavior(ka.WORKBENCH_MENU_DIR_OPERTAION,ka.getMenuDirOperationBehaviorByGroupType(H.getDisplayName()));B.loadWorkbenchGroupPublished()});A=a.getJqUi();A.addClass("workbench-filter-type-combobox-right");Ua.append(l);Ua.append(A)}else if(r===Da.METRICLIBRARY){var d=[];d.push(Za);a=new g(B.getRemoteImpl(),function(h){if(h)for(var p=0;p<h.length;p++){var v=h[p];v=new Ja(v.name,v.id);d.push(v)}nb(d)},function(h,p){nb(d);return!0});a.setShowBlocking(!0);a.setBlockingJqUi(Ga);a.loadMetricSystems()}else a=
rb(),l=a.getJqUi(),l.addClass("workbench-filter-type-combobox"),Ua.append(l)},nb=function(a){var d=new T;d.setItemModels(a);d.setSelected(Za);d.setCustomPainter(function(h,p,v){p.text(v.getDisplayName());p.attr("title",v.getDisplayName())});d.addSelectedChangedListener(function(h,p,v){z=v;B.loadWorkbenchGroupPublished()});w=d.getJqUi();w.addClass("workbench-filter-type-combobox");Ua.append(w)},rb=function(){var a=new T;a.setItemModels(R);a.setSelected(q);a.setCustomPainter(function(d,h,p){h.text(p.getDisplayName());
h.attr("title",p.getDisplayName())});a.addSelectedChangedListener(function(d,h,p){q=p;B.loadWorkbenchGroupPublished();ka.interestInBehavior(ka.WORKBENCH_MENU_DIR_OPERTAION,ka.getMenuDirOperationBehaviorByContentType(q.getDisplayName()))});return a},sb=function(){if(y)"none"===N.css("display")?(N.css("display","block"),a=Wa.find(".workbench-leftpane"),a.css("margin-top",O[0]+"px")):(N.css("display","none"),a=Wa.find(".workbench-leftpane"),a.css("margin-top",O[1]+"px"));else{y=new D;y.addSearchListener(mb);
y.setSearchListenerDelay(1E3);y.setShowSearchIcon(!0);y.setPlaceholder(aa.get("searchPublishName","\u641c\u7d22\u53d1\u5e03\u5185\u5bb9\u7684\u540d\u79f0"));N=y.getJqUi();N.addClass("workbench-leftpane-searchbox");b&&N.css({width:b.getNonemptyFirstWide()-13+"px"});N.insertAfter(Pa);var a=Wa.find(".workbench-leftpane");a.css("margin-top",O[0]+"px")}};this.getUrlParam=function(a){return ja.decodeParamFromUrl(window.location.search,a)};this.appendUrlParam=function(a,d,h){return ja.appendParamToUrl(a,
d,h)};this.getRemoteImpl=function(){if(null==Sa){Sa=new u;Sa.setRemoteUrl(B.protectedGetRemoteUrl());var a=B.getUrlParam("tag");Sa.setTag(a)}return Sa};this.protectedGetRemoteUrl=function(){throw Error("override me");};this.protectedGetPublishEntranceUrl=function(a){throw Error("override me");};this.protectedCustomInitEnv=function(){throw Error("Override me.");};var E=function(a){event&&"mousedown"===event.type||(ka.interestInBehavior(ka.WORKBENCH_MENU_NODE_CLICK_OPERATION,ka.getMenuNodeClickOperation(a.getScene())),
ia(a,!1,!0))},fa=function(a){function d(I){var xa=[];I&&(xa=new ea,xa.fromJsonObject(I),xa=wb(xa));v.setInitGridWidgets(xa);v.showWorkbenchGrid()}function h(){v.setInitGridWidgets([]);v.showWorkbenchGrid()}var p=a.getWorkbenchId();if(k.checkNeedLoadWorkbenchGrid(a,!1,xb)){var v=new Z;v.setWorkbench(a);v.setUserObject(P.convertWorkbenchToPinBarItem(a));v.setFunSwitchLockStateChecker(Ma);v.setFunSwitchLockState(kb);v.setLock(!0);v.setInitGridAction(function(){Na(p,d,h)});v.setBeforeCloseAction(function(I){m(p,
function(){I&&I(!0)});yb(p)});k.addGridTab(v,!1)}},ia=function(a,d,h){var p=a.getId(),v=J.getUrlParamValue();if(a.getScene()===ea.WidgetType_Square)K.showPrompt(aa.get("openSquareFailedTip","\u6570\u636e\u6597\u65b9\u4e0d\u80fd\u76f4\u63a5\u6253\u5f00\u9875\u7b7e\uff0c\u60a8\u53ef\u4ee5\u62d6\u52a8\u8be5\u6570\u636e\u6597\u65b9\u5230\u5de5\u4f5c\u53f0\u4e2d\u67e5\u770b\u3002"));else{var I=a.getScene()===ea.WidgetType_Metrics?La.getMetricSquareEntrance(a.getId()):B.protectedGetPublishEntranceUrl(a.getId());
I=ja.appendParamToUrl(I,"skin",v);(v=a.getSource())&&"extreport"===v&&(I=ja.appendParamToUrl(I,"appID","qing_rpt"),I=ja.appendParamToUrl(I,"isPreset",a.isPreset()));I=ja.appendParamToUrl(I,"publishSourceType",a.getScene());oa(p)&&(p=new ya(p,I),I=P.convertLeafNodeToPinBarItem(a),p.setTitle(I.getName()),p.setIconName(a.getScene()),p.setUserObject(I),p.setFunSwitchLockState(kb),p.setFunOpenNewTab(ta),p.setLock(d),k.addTab(p,h))}},oa=function(a){var d=!0,h=k.getDynamicTabPanes(),p=h.length;if(10<=p){d=
!1;for(var v=0;v<p;v++)if(a===h[v].getId()){d=!0;break}d||(a=aa.get("maxTabCountError","\u9875\u7b7e\u6700\u591a\u53ef\u540c\u65f6\u6253\u5f0010\u4e2a\uff0c\u8bf7\u5173\u95ed\u90e8\u5206\u9875\u7b7e\u540e\u518d\u8bd5"),h=new ha,h.setBounds(760,200,320,200),h.setOptionType(ha.OPTION_OK),h.setMessage(a),h.showDialog())}return d},ta=function(a,d,h,p){h||(h=ja.createUUID());oa(h)&&(d=new ya(h,d),d.setFunOpenNewTab(ta),d.setTitle(a),d.setLockAble(!1),d.setIconName(p),k.addTab(d,!0))},Ma=function(a){var d=
f.getDefaultWorkbench();if(d&&a instanceof F){var h=d.getWorkbenchId();a=a.getRefId();if(h===a)return h=aa.get("defaultWorkbenchPinWarning",'\u5de5\u4f5c\u53f0"#1"\u4e3a\u9ed8\u8ba4\u5de5\u4f5c\u53f0\uff0c\u4e0d\u80fd\u56fa\u5b9a\u5728\u9875\u7b7e\u680f\u4e2d\u3002'),h=h.replace("#1",d.getWorkbenchName()),K.showPrompt(h),!1}return!0},kb=function(){ka.interestInBehavior(ka.WORKBENCH_TAB_OPERATION,ka.WORKBENCH_TAB_OPERATION_PIN);var a=k.getDynamicTabPanes();if(a){for(var d=[],h=[],p=0;p<a.length;p++){var v=
a[p];v.isLock()&&(d.push(v.getUserObject().toJsonObject()),h.push(v.getId()))}a=new g(B.getRemoteImpl(),function(I){f.setPinTabIdList(h)},function(I,xa){return!1});a.setShowBlocking(!1);a.pinTabBarList(d)}},mb=function(){if(C&&0!==C.length){var a=y.getText().trim();if(a){ka.interestInBehavior(ka.WORKBENCH_MENU_TREE_OPERATION,ka.WORKBENCH_MENU_TREE_OPERATION_SEARCH);t=[];var d=C,h=new ra,p=[],v;for(v in d)d[v]instanceof ra&&d[v].clearSearchNumber(),d[v].getParentNode()||p.push(d[v]);h.setChildren(p);
a=cb([],h,a.toUpperCase());if(0===a.length){Ya.getJqUi().remove();Ga.empty();var I=$("<div>");X.background(I,"icon_search_no_data_background");I.addClass("workbench-empty-background");I.css("background-position","center");a=aa.get("nothingSearched","\u6ca1\u6709\u7b26\u5408\u641c\u7d22\u6761\u4ef6\u7684\u7ed3\u679c");d=$("<div>");d.addClass("workbench-message-text");d.text(a);Ga.append(I);Ga.append(d)}else{d=[];for(h=a.length-1;0<=h;h--)a[h]instanceof ra?a[h].setOpenDir(!0):a[h].setHidden(!1),-1===
d.indexOf(a[h])&&d.push(a[h]);for(I in d)d[I].setHidden(!1),d[I]instanceof ra&&d[I].setOpenDir(!0);t=d;na(t)}}else{I=Ya.getCurrentSelectedNode();d=t;a=[];if(d)for(h=0;h<=d.length;h++)d[h]instanceof ra&&a.push(d[h]);d=t=C;if(a)for(h=0;h<a.length;h++)for(p=0;p<d.length;p++)d[p].getParentNode()===a[h]&&d[p].setHidden(!1);na(t);I&&Ya.setSelected([I])}}},cb=function(a,d,h){if(d=d.getChildren())for(var p=d.length-1;0<=p;p--){var v=d[p];if(v instanceof ra){cb(a,v,h);a:{var I=void 0;var xa=v.getChildren();
for(I in xa)if(xa[I].isSearch()){I=!0;break a}I=!1}I&&-1===a.indexOf(v)?(v.setSearch(!0),a.push(v)):v.setSearch(!1)}else-1<v.getName().toUpperCase().indexOf(h)?(v.setSearch(!0),a.push(v),jb(v)):v.setSearch(!1)}return a},jb=function(a){if(a=a.getParentNode())a.addSearchedNumber(),a.getParentNode()&&jb(a)},ob=function(a,d,h){if("dragStart"===d||"dragStop"===d){var p=k.getWorkbenchGridTabPane(a).getDroppableHandler();p&&p.toggleDropMask("dragStart"===d);"dragStop"===d&&(ka.interestInBehavior(ka.WORKBENCH_GRID_CARD_DESIGN_OPERATION,
ka.WORKBENCH_GRID_CARD_DESIGN_OPERATION_DRAG),m(a))}else"resizeStart"===d||"resizeStop"===d?"resizeStop"===d&&(ka.interestInBehavior(ka.WORKBENCH_GRID_CARD_DESIGN_OPERATION,ka.WORKBENCH_GRID_CARD_DESIGN_OPERATION_RESIZE),setTimeout(function(){Q[a+h].redraw();m(a)},300)):"dropOver"!==d&&"dropOut"!==d&&("cellResize"===d?setTimeout(function(){Object.keys(Q).forEach(function(v){-1!==v.indexOf(a)&&Q[v].redraw()})}):("removed"===d&&m(a),d=h.getGridOption(),p=h.getWidgets(),pb(p)&&(p=Cb(d,p),$a(d.getBizId(),
p.toJsonObject()))))},pb=function(a){for(var d=!0,h=0;h<a.length;h++)if(!a[h].getExtInfo().oRef){d=!1;break}return d},qb=function(a,d,h,p){var v=!1;if(h&&h.getExtInfo()&&h.getExtInfo().oWorkbenchGptModel){v=h.getExtInfo().oWorkbenchGptModel;var I=v.getRef();var xa=v.getJsonModelBook();var Ia=v.getBizId();var lb=v.getBizName();var zb=ea.WidgetType_Square;v=!0}else{h&&h.getExtInfo()&&(I=h.getExtInfo().oRef);Ia=d.split("#")[0];var Eb=Ab(a,Ia,h);lb=Eb.name;zb=Eb.scene}var tb=$("<div>");tb.addClass("workbench-grid-widget");
var Ta=com.kingdee.bos.qing.workbench.WorkbenchCardContainerFactory.getCardContainer(zb);Ta.setWidgetId(d);Ta.setWidgetBizId(Ia);Ta.setTitle(lb);Ta.setMenuItemInfo(ub(Ia));Ta.setWorkbenchId(a);Ta.setJsonReferenceMap(I);Ta.setFunOpenNewTab(ta);xa&&Ta.setJsonModelBook(xa);Ta.setFunRemoveSelf(function(){var gb=aa.get("confirmToDelete","\u786e\u5b9a\u5220\u9664#1 \u201c#2\u201d \u5417?");gb=gb.replace("#1",aa.get(zb));gb=gb.replace("#2",lb);Rb(gb,function(){p&&p.removeWidget(Ta.getWidgetId());delete Q[a+
Ta.getWidgetId()]},null)});Ta.setFunRefChangeCallback(function(){da(a)});Ta.setFunCardTitleChangeCallback(function(gb){K&&K.showSuccess(aa.get("modifyCardNameSuc","\u4fee\u6539\u5361\u7247\u540d\u79f0\u6210\u529f\u3002"));k.getWorkbenchGridTabPane(a).getWorkbenchGrid().updateWidgetDisplayName(Ta.getWidgetId(),gb);da(a)});Ta.setFunUpdateWidgetIdCallback(function(gb){delete Q[a+Ta.getWidgetId()];Q[a+gb]=Ta;Ta.setWidgetId(gb);h.setId(gb);k.getWorkbenchGridTabPane(a).getWorkbenchGrid().updateWidgetId(d,
gb)});Ta.setExecutedCallback(function(){var gb=!0;Object.keys(Q).forEach(function(Bb){-1!==Bb.indexOf(a)&&Q[Bb]&&!Q[Bb].getExecutedStatus()&&(gb=!1)});gb&&setTimeout(function(){m(a)},1300)});Q[a+d]=Ta;v?Sb(a,I,xa,function(){Ta.show(tb)}):Ta.show(tb);return tb},Ib=function(a,d,h){d=d.split("#")[0];a=Ab(a,d,h);var p=a.scene,v=a.name,I=a.displayName;a=5;h=4;if(p===ea.WidgetType_Square||p===ea.WidgetType_Metrics)a=h=3;d=$("<div>");d.addClass("workbench-grid-changing-icon");X.background(d,"icon_"+p);var xa=
$("<div>");xa.addClass("workbench-grid-changing-widget-icon");X.background(xa,p);v=I?I:v;p=$("<div>");p.addClass("workbench-grid-changing-widget-title");p.text(v);v=$("<div>");v.addClass("workbench-grid-changing");v.attr("gs-w",a);v.attr("gs-h",h);v.append(xa);v.append(p);v.append(d);return v},Jb=function(a,d,h){d=d.split("#")[0];a=Ab(a,d,h);return{type:a.scene,name:a.name,displayName:a.displayName,minW:2,minH:2,maxW:15,maxH:15}},Kb=function(a,d){var h=d.split("#")[0];d=(d=Q[a+d])?d.getJsonReferenceMap():
null;a=Fb(a,h);h={};h.oRef=d;h.oWorkbenchGptModel=a;return h},Ab=function(a,d,h){var p=ub(d);a=Fb(a,d);if(h){var v=h.getName();var I=h.getType();var xa=h.getDisplayName()}else p?(v=p.getName(),I=p.getScene()):a&&(v=a.getBizName(),I=ea.WidgetType_Square);return{scene:I,name:v,displayName:xa}},ub=function(a){for(var d,h=0;h<C.length;h++){var p=C[h];if("function"===typeof p.getId&&p.getId()===a){d=C[h];break}}return d},Fb=function(a,d){if(a=k.getWorkbenchGridTabPane(a).getDroppableHandler().createWorkbenchGptModel(d))return d=
a.getRef(),d.fileKey=ja.createUUID(),delete d.schemaId,a},Mb=function(a,d,h){a=k.getWorkbenchGridTabPane(a);(a=a.getDroppableHandler())&&a.toggleDropMask("dragStart"===d);a=k.getSelectedTab();if(a instanceof ya){var p=!1;"dragStart"===d&&(p=!0);a.toggleMask(p)}"dragStart"===d&&h&&(d=$(h).attr("gs-id"))&&(d=ub(d),ka.interestInBehavior(ka.WORKBENCH_MENU_NODE_DRAG_OPERATION,ka.getMenuNodeDragOperation(d.getScene())))},Lb=function(a,d,h){if(h=Tb(h)){var p=k.getWorkbenchGridTabPane(a).getDroppableHandler();
if("dropCheck"===d)return!0;"dropOver"===d?p.dropOverHandler(null):"dropOut"===d?p.dropOutHandler(null):"dropped"===d&&(d=function(v){p.droppedHandler(v)},0<h.indexOf("#")?(ka.interestInBehavior(ka.WORKBENCH_AI_CONTENT_OPERATION,ka.WORKBENCH_AI_CONTENT_OPERATION_DRAG_FROM_GRID),Ub(a,h,d)):(ka.interestInBehavior(ka.WORKBENCH_AI_CONTENT_OPERATION,ka.WORKBENCH_AI_CONTENT_OPERATION_DRAG_FROM_MENU),Vb(a,h,d)))}},Tb=function(a){if($(a).hasClass(Va.DEFAULT_GRID_WIDGET_CLASS)||$(a).hasClass(Va.DEFAULT_GRID_DRAG_IN_CLASS))return $(a).attr("gs-id")},
Pb=function(){var a=k.getSelectedTab();(a instanceof Z||a instanceof Fa)&&a.getWorkbenchGrid()&&a.getWorkbenchGrid().setupDragIn("workbench-leftpane-tree")},Nb=function(a,d){for(var h=k.getWorkbenchGridTabPane(a).getWorkbenchGrid().getGrid().getWidgets(),p=0;p<h.length;p++){var v=h[p],I=v.getExtInfo();if(I&&I.oRef&&I.oRef.uid===d)return vb(a,v.getId())}},vb=function(a,d){var h=k.getWorkbenchGridTabPane(a).getWorkbenchGrid().getGrid().getWidgetById(d),p=Q[a+d];d=d.split("#")[0];var v=h.getType(),I=
h.getName(),xa=h.getDisplayName();if((h=h.getExtInfo())&&h.oRef){h&&h.oWorkbenchGptModel&&(d=h.oWorkbenchGptModel.getBizId());h=h.oRef;if(p){var Ia=p.getErrorCode();"function"===typeof p.getTag&&(h.tag=p.getTag())}p=new qa;p.setWorkbenchId(a);p.setBizId(d);p.setBizType(v);p.setBizName(xa?xa:I);p.setRef(h);Ia&&p.setErrorCode(Ia);return p}},Ub=function(a,d,h){a=vb(a,d);h(a)},Vb=function(a,d,h){var p=ub(d),v=p.getRefType(),I=new g(B.getRemoteImpl(),function(xa){var Ia=new qa;Ia.setWorkbenchId(a);Ia.setBizId(d);
Ia.setBizType(p.getScene());Ia.setBizName(p.getName());Ia.setRef(xa.ref);h(Ia);return!0},function(xa,Ia){var lb=new qa;lb.setWorkbenchId(a);lb.setBizId(d);lb.setBizType(p.getScene());lb.setBizName(p.getName());lb.setErrorCode(xa);lb.setErrorMessage(Ia);h(lb);return!0});I.setShowBlocking(!1);I.getReferenceMap(d,v)},Ob=function(a,d){var h=d.getBizId()+"#"+(new Date).getTime(),p=new com.kingdee.bos.qing.workbench.GridWidget;p.setId(h);p.setType(ea.WidgetType_Square);p.setName(d.getBizName());p.setDisplayName(d.getBizName());
p.setW(3);p.setH(3);p.addExtInfo("oRef",d.getRef());p.addExtInfo("oWorkbenchGptModel",d);a=k.getWorkbenchGridTabPane(a);a.getWorkbenchGrid().getGrid().addWidget(p);a.getWorkbenchGrid().changeCoverHintStatus(!1)},Sb=function(a,d,h,p,v){var I=new g(B.getRemoteImpl(),function(){console.log("save schema success, oRef:",d);p&&p()},function(){console.log("save schema error");v&&v()});I.setShowBlocking(!1);I.saveOriginalSchema(a,d,h)},Qb=function(a,d){function h(xa){var Ia=[];xa&&(Ia=new ea,Ia.fromJsonObject(xa),
Ia=wb(Ia));I.setInitGridWidgets(Ia);I.showWorkbenchGrid();Ia&&0!==Ia.length||f.setWorkbenchPreviewPic(v,null);d&&d()}function p(){I.setInitGridWidgets([]);I.showWorkbenchGrid()}var v=a.getWorkbenchId();if(k.checkNeedLoadWorkbenchGrid(a,!1,xb)&&oa(v)){var I=new Z;I.setWorkbench(a);I.setInitGridAction(function(){Na(v,h,p)});I.setBeforeCloseAction(function(xa){f.checkWorkbenchExist(v)||xa(!0);m(v,function(){xa&&xa(!0)});yb(v)});I.setUserObject(P.convertWorkbenchToPinBarItem(a));I.setFunSwitchLockStateChecker(Ma);
I.setFunSwitchLockState(kb);k.addGridTab(I,!0)}},Db=function(a,d){function h(xa){var Ia=[];xa&&(Ia=new ea,Ia.fromJsonObject(xa),Ia=wb(Ia));I.setInitGridWidgets(Ia);I.showWorkbenchGrid();Ia&&0!==Ia.length||f.setWorkbenchPreviewPic(v,null);d&&d();k.resize()}function p(){I.setInitGridWidgets([]);I.showWorkbenchGrid()}var v=a.getWorkbenchId();if(k.checkNeedLoadWorkbenchGrid(a,!0,xb)){f.selectWorkbench(a);var I=new Fa;I.setWorkbench(a);I.setInitGridAction(function(){Na(v,h,p)});I.setBeforeCloseAction(function(xa){f.checkWorkbenchExist(v)||
xa(!0);m(v,function(){xa&&xa(!0)});yb(v)});k.setFixedTab(I,!0)}},yb=function(a){for(var d in Q)-1<d.indexOf(a)&&(Q[d].destroy(),delete Q[d])},Cb=function(a,d){var h=new ea,p=new Xa;p.setName(a.getBizId());p.setDisplayName(a.getBizName());p.setX(0);p.setY(0);p.setWidth(a.getGridColumns());p.setHeight(a.getGridRows());for(a=0;a<d.length;a++){var v,I=d[a];I.getType()===ea.WidgetType_Square?v=new ab:I.getType()===ea.WidgetType_Longer?v=new bb:I.getType()===ea.WidgetType_Dashboard?v=new fb:I.getType()===
ea.WidgetType_QingReport?v=new hb:I.getType()===ea.WidgetType_Metrics&&(v=new eb);v.setName(I.getName());v.setDisplayName(I.getDisplayName());v.setX(I.getX());v.setY(I.getY());v.setWidth(I.getW());v.setHeight(I.getH());v.setReferenceCustomMap(I.getExtInfo().oRef);p.addWidget(v)}h.setPage(p);return h},wb=function(a){var d=[];a=a.getPage().getWidgets();for(var h=0;h<a.length;h++){var p=a[h],v=p.getReferenceCustomMap(),I=new com.kingdee.bos.qing.workbench.GridWidget;I.setId(v.refToId+"#"+v.uid);I.setType(p.getWidgetTypeName());
I.setDisplayName(p.getDisplayName());I.setName(I.getDisplayName()?I.getDisplayName():p.getName());I.setX(p.getX());I.setY(p.getY());I.setW(p.getWidth());I.setH(p.getHeight());I.addExtInfo("oRef",v);d.push(I)}return d},xb=function(a,d){d=d?aa.get("alreadyBeenOpenedInRightTab","\u5de5\u4f5c\u53f0 \"'#1'\" \u5df2\u7ecf\u5728\u53f3\u4fa7\u9875\u7b7e\u4e2d\u6253\u5f00\u3002"):aa.get("alreadyBeenOpenedInCurTab","\u5de5\u4f5c\u53f0 \"'#1'\" \u5df2\u7ecf\u5728\u53f3\u4fa7\u9875\u7b7e\u4e2d\u6253\u5f00\u3002");
d=d.replace("#1",a.getWorkbenchName());f.showHint(!1,d)},Gb=function(a,d){Ea.uploadBase64Image(d,function(h){Wb(a,h)},function(){})},Wb=function(a,d){var h=new g(B.getRemoteImpl(),function(p){},function(p,v){});h.setShowBlocking(!1);h.updateWorkbenchThumbnail(a,d)},Hb=function(a){var d=new g(B.getRemoteImpl(),function(h){},function(h,p){});d.setShowBlocking(!1);d.deleteWorkbenchThumbnail(a)},Rb=function(a,d,h){var p=com.kingdee.bos.qing.ui.component.MessageDialog,v=p.createFeedbackDialog();v.setMsgImageType(p.MSG_DELETE);
v.setMessage(a);v.showDialog();v.setClosingChecker(function(I){I==p.RETURN_OK?d&&d():h&&h();return!0})}};var X,Y,ja,pa,J,wa,aa,ma,ra,T,sa,ya,Fa,Z,za,Ha,qa,La,Ea,Va,Ja,Da,g,u,D,ha,W,L,F,P,ka,ea,Xa,ab,bb,fb,hb,eb,ib;(function(){var da=com.kingdee.bos.qing;J=da.SkinUtil;da=com.kingdee.bos.qing.framework.common;wa=da.WindowResizeObserver;aa=da.MultilanguageManager.createPackageAccessor(n);da=com.kingdee.bos.qing.ui.component;Y=da.SplitPane;T=da.ComboBox;D=da.SearchBox;ha=da.MessageDialog;ib=da.MessageCurtain;
da=com.kingdee.bos.qing.common;ja=da.Util;pa=da.DomUtil;da=com.kingdee.bos.qing.workbench;X=da.MyIcons;sa=da.WorkbenchTabContainer;ya=da.WorkbenchIFrameTabPane;Z=da.WorkbenchGridTabPane;Fa=da.WorkbenchFixedTabPane;za=da.WorkBenchMenuPane;Ha=da.WorkbenchSchemaArea;Va=da.QingGrid;da=com.kingdee.bos.qing.workbench.model;ma=da.MenuNode;ra=da.MenuFolderNode;Ja=da.DropdownOption;L=da.Workbench;F=da.PinTabBarItem;P=da.WorkbenchUtil;Da=da.RefPathType;ea=da.WorkbenchModel;Xa=da.Page;ab=da.WidgetSquare;bb=
da.WidgetLonger;fb=da.WidgetDashboard;hb=da.WidgetQingReport;eb=da.WidgetMetric;qa=da.WorkbenchGptModel;da=com.kingdee.bos.qing.workbench.common;La=da.MetricIntegration;Ea=da.WorkbenchHelper;W=da.Integration;g=da.Facade;u=da.RemoteImpl;ka=da.WorkbenchBehavior})()})();
//qingVersionTag: 20250415