gp-designer 1.0.67 → 1.0.68
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.
package/dist/gp-designer.es.js
CHANGED
@@ -17482,7 +17482,7 @@ function _U(A, e, t, r, n, s) {
|
|
17482
17482
|
}, null, 4)
|
17483
17483
|
]);
|
17484
17484
|
}
|
17485
|
-
const xo = /* @__PURE__ */ ot(vU, [["render", _U], ["__scopeId", "data-v-
|
17485
|
+
const xo = /* @__PURE__ */ ot(vU, [["render", _U], ["__scopeId", "data-v-e1815181"]]), yU = { class: "flex gp-dsigner" }, SU = {
|
17486
17486
|
key: 0,
|
17487
17487
|
class: "flex items-center justify-between border-b"
|
17488
17488
|
}, LU = { class: "text-lg font-bold p-2" }, xU = { class: "text-sm font-thin text-gray-500" }, HU = { class: "flex-1 overflow-auto" }, NU = {
|
package/dist/gp-designer.umd.js
CHANGED
@@ -36,4 +36,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
36
36
|
content: "" !important;
|
37
37
|
display: none !important;
|
38
38
|
}`,ib=function(A){ub(A,"."+ci+ab+Dl+`
|
39
|
-
.`+li+sb+Dl)},ub=function(A,e){var t=A.ownerDocument;if(t){var r=t.createElement("style");r.textContent=e,A.appendChild(r)}},Ol=function(){function A(){}return A.getOrigin=function(e){var t=A._link;return t?(t.href=e,t.href=t.href,t.protocol+t.hostname+t.port):"about:blank"},A.isSameOrigin=function(e){return A.getOrigin(e)===A._origin},A.setContext=function(e){A._link=e.document.createElement("a"),A._origin=A.getOrigin(e.location.href)},A._origin="about:blank",A}(),ob=function(){function A(e,t){this.context=e,this._options=t,this._cache={}}return A.prototype.addImage=function(e){var t=Promise.resolve();return this.has(e)||(hi(e)||hb(e))&&(this._cache[e]=this.loadImage(e)).catch(function(){}),t},A.prototype.match=function(e){return this._cache[e]},A.prototype.loadImage=function(e){return VA(this,void 0,void 0,function(){var t,r,n,a,s=this;return kA(this,function(u){switch(u.label){case 0:return t=Ol.isSameOrigin(e),r=!fi(e)&&this._options.useCORS===!0&&RA.SUPPORT_CORS_IMAGES&&!t,n=!fi(e)&&!t&&!hi(e)&&typeof this._options.proxy=="string"&&RA.SUPPORT_CORS_XHR&&!r,!t&&this._options.allowTaint===!1&&!fi(e)&&!hi(e)&&!n&&!r?[2]:(a=e,n?[4,this.proxy(a)]:[3,2]);case 1:a=u.sent(),u.label=2;case 2:return this.context.logger.debug("Added image "+e.substring(0,256)),[4,new Promise(function(o,l){var f=new Image;f.onload=function(){return o(f)},f.onerror=l,(db(a)||r)&&(f.crossOrigin="anonymous"),f.src=a,f.complete===!0&&setTimeout(function(){return o(f)},500),s._options.imageTimeout>0&&setTimeout(function(){return l("Timed out ("+s._options.imageTimeout+"ms) loading image")},s._options.imageTimeout)})];case 3:return[2,u.sent()]}})})},A.prototype.has=function(e){return typeof this._cache[e]<"u"},A.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},A.prototype.proxy=function(e){var t=this,r=this._options.proxy;if(!r)throw new Error("No proxy defined");var n=e.substring(0,256);return new Promise(function(a,s){var u=RA.SUPPORT_RESPONSE_TYPE?"blob":"text",o=new XMLHttpRequest;o.onload=function(){if(o.status===200)if(u==="text")a(o.response);else{var h=new FileReader;h.addEventListener("load",function(){return a(h.result)},!1),h.addEventListener("error",function(d){return s(d)},!1),h.readAsDataURL(o.response)}else s("Failed to proxy resource "+n+" with status code "+o.status)},o.onerror=s;var l=r.indexOf("?")>-1?"&":"?";if(o.open("GET",""+r+l+"url="+encodeURIComponent(e)+"&responseType="+u),u!=="text"&&o instanceof XMLHttpRequest&&(o.responseType=u),t._options.imageTimeout){var f=t._options.imageTimeout;o.timeout=f,o.ontimeout=function(){return s("Timed out ("+f+"ms) proxying "+n)}}o.send()})},A}(),cb=/^data:image\/svg\+xml/i,lb=/^data:image\/.*;base64,/i,fb=/^data:image\/.*/i,hb=function(A){return RA.SUPPORT_SVG_DRAWING||!Bb(A)},fi=function(A){return fb.test(A)},db=function(A){return lb.test(A)},hi=function(A){return A.substr(0,4)==="blob"},Bb=function(A){return A.substr(-3).toLowerCase()==="svg"||cb.test(A)},O=function(){function A(e,t){this.type=0,this.x=e,this.y=t}return A.prototype.add=function(e,t){return new A(this.x+e,this.y+t)},A}(),Dt=function(A,e,t){return new O(A.x+(e.x-A.x)*t,A.y+(e.y-A.y)*t)},ea=function(){function A(e,t,r,n){this.type=1,this.start=e,this.startControl=t,this.endControl=r,this.end=n}return A.prototype.subdivide=function(e,t){var r=Dt(this.start,this.startControl,e),n=Dt(this.startControl,this.endControl,e),a=Dt(this.endControl,this.end,e),s=Dt(r,n,e),u=Dt(n,a,e),o=Dt(s,u,e);return t?new A(this.start,r,s,o):new A(o,u,a,this.end)},A.prototype.add=function(e,t){return new A(this.start.add(e,t),this.startControl.add(e,t),this.endControl.add(e,t),this.end.add(e,t))},A.prototype.reverse=function(){return new A(this.end,this.endControl,this.startControl,this.start)},A}(),ue=function(A){return A.type===1},gb=function(){function A(e){var t=e.styles,r=e.bounds,n=Qr(t.borderTopLeftRadius,r.width,r.height),a=n[0],s=n[1],u=Qr(t.borderTopRightRadius,r.width,r.height),o=u[0],l=u[1],f=Qr(t.borderBottomRightRadius,r.width,r.height),h=f[0],d=f[1],C=Qr(t.borderBottomLeftRadius,r.width,r.height),p=C[0],T=C[1],U=[];U.push((a+o)/r.width),U.push((p+h)/r.width),U.push((s+T)/r.height),U.push((l+d)/r.height);var _=Math.max.apply(Math,U);_>1&&(a/=_,s/=_,o/=_,l/=_,h/=_,d/=_,p/=_,T/=_);var I=r.width-o,D=r.height-d,k=r.width-h,x=r.height-T,m=t.borderTopWidth,H=t.borderRightWidth,P=t.borderBottomWidth,M=t.borderLeftWidth,eA=lA(t.paddingTop,e.bounds.width),uA=lA(t.paddingRight,e.bounds.width),fA=lA(t.paddingBottom,e.bounds.width),J=lA(t.paddingLeft,e.bounds.width);this.topLeftBorderDoubleOuterBox=a>0||s>0?EA(r.left+M/3,r.top+m/3,a-M/3,s-m/3,aA.TOP_LEFT):new O(r.left+M/3,r.top+m/3),this.topRightBorderDoubleOuterBox=a>0||s>0?EA(r.left+I,r.top+m/3,o-H/3,l-m/3,aA.TOP_RIGHT):new O(r.left+r.width-H/3,r.top+m/3),this.bottomRightBorderDoubleOuterBox=h>0||d>0?EA(r.left+k,r.top+D,h-H/3,d-P/3,aA.BOTTOM_RIGHT):new O(r.left+r.width-H/3,r.top+r.height-P/3),this.bottomLeftBorderDoubleOuterBox=p>0||T>0?EA(r.left+M/3,r.top+x,p-M/3,T-P/3,aA.BOTTOM_LEFT):new O(r.left+M/3,r.top+r.height-P/3),this.topLeftBorderDoubleInnerBox=a>0||s>0?EA(r.left+M*2/3,r.top+m*2/3,a-M*2/3,s-m*2/3,aA.TOP_LEFT):new O(r.left+M*2/3,r.top+m*2/3),this.topRightBorderDoubleInnerBox=a>0||s>0?EA(r.left+I,r.top+m*2/3,o-H*2/3,l-m*2/3,aA.TOP_RIGHT):new O(r.left+r.width-H*2/3,r.top+m*2/3),this.bottomRightBorderDoubleInnerBox=h>0||d>0?EA(r.left+k,r.top+D,h-H*2/3,d-P*2/3,aA.BOTTOM_RIGHT):new O(r.left+r.width-H*2/3,r.top+r.height-P*2/3),this.bottomLeftBorderDoubleInnerBox=p>0||T>0?EA(r.left+M*2/3,r.top+x,p-M*2/3,T-P*2/3,aA.BOTTOM_LEFT):new O(r.left+M*2/3,r.top+r.height-P*2/3),this.topLeftBorderStroke=a>0||s>0?EA(r.left+M/2,r.top+m/2,a-M/2,s-m/2,aA.TOP_LEFT):new O(r.left+M/2,r.top+m/2),this.topRightBorderStroke=a>0||s>0?EA(r.left+I,r.top+m/2,o-H/2,l-m/2,aA.TOP_RIGHT):new O(r.left+r.width-H/2,r.top+m/2),this.bottomRightBorderStroke=h>0||d>0?EA(r.left+k,r.top+D,h-H/2,d-P/2,aA.BOTTOM_RIGHT):new O(r.left+r.width-H/2,r.top+r.height-P/2),this.bottomLeftBorderStroke=p>0||T>0?EA(r.left+M/2,r.top+x,p-M/2,T-P/2,aA.BOTTOM_LEFT):new O(r.left+M/2,r.top+r.height-P/2),this.topLeftBorderBox=a>0||s>0?EA(r.left,r.top,a,s,aA.TOP_LEFT):new O(r.left,r.top),this.topRightBorderBox=o>0||l>0?EA(r.left+I,r.top,o,l,aA.TOP_RIGHT):new O(r.left+r.width,r.top),this.bottomRightBorderBox=h>0||d>0?EA(r.left+k,r.top+D,h,d,aA.BOTTOM_RIGHT):new O(r.left+r.width,r.top+r.height),this.bottomLeftBorderBox=p>0||T>0?EA(r.left,r.top+x,p,T,aA.BOTTOM_LEFT):new O(r.left,r.top+r.height),this.topLeftPaddingBox=a>0||s>0?EA(r.left+M,r.top+m,Math.max(0,a-M),Math.max(0,s-m),aA.TOP_LEFT):new O(r.left+M,r.top+m),this.topRightPaddingBox=o>0||l>0?EA(r.left+Math.min(I,r.width-H),r.top+m,I>r.width+H?0:Math.max(0,o-H),Math.max(0,l-m),aA.TOP_RIGHT):new O(r.left+r.width-H,r.top+m),this.bottomRightPaddingBox=h>0||d>0?EA(r.left+Math.min(k,r.width-M),r.top+Math.min(D,r.height-P),Math.max(0,h-H),Math.max(0,d-P),aA.BOTTOM_RIGHT):new O(r.left+r.width-H,r.top+r.height-P),this.bottomLeftPaddingBox=p>0||T>0?EA(r.left+M,r.top+Math.min(x,r.height-P),Math.max(0,p-M),Math.max(0,T-P),aA.BOTTOM_LEFT):new O(r.left+M,r.top+r.height-P),this.topLeftContentBox=a>0||s>0?EA(r.left+M+J,r.top+m+eA,Math.max(0,a-(M+J)),Math.max(0,s-(m+eA)),aA.TOP_LEFT):new O(r.left+M+J,r.top+m+eA),this.topRightContentBox=o>0||l>0?EA(r.left+Math.min(I,r.width+M+J),r.top+m+eA,I>r.width+M+J?0:o-M+J,l-(m+eA),aA.TOP_RIGHT):new O(r.left+r.width-(H+uA),r.top+m+eA),this.bottomRightContentBox=h>0||d>0?EA(r.left+Math.min(k,r.width-(M+J)),r.top+Math.min(D,r.height+m+eA),Math.max(0,h-(H+uA)),d-(P+fA),aA.BOTTOM_RIGHT):new O(r.left+r.width-(H+uA),r.top+r.height-(P+fA)),this.bottomLeftContentBox=p>0||T>0?EA(r.left+M+J,r.top+x,Math.max(0,p-(M+J)),T-(P+fA),aA.BOTTOM_LEFT):new O(r.left+M+J,r.top+r.height-(P+fA))}return A}(),aA;(function(A){A[A.TOP_LEFT=0]="TOP_LEFT",A[A.TOP_RIGHT=1]="TOP_RIGHT",A[A.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",A[A.BOTTOM_LEFT=3]="BOTTOM_LEFT"})(aA||(aA={}));var EA=function(A,e,t,r,n){var a=4*((Math.sqrt(2)-1)/3),s=t*a,u=r*a,o=A+t,l=e+r;switch(n){case aA.TOP_LEFT:return new ea(new O(A,l),new O(A,l-u),new O(o-s,e),new O(o,e));case aA.TOP_RIGHT:return new ea(new O(A,e),new O(A+s,e),new O(o,l-u),new O(o,l));case aA.BOTTOM_RIGHT:return new ea(new O(o,e),new O(o,e+u),new O(A+s,l),new O(A,l));case aA.BOTTOM_LEFT:default:return new ea(new O(o,l),new O(o-s,l),new O(A,e+u),new O(A,e))}},ta=function(A){return[A.topLeftBorderBox,A.topRightBorderBox,A.bottomRightBorderBox,A.bottomLeftBorderBox]},Eb=function(A){return[A.topLeftContentBox,A.topRightContentBox,A.bottomRightContentBox,A.bottomLeftContentBox]},ra=function(A){return[A.topLeftPaddingBox,A.topRightPaddingBox,A.bottomRightPaddingBox,A.bottomLeftPaddingBox]},mb=function(){function A(e,t,r){this.offsetX=e,this.offsetY=t,this.matrix=r,this.type=0,this.target=6}return A}(),na=function(){function A(e,t){this.path=e,this.target=t,this.type=1}return A}(),pb=function(){function A(e){this.opacity=e,this.type=2,this.target=6}return A}(),Cb=function(A){return A.type===0},Rl=function(A){return A.type===1},wb=function(A){return A.type===2},Ml=function(A,e){return A.length===e.length?A.some(function(t,r){return t===e[r]}):!1},Tb=function(A,e,t,r,n){return A.map(function(a,s){switch(s){case 0:return a.add(e,t);case 1:return a.add(e+r,t);case 2:return a.add(e+r,t+n);case 3:return a.add(e,t+n)}return a})},kl=function(){function A(e){this.element=e,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}return A}(),Pl=function(){function A(e,t){if(this.container=e,this.parent=t,this.effects=[],this.curves=new gb(this.container),this.container.styles.opacity<1&&this.effects.push(new pb(this.container.styles.opacity)),this.container.styles.transform!==null){var r=this.container.bounds.left+this.container.styles.transformOrigin[0].number,n=this.container.bounds.top+this.container.styles.transformOrigin[1].number,a=this.container.styles.transform;this.effects.push(new mb(r,n,a))}if(this.container.styles.overflowX!==0){var s=ta(this.curves),u=ra(this.curves);Ml(s,u)?this.effects.push(new na(s,6)):(this.effects.push(new na(s,2)),this.effects.push(new na(u,4)))}}return A.prototype.getEffects=function(e){for(var t=[2,3].indexOf(this.container.styles.position)===-1,r=this.parent,n=this.effects.slice(0);r;){var a=r.effects.filter(function(o){return!Rl(o)});if(t||r.container.styles.position!==0||!r.parent){if(n.unshift.apply(n,a),t=[2,3].indexOf(r.container.styles.position)===-1,r.container.styles.overflowX!==0){var s=ta(r.curves),u=ra(r.curves);Ml(s,u)||n.unshift(new na(u,6))}}else n.unshift.apply(n,a);r=r.parent}return n.filter(function(o){return FA(o.target,e)})},A}(),di=function(A,e,t,r){A.container.elements.forEach(function(n){var a=FA(n.flags,4),s=FA(n.flags,2),u=new Pl(n,A);FA(n.styles.display,2048)&&r.push(u);var o=FA(n.flags,8)?[]:r;if(a||s){var l=a||n.styles.isPositioned()?t:e,f=new kl(u);if(n.styles.isPositioned()||n.styles.opacity<1||n.styles.isTransformed()){var h=n.styles.zIndex.order;if(h<0){var d=0;l.negativeZIndex.some(function(p,T){return h>p.element.container.styles.zIndex.order?(d=T,!1):d>0}),l.negativeZIndex.splice(d,0,f)}else if(h>0){var C=0;l.positiveZIndex.some(function(p,T){return h>=p.element.container.styles.zIndex.order?(C=T+1,!1):C>0}),l.positiveZIndex.splice(C,0,f)}else l.zeroOrAutoZIndexOrTransformedOrOpacity.push(f)}else n.styles.isFloating()?l.nonPositionedFloats.push(f):l.nonPositionedInlineLevel.push(f);di(u,f,a?f:t,o)}else n.styles.isInlineLevel()?e.inlineLevel.push(u):e.nonInlineLevel.push(u),di(u,e,t,o);FA(n.flags,8)&&Kl(n,o)})},Kl=function(A,e){for(var t=A instanceof ri?A.start:1,r=A instanceof ri?A.reversed:!1,n=0;n<e.length;n++){var a=e[n];a.container instanceof hl&&typeof a.container.value=="number"&&a.container.value!==0&&(t=a.container.value),a.listValue=Sr(t,a.container.styles.listStyleType,!0),t+=r?-1:1}},bb=function(A){var e=new Pl(A,null),t=new kl(e),r=[];return di(e,t,t,r),Kl(e.container,r),t},Vl=function(A,e){switch(e){case 0:return oe(A.topLeftBorderBox,A.topLeftPaddingBox,A.topRightBorderBox,A.topRightPaddingBox);case 1:return oe(A.topRightBorderBox,A.topRightPaddingBox,A.bottomRightBorderBox,A.bottomRightPaddingBox);case 2:return oe(A.bottomRightBorderBox,A.bottomRightPaddingBox,A.bottomLeftBorderBox,A.bottomLeftPaddingBox);case 3:default:return oe(A.bottomLeftBorderBox,A.bottomLeftPaddingBox,A.topLeftBorderBox,A.topLeftPaddingBox)}},Ub=function(A,e){switch(e){case 0:return oe(A.topLeftBorderBox,A.topLeftBorderDoubleOuterBox,A.topRightBorderBox,A.topRightBorderDoubleOuterBox);case 1:return oe(A.topRightBorderBox,A.topRightBorderDoubleOuterBox,A.bottomRightBorderBox,A.bottomRightBorderDoubleOuterBox);case 2:return oe(A.bottomRightBorderBox,A.bottomRightBorderDoubleOuterBox,A.bottomLeftBorderBox,A.bottomLeftBorderDoubleOuterBox);case 3:default:return oe(A.bottomLeftBorderBox,A.bottomLeftBorderDoubleOuterBox,A.topLeftBorderBox,A.topLeftBorderDoubleOuterBox)}},Qb=function(A,e){switch(e){case 0:return oe(A.topLeftBorderDoubleInnerBox,A.topLeftPaddingBox,A.topRightBorderDoubleInnerBox,A.topRightPaddingBox);case 1:return oe(A.topRightBorderDoubleInnerBox,A.topRightPaddingBox,A.bottomRightBorderDoubleInnerBox,A.bottomRightPaddingBox);case 2:return oe(A.bottomRightBorderDoubleInnerBox,A.bottomRightPaddingBox,A.bottomLeftBorderDoubleInnerBox,A.bottomLeftPaddingBox);case 3:default:return oe(A.bottomLeftBorderDoubleInnerBox,A.bottomLeftPaddingBox,A.topLeftBorderDoubleInnerBox,A.topLeftPaddingBox)}},Fb=function(A,e){switch(e){case 0:return aa(A.topLeftBorderStroke,A.topRightBorderStroke);case 1:return aa(A.topRightBorderStroke,A.bottomRightBorderStroke);case 2:return aa(A.bottomRightBorderStroke,A.bottomLeftBorderStroke);case 3:default:return aa(A.bottomLeftBorderStroke,A.topLeftBorderStroke)}},aa=function(A,e){var t=[];return ue(A)?t.push(A.subdivide(.5,!1)):t.push(A),ue(e)?t.push(e.subdivide(.5,!0)):t.push(e),t},oe=function(A,e,t,r){var n=[];return ue(A)?n.push(A.subdivide(.5,!1)):n.push(A),ue(t)?n.push(t.subdivide(.5,!0)):n.push(t),ue(r)?n.push(r.subdivide(.5,!0).reverse()):n.push(r),ue(e)?n.push(e.subdivide(.5,!1).reverse()):n.push(e),n},Gl=function(A){var e=A.bounds,t=A.styles;return e.add(t.borderLeftWidth,t.borderTopWidth,-(t.borderRightWidth+t.borderLeftWidth),-(t.borderTopWidth+t.borderBottomWidth))},sa=function(A){var e=A.styles,t=A.bounds,r=lA(e.paddingLeft,t.width),n=lA(e.paddingRight,t.width),a=lA(e.paddingTop,t.width),s=lA(e.paddingBottom,t.width);return t.add(r+e.borderLeftWidth,a+e.borderTopWidth,-(e.borderRightWidth+e.borderLeftWidth+r+n),-(e.borderTopWidth+e.borderBottomWidth+a+s))},Ib=function(A,e){return A===0?e.bounds:A===2?sa(e):Gl(e)},_b=function(A,e){return A===0?e.bounds:A===2?sa(e):Gl(e)},Bi=function(A,e,t){var r=Ib(Rt(A.styles.backgroundOrigin,e),A),n=_b(Rt(A.styles.backgroundClip,e),A),a=yb(Rt(A.styles.backgroundSize,e),t,r),s=a[0],u=a[1],o=Qr(Rt(A.styles.backgroundPosition,e),r.width-s,r.height-u),l=Nb(Rt(A.styles.backgroundRepeat,e),o,a,r,n),f=Math.round(r.left+o[0]),h=Math.round(r.top+o[1]);return[l,f,h,s,u]},Ot=function(A){return iA(A)&&A.value===vt.AUTO},ia=function(A){return typeof A=="number"},yb=function(A,e,t){var r=e[0],n=e[1],a=e[2],s=A[0],u=A[1];if(!s)return[0,0];if(UA(s)&&u&&UA(u))return[lA(s,t.width),lA(u,t.height)];var o=ia(a);if(iA(s)&&(s.value===vt.CONTAIN||s.value===vt.COVER)){if(ia(a)){var l=t.width/t.height;return l<a!=(s.value===vt.COVER)?[t.width,t.width/a]:[t.height*a,t.height]}return[t.width,t.height]}var f=ia(r),h=ia(n),d=f||h;if(Ot(s)&&(!u||Ot(u))){if(f&&h)return[r,n];if(!o&&!d)return[t.width,t.height];if(d&&o){var C=f?r:n*a,p=h?n:r/a;return[C,p]}var T=f?r:t.width,U=h?n:t.height;return[T,U]}if(o){var _=0,I=0;return UA(s)?_=lA(s,t.width):UA(u)&&(I=lA(u,t.height)),Ot(s)?_=I*a:(!u||Ot(u))&&(I=_/a),[_,I]}var D=null,k=null;if(UA(s)?D=lA(s,t.width):u&&UA(u)&&(k=lA(u,t.height)),D!==null&&(!u||Ot(u))&&(k=f&&h?D/r*n:t.height),k!==null&&Ot(s)&&(D=f&&h?k/n*r:t.width),D!==null&&k!==null)return[D,k];throw new Error("Unable to calculate background-size for element")},Rt=function(A,e){var t=A[e];return typeof t>"u"?A[0]:t},Nb=function(A,e,t,r,n){var a=e[0],s=e[1],u=t[0],o=t[1];switch(A){case 2:return[new O(Math.round(r.left),Math.round(r.top+s)),new O(Math.round(r.left+r.width),Math.round(r.top+s)),new O(Math.round(r.left+r.width),Math.round(o+r.top+s)),new O(Math.round(r.left),Math.round(o+r.top+s))];case 3:return[new O(Math.round(r.left+a),Math.round(r.top)),new O(Math.round(r.left+a+u),Math.round(r.top)),new O(Math.round(r.left+a+u),Math.round(r.height+r.top)),new O(Math.round(r.left+a),Math.round(r.height+r.top))];case 1:return[new O(Math.round(r.left+a),Math.round(r.top+s)),new O(Math.round(r.left+a+u),Math.round(r.top+s)),new O(Math.round(r.left+a+u),Math.round(r.top+s+o)),new O(Math.round(r.left+a),Math.round(r.top+s+o))];default:return[new O(Math.round(n.left),Math.round(n.top)),new O(Math.round(n.left+n.width),Math.round(n.top)),new O(Math.round(n.left+n.width),Math.round(n.height+n.top)),new O(Math.round(n.left),Math.round(n.height+n.top))]}},Sb="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",Yl="Hidden Text",vb=function(){function A(e){this._data={},this._document=e}return A.prototype.parseMetrics=function(e,t){var r=this._document.createElement("div"),n=this._document.createElement("img"),a=this._document.createElement("span"),s=this._document.body;r.style.visibility="hidden",r.style.fontFamily=e,r.style.fontSize=t,r.style.margin="0",r.style.padding="0",r.style.whiteSpace="nowrap",s.appendChild(r),n.src=Sb,n.width=1,n.height=1,n.style.margin="0",n.style.padding="0",n.style.verticalAlign="baseline",a.style.fontFamily=e,a.style.fontSize=t,a.style.margin="0",a.style.padding="0",a.appendChild(this._document.createTextNode(Yl)),r.appendChild(a),r.appendChild(n);var u=n.offsetTop-a.offsetTop+2;r.removeChild(a),r.appendChild(this._document.createTextNode(Yl)),r.style.lineHeight="normal",n.style.verticalAlign="super";var o=n.offsetTop-r.offsetTop+2;return s.removeChild(r),{baseline:u,middle:o}},A.prototype.getMetrics=function(e,t){var r=e+" "+t;return typeof this._data[r]>"u"&&(this._data[r]=this.parseMetrics(e,t)),this._data[r]},A}(),Xl=function(){function A(e,t){this.context=e,this.options=t}return A}(),Lb=1e4,xb=function(A){he(e,A);function e(t,r){var n=A.call(this,t,r)||this;return n._activeEffects=[],n.canvas=r.canvas?r.canvas:document.createElement("canvas"),n.ctx=n.canvas.getContext("2d"),r.canvas||(n.canvas.width=Math.floor(r.width*r.scale),n.canvas.height=Math.floor(r.height*r.scale),n.canvas.style.width=r.width+"px",n.canvas.style.height=r.height+"px"),n.fontMetrics=new vb(document),n.ctx.scale(n.options.scale,n.options.scale),n.ctx.translate(-r.x,-r.y),n.ctx.textBaseline="bottom",n._activeEffects=[],n.context.logger.debug("Canvas renderer initialized ("+r.width+"x"+r.height+") with scale "+r.scale),n}return e.prototype.applyEffects=function(t){for(var r=this;this._activeEffects.length;)this.popEffect();t.forEach(function(n){return r.applyEffect(n)})},e.prototype.applyEffect=function(t){this.ctx.save(),wb(t)&&(this.ctx.globalAlpha=t.opacity),Cb(t)&&(this.ctx.translate(t.offsetX,t.offsetY),this.ctx.transform(t.matrix[0],t.matrix[1],t.matrix[2],t.matrix[3],t.matrix[4],t.matrix[5]),this.ctx.translate(-t.offsetX,-t.offsetY)),Rl(t)&&(this.path(t.path),this.ctx.clip()),this._activeEffects.push(t)},e.prototype.popEffect=function(){this._activeEffects.pop(),this.ctx.restore()},e.prototype.renderStack=function(t){return VA(this,void 0,void 0,function(){var r;return kA(this,function(n){switch(n.label){case 0:return r=t.element.container.styles,r.isVisible()?[4,this.renderStackContent(t)]:[3,2];case 1:n.sent(),n.label=2;case 2:return[2]}})})},e.prototype.renderNode=function(t){return VA(this,void 0,void 0,function(){return kA(this,function(r){switch(r.label){case 0:if(FA(t.container.flags,16))debugger;return t.container.styles.isVisible()?[4,this.renderNodeBackgroundAndBorders(t)]:[3,3];case 1:return r.sent(),[4,this.renderNodeContent(t)];case 2:r.sent(),r.label=3;case 3:return[2]}})})},e.prototype.renderTextWithLetterSpacing=function(t,r,n){var a=this;if(r===0)this.ctx.fillText(t.text,t.bounds.left,t.bounds.top+n);else{var s=ti(t.text);s.reduce(function(u,o){return a.ctx.fillText(o,u,t.bounds.top+n),u+a.ctx.measureText(o).width},t.bounds.left)}},e.prototype.createFontStyle=function(t){var r=t.fontVariant.filter(function(s){return s==="normal"||s==="small-caps"}).join(""),n=Mb(t.fontFamily).join(", "),a=Ur(t.fontSize)?""+t.fontSize.number+t.fontSize.unit:t.fontSize.number+"px";return[[t.fontStyle,r,t.fontWeight,a,n].join(" "),n,a]},e.prototype.renderTextNode=function(t,r){return VA(this,void 0,void 0,function(){var n,a,s,u,o,l,f,h,d=this;return kA(this,function(C){return n=this.createFontStyle(r),a=n[0],s=n[1],u=n[2],this.ctx.font=a,this.ctx.direction=r.direction===1?"rtl":"ltr",this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic",o=this.fontMetrics.getMetrics(s,u),l=o.baseline,f=o.middle,h=r.paintOrder,t.textBounds.forEach(function(p){h.forEach(function(T){switch(T){case 0:d.ctx.fillStyle=LA(r.color),d.renderTextWithLetterSpacing(p,r.letterSpacing,l);var U=r.textShadow;U.length&&p.text.trim().length&&(U.slice(0).reverse().forEach(function(_){d.ctx.shadowColor=LA(_.color),d.ctx.shadowOffsetX=_.offsetX.number*d.options.scale,d.ctx.shadowOffsetY=_.offsetY.number*d.options.scale,d.ctx.shadowBlur=_.blur.number,d.renderTextWithLetterSpacing(p,r.letterSpacing,l)}),d.ctx.shadowColor="",d.ctx.shadowOffsetX=0,d.ctx.shadowOffsetY=0,d.ctx.shadowBlur=0),r.textDecorationLine.length&&(d.ctx.fillStyle=LA(r.textDecorationColor||r.color),r.textDecorationLine.forEach(function(_){switch(_){case 1:d.ctx.fillRect(p.bounds.left,Math.round(p.bounds.top+l),p.bounds.width,1);break;case 2:d.ctx.fillRect(p.bounds.left,Math.round(p.bounds.top),p.bounds.width,1);break;case 3:d.ctx.fillRect(p.bounds.left,Math.ceil(p.bounds.top+f),p.bounds.width,1);break}}));break;case 1:r.webkitTextStrokeWidth&&p.text.trim().length&&(d.ctx.strokeStyle=LA(r.webkitTextStrokeColor),d.ctx.lineWidth=r.webkitTextStrokeWidth,d.ctx.lineJoin=window.chrome?"miter":"round",d.ctx.strokeText(p.text,p.bounds.left,p.bounds.top+l)),d.ctx.strokeStyle="",d.ctx.lineWidth=0,d.ctx.lineJoin="miter";break}})}),[2]})})},e.prototype.renderReplacedElement=function(t,r,n){if(n&&t.intrinsicWidth>0&&t.intrinsicHeight>0){var a=sa(t),s=ra(r);this.path(s),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(n,0,0,t.intrinsicWidth,t.intrinsicHeight,a.left,a.top,a.width,a.height),this.ctx.restore()}},e.prototype.renderNodeContent=function(t){return VA(this,void 0,void 0,function(){var r,n,a,s,u,o,I,I,l,f,h,d,k,C,p,x,T,U,_,I,D,k,x;return kA(this,function(m){switch(m.label){case 0:this.applyEffects(t.getEffects(4)),r=t.container,n=t.curves,a=r.styles,s=0,u=r.textNodes,m.label=1;case 1:return s<u.length?(o=u[s],[4,this.renderTextNode(o,a)]):[3,4];case 2:m.sent(),m.label=3;case 3:return s++,[3,1];case 4:if(!(r instanceof cl))return[3,8];m.label=5;case 5:return m.trys.push([5,7,,8]),[4,this.context.cache.match(r.src)];case 6:return I=m.sent(),this.renderReplacedElement(r,n,I),[3,8];case 7:return m.sent(),this.context.logger.error("Error loading image "+r.src),[3,8];case 8:if(r instanceof ll&&this.renderReplacedElement(r,n,r.canvas),!(r instanceof fl))return[3,12];m.label=9;case 9:return m.trys.push([9,11,,12]),[4,this.context.cache.match(r.svg)];case 10:return I=m.sent(),this.renderReplacedElement(r,n,I),[3,12];case 11:return m.sent(),this.context.logger.error("Error loading svg "+r.svg.substring(0,255)),[3,12];case 12:return r instanceof El&&r.tree?(l=new e(this.context,{scale:this.options.scale,backgroundColor:r.backgroundColor,x:0,y:0,width:r.width,height:r.height}),[4,l.render(r.tree)]):[3,14];case 13:f=m.sent(),r.width&&r.height&&this.ctx.drawImage(f,0,0,r.width,r.height,r.bounds.left,r.bounds.top,r.bounds.width,r.bounds.height),m.label=14;case 14:if(r instanceof ni&&(h=Math.min(r.bounds.width,r.bounds.height),r.type===qn?r.checked&&(this.ctx.save(),this.path([new O(r.bounds.left+h*.39363,r.bounds.top+h*.79),new O(r.bounds.left+h*.16,r.bounds.top+h*.5549),new O(r.bounds.left+h*.27347,r.bounds.top+h*.44071),new O(r.bounds.left+h*.39694,r.bounds.top+h*.5649),new O(r.bounds.left+h*.72983,r.bounds.top+h*.23),new O(r.bounds.left+h*.84,r.bounds.top+h*.34085),new O(r.bounds.left+h*.39363,r.bounds.top+h*.79)]),this.ctx.fillStyle=LA(dl),this.ctx.fill(),this.ctx.restore()):r.type===jn&&r.checked&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(r.bounds.left+h/2,r.bounds.top+h/2,h/4,0,Math.PI*2,!0),this.ctx.fillStyle=LA(dl),this.ctx.fill(),this.ctx.restore())),Hb(r)&&r.value.length){switch(d=this.createFontStyle(a),k=d[0],C=d[1],p=this.fontMetrics.getMetrics(k,C).baseline,this.ctx.font=k,this.ctx.fillStyle=LA(a.color),this.ctx.textBaseline="alphabetic",this.ctx.textAlign=Ob(r.styles.textAlign),x=sa(r),T=0,r.styles.textAlign){case 1:T+=x.width/2;break;case 2:T+=x.width;break}U=x.add(T,0,0,-x.height/2+1),this.ctx.save(),this.path([new O(x.left,x.top),new O(x.left+x.width,x.top),new O(x.left+x.width,x.top+x.height),new O(x.left,x.top+x.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new yr(r.value,U),a.letterSpacing,p),this.ctx.restore(),this.ctx.textBaseline="alphabetic",this.ctx.textAlign="left"}if(!FA(r.styles.display,2048))return[3,20];if(r.styles.listStyleImage===null)return[3,19];if(_=r.styles.listStyleImage,_.type!==0)return[3,18];I=void 0,D=_.url,m.label=15;case 15:return m.trys.push([15,17,,18]),[4,this.context.cache.match(D)];case 16:return I=m.sent(),this.ctx.drawImage(I,r.bounds.left-(I.width+10),r.bounds.top),[3,18];case 17:return m.sent(),this.context.logger.error("Error loading list-style-image "+D),[3,18];case 18:return[3,20];case 19:t.listValue&&r.styles.listStyleType!==-1&&(k=this.createFontStyle(a)[0],this.ctx.font=k,this.ctx.fillStyle=LA(a.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",x=new Fe(r.bounds.left,r.bounds.top+lA(r.styles.paddingTop,r.bounds.width),r.bounds.width,Yc(a.lineHeight,a.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new yr(t.listValue,x),a.letterSpacing,Yc(a.lineHeight,a.fontSize.number)/2+2),this.ctx.textBaseline="bottom",this.ctx.textAlign="left"),m.label=20;case 20:return[2]}})})},e.prototype.renderStackContent=function(t){return VA(this,void 0,void 0,function(){var r,n,_,a,s,_,u,o,_,l,f,_,h,d,_,C,p,_,T,U,_;return kA(this,function(I){switch(I.label){case 0:if(FA(t.element.container.flags,16))debugger;return[4,this.renderNodeBackgroundAndBorders(t.element)];case 1:I.sent(),r=0,n=t.negativeZIndex,I.label=2;case 2:return r<n.length?(_=n[r],[4,this.renderStack(_)]):[3,5];case 3:I.sent(),I.label=4;case 4:return r++,[3,2];case 5:return[4,this.renderNodeContent(t.element)];case 6:I.sent(),a=0,s=t.nonInlineLevel,I.label=7;case 7:return a<s.length?(_=s[a],[4,this.renderNode(_)]):[3,10];case 8:I.sent(),I.label=9;case 9:return a++,[3,7];case 10:u=0,o=t.nonPositionedFloats,I.label=11;case 11:return u<o.length?(_=o[u],[4,this.renderStack(_)]):[3,14];case 12:I.sent(),I.label=13;case 13:return u++,[3,11];case 14:l=0,f=t.nonPositionedInlineLevel,I.label=15;case 15:return l<f.length?(_=f[l],[4,this.renderStack(_)]):[3,18];case 16:I.sent(),I.label=17;case 17:return l++,[3,15];case 18:h=0,d=t.inlineLevel,I.label=19;case 19:return h<d.length?(_=d[h],[4,this.renderNode(_)]):[3,22];case 20:I.sent(),I.label=21;case 21:return h++,[3,19];case 22:C=0,p=t.zeroOrAutoZIndexOrTransformedOrOpacity,I.label=23;case 23:return C<p.length?(_=p[C],[4,this.renderStack(_)]):[3,26];case 24:I.sent(),I.label=25;case 25:return C++,[3,23];case 26:T=0,U=t.positiveZIndex,I.label=27;case 27:return T<U.length?(_=U[T],[4,this.renderStack(_)]):[3,30];case 28:I.sent(),I.label=29;case 29:return T++,[3,27];case 30:return[2]}})})},e.prototype.mask=function(t){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(t.slice(0).reverse()),this.ctx.closePath()},e.prototype.path=function(t){this.ctx.beginPath(),this.formatPath(t),this.ctx.closePath()},e.prototype.formatPath=function(t){var r=this;t.forEach(function(n,a){var s=ue(n)?n.start:n;a===0?r.ctx.moveTo(s.x,s.y):r.ctx.lineTo(s.x,s.y),ue(n)&&r.ctx.bezierCurveTo(n.startControl.x,n.startControl.y,n.endControl.x,n.endControl.y,n.end.x,n.end.y)})},e.prototype.renderRepeat=function(t,r,n,a){this.path(t),this.ctx.fillStyle=r,this.ctx.translate(n,a),this.ctx.fill(),this.ctx.translate(-n,-a)},e.prototype.resizeImage=function(t,r,n){var a;if(t.width===r&&t.height===n)return t;var s=(a=this.canvas.ownerDocument)!==null&&a!==void 0?a:document,u=s.createElement("canvas");u.width=Math.max(1,r),u.height=Math.max(1,n);var o=u.getContext("2d");return o.drawImage(t,0,0,t.width,t.height,0,0,r,n),u},e.prototype.renderBackgroundImage=function(t){return VA(this,void 0,void 0,function(){var r,n,a,s,u,o;return kA(this,function(l){switch(l.label){case 0:r=t.styles.backgroundImage.length-1,n=function(f){var h,d,C,eA,hA,pA,J,rA,P,p,eA,hA,pA,J,rA,T,U,_,I,D,k,x,m,H,P,M,eA,uA,fA,J,rA,oA,hA,pA,GA,IA,KA,xA,ZA,_A,S,v;return kA(this,function(q){switch(q.label){case 0:if(f.type!==0)return[3,5];h=void 0,d=f.url,q.label=1;case 1:return q.trys.push([1,3,,4]),[4,a.context.cache.match(d)];case 2:return h=q.sent(),[3,4];case 3:return q.sent(),a.context.logger.error("Error loading background-image "+d),[3,4];case 4:return h&&(C=Bi(t,r,[h.width,h.height,h.width/h.height]),eA=C[0],hA=C[1],pA=C[2],J=C[3],rA=C[4],P=a.ctx.createPattern(a.resizeImage(h,J,rA),"repeat"),a.renderRepeat(eA,P,hA,pA)),[3,6];case 5:C1(f)?(p=Bi(t,r,[null,null,null]),eA=p[0],hA=p[1],pA=p[2],J=p[3],rA=p[4],T=B1(f.angle,J,rA),U=T[0],_=T[1],I=T[2],D=T[3],k=T[4],x=document.createElement("canvas"),x.width=J,x.height=rA,m=x.getContext("2d"),H=m.createLinearGradient(_,D,I,k),xc(f.stops,U).forEach(function($){return H.addColorStop($.stop,LA($.color))}),m.fillStyle=H,m.fillRect(0,0,J,rA),J>0&&rA>0&&(P=a.ctx.createPattern(x,"repeat"),a.renderRepeat(eA,P,hA,pA))):w1(f)&&(M=Bi(t,r,[null,null,null]),eA=M[0],uA=M[1],fA=M[2],J=M[3],rA=M[4],oA=f.position.length===0?[Ps]:f.position,hA=lA(oA[0],J),pA=lA(oA[oA.length-1],rA),GA=g1(f,hA,pA,J,rA),IA=GA[0],KA=GA[1],IA>0&&KA>0&&(xA=a.ctx.createRadialGradient(uA+hA,fA+pA,0,uA+hA,fA+pA,IA),xc(f.stops,IA*2).forEach(function($){return xA.addColorStop($.stop,LA($.color))}),a.path(eA),a.ctx.fillStyle=xA,IA!==KA?(ZA=t.bounds.left+.5*t.bounds.width,_A=t.bounds.top+.5*t.bounds.height,S=KA/IA,v=1/S,a.ctx.save(),a.ctx.translate(ZA,_A),a.ctx.transform(1,0,0,S,0,0),a.ctx.translate(-ZA,-_A),a.ctx.fillRect(uA,v*(fA-_A)+_A,J,rA*v),a.ctx.restore()):a.ctx.fill())),q.label=6;case 6:return r--,[2]}})},a=this,s=0,u=t.styles.backgroundImage.slice(0).reverse(),l.label=1;case 1:return s<u.length?(o=u[s],[5,n(o)]):[3,4];case 2:l.sent(),l.label=3;case 3:return s++,[3,1];case 4:return[2]}})})},e.prototype.renderSolidBorder=function(t,r,n){return VA(this,void 0,void 0,function(){return kA(this,function(a){return this.path(Vl(n,r)),this.ctx.fillStyle=LA(t),this.ctx.fill(),[2]})})},e.prototype.renderDoubleBorder=function(t,r,n,a){return VA(this,void 0,void 0,function(){var s,u;return kA(this,function(o){switch(o.label){case 0:return r<3?[4,this.renderSolidBorder(t,n,a)]:[3,2];case 1:return o.sent(),[2];case 2:return s=Ub(a,n),this.path(s),this.ctx.fillStyle=LA(t),this.ctx.fill(),u=Qb(a,n),this.path(u),this.ctx.fill(),[2]}})})},e.prototype.renderNodeBackgroundAndBorders=function(t){return VA(this,void 0,void 0,function(){var r,n,a,s,u,o,l,f,h=this;return kA(this,function(d){switch(d.label){case 0:return this.applyEffects(t.getEffects(2)),r=t.container.styles,n=!Xe(r.backgroundColor)||r.backgroundImage.length,a=[{style:r.borderTopStyle,color:r.borderTopColor,width:r.borderTopWidth},{style:r.borderRightStyle,color:r.borderRightColor,width:r.borderRightWidth},{style:r.borderBottomStyle,color:r.borderBottomColor,width:r.borderBottomWidth},{style:r.borderLeftStyle,color:r.borderLeftColor,width:r.borderLeftWidth}],s=Db(Rt(r.backgroundClip,0),t.curves),n||r.boxShadow.length?(this.ctx.save(),this.path(s),this.ctx.clip(),Xe(r.backgroundColor)||(this.ctx.fillStyle=LA(r.backgroundColor),this.ctx.fill()),[4,this.renderBackgroundImage(t.container)]):[3,2];case 1:d.sent(),this.ctx.restore(),r.boxShadow.slice(0).reverse().forEach(function(C){h.ctx.save();var p=ta(t.curves),T=C.inset?0:Lb,U=Tb(p,-T+(C.inset?1:-1)*C.spread.number,(C.inset?1:-1)*C.spread.number,C.spread.number*(C.inset?-2:2),C.spread.number*(C.inset?-2:2));C.inset?(h.path(p),h.ctx.clip(),h.mask(U)):(h.mask(p),h.ctx.clip(),h.path(U)),h.ctx.shadowOffsetX=C.offsetX.number+T,h.ctx.shadowOffsetY=C.offsetY.number,h.ctx.shadowColor=LA(C.color),h.ctx.shadowBlur=C.blur.number,h.ctx.fillStyle=C.inset?LA(C.color):"rgba(0,0,0,1)",h.ctx.fill(),h.ctx.restore()}),d.label=2;case 2:u=0,o=0,l=a,d.label=3;case 3:return o<l.length?(f=l[o],f.style!==0&&!Xe(f.color)&&f.width>0?f.style!==2?[3,5]:[4,this.renderDashedDottedBorder(f.color,f.width,u,t.curves,2)]:[3,11]):[3,13];case 4:return d.sent(),[3,11];case 5:return f.style!==3?[3,7]:[4,this.renderDashedDottedBorder(f.color,f.width,u,t.curves,3)];case 6:return d.sent(),[3,11];case 7:return f.style!==4?[3,9]:[4,this.renderDoubleBorder(f.color,f.width,u,t.curves)];case 8:return d.sent(),[3,11];case 9:return[4,this.renderSolidBorder(f.color,u,t.curves)];case 10:d.sent(),d.label=11;case 11:u++,d.label=12;case 12:return o++,[3,3];case 13:return[2]}})})},e.prototype.renderDashedDottedBorder=function(t,r,n,a,s){return VA(this,void 0,void 0,function(){var u,o,l,f,h,d,C,p,T,U,_,I,D,k,x,m,x,m;return kA(this,function(H){return this.ctx.save(),u=Fb(a,n),o=Vl(a,n),s===2&&(this.path(o),this.ctx.clip()),ue(o[0])?(l=o[0].start.x,f=o[0].start.y):(l=o[0].x,f=o[0].y),ue(o[1])?(h=o[1].end.x,d=o[1].end.y):(h=o[1].x,d=o[1].y),n===0||n===2?C=Math.abs(l-h):C=Math.abs(f-d),this.ctx.beginPath(),s===3?this.formatPath(u):this.formatPath(o.slice(0,2)),p=r<3?r*3:r*2,T=r<3?r*2:r,s===3&&(p=r,T=r),U=!0,C<=p*2?U=!1:C<=p*2+T?(_=C/(2*p+T),p*=_,T*=_):(I=Math.floor((C+T)/(p+T)),D=(C-I*p)/(I-1),k=(C-(I+1)*p)/I,T=k<=0||Math.abs(T-D)<Math.abs(T-k)?D:k),U&&(s===3?this.ctx.setLineDash([0,p+T]):this.ctx.setLineDash([p,T])),s===3?(this.ctx.lineCap="round",this.ctx.lineWidth=r):this.ctx.lineWidth=r*2+1.1,this.ctx.strokeStyle=LA(t),this.ctx.stroke(),this.ctx.setLineDash([]),s===2&&(ue(o[0])&&(x=o[3],m=o[0],this.ctx.beginPath(),this.formatPath([new O(x.end.x,x.end.y),new O(m.start.x,m.start.y)]),this.ctx.stroke()),ue(o[1])&&(x=o[1],m=o[2],this.ctx.beginPath(),this.formatPath([new O(x.end.x,x.end.y),new O(m.start.x,m.start.y)]),this.ctx.stroke())),this.ctx.restore(),[2]})})},e.prototype.render=function(t){return VA(this,void 0,void 0,function(){var r;return kA(this,function(n){switch(n.label){case 0:return this.options.backgroundColor&&(this.ctx.fillStyle=LA(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height)),r=bb(t),[4,this.renderStack(r)];case 1:return n.sent(),this.applyEffects([]),[2,this.canvas]}})})},e}(Xl),Hb=function(A){return A instanceof gl||A instanceof Bl?!0:A instanceof ni&&A.type!==jn&&A.type!==qn},Db=function(A,e){switch(A){case 0:return ta(e);case 2:return Eb(e);case 1:default:return ra(e)}},Ob=function(A){switch(A){case 1:return"center";case 2:return"right";case 0:default:return"left"}},Rb=["-apple-system","system-ui"],Mb=function(A){return/iPhone OS 15_(0|1)/.test(window.navigator.userAgent)?A.filter(function(e){return Rb.indexOf(e)===-1}):A},kb=function(A){he(e,A);function e(t,r){var n=A.call(this,t,r)||this;return n.canvas=r.canvas?r.canvas:document.createElement("canvas"),n.ctx=n.canvas.getContext("2d"),n.options=r,n.canvas.width=Math.floor(r.width*r.scale),n.canvas.height=Math.floor(r.height*r.scale),n.canvas.style.width=r.width+"px",n.canvas.style.height=r.height+"px",n.ctx.scale(n.options.scale,n.options.scale),n.ctx.translate(-r.x,-r.y),n.context.logger.debug("EXPERIMENTAL ForeignObject renderer initialized ("+r.width+"x"+r.height+" at "+r.x+","+r.y+") with scale "+r.scale),n}return e.prototype.render=function(t){return VA(this,void 0,void 0,function(){var r,n;return kA(this,function(a){switch(a.label){case 0:return r=ei(this.options.width*this.options.scale,this.options.height*this.options.scale,this.options.scale,this.options.scale,t),[4,Pb(r)];case 1:return n=a.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=LA(this.options.backgroundColor),this.ctx.fillRect(0,0,this.options.width*this.options.scale,this.options.height*this.options.scale)),this.ctx.drawImage(n,-this.options.x*this.options.scale,-this.options.y*this.options.scale),[2,this.canvas]}})})},e}(Xl),Pb=function(A){return new Promise(function(e,t){var r=new Image;r.onload=function(){e(r)},r.onerror=t,r.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(A))})},Kb=function(){function A(e){var t=e.id,r=e.enabled;this.id=t,this.enabled=r,this.start=Date.now()}return A.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.enabled&&(typeof window<"u"&&window.console&&typeof console.debug=="function"?console.debug.apply(console,Bn([this.id,this.getTime()+"ms"],e)):this.info.apply(this,e))},A.prototype.getTime=function(){return Date.now()-this.start},A.prototype.info=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.enabled&&typeof window<"u"&&window.console&&typeof console.info=="function"&&console.info.apply(console,Bn([this.id,this.getTime()+"ms"],e))},A.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.enabled&&(typeof window<"u"&&window.console&&typeof console.warn=="function"?console.warn.apply(console,Bn([this.id,this.getTime()+"ms"],e)):this.info.apply(this,e))},A.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.enabled&&(typeof window<"u"&&window.console&&typeof console.error=="function"?console.error.apply(console,Bn([this.id,this.getTime()+"ms"],e)):this.info.apply(this,e))},A.instances={},A}(),Vb=function(){function A(e,t){var r;this.windowBounds=t,this.instanceName="#"+A.instanceCount++,this.logger=new Kb({id:this.instanceName,enabled:e.logging}),this.cache=(r=e.cache)!==null&&r!==void 0?r:new ob(this,e)}return A.instanceCount=1,A}(),Gb=function(A,e){return e===void 0&&(e={}),Yb(A,e)};typeof window<"u"&&Ol.setContext(window);var Yb=function(A,e){return VA(void 0,void 0,void 0,function(){var t,r,n,a,s,u,o,l,f,h,d,C,p,T,U,_,I,D,k,x,H,m,H,P,M,eA,uA,fA,J,rA,oA,hA,pA,GA,IA,KA,xA,ZA,_A,S;return kA(this,function(v){switch(v.label){case 0:if(!A||typeof A!="object")return[2,Promise.reject("Invalid element provided as first argument")];if(t=A.ownerDocument,!t)throw new Error("Element is not attached to a Document");if(r=t.defaultView,!r)throw new Error("Document is not attached to a Window");return n={allowTaint:(P=e.allowTaint)!==null&&P!==void 0?P:!1,imageTimeout:(M=e.imageTimeout)!==null&&M!==void 0?M:15e3,proxy:e.proxy,useCORS:(eA=e.useCORS)!==null&&eA!==void 0?eA:!1},a=Cs({logging:(uA=e.logging)!==null&&uA!==void 0?uA:!0,cache:e.cache},n),s={windowWidth:(fA=e.windowWidth)!==null&&fA!==void 0?fA:r.innerWidth,windowHeight:(J=e.windowHeight)!==null&&J!==void 0?J:r.innerHeight,scrollX:(rA=e.scrollX)!==null&&rA!==void 0?rA:r.pageXOffset,scrollY:(oA=e.scrollY)!==null&&oA!==void 0?oA:r.pageYOffset},u=new Fe(s.scrollX,s.scrollY,s.windowWidth,s.windowHeight),o=new Vb(a,u),l=(hA=e.foreignObjectRendering)!==null&&hA!==void 0?hA:!1,f={allowTaint:(pA=e.allowTaint)!==null&&pA!==void 0?pA:!1,onclone:e.onclone,ignoreElements:e.ignoreElements,inlineImages:l,copyStyles:l},o.logger.debug("Starting document clone with size "+u.width+"x"+u.height+" scrolled to "+-u.left+","+-u.top),h=new Hl(o,A,f),d=h.clonedReferenceElement,d?[4,h.toIFrame(t,u)]:[2,Promise.reject("Unable to find element in cloned iframe")];case 1:return C=v.sent(),p=si(d)||XT(d)?Tp(d.ownerDocument):gn(o,d),T=p.width,U=p.height,_=p.left,I=p.top,D=Xb(o,d,e.backgroundColor),k={canvas:e.canvas,backgroundColor:D,scale:(IA=(GA=e.scale)!==null&&GA!==void 0?GA:r.devicePixelRatio)!==null&&IA!==void 0?IA:1,x:((KA=e.x)!==null&&KA!==void 0?KA:0)+_,y:((xA=e.y)!==null&&xA!==void 0?xA:0)+I,width:(ZA=e.width)!==null&&ZA!==void 0?ZA:Math.ceil(T),height:(_A=e.height)!==null&&_A!==void 0?_A:Math.ceil(U)},l?(o.logger.debug("Document cloned, using foreign object rendering"),H=new kb(o,k),[4,H.render(d)]):[3,3];case 2:return x=v.sent(),[3,5];case 3:return o.logger.debug("Document cloned, element located at "+_+","+I+" with size "+T+"x"+U+" using computed rendering"),o.logger.debug("Starting DOM parsing"),m=pl(o,d),D===m.styles.backgroundColor&&(m.styles.backgroundColor=_e.TRANSPARENT),o.logger.debug("Starting renderer for element at "+k.x+","+k.y+" with size "+k.width+"x"+k.height),H=new xb(o,k),[4,H.render(m)];case 4:x=v.sent(),v.label=5;case 5:return(!((S=e.removeContainer)!==null&&S!==void 0)||S)&&(Hl.destroy(C)||o.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore")),o.logger.debug("Finished rendering"),[2,x]}})})},Xb=function(A,e,t){var r=e.ownerDocument,n=r.documentElement?Fr(A,getComputedStyle(r.documentElement).backgroundColor):_e.TRANSPARENT,a=r.body?Fr(A,getComputedStyle(r.body).backgroundColor):_e.TRANSPARENT,s=typeof t=="string"?Fr(A,t):t===null?_e.TRANSPARENT:4294967295;return e===r.documentElement?Xe(n)?Xe(a)?s:a:n:s};const Wb=c.defineComponent({name:"GpIframe",props:{htmlContent:{type:String,required:!0},jsFiles:{type:Array,default:[]},cssFiles:{type:Array,default:[]},iframeStyle:{type:Object,default:()=>({width:"100%",height:"100%",border:"none"})}},setup(A){const e=c.ref(null),t=c.ref(),r=()=>{var C;const a=e.value;if(!a)return;const s=a.contentDocument||((C=a.contentWindow)==null?void 0:C.document);if(!s)return;s.open(),s.write("<!DOCTYPE html><html><head></head><body></body></html>"),s.close();const u=s.head;A.cssFiles.forEach(p=>{const T=s.createElement("link");T.rel="stylesheet",T.href=p,u.appendChild(T)});const o=s.createElement("link");o.rel="stylesheet",o.href="/spa/topic/css/style.css",u.appendChild(o);const l=s.createElement("script");l.src="/spa/topic/js/jquery-3.6.0.min.js",l.async=!1,u.appendChild(l);const f=s.createElement("script");f.src="/spa/topic/js/swiper-bundle.min.js",f.async=!1,u.appendChild(f);const h=s.createElement("script");h.src="/spa/topic/js/index.js",h.async=!1,u.appendChild(h);const d=s.body;d.innerHTML=A.htmlContent,A.jsFiles.forEach(p=>{const T=s.createElement("script");T.src=p,T.async=!1,d.appendChild(T)}),t.value=d,c.nextTick(()=>{})};c.watch(t,a=>{if(!a)return;new MutationObserver(()=>{const u=e.value;u&&(u.style.height=`${a.scrollHeight}px`)}).observe(a,{childList:!0,subtree:!0})});const n=async a=>{var l;const s=e.value;if(!s)return;const u=s.contentDocument||((l=s.contentWindow)==null?void 0:l.document);if(!u)return;const o=u.body;if(o)try{await c.nextTick();const f=await Gb(o,{x:0,y:0,scrollX:window.scrollX,scrollY:window.scrollY,useCORS:!0,allowTaint:!0,foreignObjectRendering:!1});a?a(f):f.toBlob(h=>{const d=URL.createObjectURL(h);window.open(d,"_blank")})}catch(f){console.error("截图生成失败:",f)}};return c.watch(()=>[A.htmlContent,A.jsFiles,A.cssFiles],r,{deep:!0}),c.onMounted(()=>{r()}),{iframeRef:e,generateCover:n}}});function Jb(A,e,t,r,n,a){return c.openBlock(),c.createElementBlock("div",null,[c.createElementVNode("iframe",{ref:"iframeRef",style:c.normalizeStyle([{"min-height":"600px"},A.iframeStyle])},null,4)])}const Wl=Oe(Wb,[["render",Jb],["__scopeId","data-v-e4f74412"]]),qb={class:"flex gp-dsigner"},jb={key:0,class:"flex items-center justify-between border-b"},$b={class:"text-lg font-bold p-2"},Zb={class:"text-sm font-thin text-gray-500"},zb={class:"flex-1 overflow-auto"},AU={key:0,class:"flex justify-between items-center border-b p-2"},eU={class:"flex items-center"},tU={class:"p-2"},rU={class:"sticky top-0"},nU={key:0,class:"text-lg font-bold border-b p-2"},aU={class:"text-sm font-thin text-gray-500"},sU={class:"p-2"},Jl=Oe(c.defineComponent({__name:"Designer",props:{mode:{default:"design"},template:{},css:{},js:{},previewWidth:{default:360},uploadByFile:{},icons:{},rules:{},preview:{type:Boolean,default:!0},showTitle:{type:Boolean,default:!0}},emits:["update:modelValue","update:element"],setup(A,{expose:e,emit:t}){const r=A,n=t,a=c.ref(r.rules||[]),s=c.ref(r.template),u=c.ref();let o=co("",{},!1);const l=c.ref("");c.watch(()=>r.template,F=>{s.value=F},{immediate:!0}),c.watch(()=>s.value,F=>{F&&(u.value=fA(F))},{immediate:!0}),c.watch(()=>r.css,F=>{F.forEach(L=>{if(document.querySelector(`link[href="${L}"]`))return;const K=document.createElement("link");K.rel="stylesheet",K.href=L,document.head.appendChild(K)})},{immediate:!0}),c.watch(()=>r.js,F=>{!F||F.length===0||F.forEach(L=>{if(document.querySelector(`script[src="${L}"]`))return;const K=document.createElement("script");K.src=L,document.body.appendChild(K)})},{immediate:!0});const f=c.ref(r.mode);c.watch(()=>u.value,F=>{F&&n("update:element",F)},{immediate:!0});const h=c.ref("");c.watch(()=>l.value,F=>{n("update:modelValue",F)},{immediate:!0});const d=c.ref(),C=c.ref(),p=c.ref(),T=c.ref(),U=c.ref(),_=c.ref(),I=c.ref(""),D=c.ref(r.mode==="design");c.watch(()=>r.rules,F=>{a.value=F,s.value&&(u.value=fA(s.value))},{immediate:!0});function k(F=void 0){T.value&&T.value.generateCover(F)}function x(F){U.value=F}function m(F,L=""){if(L){const K=H(u.value,L);K?_.value=K:_.value=F}else _.value=F}function H(F,L){if(F.xpath===L)return F;if(F.children&&F.children.length)for(const K of F.children){const V=H(K,L);if(V)return V}}function P(F,L){var K,V;return F.tag===L.tag&&((K=F.children)==null?void 0:K.length)===((V=L.children)==null?void 0:V.length)}function M(F){if(U.value.xpath==F.xpath){if(U.value){if(F.type===W.Block){var L=!0;const K=H(u.value,U.value.parentxpath||"");if(K&&K.children&&K.children.forEach(V=>{if(V.tag!=U.value.tag||!P(V,U.value)){L=!1;return}}),!L){j.error("同级结构不一致,错误配置!");return}}if(U.value.rule=F.rule,U.value.type=F.type,U.value.type===W.Block){const K=H(u.value,U.value.parentxpath||"");K&&K.children&&(K.children.forEach(V=>{if(V.tag!=U.value.tag||!P(V,U.value)){j.error("同级结构不一致,无法配置为块类型");return}}),K.children.forEach(V=>{V.tag===U.value.tag&&(V.rule=F.rule,V.type=F.type)}))}}h.value=new Date().getTime().toString(),j.success("保存成功"),n("update:element",u.value)}}function eA(F){const L=H(u.value,F.xpath||"");L&&(L.rule=F.rule,L.type=F.type,L.children&&F.children&&L.children.forEach(K=>{const V=F.children.find(CA=>CA.xpath===K.xpath);V&&(K.rule=V.rule,K.type=V.type)})),j.success("操作成功"),h.value=new Date().getTime().toString(),n("update:element",u.value)}function uA(F){l.value=F}function fA(F){o=co(F);const L=o("body").children().toArray().map(K=>J(o(K)));return l.value=o("body").html()||"",L[0]}function J(F,L=""){var YA;function K(HA){if(!HA||!HA[0])return"";const $e=[];let cA=HA;for(;cA.length&&cA[0].tagName!=="html";){const ua=cA[0].tagName,uU=cA.parent().children(ua).index(cA)+1;$e.unshift(`${ua}[${uU}]`),cA=cA.parent()}return"/html/"+$e.join("/")}const V=K(F).replace("/html/body[1]",""),CA=F.children().toArray().map(HA=>J(o(HA),V)),te=(YA=a.value)==null?void 0:YA.find(HA=>HA.xpath===V);return{tag:F[0].tagName,text:F.contents().not(F.children()).text().trim(),attrs:F[0].attribs,children:CA,xpath:V,parentxpath:L,type:(te==null?void 0:te.type)||W.None,rule:(te==null?void 0:te.rule)||{}}}function rA(F){const L=H(u.value,F.element.xpath);if(L){const K=c.toRaw(L);K.editText=F.newText}}function oA(F,L=""){function K(V,CA){var HA;const YA=(CA?((HA=H(u.value,CA))==null?void 0:HA.children)||[]:[u.value]).filter($e=>$e.tag===V.tag).indexOf(V)+1;return`${CA}/${V.tag}[${YA}]`}F.xpath=K(F,L),F.parentxpath=L,(F.children||[]).forEach(V=>oA(V,F.xpath))}function hA({action:F,element:L,newBlock:K}){const V=H(u.value,L.parentxpath||"");if(!V||!V.children)return;const CA=V.children.findIndex(cA=>cA===L);if(CA===-1){j.error("未找到元素");return}const te=V.children.length,{minBlock:YA,maxBlock:HA}=L.rule;if((F==="add"||F==="copy")&&te>=(HA||1/0)){I.value=`无法添加更多块。最大块数量为 ${HA}`,j.error(I.value);return}function $e(cA){cA.xpath="",cA.parentxpath="",cA.text=cA.editText||cA.text,cA.editText="",cA.children.forEach(ua=>{$e(ua)})}switch(F){case"add":if(K){const cA={...K,children:JSON.parse(JSON.stringify(K.children))};$e(cA),V.children.splice(CA+1,0,cA),j.success("添加成功")}break;case"copy":if(K){const cA={...K,children:JSON.parse(JSON.stringify(K.children))};$e(cA),V.children.splice(CA+1,0,cA),j.success("复制成功")}break;case"moveUp":if(CA>0){const[cA]=V.children.splice(CA,1);V.children.splice(CA-1,0,cA),j.success("前移成功")}else j.error("已经是第一个块,无法前移");break;case"moveDown":if(CA<V.children.length-1){const[cA]=V.children.splice(CA,1);V.children.splice(CA+1,0,cA),j.success("后移成功")}else j.error("已经是最后一个块,无法后移");break;case"delete":if(te<=(YA||0)){I.value=`无法删除更多块。最小块数量为 ${YA}`,j.error(I.value);return}V.children.splice(CA,1),j.success("删除成功");break}I.value="",oA(u.value)}function pA(F,L){let K=L.attrs.class.replace(/icon-\S+/g,`icon-${F}`);L.attrs.class=K}function GA(F){const L=F.file,K=H(u.value,F.element.xpath);if(r.uploadByFile)r.uploadByFile(L).then(V=>{V.success&&(K.attrs.src=V.file.url,h.value=new Date().getTime().toString())});else{K.attrs.alt=L.name;const V=URL.createObjectURL(L);K.attrs.src=V,h.value=new Date().getTime().toString()}}function IA(F){const{icon:L}=F,K=H(u.value,F.element.xpath);let V=K.attrs.class.replace(/icon-\S+/g,`icon-${L}`);K.attrs.class=V,h.value=new Date().getTime().toString()}const KA=F=>F.type.startsWith("image/")?!0:(j.error("只能上传图片文件"),!1),xA=c.ref({});function ZA(F,L){if(!F||F.length===0)return;const K=F[0];if(L.rule&&(L.rule.minImageWidth||L.rule.maxImageHeight)){if(L.rule.minImageWidth&&K.width<L.rule.minImageWidth){j.error(`图片宽度不能小于 ${L.rule.minImageWidth}px`);return}if(L.rule.maxImageHeight&&K.height<L.rule.maxImageHeight){j.error(`图片高度不能小于 ${L.rule.maxImageHeight}px`);return}}L.rule.minImageWidth&&L.rule.maxImageHeight?(xA.value.width=L.rule.minImageWidth,xA.value.height=L.rule.maxImageHeight,xA.value.aspectRatio=L.rule.minImageWidth/L.rule.maxImageHeight):xA.value={},K&&(L.rule.crop?(K.thumbUrl,d.value.handleOpenCropper(xA.value,K.file,K.name,L)):r.uploadByFile?r.uploadByFile(K.file).then(V=>{V.success&&(L.attrs.src=V.file.url,h.value=new Date().getTime().toString())}):(L.attrs.src=K.thumbUrl,h.value=new Date().getTime().toString()))}const _A=c.ref(r.previewWidth),S=c.ref(360);let v=c.ref(!1),q=c.ref(""),$=0,zA=0;function je(F){q.value=F,v.value=!0,$=event.clientX,F==="preview"?zA=_A.value:F==="structure"&&(zA=S.value),window.addEventListener("mousemove",Lr),window.addEventListener("mouseup",xr)}function Lr(F){if(!v.value)return;const L=F.clientX-$;q.value==="preview"?_A.value=Math.max(200,zA+L):q.value==="structure"&&(S.value=Math.max(200,zA-L))}function xr(){v.value=!1,q.value="",window.removeEventListener("mousemove",Lr),window.removeEventListener("mouseup",xr)}return e({generateCover:k}),(F,L)=>(c.openBlock(),c.createElementBlock("div",qb,[F.preview?(c.openBlock(),c.createElementBlock("div",{key:0,class:"border-l overflow-auto resize-area",style:c.normalizeStyle({width:_A.value+"px"})},[F.showTitle?(c.openBlock(),c.createElementBlock("div",jb,[c.createElementVNode("h2",$b,[L[4]||(L[4]=c.createTextVNode(" 实时预览 ")),c.createElementVNode("span",Zb,c.toDisplayString(_A.value)+"px",1)]),c.createElementVNode("div",{onClick:L[0]||(L[0]=()=>k()),class:"p-2 cursor-pointer text-blue-500"}," 封面 ")])):c.createCommentVNode("",!0),c.createElementVNode("div",null,[l.value?(c.openBlock(),c.createBlock(Wl,{key:0,"css-files":F.css,"js-files":F.js,"html-content":l.value,class:"gp-designer-preview",ref_key:"previewRef",ref:T},null,8,["css-files","js-files","html-content"])):(c.openBlock(),c.createBlock(Wl,{key:1,"css-files":F.css,"js-files":F.js,"html-content":c.unref(o)("body").html(),class:"gp-designer-preview",ref_key:"previewRef",ref:T},null,8,["css-files","js-files","html-content"]))])],4)):c.createCommentVNode("",!0),F.preview?(c.openBlock(),c.createElementBlock("div",{key:1,class:"resizer",onMousedown:L[1]||(L[1]=K=>je("preview"))},null,32)):c.createCommentVNode("",!0),c.createElementVNode("div",zb,[F.showTitle?(c.openBlock(),c.createElementBlock("div",AU,[L[6]||(L[6]=c.createElementVNode("h2",{class:"text-lg font-bold"},"结构渲染",-1)),c.createElementVNode("div",eU,[c.withDirectives(c.createElementVNode("input",{"onUpdate:modelValue":L[2]||(L[2]=K=>D.value=K),type:"checkbox",id:"showMargin",class:"mr-2"},null,512),[[c.vModelCheckbox,D.value]]),L[5]||(L[5]=c.createElementVNode("label",{for:"showMargin"},"间距",-1))])])):c.createCommentVNode("",!0),c.createElementVNode("div",tU,[u.value?(c.openBlock(),c.createBlock(CE,{key:0,"upload-by-file":F.uploadByFile,cropper:d.value,icon:C.value,upload:p.value,mode:F.mode,icons:F.icons,r:h.value,"show-margin":D.value,element:u.value,selectedElement:U.value,hoveredElement:_.value,onSelectElement:x,onHoverElement:m,onContentUpdated:uA,onUpdateText:rA,onBlockAction:hA,onAddIcon:pA,onUpdateElementRule:eA},null,8,["upload-by-file","cropper","icon","upload","mode","icons","r","show-margin","element","selectedElement","hoveredElement"])):c.createCommentVNode("",!0)])]),f.value=="design"?(c.openBlock(),c.createElementBlock("div",{key:2,class:"resizer",onMousedown:L[3]||(L[3]=K=>je("structure"))},null,32)):c.createCommentVNode("",!0),f.value=="design"?(c.openBlock(),c.createElementBlock("div",{key:3,class:"resize-area",style:c.normalizeStyle({width:S.value+"px"})},[c.createElementVNode("div",rU,[F.showTitle?(c.openBlock(),c.createElementBlock("h2",nU,[L[7]||(L[7]=c.createTextVNode(" 节点属性 ")),c.createElementVNode("span",aU,c.toDisplayString(S.value)+"px",1)])):c.createCommentVNode("",!0),c.createElementVNode("div",sU,[U.value?(c.openBlock(),c.createBlock(YE,{key:0,element:U.value,onUpdateElement:M},null,8,["element"])):c.createCommentVNode("",!0)])])],4)):c.createCommentVNode("",!0),c.createVNode(ep,{ref_key:"cropperRef",ref:d,onOk:GA},null,512),c.createVNode(fp,{icons:F.icons,ref_key:"iconRef",ref:C,onOk:IA},null,8,["icons"]),c.createVNode(wp,{ref_key:"uploadRef",ref:p,multiple:!1,show:!1,beforeUpload:KA,onChange:ZA},{"upload-icon":c.withCtx(()=>L[8]||(L[8]=[c.createElementVNode("div",{class:"p-2"},"上传",-1)])),_:1},512)]))}}),[["__scopeId","data-v-0670a162"]]),iU={install(A){A.component("Designer",Jl)}};Ne.Designer=Jl,Ne.default=iU,Object.defineProperties(Ne,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
39
|
+
.`+li+sb+Dl)},ub=function(A,e){var t=A.ownerDocument;if(t){var r=t.createElement("style");r.textContent=e,A.appendChild(r)}},Ol=function(){function A(){}return A.getOrigin=function(e){var t=A._link;return t?(t.href=e,t.href=t.href,t.protocol+t.hostname+t.port):"about:blank"},A.isSameOrigin=function(e){return A.getOrigin(e)===A._origin},A.setContext=function(e){A._link=e.document.createElement("a"),A._origin=A.getOrigin(e.location.href)},A._origin="about:blank",A}(),ob=function(){function A(e,t){this.context=e,this._options=t,this._cache={}}return A.prototype.addImage=function(e){var t=Promise.resolve();return this.has(e)||(hi(e)||hb(e))&&(this._cache[e]=this.loadImage(e)).catch(function(){}),t},A.prototype.match=function(e){return this._cache[e]},A.prototype.loadImage=function(e){return VA(this,void 0,void 0,function(){var t,r,n,a,s=this;return kA(this,function(u){switch(u.label){case 0:return t=Ol.isSameOrigin(e),r=!fi(e)&&this._options.useCORS===!0&&RA.SUPPORT_CORS_IMAGES&&!t,n=!fi(e)&&!t&&!hi(e)&&typeof this._options.proxy=="string"&&RA.SUPPORT_CORS_XHR&&!r,!t&&this._options.allowTaint===!1&&!fi(e)&&!hi(e)&&!n&&!r?[2]:(a=e,n?[4,this.proxy(a)]:[3,2]);case 1:a=u.sent(),u.label=2;case 2:return this.context.logger.debug("Added image "+e.substring(0,256)),[4,new Promise(function(o,l){var f=new Image;f.onload=function(){return o(f)},f.onerror=l,(db(a)||r)&&(f.crossOrigin="anonymous"),f.src=a,f.complete===!0&&setTimeout(function(){return o(f)},500),s._options.imageTimeout>0&&setTimeout(function(){return l("Timed out ("+s._options.imageTimeout+"ms) loading image")},s._options.imageTimeout)})];case 3:return[2,u.sent()]}})})},A.prototype.has=function(e){return typeof this._cache[e]<"u"},A.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},A.prototype.proxy=function(e){var t=this,r=this._options.proxy;if(!r)throw new Error("No proxy defined");var n=e.substring(0,256);return new Promise(function(a,s){var u=RA.SUPPORT_RESPONSE_TYPE?"blob":"text",o=new XMLHttpRequest;o.onload=function(){if(o.status===200)if(u==="text")a(o.response);else{var h=new FileReader;h.addEventListener("load",function(){return a(h.result)},!1),h.addEventListener("error",function(d){return s(d)},!1),h.readAsDataURL(o.response)}else s("Failed to proxy resource "+n+" with status code "+o.status)},o.onerror=s;var l=r.indexOf("?")>-1?"&":"?";if(o.open("GET",""+r+l+"url="+encodeURIComponent(e)+"&responseType="+u),u!=="text"&&o instanceof XMLHttpRequest&&(o.responseType=u),t._options.imageTimeout){var f=t._options.imageTimeout;o.timeout=f,o.ontimeout=function(){return s("Timed out ("+f+"ms) proxying "+n)}}o.send()})},A}(),cb=/^data:image\/svg\+xml/i,lb=/^data:image\/.*;base64,/i,fb=/^data:image\/.*/i,hb=function(A){return RA.SUPPORT_SVG_DRAWING||!Bb(A)},fi=function(A){return fb.test(A)},db=function(A){return lb.test(A)},hi=function(A){return A.substr(0,4)==="blob"},Bb=function(A){return A.substr(-3).toLowerCase()==="svg"||cb.test(A)},O=function(){function A(e,t){this.type=0,this.x=e,this.y=t}return A.prototype.add=function(e,t){return new A(this.x+e,this.y+t)},A}(),Dt=function(A,e,t){return new O(A.x+(e.x-A.x)*t,A.y+(e.y-A.y)*t)},ea=function(){function A(e,t,r,n){this.type=1,this.start=e,this.startControl=t,this.endControl=r,this.end=n}return A.prototype.subdivide=function(e,t){var r=Dt(this.start,this.startControl,e),n=Dt(this.startControl,this.endControl,e),a=Dt(this.endControl,this.end,e),s=Dt(r,n,e),u=Dt(n,a,e),o=Dt(s,u,e);return t?new A(this.start,r,s,o):new A(o,u,a,this.end)},A.prototype.add=function(e,t){return new A(this.start.add(e,t),this.startControl.add(e,t),this.endControl.add(e,t),this.end.add(e,t))},A.prototype.reverse=function(){return new A(this.end,this.endControl,this.startControl,this.start)},A}(),ue=function(A){return A.type===1},gb=function(){function A(e){var t=e.styles,r=e.bounds,n=Qr(t.borderTopLeftRadius,r.width,r.height),a=n[0],s=n[1],u=Qr(t.borderTopRightRadius,r.width,r.height),o=u[0],l=u[1],f=Qr(t.borderBottomRightRadius,r.width,r.height),h=f[0],d=f[1],C=Qr(t.borderBottomLeftRadius,r.width,r.height),p=C[0],T=C[1],U=[];U.push((a+o)/r.width),U.push((p+h)/r.width),U.push((s+T)/r.height),U.push((l+d)/r.height);var _=Math.max.apply(Math,U);_>1&&(a/=_,s/=_,o/=_,l/=_,h/=_,d/=_,p/=_,T/=_);var I=r.width-o,D=r.height-d,k=r.width-h,x=r.height-T,m=t.borderTopWidth,H=t.borderRightWidth,P=t.borderBottomWidth,M=t.borderLeftWidth,eA=lA(t.paddingTop,e.bounds.width),uA=lA(t.paddingRight,e.bounds.width),fA=lA(t.paddingBottom,e.bounds.width),J=lA(t.paddingLeft,e.bounds.width);this.topLeftBorderDoubleOuterBox=a>0||s>0?EA(r.left+M/3,r.top+m/3,a-M/3,s-m/3,aA.TOP_LEFT):new O(r.left+M/3,r.top+m/3),this.topRightBorderDoubleOuterBox=a>0||s>0?EA(r.left+I,r.top+m/3,o-H/3,l-m/3,aA.TOP_RIGHT):new O(r.left+r.width-H/3,r.top+m/3),this.bottomRightBorderDoubleOuterBox=h>0||d>0?EA(r.left+k,r.top+D,h-H/3,d-P/3,aA.BOTTOM_RIGHT):new O(r.left+r.width-H/3,r.top+r.height-P/3),this.bottomLeftBorderDoubleOuterBox=p>0||T>0?EA(r.left+M/3,r.top+x,p-M/3,T-P/3,aA.BOTTOM_LEFT):new O(r.left+M/3,r.top+r.height-P/3),this.topLeftBorderDoubleInnerBox=a>0||s>0?EA(r.left+M*2/3,r.top+m*2/3,a-M*2/3,s-m*2/3,aA.TOP_LEFT):new O(r.left+M*2/3,r.top+m*2/3),this.topRightBorderDoubleInnerBox=a>0||s>0?EA(r.left+I,r.top+m*2/3,o-H*2/3,l-m*2/3,aA.TOP_RIGHT):new O(r.left+r.width-H*2/3,r.top+m*2/3),this.bottomRightBorderDoubleInnerBox=h>0||d>0?EA(r.left+k,r.top+D,h-H*2/3,d-P*2/3,aA.BOTTOM_RIGHT):new O(r.left+r.width-H*2/3,r.top+r.height-P*2/3),this.bottomLeftBorderDoubleInnerBox=p>0||T>0?EA(r.left+M*2/3,r.top+x,p-M*2/3,T-P*2/3,aA.BOTTOM_LEFT):new O(r.left+M*2/3,r.top+r.height-P*2/3),this.topLeftBorderStroke=a>0||s>0?EA(r.left+M/2,r.top+m/2,a-M/2,s-m/2,aA.TOP_LEFT):new O(r.left+M/2,r.top+m/2),this.topRightBorderStroke=a>0||s>0?EA(r.left+I,r.top+m/2,o-H/2,l-m/2,aA.TOP_RIGHT):new O(r.left+r.width-H/2,r.top+m/2),this.bottomRightBorderStroke=h>0||d>0?EA(r.left+k,r.top+D,h-H/2,d-P/2,aA.BOTTOM_RIGHT):new O(r.left+r.width-H/2,r.top+r.height-P/2),this.bottomLeftBorderStroke=p>0||T>0?EA(r.left+M/2,r.top+x,p-M/2,T-P/2,aA.BOTTOM_LEFT):new O(r.left+M/2,r.top+r.height-P/2),this.topLeftBorderBox=a>0||s>0?EA(r.left,r.top,a,s,aA.TOP_LEFT):new O(r.left,r.top),this.topRightBorderBox=o>0||l>0?EA(r.left+I,r.top,o,l,aA.TOP_RIGHT):new O(r.left+r.width,r.top),this.bottomRightBorderBox=h>0||d>0?EA(r.left+k,r.top+D,h,d,aA.BOTTOM_RIGHT):new O(r.left+r.width,r.top+r.height),this.bottomLeftBorderBox=p>0||T>0?EA(r.left,r.top+x,p,T,aA.BOTTOM_LEFT):new O(r.left,r.top+r.height),this.topLeftPaddingBox=a>0||s>0?EA(r.left+M,r.top+m,Math.max(0,a-M),Math.max(0,s-m),aA.TOP_LEFT):new O(r.left+M,r.top+m),this.topRightPaddingBox=o>0||l>0?EA(r.left+Math.min(I,r.width-H),r.top+m,I>r.width+H?0:Math.max(0,o-H),Math.max(0,l-m),aA.TOP_RIGHT):new O(r.left+r.width-H,r.top+m),this.bottomRightPaddingBox=h>0||d>0?EA(r.left+Math.min(k,r.width-M),r.top+Math.min(D,r.height-P),Math.max(0,h-H),Math.max(0,d-P),aA.BOTTOM_RIGHT):new O(r.left+r.width-H,r.top+r.height-P),this.bottomLeftPaddingBox=p>0||T>0?EA(r.left+M,r.top+Math.min(x,r.height-P),Math.max(0,p-M),Math.max(0,T-P),aA.BOTTOM_LEFT):new O(r.left+M,r.top+r.height-P),this.topLeftContentBox=a>0||s>0?EA(r.left+M+J,r.top+m+eA,Math.max(0,a-(M+J)),Math.max(0,s-(m+eA)),aA.TOP_LEFT):new O(r.left+M+J,r.top+m+eA),this.topRightContentBox=o>0||l>0?EA(r.left+Math.min(I,r.width+M+J),r.top+m+eA,I>r.width+M+J?0:o-M+J,l-(m+eA),aA.TOP_RIGHT):new O(r.left+r.width-(H+uA),r.top+m+eA),this.bottomRightContentBox=h>0||d>0?EA(r.left+Math.min(k,r.width-(M+J)),r.top+Math.min(D,r.height+m+eA),Math.max(0,h-(H+uA)),d-(P+fA),aA.BOTTOM_RIGHT):new O(r.left+r.width-(H+uA),r.top+r.height-(P+fA)),this.bottomLeftContentBox=p>0||T>0?EA(r.left+M+J,r.top+x,Math.max(0,p-(M+J)),T-(P+fA),aA.BOTTOM_LEFT):new O(r.left+M+J,r.top+r.height-(P+fA))}return A}(),aA;(function(A){A[A.TOP_LEFT=0]="TOP_LEFT",A[A.TOP_RIGHT=1]="TOP_RIGHT",A[A.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",A[A.BOTTOM_LEFT=3]="BOTTOM_LEFT"})(aA||(aA={}));var EA=function(A,e,t,r,n){var a=4*((Math.sqrt(2)-1)/3),s=t*a,u=r*a,o=A+t,l=e+r;switch(n){case aA.TOP_LEFT:return new ea(new O(A,l),new O(A,l-u),new O(o-s,e),new O(o,e));case aA.TOP_RIGHT:return new ea(new O(A,e),new O(A+s,e),new O(o,l-u),new O(o,l));case aA.BOTTOM_RIGHT:return new ea(new O(o,e),new O(o,e+u),new O(A+s,l),new O(A,l));case aA.BOTTOM_LEFT:default:return new ea(new O(o,l),new O(o-s,l),new O(A,e+u),new O(A,e))}},ta=function(A){return[A.topLeftBorderBox,A.topRightBorderBox,A.bottomRightBorderBox,A.bottomLeftBorderBox]},Eb=function(A){return[A.topLeftContentBox,A.topRightContentBox,A.bottomRightContentBox,A.bottomLeftContentBox]},ra=function(A){return[A.topLeftPaddingBox,A.topRightPaddingBox,A.bottomRightPaddingBox,A.bottomLeftPaddingBox]},mb=function(){function A(e,t,r){this.offsetX=e,this.offsetY=t,this.matrix=r,this.type=0,this.target=6}return A}(),na=function(){function A(e,t){this.path=e,this.target=t,this.type=1}return A}(),pb=function(){function A(e){this.opacity=e,this.type=2,this.target=6}return A}(),Cb=function(A){return A.type===0},Rl=function(A){return A.type===1},wb=function(A){return A.type===2},Ml=function(A,e){return A.length===e.length?A.some(function(t,r){return t===e[r]}):!1},Tb=function(A,e,t,r,n){return A.map(function(a,s){switch(s){case 0:return a.add(e,t);case 1:return a.add(e+r,t);case 2:return a.add(e+r,t+n);case 3:return a.add(e,t+n)}return a})},kl=function(){function A(e){this.element=e,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}return A}(),Pl=function(){function A(e,t){if(this.container=e,this.parent=t,this.effects=[],this.curves=new gb(this.container),this.container.styles.opacity<1&&this.effects.push(new pb(this.container.styles.opacity)),this.container.styles.transform!==null){var r=this.container.bounds.left+this.container.styles.transformOrigin[0].number,n=this.container.bounds.top+this.container.styles.transformOrigin[1].number,a=this.container.styles.transform;this.effects.push(new mb(r,n,a))}if(this.container.styles.overflowX!==0){var s=ta(this.curves),u=ra(this.curves);Ml(s,u)?this.effects.push(new na(s,6)):(this.effects.push(new na(s,2)),this.effects.push(new na(u,4)))}}return A.prototype.getEffects=function(e){for(var t=[2,3].indexOf(this.container.styles.position)===-1,r=this.parent,n=this.effects.slice(0);r;){var a=r.effects.filter(function(o){return!Rl(o)});if(t||r.container.styles.position!==0||!r.parent){if(n.unshift.apply(n,a),t=[2,3].indexOf(r.container.styles.position)===-1,r.container.styles.overflowX!==0){var s=ta(r.curves),u=ra(r.curves);Ml(s,u)||n.unshift(new na(u,6))}}else n.unshift.apply(n,a);r=r.parent}return n.filter(function(o){return FA(o.target,e)})},A}(),di=function(A,e,t,r){A.container.elements.forEach(function(n){var a=FA(n.flags,4),s=FA(n.flags,2),u=new Pl(n,A);FA(n.styles.display,2048)&&r.push(u);var o=FA(n.flags,8)?[]:r;if(a||s){var l=a||n.styles.isPositioned()?t:e,f=new kl(u);if(n.styles.isPositioned()||n.styles.opacity<1||n.styles.isTransformed()){var h=n.styles.zIndex.order;if(h<0){var d=0;l.negativeZIndex.some(function(p,T){return h>p.element.container.styles.zIndex.order?(d=T,!1):d>0}),l.negativeZIndex.splice(d,0,f)}else if(h>0){var C=0;l.positiveZIndex.some(function(p,T){return h>=p.element.container.styles.zIndex.order?(C=T+1,!1):C>0}),l.positiveZIndex.splice(C,0,f)}else l.zeroOrAutoZIndexOrTransformedOrOpacity.push(f)}else n.styles.isFloating()?l.nonPositionedFloats.push(f):l.nonPositionedInlineLevel.push(f);di(u,f,a?f:t,o)}else n.styles.isInlineLevel()?e.inlineLevel.push(u):e.nonInlineLevel.push(u),di(u,e,t,o);FA(n.flags,8)&&Kl(n,o)})},Kl=function(A,e){for(var t=A instanceof ri?A.start:1,r=A instanceof ri?A.reversed:!1,n=0;n<e.length;n++){var a=e[n];a.container instanceof hl&&typeof a.container.value=="number"&&a.container.value!==0&&(t=a.container.value),a.listValue=Sr(t,a.container.styles.listStyleType,!0),t+=r?-1:1}},bb=function(A){var e=new Pl(A,null),t=new kl(e),r=[];return di(e,t,t,r),Kl(e.container,r),t},Vl=function(A,e){switch(e){case 0:return oe(A.topLeftBorderBox,A.topLeftPaddingBox,A.topRightBorderBox,A.topRightPaddingBox);case 1:return oe(A.topRightBorderBox,A.topRightPaddingBox,A.bottomRightBorderBox,A.bottomRightPaddingBox);case 2:return oe(A.bottomRightBorderBox,A.bottomRightPaddingBox,A.bottomLeftBorderBox,A.bottomLeftPaddingBox);case 3:default:return oe(A.bottomLeftBorderBox,A.bottomLeftPaddingBox,A.topLeftBorderBox,A.topLeftPaddingBox)}},Ub=function(A,e){switch(e){case 0:return oe(A.topLeftBorderBox,A.topLeftBorderDoubleOuterBox,A.topRightBorderBox,A.topRightBorderDoubleOuterBox);case 1:return oe(A.topRightBorderBox,A.topRightBorderDoubleOuterBox,A.bottomRightBorderBox,A.bottomRightBorderDoubleOuterBox);case 2:return oe(A.bottomRightBorderBox,A.bottomRightBorderDoubleOuterBox,A.bottomLeftBorderBox,A.bottomLeftBorderDoubleOuterBox);case 3:default:return oe(A.bottomLeftBorderBox,A.bottomLeftBorderDoubleOuterBox,A.topLeftBorderBox,A.topLeftBorderDoubleOuterBox)}},Qb=function(A,e){switch(e){case 0:return oe(A.topLeftBorderDoubleInnerBox,A.topLeftPaddingBox,A.topRightBorderDoubleInnerBox,A.topRightPaddingBox);case 1:return oe(A.topRightBorderDoubleInnerBox,A.topRightPaddingBox,A.bottomRightBorderDoubleInnerBox,A.bottomRightPaddingBox);case 2:return oe(A.bottomRightBorderDoubleInnerBox,A.bottomRightPaddingBox,A.bottomLeftBorderDoubleInnerBox,A.bottomLeftPaddingBox);case 3:default:return oe(A.bottomLeftBorderDoubleInnerBox,A.bottomLeftPaddingBox,A.topLeftBorderDoubleInnerBox,A.topLeftPaddingBox)}},Fb=function(A,e){switch(e){case 0:return aa(A.topLeftBorderStroke,A.topRightBorderStroke);case 1:return aa(A.topRightBorderStroke,A.bottomRightBorderStroke);case 2:return aa(A.bottomRightBorderStroke,A.bottomLeftBorderStroke);case 3:default:return aa(A.bottomLeftBorderStroke,A.topLeftBorderStroke)}},aa=function(A,e){var t=[];return ue(A)?t.push(A.subdivide(.5,!1)):t.push(A),ue(e)?t.push(e.subdivide(.5,!0)):t.push(e),t},oe=function(A,e,t,r){var n=[];return ue(A)?n.push(A.subdivide(.5,!1)):n.push(A),ue(t)?n.push(t.subdivide(.5,!0)):n.push(t),ue(r)?n.push(r.subdivide(.5,!0).reverse()):n.push(r),ue(e)?n.push(e.subdivide(.5,!1).reverse()):n.push(e),n},Gl=function(A){var e=A.bounds,t=A.styles;return e.add(t.borderLeftWidth,t.borderTopWidth,-(t.borderRightWidth+t.borderLeftWidth),-(t.borderTopWidth+t.borderBottomWidth))},sa=function(A){var e=A.styles,t=A.bounds,r=lA(e.paddingLeft,t.width),n=lA(e.paddingRight,t.width),a=lA(e.paddingTop,t.width),s=lA(e.paddingBottom,t.width);return t.add(r+e.borderLeftWidth,a+e.borderTopWidth,-(e.borderRightWidth+e.borderLeftWidth+r+n),-(e.borderTopWidth+e.borderBottomWidth+a+s))},Ib=function(A,e){return A===0?e.bounds:A===2?sa(e):Gl(e)},_b=function(A,e){return A===0?e.bounds:A===2?sa(e):Gl(e)},Bi=function(A,e,t){var r=Ib(Rt(A.styles.backgroundOrigin,e),A),n=_b(Rt(A.styles.backgroundClip,e),A),a=yb(Rt(A.styles.backgroundSize,e),t,r),s=a[0],u=a[1],o=Qr(Rt(A.styles.backgroundPosition,e),r.width-s,r.height-u),l=Nb(Rt(A.styles.backgroundRepeat,e),o,a,r,n),f=Math.round(r.left+o[0]),h=Math.round(r.top+o[1]);return[l,f,h,s,u]},Ot=function(A){return iA(A)&&A.value===vt.AUTO},ia=function(A){return typeof A=="number"},yb=function(A,e,t){var r=e[0],n=e[1],a=e[2],s=A[0],u=A[1];if(!s)return[0,0];if(UA(s)&&u&&UA(u))return[lA(s,t.width),lA(u,t.height)];var o=ia(a);if(iA(s)&&(s.value===vt.CONTAIN||s.value===vt.COVER)){if(ia(a)){var l=t.width/t.height;return l<a!=(s.value===vt.COVER)?[t.width,t.width/a]:[t.height*a,t.height]}return[t.width,t.height]}var f=ia(r),h=ia(n),d=f||h;if(Ot(s)&&(!u||Ot(u))){if(f&&h)return[r,n];if(!o&&!d)return[t.width,t.height];if(d&&o){var C=f?r:n*a,p=h?n:r/a;return[C,p]}var T=f?r:t.width,U=h?n:t.height;return[T,U]}if(o){var _=0,I=0;return UA(s)?_=lA(s,t.width):UA(u)&&(I=lA(u,t.height)),Ot(s)?_=I*a:(!u||Ot(u))&&(I=_/a),[_,I]}var D=null,k=null;if(UA(s)?D=lA(s,t.width):u&&UA(u)&&(k=lA(u,t.height)),D!==null&&(!u||Ot(u))&&(k=f&&h?D/r*n:t.height),k!==null&&Ot(s)&&(D=f&&h?k/n*r:t.width),D!==null&&k!==null)return[D,k];throw new Error("Unable to calculate background-size for element")},Rt=function(A,e){var t=A[e];return typeof t>"u"?A[0]:t},Nb=function(A,e,t,r,n){var a=e[0],s=e[1],u=t[0],o=t[1];switch(A){case 2:return[new O(Math.round(r.left),Math.round(r.top+s)),new O(Math.round(r.left+r.width),Math.round(r.top+s)),new O(Math.round(r.left+r.width),Math.round(o+r.top+s)),new O(Math.round(r.left),Math.round(o+r.top+s))];case 3:return[new O(Math.round(r.left+a),Math.round(r.top)),new O(Math.round(r.left+a+u),Math.round(r.top)),new O(Math.round(r.left+a+u),Math.round(r.height+r.top)),new O(Math.round(r.left+a),Math.round(r.height+r.top))];case 1:return[new O(Math.round(r.left+a),Math.round(r.top+s)),new O(Math.round(r.left+a+u),Math.round(r.top+s)),new O(Math.round(r.left+a+u),Math.round(r.top+s+o)),new O(Math.round(r.left+a),Math.round(r.top+s+o))];default:return[new O(Math.round(n.left),Math.round(n.top)),new O(Math.round(n.left+n.width),Math.round(n.top)),new O(Math.round(n.left+n.width),Math.round(n.height+n.top)),new O(Math.round(n.left),Math.round(n.height+n.top))]}},Sb="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",Yl="Hidden Text",vb=function(){function A(e){this._data={},this._document=e}return A.prototype.parseMetrics=function(e,t){var r=this._document.createElement("div"),n=this._document.createElement("img"),a=this._document.createElement("span"),s=this._document.body;r.style.visibility="hidden",r.style.fontFamily=e,r.style.fontSize=t,r.style.margin="0",r.style.padding="0",r.style.whiteSpace="nowrap",s.appendChild(r),n.src=Sb,n.width=1,n.height=1,n.style.margin="0",n.style.padding="0",n.style.verticalAlign="baseline",a.style.fontFamily=e,a.style.fontSize=t,a.style.margin="0",a.style.padding="0",a.appendChild(this._document.createTextNode(Yl)),r.appendChild(a),r.appendChild(n);var u=n.offsetTop-a.offsetTop+2;r.removeChild(a),r.appendChild(this._document.createTextNode(Yl)),r.style.lineHeight="normal",n.style.verticalAlign="super";var o=n.offsetTop-r.offsetTop+2;return s.removeChild(r),{baseline:u,middle:o}},A.prototype.getMetrics=function(e,t){var r=e+" "+t;return typeof this._data[r]>"u"&&(this._data[r]=this.parseMetrics(e,t)),this._data[r]},A}(),Xl=function(){function A(e,t){this.context=e,this.options=t}return A}(),Lb=1e4,xb=function(A){he(e,A);function e(t,r){var n=A.call(this,t,r)||this;return n._activeEffects=[],n.canvas=r.canvas?r.canvas:document.createElement("canvas"),n.ctx=n.canvas.getContext("2d"),r.canvas||(n.canvas.width=Math.floor(r.width*r.scale),n.canvas.height=Math.floor(r.height*r.scale),n.canvas.style.width=r.width+"px",n.canvas.style.height=r.height+"px"),n.fontMetrics=new vb(document),n.ctx.scale(n.options.scale,n.options.scale),n.ctx.translate(-r.x,-r.y),n.ctx.textBaseline="bottom",n._activeEffects=[],n.context.logger.debug("Canvas renderer initialized ("+r.width+"x"+r.height+") with scale "+r.scale),n}return e.prototype.applyEffects=function(t){for(var r=this;this._activeEffects.length;)this.popEffect();t.forEach(function(n){return r.applyEffect(n)})},e.prototype.applyEffect=function(t){this.ctx.save(),wb(t)&&(this.ctx.globalAlpha=t.opacity),Cb(t)&&(this.ctx.translate(t.offsetX,t.offsetY),this.ctx.transform(t.matrix[0],t.matrix[1],t.matrix[2],t.matrix[3],t.matrix[4],t.matrix[5]),this.ctx.translate(-t.offsetX,-t.offsetY)),Rl(t)&&(this.path(t.path),this.ctx.clip()),this._activeEffects.push(t)},e.prototype.popEffect=function(){this._activeEffects.pop(),this.ctx.restore()},e.prototype.renderStack=function(t){return VA(this,void 0,void 0,function(){var r;return kA(this,function(n){switch(n.label){case 0:return r=t.element.container.styles,r.isVisible()?[4,this.renderStackContent(t)]:[3,2];case 1:n.sent(),n.label=2;case 2:return[2]}})})},e.prototype.renderNode=function(t){return VA(this,void 0,void 0,function(){return kA(this,function(r){switch(r.label){case 0:if(FA(t.container.flags,16))debugger;return t.container.styles.isVisible()?[4,this.renderNodeBackgroundAndBorders(t)]:[3,3];case 1:return r.sent(),[4,this.renderNodeContent(t)];case 2:r.sent(),r.label=3;case 3:return[2]}})})},e.prototype.renderTextWithLetterSpacing=function(t,r,n){var a=this;if(r===0)this.ctx.fillText(t.text,t.bounds.left,t.bounds.top+n);else{var s=ti(t.text);s.reduce(function(u,o){return a.ctx.fillText(o,u,t.bounds.top+n),u+a.ctx.measureText(o).width},t.bounds.left)}},e.prototype.createFontStyle=function(t){var r=t.fontVariant.filter(function(s){return s==="normal"||s==="small-caps"}).join(""),n=Mb(t.fontFamily).join(", "),a=Ur(t.fontSize)?""+t.fontSize.number+t.fontSize.unit:t.fontSize.number+"px";return[[t.fontStyle,r,t.fontWeight,a,n].join(" "),n,a]},e.prototype.renderTextNode=function(t,r){return VA(this,void 0,void 0,function(){var n,a,s,u,o,l,f,h,d=this;return kA(this,function(C){return n=this.createFontStyle(r),a=n[0],s=n[1],u=n[2],this.ctx.font=a,this.ctx.direction=r.direction===1?"rtl":"ltr",this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic",o=this.fontMetrics.getMetrics(s,u),l=o.baseline,f=o.middle,h=r.paintOrder,t.textBounds.forEach(function(p){h.forEach(function(T){switch(T){case 0:d.ctx.fillStyle=LA(r.color),d.renderTextWithLetterSpacing(p,r.letterSpacing,l);var U=r.textShadow;U.length&&p.text.trim().length&&(U.slice(0).reverse().forEach(function(_){d.ctx.shadowColor=LA(_.color),d.ctx.shadowOffsetX=_.offsetX.number*d.options.scale,d.ctx.shadowOffsetY=_.offsetY.number*d.options.scale,d.ctx.shadowBlur=_.blur.number,d.renderTextWithLetterSpacing(p,r.letterSpacing,l)}),d.ctx.shadowColor="",d.ctx.shadowOffsetX=0,d.ctx.shadowOffsetY=0,d.ctx.shadowBlur=0),r.textDecorationLine.length&&(d.ctx.fillStyle=LA(r.textDecorationColor||r.color),r.textDecorationLine.forEach(function(_){switch(_){case 1:d.ctx.fillRect(p.bounds.left,Math.round(p.bounds.top+l),p.bounds.width,1);break;case 2:d.ctx.fillRect(p.bounds.left,Math.round(p.bounds.top),p.bounds.width,1);break;case 3:d.ctx.fillRect(p.bounds.left,Math.ceil(p.bounds.top+f),p.bounds.width,1);break}}));break;case 1:r.webkitTextStrokeWidth&&p.text.trim().length&&(d.ctx.strokeStyle=LA(r.webkitTextStrokeColor),d.ctx.lineWidth=r.webkitTextStrokeWidth,d.ctx.lineJoin=window.chrome?"miter":"round",d.ctx.strokeText(p.text,p.bounds.left,p.bounds.top+l)),d.ctx.strokeStyle="",d.ctx.lineWidth=0,d.ctx.lineJoin="miter";break}})}),[2]})})},e.prototype.renderReplacedElement=function(t,r,n){if(n&&t.intrinsicWidth>0&&t.intrinsicHeight>0){var a=sa(t),s=ra(r);this.path(s),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(n,0,0,t.intrinsicWidth,t.intrinsicHeight,a.left,a.top,a.width,a.height),this.ctx.restore()}},e.prototype.renderNodeContent=function(t){return VA(this,void 0,void 0,function(){var r,n,a,s,u,o,I,I,l,f,h,d,k,C,p,x,T,U,_,I,D,k,x;return kA(this,function(m){switch(m.label){case 0:this.applyEffects(t.getEffects(4)),r=t.container,n=t.curves,a=r.styles,s=0,u=r.textNodes,m.label=1;case 1:return s<u.length?(o=u[s],[4,this.renderTextNode(o,a)]):[3,4];case 2:m.sent(),m.label=3;case 3:return s++,[3,1];case 4:if(!(r instanceof cl))return[3,8];m.label=5;case 5:return m.trys.push([5,7,,8]),[4,this.context.cache.match(r.src)];case 6:return I=m.sent(),this.renderReplacedElement(r,n,I),[3,8];case 7:return m.sent(),this.context.logger.error("Error loading image "+r.src),[3,8];case 8:if(r instanceof ll&&this.renderReplacedElement(r,n,r.canvas),!(r instanceof fl))return[3,12];m.label=9;case 9:return m.trys.push([9,11,,12]),[4,this.context.cache.match(r.svg)];case 10:return I=m.sent(),this.renderReplacedElement(r,n,I),[3,12];case 11:return m.sent(),this.context.logger.error("Error loading svg "+r.svg.substring(0,255)),[3,12];case 12:return r instanceof El&&r.tree?(l=new e(this.context,{scale:this.options.scale,backgroundColor:r.backgroundColor,x:0,y:0,width:r.width,height:r.height}),[4,l.render(r.tree)]):[3,14];case 13:f=m.sent(),r.width&&r.height&&this.ctx.drawImage(f,0,0,r.width,r.height,r.bounds.left,r.bounds.top,r.bounds.width,r.bounds.height),m.label=14;case 14:if(r instanceof ni&&(h=Math.min(r.bounds.width,r.bounds.height),r.type===qn?r.checked&&(this.ctx.save(),this.path([new O(r.bounds.left+h*.39363,r.bounds.top+h*.79),new O(r.bounds.left+h*.16,r.bounds.top+h*.5549),new O(r.bounds.left+h*.27347,r.bounds.top+h*.44071),new O(r.bounds.left+h*.39694,r.bounds.top+h*.5649),new O(r.bounds.left+h*.72983,r.bounds.top+h*.23),new O(r.bounds.left+h*.84,r.bounds.top+h*.34085),new O(r.bounds.left+h*.39363,r.bounds.top+h*.79)]),this.ctx.fillStyle=LA(dl),this.ctx.fill(),this.ctx.restore()):r.type===jn&&r.checked&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(r.bounds.left+h/2,r.bounds.top+h/2,h/4,0,Math.PI*2,!0),this.ctx.fillStyle=LA(dl),this.ctx.fill(),this.ctx.restore())),Hb(r)&&r.value.length){switch(d=this.createFontStyle(a),k=d[0],C=d[1],p=this.fontMetrics.getMetrics(k,C).baseline,this.ctx.font=k,this.ctx.fillStyle=LA(a.color),this.ctx.textBaseline="alphabetic",this.ctx.textAlign=Ob(r.styles.textAlign),x=sa(r),T=0,r.styles.textAlign){case 1:T+=x.width/2;break;case 2:T+=x.width;break}U=x.add(T,0,0,-x.height/2+1),this.ctx.save(),this.path([new O(x.left,x.top),new O(x.left+x.width,x.top),new O(x.left+x.width,x.top+x.height),new O(x.left,x.top+x.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new yr(r.value,U),a.letterSpacing,p),this.ctx.restore(),this.ctx.textBaseline="alphabetic",this.ctx.textAlign="left"}if(!FA(r.styles.display,2048))return[3,20];if(r.styles.listStyleImage===null)return[3,19];if(_=r.styles.listStyleImage,_.type!==0)return[3,18];I=void 0,D=_.url,m.label=15;case 15:return m.trys.push([15,17,,18]),[4,this.context.cache.match(D)];case 16:return I=m.sent(),this.ctx.drawImage(I,r.bounds.left-(I.width+10),r.bounds.top),[3,18];case 17:return m.sent(),this.context.logger.error("Error loading list-style-image "+D),[3,18];case 18:return[3,20];case 19:t.listValue&&r.styles.listStyleType!==-1&&(k=this.createFontStyle(a)[0],this.ctx.font=k,this.ctx.fillStyle=LA(a.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",x=new Fe(r.bounds.left,r.bounds.top+lA(r.styles.paddingTop,r.bounds.width),r.bounds.width,Yc(a.lineHeight,a.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new yr(t.listValue,x),a.letterSpacing,Yc(a.lineHeight,a.fontSize.number)/2+2),this.ctx.textBaseline="bottom",this.ctx.textAlign="left"),m.label=20;case 20:return[2]}})})},e.prototype.renderStackContent=function(t){return VA(this,void 0,void 0,function(){var r,n,_,a,s,_,u,o,_,l,f,_,h,d,_,C,p,_,T,U,_;return kA(this,function(I){switch(I.label){case 0:if(FA(t.element.container.flags,16))debugger;return[4,this.renderNodeBackgroundAndBorders(t.element)];case 1:I.sent(),r=0,n=t.negativeZIndex,I.label=2;case 2:return r<n.length?(_=n[r],[4,this.renderStack(_)]):[3,5];case 3:I.sent(),I.label=4;case 4:return r++,[3,2];case 5:return[4,this.renderNodeContent(t.element)];case 6:I.sent(),a=0,s=t.nonInlineLevel,I.label=7;case 7:return a<s.length?(_=s[a],[4,this.renderNode(_)]):[3,10];case 8:I.sent(),I.label=9;case 9:return a++,[3,7];case 10:u=0,o=t.nonPositionedFloats,I.label=11;case 11:return u<o.length?(_=o[u],[4,this.renderStack(_)]):[3,14];case 12:I.sent(),I.label=13;case 13:return u++,[3,11];case 14:l=0,f=t.nonPositionedInlineLevel,I.label=15;case 15:return l<f.length?(_=f[l],[4,this.renderStack(_)]):[3,18];case 16:I.sent(),I.label=17;case 17:return l++,[3,15];case 18:h=0,d=t.inlineLevel,I.label=19;case 19:return h<d.length?(_=d[h],[4,this.renderNode(_)]):[3,22];case 20:I.sent(),I.label=21;case 21:return h++,[3,19];case 22:C=0,p=t.zeroOrAutoZIndexOrTransformedOrOpacity,I.label=23;case 23:return C<p.length?(_=p[C],[4,this.renderStack(_)]):[3,26];case 24:I.sent(),I.label=25;case 25:return C++,[3,23];case 26:T=0,U=t.positiveZIndex,I.label=27;case 27:return T<U.length?(_=U[T],[4,this.renderStack(_)]):[3,30];case 28:I.sent(),I.label=29;case 29:return T++,[3,27];case 30:return[2]}})})},e.prototype.mask=function(t){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(t.slice(0).reverse()),this.ctx.closePath()},e.prototype.path=function(t){this.ctx.beginPath(),this.formatPath(t),this.ctx.closePath()},e.prototype.formatPath=function(t){var r=this;t.forEach(function(n,a){var s=ue(n)?n.start:n;a===0?r.ctx.moveTo(s.x,s.y):r.ctx.lineTo(s.x,s.y),ue(n)&&r.ctx.bezierCurveTo(n.startControl.x,n.startControl.y,n.endControl.x,n.endControl.y,n.end.x,n.end.y)})},e.prototype.renderRepeat=function(t,r,n,a){this.path(t),this.ctx.fillStyle=r,this.ctx.translate(n,a),this.ctx.fill(),this.ctx.translate(-n,-a)},e.prototype.resizeImage=function(t,r,n){var a;if(t.width===r&&t.height===n)return t;var s=(a=this.canvas.ownerDocument)!==null&&a!==void 0?a:document,u=s.createElement("canvas");u.width=Math.max(1,r),u.height=Math.max(1,n);var o=u.getContext("2d");return o.drawImage(t,0,0,t.width,t.height,0,0,r,n),u},e.prototype.renderBackgroundImage=function(t){return VA(this,void 0,void 0,function(){var r,n,a,s,u,o;return kA(this,function(l){switch(l.label){case 0:r=t.styles.backgroundImage.length-1,n=function(f){var h,d,C,eA,hA,pA,J,rA,P,p,eA,hA,pA,J,rA,T,U,_,I,D,k,x,m,H,P,M,eA,uA,fA,J,rA,oA,hA,pA,GA,IA,KA,xA,ZA,_A,S,v;return kA(this,function(q){switch(q.label){case 0:if(f.type!==0)return[3,5];h=void 0,d=f.url,q.label=1;case 1:return q.trys.push([1,3,,4]),[4,a.context.cache.match(d)];case 2:return h=q.sent(),[3,4];case 3:return q.sent(),a.context.logger.error("Error loading background-image "+d),[3,4];case 4:return h&&(C=Bi(t,r,[h.width,h.height,h.width/h.height]),eA=C[0],hA=C[1],pA=C[2],J=C[3],rA=C[4],P=a.ctx.createPattern(a.resizeImage(h,J,rA),"repeat"),a.renderRepeat(eA,P,hA,pA)),[3,6];case 5:C1(f)?(p=Bi(t,r,[null,null,null]),eA=p[0],hA=p[1],pA=p[2],J=p[3],rA=p[4],T=B1(f.angle,J,rA),U=T[0],_=T[1],I=T[2],D=T[3],k=T[4],x=document.createElement("canvas"),x.width=J,x.height=rA,m=x.getContext("2d"),H=m.createLinearGradient(_,D,I,k),xc(f.stops,U).forEach(function($){return H.addColorStop($.stop,LA($.color))}),m.fillStyle=H,m.fillRect(0,0,J,rA),J>0&&rA>0&&(P=a.ctx.createPattern(x,"repeat"),a.renderRepeat(eA,P,hA,pA))):w1(f)&&(M=Bi(t,r,[null,null,null]),eA=M[0],uA=M[1],fA=M[2],J=M[3],rA=M[4],oA=f.position.length===0?[Ps]:f.position,hA=lA(oA[0],J),pA=lA(oA[oA.length-1],rA),GA=g1(f,hA,pA,J,rA),IA=GA[0],KA=GA[1],IA>0&&KA>0&&(xA=a.ctx.createRadialGradient(uA+hA,fA+pA,0,uA+hA,fA+pA,IA),xc(f.stops,IA*2).forEach(function($){return xA.addColorStop($.stop,LA($.color))}),a.path(eA),a.ctx.fillStyle=xA,IA!==KA?(ZA=t.bounds.left+.5*t.bounds.width,_A=t.bounds.top+.5*t.bounds.height,S=KA/IA,v=1/S,a.ctx.save(),a.ctx.translate(ZA,_A),a.ctx.transform(1,0,0,S,0,0),a.ctx.translate(-ZA,-_A),a.ctx.fillRect(uA,v*(fA-_A)+_A,J,rA*v),a.ctx.restore()):a.ctx.fill())),q.label=6;case 6:return r--,[2]}})},a=this,s=0,u=t.styles.backgroundImage.slice(0).reverse(),l.label=1;case 1:return s<u.length?(o=u[s],[5,n(o)]):[3,4];case 2:l.sent(),l.label=3;case 3:return s++,[3,1];case 4:return[2]}})})},e.prototype.renderSolidBorder=function(t,r,n){return VA(this,void 0,void 0,function(){return kA(this,function(a){return this.path(Vl(n,r)),this.ctx.fillStyle=LA(t),this.ctx.fill(),[2]})})},e.prototype.renderDoubleBorder=function(t,r,n,a){return VA(this,void 0,void 0,function(){var s,u;return kA(this,function(o){switch(o.label){case 0:return r<3?[4,this.renderSolidBorder(t,n,a)]:[3,2];case 1:return o.sent(),[2];case 2:return s=Ub(a,n),this.path(s),this.ctx.fillStyle=LA(t),this.ctx.fill(),u=Qb(a,n),this.path(u),this.ctx.fill(),[2]}})})},e.prototype.renderNodeBackgroundAndBorders=function(t){return VA(this,void 0,void 0,function(){var r,n,a,s,u,o,l,f,h=this;return kA(this,function(d){switch(d.label){case 0:return this.applyEffects(t.getEffects(2)),r=t.container.styles,n=!Xe(r.backgroundColor)||r.backgroundImage.length,a=[{style:r.borderTopStyle,color:r.borderTopColor,width:r.borderTopWidth},{style:r.borderRightStyle,color:r.borderRightColor,width:r.borderRightWidth},{style:r.borderBottomStyle,color:r.borderBottomColor,width:r.borderBottomWidth},{style:r.borderLeftStyle,color:r.borderLeftColor,width:r.borderLeftWidth}],s=Db(Rt(r.backgroundClip,0),t.curves),n||r.boxShadow.length?(this.ctx.save(),this.path(s),this.ctx.clip(),Xe(r.backgroundColor)||(this.ctx.fillStyle=LA(r.backgroundColor),this.ctx.fill()),[4,this.renderBackgroundImage(t.container)]):[3,2];case 1:d.sent(),this.ctx.restore(),r.boxShadow.slice(0).reverse().forEach(function(C){h.ctx.save();var p=ta(t.curves),T=C.inset?0:Lb,U=Tb(p,-T+(C.inset?1:-1)*C.spread.number,(C.inset?1:-1)*C.spread.number,C.spread.number*(C.inset?-2:2),C.spread.number*(C.inset?-2:2));C.inset?(h.path(p),h.ctx.clip(),h.mask(U)):(h.mask(p),h.ctx.clip(),h.path(U)),h.ctx.shadowOffsetX=C.offsetX.number+T,h.ctx.shadowOffsetY=C.offsetY.number,h.ctx.shadowColor=LA(C.color),h.ctx.shadowBlur=C.blur.number,h.ctx.fillStyle=C.inset?LA(C.color):"rgba(0,0,0,1)",h.ctx.fill(),h.ctx.restore()}),d.label=2;case 2:u=0,o=0,l=a,d.label=3;case 3:return o<l.length?(f=l[o],f.style!==0&&!Xe(f.color)&&f.width>0?f.style!==2?[3,5]:[4,this.renderDashedDottedBorder(f.color,f.width,u,t.curves,2)]:[3,11]):[3,13];case 4:return d.sent(),[3,11];case 5:return f.style!==3?[3,7]:[4,this.renderDashedDottedBorder(f.color,f.width,u,t.curves,3)];case 6:return d.sent(),[3,11];case 7:return f.style!==4?[3,9]:[4,this.renderDoubleBorder(f.color,f.width,u,t.curves)];case 8:return d.sent(),[3,11];case 9:return[4,this.renderSolidBorder(f.color,u,t.curves)];case 10:d.sent(),d.label=11;case 11:u++,d.label=12;case 12:return o++,[3,3];case 13:return[2]}})})},e.prototype.renderDashedDottedBorder=function(t,r,n,a,s){return VA(this,void 0,void 0,function(){var u,o,l,f,h,d,C,p,T,U,_,I,D,k,x,m,x,m;return kA(this,function(H){return this.ctx.save(),u=Fb(a,n),o=Vl(a,n),s===2&&(this.path(o),this.ctx.clip()),ue(o[0])?(l=o[0].start.x,f=o[0].start.y):(l=o[0].x,f=o[0].y),ue(o[1])?(h=o[1].end.x,d=o[1].end.y):(h=o[1].x,d=o[1].y),n===0||n===2?C=Math.abs(l-h):C=Math.abs(f-d),this.ctx.beginPath(),s===3?this.formatPath(u):this.formatPath(o.slice(0,2)),p=r<3?r*3:r*2,T=r<3?r*2:r,s===3&&(p=r,T=r),U=!0,C<=p*2?U=!1:C<=p*2+T?(_=C/(2*p+T),p*=_,T*=_):(I=Math.floor((C+T)/(p+T)),D=(C-I*p)/(I-1),k=(C-(I+1)*p)/I,T=k<=0||Math.abs(T-D)<Math.abs(T-k)?D:k),U&&(s===3?this.ctx.setLineDash([0,p+T]):this.ctx.setLineDash([p,T])),s===3?(this.ctx.lineCap="round",this.ctx.lineWidth=r):this.ctx.lineWidth=r*2+1.1,this.ctx.strokeStyle=LA(t),this.ctx.stroke(),this.ctx.setLineDash([]),s===2&&(ue(o[0])&&(x=o[3],m=o[0],this.ctx.beginPath(),this.formatPath([new O(x.end.x,x.end.y),new O(m.start.x,m.start.y)]),this.ctx.stroke()),ue(o[1])&&(x=o[1],m=o[2],this.ctx.beginPath(),this.formatPath([new O(x.end.x,x.end.y),new O(m.start.x,m.start.y)]),this.ctx.stroke())),this.ctx.restore(),[2]})})},e.prototype.render=function(t){return VA(this,void 0,void 0,function(){var r;return kA(this,function(n){switch(n.label){case 0:return this.options.backgroundColor&&(this.ctx.fillStyle=LA(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height)),r=bb(t),[4,this.renderStack(r)];case 1:return n.sent(),this.applyEffects([]),[2,this.canvas]}})})},e}(Xl),Hb=function(A){return A instanceof gl||A instanceof Bl?!0:A instanceof ni&&A.type!==jn&&A.type!==qn},Db=function(A,e){switch(A){case 0:return ta(e);case 2:return Eb(e);case 1:default:return ra(e)}},Ob=function(A){switch(A){case 1:return"center";case 2:return"right";case 0:default:return"left"}},Rb=["-apple-system","system-ui"],Mb=function(A){return/iPhone OS 15_(0|1)/.test(window.navigator.userAgent)?A.filter(function(e){return Rb.indexOf(e)===-1}):A},kb=function(A){he(e,A);function e(t,r){var n=A.call(this,t,r)||this;return n.canvas=r.canvas?r.canvas:document.createElement("canvas"),n.ctx=n.canvas.getContext("2d"),n.options=r,n.canvas.width=Math.floor(r.width*r.scale),n.canvas.height=Math.floor(r.height*r.scale),n.canvas.style.width=r.width+"px",n.canvas.style.height=r.height+"px",n.ctx.scale(n.options.scale,n.options.scale),n.ctx.translate(-r.x,-r.y),n.context.logger.debug("EXPERIMENTAL ForeignObject renderer initialized ("+r.width+"x"+r.height+" at "+r.x+","+r.y+") with scale "+r.scale),n}return e.prototype.render=function(t){return VA(this,void 0,void 0,function(){var r,n;return kA(this,function(a){switch(a.label){case 0:return r=ei(this.options.width*this.options.scale,this.options.height*this.options.scale,this.options.scale,this.options.scale,t),[4,Pb(r)];case 1:return n=a.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=LA(this.options.backgroundColor),this.ctx.fillRect(0,0,this.options.width*this.options.scale,this.options.height*this.options.scale)),this.ctx.drawImage(n,-this.options.x*this.options.scale,-this.options.y*this.options.scale),[2,this.canvas]}})})},e}(Xl),Pb=function(A){return new Promise(function(e,t){var r=new Image;r.onload=function(){e(r)},r.onerror=t,r.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(A))})},Kb=function(){function A(e){var t=e.id,r=e.enabled;this.id=t,this.enabled=r,this.start=Date.now()}return A.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.enabled&&(typeof window<"u"&&window.console&&typeof console.debug=="function"?console.debug.apply(console,Bn([this.id,this.getTime()+"ms"],e)):this.info.apply(this,e))},A.prototype.getTime=function(){return Date.now()-this.start},A.prototype.info=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.enabled&&typeof window<"u"&&window.console&&typeof console.info=="function"&&console.info.apply(console,Bn([this.id,this.getTime()+"ms"],e))},A.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.enabled&&(typeof window<"u"&&window.console&&typeof console.warn=="function"?console.warn.apply(console,Bn([this.id,this.getTime()+"ms"],e)):this.info.apply(this,e))},A.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.enabled&&(typeof window<"u"&&window.console&&typeof console.error=="function"?console.error.apply(console,Bn([this.id,this.getTime()+"ms"],e)):this.info.apply(this,e))},A.instances={},A}(),Vb=function(){function A(e,t){var r;this.windowBounds=t,this.instanceName="#"+A.instanceCount++,this.logger=new Kb({id:this.instanceName,enabled:e.logging}),this.cache=(r=e.cache)!==null&&r!==void 0?r:new ob(this,e)}return A.instanceCount=1,A}(),Gb=function(A,e){return e===void 0&&(e={}),Yb(A,e)};typeof window<"u"&&Ol.setContext(window);var Yb=function(A,e){return VA(void 0,void 0,void 0,function(){var t,r,n,a,s,u,o,l,f,h,d,C,p,T,U,_,I,D,k,x,H,m,H,P,M,eA,uA,fA,J,rA,oA,hA,pA,GA,IA,KA,xA,ZA,_A,S;return kA(this,function(v){switch(v.label){case 0:if(!A||typeof A!="object")return[2,Promise.reject("Invalid element provided as first argument")];if(t=A.ownerDocument,!t)throw new Error("Element is not attached to a Document");if(r=t.defaultView,!r)throw new Error("Document is not attached to a Window");return n={allowTaint:(P=e.allowTaint)!==null&&P!==void 0?P:!1,imageTimeout:(M=e.imageTimeout)!==null&&M!==void 0?M:15e3,proxy:e.proxy,useCORS:(eA=e.useCORS)!==null&&eA!==void 0?eA:!1},a=Cs({logging:(uA=e.logging)!==null&&uA!==void 0?uA:!0,cache:e.cache},n),s={windowWidth:(fA=e.windowWidth)!==null&&fA!==void 0?fA:r.innerWidth,windowHeight:(J=e.windowHeight)!==null&&J!==void 0?J:r.innerHeight,scrollX:(rA=e.scrollX)!==null&&rA!==void 0?rA:r.pageXOffset,scrollY:(oA=e.scrollY)!==null&&oA!==void 0?oA:r.pageYOffset},u=new Fe(s.scrollX,s.scrollY,s.windowWidth,s.windowHeight),o=new Vb(a,u),l=(hA=e.foreignObjectRendering)!==null&&hA!==void 0?hA:!1,f={allowTaint:(pA=e.allowTaint)!==null&&pA!==void 0?pA:!1,onclone:e.onclone,ignoreElements:e.ignoreElements,inlineImages:l,copyStyles:l},o.logger.debug("Starting document clone with size "+u.width+"x"+u.height+" scrolled to "+-u.left+","+-u.top),h=new Hl(o,A,f),d=h.clonedReferenceElement,d?[4,h.toIFrame(t,u)]:[2,Promise.reject("Unable to find element in cloned iframe")];case 1:return C=v.sent(),p=si(d)||XT(d)?Tp(d.ownerDocument):gn(o,d),T=p.width,U=p.height,_=p.left,I=p.top,D=Xb(o,d,e.backgroundColor),k={canvas:e.canvas,backgroundColor:D,scale:(IA=(GA=e.scale)!==null&&GA!==void 0?GA:r.devicePixelRatio)!==null&&IA!==void 0?IA:1,x:((KA=e.x)!==null&&KA!==void 0?KA:0)+_,y:((xA=e.y)!==null&&xA!==void 0?xA:0)+I,width:(ZA=e.width)!==null&&ZA!==void 0?ZA:Math.ceil(T),height:(_A=e.height)!==null&&_A!==void 0?_A:Math.ceil(U)},l?(o.logger.debug("Document cloned, using foreign object rendering"),H=new kb(o,k),[4,H.render(d)]):[3,3];case 2:return x=v.sent(),[3,5];case 3:return o.logger.debug("Document cloned, element located at "+_+","+I+" with size "+T+"x"+U+" using computed rendering"),o.logger.debug("Starting DOM parsing"),m=pl(o,d),D===m.styles.backgroundColor&&(m.styles.backgroundColor=_e.TRANSPARENT),o.logger.debug("Starting renderer for element at "+k.x+","+k.y+" with size "+k.width+"x"+k.height),H=new xb(o,k),[4,H.render(m)];case 4:x=v.sent(),v.label=5;case 5:return(!((S=e.removeContainer)!==null&&S!==void 0)||S)&&(Hl.destroy(C)||o.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore")),o.logger.debug("Finished rendering"),[2,x]}})})},Xb=function(A,e,t){var r=e.ownerDocument,n=r.documentElement?Fr(A,getComputedStyle(r.documentElement).backgroundColor):_e.TRANSPARENT,a=r.body?Fr(A,getComputedStyle(r.body).backgroundColor):_e.TRANSPARENT,s=typeof t=="string"?Fr(A,t):t===null?_e.TRANSPARENT:4294967295;return e===r.documentElement?Xe(n)?Xe(a)?s:a:n:s};const Wb=c.defineComponent({name:"GpIframe",props:{htmlContent:{type:String,required:!0},jsFiles:{type:Array,default:[]},cssFiles:{type:Array,default:[]},iframeStyle:{type:Object,default:()=>({width:"100%",height:"100%",border:"none"})}},setup(A){const e=c.ref(null),t=c.ref(),r=()=>{var C;const a=e.value;if(!a)return;const s=a.contentDocument||((C=a.contentWindow)==null?void 0:C.document);if(!s)return;s.open(),s.write("<!DOCTYPE html><html><head></head><body></body></html>"),s.close();const u=s.head;A.cssFiles.forEach(p=>{const T=s.createElement("link");T.rel="stylesheet",T.href=p,u.appendChild(T)});const o=s.createElement("link");o.rel="stylesheet",o.href="/spa/topic/css/style.css",u.appendChild(o);const l=s.createElement("script");l.src="/spa/topic/js/jquery-3.6.0.min.js",l.async=!1,u.appendChild(l);const f=s.createElement("script");f.src="/spa/topic/js/swiper-bundle.min.js",f.async=!1,u.appendChild(f);const h=s.createElement("script");h.src="/spa/topic/js/index.js",h.async=!1,u.appendChild(h);const d=s.body;d.innerHTML=A.htmlContent,A.jsFiles.forEach(p=>{const T=s.createElement("script");T.src=p,T.async=!1,d.appendChild(T)}),t.value=d,c.nextTick(()=>{})};c.watch(t,a=>{if(!a)return;new MutationObserver(()=>{const u=e.value;u&&(u.style.height=`${a.scrollHeight}px`)}).observe(a,{childList:!0,subtree:!0})});const n=async a=>{var l;const s=e.value;if(!s)return;const u=s.contentDocument||((l=s.contentWindow)==null?void 0:l.document);if(!u)return;const o=u.body;if(o)try{await c.nextTick();const f=await Gb(o,{x:0,y:0,scrollX:window.scrollX,scrollY:window.scrollY,useCORS:!0,allowTaint:!0,foreignObjectRendering:!1});a?a(f):f.toBlob(h=>{const d=URL.createObjectURL(h);window.open(d,"_blank")})}catch(f){console.error("截图生成失败:",f)}};return c.watch(()=>[A.htmlContent,A.jsFiles,A.cssFiles],r,{deep:!0}),c.onMounted(()=>{r()}),{iframeRef:e,generateCover:n}}});function Jb(A,e,t,r,n,a){return c.openBlock(),c.createElementBlock("div",null,[c.createElementVNode("iframe",{ref:"iframeRef",style:c.normalizeStyle([{"min-height":"600px"},A.iframeStyle])},null,4)])}const Wl=Oe(Wb,[["render",Jb],["__scopeId","data-v-e1815181"]]),qb={class:"flex gp-dsigner"},jb={key:0,class:"flex items-center justify-between border-b"},$b={class:"text-lg font-bold p-2"},Zb={class:"text-sm font-thin text-gray-500"},zb={class:"flex-1 overflow-auto"},AU={key:0,class:"flex justify-between items-center border-b p-2"},eU={class:"flex items-center"},tU={class:"p-2"},rU={class:"sticky top-0"},nU={key:0,class:"text-lg font-bold border-b p-2"},aU={class:"text-sm font-thin text-gray-500"},sU={class:"p-2"},Jl=Oe(c.defineComponent({__name:"Designer",props:{mode:{default:"design"},template:{},css:{},js:{},previewWidth:{default:360},uploadByFile:{},icons:{},rules:{},preview:{type:Boolean,default:!0},showTitle:{type:Boolean,default:!0}},emits:["update:modelValue","update:element"],setup(A,{expose:e,emit:t}){const r=A,n=t,a=c.ref(r.rules||[]),s=c.ref(r.template),u=c.ref();let o=co("",{},!1);const l=c.ref("");c.watch(()=>r.template,F=>{s.value=F},{immediate:!0}),c.watch(()=>s.value,F=>{F&&(u.value=fA(F))},{immediate:!0}),c.watch(()=>r.css,F=>{F.forEach(L=>{if(document.querySelector(`link[href="${L}"]`))return;const K=document.createElement("link");K.rel="stylesheet",K.href=L,document.head.appendChild(K)})},{immediate:!0}),c.watch(()=>r.js,F=>{!F||F.length===0||F.forEach(L=>{if(document.querySelector(`script[src="${L}"]`))return;const K=document.createElement("script");K.src=L,document.body.appendChild(K)})},{immediate:!0});const f=c.ref(r.mode);c.watch(()=>u.value,F=>{F&&n("update:element",F)},{immediate:!0});const h=c.ref("");c.watch(()=>l.value,F=>{n("update:modelValue",F)},{immediate:!0});const d=c.ref(),C=c.ref(),p=c.ref(),T=c.ref(),U=c.ref(),_=c.ref(),I=c.ref(""),D=c.ref(r.mode==="design");c.watch(()=>r.rules,F=>{a.value=F,s.value&&(u.value=fA(s.value))},{immediate:!0});function k(F=void 0){T.value&&T.value.generateCover(F)}function x(F){U.value=F}function m(F,L=""){if(L){const K=H(u.value,L);K?_.value=K:_.value=F}else _.value=F}function H(F,L){if(F.xpath===L)return F;if(F.children&&F.children.length)for(const K of F.children){const V=H(K,L);if(V)return V}}function P(F,L){var K,V;return F.tag===L.tag&&((K=F.children)==null?void 0:K.length)===((V=L.children)==null?void 0:V.length)}function M(F){if(U.value.xpath==F.xpath){if(U.value){if(F.type===W.Block){var L=!0;const K=H(u.value,U.value.parentxpath||"");if(K&&K.children&&K.children.forEach(V=>{if(V.tag!=U.value.tag||!P(V,U.value)){L=!1;return}}),!L){j.error("同级结构不一致,错误配置!");return}}if(U.value.rule=F.rule,U.value.type=F.type,U.value.type===W.Block){const K=H(u.value,U.value.parentxpath||"");K&&K.children&&(K.children.forEach(V=>{if(V.tag!=U.value.tag||!P(V,U.value)){j.error("同级结构不一致,无法配置为块类型");return}}),K.children.forEach(V=>{V.tag===U.value.tag&&(V.rule=F.rule,V.type=F.type)}))}}h.value=new Date().getTime().toString(),j.success("保存成功"),n("update:element",u.value)}}function eA(F){const L=H(u.value,F.xpath||"");L&&(L.rule=F.rule,L.type=F.type,L.children&&F.children&&L.children.forEach(K=>{const V=F.children.find(CA=>CA.xpath===K.xpath);V&&(K.rule=V.rule,K.type=V.type)})),j.success("操作成功"),h.value=new Date().getTime().toString(),n("update:element",u.value)}function uA(F){l.value=F}function fA(F){o=co(F);const L=o("body").children().toArray().map(K=>J(o(K)));return l.value=o("body").html()||"",L[0]}function J(F,L=""){var YA;function K(HA){if(!HA||!HA[0])return"";const $e=[];let cA=HA;for(;cA.length&&cA[0].tagName!=="html";){const ua=cA[0].tagName,uU=cA.parent().children(ua).index(cA)+1;$e.unshift(`${ua}[${uU}]`),cA=cA.parent()}return"/html/"+$e.join("/")}const V=K(F).replace("/html/body[1]",""),CA=F.children().toArray().map(HA=>J(o(HA),V)),te=(YA=a.value)==null?void 0:YA.find(HA=>HA.xpath===V);return{tag:F[0].tagName,text:F.contents().not(F.children()).text().trim(),attrs:F[0].attribs,children:CA,xpath:V,parentxpath:L,type:(te==null?void 0:te.type)||W.None,rule:(te==null?void 0:te.rule)||{}}}function rA(F){const L=H(u.value,F.element.xpath);if(L){const K=c.toRaw(L);K.editText=F.newText}}function oA(F,L=""){function K(V,CA){var HA;const YA=(CA?((HA=H(u.value,CA))==null?void 0:HA.children)||[]:[u.value]).filter($e=>$e.tag===V.tag).indexOf(V)+1;return`${CA}/${V.tag}[${YA}]`}F.xpath=K(F,L),F.parentxpath=L,(F.children||[]).forEach(V=>oA(V,F.xpath))}function hA({action:F,element:L,newBlock:K}){const V=H(u.value,L.parentxpath||"");if(!V||!V.children)return;const CA=V.children.findIndex(cA=>cA===L);if(CA===-1){j.error("未找到元素");return}const te=V.children.length,{minBlock:YA,maxBlock:HA}=L.rule;if((F==="add"||F==="copy")&&te>=(HA||1/0)){I.value=`无法添加更多块。最大块数量为 ${HA}`,j.error(I.value);return}function $e(cA){cA.xpath="",cA.parentxpath="",cA.text=cA.editText||cA.text,cA.editText="",cA.children.forEach(ua=>{$e(ua)})}switch(F){case"add":if(K){const cA={...K,children:JSON.parse(JSON.stringify(K.children))};$e(cA),V.children.splice(CA+1,0,cA),j.success("添加成功")}break;case"copy":if(K){const cA={...K,children:JSON.parse(JSON.stringify(K.children))};$e(cA),V.children.splice(CA+1,0,cA),j.success("复制成功")}break;case"moveUp":if(CA>0){const[cA]=V.children.splice(CA,1);V.children.splice(CA-1,0,cA),j.success("前移成功")}else j.error("已经是第一个块,无法前移");break;case"moveDown":if(CA<V.children.length-1){const[cA]=V.children.splice(CA,1);V.children.splice(CA+1,0,cA),j.success("后移成功")}else j.error("已经是最后一个块,无法后移");break;case"delete":if(te<=(YA||0)){I.value=`无法删除更多块。最小块数量为 ${YA}`,j.error(I.value);return}V.children.splice(CA,1),j.success("删除成功");break}I.value="",oA(u.value)}function pA(F,L){let K=L.attrs.class.replace(/icon-\S+/g,`icon-${F}`);L.attrs.class=K}function GA(F){const L=F.file,K=H(u.value,F.element.xpath);if(r.uploadByFile)r.uploadByFile(L).then(V=>{V.success&&(K.attrs.src=V.file.url,h.value=new Date().getTime().toString())});else{K.attrs.alt=L.name;const V=URL.createObjectURL(L);K.attrs.src=V,h.value=new Date().getTime().toString()}}function IA(F){const{icon:L}=F,K=H(u.value,F.element.xpath);let V=K.attrs.class.replace(/icon-\S+/g,`icon-${L}`);K.attrs.class=V,h.value=new Date().getTime().toString()}const KA=F=>F.type.startsWith("image/")?!0:(j.error("只能上传图片文件"),!1),xA=c.ref({});function ZA(F,L){if(!F||F.length===0)return;const K=F[0];if(L.rule&&(L.rule.minImageWidth||L.rule.maxImageHeight)){if(L.rule.minImageWidth&&K.width<L.rule.minImageWidth){j.error(`图片宽度不能小于 ${L.rule.minImageWidth}px`);return}if(L.rule.maxImageHeight&&K.height<L.rule.maxImageHeight){j.error(`图片高度不能小于 ${L.rule.maxImageHeight}px`);return}}L.rule.minImageWidth&&L.rule.maxImageHeight?(xA.value.width=L.rule.minImageWidth,xA.value.height=L.rule.maxImageHeight,xA.value.aspectRatio=L.rule.minImageWidth/L.rule.maxImageHeight):xA.value={},K&&(L.rule.crop?(K.thumbUrl,d.value.handleOpenCropper(xA.value,K.file,K.name,L)):r.uploadByFile?r.uploadByFile(K.file).then(V=>{V.success&&(L.attrs.src=V.file.url,h.value=new Date().getTime().toString())}):(L.attrs.src=K.thumbUrl,h.value=new Date().getTime().toString()))}const _A=c.ref(r.previewWidth),S=c.ref(360);let v=c.ref(!1),q=c.ref(""),$=0,zA=0;function je(F){q.value=F,v.value=!0,$=event.clientX,F==="preview"?zA=_A.value:F==="structure"&&(zA=S.value),window.addEventListener("mousemove",Lr),window.addEventListener("mouseup",xr)}function Lr(F){if(!v.value)return;const L=F.clientX-$;q.value==="preview"?_A.value=Math.max(200,zA+L):q.value==="structure"&&(S.value=Math.max(200,zA-L))}function xr(){v.value=!1,q.value="",window.removeEventListener("mousemove",Lr),window.removeEventListener("mouseup",xr)}return e({generateCover:k}),(F,L)=>(c.openBlock(),c.createElementBlock("div",qb,[F.preview?(c.openBlock(),c.createElementBlock("div",{key:0,class:"border-l overflow-auto resize-area",style:c.normalizeStyle({width:_A.value+"px"})},[F.showTitle?(c.openBlock(),c.createElementBlock("div",jb,[c.createElementVNode("h2",$b,[L[4]||(L[4]=c.createTextVNode(" 实时预览 ")),c.createElementVNode("span",Zb,c.toDisplayString(_A.value)+"px",1)]),c.createElementVNode("div",{onClick:L[0]||(L[0]=()=>k()),class:"p-2 cursor-pointer text-blue-500"}," 封面 ")])):c.createCommentVNode("",!0),c.createElementVNode("div",null,[l.value?(c.openBlock(),c.createBlock(Wl,{key:0,"css-files":F.css,"js-files":F.js,"html-content":l.value,class:"gp-designer-preview",ref_key:"previewRef",ref:T},null,8,["css-files","js-files","html-content"])):(c.openBlock(),c.createBlock(Wl,{key:1,"css-files":F.css,"js-files":F.js,"html-content":c.unref(o)("body").html(),class:"gp-designer-preview",ref_key:"previewRef",ref:T},null,8,["css-files","js-files","html-content"]))])],4)):c.createCommentVNode("",!0),F.preview?(c.openBlock(),c.createElementBlock("div",{key:1,class:"resizer",onMousedown:L[1]||(L[1]=K=>je("preview"))},null,32)):c.createCommentVNode("",!0),c.createElementVNode("div",zb,[F.showTitle?(c.openBlock(),c.createElementBlock("div",AU,[L[6]||(L[6]=c.createElementVNode("h2",{class:"text-lg font-bold"},"结构渲染",-1)),c.createElementVNode("div",eU,[c.withDirectives(c.createElementVNode("input",{"onUpdate:modelValue":L[2]||(L[2]=K=>D.value=K),type:"checkbox",id:"showMargin",class:"mr-2"},null,512),[[c.vModelCheckbox,D.value]]),L[5]||(L[5]=c.createElementVNode("label",{for:"showMargin"},"间距",-1))])])):c.createCommentVNode("",!0),c.createElementVNode("div",tU,[u.value?(c.openBlock(),c.createBlock(CE,{key:0,"upload-by-file":F.uploadByFile,cropper:d.value,icon:C.value,upload:p.value,mode:F.mode,icons:F.icons,r:h.value,"show-margin":D.value,element:u.value,selectedElement:U.value,hoveredElement:_.value,onSelectElement:x,onHoverElement:m,onContentUpdated:uA,onUpdateText:rA,onBlockAction:hA,onAddIcon:pA,onUpdateElementRule:eA},null,8,["upload-by-file","cropper","icon","upload","mode","icons","r","show-margin","element","selectedElement","hoveredElement"])):c.createCommentVNode("",!0)])]),f.value=="design"?(c.openBlock(),c.createElementBlock("div",{key:2,class:"resizer",onMousedown:L[3]||(L[3]=K=>je("structure"))},null,32)):c.createCommentVNode("",!0),f.value=="design"?(c.openBlock(),c.createElementBlock("div",{key:3,class:"resize-area",style:c.normalizeStyle({width:S.value+"px"})},[c.createElementVNode("div",rU,[F.showTitle?(c.openBlock(),c.createElementBlock("h2",nU,[L[7]||(L[7]=c.createTextVNode(" 节点属性 ")),c.createElementVNode("span",aU,c.toDisplayString(S.value)+"px",1)])):c.createCommentVNode("",!0),c.createElementVNode("div",sU,[U.value?(c.openBlock(),c.createBlock(YE,{key:0,element:U.value,onUpdateElement:M},null,8,["element"])):c.createCommentVNode("",!0)])])],4)):c.createCommentVNode("",!0),c.createVNode(ep,{ref_key:"cropperRef",ref:d,onOk:GA},null,512),c.createVNode(fp,{icons:F.icons,ref_key:"iconRef",ref:C,onOk:IA},null,8,["icons"]),c.createVNode(wp,{ref_key:"uploadRef",ref:p,multiple:!1,show:!1,beforeUpload:KA,onChange:ZA},{"upload-icon":c.withCtx(()=>L[8]||(L[8]=[c.createElementVNode("div",{class:"p-2"},"上传",-1)])),_:1},512)]))}}),[["__scopeId","data-v-0670a162"]]),iU={install(A){A.component("Designer",Jl)}};Ne.Designer=Jl,Ne.default=iU,Object.defineProperties(Ne,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
@@ -12,6 +12,11 @@
|
|
12
12
|
_MEIQIA('entId', 37196);
|
13
13
|
_MEIQIA('withoutBtn');
|
14
14
|
|
15
|
+
// //显示美洽窗口
|
16
|
+
// $('.gp-designer-meiqia').click(function () {
|
17
|
+
// _MEIQIA('showPanel');
|
18
|
+
// });
|
19
|
+
|
15
20
|
// 按专业区分客服,需要写接口
|
16
21
|
// if (typeof (meiqiaToken) != "undefined" && meiqiaToken) {
|
17
22
|
// _MEIQIA('assign', {
|