@a2simcode/dui 0.0.36 → 0.0.37

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -24,7 +24,7 @@ declare const DBiDesign: {
24
24
  }>> & Readonly<{
25
25
  "onUpdate:scale"?: ((...args: any[]) => any) | undefined;
26
26
  }>, {
27
- clearData: () => void;
27
+ clear: () => void;
28
28
  setData: (data: Record<string, any>) => void;
29
29
  getData: () => {
30
30
  ver: string;
@@ -85,7 +85,7 @@ declare const DBiDesign: {
85
85
  }>> & Readonly<{
86
86
  "onUpdate:scale"?: ((...args: any[]) => any) | undefined;
87
87
  }>, {
88
- clearData: () => void;
88
+ clear: () => void;
89
89
  setData: (data: Record<string, any>) => void;
90
90
  getData: () => {
91
91
  ver: string;
@@ -135,7 +135,7 @@ declare const DBiDesign: {
135
135
  }>> & Readonly<{
136
136
  "onUpdate:scale"?: ((...args: any[]) => any) | undefined;
137
137
  }>, {
138
- clearData: () => void;
138
+ clear: () => void;
139
139
  setData: (data: Record<string, any>) => void;
140
140
  getData: () => {
141
141
  ver: string;
@@ -42,7 +42,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
42
42
  default: number;
43
43
  };
44
44
  }>, {
45
- clearData: () => void;
45
+ clear: () => void;
46
46
  setData: (data: Record<string, any>) => void;
47
47
  getData: () => {
48
48
  ver: string;
package/dist/dui.es.js CHANGED
@@ -17949,7 +17949,7 @@ var $U = /* @__PURE__ */ oo(GU, [["render", zU]]), XU = /* @__PURE__ */ sp(((e,
17949
17949
  });
17950
17950
  }), ot = hA(), Pe = hA({});
17951
17951
  return A({
17952
- clearData: le,
17952
+ clear: le,
17953
17953
  setData: Qe,
17954
17954
  getData: ZA,
17955
17955
  getImg: te,
package/dist/dui.umd.js CHANGED
@@ -32,4 +32,4 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
32
32
  content: "" !important;
33
33
  display: none !important;
34
34
  }`,LQ=function(s){TQ(s,"."+Zi+DQ+iu+`
35
- .`+ji+NQ+iu)},TQ=function(s,i){var u=s.ownerDocument;if(u){var l=u.createElement("style");l.textContent=i,s.appendChild(l)}},su=(function(){function s(){}return s.getOrigin=function(i){var u=s._link;return u?(u.href=i,u.href=u.href,u.protocol+u.hostname+u.port):"about:blank"},s.isSameOrigin=function(i){return s.getOrigin(i)===s._origin},s.setContext=function(i){s._link=i.document.createElement("a"),s._origin=s.getOrigin(i.location.href)},s._origin="about:blank",s})(),kQ=(function(){function s(i,u){this.context=i,this._options=u,this._cache={}}return s.prototype.addImage=function(i){var u=Promise.resolve();return this.has(i)||(As(i)||RQ(i))&&(this._cache[i]=this.loadImage(i)).catch(function(){}),u},s.prototype.match=function(i){return this._cache[i]},s.prototype.loadImage=function(i){return a(this,void 0,void 0,function(){var u,l,f,p,C=this;return c(this,function(Q){switch(Q.label){case 0:return u=su.isSameOrigin(i),l=!qi(i)&&this._options.useCORS===!0&&Be.SUPPORT_CORS_IMAGES&&!u,f=!qi(i)&&!u&&!As(i)&&typeof this._options.proxy=="string"&&Be.SUPPORT_CORS_XHR&&!l,!u&&this._options.allowTaint===!1&&!qi(i)&&!As(i)&&!f&&!l?[2]:(p=i,f?[4,this.proxy(p)]:[3,2]);case 1:p=Q.sent(),Q.label=2;case 2:return this.context.logger.debug("Added image "+i.substring(0,256)),[4,new Promise(function(E,N){var K=new Image;K.onload=function(){return E(K)},K.onerror=N,(VQ(p)||l)&&(K.crossOrigin="anonymous"),K.src=p,K.complete===!0&&setTimeout(function(){return E(K)},500),C._options.imageTimeout>0&&setTimeout(function(){return N("Timed out ("+C._options.imageTimeout+"ms) loading image")},C._options.imageTimeout)})];case 3:return[2,Q.sent()]}})})},s.prototype.has=function(i){return typeof this._cache[i]<"u"},s.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},s.prototype.proxy=function(i){var u=this,l=this._options.proxy;if(!l)throw new Error("No proxy defined");var f=i.substring(0,256);return new Promise(function(p,C){var Q=Be.SUPPORT_RESPONSE_TYPE?"blob":"text",E=new XMLHttpRequest;E.onload=function(){if(E.status===200)if(Q==="text")p(E.response);else{var X=new FileReader;X.addEventListener("load",function(){return p(X.result)},!1),X.addEventListener("error",function(j){return C(j)},!1),X.readAsDataURL(E.response)}else C("Failed to proxy resource "+f+" with status code "+E.status)},E.onerror=C;var N=l.indexOf("?")>-1?"&":"?";if(E.open("GET",""+l+N+"url="+encodeURIComponent(i)+"&responseType="+Q),Q!=="text"&&E instanceof XMLHttpRequest&&(E.responseType=Q),u._options.imageTimeout){var K=u._options.imageTimeout;E.timeout=K,E.ontimeout=function(){return C("Timed out ("+K+"ms) proxying "+f)}}E.send()})},s})(),MQ=/^data:image\/svg\+xml/i,OQ=/^data:image\/.*;base64,/i,KQ=/^data:image\/.*/i,RQ=function(s){return Be.SUPPORT_SVG_DRAWING||!PQ(s)},qi=function(s){return KQ.test(s)},VQ=function(s){return OQ.test(s)},As=function(s){return s.substr(0,4)==="blob"},PQ=function(s){return s.substr(-3).toLowerCase()==="svg"||MQ.test(s)},QA=(function(){function s(i,u){this.type=0,this.x=i,this.y=u}return s.prototype.add=function(i,u){return new s(this.x+i,this.y+u)},s})(),un=function(s,i,u){return new QA(s.x+(i.x-s.x)*u,s.y+(i.y-s.y)*u)},yo=(function(){function s(i,u,l,f){this.type=1,this.start=i,this.startControl=u,this.endControl=l,this.end=f}return s.prototype.subdivide=function(i,u){var l=un(this.start,this.startControl,i),f=un(this.startControl,this.endControl,i),p=un(this.endControl,this.end,i),C=un(l,f,i),Q=un(f,p,i),E=un(C,Q,i);return u?new s(this.start,l,C,E):new s(E,Q,p,this.end)},s.prototype.add=function(i,u){return new s(this.start.add(i,u),this.startControl.add(i,u),this.endControl.add(i,u),this.end.add(i,u))},s.prototype.reverse=function(){return new s(this.end,this.endControl,this.startControl,this.start)},s})(),De=function(s){return s.type===1},GQ=(function(){function s(i){var u=i.styles,l=i.bounds,f=$n(u.borderTopLeftRadius,l.width,l.height),p=f[0],C=f[1],Q=$n(u.borderTopRightRadius,l.width,l.height),E=Q[0],N=Q[1],K=$n(u.borderBottomRightRadius,l.width,l.height),X=K[0],j=K[1],CA=$n(u.borderBottomLeftRadius,l.width,l.height),BA=CA[0],wA=CA[1],RA=[];RA.push((p+E)/l.width),RA.push((BA+X)/l.width),RA.push((C+wA)/l.height),RA.push((N+j)/l.height);var DA=Math.max.apply(Math,RA);DA>1&&(p/=DA,C/=DA,E/=DA,N/=DA,X/=DA,j/=DA,BA/=DA,wA/=DA);var _A=l.width-E,te=l.height-j,XA=l.width-X,kA=l.height-wA,FA=u.borderTopWidth,zA=u.borderRightWidth,$A=u.borderBottomWidth,OA=u.borderLeftWidth,ue=Ae(u.paddingTop,i.bounds.width),Ee=Ae(u.paddingRight,i.bounds.width),_e=Ae(u.paddingBottom,i.bounds.width),qA=Ae(u.paddingLeft,i.bounds.width);this.topLeftBorderDoubleOuterBox=p>0||C>0?re(l.left+OA/3,l.top+FA/3,p-OA/3,C-FA/3,JA.TOP_LEFT):new QA(l.left+OA/3,l.top+FA/3),this.topRightBorderDoubleOuterBox=p>0||C>0?re(l.left+_A,l.top+FA/3,E-zA/3,N-FA/3,JA.TOP_RIGHT):new QA(l.left+l.width-zA/3,l.top+FA/3),this.bottomRightBorderDoubleOuterBox=X>0||j>0?re(l.left+XA,l.top+te,X-zA/3,j-$A/3,JA.BOTTOM_RIGHT):new QA(l.left+l.width-zA/3,l.top+l.height-$A/3),this.bottomLeftBorderDoubleOuterBox=BA>0||wA>0?re(l.left+OA/3,l.top+kA,BA-OA/3,wA-$A/3,JA.BOTTOM_LEFT):new QA(l.left+OA/3,l.top+l.height-$A/3),this.topLeftBorderDoubleInnerBox=p>0||C>0?re(l.left+OA*2/3,l.top+FA*2/3,p-OA*2/3,C-FA*2/3,JA.TOP_LEFT):new QA(l.left+OA*2/3,l.top+FA*2/3),this.topRightBorderDoubleInnerBox=p>0||C>0?re(l.left+_A,l.top+FA*2/3,E-zA*2/3,N-FA*2/3,JA.TOP_RIGHT):new QA(l.left+l.width-zA*2/3,l.top+FA*2/3),this.bottomRightBorderDoubleInnerBox=X>0||j>0?re(l.left+XA,l.top+te,X-zA*2/3,j-$A*2/3,JA.BOTTOM_RIGHT):new QA(l.left+l.width-zA*2/3,l.top+l.height-$A*2/3),this.bottomLeftBorderDoubleInnerBox=BA>0||wA>0?re(l.left+OA*2/3,l.top+kA,BA-OA*2/3,wA-$A*2/3,JA.BOTTOM_LEFT):new QA(l.left+OA*2/3,l.top+l.height-$A*2/3),this.topLeftBorderStroke=p>0||C>0?re(l.left+OA/2,l.top+FA/2,p-OA/2,C-FA/2,JA.TOP_LEFT):new QA(l.left+OA/2,l.top+FA/2),this.topRightBorderStroke=p>0||C>0?re(l.left+_A,l.top+FA/2,E-zA/2,N-FA/2,JA.TOP_RIGHT):new QA(l.left+l.width-zA/2,l.top+FA/2),this.bottomRightBorderStroke=X>0||j>0?re(l.left+XA,l.top+te,X-zA/2,j-$A/2,JA.BOTTOM_RIGHT):new QA(l.left+l.width-zA/2,l.top+l.height-$A/2),this.bottomLeftBorderStroke=BA>0||wA>0?re(l.left+OA/2,l.top+kA,BA-OA/2,wA-$A/2,JA.BOTTOM_LEFT):new QA(l.left+OA/2,l.top+l.height-$A/2),this.topLeftBorderBox=p>0||C>0?re(l.left,l.top,p,C,JA.TOP_LEFT):new QA(l.left,l.top),this.topRightBorderBox=E>0||N>0?re(l.left+_A,l.top,E,N,JA.TOP_RIGHT):new QA(l.left+l.width,l.top),this.bottomRightBorderBox=X>0||j>0?re(l.left+XA,l.top+te,X,j,JA.BOTTOM_RIGHT):new QA(l.left+l.width,l.top+l.height),this.bottomLeftBorderBox=BA>0||wA>0?re(l.left,l.top+kA,BA,wA,JA.BOTTOM_LEFT):new QA(l.left,l.top+l.height),this.topLeftPaddingBox=p>0||C>0?re(l.left+OA,l.top+FA,Math.max(0,p-OA),Math.max(0,C-FA),JA.TOP_LEFT):new QA(l.left+OA,l.top+FA),this.topRightPaddingBox=E>0||N>0?re(l.left+Math.min(_A,l.width-zA),l.top+FA,_A>l.width+zA?0:Math.max(0,E-zA),Math.max(0,N-FA),JA.TOP_RIGHT):new QA(l.left+l.width-zA,l.top+FA),this.bottomRightPaddingBox=X>0||j>0?re(l.left+Math.min(XA,l.width-OA),l.top+Math.min(te,l.height-$A),Math.max(0,X-zA),Math.max(0,j-$A),JA.BOTTOM_RIGHT):new QA(l.left+l.width-zA,l.top+l.height-$A),this.bottomLeftPaddingBox=BA>0||wA>0?re(l.left+OA,l.top+Math.min(kA,l.height-$A),Math.max(0,BA-OA),Math.max(0,wA-$A),JA.BOTTOM_LEFT):new QA(l.left+OA,l.top+l.height-$A),this.topLeftContentBox=p>0||C>0?re(l.left+OA+qA,l.top+FA+ue,Math.max(0,p-(OA+qA)),Math.max(0,C-(FA+ue)),JA.TOP_LEFT):new QA(l.left+OA+qA,l.top+FA+ue),this.topRightContentBox=E>0||N>0?re(l.left+Math.min(_A,l.width+OA+qA),l.top+FA+ue,_A>l.width+OA+qA?0:E-OA+qA,N-(FA+ue),JA.TOP_RIGHT):new QA(l.left+l.width-(zA+Ee),l.top+FA+ue),this.bottomRightContentBox=X>0||j>0?re(l.left+Math.min(XA,l.width-(OA+qA)),l.top+Math.min(te,l.height+FA+ue),Math.max(0,X-(zA+Ee)),j-($A+_e),JA.BOTTOM_RIGHT):new QA(l.left+l.width-(zA+Ee),l.top+l.height-($A+_e)),this.bottomLeftContentBox=BA>0||wA>0?re(l.left+OA+qA,l.top+kA,Math.max(0,BA-(OA+qA)),wA-($A+_e),JA.BOTTOM_LEFT):new QA(l.left+OA+qA,l.top+l.height-($A+_e))}return s})(),JA;(function(s){s[s.TOP_LEFT=0]="TOP_LEFT",s[s.TOP_RIGHT=1]="TOP_RIGHT",s[s.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",s[s.BOTTOM_LEFT=3]="BOTTOM_LEFT"})(JA||(JA={}));var re=function(s,i,u,l,f){var p=4*((Math.sqrt(2)-1)/3),C=u*p,Q=l*p,E=s+u,N=i+l;switch(f){case JA.TOP_LEFT:return new yo(new QA(s,N),new QA(s,N-Q),new QA(E-C,i),new QA(E,i));case JA.TOP_RIGHT:return new yo(new QA(s,i),new QA(s+C,i),new QA(E,N-Q),new QA(E,N));case JA.BOTTOM_RIGHT:return new yo(new QA(E,i),new QA(E,i+Q),new QA(s+C,N),new QA(s,N));case JA.BOTTOM_LEFT:default:return new yo(new QA(E,N),new QA(E-C,N),new QA(s,i+Q),new QA(s,i))}},vo=function(s){return[s.topLeftBorderBox,s.topRightBorderBox,s.bottomRightBorderBox,s.bottomLeftBorderBox]},zQ=function(s){return[s.topLeftContentBox,s.topRightContentBox,s.bottomRightContentBox,s.bottomLeftContentBox]},Qo=function(s){return[s.topLeftPaddingBox,s.topRightPaddingBox,s.bottomRightPaddingBox,s.bottomLeftPaddingBox]},$Q=(function(){function s(i,u,l){this.offsetX=i,this.offsetY=u,this.matrix=l,this.type=0,this.target=6}return s})(),Eo=(function(){function s(i,u){this.path=i,this.target=u,this.type=1}return s})(),XQ=(function(){function s(i){this.opacity=i,this.type=2,this.target=6}return s})(),WQ=function(s){return s.type===0},au=function(s){return s.type===1},YQ=function(s){return s.type===2},lu=function(s,i){return s.length===i.length?s.some(function(u,l){return u===i[l]}):!1},JQ=function(s,i,u,l,f){return s.map(function(p,C){switch(C){case 0:return p.add(i,u);case 1:return p.add(i+l,u);case 2:return p.add(i+l,u+f);case 3:return p.add(i,u+f)}return p})},cu=(function(){function s(i){this.element=i,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}return s})(),uu=(function(){function s(i,u){if(this.container=i,this.parent=u,this.effects=[],this.curves=new GQ(this.container),this.container.styles.opacity<1&&this.effects.push(new XQ(this.container.styles.opacity)),this.container.styles.transform!==null){var l=this.container.bounds.left+this.container.styles.transformOrigin[0].number,f=this.container.bounds.top+this.container.styles.transformOrigin[1].number,p=this.container.styles.transform;this.effects.push(new $Q(l,f,p))}if(this.container.styles.overflowX!==0){var C=vo(this.curves),Q=Qo(this.curves);lu(C,Q)?this.effects.push(new Eo(C,6)):(this.effects.push(new Eo(C,2)),this.effects.push(new Eo(Q,4)))}}return s.prototype.getEffects=function(i){for(var u=[2,3].indexOf(this.container.styles.position)===-1,l=this.parent,f=this.effects.slice(0);l;){var p=l.effects.filter(function(E){return!au(E)});if(u||l.container.styles.position!==0||!l.parent){if(f.unshift.apply(f,p),u=[2,3].indexOf(l.container.styles.position)===-1,l.container.styles.overflowX!==0){var C=vo(l.curves),Q=Qo(l.curves);lu(C,Q)||f.unshift(new Eo(Q,6))}}else f.unshift.apply(f,p);l=l.parent}return f.filter(function(E){return fe(E.target,i)})},s})(),es=function(s,i,u,l){s.container.elements.forEach(function(f){var p=fe(f.flags,4),C=fe(f.flags,2),Q=new uu(f,s);fe(f.styles.display,2048)&&l.push(Q);var E=fe(f.flags,8)?[]:l;if(p||C){var N=p||f.styles.isPositioned()?u:i,K=new cu(Q);if(f.styles.isPositioned()||f.styles.opacity<1||f.styles.isTransformed()){var X=f.styles.zIndex.order;if(X<0){var j=0;N.negativeZIndex.some(function(BA,wA){return X>BA.element.container.styles.zIndex.order?(j=wA,!1):j>0}),N.negativeZIndex.splice(j,0,K)}else if(X>0){var CA=0;N.positiveZIndex.some(function(BA,wA){return X>=BA.element.container.styles.zIndex.order?(CA=wA+1,!1):CA>0}),N.positiveZIndex.splice(CA,0,K)}else N.zeroOrAutoZIndexOrTransformedOrOpacity.push(K)}else f.styles.isFloating()?N.nonPositionedFloats.push(K):N.nonPositionedInlineLevel.push(K);es(Q,K,p?K:u,E)}else f.styles.isInlineLevel()?i.inlineLevel.push(Q):i.nonInlineLevel.push(Q),es(Q,i,u,E);fe(f.flags,8)&&du(f,E)})},du=function(s,i){for(var u=s instanceof Gi?s.start:1,l=s instanceof Gi?s.reversed:!1,f=0;f<i.length;f++){var p=i[f];p.container instanceof kc&&typeof p.container.value=="number"&&p.container.value!==0&&(u=p.container.value),p.listValue=jn(u,p.container.styles.listStyleType,!0),u+=l?-1:1}},ZQ=function(s){var i=new uu(s,null),u=new cu(i),l=[];return es(i,u,u,l),du(i.container,l),u},fu=function(s,i){switch(i){case 0:return Ne(s.topLeftBorderBox,s.topLeftPaddingBox,s.topRightBorderBox,s.topRightPaddingBox);case 1:return Ne(s.topRightBorderBox,s.topRightPaddingBox,s.bottomRightBorderBox,s.bottomRightPaddingBox);case 2:return Ne(s.bottomRightBorderBox,s.bottomRightPaddingBox,s.bottomLeftBorderBox,s.bottomLeftPaddingBox);default:return Ne(s.bottomLeftBorderBox,s.bottomLeftPaddingBox,s.topLeftBorderBox,s.topLeftPaddingBox)}},jQ=function(s,i){switch(i){case 0:return Ne(s.topLeftBorderBox,s.topLeftBorderDoubleOuterBox,s.topRightBorderBox,s.topRightBorderDoubleOuterBox);case 1:return Ne(s.topRightBorderBox,s.topRightBorderDoubleOuterBox,s.bottomRightBorderBox,s.bottomRightBorderDoubleOuterBox);case 2:return Ne(s.bottomRightBorderBox,s.bottomRightBorderDoubleOuterBox,s.bottomLeftBorderBox,s.bottomLeftBorderDoubleOuterBox);default:return Ne(s.bottomLeftBorderBox,s.bottomLeftBorderDoubleOuterBox,s.topLeftBorderBox,s.topLeftBorderDoubleOuterBox)}},qQ=function(s,i){switch(i){case 0:return Ne(s.topLeftBorderDoubleInnerBox,s.topLeftPaddingBox,s.topRightBorderDoubleInnerBox,s.topRightPaddingBox);case 1:return Ne(s.topRightBorderDoubleInnerBox,s.topRightPaddingBox,s.bottomRightBorderDoubleInnerBox,s.bottomRightPaddingBox);case 2:return Ne(s.bottomRightBorderDoubleInnerBox,s.bottomRightPaddingBox,s.bottomLeftBorderDoubleInnerBox,s.bottomLeftPaddingBox);default:return Ne(s.bottomLeftBorderDoubleInnerBox,s.bottomLeftPaddingBox,s.topLeftBorderDoubleInnerBox,s.topLeftPaddingBox)}},AE=function(s,i){switch(i){case 0:return Fo(s.topLeftBorderStroke,s.topRightBorderStroke);case 1:return Fo(s.topRightBorderStroke,s.bottomRightBorderStroke);case 2:return Fo(s.bottomRightBorderStroke,s.bottomLeftBorderStroke);default:return Fo(s.bottomLeftBorderStroke,s.topLeftBorderStroke)}},Fo=function(s,i){var u=[];return De(s)?u.push(s.subdivide(.5,!1)):u.push(s),De(i)?u.push(i.subdivide(.5,!0)):u.push(i),u},Ne=function(s,i,u,l){var f=[];return De(s)?f.push(s.subdivide(.5,!1)):f.push(s),De(u)?f.push(u.subdivide(.5,!0)):f.push(u),De(l)?f.push(l.subdivide(.5,!0).reverse()):f.push(l),De(i)?f.push(i.subdivide(.5,!1).reverse()):f.push(i),f},gu=function(s){var i=s.bounds,u=s.styles;return i.add(u.borderLeftWidth,u.borderTopWidth,-(u.borderRightWidth+u.borderLeftWidth),-(u.borderTopWidth+u.borderBottomWidth))},Uo=function(s){var i=s.styles,u=s.bounds,l=Ae(i.paddingLeft,u.width),f=Ae(i.paddingRight,u.width),p=Ae(i.paddingTop,u.width),C=Ae(i.paddingBottom,u.width);return u.add(l+i.borderLeftWidth,p+i.borderTopWidth,-(i.borderRightWidth+i.borderLeftWidth+l+f),-(i.borderTopWidth+i.borderBottomWidth+p+C))},eE=function(s,i){return s===0?i.bounds:s===2?Uo(i):gu(i)},tE=function(s,i){return s===0?i.bounds:s===2?Uo(i):gu(i)},ts=function(s,i,u){var l=eE(fn(s.styles.backgroundOrigin,i),s),f=tE(fn(s.styles.backgroundClip,i),s),p=nE(fn(s.styles.backgroundSize,i),u,l),C=p[0],Q=p[1],E=$n(fn(s.styles.backgroundPosition,i),l.width-C,l.height-Q);return[rE(fn(s.styles.backgroundRepeat,i),E,p,l,f),Math.round(l.left+E[0]),Math.round(l.top+E[1]),C,Q]},dn=function(s){return jA(s)&&s.value===sn.AUTO},bo=function(s){return typeof s=="number"},nE=function(s,i,u){var l=i[0],f=i[1],p=i[2],C=s[0],Q=s[1];if(!C)return[0,0];if(ce(C)&&Q&&ce(Q))return[Ae(C,u.width),Ae(Q,u.height)];var E=bo(p);if(jA(C)&&(C.value===sn.CONTAIN||C.value===sn.COVER))return bo(p)?u.width/u.height<p!=(C.value===sn.COVER)?[u.width,u.width/p]:[u.height*p,u.height]:[u.width,u.height];var N=bo(l),K=bo(f),X=N||K;if(dn(C)&&(!Q||dn(Q)))return N&&K?[l,f]:!E&&!X?[u.width,u.height]:X&&E?[N?l:f*p,K?f:l/p]:[N?l:u.width,K?f:u.height];if(E){var j=0,CA=0;return ce(C)?j=Ae(C,u.width):ce(Q)&&(CA=Ae(Q,u.height)),dn(C)?j=CA*p:(!Q||dn(Q))&&(CA=j/p),[j,CA]}var BA=null,wA=null;if(ce(C)?BA=Ae(C,u.width):Q&&ce(Q)&&(wA=Ae(Q,u.height)),BA!==null&&(!Q||dn(Q))&&(wA=N&&K?BA/l*f:u.height),wA!==null&&dn(C)&&(BA=N&&K?wA/f*l:u.width),BA!==null&&wA!==null)return[BA,wA];throw new Error("Unable to calculate background-size for element")},fn=function(s,i){var u=s[i];return typeof u>"u"?s[0]:u},rE=function(s,i,u,l,f){var p=i[0],C=i[1],Q=u[0],E=u[1];switch(s){case 2:return[new QA(Math.round(l.left),Math.round(l.top+C)),new QA(Math.round(l.left+l.width),Math.round(l.top+C)),new QA(Math.round(l.left+l.width),Math.round(E+l.top+C)),new QA(Math.round(l.left),Math.round(E+l.top+C))];case 3:return[new QA(Math.round(l.left+p),Math.round(l.top)),new QA(Math.round(l.left+p+Q),Math.round(l.top)),new QA(Math.round(l.left+p+Q),Math.round(l.height+l.top)),new QA(Math.round(l.left+p),Math.round(l.height+l.top))];case 1:return[new QA(Math.round(l.left+p),Math.round(l.top+C)),new QA(Math.round(l.left+p+Q),Math.round(l.top+C)),new QA(Math.round(l.left+p+Q),Math.round(l.top+C+E)),new QA(Math.round(l.left+p),Math.round(l.top+C+E))];default:return[new QA(Math.round(f.left),Math.round(f.top)),new QA(Math.round(f.left+f.width),Math.round(f.top)),new QA(Math.round(f.left+f.width),Math.round(f.height+f.top)),new QA(Math.round(f.left),Math.round(f.height+f.top))]}},oE="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",hu="Hidden Text",iE=(function(){function s(i){this._data={},this._document=i}return s.prototype.parseMetrics=function(i,u){var l=this._document.createElement("div"),f=this._document.createElement("img"),p=this._document.createElement("span"),C=this._document.body;l.style.visibility="hidden",l.style.fontFamily=i,l.style.fontSize=u,l.style.margin="0",l.style.padding="0",l.style.whiteSpace="nowrap",C.appendChild(l),f.src=oE,f.width=1,f.height=1,f.style.margin="0",f.style.padding="0",f.style.verticalAlign="baseline",p.style.fontFamily=i,p.style.fontSize=u,p.style.margin="0",p.style.padding="0",p.appendChild(this._document.createTextNode(hu)),l.appendChild(p),l.appendChild(f);var Q=f.offsetTop-p.offsetTop+2;l.removeChild(p),l.appendChild(this._document.createTextNode(hu)),l.style.lineHeight="normal",f.style.verticalAlign="super";var E=f.offsetTop-l.offsetTop+2;return C.removeChild(l),{baseline:Q,middle:E}},s.prototype.getMetrics=function(i,u){var l=i+" "+u;return typeof this._data[l]>"u"&&(this._data[l]=this.parseMetrics(i,u)),this._data[l]},s})(),Bu=(function(){function s(i,u){this.context=i,this.options=u}return s})(),sE=1e4,aE=(function(s){n(i,s);function i(u,l){var f=s.call(this,u,l)||this;return f._activeEffects=[],f.canvas=l.canvas?l.canvas:document.createElement("canvas"),f.ctx=f.canvas.getContext("2d"),l.canvas||(f.canvas.width=Math.floor(l.width*l.scale),f.canvas.height=Math.floor(l.height*l.scale),f.canvas.style.width=l.width+"px",f.canvas.style.height=l.height+"px"),f.fontMetrics=new iE(document),f.ctx.scale(f.options.scale,f.options.scale),f.ctx.translate(-l.x,-l.y),f.ctx.textBaseline="bottom",f._activeEffects=[],f.context.logger.debug("Canvas renderer initialized ("+l.width+"x"+l.height+") with scale "+l.scale),f}return i.prototype.applyEffects=function(u){for(var l=this;this._activeEffects.length;)this.popEffect();u.forEach(function(f){return l.applyEffect(f)})},i.prototype.applyEffect=function(u){this.ctx.save(),YQ(u)&&(this.ctx.globalAlpha=u.opacity),WQ(u)&&(this.ctx.translate(u.offsetX,u.offsetY),this.ctx.transform(u.matrix[0],u.matrix[1],u.matrix[2],u.matrix[3],u.matrix[4],u.matrix[5]),this.ctx.translate(-u.offsetX,-u.offsetY)),au(u)&&(this.path(u.path),this.ctx.clip()),this._activeEffects.push(u)},i.prototype.popEffect=function(){this._activeEffects.pop(),this.ctx.restore()},i.prototype.renderStack=function(u){return a(this,void 0,void 0,function(){var l;return c(this,function(f){switch(f.label){case 0:return l=u.element.container.styles,l.isVisible()?[4,this.renderStackContent(u)]:[3,2];case 1:f.sent(),f.label=2;case 2:return[2]}})})},i.prototype.renderNode=function(u){return a(this,void 0,void 0,function(){return c(this,function(l){switch(l.label){case 0:if(fe(u.container.flags,16))debugger;return u.container.styles.isVisible()?[4,this.renderNodeBackgroundAndBorders(u)]:[3,3];case 1:return l.sent(),[4,this.renderNodeContent(u)];case 2:l.sent(),l.label=3;case 3:return[2]}})})},i.prototype.renderTextWithLetterSpacing=function(u,l,f){var p=this;l===0?this.ctx.fillText(u.text,u.bounds.left,u.bounds.top+f):Pi(u.text).reduce(function(C,Q){return p.ctx.fillText(Q,C,u.bounds.top+f),C+p.ctx.measureText(Q).width},u.bounds.left)},i.prototype.createFontStyle=function(u){var l=u.fontVariant.filter(function(C){return C==="normal"||C==="small-caps"}).join(""),f=fE(u.fontFamily).join(", "),p=zn(u.fontSize)?""+u.fontSize.number+u.fontSize.unit:u.fontSize.number+"px";return[[u.fontStyle,l,u.fontWeight,p,f].join(" "),f,p]},i.prototype.renderTextNode=function(u,l){return a(this,void 0,void 0,function(){var f,p,C,Q,E,N,K,X,j=this;return c(this,function(CA){return f=this.createFontStyle(l),p=f[0],C=f[1],Q=f[2],this.ctx.font=p,this.ctx.direction=l.direction===1?"rtl":"ltr",this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic",E=this.fontMetrics.getMetrics(C,Q),N=E.baseline,K=E.middle,X=l.paintOrder,u.textBounds.forEach(function(BA){X.forEach(function(wA){switch(wA){case 0:j.ctx.fillStyle=ge(l.color),j.renderTextWithLetterSpacing(BA,l.letterSpacing,N);var RA=l.textShadow;RA.length&&BA.text.trim().length&&(RA.slice(0).reverse().forEach(function(DA){j.ctx.shadowColor=ge(DA.color),j.ctx.shadowOffsetX=DA.offsetX.number*j.options.scale,j.ctx.shadowOffsetY=DA.offsetY.number*j.options.scale,j.ctx.shadowBlur=DA.blur.number,j.renderTextWithLetterSpacing(BA,l.letterSpacing,N)}),j.ctx.shadowColor="",j.ctx.shadowOffsetX=0,j.ctx.shadowOffsetY=0,j.ctx.shadowBlur=0),l.textDecorationLine.length&&(j.ctx.fillStyle=ge(l.textDecorationColor||l.color),l.textDecorationLine.forEach(function(DA){switch(DA){case 1:j.ctx.fillRect(BA.bounds.left,Math.round(BA.bounds.top+N),BA.bounds.width,1);break;case 2:j.ctx.fillRect(BA.bounds.left,Math.round(BA.bounds.top),BA.bounds.width,1);break;case 3:j.ctx.fillRect(BA.bounds.left,Math.ceil(BA.bounds.top+K),BA.bounds.width,1);break}}));break;case 1:l.webkitTextStrokeWidth&&BA.text.trim().length&&(j.ctx.strokeStyle=ge(l.webkitTextStrokeColor),j.ctx.lineWidth=l.webkitTextStrokeWidth,j.ctx.lineJoin=window.chrome?"miter":"round",j.ctx.strokeText(BA.text,BA.bounds.left,BA.bounds.top+N)),j.ctx.strokeStyle="",j.ctx.lineWidth=0,j.ctx.lineJoin="miter";break}})}),[2]})})},i.prototype.renderReplacedElement=function(u,l,f){if(f&&u.intrinsicWidth>0&&u.intrinsicHeight>0){var p=Uo(u),C=Qo(l);this.path(C),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(f,0,0,u.intrinsicWidth,u.intrinsicHeight,p.left,p.top,p.width,p.height),this.ctx.restore()}},i.prototype.renderNodeContent=function(u){return a(this,void 0,void 0,function(){var l,f,p,C,Q,E,_A,_A,N,K,X,j,XA,CA,BA,kA,wA,RA,DA,_A,te,XA,kA;return c(this,function(FA){switch(FA.label){case 0:this.applyEffects(u.getEffects(4)),l=u.container,f=u.curves,p=l.styles,C=0,Q=l.textNodes,FA.label=1;case 1:return C<Q.length?(E=Q[C],[4,this.renderTextNode(E,p)]):[3,4];case 2:FA.sent(),FA.label=3;case 3:return C++,[3,1];case 4:if(!(l instanceof Nc))return[3,8];FA.label=5;case 5:return FA.trys.push([5,7,,8]),[4,this.context.cache.match(l.src)];case 6:return _A=FA.sent(),this.renderReplacedElement(l,f,_A),[3,8];case 7:return FA.sent(),this.context.logger.error("Error loading image "+l.src),[3,8];case 8:if(l instanceof Lc&&this.renderReplacedElement(l,f,l.canvas),!(l instanceof Tc))return[3,12];FA.label=9;case 9:return FA.trys.push([9,11,,12]),[4,this.context.cache.match(l.svg)];case 10:return _A=FA.sent(),this.renderReplacedElement(l,f,_A),[3,12];case 11:return FA.sent(),this.context.logger.error("Error loading svg "+l.svg.substring(0,255)),[3,12];case 12:return l instanceof Rc&&l.tree?(N=new i(this.context,{scale:this.options.scale,backgroundColor:l.backgroundColor,x:0,y:0,width:l.width,height:l.height}),[4,N.render(l.tree)]):[3,14];case 13:K=FA.sent(),l.width&&l.height&&this.ctx.drawImage(K,0,0,l.width,l.height,l.bounds.left,l.bounds.top,l.bounds.width,l.bounds.height),FA.label=14;case 14:if(l instanceof zi&&(X=Math.min(l.bounds.width,l.bounds.height),l.type===ho?l.checked&&(this.ctx.save(),this.path([new QA(l.bounds.left+X*.39363,l.bounds.top+X*.79),new QA(l.bounds.left+X*.16,l.bounds.top+X*.5549),new QA(l.bounds.left+X*.27347,l.bounds.top+X*.44071),new QA(l.bounds.left+X*.39694,l.bounds.top+X*.5649),new QA(l.bounds.left+X*.72983,l.bounds.top+X*.23),new QA(l.bounds.left+X*.84,l.bounds.top+X*.34085),new QA(l.bounds.left+X*.39363,l.bounds.top+X*.79)]),this.ctx.fillStyle=ge(Mc),this.ctx.fill(),this.ctx.restore()):l.type===Bo&&l.checked&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(l.bounds.left+X/2,l.bounds.top+X/2,X/4,0,Math.PI*2,!0),this.ctx.fillStyle=ge(Mc),this.ctx.fill(),this.ctx.restore())),lE(l)&&l.value.length){switch(j=this.createFontStyle(p),XA=j[0],CA=j[1],BA=this.fontMetrics.getMetrics(XA,CA).baseline,this.ctx.font=XA,this.ctx.fillStyle=ge(p.color),this.ctx.textBaseline="alphabetic",this.ctx.textAlign=uE(l.styles.textAlign),kA=Uo(l),wA=0,l.styles.textAlign){case 1:wA+=kA.width/2;break;case 2:wA+=kA.width;break}RA=kA.add(wA,0,0,-kA.height/2+1),this.ctx.save(),this.path([new QA(kA.left,kA.top),new QA(kA.left+kA.width,kA.top),new QA(kA.left+kA.width,kA.top+kA.height),new QA(kA.left,kA.top+kA.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new Jn(l.value,RA),p.letterSpacing,BA),this.ctx.restore(),this.ctx.textBaseline="alphabetic",this.ctx.textAlign="left"}if(!fe(l.styles.display,2048))return[3,20];if(l.styles.listStyleImage===null)return[3,19];if(DA=l.styles.listStyleImage,DA.type!==0)return[3,18];_A=void 0,te=DA.url,FA.label=15;case 15:return FA.trys.push([15,17,,18]),[4,this.context.cache.match(te)];case 16:return _A=FA.sent(),this.ctx.drawImage(_A,l.bounds.left-(_A.width+10),l.bounds.top),[3,18];case 17:return FA.sent(),this.context.logger.error("Error loading list-style-image "+te),[3,18];case 18:return[3,20];case 19:u.listValue&&l.styles.listStyleType!==-1&&(XA=this.createFontStyle(p)[0],this.ctx.font=XA,this.ctx.fillStyle=ge(p.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",kA=new h(l.bounds.left,l.bounds.top+Ae(l.styles.paddingTop,l.bounds.width),l.bounds.width,hc(p.lineHeight,p.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new Jn(u.listValue,kA),p.letterSpacing,hc(p.lineHeight,p.fontSize.number)/2+2),this.ctx.textBaseline="bottom",this.ctx.textAlign="left"),FA.label=20;case 20:return[2]}})})},i.prototype.renderStackContent=function(u){return a(this,void 0,void 0,function(){var l,f,DA,p,C,DA,Q,E,DA,N,K,DA,X,j,DA,CA,BA,DA,wA,RA,DA;return c(this,function(_A){switch(_A.label){case 0:if(fe(u.element.container.flags,16))debugger;return[4,this.renderNodeBackgroundAndBorders(u.element)];case 1:_A.sent(),l=0,f=u.negativeZIndex,_A.label=2;case 2:return l<f.length?(DA=f[l],[4,this.renderStack(DA)]):[3,5];case 3:_A.sent(),_A.label=4;case 4:return l++,[3,2];case 5:return[4,this.renderNodeContent(u.element)];case 6:_A.sent(),p=0,C=u.nonInlineLevel,_A.label=7;case 7:return p<C.length?(DA=C[p],[4,this.renderNode(DA)]):[3,10];case 8:_A.sent(),_A.label=9;case 9:return p++,[3,7];case 10:Q=0,E=u.nonPositionedFloats,_A.label=11;case 11:return Q<E.length?(DA=E[Q],[4,this.renderStack(DA)]):[3,14];case 12:_A.sent(),_A.label=13;case 13:return Q++,[3,11];case 14:N=0,K=u.nonPositionedInlineLevel,_A.label=15;case 15:return N<K.length?(DA=K[N],[4,this.renderStack(DA)]):[3,18];case 16:_A.sent(),_A.label=17;case 17:return N++,[3,15];case 18:X=0,j=u.inlineLevel,_A.label=19;case 19:return X<j.length?(DA=j[X],[4,this.renderNode(DA)]):[3,22];case 20:_A.sent(),_A.label=21;case 21:return X++,[3,19];case 22:CA=0,BA=u.zeroOrAutoZIndexOrTransformedOrOpacity,_A.label=23;case 23:return CA<BA.length?(DA=BA[CA],[4,this.renderStack(DA)]):[3,26];case 24:_A.sent(),_A.label=25;case 25:return CA++,[3,23];case 26:wA=0,RA=u.positiveZIndex,_A.label=27;case 27:return wA<RA.length?(DA=RA[wA],[4,this.renderStack(DA)]):[3,30];case 28:_A.sent(),_A.label=29;case 29:return wA++,[3,27];case 30:return[2]}})})},i.prototype.mask=function(u){this.ctx.beginPath(),this.ctx.moveTo(0,0),this.ctx.lineTo(this.canvas.width,0),this.ctx.lineTo(this.canvas.width,this.canvas.height),this.ctx.lineTo(0,this.canvas.height),this.ctx.lineTo(0,0),this.formatPath(u.slice(0).reverse()),this.ctx.closePath()},i.prototype.path=function(u){this.ctx.beginPath(),this.formatPath(u),this.ctx.closePath()},i.prototype.formatPath=function(u){var l=this;u.forEach(function(f,p){var C=De(f)?f.start:f;p===0?l.ctx.moveTo(C.x,C.y):l.ctx.lineTo(C.x,C.y),De(f)&&l.ctx.bezierCurveTo(f.startControl.x,f.startControl.y,f.endControl.x,f.endControl.y,f.end.x,f.end.y)})},i.prototype.renderRepeat=function(u,l,f,p){this.path(u),this.ctx.fillStyle=l,this.ctx.translate(f,p),this.ctx.fill(),this.ctx.translate(-f,-p)},i.prototype.resizeImage=function(u,l,f){var p;if(u.width===l&&u.height===f)return u;var C=((p=this.canvas.ownerDocument)!==null&&p!==void 0?p:document).createElement("canvas");return C.width=Math.max(1,l),C.height=Math.max(1,f),C.getContext("2d").drawImage(u,0,0,u.width,u.height,0,0,l,f),C},i.prototype.renderBackgroundImage=function(u){return a(this,void 0,void 0,function(){var l,f,p,C,Q,E;return c(this,function(N){switch(N.label){case 0:l=u.styles.backgroundImage.length-1,f=function(K){var X,j,CA,ue,Fe,Ue,qA,pe,$A,BA,ue,Fe,Ue,qA,pe,wA,RA,DA,_A,te,XA,kA,FA,zA,$A,OA,ue,Ee,_e,qA,pe,bt,Fe,Ue,Rt,je,It,Vt,Pt,ut,Gt,dt;return c(this,function(gn){switch(gn.label){case 0:if(K.type!==0)return[3,5];X=void 0,j=K.url,gn.label=1;case 1:return gn.trys.push([1,3,,4]),[4,p.context.cache.match(j)];case 2:return X=gn.sent(),[3,4];case 3:return gn.sent(),p.context.logger.error("Error loading background-image "+j),[3,4];case 4:return X&&(CA=ts(u,l,[X.width,X.height,X.width/X.height]),ue=CA[0],Fe=CA[1],Ue=CA[2],qA=CA[3],pe=CA[4],$A=p.ctx.createPattern(p.resizeImage(X,qA,pe),"repeat"),p.renderRepeat(ue,$A,Fe,Ue)),[3,6];case 5:Ay(K)?(BA=ts(u,l,[null,null,null]),ue=BA[0],Fe=BA[1],Ue=BA[2],qA=BA[3],pe=BA[4],wA=YC(K.angle,qA,pe),RA=wA[0],DA=wA[1],_A=wA[2],te=wA[3],XA=wA[4],kA=document.createElement("canvas"),kA.width=qA,kA.height=pe,FA=kA.getContext("2d"),zA=FA.createLinearGradient(DA,te,_A,XA),rc(K.stops,RA).forEach(function(Ar){return zA.addColorStop(Ar.stop,ge(Ar.color))}),FA.fillStyle=zA,FA.fillRect(0,0,qA,pe),qA>0&&pe>0&&($A=p.ctx.createPattern(kA,"repeat"),p.renderRepeat(ue,$A,Fe,Ue))):ey(K)&&(OA=ts(u,l,[null,null,null]),ue=OA[0],Ee=OA[1],_e=OA[2],qA=OA[3],pe=OA[4],bt=K.position.length===0?[Ii]:K.position,Fe=Ae(bt[0],qA),Ue=Ae(bt[bt.length-1],pe),Rt=JC(K,Fe,Ue,qA,pe),je=Rt[0],It=Rt[1],je>0&&It>0&&(Vt=p.ctx.createRadialGradient(Ee+Fe,_e+Ue,0,Ee+Fe,_e+Ue,je),rc(K.stops,je*2).forEach(function(Ar){return Vt.addColorStop(Ar.stop,ge(Ar.color))}),p.path(ue),p.ctx.fillStyle=Vt,je!==It?(Pt=u.bounds.left+.5*u.bounds.width,ut=u.bounds.top+.5*u.bounds.height,Gt=It/je,dt=1/Gt,p.ctx.save(),p.ctx.translate(Pt,ut),p.ctx.transform(1,0,0,Gt,0,0),p.ctx.translate(-Pt,-ut),p.ctx.fillRect(Ee,dt*(_e-ut)+ut,qA,pe*dt),p.ctx.restore()):p.ctx.fill())),gn.label=6;case 6:return l--,[2]}})},p=this,C=0,Q=u.styles.backgroundImage.slice(0).reverse(),N.label=1;case 1:return C<Q.length?(E=Q[C],[5,f(E)]):[3,4];case 2:N.sent(),N.label=3;case 3:return C++,[3,1];case 4:return[2]}})})},i.prototype.renderSolidBorder=function(u,l,f){return a(this,void 0,void 0,function(){return c(this,function(p){return this.path(fu(f,l)),this.ctx.fillStyle=ge(u),this.ctx.fill(),[2]})})},i.prototype.renderDoubleBorder=function(u,l,f,p){return a(this,void 0,void 0,function(){var C,Q;return c(this,function(E){switch(E.label){case 0:return l<3?[4,this.renderSolidBorder(u,f,p)]:[3,2];case 1:return E.sent(),[2];case 2:return C=jQ(p,f),this.path(C),this.ctx.fillStyle=ge(u),this.ctx.fill(),Q=qQ(p,f),this.path(Q),this.ctx.fill(),[2]}})})},i.prototype.renderNodeBackgroundAndBorders=function(u){return a(this,void 0,void 0,function(){var l,f,p,C,Q,E,N,K,X=this;return c(this,function(j){switch(j.label){case 0:return this.applyEffects(u.getEffects(2)),l=u.container.styles,f=!Qt(l.backgroundColor)||l.backgroundImage.length,p=[{style:l.borderTopStyle,color:l.borderTopColor,width:l.borderTopWidth},{style:l.borderRightStyle,color:l.borderRightColor,width:l.borderRightWidth},{style:l.borderBottomStyle,color:l.borderBottomColor,width:l.borderBottomWidth},{style:l.borderLeftStyle,color:l.borderLeftColor,width:l.borderLeftWidth}],C=cE(fn(l.backgroundClip,0),u.curves),f||l.boxShadow.length?(this.ctx.save(),this.path(C),this.ctx.clip(),Qt(l.backgroundColor)||(this.ctx.fillStyle=ge(l.backgroundColor),this.ctx.fill()),[4,this.renderBackgroundImage(u.container)]):[3,2];case 1:j.sent(),this.ctx.restore(),l.boxShadow.slice(0).reverse().forEach(function(CA){X.ctx.save();var BA=vo(u.curves),wA=CA.inset?0:sE,RA=JQ(BA,-wA+(CA.inset?1:-1)*CA.spread.number,(CA.inset?1:-1)*CA.spread.number,CA.spread.number*(CA.inset?-2:2),CA.spread.number*(CA.inset?-2:2));CA.inset?(X.path(BA),X.ctx.clip(),X.mask(RA)):(X.mask(BA),X.ctx.clip(),X.path(RA)),X.ctx.shadowOffsetX=CA.offsetX.number+wA,X.ctx.shadowOffsetY=CA.offsetY.number,X.ctx.shadowColor=ge(CA.color),X.ctx.shadowBlur=CA.blur.number,X.ctx.fillStyle=CA.inset?ge(CA.color):"rgba(0,0,0,1)",X.ctx.fill(),X.ctx.restore()}),j.label=2;case 2:Q=0,E=0,N=p,j.label=3;case 3:return E<N.length?(K=N[E],K.style!==0&&!Qt(K.color)&&K.width>0?K.style!==2?[3,5]:[4,this.renderDashedDottedBorder(K.color,K.width,Q,u.curves,2)]:[3,11]):[3,13];case 4:return j.sent(),[3,11];case 5:return K.style!==3?[3,7]:[4,this.renderDashedDottedBorder(K.color,K.width,Q,u.curves,3)];case 6:return j.sent(),[3,11];case 7:return K.style!==4?[3,9]:[4,this.renderDoubleBorder(K.color,K.width,Q,u.curves)];case 8:return j.sent(),[3,11];case 9:return[4,this.renderSolidBorder(K.color,Q,u.curves)];case 10:j.sent(),j.label=11;case 11:Q++,j.label=12;case 12:return E++,[3,3];case 13:return[2]}})})},i.prototype.renderDashedDottedBorder=function(u,l,f,p,C){return a(this,void 0,void 0,function(){var Q,E,N,K,X,j,CA,BA,wA,RA,DA,_A,te,XA,kA,FA,kA,FA;return c(this,function(zA){return this.ctx.save(),Q=AE(p,f),E=fu(p,f),C===2&&(this.path(E),this.ctx.clip()),De(E[0])?(N=E[0].start.x,K=E[0].start.y):(N=E[0].x,K=E[0].y),De(E[1])?(X=E[1].end.x,j=E[1].end.y):(X=E[1].x,j=E[1].y),f===0||f===2?CA=Math.abs(N-X):CA=Math.abs(K-j),this.ctx.beginPath(),C===3?this.formatPath(Q):this.formatPath(E.slice(0,2)),BA=l<3?l*3:l*2,wA=l<3?l*2:l,C===3&&(BA=l,wA=l),RA=!0,CA<=BA*2?RA=!1:CA<=BA*2+wA?(DA=CA/(2*BA+wA),BA*=DA,wA*=DA):(_A=Math.floor((CA+wA)/(BA+wA)),te=(CA-_A*BA)/(_A-1),XA=(CA-(_A+1)*BA)/_A,wA=XA<=0||Math.abs(wA-te)<Math.abs(wA-XA)?te:XA),RA&&(C===3?this.ctx.setLineDash([0,BA+wA]):this.ctx.setLineDash([BA,wA])),C===3?(this.ctx.lineCap="round",this.ctx.lineWidth=l):this.ctx.lineWidth=l*2+1.1,this.ctx.strokeStyle=ge(u),this.ctx.stroke(),this.ctx.setLineDash([]),C===2&&(De(E[0])&&(kA=E[3],FA=E[0],this.ctx.beginPath(),this.formatPath([new QA(kA.end.x,kA.end.y),new QA(FA.start.x,FA.start.y)]),this.ctx.stroke()),De(E[1])&&(kA=E[1],FA=E[2],this.ctx.beginPath(),this.formatPath([new QA(kA.end.x,kA.end.y),new QA(FA.start.x,FA.start.y)]),this.ctx.stroke())),this.ctx.restore(),[2]})})},i.prototype.render=function(u){return a(this,void 0,void 0,function(){var l;return c(this,function(f){switch(f.label){case 0:return this.options.backgroundColor&&(this.ctx.fillStyle=ge(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height)),l=ZQ(u),[4,this.renderStack(l)];case 1:return f.sent(),this.applyEffects([]),[2,this.canvas]}})})},i})(Bu),lE=function(s){return s instanceof Kc||s instanceof Oc?!0:s instanceof zi&&s.type!==Bo&&s.type!==ho},cE=function(s,i){switch(s){case 0:return vo(i);case 2:return zQ(i);default:return Qo(i)}},uE=function(s){switch(s){case 1:return"center";case 2:return"right";default:return"left"}},dE=["-apple-system","system-ui"],fE=function(s){return/iPhone OS 15_(0|1)/.test(window.navigator.userAgent)?s.filter(function(i){return dE.indexOf(i)===-1}):s},gE=(function(s){n(i,s);function i(u,l){var f=s.call(this,u,l)||this;return f.canvas=l.canvas?l.canvas:document.createElement("canvas"),f.ctx=f.canvas.getContext("2d"),f.options=l,f.canvas.width=Math.floor(l.width*l.scale),f.canvas.height=Math.floor(l.height*l.scale),f.canvas.style.width=l.width+"px",f.canvas.style.height=l.height+"px",f.ctx.scale(f.options.scale,f.options.scale),f.ctx.translate(-l.x,-l.y),f.context.logger.debug("EXPERIMENTAL ForeignObject renderer initialized ("+l.width+"x"+l.height+" at "+l.x+","+l.y+") with scale "+l.scale),f}return i.prototype.render=function(u){return a(this,void 0,void 0,function(){var l,f;return c(this,function(p){switch(p.label){case 0:return l=Vi(this.options.width*this.options.scale,this.options.height*this.options.scale,this.options.scale,this.options.scale,u),[4,hE(l)];case 1:return f=p.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=ge(this.options.backgroundColor),this.ctx.fillRect(0,0,this.options.width*this.options.scale,this.options.height*this.options.scale)),this.ctx.drawImage(f,-this.options.x*this.options.scale,-this.options.y*this.options.scale),[2,this.canvas]}})})},i})(Bu),hE=function(s){return new Promise(function(i,u){var l=new Image;l.onload=function(){i(l)},l.onerror=u,l.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(s))})},BE=(function(){function s(i){var u=i.id,l=i.enabled;this.id=u,this.enabled=l,this.start=Date.now()}return s.prototype.debug=function(){for(var i=[],u=0;u<arguments.length;u++)i[u]=arguments[u];this.enabled&&(typeof window<"u"&&window.console&&typeof console.debug=="function"?console.debug.apply(console,d([this.id,this.getTime()+"ms"],i)):this.info.apply(this,i))},s.prototype.getTime=function(){return Date.now()-this.start},s.prototype.info=function(){for(var i=[],u=0;u<arguments.length;u++)i[u]=arguments[u];this.enabled&&typeof window<"u"&&window.console&&typeof console.info=="function"&&console.info.apply(console,d([this.id,this.getTime()+"ms"],i))},s.prototype.warn=function(){for(var i=[],u=0;u<arguments.length;u++)i[u]=arguments[u];this.enabled&&(typeof window<"u"&&window.console&&typeof console.warn=="function"?console.warn.apply(console,d([this.id,this.getTime()+"ms"],i)):this.info.apply(this,i))},s.prototype.error=function(){for(var i=[],u=0;u<arguments.length;u++)i[u]=arguments[u];this.enabled&&(typeof window<"u"&&window.console&&typeof console.error=="function"?console.error.apply(console,d([this.id,this.getTime()+"ms"],i)):this.info.apply(this,i))},s.instances={},s})(),pE=(function(){function s(i,u){var l;this.windowBounds=u,this.instanceName="#"+s.instanceCount++,this.logger=new BE({id:this.instanceName,enabled:i.logging}),this.cache=(l=i.cache)!==null&&l!==void 0?l:new kQ(this,i)}return s.instanceCount=1,s})(),mE=function(s,i){return i===void 0&&(i={}),wE(s,i)};typeof window<"u"&&su.setContext(window);var wE=function(s,i){return a(void 0,void 0,void 0,function(){var u,l,f,p,C,Q,E,N,K,X,j,CA,BA,wA,RA,DA,_A,te,XA,kA,zA,FA,zA,$A,OA,ue,Ee,_e,qA,pe,bt,Fe,Ue,Rt,je,It,Vt,Pt,ut,Gt;return c(this,function(dt){switch(dt.label){case 0:if(!s||typeof s!="object")return[2,Promise.reject("Invalid element provided as first argument")];if(u=s.ownerDocument,!u)throw new Error("Element is not attached to a Document");if(l=u.defaultView,!l)throw new Error("Document is not attached to a Window");return f={allowTaint:($A=i.allowTaint)!==null&&$A!==void 0?$A:!1,imageTimeout:(OA=i.imageTimeout)!==null&&OA!==void 0?OA:15e3,proxy:i.proxy,useCORS:(ue=i.useCORS)!==null&&ue!==void 0?ue:!1},p=o({logging:(Ee=i.logging)!==null&&Ee!==void 0?Ee:!0,cache:i.cache},f),C={windowWidth:(_e=i.windowWidth)!==null&&_e!==void 0?_e:l.innerWidth,windowHeight:(qA=i.windowHeight)!==null&&qA!==void 0?qA:l.innerHeight,scrollX:(pe=i.scrollX)!==null&&pe!==void 0?pe:l.pageXOffset,scrollY:(bt=i.scrollY)!==null&&bt!==void 0?bt:l.pageYOffset},Q=new h(C.scrollX,C.scrollY,C.windowWidth,C.windowHeight),E=new pE(p,Q),N=(Fe=i.foreignObjectRendering)!==null&&Fe!==void 0?Fe:!1,K={allowTaint:(Ue=i.allowTaint)!==null&&Ue!==void 0?Ue:!1,onclone:i.onclone,ignoreElements:i.ignoreElements,inlineImages:N,copyStyles:N},E.logger.debug("Starting document clone with size "+Q.width+"x"+Q.height+" scrolled to "+-Q.left+","+-Q.top),X=new ou(E,s,K),j=X.clonedReferenceElement,j?[4,X.toIFrame(u,Q)]:[2,Promise.reject("Unable to find element in cloned iframe")];case 1:return CA=dt.sent(),BA=Xi(j)||CQ(j)?B(j.ownerDocument):g(E,j),wA=BA.width,RA=BA.height,DA=BA.left,_A=BA.top,te=CE(E,j,i.backgroundColor),XA={canvas:i.canvas,backgroundColor:te,scale:(je=(Rt=i.scale)!==null&&Rt!==void 0?Rt:l.devicePixelRatio)!==null&&je!==void 0?je:1,x:((It=i.x)!==null&&It!==void 0?It:0)+DA,y:((Vt=i.y)!==null&&Vt!==void 0?Vt:0)+_A,width:(Pt=i.width)!==null&&Pt!==void 0?Pt:Math.ceil(wA),height:(ut=i.height)!==null&&ut!==void 0?ut:Math.ceil(RA)},N?(E.logger.debug("Document cloned, using foreign object rendering"),zA=new gE(E,XA),[4,zA.render(j)]):[3,3];case 2:return kA=dt.sent(),[3,5];case 3:return E.logger.debug("Document cloned, element located at "+DA+","+_A+" with size "+wA+"x"+RA+" using computed rendering"),E.logger.debug("Starting DOM parsing"),FA=Pc(E,j),te===FA.styles.backgroundColor&&(FA.styles.backgroundColor=lt.TRANSPARENT),E.logger.debug("Starting renderer for element at "+XA.x+","+XA.y+" with size "+XA.width+"x"+XA.height),zA=new aE(E,XA),[4,zA.render(FA)];case 4:kA=dt.sent(),dt.label=5;case 5:return(!((Gt=i.removeContainer)!==null&&Gt!==void 0)||Gt)&&(ou.destroy(CA)||E.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore")),E.logger.debug("Finished rendering"),[2,kA]}})})},CE=function(s,i,u){var l=i.ownerDocument,f=l.documentElement?Xn(s,getComputedStyle(l.documentElement).backgroundColor):lt.TRANSPARENT,p=l.body?Xn(s,getComputedStyle(l.body).backgroundColor):lt.TRANSPARENT,C=typeof u=="string"?Xn(s,u):u===null?lt.TRANSPARENT:4294967295;return i===l.documentElement?Qt(f)?Qt(p)?C:p:f:C};return mE}))})),e0=os(A0(),1),t0=(0,r.defineComponent)({name:"DBiDesignContainer",__name:"biDesignContainer",props:{layout:{type:Array,default:()=>[]},indexPage:{type:Object,default:()=>({})},activedComponent:{type:Object,default:()=>({})},scale:{type:Number,default:1}},emits:["select","move"],setup(e,{emit:A}){const t=e,n=A,{apiUrl:o,token:a}=(0,Te.useAppInject)(),c=(0,r.computed)(()=>{const B={transform:`scale(${t.scale}, ${t.scale})`,transformOrigin:"left top",position:"relative",width:WA(t.indexPage.config.w||1920),height:WA(t.indexPage.config.h||1080),backgroundColor:t.indexPage.config.backgroundColor||"var(--j-color-bg-container)"};return t.indexPage.config.backgroundImage&&(B.background=`url(${o}/system/annexesfile/${t.indexPage.config.backgroundImage}?token=${a?.value}) 0% 0% / 100% 100% ${t.indexPage.config.backgroundColor||"var(--j-color-bg-container)"}`),B}),d=B=>{n("select",B)},h=B=>{n("move",B)},g=B=>{B?.target?.getAttribute("id")==="j-bi-design-container"&&n("select",t.indexPage)};return(B,w)=>{const m=(0,r.resolveComponent)("d-draggable");return(0,r.openBlock)(),(0,r.createElementBlock)("div",{onClick:(0,r.withModifiers)(g,["stop"]),id:"j-bi-design-container",style:(0,r.normalizeStyle)(c.value)},[((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(e.layout,(y,v)=>((0,r.openBlock)(),(0,r.createElementBlock)(r.Fragment,{key:y.id},[y.display?((0,r.openBlock)(),(0,r.createBlock)(m,{key:0,id:y.id,left:y.config.x,top:y.config.y,width:y.config.w,height:y.config.h,scale:1/e.scale,step:1/e.scale,"active-flag":y.id==e.activedComponent.id,readonly:y.lock,"data-id":y.id,onFocus:I=>d(y),onBlur:h,"z-index":e.layout.length-v,"is-active-bg-transparent":!0},{default:(0,r.withCtx)(()=>[((0,r.openBlock)(),(0,r.createBlock)((0,r.resolveDynamicComponent)(y.componentName),(0,r.mergeProps)({style:{width:(0,r.unref)(WA)(y.config.w),height:(0,r.unref)(WA)(y.config.h)}},{ref_for:!0},y.config,{"is-design":!0}),null,16,["style"]))]),_:2},1032,["id","left","top","width","height","scale","step","active-flag","readonly","data-id","onFocus","z-index"])):(0,r.createCommentVNode)("",!0)],64))),128))],4)}}}),Fl=t0,n0=(0,r.defineComponent)({name:"DBiViewer",__name:"biViewer",props:{layout:{type:Array,default:()=>[]},indexPage:{type:Object,default:()=>({})}},setup(e){const A=e,{apiUrl:t,token:n,httpGet:o,httpPost:a}=(0,Te.useAppInject)(),c=(0,r.computed)(()=>A.layout),d=(0,r.ref)(),h=(0,r.ref)(1),g=(0,r.ref)(1),B=()=>{d.value&&w(d.value.offsetWidth,d.value.offsetHeight)},w=(F,M)=>{const tA=A.indexPage.config?.w||1920,W=A.indexPage.config?.h||1080,aA=A.indexPage.config?.screenFit||"1";aA==="1"?(g.value=F/tA,h.value=g.value):aA==="2"?(h.value=M/W,g.value=h.value):aA==="3"&&(g.value=F/tA,h.value=M/W)},m=(0,r.computed)(()=>{const F={transform:`scale(${g.value}, ${h.value})`,transformOrigin:"left top",position:"relative",overflow:"hidden",width:WA(A.indexPage.config?.w||1920),height:WA(A.indexPage.config?.h||1080),backgroundColor:A.indexPage.config?.backgroundColor||"var(--j-color-bg-container)"};return A.indexPage.config?.backgroundImage&&(F.background=`url(${t}/system/annexesfile/${A.indexPage.config?.backgroundImage}?token=${n?.value}) 0% 0% / 100% 100% ${A.indexPage.config?.backgroundColor||"var(--j-color-bg-container)"}`),F}),y=(0,r.computed)(()=>({width:WA((A.indexPage.config?.w||1920)*g.value),height:WA((A.indexPage.config?.h||1080)*h.value)})),v={},I=(F,M)=>{F&&(v[M]=F)},L=new ResizeObserver(B);(0,r.onMounted)(()=>{L.observe(d.value)});const k=(F,M)=>{V(M,{params:F})},V=async(F,M)=>{if(F&&F.trim()){F=`async (jcode) => {${F}}`;const{res:tA,msg:W,fn:aA}=(0,Te.getFunction)(F)}};return(0,r.provide)("jcode_bi_viewer",{executeEvent:V}),(F,M)=>((0,r.openBlock)(),(0,r.createElementBlock)("div",{class:"j-block",style:(0,r.normalizeStyle)({"overflow-y":!e.indexPage.config?.screenFit||e.indexPage.config?.screenFit=="1"?"auto":"hidden","overflow-x":e.indexPage.config?.screenFit=="2"?"auto":"hidden"}),ref_key:"biViewer",ref:d},[(0,r.createElementVNode)("div",{style:(0,r.normalizeStyle)(y.value)},[(0,r.createElementVNode)("div",{style:(0,r.normalizeStyle)(m.value)},[((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(c.value,(tA,W)=>(0,r.withDirectives)(((0,r.openBlock)(),(0,r.createBlock)((0,r.resolveDynamicComponent)(tA.componentName),(0,r.mergeProps)({key:tA.id,ref_for:!0,ref:aA=>I(aA,tA.id),style:{position:"absolute",width:(0,r.unref)(WA)(tA.config.w),height:(0,r.unref)(WA)(tA.config.h),top:(0,r.unref)(WA)(tA.config.y),left:(0,r.unref)(WA)(tA.config.x),zIndex:e.layout.length-W}},{ref_for:!0},tA.config,{onClick:aA=>k(aA,tA.config.clickevent)}),null,16,["style","onClick"])),[[r.vShow,tA.display!==!1]])),128))],4)],4)],4))}}),Ul=n0,r0={class:"j-bi-design"},o0={class:"j-bi-design-left"},i0={style:{padding:"0 4px"}},s0=["onClick"],a0={class:"j-bi-design-left2"},l0={key:0,class:"j-block",style:{"padding-top":"28px"}},c0={class:"search-input-wraper"},u0=["onClick","data-id"],d0={class:"j-bi-design-layer-item-img"},f0=["src"],g0={class:"j-bi-design-layer-item-btns"},h0=["onClick"],B0=["onClick"],p0=["onClick"],m0=["onDragend"],w0={class:"component-item2-text"},C0=["src"],y0={class:"j-bi-design-right"},v0={class:"j-bi-design-title"},Q0={class:"j-bi-design-panel"},E0=(0,r.defineComponent)({name:"DBiDesign",__name:"biDesign",props:{components:{type:Array,default:()=>[]},componentConfigs:{type:Object,default:()=>({})},componentInit:Function,componentConfigInit:Function,componentConfigChange:Function,imgUrlPrefix:{type:String,default:"/"},scale:{type:Number,default:-1}},emits:["update:scale"],setup(e,{expose:A,emit:t}){const{t:n}=(0,Te.useAppInject)(),o=e,a=t,c=(0,r.ref)({name:"页面",id:"indexPage",type:"indexPage",layerId:"0",config:{},display:!0,lock:!1,componentName:""});o.componentInit&&(c.value.config=o.componentInit("indexPage")||{},c.value.config.id="indexPage");const d=(0,r.computed)(()=>{const sA={};return o.components.forEach(pA=>{pA.children.forEach(NA=>{sA[NA.type]=NA})}),sA}),h=(0,r.ref)(0),g=(0,r.ref)(),B=(0,r.ref)([]),w=(0,r.ref)(!1),m=(0,r.ref)(0),y=(0,r.ref)(0),v=(0,r.ref)(""),I=(0,r.computed)(()=>v.value===""?{}:B.value.find(sA=>sA.id===v.value)),L=()=>{w.value=!1,v.value=""},k=sA=>{sA.target.className.indexOf("j-bi-design-contentmenu__btn")===-1&&L(),window.removeEventListener("mousedown",k)},V=sA=>{let{target:pA}=sA,NA=!1;pA.className.indexOf&&pA.className.indexOf("d-draggable__mask")>-1?(pA=pA.parentNode.parentNode,NA=!0):pA.className.indexOf&&pA.className.indexOf("j-bi-design-layer-item")>-1?NA=!0:pA.parentNode.className.indexOf&&pA.parentNode.className.indexOf("j-bi-design-layer-item")>-1?(pA=pA.parentNode,NA=!0):pA.parentNode.parentNode.className.indexOf("j-bi-design-layer-item")>-1&&(pA=pA.parentNode.parentNode,NA=!0),NA&&(sA.preventDefault(),sA.stopPropagation(),m.value=sA.clientX,y.value=sA.clientY-8,y.value+260>document.body.clientHeight&&(y.value=document.body.clientHeight-260),v.value=pA.getAttribute("data-id"),w.value=!0,window.addEventListener("mousedown",k))},F=(0,r.ref)(""),M=(0,r.computed)(()=>F.value?B.value.filter(sA=>sA.config.label.indexOf(F.value)>-1):B.value),tA=sA=>{sA.display=!sA.display,L()},W=sA=>{sA.lock=!sA.lock,L(),sA.lock&&sA.id===g.value?.id&&iA(c.value)},aA=(sA,pA)=>{if(!pA||B.value.length<1){L();return}const NA=B.value.findIndex(MA=>MA.id===pA.id);switch(sA){case"up":if(NA===-1||NA===0)break;B.value=dA(B.value,NA,NA-1);break;case"down":if(NA===-1||NA===B.value.length-1)break;B.value=dA(B.value,NA,NA+1);break;case"top":if(NA!==-1){const[MA]=B.value.splice(NA,1);B.value.unshift(MA)}break;case"bottom":if(NA!==-1){const[MA]=B.value.splice(NA,1);B.value.push(MA)}break}L()},dA=(sA,pA,NA)=>{const MA=sA[pA];return sA[pA]=sA[NA],sA[NA]=MA,sA},rA=(0,r.ref)(),oA=(0,r.ref)(20),AA=(0,r.ref)(document.body.clientWidth),O=(0,r.ref)(document.body.clientHeight),lA=(0,r.ref)(0),_=(0,r.ref)(0),Z=(0,r.ref)({bgColor:"rgba(225,225,225, 0)",longfgColor:"rgba(0, 0, 0, 0.45)",shortfgColor:"rgba(0, 0, 0, 0.45)",fontColor:"rgba(0, 0, 0, 0.65)",shadowColor:"rgba(225,225,225, 0)",lineColor:"var(--j-color-primary)",borderColor:"#d9d9d9",cornerActiveColor:"var(--j-color-primary)"}),U=(0,r.computed)(()=>({x:0,y:0,width:AA.value,height:O.value})),x=(0,r.ref)({h:[],v:[]}),G=(0,r.ref)(),R=(0,r.ref)(),$=(0,r.ref)(!1),J=(0,r.ref)({}),nA=(0,r.ref)(100),hA=(0,r.computed)({set(sA){nA.value=sA,a("update:scale",sA)},get(){let{scale:sA}=o;return sA===-1&&(sA=nA.value),sA/100}}),UA=(0,r.computed)(()=>(c.value.config.h||1080)*2),eA=(0,r.computed)(()=>(c.value.config.w||1920)*2),uA=()=>{rA.value&&(AA.value=rA.value.offsetWidth-oA.value,O.value=rA.value.offsetHeight-oA.value,G.value.scrollLeft=eA.value/2-oA.value,G.value.scrollTop=UA.value/2-oA.value,Y())},Y=()=>{const sA=c.value.config.w||1920;AA.value<sA&&(hA.value=AA.value*100/sA)},cA=()=>{document.onkeydown=sA=>{if(sA.target?.nodeName==="TEXTAREA"||sA.target?.nodeName==="INPUT")return;const pA=sA.keyCode||sA.which;pA===32&&(sA.preventDefault(),J.value.space=!0),pA===17&&(sA.preventDefault(),J.value.ctrl=!0)},document.onkeyup=()=>{J.value={}}},mA=sA=>{J.value.space&&($.value=!0,window.stardragEvent=sA,window.startSlideX=G.value.scrollLeft,window.startSlideY=G.value.scrollTop,document.onmousemove=pA=>{if($.value){const NA=pA.clientX-window.stardragEvent.clientX,MA=pA.clientY-window.stardragEvent.clientY;G.value.scrollLeft=window.startSlideX-NA,G.value.scrollTop=window.startSlideY-MA}},document.onmouseup=()=>{document.onmousemove=null,document.onmouseup=null,$.value=!1})},yA=()=>{const sA=G.value.getBoundingClientRect(),pA=R.value.getBoundingClientRect(),NA=hA.value,MA=(sA.left+oA.value-pA.left)/NA,it=(sA.top+oA.value-pA.top)/NA;lA.value=MA>>0,_.value=it>>0},IA=sA=>{if(sA.preventDefault(),sA.ctrlKey||sA.metaKey){const pA=hA.value;hA.value=parseFloat(Math.max(.2,pA-sA.deltaY/500).toFixed(2))*100,pA!==hA.value&&(0,r.nextTick)(()=>{yA()})}},fA=(0,r.ref)(),vA=(0,r.computed)(()=>g.value?`【${g.value.name}】`:""),S={};Object.keys(o.componentConfigs).forEach(sA=>{const pA=[{id:"id",type:"j-input",config:{label:"ID",readonly:!0}},{id:"label",type:"j-input",config:{label:"名称"}}],NA=[{id:"w",type:"j-number",config:{label:"宽度",min:0}},{id:"h",type:"j-number",config:{label:"高度",min:0}},{id:"x",type:"j-number",config:{label:"x轴",min:0}},{id:"y",type:"j-number",config:{label:"y轴",min:0}}],MA={type:"j-collapse",config:{defaultValue:[]},children:[]};sA!=="indexPage"&&MA.children?.push({config:{label:"基础信息"},children:[...pA]}),MA.children?.push(...o.componentConfigs[sA]),sA!=="indexPage"?(MA.children?.push({config:{label:"大小定位"},children:[...NA]}),MA.config?.defaultValue.push("_collapse0","_collapse1")):MA.children&&MA.children.length>0&&MA.config?.defaultValue.push("_collapse0"),S[sA]=[MA]});const H=()=>{if(g.value){const sA=S[g.value.type];sA?fA.value.init(sA,g.value.config):fA.value.init([]),o.componentConfigInit&&o.componentConfigInit(g.value.type,{configRef:fA,components:B.value,configData:g.value.config})}else fA.value.init([])},T=(sA,pA)=>{g.value&&o.componentConfigChange&&(g.value.id==="indexPage"&&(sA.id==="w"||sA.id==="h")&&(0,r.nextTick)(()=>{uA()}),o.componentConfigChange(g.value.type,{configRef:fA,component:sA,configData:g.value.config,...pA}))},D=sA=>o.componentInit?o.componentInit(sA)||{}:{},b=(sA,pA,NA)=>{const MA={name:sA.name,id:gt(),type:sA.type,layerId:"0",config:D(sA.type),display:!0,lock:!1,componentName:sA.componentName};MA.config.id=MA.id,MA.config.label=sA.name,MA.config.h=sA.h||100,MA.config.w=sA.w||100,MA.config.x=pA,MA.config.y=NA,B.value.unshift(MA),g.value=MA,H()},z=(sA,pA)=>{const NA=document.getElementById("j-bi-design-container").getBoundingClientRect(),MA=sA.clientX-NA.left,it=sA.clientY-NA.top;b(pA,MA/hA.value-pA.w/2,it/hA.value-pA.h/2)},P=sA=>{B.value=B.value.filter(pA=>pA.id!==sA),g.value.id===sA&&(g.value=c.value,H()),L()},gA=sA=>{const pA=pn(sA),NA=gt();pA.id=NA,pA.config.id=NA,B.value.push(pA),g.value=pA,H(),L()},iA=sA=>{g.value?.id!==sA.id&&(g.value=sA,H())},SA=({left:sA,top:pA,width:NA,height:MA})=>{g.value&&(g.value.config.x=sA,g.value.config.y=pA,g.value.config.w=NA,g.value.config.h=MA,fA.value.setFormData({main:{x:sA,y:pA,w:NA,h:MA}}))},xA=new ResizeObserver(uA);(0,r.onMounted)(()=>{xA.observe(rA.value),cA(),iA(c.value)});const KA=()=>({ver:"1.0.0",components:pn(B.value),page:c.value}),ne=sA=>{sA.components?.forEach(pA=>{pA.componentName=d.value[pA.type].componentName}),B.value=sA.components||[],c.value=sA.page||c.value,iA(c.value)},YA=()=>{B.value=[],iA(c.value)},PA=()=>new Promise(sA=>{(0,e0.default)(R.value,{useCORS:!0,backgroundColor:null,allowTaint:!0}).then(pA=>{if(pA.width!==0&&pA.height!==0){sA(pA.toDataURL("image/png"));return}sA("")})}),Re=(0,r.ref)(),ve=(0,r.ref)({});return A({clearData:YA,setData:ne,getData:KA,getImg:PA,preview:()=>{ve.value=KA(),Re.value.open("大屏预览","full")}}),(sA,pA)=>{const NA=(0,r.resolveComponent)("el-divider"),MA=(0,r.resolveComponent)("j-icon"),it=(0,r.resolveComponent)("el-button"),Mn=(0,r.resolveComponent)("el-input"),Tt=(0,r.resolveComponent)("el-text"),kt=(0,r.resolveComponent)("el-space"),On=(0,r.resolveComponent)("j-form"),tn=(0,r.resolveComponent)("j-layer");return(0,r.openBlock)(),(0,r.createElementBlock)("div",r0,[w.value?((0,r.openBlock)(),(0,r.createElementBlock)("div",{key:0,class:"j-bi-design-contentmenu",style:(0,r.normalizeStyle)({left:m.value+"px",top:y.value+"px"})},[(0,r.createElementVNode)("div",{class:"item j-bi-design-contentmenu__btn",onClick:pA[0]||(pA[0]=GA=>gA(I.value))},(0,r.toDisplayString)((0,r.unref)(n)("复制")),1),(0,r.createElementVNode)("div",{class:"item j-bi-design-contentmenu__btn",onClick:pA[1]||(pA[1]=GA=>tA(I.value))},(0,r.toDisplayString)(I.value&&I.value.display?"隐藏":"显示"),1),(0,r.createElementVNode)("div",{class:"item j-bi-design-contentmenu__btn",onClick:pA[2]||(pA[2]=GA=>W(I.value))},(0,r.toDisplayString)(I.value&&I.value.lock?"解锁":"锁定"),1),(0,r.createElementVNode)("div",{class:"item j-bi-design-contentmenu__btn",onClick:pA[3]||(pA[3]=GA=>aA("top",I.value))},(0,r.toDisplayString)((0,r.unref)(n)("置顶图层")),1),(0,r.createElementVNode)("div",{class:"item j-bi-design-contentmenu__btn",onClick:pA[4]||(pA[4]=GA=>aA("bottom",I.value))},(0,r.toDisplayString)((0,r.unref)(n)("置底图层")),1),(0,r.createElementVNode)("div",{class:"item j-bi-design-contentmenu__btn",onClick:pA[5]||(pA[5]=GA=>aA("up",I.value))},(0,r.toDisplayString)((0,r.unref)(n)("上移一层")),1),(0,r.createElementVNode)("div",{class:"item j-bi-design-contentmenu__btn",onClick:pA[6]||(pA[6]=GA=>aA("down",I.value))},(0,r.toDisplayString)((0,r.unref)(n)("下移一层")),1),(0,r.createVNode)(NA,{style:{margin:"4px 0"}}),(0,r.createElementVNode)("div",{class:"item j-bi-design-contentmenu__btn",style:{color:"var(--j-color-danger)"},onClick:pA[7]||(pA[7]=GA=>P(I.value?.id))},(0,r.toDisplayString)((0,r.unref)(n)("删除")),1)],4)):(0,r.createCommentVNode)("",!0),(0,r.createElementVNode)("div",o0,[(0,r.createElementVNode)("div",{onClick:pA[8]||(pA[8]=(0,r.withModifiers)(GA=>h.value=-1,["stop"])),class:(0,r.normalizeClass)(["component-item",{active:h.value==-1}])},[(0,r.createVNode)(MA,{size:24,icon:"mdi:bookmark-box-multiple-outline"}),(0,r.createElementVNode)("span",null,(0,r.toDisplayString)((0,r.unref)(n)("图层")),1)],2),(0,r.createElementVNode)("div",i0,[(0,r.createVNode)(NA)]),((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(e.components,(GA,Ve)=>((0,r.openBlock)(),(0,r.createElementBlock)("div",{key:Ve,onClick:(0,r.withModifiers)(st=>h.value=Ve,["stop"]),class:(0,r.normalizeClass)(["component-item",{active:h.value==Ve}])},[(0,r.createVNode)(MA,{size:24,icon:GA.icon},null,8,["icon"]),(0,r.createElementVNode)("span",null,(0,r.toDisplayString)((0,r.unref)(n)(GA.name)),1)],10,s0))),128))]),(0,r.createElementVNode)("div",a0,[h.value==-1?((0,r.openBlock)(),(0,r.createElementBlock)("div",l0,[(0,r.createElementVNode)("div",c0,[(0,r.createVNode)(Mn,{modelValue:F.value,"onUpdate:modelValue":pA[9]||(pA[9]=GA=>F.value=GA),class:"search-input",placeholder:"搜索图层"},{append:(0,r.withCtx)(()=>[(0,r.createVNode)(it,null,{icon:(0,r.withCtx)(()=>[(0,r.createVNode)(MA,{icon:"ep:search"})]),_:1})]),_:1},8,["modelValue"])]),(0,r.createElementVNode)("div",{class:"j-block",style:{"padding-top":"8px",overflow:"auto"},onContextmenu:(0,r.withModifiers)(V,["prevent"])},[((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(M.value,(GA,Ve)=>((0,r.openBlock)(),(0,r.createElementBlock)("div",{key:Ve},[(0,r.createElementVNode)("div",{class:(0,r.normalizeClass)(["j-bi-design-layer-item",{active:g.value.id==GA.id}]),onClick:(0,r.withModifiers)(st=>iA(GA),["stop"]),"data-id":GA.id},[(0,r.createElementVNode)("div",d0,[(0,r.createElementVNode)("img",{style:{height:"100%"},src:`${e.imgUrlPrefix}${d.value[GA.type].img}`},null,8,f0)]),(0,r.createVNode)(Tt,{truncated:""},{default:(0,r.withCtx)(()=>[(0,r.createTextVNode)((0,r.toDisplayString)((0,r.unref)(n)(GA.config.label)),1)]),_:2},1024),(0,r.createElementVNode)("div",g0,[(0,r.createVNode)(kt,{size:2},{default:(0,r.withCtx)(()=>[(0,r.createElementVNode)("div",{class:(0,r.normalizeClass)(["j-bi-design-layer-item-btn",{active:!GA.display}]),onClick:(0,r.withModifiers)(st=>tA(GA),["stop"])},[(0,r.createVNode)(MA,{icon:"mdi:eye-off-outline"})],10,h0),(0,r.createElementVNode)("div",{class:(0,r.normalizeClass)(["j-bi-design-layer-item-btn",{active:GA.lock}]),onClick:(0,r.withModifiers)(st=>W(GA),["stop"])},[(0,r.createVNode)(MA,{icon:"mdi:lock-outline"})],10,B0)]),_:2},1024)])],10,u0)]))),128))],32)])):e.components[h.value]?((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,{key:1},(0,r.renderList)(e.components[h.value].children,(GA,Ve)=>((0,r.openBlock)(),(0,r.createElementBlock)("div",{key:Ve,onClick:st=>b(GA,0,0)},[(0,r.createElementVNode)("div",{class:"component-item2",onDragend:st=>z(st,GA),draggable:"true"},[(0,r.createElementVNode)("div",w0,[(0,r.createVNode)(Tt,{truncated:""},{default:(0,r.withCtx)(()=>[(0,r.createTextVNode)((0,r.toDisplayString)((0,r.unref)(n)(GA.name)),1)]),_:2},1024)]),(0,r.createElementVNode)("img",{class:"component-item2-img",src:`${e.imgUrlPrefix}${GA.img}`},null,8,C0)],40,m0)],8,p0))),128)):(0,r.createCommentVNode)("",!0)]),(0,r.createElementVNode)("div",{class:"j-bi-design-mid",ref_key:"contentRef",ref:rA},[((0,r.openBlock)(),(0,r.createBlock)((0,r.unref)(qw),{key:hA.value,thick:oA.value,scale:hA.value,width:AA.value,height:O.value,"start-x":lA.value,"start-y":_.value,palette:Z.value,shadow:U.value,"hor-line-arr":x.value.h,"ver-line-arr":x.value.v},null,8,["thick","scale","width","height","start-x","start-y","palette","shadow","hor-line-arr","ver-line-arr"])),(0,r.createElementVNode)("div",{ref_key:"screensRef",ref:G,class:"j-bi-design-main",style:(0,r.normalizeStyle)({cursor:$.value?"pointer":""}),onMousedown:(0,r.withModifiers)(mA,["stop"]),onWheel:IA,onScroll:yA},[(0,r.createElementVNode)("div",{class:"screen-container",style:(0,r.normalizeStyle)({height:UA.value+"px",width:eA.value+"px"}),onClick:pA[10]||(pA[10]=(0,r.withModifiers)(GA=>iA(c.value),["stop"]))},[(0,r.createElementVNode)("div",{ref_key:"canvasRef",ref:R,class:"canvas",onContextmenu:(0,r.withModifiers)(V,["prevent"])},[(0,r.createVNode)(Fl,{layout:B.value,"index-page":c.value,"actived-component":g.value,scale:hA.value,onSelect:iA,onMove:SA},null,8,["layout","index-page","actived-component","scale"])],544)],4)],36)],512),(0,r.createElementVNode)("div",y0,[(0,r.createElementVNode)("div",v0,[(0,r.createVNode)(Tt,{truncated:"",style:{margin:"0","font-size":"14px"}},{default:(0,r.withCtx)(()=>[(0,r.createTextVNode)((0,r.toDisplayString)(`${(0,r.unref)(n)("属性配置")}${vA.value} `),1)]),_:1})]),(0,r.createElementVNode)("div",Q0,[(0,r.createVNode)(On,{config:{labelPosition:"top",size:"small"},style:{padding:"0"},ref_key:"configRef",ref:fA,onChange:T},null,512)])]),(0,r.createVNode)(tn,{ref_key:"previewFormLayerRef",ref:Re,destroyOnClose:!0,hasHeader:!1},{default:(0,r.withCtx)(()=>[(0,r.createVNode)(Ul,{indexPage:ve.value.page,layout:ve.value.components},null,8,["indexPage","layout"])]),_:1},512)])}}}),F0=E0,bl=ft(F0,[Fl,Ul]),U0=[ls,So,xo,Do,No,rl,ol,dl,fl,wl,Ql,bl],Il=new WeakSet,b0=e=>{Il.has(e)||(Il.add(e),U0.forEach(A=>{const t=A.name;t&&e.component(t,A)}))},I0={install:b0};oe.DBiDesign=bl,oe.DDrag=ls,oe.DDraggable=fl,oe.DFlowDesign=rl,oe.DFormDesign=wl,oe.DIndexDesign=Ql,oe.DInputFlow=ol,oe.DLayout=dl,oe.default=I0,oe.dragContainer=xo,oe.dragFormList=Do,oe.dragIndexList=No,oe.dragTool=So,oe.toFormDesignSchema=hl,oe.toFormSaveSchema=Vr,oe.toFormSchema=gl});
35
+ .`+ji+NQ+iu)},TQ=function(s,i){var u=s.ownerDocument;if(u){var l=u.createElement("style");l.textContent=i,s.appendChild(l)}},su=(function(){function s(){}return s.getOrigin=function(i){var u=s._link;return u?(u.href=i,u.href=u.href,u.protocol+u.hostname+u.port):"about:blank"},s.isSameOrigin=function(i){return s.getOrigin(i)===s._origin},s.setContext=function(i){s._link=i.document.createElement("a"),s._origin=s.getOrigin(i.location.href)},s._origin="about:blank",s})(),kQ=(function(){function s(i,u){this.context=i,this._options=u,this._cache={}}return s.prototype.addImage=function(i){var u=Promise.resolve();return this.has(i)||(As(i)||RQ(i))&&(this._cache[i]=this.loadImage(i)).catch(function(){}),u},s.prototype.match=function(i){return this._cache[i]},s.prototype.loadImage=function(i){return a(this,void 0,void 0,function(){var u,l,f,p,C=this;return c(this,function(Q){switch(Q.label){case 0:return u=su.isSameOrigin(i),l=!qi(i)&&this._options.useCORS===!0&&Be.SUPPORT_CORS_IMAGES&&!u,f=!qi(i)&&!u&&!As(i)&&typeof this._options.proxy=="string"&&Be.SUPPORT_CORS_XHR&&!l,!u&&this._options.allowTaint===!1&&!qi(i)&&!As(i)&&!f&&!l?[2]:(p=i,f?[4,this.proxy(p)]:[3,2]);case 1:p=Q.sent(),Q.label=2;case 2:return this.context.logger.debug("Added image "+i.substring(0,256)),[4,new Promise(function(E,N){var K=new Image;K.onload=function(){return E(K)},K.onerror=N,(VQ(p)||l)&&(K.crossOrigin="anonymous"),K.src=p,K.complete===!0&&setTimeout(function(){return E(K)},500),C._options.imageTimeout>0&&setTimeout(function(){return N("Timed out ("+C._options.imageTimeout+"ms) loading image")},C._options.imageTimeout)})];case 3:return[2,Q.sent()]}})})},s.prototype.has=function(i){return typeof this._cache[i]<"u"},s.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},s.prototype.proxy=function(i){var u=this,l=this._options.proxy;if(!l)throw new Error("No proxy defined");var f=i.substring(0,256);return new Promise(function(p,C){var Q=Be.SUPPORT_RESPONSE_TYPE?"blob":"text",E=new XMLHttpRequest;E.onload=function(){if(E.status===200)if(Q==="text")p(E.response);else{var X=new FileReader;X.addEventListener("load",function(){return p(X.result)},!1),X.addEventListener("error",function(j){return C(j)},!1),X.readAsDataURL(E.response)}else C("Failed to proxy resource "+f+" with status code "+E.status)},E.onerror=C;var N=l.indexOf("?")>-1?"&":"?";if(E.open("GET",""+l+N+"url="+encodeURIComponent(i)+"&responseType="+Q),Q!=="text"&&E instanceof XMLHttpRequest&&(E.responseType=Q),u._options.imageTimeout){var K=u._options.imageTimeout;E.timeout=K,E.ontimeout=function(){return C("Timed out ("+K+"ms) proxying "+f)}}E.send()})},s})(),MQ=/^data:image\/svg\+xml/i,OQ=/^data:image\/.*;base64,/i,KQ=/^data:image\/.*/i,RQ=function(s){return Be.SUPPORT_SVG_DRAWING||!PQ(s)},qi=function(s){return KQ.test(s)},VQ=function(s){return OQ.test(s)},As=function(s){return s.substr(0,4)==="blob"},PQ=function(s){return s.substr(-3).toLowerCase()==="svg"||MQ.test(s)},QA=(function(){function s(i,u){this.type=0,this.x=i,this.y=u}return s.prototype.add=function(i,u){return new s(this.x+i,this.y+u)},s})(),un=function(s,i,u){return new QA(s.x+(i.x-s.x)*u,s.y+(i.y-s.y)*u)},yo=(function(){function s(i,u,l,f){this.type=1,this.start=i,this.startControl=u,this.endControl=l,this.end=f}return s.prototype.subdivide=function(i,u){var l=un(this.start,this.startControl,i),f=un(this.startControl,this.endControl,i),p=un(this.endControl,this.end,i),C=un(l,f,i),Q=un(f,p,i),E=un(C,Q,i);return u?new s(this.start,l,C,E):new s(E,Q,p,this.end)},s.prototype.add=function(i,u){return new s(this.start.add(i,u),this.startControl.add(i,u),this.endControl.add(i,u),this.end.add(i,u))},s.prototype.reverse=function(){return new s(this.end,this.endControl,this.startControl,this.start)},s})(),De=function(s){return s.type===1},GQ=(function(){function s(i){var u=i.styles,l=i.bounds,f=$n(u.borderTopLeftRadius,l.width,l.height),p=f[0],C=f[1],Q=$n(u.borderTopRightRadius,l.width,l.height),E=Q[0],N=Q[1],K=$n(u.borderBottomRightRadius,l.width,l.height),X=K[0],j=K[1],CA=$n(u.borderBottomLeftRadius,l.width,l.height),BA=CA[0],wA=CA[1],RA=[];RA.push((p+E)/l.width),RA.push((BA+X)/l.width),RA.push((C+wA)/l.height),RA.push((N+j)/l.height);var DA=Math.max.apply(Math,RA);DA>1&&(p/=DA,C/=DA,E/=DA,N/=DA,X/=DA,j/=DA,BA/=DA,wA/=DA);var _A=l.width-E,te=l.height-j,XA=l.width-X,kA=l.height-wA,FA=u.borderTopWidth,zA=u.borderRightWidth,$A=u.borderBottomWidth,OA=u.borderLeftWidth,ue=Ae(u.paddingTop,i.bounds.width),Ee=Ae(u.paddingRight,i.bounds.width),_e=Ae(u.paddingBottom,i.bounds.width),qA=Ae(u.paddingLeft,i.bounds.width);this.topLeftBorderDoubleOuterBox=p>0||C>0?re(l.left+OA/3,l.top+FA/3,p-OA/3,C-FA/3,JA.TOP_LEFT):new QA(l.left+OA/3,l.top+FA/3),this.topRightBorderDoubleOuterBox=p>0||C>0?re(l.left+_A,l.top+FA/3,E-zA/3,N-FA/3,JA.TOP_RIGHT):new QA(l.left+l.width-zA/3,l.top+FA/3),this.bottomRightBorderDoubleOuterBox=X>0||j>0?re(l.left+XA,l.top+te,X-zA/3,j-$A/3,JA.BOTTOM_RIGHT):new QA(l.left+l.width-zA/3,l.top+l.height-$A/3),this.bottomLeftBorderDoubleOuterBox=BA>0||wA>0?re(l.left+OA/3,l.top+kA,BA-OA/3,wA-$A/3,JA.BOTTOM_LEFT):new QA(l.left+OA/3,l.top+l.height-$A/3),this.topLeftBorderDoubleInnerBox=p>0||C>0?re(l.left+OA*2/3,l.top+FA*2/3,p-OA*2/3,C-FA*2/3,JA.TOP_LEFT):new QA(l.left+OA*2/3,l.top+FA*2/3),this.topRightBorderDoubleInnerBox=p>0||C>0?re(l.left+_A,l.top+FA*2/3,E-zA*2/3,N-FA*2/3,JA.TOP_RIGHT):new QA(l.left+l.width-zA*2/3,l.top+FA*2/3),this.bottomRightBorderDoubleInnerBox=X>0||j>0?re(l.left+XA,l.top+te,X-zA*2/3,j-$A*2/3,JA.BOTTOM_RIGHT):new QA(l.left+l.width-zA*2/3,l.top+l.height-$A*2/3),this.bottomLeftBorderDoubleInnerBox=BA>0||wA>0?re(l.left+OA*2/3,l.top+kA,BA-OA*2/3,wA-$A*2/3,JA.BOTTOM_LEFT):new QA(l.left+OA*2/3,l.top+l.height-$A*2/3),this.topLeftBorderStroke=p>0||C>0?re(l.left+OA/2,l.top+FA/2,p-OA/2,C-FA/2,JA.TOP_LEFT):new QA(l.left+OA/2,l.top+FA/2),this.topRightBorderStroke=p>0||C>0?re(l.left+_A,l.top+FA/2,E-zA/2,N-FA/2,JA.TOP_RIGHT):new QA(l.left+l.width-zA/2,l.top+FA/2),this.bottomRightBorderStroke=X>0||j>0?re(l.left+XA,l.top+te,X-zA/2,j-$A/2,JA.BOTTOM_RIGHT):new QA(l.left+l.width-zA/2,l.top+l.height-$A/2),this.bottomLeftBorderStroke=BA>0||wA>0?re(l.left+OA/2,l.top+kA,BA-OA/2,wA-$A/2,JA.BOTTOM_LEFT):new QA(l.left+OA/2,l.top+l.height-$A/2),this.topLeftBorderBox=p>0||C>0?re(l.left,l.top,p,C,JA.TOP_LEFT):new QA(l.left,l.top),this.topRightBorderBox=E>0||N>0?re(l.left+_A,l.top,E,N,JA.TOP_RIGHT):new QA(l.left+l.width,l.top),this.bottomRightBorderBox=X>0||j>0?re(l.left+XA,l.top+te,X,j,JA.BOTTOM_RIGHT):new QA(l.left+l.width,l.top+l.height),this.bottomLeftBorderBox=BA>0||wA>0?re(l.left,l.top+kA,BA,wA,JA.BOTTOM_LEFT):new QA(l.left,l.top+l.height),this.topLeftPaddingBox=p>0||C>0?re(l.left+OA,l.top+FA,Math.max(0,p-OA),Math.max(0,C-FA),JA.TOP_LEFT):new QA(l.left+OA,l.top+FA),this.topRightPaddingBox=E>0||N>0?re(l.left+Math.min(_A,l.width-zA),l.top+FA,_A>l.width+zA?0:Math.max(0,E-zA),Math.max(0,N-FA),JA.TOP_RIGHT):new QA(l.left+l.width-zA,l.top+FA),this.bottomRightPaddingBox=X>0||j>0?re(l.left+Math.min(XA,l.width-OA),l.top+Math.min(te,l.height-$A),Math.max(0,X-zA),Math.max(0,j-$A),JA.BOTTOM_RIGHT):new QA(l.left+l.width-zA,l.top+l.height-$A),this.bottomLeftPaddingBox=BA>0||wA>0?re(l.left+OA,l.top+Math.min(kA,l.height-$A),Math.max(0,BA-OA),Math.max(0,wA-$A),JA.BOTTOM_LEFT):new QA(l.left+OA,l.top+l.height-$A),this.topLeftContentBox=p>0||C>0?re(l.left+OA+qA,l.top+FA+ue,Math.max(0,p-(OA+qA)),Math.max(0,C-(FA+ue)),JA.TOP_LEFT):new QA(l.left+OA+qA,l.top+FA+ue),this.topRightContentBox=E>0||N>0?re(l.left+Math.min(_A,l.width+OA+qA),l.top+FA+ue,_A>l.width+OA+qA?0:E-OA+qA,N-(FA+ue),JA.TOP_RIGHT):new QA(l.left+l.width-(zA+Ee),l.top+FA+ue),this.bottomRightContentBox=X>0||j>0?re(l.left+Math.min(XA,l.width-(OA+qA)),l.top+Math.min(te,l.height+FA+ue),Math.max(0,X-(zA+Ee)),j-($A+_e),JA.BOTTOM_RIGHT):new QA(l.left+l.width-(zA+Ee),l.top+l.height-($A+_e)),this.bottomLeftContentBox=BA>0||wA>0?re(l.left+OA+qA,l.top+kA,Math.max(0,BA-(OA+qA)),wA-($A+_e),JA.BOTTOM_LEFT):new QA(l.left+OA+qA,l.top+l.height-($A+_e))}return s})(),JA;(function(s){s[s.TOP_LEFT=0]="TOP_LEFT",s[s.TOP_RIGHT=1]="TOP_RIGHT",s[s.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",s[s.BOTTOM_LEFT=3]="BOTTOM_LEFT"})(JA||(JA={}));var re=function(s,i,u,l,f){var p=4*((Math.sqrt(2)-1)/3),C=u*p,Q=l*p,E=s+u,N=i+l;switch(f){case JA.TOP_LEFT:return new yo(new QA(s,N),new QA(s,N-Q),new QA(E-C,i),new QA(E,i));case JA.TOP_RIGHT:return new yo(new QA(s,i),new QA(s+C,i),new QA(E,N-Q),new QA(E,N));case JA.BOTTOM_RIGHT:return new yo(new QA(E,i),new QA(E,i+Q),new QA(s+C,N),new QA(s,N));case JA.BOTTOM_LEFT:default:return new yo(new QA(E,N),new QA(E-C,N),new QA(s,i+Q),new QA(s,i))}},vo=function(s){return[s.topLeftBorderBox,s.topRightBorderBox,s.bottomRightBorderBox,s.bottomLeftBorderBox]},zQ=function(s){return[s.topLeftContentBox,s.topRightContentBox,s.bottomRightContentBox,s.bottomLeftContentBox]},Qo=function(s){return[s.topLeftPaddingBox,s.topRightPaddingBox,s.bottomRightPaddingBox,s.bottomLeftPaddingBox]},$Q=(function(){function s(i,u,l){this.offsetX=i,this.offsetY=u,this.matrix=l,this.type=0,this.target=6}return s})(),Eo=(function(){function s(i,u){this.path=i,this.target=u,this.type=1}return s})(),XQ=(function(){function s(i){this.opacity=i,this.type=2,this.target=6}return s})(),WQ=function(s){return s.type===0},au=function(s){return s.type===1},YQ=function(s){return s.type===2},lu=function(s,i){return s.length===i.length?s.some(function(u,l){return u===i[l]}):!1},JQ=function(s,i,u,l,f){return s.map(function(p,C){switch(C){case 0:return p.add(i,u);case 1:return p.add(i+l,u);case 2:return p.add(i+l,u+f);case 3:return p.add(i,u+f)}return p})},cu=(function(){function s(i){this.element=i,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}return s})(),uu=(function(){function s(i,u){if(this.container=i,this.parent=u,this.effects=[],this.curves=new GQ(this.container),this.container.styles.opacity<1&&this.effects.push(new XQ(this.container.styles.opacity)),this.container.styles.transform!==null){var l=this.container.bounds.left+this.container.styles.transformOrigin[0].number,f=this.container.bounds.top+this.container.styles.transformOrigin[1].number,p=this.container.styles.transform;this.effects.push(new $Q(l,f,p))}if(this.container.styles.overflowX!==0){var C=vo(this.curves),Q=Qo(this.curves);lu(C,Q)?this.effects.push(new Eo(C,6)):(this.effects.push(new Eo(C,2)),this.effects.push(new Eo(Q,4)))}}return s.prototype.getEffects=function(i){for(var u=[2,3].indexOf(this.container.styles.position)===-1,l=this.parent,f=this.effects.slice(0);l;){var p=l.effects.filter(function(E){return!au(E)});if(u||l.container.styles.position!==0||!l.parent){if(f.unshift.apply(f,p),u=[2,3].indexOf(l.container.styles.position)===-1,l.container.styles.overflowX!==0){var C=vo(l.curves),Q=Qo(l.curves);lu(C,Q)||f.unshift(new Eo(Q,6))}}else f.unshift.apply(f,p);l=l.parent}return f.filter(function(E){return fe(E.target,i)})},s})(),es=function(s,i,u,l){s.container.elements.forEach(function(f){var p=fe(f.flags,4),C=fe(f.flags,2),Q=new uu(f,s);fe(f.styles.display,2048)&&l.push(Q);var E=fe(f.flags,8)?[]:l;if(p||C){var N=p||f.styles.isPositioned()?u:i,K=new cu(Q);if(f.styles.isPositioned()||f.styles.opacity<1||f.styles.isTransformed()){var X=f.styles.zIndex.order;if(X<0){var j=0;N.negativeZIndex.some(function(BA,wA){return X>BA.element.container.styles.zIndex.order?(j=wA,!1):j>0}),N.negativeZIndex.splice(j,0,K)}else if(X>0){var CA=0;N.positiveZIndex.some(function(BA,wA){return X>=BA.element.container.styles.zIndex.order?(CA=wA+1,!1):CA>0}),N.positiveZIndex.splice(CA,0,K)}else N.zeroOrAutoZIndexOrTransformedOrOpacity.push(K)}else f.styles.isFloating()?N.nonPositionedFloats.push(K):N.nonPositionedInlineLevel.push(K);es(Q,K,p?K:u,E)}else f.styles.isInlineLevel()?i.inlineLevel.push(Q):i.nonInlineLevel.push(Q),es(Q,i,u,E);fe(f.flags,8)&&du(f,E)})},du=function(s,i){for(var u=s instanceof Gi?s.start:1,l=s instanceof Gi?s.reversed:!1,f=0;f<i.length;f++){var p=i[f];p.container instanceof kc&&typeof p.container.value=="number"&&p.container.value!==0&&(u=p.container.value),p.listValue=jn(u,p.container.styles.listStyleType,!0),u+=l?-1:1}},ZQ=function(s){var i=new uu(s,null),u=new cu(i),l=[];return es(i,u,u,l),du(i.container,l),u},fu=function(s,i){switch(i){case 0:return Ne(s.topLeftBorderBox,s.topLeftPaddingBox,s.topRightBorderBox,s.topRightPaddingBox);case 1:return Ne(s.topRightBorderBox,s.topRightPaddingBox,s.bottomRightBorderBox,s.bottomRightPaddingBox);case 2:return Ne(s.bottomRightBorderBox,s.bottomRightPaddingBox,s.bottomLeftBorderBox,s.bottomLeftPaddingBox);default:return Ne(s.bottomLeftBorderBox,s.bottomLeftPaddingBox,s.topLeftBorderBox,s.topLeftPaddingBox)}},jQ=function(s,i){switch(i){case 0:return Ne(s.topLeftBorderBox,s.topLeftBorderDoubleOuterBox,s.topRightBorderBox,s.topRightBorderDoubleOuterBox);case 1:return Ne(s.topRightBorderBox,s.topRightBorderDoubleOuterBox,s.bottomRightBorderBox,s.bottomRightBorderDoubleOuterBox);case 2:return Ne(s.bottomRightBorderBox,s.bottomRightBorderDoubleOuterBox,s.bottomLeftBorderBox,s.bottomLeftBorderDoubleOuterBox);default:return Ne(s.bottomLeftBorderBox,s.bottomLeftBorderDoubleOuterBox,s.topLeftBorderBox,s.topLeftBorderDoubleOuterBox)}},qQ=function(s,i){switch(i){case 0:return Ne(s.topLeftBorderDoubleInnerBox,s.topLeftPaddingBox,s.topRightBorderDoubleInnerBox,s.topRightPaddingBox);case 1:return Ne(s.topRightBorderDoubleInnerBox,s.topRightPaddingBox,s.bottomRightBorderDoubleInnerBox,s.bottomRightPaddingBox);case 2:return Ne(s.bottomRightBorderDoubleInnerBox,s.bottomRightPaddingBox,s.bottomLeftBorderDoubleInnerBox,s.bottomLeftPaddingBox);default:return Ne(s.bottomLeftBorderDoubleInnerBox,s.bottomLeftPaddingBox,s.topLeftBorderDoubleInnerBox,s.topLeftPaddingBox)}},AE=function(s,i){switch(i){case 0:return Fo(s.topLeftBorderStroke,s.topRightBorderStroke);case 1:return Fo(s.topRightBorderStroke,s.bottomRightBorderStroke);case 2:return Fo(s.bottomRightBorderStroke,s.bottomLeftBorderStroke);default:return Fo(s.bottomLeftBorderStroke,s.topLeftBorderStroke)}},Fo=function(s,i){var u=[];return De(s)?u.push(s.subdivide(.5,!1)):u.push(s),De(i)?u.push(i.subdivide(.5,!0)):u.push(i),u},Ne=function(s,i,u,l){var f=[];return De(s)?f.push(s.subdivide(.5,!1)):f.push(s),De(u)?f.push(u.subdivide(.5,!0)):f.push(u),De(l)?f.push(l.subdivide(.5,!0).reverse()):f.push(l),De(i)?f.push(i.subdivide(.5,!1).reverse()):f.push(i),f},gu=function(s){var i=s.bounds,u=s.styles;return i.add(u.borderLeftWidth,u.borderTopWidth,-(u.borderRightWidth+u.borderLeftWidth),-(u.borderTopWidth+u.borderBottomWidth))},Uo=function(s){var i=s.styles,u=s.bounds,l=Ae(i.paddingLeft,u.width),f=Ae(i.paddingRight,u.width),p=Ae(i.paddingTop,u.width),C=Ae(i.paddingBottom,u.width);return u.add(l+i.borderLeftWidth,p+i.borderTopWidth,-(i.borderRightWidth+i.borderLeftWidth+l+f),-(i.borderTopWidth+i.borderBottomWidth+p+C))},eE=function(s,i){return s===0?i.bounds:s===2?Uo(i):gu(i)},tE=function(s,i){return s===0?i.bounds:s===2?Uo(i):gu(i)},ts=function(s,i,u){var l=eE(fn(s.styles.backgroundOrigin,i),s),f=tE(fn(s.styles.backgroundClip,i),s),p=nE(fn(s.styles.backgroundSize,i),u,l),C=p[0],Q=p[1],E=$n(fn(s.styles.backgroundPosition,i),l.width-C,l.height-Q);return[rE(fn(s.styles.backgroundRepeat,i),E,p,l,f),Math.round(l.left+E[0]),Math.round(l.top+E[1]),C,Q]},dn=function(s){return jA(s)&&s.value===sn.AUTO},bo=function(s){return typeof s=="number"},nE=function(s,i,u){var l=i[0],f=i[1],p=i[2],C=s[0],Q=s[1];if(!C)return[0,0];if(ce(C)&&Q&&ce(Q))return[Ae(C,u.width),Ae(Q,u.height)];var E=bo(p);if(jA(C)&&(C.value===sn.CONTAIN||C.value===sn.COVER))return bo(p)?u.width/u.height<p!=(C.value===sn.COVER)?[u.width,u.width/p]:[u.height*p,u.height]:[u.width,u.height];var N=bo(l),K=bo(f),X=N||K;if(dn(C)&&(!Q||dn(Q)))return N&&K?[l,f]:!E&&!X?[u.width,u.height]:X&&E?[N?l:f*p,K?f:l/p]:[N?l:u.width,K?f:u.height];if(E){var j=0,CA=0;return ce(C)?j=Ae(C,u.width):ce(Q)&&(CA=Ae(Q,u.height)),dn(C)?j=CA*p:(!Q||dn(Q))&&(CA=j/p),[j,CA]}var BA=null,wA=null;if(ce(C)?BA=Ae(C,u.width):Q&&ce(Q)&&(wA=Ae(Q,u.height)),BA!==null&&(!Q||dn(Q))&&(wA=N&&K?BA/l*f:u.height),wA!==null&&dn(C)&&(BA=N&&K?wA/f*l:u.width),BA!==null&&wA!==null)return[BA,wA];throw new Error("Unable to calculate background-size for element")},fn=function(s,i){var u=s[i];return typeof u>"u"?s[0]:u},rE=function(s,i,u,l,f){var p=i[0],C=i[1],Q=u[0],E=u[1];switch(s){case 2:return[new QA(Math.round(l.left),Math.round(l.top+C)),new QA(Math.round(l.left+l.width),Math.round(l.top+C)),new QA(Math.round(l.left+l.width),Math.round(E+l.top+C)),new QA(Math.round(l.left),Math.round(E+l.top+C))];case 3:return[new QA(Math.round(l.left+p),Math.round(l.top)),new QA(Math.round(l.left+p+Q),Math.round(l.top)),new QA(Math.round(l.left+p+Q),Math.round(l.height+l.top)),new QA(Math.round(l.left+p),Math.round(l.height+l.top))];case 1:return[new QA(Math.round(l.left+p),Math.round(l.top+C)),new QA(Math.round(l.left+p+Q),Math.round(l.top+C)),new QA(Math.round(l.left+p+Q),Math.round(l.top+C+E)),new QA(Math.round(l.left+p),Math.round(l.top+C+E))];default:return[new QA(Math.round(f.left),Math.round(f.top)),new QA(Math.round(f.left+f.width),Math.round(f.top)),new QA(Math.round(f.left+f.width),Math.round(f.height+f.top)),new QA(Math.round(f.left),Math.round(f.height+f.top))]}},oE="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",hu="Hidden Text",iE=(function(){function s(i){this._data={},this._document=i}return s.prototype.parseMetrics=function(i,u){var l=this._document.createElement("div"),f=this._document.createElement("img"),p=this._document.createElement("span"),C=this._document.body;l.style.visibility="hidden",l.style.fontFamily=i,l.style.fontSize=u,l.style.margin="0",l.style.padding="0",l.style.whiteSpace="nowrap",C.appendChild(l),f.src=oE,f.width=1,f.height=1,f.style.margin="0",f.style.padding="0",f.style.verticalAlign="baseline",p.style.fontFamily=i,p.style.fontSize=u,p.style.margin="0",p.style.padding="0",p.appendChild(this._document.createTextNode(hu)),l.appendChild(p),l.appendChild(f);var Q=f.offsetTop-p.offsetTop+2;l.removeChild(p),l.appendChild(this._document.createTextNode(hu)),l.style.lineHeight="normal",f.style.verticalAlign="super";var E=f.offsetTop-l.offsetTop+2;return C.removeChild(l),{baseline:Q,middle:E}},s.prototype.getMetrics=function(i,u){var l=i+" "+u;return typeof this._data[l]>"u"&&(this._data[l]=this.parseMetrics(i,u)),this._data[l]},s})(),Bu=(function(){function s(i,u){this.context=i,this.options=u}return s})(),sE=1e4,aE=(function(s){n(i,s);function i(u,l){var f=s.call(this,u,l)||this;return f._activeEffects=[],f.canvas=l.canvas?l.canvas:document.createElement("canvas"),f.ctx=f.canvas.getContext("2d"),l.canvas||(f.canvas.width=Math.floor(l.width*l.scale),f.canvas.height=Math.floor(l.height*l.scale),f.canvas.style.width=l.width+"px",f.canvas.style.height=l.height+"px"),f.fontMetrics=new iE(document),f.ctx.scale(f.options.scale,f.options.scale),f.ctx.translate(-l.x,-l.y),f.ctx.textBaseline="bottom",f._activeEffects=[],f.context.logger.debug("Canvas renderer initialized ("+l.width+"x"+l.height+") with scale "+l.scale),f}return i.prototype.applyEffects=function(u){for(var l=this;this._activeEffects.length;)this.popEffect();u.forEach(function(f){return l.applyEffect(f)})},i.prototype.applyEffect=function(u){this.ctx.save(),YQ(u)&&(this.ctx.globalAlpha=u.opacity),WQ(u)&&(this.ctx.translate(u.offsetX,u.offsetY),this.ctx.transform(u.matrix[0],u.matrix[1],u.matrix[2],u.matrix[3],u.matrix[4],u.matrix[5]),this.ctx.translate(-u.offsetX,-u.offsetY)),au(u)&&(this.path(u.path),this.ctx.clip()),this._activeEffects.push(u)},i.prototype.popEffect=function(){this._activeEffects.pop(),this.ctx.restore()},i.prototype.renderStack=function(u){return a(this,void 0,void 0,function(){var l;return c(this,function(f){switch(f.label){case 0:return l=u.element.container.styles,l.isVisible()?[4,this.renderStackContent(u)]:[3,2];case 1:f.sent(),f.label=2;case 2:return[2]}})})},i.prototype.renderNode=function(u){return a(this,void 0,void 0,function(){return c(this,function(l){switch(l.label){case 0:if(fe(u.container.flags,16))debugger;return u.container.styles.isVisible()?[4,this.renderNodeBackgroundAndBorders(u)]:[3,3];case 1:return l.sent(),[4,this.renderNodeContent(u)];case 2:l.sent(),l.label=3;case 3:return[2]}})})},i.prototype.renderTextWithLetterSpacing=function(u,l,f){var p=this;l===0?this.ctx.fillText(u.text,u.bounds.left,u.bounds.top+f):Pi(u.text).reduce(function(C,Q){return p.ctx.fillText(Q,C,u.bounds.top+f),C+p.ctx.measureText(Q).width},u.bounds.left)},i.prototype.createFontStyle=function(u){var l=u.fontVariant.filter(function(C){return C==="normal"||C==="small-caps"}).join(""),f=fE(u.fontFamily).join(", "),p=zn(u.fontSize)?""+u.fontSize.number+u.fontSize.unit:u.fontSize.number+"px";return[[u.fontStyle,l,u.fontWeight,p,f].join(" "),f,p]},i.prototype.renderTextNode=function(u,l){return a(this,void 0,void 0,function(){var f,p,C,Q,E,N,K,X,j=this;return c(this,function(CA){return f=this.createFontStyle(l),p=f[0],C=f[1],Q=f[2],this.ctx.font=p,this.ctx.direction=l.direction===1?"rtl":"ltr",this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic",E=this.fontMetrics.getMetrics(C,Q),N=E.baseline,K=E.middle,X=l.paintOrder,u.textBounds.forEach(function(BA){X.forEach(function(wA){switch(wA){case 0:j.ctx.fillStyle=ge(l.color),j.renderTextWithLetterSpacing(BA,l.letterSpacing,N);var RA=l.textShadow;RA.length&&BA.text.trim().length&&(RA.slice(0).reverse().forEach(function(DA){j.ctx.shadowColor=ge(DA.color),j.ctx.shadowOffsetX=DA.offsetX.number*j.options.scale,j.ctx.shadowOffsetY=DA.offsetY.number*j.options.scale,j.ctx.shadowBlur=DA.blur.number,j.renderTextWithLetterSpacing(BA,l.letterSpacing,N)}),j.ctx.shadowColor="",j.ctx.shadowOffsetX=0,j.ctx.shadowOffsetY=0,j.ctx.shadowBlur=0),l.textDecorationLine.length&&(j.ctx.fillStyle=ge(l.textDecorationColor||l.color),l.textDecorationLine.forEach(function(DA){switch(DA){case 1:j.ctx.fillRect(BA.bounds.left,Math.round(BA.bounds.top+N),BA.bounds.width,1);break;case 2:j.ctx.fillRect(BA.bounds.left,Math.round(BA.bounds.top),BA.bounds.width,1);break;case 3:j.ctx.fillRect(BA.bounds.left,Math.ceil(BA.bounds.top+K),BA.bounds.width,1);break}}));break;case 1:l.webkitTextStrokeWidth&&BA.text.trim().length&&(j.ctx.strokeStyle=ge(l.webkitTextStrokeColor),j.ctx.lineWidth=l.webkitTextStrokeWidth,j.ctx.lineJoin=window.chrome?"miter":"round",j.ctx.strokeText(BA.text,BA.bounds.left,BA.bounds.top+N)),j.ctx.strokeStyle="",j.ctx.lineWidth=0,j.ctx.lineJoin="miter";break}})}),[2]})})},i.prototype.renderReplacedElement=function(u,l,f){if(f&&u.intrinsicWidth>0&&u.intrinsicHeight>0){var p=Uo(u),C=Qo(l);this.path(C),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(f,0,0,u.intrinsicWidth,u.intrinsicHeight,p.left,p.top,p.width,p.height),this.ctx.restore()}},i.prototype.renderNodeContent=function(u){return a(this,void 0,void 0,function(){var l,f,p,C,Q,E,_A,_A,N,K,X,j,XA,CA,BA,kA,wA,RA,DA,_A,te,XA,kA;return c(this,function(FA){switch(FA.label){case 0:this.applyEffects(u.getEffects(4)),l=u.container,f=u.curves,p=l.styles,C=0,Q=l.textNodes,FA.label=1;case 1:return C<Q.length?(E=Q[C],[4,this.renderTextNode(E,p)]):[3,4];case 2:FA.sent(),FA.label=3;case 3:return C++,[3,1];case 4:if(!(l instanceof Nc))return[3,8];FA.label=5;case 5:return FA.trys.push([5,7,,8]),[4,this.context.cache.match(l.src)];case 6:return _A=FA.sent(),this.renderReplacedElement(l,f,_A),[3,8];case 7:return FA.sent(),this.context.logger.error("Error loading image "+l.src),[3,8];case 8:if(l instanceof Lc&&this.renderReplacedElement(l,f,l.canvas),!(l instanceof Tc))return[3,12];FA.label=9;case 9:return FA.trys.push([9,11,,12]),[4,this.context.cache.match(l.svg)];case 10:return _A=FA.sent(),this.renderReplacedElement(l,f,_A),[3,12];case 11:return FA.sent(),this.context.logger.error("Error loading svg "+l.svg.substring(0,255)),[3,12];case 12:return l instanceof Rc&&l.tree?(N=new i(this.context,{scale:this.options.scale,backgroundColor:l.backgroundColor,x:0,y:0,width:l.width,height:l.height}),[4,N.render(l.tree)]):[3,14];case 13:K=FA.sent(),l.width&&l.height&&this.ctx.drawImage(K,0,0,l.width,l.height,l.bounds.left,l.bounds.top,l.bounds.width,l.bounds.height),FA.label=14;case 14:if(l instanceof zi&&(X=Math.min(l.bounds.width,l.bounds.height),l.type===ho?l.checked&&(this.ctx.save(),this.path([new QA(l.bounds.left+X*.39363,l.bounds.top+X*.79),new QA(l.bounds.left+X*.16,l.bounds.top+X*.5549),new QA(l.bounds.left+X*.27347,l.bounds.top+X*.44071),new QA(l.bounds.left+X*.39694,l.bounds.top+X*.5649),new QA(l.bounds.left+X*.72983,l.bounds.top+X*.23),new QA(l.bounds.left+X*.84,l.bounds.top+X*.34085),new QA(l.bounds.left+X*.39363,l.bounds.top+X*.79)]),this.ctx.fillStyle=ge(Mc),this.ctx.fill(),this.ctx.restore()):l.type===Bo&&l.checked&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(l.bounds.left+X/2,l.bounds.top+X/2,X/4,0,Math.PI*2,!0),this.ctx.fillStyle=ge(Mc),this.ctx.fill(),this.ctx.restore())),lE(l)&&l.value.length){switch(j=this.createFontStyle(p),XA=j[0],CA=j[1],BA=this.fontMetrics.getMetrics(XA,CA).baseline,this.ctx.font=XA,this.ctx.fillStyle=ge(p.color),this.ctx.textBaseline="alphabetic",this.ctx.textAlign=uE(l.styles.textAlign),kA=Uo(l),wA=0,l.styles.textAlign){case 1:wA+=kA.width/2;break;case 2:wA+=kA.width;break}RA=kA.add(wA,0,0,-kA.height/2+1),this.ctx.save(),this.path([new QA(kA.left,kA.top),new QA(kA.left+kA.width,kA.top),new QA(kA.left+kA.width,kA.top+kA.height),new QA(kA.left,kA.top+kA.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new Jn(l.value,RA),p.letterSpacing,BA),this.ctx.restore(),this.ctx.textBaseline="alphabetic",this.ctx.textAlign="left"}if(!fe(l.styles.display,2048))return[3,20];if(l.styles.listStyleImage===null)return[3,19];if(DA=l.styles.listStyleImage,DA.type!==0)return[3,18];_A=void 0,te=DA.url,FA.label=15;case 15:return FA.trys.push([15,17,,18]),[4,this.context.cache.match(te)];case 16:return _A=FA.sent(),this.ctx.drawImage(_A,l.bounds.left-(_A.width+10),l.bounds.top),[3,18];case 17:return FA.sent(),this.context.logger.error("Error loading list-style-image "+te),[3,18];case 18:return[3,20];case 19:u.listValue&&l.styles.listStyleType!==-1&&(XA=this.createFontStyle(p)[0],this.ctx.font=XA,this.ctx.fillStyle=ge(p.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",kA=new h(l.bounds.left,l.bounds.top+Ae(l.styles.paddingTop,l.bounds.width),l.bounds.width,hc(p.lineHeight,p.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new Jn(u.listValue,kA),p.letterSpacing,hc(p.lineHeight,p.fontSize.number)/2+2),this.ctx.textBaseline="bottom",this.ctx.textAlign="left"),FA.label=20;case 20:return[2]}})})},i.prototype.renderStackContent=function(u){return a(this,void 0,void 0,function(){var l,f,DA,p,C,DA,Q,E,DA,N,K,DA,X,j,DA,CA,BA,DA,wA,RA,DA;return c(this,function(_A){switch(_A.label){case 0:if(fe(u.element.container.flags,16))debugger;return[4,this.renderNodeBackgroundAndBorders(u.element)];case 1:_A.sent(),l=0,f=u.negativeZIndex,_A.label=2;case 2:return l<f.length?(DA=f[l],[4,this.renderStack(DA)]):[3,5];case 3:_A.sent(),_A.label=4;case 4:return l++,[3,2];case 5:return[4,this.renderNodeContent(u.element)];case 6:_A.sent(),p=0,C=u.nonInlineLevel,_A.label=7;case 7:return p<C.length?(DA=C[p],[4,this.renderNode(DA)]):[3,10];case 8:_A.sent(),_A.label=9;case 9:return p++,[3,7];case 10:Q=0,E=u.nonPositionedFloats,_A.label=11;case 11:return Q<E.length?(DA=E[Q],[4,this.renderStack(DA)]):[3,14];case 12:_A.sent(),_A.label=13;case 13:return Q++,[3,11];case 14:N=0,K=u.nonPositionedInlineLevel,_A.label=15;case 15:return N<K.length?(DA=K[N],[4,this.renderStack(DA)]):[3,18];case 16:_A.sent(),_A.label=17;case 17:return N++,[3,15];case 18:X=0,j=u.inlineLevel,_A.label=19;case 19:return X<j.length?(DA=j[X],[4,this.renderNode(DA)]):[3,22];case 20:_A.sent(),_A.label=21;case 21:return X++,[3,19];case 22:CA=0,BA=u.zeroOrAutoZIndexOrTransformedOrOpacity,_A.label=23;case 23:return CA<BA.length?(DA=BA[CA],[4,this.renderStack(DA)]):[3,26];case 24:_A.sent(),_A.label=25;case 25:return CA++,[3,23];case 26:wA=0,RA=u.positiveZIndex,_A.label=27;case 27:return wA<RA.length?(DA=RA[wA],[4,this.renderStack(DA)]):[3,30];case 28:_A.sent(),_A.label=29;case 29:return wA++,[3,27];case 30:return[2]}})})},i.prototype.mask=function(u){this.ctx.beginPath(),this.ctx.moveTo(0,0),this.ctx.lineTo(this.canvas.width,0),this.ctx.lineTo(this.canvas.width,this.canvas.height),this.ctx.lineTo(0,this.canvas.height),this.ctx.lineTo(0,0),this.formatPath(u.slice(0).reverse()),this.ctx.closePath()},i.prototype.path=function(u){this.ctx.beginPath(),this.formatPath(u),this.ctx.closePath()},i.prototype.formatPath=function(u){var l=this;u.forEach(function(f,p){var C=De(f)?f.start:f;p===0?l.ctx.moveTo(C.x,C.y):l.ctx.lineTo(C.x,C.y),De(f)&&l.ctx.bezierCurveTo(f.startControl.x,f.startControl.y,f.endControl.x,f.endControl.y,f.end.x,f.end.y)})},i.prototype.renderRepeat=function(u,l,f,p){this.path(u),this.ctx.fillStyle=l,this.ctx.translate(f,p),this.ctx.fill(),this.ctx.translate(-f,-p)},i.prototype.resizeImage=function(u,l,f){var p;if(u.width===l&&u.height===f)return u;var C=((p=this.canvas.ownerDocument)!==null&&p!==void 0?p:document).createElement("canvas");return C.width=Math.max(1,l),C.height=Math.max(1,f),C.getContext("2d").drawImage(u,0,0,u.width,u.height,0,0,l,f),C},i.prototype.renderBackgroundImage=function(u){return a(this,void 0,void 0,function(){var l,f,p,C,Q,E;return c(this,function(N){switch(N.label){case 0:l=u.styles.backgroundImage.length-1,f=function(K){var X,j,CA,ue,Fe,Ue,qA,pe,$A,BA,ue,Fe,Ue,qA,pe,wA,RA,DA,_A,te,XA,kA,FA,zA,$A,OA,ue,Ee,_e,qA,pe,bt,Fe,Ue,Rt,je,It,Vt,Pt,ut,Gt,dt;return c(this,function(gn){switch(gn.label){case 0:if(K.type!==0)return[3,5];X=void 0,j=K.url,gn.label=1;case 1:return gn.trys.push([1,3,,4]),[4,p.context.cache.match(j)];case 2:return X=gn.sent(),[3,4];case 3:return gn.sent(),p.context.logger.error("Error loading background-image "+j),[3,4];case 4:return X&&(CA=ts(u,l,[X.width,X.height,X.width/X.height]),ue=CA[0],Fe=CA[1],Ue=CA[2],qA=CA[3],pe=CA[4],$A=p.ctx.createPattern(p.resizeImage(X,qA,pe),"repeat"),p.renderRepeat(ue,$A,Fe,Ue)),[3,6];case 5:Ay(K)?(BA=ts(u,l,[null,null,null]),ue=BA[0],Fe=BA[1],Ue=BA[2],qA=BA[3],pe=BA[4],wA=YC(K.angle,qA,pe),RA=wA[0],DA=wA[1],_A=wA[2],te=wA[3],XA=wA[4],kA=document.createElement("canvas"),kA.width=qA,kA.height=pe,FA=kA.getContext("2d"),zA=FA.createLinearGradient(DA,te,_A,XA),rc(K.stops,RA).forEach(function(Ar){return zA.addColorStop(Ar.stop,ge(Ar.color))}),FA.fillStyle=zA,FA.fillRect(0,0,qA,pe),qA>0&&pe>0&&($A=p.ctx.createPattern(kA,"repeat"),p.renderRepeat(ue,$A,Fe,Ue))):ey(K)&&(OA=ts(u,l,[null,null,null]),ue=OA[0],Ee=OA[1],_e=OA[2],qA=OA[3],pe=OA[4],bt=K.position.length===0?[Ii]:K.position,Fe=Ae(bt[0],qA),Ue=Ae(bt[bt.length-1],pe),Rt=JC(K,Fe,Ue,qA,pe),je=Rt[0],It=Rt[1],je>0&&It>0&&(Vt=p.ctx.createRadialGradient(Ee+Fe,_e+Ue,0,Ee+Fe,_e+Ue,je),rc(K.stops,je*2).forEach(function(Ar){return Vt.addColorStop(Ar.stop,ge(Ar.color))}),p.path(ue),p.ctx.fillStyle=Vt,je!==It?(Pt=u.bounds.left+.5*u.bounds.width,ut=u.bounds.top+.5*u.bounds.height,Gt=It/je,dt=1/Gt,p.ctx.save(),p.ctx.translate(Pt,ut),p.ctx.transform(1,0,0,Gt,0,0),p.ctx.translate(-Pt,-ut),p.ctx.fillRect(Ee,dt*(_e-ut)+ut,qA,pe*dt),p.ctx.restore()):p.ctx.fill())),gn.label=6;case 6:return l--,[2]}})},p=this,C=0,Q=u.styles.backgroundImage.slice(0).reverse(),N.label=1;case 1:return C<Q.length?(E=Q[C],[5,f(E)]):[3,4];case 2:N.sent(),N.label=3;case 3:return C++,[3,1];case 4:return[2]}})})},i.prototype.renderSolidBorder=function(u,l,f){return a(this,void 0,void 0,function(){return c(this,function(p){return this.path(fu(f,l)),this.ctx.fillStyle=ge(u),this.ctx.fill(),[2]})})},i.prototype.renderDoubleBorder=function(u,l,f,p){return a(this,void 0,void 0,function(){var C,Q;return c(this,function(E){switch(E.label){case 0:return l<3?[4,this.renderSolidBorder(u,f,p)]:[3,2];case 1:return E.sent(),[2];case 2:return C=jQ(p,f),this.path(C),this.ctx.fillStyle=ge(u),this.ctx.fill(),Q=qQ(p,f),this.path(Q),this.ctx.fill(),[2]}})})},i.prototype.renderNodeBackgroundAndBorders=function(u){return a(this,void 0,void 0,function(){var l,f,p,C,Q,E,N,K,X=this;return c(this,function(j){switch(j.label){case 0:return this.applyEffects(u.getEffects(2)),l=u.container.styles,f=!Qt(l.backgroundColor)||l.backgroundImage.length,p=[{style:l.borderTopStyle,color:l.borderTopColor,width:l.borderTopWidth},{style:l.borderRightStyle,color:l.borderRightColor,width:l.borderRightWidth},{style:l.borderBottomStyle,color:l.borderBottomColor,width:l.borderBottomWidth},{style:l.borderLeftStyle,color:l.borderLeftColor,width:l.borderLeftWidth}],C=cE(fn(l.backgroundClip,0),u.curves),f||l.boxShadow.length?(this.ctx.save(),this.path(C),this.ctx.clip(),Qt(l.backgroundColor)||(this.ctx.fillStyle=ge(l.backgroundColor),this.ctx.fill()),[4,this.renderBackgroundImage(u.container)]):[3,2];case 1:j.sent(),this.ctx.restore(),l.boxShadow.slice(0).reverse().forEach(function(CA){X.ctx.save();var BA=vo(u.curves),wA=CA.inset?0:sE,RA=JQ(BA,-wA+(CA.inset?1:-1)*CA.spread.number,(CA.inset?1:-1)*CA.spread.number,CA.spread.number*(CA.inset?-2:2),CA.spread.number*(CA.inset?-2:2));CA.inset?(X.path(BA),X.ctx.clip(),X.mask(RA)):(X.mask(BA),X.ctx.clip(),X.path(RA)),X.ctx.shadowOffsetX=CA.offsetX.number+wA,X.ctx.shadowOffsetY=CA.offsetY.number,X.ctx.shadowColor=ge(CA.color),X.ctx.shadowBlur=CA.blur.number,X.ctx.fillStyle=CA.inset?ge(CA.color):"rgba(0,0,0,1)",X.ctx.fill(),X.ctx.restore()}),j.label=2;case 2:Q=0,E=0,N=p,j.label=3;case 3:return E<N.length?(K=N[E],K.style!==0&&!Qt(K.color)&&K.width>0?K.style!==2?[3,5]:[4,this.renderDashedDottedBorder(K.color,K.width,Q,u.curves,2)]:[3,11]):[3,13];case 4:return j.sent(),[3,11];case 5:return K.style!==3?[3,7]:[4,this.renderDashedDottedBorder(K.color,K.width,Q,u.curves,3)];case 6:return j.sent(),[3,11];case 7:return K.style!==4?[3,9]:[4,this.renderDoubleBorder(K.color,K.width,Q,u.curves)];case 8:return j.sent(),[3,11];case 9:return[4,this.renderSolidBorder(K.color,Q,u.curves)];case 10:j.sent(),j.label=11;case 11:Q++,j.label=12;case 12:return E++,[3,3];case 13:return[2]}})})},i.prototype.renderDashedDottedBorder=function(u,l,f,p,C){return a(this,void 0,void 0,function(){var Q,E,N,K,X,j,CA,BA,wA,RA,DA,_A,te,XA,kA,FA,kA,FA;return c(this,function(zA){return this.ctx.save(),Q=AE(p,f),E=fu(p,f),C===2&&(this.path(E),this.ctx.clip()),De(E[0])?(N=E[0].start.x,K=E[0].start.y):(N=E[0].x,K=E[0].y),De(E[1])?(X=E[1].end.x,j=E[1].end.y):(X=E[1].x,j=E[1].y),f===0||f===2?CA=Math.abs(N-X):CA=Math.abs(K-j),this.ctx.beginPath(),C===3?this.formatPath(Q):this.formatPath(E.slice(0,2)),BA=l<3?l*3:l*2,wA=l<3?l*2:l,C===3&&(BA=l,wA=l),RA=!0,CA<=BA*2?RA=!1:CA<=BA*2+wA?(DA=CA/(2*BA+wA),BA*=DA,wA*=DA):(_A=Math.floor((CA+wA)/(BA+wA)),te=(CA-_A*BA)/(_A-1),XA=(CA-(_A+1)*BA)/_A,wA=XA<=0||Math.abs(wA-te)<Math.abs(wA-XA)?te:XA),RA&&(C===3?this.ctx.setLineDash([0,BA+wA]):this.ctx.setLineDash([BA,wA])),C===3?(this.ctx.lineCap="round",this.ctx.lineWidth=l):this.ctx.lineWidth=l*2+1.1,this.ctx.strokeStyle=ge(u),this.ctx.stroke(),this.ctx.setLineDash([]),C===2&&(De(E[0])&&(kA=E[3],FA=E[0],this.ctx.beginPath(),this.formatPath([new QA(kA.end.x,kA.end.y),new QA(FA.start.x,FA.start.y)]),this.ctx.stroke()),De(E[1])&&(kA=E[1],FA=E[2],this.ctx.beginPath(),this.formatPath([new QA(kA.end.x,kA.end.y),new QA(FA.start.x,FA.start.y)]),this.ctx.stroke())),this.ctx.restore(),[2]})})},i.prototype.render=function(u){return a(this,void 0,void 0,function(){var l;return c(this,function(f){switch(f.label){case 0:return this.options.backgroundColor&&(this.ctx.fillStyle=ge(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height)),l=ZQ(u),[4,this.renderStack(l)];case 1:return f.sent(),this.applyEffects([]),[2,this.canvas]}})})},i})(Bu),lE=function(s){return s instanceof Kc||s instanceof Oc?!0:s instanceof zi&&s.type!==Bo&&s.type!==ho},cE=function(s,i){switch(s){case 0:return vo(i);case 2:return zQ(i);default:return Qo(i)}},uE=function(s){switch(s){case 1:return"center";case 2:return"right";default:return"left"}},dE=["-apple-system","system-ui"],fE=function(s){return/iPhone OS 15_(0|1)/.test(window.navigator.userAgent)?s.filter(function(i){return dE.indexOf(i)===-1}):s},gE=(function(s){n(i,s);function i(u,l){var f=s.call(this,u,l)||this;return f.canvas=l.canvas?l.canvas:document.createElement("canvas"),f.ctx=f.canvas.getContext("2d"),f.options=l,f.canvas.width=Math.floor(l.width*l.scale),f.canvas.height=Math.floor(l.height*l.scale),f.canvas.style.width=l.width+"px",f.canvas.style.height=l.height+"px",f.ctx.scale(f.options.scale,f.options.scale),f.ctx.translate(-l.x,-l.y),f.context.logger.debug("EXPERIMENTAL ForeignObject renderer initialized ("+l.width+"x"+l.height+" at "+l.x+","+l.y+") with scale "+l.scale),f}return i.prototype.render=function(u){return a(this,void 0,void 0,function(){var l,f;return c(this,function(p){switch(p.label){case 0:return l=Vi(this.options.width*this.options.scale,this.options.height*this.options.scale,this.options.scale,this.options.scale,u),[4,hE(l)];case 1:return f=p.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=ge(this.options.backgroundColor),this.ctx.fillRect(0,0,this.options.width*this.options.scale,this.options.height*this.options.scale)),this.ctx.drawImage(f,-this.options.x*this.options.scale,-this.options.y*this.options.scale),[2,this.canvas]}})})},i})(Bu),hE=function(s){return new Promise(function(i,u){var l=new Image;l.onload=function(){i(l)},l.onerror=u,l.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(s))})},BE=(function(){function s(i){var u=i.id,l=i.enabled;this.id=u,this.enabled=l,this.start=Date.now()}return s.prototype.debug=function(){for(var i=[],u=0;u<arguments.length;u++)i[u]=arguments[u];this.enabled&&(typeof window<"u"&&window.console&&typeof console.debug=="function"?console.debug.apply(console,d([this.id,this.getTime()+"ms"],i)):this.info.apply(this,i))},s.prototype.getTime=function(){return Date.now()-this.start},s.prototype.info=function(){for(var i=[],u=0;u<arguments.length;u++)i[u]=arguments[u];this.enabled&&typeof window<"u"&&window.console&&typeof console.info=="function"&&console.info.apply(console,d([this.id,this.getTime()+"ms"],i))},s.prototype.warn=function(){for(var i=[],u=0;u<arguments.length;u++)i[u]=arguments[u];this.enabled&&(typeof window<"u"&&window.console&&typeof console.warn=="function"?console.warn.apply(console,d([this.id,this.getTime()+"ms"],i)):this.info.apply(this,i))},s.prototype.error=function(){for(var i=[],u=0;u<arguments.length;u++)i[u]=arguments[u];this.enabled&&(typeof window<"u"&&window.console&&typeof console.error=="function"?console.error.apply(console,d([this.id,this.getTime()+"ms"],i)):this.info.apply(this,i))},s.instances={},s})(),pE=(function(){function s(i,u){var l;this.windowBounds=u,this.instanceName="#"+s.instanceCount++,this.logger=new BE({id:this.instanceName,enabled:i.logging}),this.cache=(l=i.cache)!==null&&l!==void 0?l:new kQ(this,i)}return s.instanceCount=1,s})(),mE=function(s,i){return i===void 0&&(i={}),wE(s,i)};typeof window<"u"&&su.setContext(window);var wE=function(s,i){return a(void 0,void 0,void 0,function(){var u,l,f,p,C,Q,E,N,K,X,j,CA,BA,wA,RA,DA,_A,te,XA,kA,zA,FA,zA,$A,OA,ue,Ee,_e,qA,pe,bt,Fe,Ue,Rt,je,It,Vt,Pt,ut,Gt;return c(this,function(dt){switch(dt.label){case 0:if(!s||typeof s!="object")return[2,Promise.reject("Invalid element provided as first argument")];if(u=s.ownerDocument,!u)throw new Error("Element is not attached to a Document");if(l=u.defaultView,!l)throw new Error("Document is not attached to a Window");return f={allowTaint:($A=i.allowTaint)!==null&&$A!==void 0?$A:!1,imageTimeout:(OA=i.imageTimeout)!==null&&OA!==void 0?OA:15e3,proxy:i.proxy,useCORS:(ue=i.useCORS)!==null&&ue!==void 0?ue:!1},p=o({logging:(Ee=i.logging)!==null&&Ee!==void 0?Ee:!0,cache:i.cache},f),C={windowWidth:(_e=i.windowWidth)!==null&&_e!==void 0?_e:l.innerWidth,windowHeight:(qA=i.windowHeight)!==null&&qA!==void 0?qA:l.innerHeight,scrollX:(pe=i.scrollX)!==null&&pe!==void 0?pe:l.pageXOffset,scrollY:(bt=i.scrollY)!==null&&bt!==void 0?bt:l.pageYOffset},Q=new h(C.scrollX,C.scrollY,C.windowWidth,C.windowHeight),E=new pE(p,Q),N=(Fe=i.foreignObjectRendering)!==null&&Fe!==void 0?Fe:!1,K={allowTaint:(Ue=i.allowTaint)!==null&&Ue!==void 0?Ue:!1,onclone:i.onclone,ignoreElements:i.ignoreElements,inlineImages:N,copyStyles:N},E.logger.debug("Starting document clone with size "+Q.width+"x"+Q.height+" scrolled to "+-Q.left+","+-Q.top),X=new ou(E,s,K),j=X.clonedReferenceElement,j?[4,X.toIFrame(u,Q)]:[2,Promise.reject("Unable to find element in cloned iframe")];case 1:return CA=dt.sent(),BA=Xi(j)||CQ(j)?B(j.ownerDocument):g(E,j),wA=BA.width,RA=BA.height,DA=BA.left,_A=BA.top,te=CE(E,j,i.backgroundColor),XA={canvas:i.canvas,backgroundColor:te,scale:(je=(Rt=i.scale)!==null&&Rt!==void 0?Rt:l.devicePixelRatio)!==null&&je!==void 0?je:1,x:((It=i.x)!==null&&It!==void 0?It:0)+DA,y:((Vt=i.y)!==null&&Vt!==void 0?Vt:0)+_A,width:(Pt=i.width)!==null&&Pt!==void 0?Pt:Math.ceil(wA),height:(ut=i.height)!==null&&ut!==void 0?ut:Math.ceil(RA)},N?(E.logger.debug("Document cloned, using foreign object rendering"),zA=new gE(E,XA),[4,zA.render(j)]):[3,3];case 2:return kA=dt.sent(),[3,5];case 3:return E.logger.debug("Document cloned, element located at "+DA+","+_A+" with size "+wA+"x"+RA+" using computed rendering"),E.logger.debug("Starting DOM parsing"),FA=Pc(E,j),te===FA.styles.backgroundColor&&(FA.styles.backgroundColor=lt.TRANSPARENT),E.logger.debug("Starting renderer for element at "+XA.x+","+XA.y+" with size "+XA.width+"x"+XA.height),zA=new aE(E,XA),[4,zA.render(FA)];case 4:kA=dt.sent(),dt.label=5;case 5:return(!((Gt=i.removeContainer)!==null&&Gt!==void 0)||Gt)&&(ou.destroy(CA)||E.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore")),E.logger.debug("Finished rendering"),[2,kA]}})})},CE=function(s,i,u){var l=i.ownerDocument,f=l.documentElement?Xn(s,getComputedStyle(l.documentElement).backgroundColor):lt.TRANSPARENT,p=l.body?Xn(s,getComputedStyle(l.body).backgroundColor):lt.TRANSPARENT,C=typeof u=="string"?Xn(s,u):u===null?lt.TRANSPARENT:4294967295;return i===l.documentElement?Qt(f)?Qt(p)?C:p:f:C};return mE}))})),e0=os(A0(),1),t0=(0,r.defineComponent)({name:"DBiDesignContainer",__name:"biDesignContainer",props:{layout:{type:Array,default:()=>[]},indexPage:{type:Object,default:()=>({})},activedComponent:{type:Object,default:()=>({})},scale:{type:Number,default:1}},emits:["select","move"],setup(e,{emit:A}){const t=e,n=A,{apiUrl:o,token:a}=(0,Te.useAppInject)(),c=(0,r.computed)(()=>{const B={transform:`scale(${t.scale}, ${t.scale})`,transformOrigin:"left top",position:"relative",width:WA(t.indexPage.config.w||1920),height:WA(t.indexPage.config.h||1080),backgroundColor:t.indexPage.config.backgroundColor||"var(--j-color-bg-container)"};return t.indexPage.config.backgroundImage&&(B.background=`url(${o}/system/annexesfile/${t.indexPage.config.backgroundImage}?token=${a?.value}) 0% 0% / 100% 100% ${t.indexPage.config.backgroundColor||"var(--j-color-bg-container)"}`),B}),d=B=>{n("select",B)},h=B=>{n("move",B)},g=B=>{B?.target?.getAttribute("id")==="j-bi-design-container"&&n("select",t.indexPage)};return(B,w)=>{const m=(0,r.resolveComponent)("d-draggable");return(0,r.openBlock)(),(0,r.createElementBlock)("div",{onClick:(0,r.withModifiers)(g,["stop"]),id:"j-bi-design-container",style:(0,r.normalizeStyle)(c.value)},[((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(e.layout,(y,v)=>((0,r.openBlock)(),(0,r.createElementBlock)(r.Fragment,{key:y.id},[y.display?((0,r.openBlock)(),(0,r.createBlock)(m,{key:0,id:y.id,left:y.config.x,top:y.config.y,width:y.config.w,height:y.config.h,scale:1/e.scale,step:1/e.scale,"active-flag":y.id==e.activedComponent.id,readonly:y.lock,"data-id":y.id,onFocus:I=>d(y),onBlur:h,"z-index":e.layout.length-v,"is-active-bg-transparent":!0},{default:(0,r.withCtx)(()=>[((0,r.openBlock)(),(0,r.createBlock)((0,r.resolveDynamicComponent)(y.componentName),(0,r.mergeProps)({style:{width:(0,r.unref)(WA)(y.config.w),height:(0,r.unref)(WA)(y.config.h)}},{ref_for:!0},y.config,{"is-design":!0}),null,16,["style"]))]),_:2},1032,["id","left","top","width","height","scale","step","active-flag","readonly","data-id","onFocus","z-index"])):(0,r.createCommentVNode)("",!0)],64))),128))],4)}}}),Fl=t0,n0=(0,r.defineComponent)({name:"DBiViewer",__name:"biViewer",props:{layout:{type:Array,default:()=>[]},indexPage:{type:Object,default:()=>({})}},setup(e){const A=e,{apiUrl:t,token:n,httpGet:o,httpPost:a}=(0,Te.useAppInject)(),c=(0,r.computed)(()=>A.layout),d=(0,r.ref)(),h=(0,r.ref)(1),g=(0,r.ref)(1),B=()=>{d.value&&w(d.value.offsetWidth,d.value.offsetHeight)},w=(F,M)=>{const tA=A.indexPage.config?.w||1920,W=A.indexPage.config?.h||1080,aA=A.indexPage.config?.screenFit||"1";aA==="1"?(g.value=F/tA,h.value=g.value):aA==="2"?(h.value=M/W,g.value=h.value):aA==="3"&&(g.value=F/tA,h.value=M/W)},m=(0,r.computed)(()=>{const F={transform:`scale(${g.value}, ${h.value})`,transformOrigin:"left top",position:"relative",overflow:"hidden",width:WA(A.indexPage.config?.w||1920),height:WA(A.indexPage.config?.h||1080),backgroundColor:A.indexPage.config?.backgroundColor||"var(--j-color-bg-container)"};return A.indexPage.config?.backgroundImage&&(F.background=`url(${t}/system/annexesfile/${A.indexPage.config?.backgroundImage}?token=${n?.value}) 0% 0% / 100% 100% ${A.indexPage.config?.backgroundColor||"var(--j-color-bg-container)"}`),F}),y=(0,r.computed)(()=>({width:WA((A.indexPage.config?.w||1920)*g.value),height:WA((A.indexPage.config?.h||1080)*h.value)})),v={},I=(F,M)=>{F&&(v[M]=F)},L=new ResizeObserver(B);(0,r.onMounted)(()=>{L.observe(d.value)});const k=(F,M)=>{V(M,{params:F})},V=async(F,M)=>{if(F&&F.trim()){F=`async (jcode) => {${F}}`;const{res:tA,msg:W,fn:aA}=(0,Te.getFunction)(F)}};return(0,r.provide)("jcode_bi_viewer",{executeEvent:V}),(F,M)=>((0,r.openBlock)(),(0,r.createElementBlock)("div",{class:"j-block",style:(0,r.normalizeStyle)({"overflow-y":!e.indexPage.config?.screenFit||e.indexPage.config?.screenFit=="1"?"auto":"hidden","overflow-x":e.indexPage.config?.screenFit=="2"?"auto":"hidden"}),ref_key:"biViewer",ref:d},[(0,r.createElementVNode)("div",{style:(0,r.normalizeStyle)(y.value)},[(0,r.createElementVNode)("div",{style:(0,r.normalizeStyle)(m.value)},[((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(c.value,(tA,W)=>(0,r.withDirectives)(((0,r.openBlock)(),(0,r.createBlock)((0,r.resolveDynamicComponent)(tA.componentName),(0,r.mergeProps)({key:tA.id,ref_for:!0,ref:aA=>I(aA,tA.id),style:{position:"absolute",width:(0,r.unref)(WA)(tA.config.w),height:(0,r.unref)(WA)(tA.config.h),top:(0,r.unref)(WA)(tA.config.y),left:(0,r.unref)(WA)(tA.config.x),zIndex:e.layout.length-W}},{ref_for:!0},tA.config,{onClick:aA=>k(aA,tA.config.clickevent)}),null,16,["style","onClick"])),[[r.vShow,tA.display!==!1]])),128))],4)],4)],4))}}),Ul=n0,r0={class:"j-bi-design"},o0={class:"j-bi-design-left"},i0={style:{padding:"0 4px"}},s0=["onClick"],a0={class:"j-bi-design-left2"},l0={key:0,class:"j-block",style:{"padding-top":"28px"}},c0={class:"search-input-wraper"},u0=["onClick","data-id"],d0={class:"j-bi-design-layer-item-img"},f0=["src"],g0={class:"j-bi-design-layer-item-btns"},h0=["onClick"],B0=["onClick"],p0=["onClick"],m0=["onDragend"],w0={class:"component-item2-text"},C0=["src"],y0={class:"j-bi-design-right"},v0={class:"j-bi-design-title"},Q0={class:"j-bi-design-panel"},E0=(0,r.defineComponent)({name:"DBiDesign",__name:"biDesign",props:{components:{type:Array,default:()=>[]},componentConfigs:{type:Object,default:()=>({})},componentInit:Function,componentConfigInit:Function,componentConfigChange:Function,imgUrlPrefix:{type:String,default:"/"},scale:{type:Number,default:-1}},emits:["update:scale"],setup(e,{expose:A,emit:t}){const{t:n}=(0,Te.useAppInject)(),o=e,a=t,c=(0,r.ref)({name:"页面",id:"indexPage",type:"indexPage",layerId:"0",config:{},display:!0,lock:!1,componentName:""});o.componentInit&&(c.value.config=o.componentInit("indexPage")||{},c.value.config.id="indexPage");const d=(0,r.computed)(()=>{const sA={};return o.components.forEach(pA=>{pA.children.forEach(NA=>{sA[NA.type]=NA})}),sA}),h=(0,r.ref)(0),g=(0,r.ref)(),B=(0,r.ref)([]),w=(0,r.ref)(!1),m=(0,r.ref)(0),y=(0,r.ref)(0),v=(0,r.ref)(""),I=(0,r.computed)(()=>v.value===""?{}:B.value.find(sA=>sA.id===v.value)),L=()=>{w.value=!1,v.value=""},k=sA=>{sA.target.className.indexOf("j-bi-design-contentmenu__btn")===-1&&L(),window.removeEventListener("mousedown",k)},V=sA=>{let{target:pA}=sA,NA=!1;pA.className.indexOf&&pA.className.indexOf("d-draggable__mask")>-1?(pA=pA.parentNode.parentNode,NA=!0):pA.className.indexOf&&pA.className.indexOf("j-bi-design-layer-item")>-1?NA=!0:pA.parentNode.className.indexOf&&pA.parentNode.className.indexOf("j-bi-design-layer-item")>-1?(pA=pA.parentNode,NA=!0):pA.parentNode.parentNode.className.indexOf("j-bi-design-layer-item")>-1&&(pA=pA.parentNode.parentNode,NA=!0),NA&&(sA.preventDefault(),sA.stopPropagation(),m.value=sA.clientX,y.value=sA.clientY-8,y.value+260>document.body.clientHeight&&(y.value=document.body.clientHeight-260),v.value=pA.getAttribute("data-id"),w.value=!0,window.addEventListener("mousedown",k))},F=(0,r.ref)(""),M=(0,r.computed)(()=>F.value?B.value.filter(sA=>sA.config.label.indexOf(F.value)>-1):B.value),tA=sA=>{sA.display=!sA.display,L()},W=sA=>{sA.lock=!sA.lock,L(),sA.lock&&sA.id===g.value?.id&&iA(c.value)},aA=(sA,pA)=>{if(!pA||B.value.length<1){L();return}const NA=B.value.findIndex(MA=>MA.id===pA.id);switch(sA){case"up":if(NA===-1||NA===0)break;B.value=dA(B.value,NA,NA-1);break;case"down":if(NA===-1||NA===B.value.length-1)break;B.value=dA(B.value,NA,NA+1);break;case"top":if(NA!==-1){const[MA]=B.value.splice(NA,1);B.value.unshift(MA)}break;case"bottom":if(NA!==-1){const[MA]=B.value.splice(NA,1);B.value.push(MA)}break}L()},dA=(sA,pA,NA)=>{const MA=sA[pA];return sA[pA]=sA[NA],sA[NA]=MA,sA},rA=(0,r.ref)(),oA=(0,r.ref)(20),AA=(0,r.ref)(document.body.clientWidth),O=(0,r.ref)(document.body.clientHeight),lA=(0,r.ref)(0),_=(0,r.ref)(0),Z=(0,r.ref)({bgColor:"rgba(225,225,225, 0)",longfgColor:"rgba(0, 0, 0, 0.45)",shortfgColor:"rgba(0, 0, 0, 0.45)",fontColor:"rgba(0, 0, 0, 0.65)",shadowColor:"rgba(225,225,225, 0)",lineColor:"var(--j-color-primary)",borderColor:"#d9d9d9",cornerActiveColor:"var(--j-color-primary)"}),U=(0,r.computed)(()=>({x:0,y:0,width:AA.value,height:O.value})),x=(0,r.ref)({h:[],v:[]}),G=(0,r.ref)(),R=(0,r.ref)(),$=(0,r.ref)(!1),J=(0,r.ref)({}),nA=(0,r.ref)(100),hA=(0,r.computed)({set(sA){nA.value=sA,a("update:scale",sA)},get(){let{scale:sA}=o;return sA===-1&&(sA=nA.value),sA/100}}),UA=(0,r.computed)(()=>(c.value.config.h||1080)*2),eA=(0,r.computed)(()=>(c.value.config.w||1920)*2),uA=()=>{rA.value&&(AA.value=rA.value.offsetWidth-oA.value,O.value=rA.value.offsetHeight-oA.value,G.value.scrollLeft=eA.value/2-oA.value,G.value.scrollTop=UA.value/2-oA.value,Y())},Y=()=>{const sA=c.value.config.w||1920;AA.value<sA&&(hA.value=AA.value*100/sA)},cA=()=>{document.onkeydown=sA=>{if(sA.target?.nodeName==="TEXTAREA"||sA.target?.nodeName==="INPUT")return;const pA=sA.keyCode||sA.which;pA===32&&(sA.preventDefault(),J.value.space=!0),pA===17&&(sA.preventDefault(),J.value.ctrl=!0)},document.onkeyup=()=>{J.value={}}},mA=sA=>{J.value.space&&($.value=!0,window.stardragEvent=sA,window.startSlideX=G.value.scrollLeft,window.startSlideY=G.value.scrollTop,document.onmousemove=pA=>{if($.value){const NA=pA.clientX-window.stardragEvent.clientX,MA=pA.clientY-window.stardragEvent.clientY;G.value.scrollLeft=window.startSlideX-NA,G.value.scrollTop=window.startSlideY-MA}},document.onmouseup=()=>{document.onmousemove=null,document.onmouseup=null,$.value=!1})},yA=()=>{const sA=G.value.getBoundingClientRect(),pA=R.value.getBoundingClientRect(),NA=hA.value,MA=(sA.left+oA.value-pA.left)/NA,it=(sA.top+oA.value-pA.top)/NA;lA.value=MA>>0,_.value=it>>0},IA=sA=>{if(sA.preventDefault(),sA.ctrlKey||sA.metaKey){const pA=hA.value;hA.value=parseFloat(Math.max(.2,pA-sA.deltaY/500).toFixed(2))*100,pA!==hA.value&&(0,r.nextTick)(()=>{yA()})}},fA=(0,r.ref)(),vA=(0,r.computed)(()=>g.value?`【${g.value.name}】`:""),S={};Object.keys(o.componentConfigs).forEach(sA=>{const pA=[{id:"id",type:"j-input",config:{label:"ID",readonly:!0}},{id:"label",type:"j-input",config:{label:"名称"}}],NA=[{id:"w",type:"j-number",config:{label:"宽度",min:0}},{id:"h",type:"j-number",config:{label:"高度",min:0}},{id:"x",type:"j-number",config:{label:"x轴",min:0}},{id:"y",type:"j-number",config:{label:"y轴",min:0}}],MA={type:"j-collapse",config:{defaultValue:[]},children:[]};sA!=="indexPage"&&MA.children?.push({config:{label:"基础信息"},children:[...pA]}),MA.children?.push(...o.componentConfigs[sA]),sA!=="indexPage"?(MA.children?.push({config:{label:"大小定位"},children:[...NA]}),MA.config?.defaultValue.push("_collapse0","_collapse1")):MA.children&&MA.children.length>0&&MA.config?.defaultValue.push("_collapse0"),S[sA]=[MA]});const H=()=>{if(g.value){const sA=S[g.value.type];sA?fA.value.init(sA,g.value.config):fA.value.init([]),o.componentConfigInit&&o.componentConfigInit(g.value.type,{configRef:fA,components:B.value,configData:g.value.config})}else fA.value.init([])},T=(sA,pA)=>{g.value&&o.componentConfigChange&&(g.value.id==="indexPage"&&(sA.id==="w"||sA.id==="h")&&(0,r.nextTick)(()=>{uA()}),o.componentConfigChange(g.value.type,{configRef:fA,component:sA,configData:g.value.config,...pA}))},D=sA=>o.componentInit?o.componentInit(sA)||{}:{},b=(sA,pA,NA)=>{const MA={name:sA.name,id:gt(),type:sA.type,layerId:"0",config:D(sA.type),display:!0,lock:!1,componentName:sA.componentName};MA.config.id=MA.id,MA.config.label=sA.name,MA.config.h=sA.h||100,MA.config.w=sA.w||100,MA.config.x=pA,MA.config.y=NA,B.value.unshift(MA),g.value=MA,H()},z=(sA,pA)=>{const NA=document.getElementById("j-bi-design-container").getBoundingClientRect(),MA=sA.clientX-NA.left,it=sA.clientY-NA.top;b(pA,MA/hA.value-pA.w/2,it/hA.value-pA.h/2)},P=sA=>{B.value=B.value.filter(pA=>pA.id!==sA),g.value.id===sA&&(g.value=c.value,H()),L()},gA=sA=>{const pA=pn(sA),NA=gt();pA.id=NA,pA.config.id=NA,B.value.push(pA),g.value=pA,H(),L()},iA=sA=>{g.value?.id!==sA.id&&(g.value=sA,H())},SA=({left:sA,top:pA,width:NA,height:MA})=>{g.value&&(g.value.config.x=sA,g.value.config.y=pA,g.value.config.w=NA,g.value.config.h=MA,fA.value.setFormData({main:{x:sA,y:pA,w:NA,h:MA}}))},xA=new ResizeObserver(uA);(0,r.onMounted)(()=>{xA.observe(rA.value),cA(),iA(c.value)});const KA=()=>({ver:"1.0.0",components:pn(B.value),page:c.value}),ne=sA=>{sA.components?.forEach(pA=>{pA.componentName=d.value[pA.type].componentName}),B.value=sA.components||[],c.value=sA.page||c.value,iA(c.value)},YA=()=>{B.value=[],iA(c.value)},PA=()=>new Promise(sA=>{(0,e0.default)(R.value,{useCORS:!0,backgroundColor:null,allowTaint:!0}).then(pA=>{if(pA.width!==0&&pA.height!==0){sA(pA.toDataURL("image/png"));return}sA("")})}),Re=(0,r.ref)(),ve=(0,r.ref)({});return A({clear:YA,setData:ne,getData:KA,getImg:PA,preview:()=>{ve.value=KA(),Re.value.open("大屏预览","full")}}),(sA,pA)=>{const NA=(0,r.resolveComponent)("el-divider"),MA=(0,r.resolveComponent)("j-icon"),it=(0,r.resolveComponent)("el-button"),Mn=(0,r.resolveComponent)("el-input"),Tt=(0,r.resolveComponent)("el-text"),kt=(0,r.resolveComponent)("el-space"),On=(0,r.resolveComponent)("j-form"),tn=(0,r.resolveComponent)("j-layer");return(0,r.openBlock)(),(0,r.createElementBlock)("div",r0,[w.value?((0,r.openBlock)(),(0,r.createElementBlock)("div",{key:0,class:"j-bi-design-contentmenu",style:(0,r.normalizeStyle)({left:m.value+"px",top:y.value+"px"})},[(0,r.createElementVNode)("div",{class:"item j-bi-design-contentmenu__btn",onClick:pA[0]||(pA[0]=GA=>gA(I.value))},(0,r.toDisplayString)((0,r.unref)(n)("复制")),1),(0,r.createElementVNode)("div",{class:"item j-bi-design-contentmenu__btn",onClick:pA[1]||(pA[1]=GA=>tA(I.value))},(0,r.toDisplayString)(I.value&&I.value.display?"隐藏":"显示"),1),(0,r.createElementVNode)("div",{class:"item j-bi-design-contentmenu__btn",onClick:pA[2]||(pA[2]=GA=>W(I.value))},(0,r.toDisplayString)(I.value&&I.value.lock?"解锁":"锁定"),1),(0,r.createElementVNode)("div",{class:"item j-bi-design-contentmenu__btn",onClick:pA[3]||(pA[3]=GA=>aA("top",I.value))},(0,r.toDisplayString)((0,r.unref)(n)("置顶图层")),1),(0,r.createElementVNode)("div",{class:"item j-bi-design-contentmenu__btn",onClick:pA[4]||(pA[4]=GA=>aA("bottom",I.value))},(0,r.toDisplayString)((0,r.unref)(n)("置底图层")),1),(0,r.createElementVNode)("div",{class:"item j-bi-design-contentmenu__btn",onClick:pA[5]||(pA[5]=GA=>aA("up",I.value))},(0,r.toDisplayString)((0,r.unref)(n)("上移一层")),1),(0,r.createElementVNode)("div",{class:"item j-bi-design-contentmenu__btn",onClick:pA[6]||(pA[6]=GA=>aA("down",I.value))},(0,r.toDisplayString)((0,r.unref)(n)("下移一层")),1),(0,r.createVNode)(NA,{style:{margin:"4px 0"}}),(0,r.createElementVNode)("div",{class:"item j-bi-design-contentmenu__btn",style:{color:"var(--j-color-danger)"},onClick:pA[7]||(pA[7]=GA=>P(I.value?.id))},(0,r.toDisplayString)((0,r.unref)(n)("删除")),1)],4)):(0,r.createCommentVNode)("",!0),(0,r.createElementVNode)("div",o0,[(0,r.createElementVNode)("div",{onClick:pA[8]||(pA[8]=(0,r.withModifiers)(GA=>h.value=-1,["stop"])),class:(0,r.normalizeClass)(["component-item",{active:h.value==-1}])},[(0,r.createVNode)(MA,{size:24,icon:"mdi:bookmark-box-multiple-outline"}),(0,r.createElementVNode)("span",null,(0,r.toDisplayString)((0,r.unref)(n)("图层")),1)],2),(0,r.createElementVNode)("div",i0,[(0,r.createVNode)(NA)]),((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(e.components,(GA,Ve)=>((0,r.openBlock)(),(0,r.createElementBlock)("div",{key:Ve,onClick:(0,r.withModifiers)(st=>h.value=Ve,["stop"]),class:(0,r.normalizeClass)(["component-item",{active:h.value==Ve}])},[(0,r.createVNode)(MA,{size:24,icon:GA.icon},null,8,["icon"]),(0,r.createElementVNode)("span",null,(0,r.toDisplayString)((0,r.unref)(n)(GA.name)),1)],10,s0))),128))]),(0,r.createElementVNode)("div",a0,[h.value==-1?((0,r.openBlock)(),(0,r.createElementBlock)("div",l0,[(0,r.createElementVNode)("div",c0,[(0,r.createVNode)(Mn,{modelValue:F.value,"onUpdate:modelValue":pA[9]||(pA[9]=GA=>F.value=GA),class:"search-input",placeholder:"搜索图层"},{append:(0,r.withCtx)(()=>[(0,r.createVNode)(it,null,{icon:(0,r.withCtx)(()=>[(0,r.createVNode)(MA,{icon:"ep:search"})]),_:1})]),_:1},8,["modelValue"])]),(0,r.createElementVNode)("div",{class:"j-block",style:{"padding-top":"8px",overflow:"auto"},onContextmenu:(0,r.withModifiers)(V,["prevent"])},[((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(M.value,(GA,Ve)=>((0,r.openBlock)(),(0,r.createElementBlock)("div",{key:Ve},[(0,r.createElementVNode)("div",{class:(0,r.normalizeClass)(["j-bi-design-layer-item",{active:g.value.id==GA.id}]),onClick:(0,r.withModifiers)(st=>iA(GA),["stop"]),"data-id":GA.id},[(0,r.createElementVNode)("div",d0,[(0,r.createElementVNode)("img",{style:{height:"100%"},src:`${e.imgUrlPrefix}${d.value[GA.type].img}`},null,8,f0)]),(0,r.createVNode)(Tt,{truncated:""},{default:(0,r.withCtx)(()=>[(0,r.createTextVNode)((0,r.toDisplayString)((0,r.unref)(n)(GA.config.label)),1)]),_:2},1024),(0,r.createElementVNode)("div",g0,[(0,r.createVNode)(kt,{size:2},{default:(0,r.withCtx)(()=>[(0,r.createElementVNode)("div",{class:(0,r.normalizeClass)(["j-bi-design-layer-item-btn",{active:!GA.display}]),onClick:(0,r.withModifiers)(st=>tA(GA),["stop"])},[(0,r.createVNode)(MA,{icon:"mdi:eye-off-outline"})],10,h0),(0,r.createElementVNode)("div",{class:(0,r.normalizeClass)(["j-bi-design-layer-item-btn",{active:GA.lock}]),onClick:(0,r.withModifiers)(st=>W(GA),["stop"])},[(0,r.createVNode)(MA,{icon:"mdi:lock-outline"})],10,B0)]),_:2},1024)])],10,u0)]))),128))],32)])):e.components[h.value]?((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,{key:1},(0,r.renderList)(e.components[h.value].children,(GA,Ve)=>((0,r.openBlock)(),(0,r.createElementBlock)("div",{key:Ve,onClick:st=>b(GA,0,0)},[(0,r.createElementVNode)("div",{class:"component-item2",onDragend:st=>z(st,GA),draggable:"true"},[(0,r.createElementVNode)("div",w0,[(0,r.createVNode)(Tt,{truncated:""},{default:(0,r.withCtx)(()=>[(0,r.createTextVNode)((0,r.toDisplayString)((0,r.unref)(n)(GA.name)),1)]),_:2},1024)]),(0,r.createElementVNode)("img",{class:"component-item2-img",src:`${e.imgUrlPrefix}${GA.img}`},null,8,C0)],40,m0)],8,p0))),128)):(0,r.createCommentVNode)("",!0)]),(0,r.createElementVNode)("div",{class:"j-bi-design-mid",ref_key:"contentRef",ref:rA},[((0,r.openBlock)(),(0,r.createBlock)((0,r.unref)(qw),{key:hA.value,thick:oA.value,scale:hA.value,width:AA.value,height:O.value,"start-x":lA.value,"start-y":_.value,palette:Z.value,shadow:U.value,"hor-line-arr":x.value.h,"ver-line-arr":x.value.v},null,8,["thick","scale","width","height","start-x","start-y","palette","shadow","hor-line-arr","ver-line-arr"])),(0,r.createElementVNode)("div",{ref_key:"screensRef",ref:G,class:"j-bi-design-main",style:(0,r.normalizeStyle)({cursor:$.value?"pointer":""}),onMousedown:(0,r.withModifiers)(mA,["stop"]),onWheel:IA,onScroll:yA},[(0,r.createElementVNode)("div",{class:"screen-container",style:(0,r.normalizeStyle)({height:UA.value+"px",width:eA.value+"px"}),onClick:pA[10]||(pA[10]=(0,r.withModifiers)(GA=>iA(c.value),["stop"]))},[(0,r.createElementVNode)("div",{ref_key:"canvasRef",ref:R,class:"canvas",onContextmenu:(0,r.withModifiers)(V,["prevent"])},[(0,r.createVNode)(Fl,{layout:B.value,"index-page":c.value,"actived-component":g.value,scale:hA.value,onSelect:iA,onMove:SA},null,8,["layout","index-page","actived-component","scale"])],544)],4)],36)],512),(0,r.createElementVNode)("div",y0,[(0,r.createElementVNode)("div",v0,[(0,r.createVNode)(Tt,{truncated:"",style:{margin:"0","font-size":"14px"}},{default:(0,r.withCtx)(()=>[(0,r.createTextVNode)((0,r.toDisplayString)(`${(0,r.unref)(n)("属性配置")}${vA.value} `),1)]),_:1})]),(0,r.createElementVNode)("div",Q0,[(0,r.createVNode)(On,{config:{labelPosition:"top",size:"small"},style:{padding:"0"},ref_key:"configRef",ref:fA,onChange:T},null,512)])]),(0,r.createVNode)(tn,{ref_key:"previewFormLayerRef",ref:Re,destroyOnClose:!0,hasHeader:!1},{default:(0,r.withCtx)(()=>[(0,r.createVNode)(Ul,{indexPage:ve.value.page,layout:ve.value.components},null,8,["indexPage","layout"])]),_:1},512)])}}}),F0=E0,bl=ft(F0,[Fl,Ul]),U0=[ls,So,xo,Do,No,rl,ol,dl,fl,wl,Ql,bl],Il=new WeakSet,b0=e=>{Il.has(e)||(Il.add(e),U0.forEach(A=>{const t=A.name;t&&e.component(t,A)}))},I0={install:b0};oe.DBiDesign=bl,oe.DDrag=ls,oe.DDraggable=fl,oe.DFlowDesign=rl,oe.DFormDesign=wl,oe.DIndexDesign=Ql,oe.DInputFlow=ol,oe.DLayout=dl,oe.default=I0,oe.dragContainer=xo,oe.dragFormList=Do,oe.dragIndexList=No,oe.dragTool=So,oe.toFormDesignSchema=hl,oe.toFormSaveSchema=Vr,oe.toFormSchema=gl});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@a2simcode/dui",
3
- "version": "0.0.36",
3
+ "version": "0.0.37",
4
4
  "description": "A Vue 3 DUI Component Library - 独立可发布的 DUI 组件子集",
5
5
  "type": "module",
6
6
  "main": "./dist/dui.umd.js",