@gis_victory/gismap 2.0.52 → 2.0.53
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/gismap.css +1 -1
- package/dist/index.es.js +1 -1
- package/dist/index.umd.js +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -9,4 +9,4 @@ import e from"@gis_victory/mapbox-gl";import{ref as t,readonly as A,inject as r,
|
|
|
9
9
|
/* @__PURE__ */function(){return function(e,t){this.path=e,this.target=t,this.type=1}}(),ik=
|
|
10
10
|
/* @__PURE__ */function(){return function(e){this.opacity=e,this.type=2,this.target=6}}(),ok=function(e){return 1===e.type},lk=function(e,t){return e.length===t.length&&e.some(function(e,A){return e===t[A]})},ck=
|
|
11
11
|
/* @__PURE__ */function(){return function(e){this.element=e,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}}(),uk=function(){function e(e,t){if(this.container=e,this.parent=t,this.effects=[],this.curves=new tk(this.container),this.container.styles.opacity<1&&this.effects.push(new ik(this.container.styles.opacity)),null!==this.container.styles.transform){var A=this.container.bounds.left+this.container.styles.transformOrigin[0].number,r=this.container.bounds.top+this.container.styles.transformOrigin[1].number,a=this.container.styles.transform;this.effects.push(new nk(A,r,a))}if(0!==this.container.styles.overflowX){var n=rk(this.curves),s=ak(this.curves);lk(n,s)?this.effects.push(new sk(n,6)):(this.effects.push(new sk(n,2)),this.effects.push(new sk(s,4)))}}return e.prototype.getEffects=function(e){for(var t=-1===[2,3].indexOf(this.container.styles.position),A=this.parent,r=this.effects.slice(0);A;){var a=A.effects.filter(function(e){return!ok(e)});if(t||0!==A.container.styles.position||!A.parent){if(r.unshift.apply(r,a),t=-1===[2,3].indexOf(A.container.styles.position),0!==A.container.styles.overflowX){var n=rk(A.curves),s=ak(A.curves);lk(n,s)||r.unshift(new sk(s,6))}}else r.unshift.apply(r,a);A=A.parent}return r.filter(function(t){return FU(t.target,e)})},e}(),dk=function(e,t,A,r){e.container.elements.forEach(function(a){var n=FU(a.flags,4),s=FU(a.flags,2),i=new uk(a,e);FU(a.styles.display,2048)&&r.push(i);var o=FU(a.flags,8)?[]:r;if(n||s){var l=n||a.styles.isPositioned()?A:t,c=new ck(i);if(a.styles.isPositioned()||a.styles.opacity<1||a.styles.isTransformed()){var u=a.styles.zIndex.order;if(u<0){var d=0;l.negativeZIndex.some(function(e,t){return u>e.element.container.styles.zIndex.order?(d=t,!1):d>0}),l.negativeZIndex.splice(d,0,c)}else if(u>0){var h=0;l.positiveZIndex.some(function(e,t){return u>=e.element.container.styles.zIndex.order?(h=t+1,!1):h>0}),l.positiveZIndex.splice(h,0,c)}else l.zeroOrAutoZIndexOrTransformedOrOpacity.push(c)}else a.styles.isFloating()?l.nonPositionedFloats.push(c):l.nonPositionedInlineLevel.push(c);dk(i,c,n?c:A,o)}else a.styles.isInlineLevel()?t.inlineLevel.push(i):t.nonInlineLevel.push(i),dk(i,t,A,o);FU(a.flags,8)&&hk(a,o)})},hk=function(e,t){for(var A=e instanceof xM?e.start:1,r=e instanceof xM&&e.reversed,a=0;a<t.length;a++){var n=t[a];n.container instanceof EM&&"number"==typeof n.container.value&&0!==n.container.value&&(A=n.container.value),n.listValue=bS(A,n.container.styles.listStyleType,!0),A+=r?-1:1}},pk=function(e,t){switch(t){case 0:return gk(e.topLeftBorderBox,e.topLeftPaddingBox,e.topRightBorderBox,e.topRightPaddingBox);case 1:return gk(e.topRightBorderBox,e.topRightPaddingBox,e.bottomRightBorderBox,e.bottomRightPaddingBox);case 2:return gk(e.bottomRightBorderBox,e.bottomRightPaddingBox,e.bottomLeftBorderBox,e.bottomLeftPaddingBox);default:return gk(e.bottomLeftBorderBox,e.bottomLeftPaddingBox,e.topLeftBorderBox,e.topLeftPaddingBox)}},fk=function(e,t){var A=[];return ek(e)?A.push(e.subdivide(.5,!1)):A.push(e),ek(t)?A.push(t.subdivide(.5,!0)):A.push(t),A},gk=function(e,t,A,r){var a=[];return ek(e)?a.push(e.subdivide(.5,!1)):a.push(e),ek(A)?a.push(A.subdivide(.5,!0)):a.push(A),ek(r)?a.push(r.subdivide(.5,!0).reverse()):a.push(r),ek(t)?a.push(t.subdivide(.5,!1).reverse()):a.push(t),a},mk=function(e){var t=e.bounds,A=e.styles;return t.add(A.borderLeftWidth,A.borderTopWidth,-(A.borderRightWidth+A.borderLeftWidth),-(A.borderTopWidth+A.borderBottomWidth))},vk=function(e){var t=e.styles,A=e.bounds,r=vE(t.paddingLeft,A.width),a=vE(t.paddingRight,A.width),n=vE(t.paddingTop,A.width),s=vE(t.paddingBottom,A.width);return A.add(r+t.borderLeftWidth,n+t.borderTopWidth,-(t.borderRightWidth+t.borderLeftWidth+r+a),-(t.borderTopWidth+t.borderBottomWidth+n+s))},yk=function(e,t,A){var r,a,n=(r=Ck(e.styles.backgroundOrigin,t),a=e,0===r?a.bounds:2===r?vk(a):mk(a)),s=function(e,t){return 0===e?t.bounds:2===e?vk(t):mk(t)}(Ck(e.styles.backgroundClip,t),e),i=bk(Ck(e.styles.backgroundSize,t),A,n),o=i[0],l=i[1],c=mE(Ck(e.styles.backgroundPosition,t),n.width-o,n.height-l);return[Qk(Ck(e.styles.backgroundRepeat,t),c,i,n,s),Math.round(n.left+c[0]),Math.round(n.top+c[1]),o,l]},wk=function(e){return aE(e)&&e.value===ex.AUTO},Bk=function(e){return"number"==typeof e},bk=function(e,t,A){var r=t[0],a=t[1],n=t[2],s=e[0],i=e[1];if(!s)return[0,0];if(dE(s)&&i&&dE(i))return[vE(s,A.width),vE(i,A.height)];var o=Bk(n);if(aE(s)&&(s.value===ex.CONTAIN||s.value===ex.COVER))return Bk(n)?A.width/A.height<n!=(s.value===ex.COVER)?[A.width,A.width/n]:[A.height*n,A.height]:[A.width,A.height];var l=Bk(r),c=Bk(a),u=l||c;if(wk(s)&&(!i||wk(i)))return l&&c?[r,a]:o||u?u&&o?[l?r:a*n,c?a:r/n]:[l?r:A.width,c?a:A.height]:[A.width,A.height];if(o){var d=0,h=0;return dE(s)?d=vE(s,A.width):dE(i)&&(h=vE(i,A.height)),wk(s)?d=h*n:i&&!wk(i)||(h=d/n),[d,h]}var p=null,f=null;if(dE(s)?p=vE(s,A.width):i&&dE(i)&&(f=vE(i,A.height)),null===p||i&&!wk(i)||(f=l&&c?p/r*a:A.height),null!==f&&wk(s)&&(p=l&&c?f/a*r:A.width),null!==p&&null!==f)return[p,f];throw new Error("Unable to calculate background-size for element")},Ck=function(e,t){var A=e[t];return void 0===A?e[0]:A},Qk=function(e,t,A,r,a){var n=t[0],s=t[1],i=A[0],o=A[1];switch(e){case 2:return[new JS(Math.round(r.left),Math.round(r.top+s)),new JS(Math.round(r.left+r.width),Math.round(r.top+s)),new JS(Math.round(r.left+r.width),Math.round(o+r.top+s)),new JS(Math.round(r.left),Math.round(o+r.top+s))];case 3:return[new JS(Math.round(r.left+n),Math.round(r.top)),new JS(Math.round(r.left+n+i),Math.round(r.top)),new JS(Math.round(r.left+n+i),Math.round(r.height+r.top)),new JS(Math.round(r.left+n),Math.round(r.height+r.top))];case 1:return[new JS(Math.round(r.left+n),Math.round(r.top+s)),new JS(Math.round(r.left+n+i),Math.round(r.top+s)),new JS(Math.round(r.left+n+i),Math.round(r.top+s+o)),new JS(Math.round(r.left+n),Math.round(r.top+s+o))];default:return[new JS(Math.round(a.left),Math.round(a.top)),new JS(Math.round(a.left+a.width),Math.round(a.top)),new JS(Math.round(a.left+a.width),Math.round(a.height+a.top)),new JS(Math.round(a.left),Math.round(a.height+a.top))]}},Fk="Hidden Text",Ek=function(){function e(e){this._data={},this._document=e}return e.prototype.parseMetrics=function(e,t){var A=this._document.createElement("div"),r=this._document.createElement("img"),a=this._document.createElement("span"),n=this._document.body;A.style.visibility="hidden",A.style.fontFamily=e,A.style.fontSize=t,A.style.margin="0",A.style.padding="0",A.style.whiteSpace="nowrap",n.appendChild(A),r.src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",r.width=1,r.height=1,r.style.margin="0",r.style.padding="0",r.style.verticalAlign="baseline",a.style.fontFamily=e,a.style.fontSize=t,a.style.margin="0",a.style.padding="0",a.appendChild(this._document.createTextNode(Fk)),A.appendChild(a),A.appendChild(r);var s=r.offsetTop-a.offsetTop+2;A.removeChild(a),A.appendChild(this._document.createTextNode(Fk)),A.style.lineHeight="normal",r.style.verticalAlign="super";var i=r.offsetTop-A.offsetTop+2;return n.removeChild(A),{baseline:s,middle:i}},e.prototype.getMetrics=function(e,t){var A=e+" "+t;return void 0===this._data[A]&&(this._data[A]=this.parseMetrics(e,t)),this._data[A]},e}(),xk=
|
|
12
|
-
/* @__PURE__ */function(){return function(e,t){this.context=e,this.options=t}}(),Uk=function(e){function t(t,A){var r=e.call(this,t,A)||this;return r._activeEffects=[],r.canvas=A.canvas?A.canvas:document.createElement("canvas"),r.ctx=r.canvas.getContext("2d"),A.canvas||(r.canvas.width=Math.floor(A.width*A.scale),r.canvas.height=Math.floor(A.height*A.scale),r.canvas.style.width=A.width+"px",r.canvas.style.height=A.height+"px"),r.fontMetrics=new Ek(document),r.ctx.scale(r.options.scale,r.options.scale),r.ctx.translate(-A.x,-A.y),r.ctx.textBaseline="bottom",r._activeEffects=[],r.context.logger.debug("Canvas renderer initialized ("+A.width+"x"+A.height+") with scale "+A.scale),r}return iQ(t,e),t.prototype.applyEffects=function(e){for(var t=this;this._activeEffects.length;)this.popEffect();e.forEach(function(e){return t.applyEffect(e)})},t.prototype.applyEffect=function(e){this.ctx.save(),function(e){return 2===e.type}(e)&&(this.ctx.globalAlpha=e.opacity),function(e){return 0===e.type}(e)&&(this.ctx.translate(e.offsetX,e.offsetY),this.ctx.transform(e.matrix[0],e.matrix[1],e.matrix[2],e.matrix[3],e.matrix[4],e.matrix[5]),this.ctx.translate(-e.offsetX,-e.offsetY)),ok(e)&&(this.path(e.path),this.ctx.clip()),this._activeEffects.push(e)},t.prototype.popEffect=function(){this._activeEffects.pop(),this.ctx.restore()},t.prototype.renderStack=function(e){return lQ(this,0,void 0,function(){return cQ(this,function(t){switch(t.label){case 0:return e.element.container.styles.isVisible()?[4,this.renderStackContent(e)]:[3,2];case 1:t.sent(),t.label=2;case 2:return[2]}})})},t.prototype.renderNode=function(e){return lQ(this,0,void 0,function(){return cQ(this,function(t){switch(t.label){case 0:return FU(e.container.flags,16),e.container.styles.isVisible()?[4,this.renderNodeBackgroundAndBorders(e)]:[3,3];case 1:return t.sent(),[4,this.renderNodeContent(e)];case 2:t.sent(),t.label=3;case 3:return[2]}})})},t.prototype.renderTextWithLetterSpacing=function(e,t,A){var r=this;0===t?this.ctx.fillText(e.text,e.bounds.left,e.bounds.top+A):fM(e.text).reduce(function(t,a){return r.ctx.fillText(a,t,e.bounds.top+A),t+r.ctx.measureText(a).width},e.bounds.left)},t.prototype.createFontStyle=function(e){var t=e.fontVariant.filter(function(e){return"normal"===e||"small-caps"===e}).join(""),A=Ik(e.fontFamily).join(", "),r=AE(e.fontSize)?""+e.fontSize.number+e.fontSize.unit:e.fontSize.number+"px";return[[e.fontStyle,t,e.fontWeight,r,A].join(" "),A,r]},t.prototype.renderTextNode=function(e,t){return lQ(this,0,void 0,function(){var A,r,a,n,s,i,o,l,c=this;return cQ(this,function(u){return A=this.createFontStyle(t),r=A[0],a=A[1],n=A[2],this.ctx.font=r,this.ctx.direction=1===t.direction?"rtl":"ltr",this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic",s=this.fontMetrics.getMetrics(a,n),i=s.baseline,o=s.middle,l=t.paintOrder,e.textBounds.forEach(function(e){l.forEach(function(A){switch(A){case 0:c.ctx.fillStyle=xE(t.color),c.renderTextWithLetterSpacing(e,t.letterSpacing,i);var r=t.textShadow;r.length&&e.text.trim().length&&(r.slice(0).reverse().forEach(function(A){c.ctx.shadowColor=xE(A.color),c.ctx.shadowOffsetX=A.offsetX.number*c.options.scale,c.ctx.shadowOffsetY=A.offsetY.number*c.options.scale,c.ctx.shadowBlur=A.blur.number,c.renderTextWithLetterSpacing(e,t.letterSpacing,i)}),c.ctx.shadowColor="",c.ctx.shadowOffsetX=0,c.ctx.shadowOffsetY=0,c.ctx.shadowBlur=0),t.textDecorationLine.length&&(c.ctx.fillStyle=xE(t.textDecorationColor||t.color),t.textDecorationLine.forEach(function(t){switch(t){case 1:c.ctx.fillRect(e.bounds.left,Math.round(e.bounds.top+i),e.bounds.width,1);break;case 2:c.ctx.fillRect(e.bounds.left,Math.round(e.bounds.top),e.bounds.width,1);break;case 3:c.ctx.fillRect(e.bounds.left,Math.ceil(e.bounds.top+o),e.bounds.width,1)}}));break;case 1:t.webkitTextStrokeWidth&&e.text.trim().length&&(c.ctx.strokeStyle=xE(t.webkitTextStrokeColor),c.ctx.lineWidth=t.webkitTextStrokeWidth,c.ctx.lineJoin=window.chrome?"miter":"round",c.ctx.strokeText(e.text,e.bounds.left,e.bounds.top+i)),c.ctx.strokeStyle="",c.ctx.lineWidth=0,c.ctx.lineJoin="miter"}})}),[2]})})},t.prototype.renderReplacedElement=function(e,t,A){if(A&&e.intrinsicWidth>0&&e.intrinsicHeight>0){var r=vk(e),a=ak(t);this.path(a),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(A,0,0,e.intrinsicWidth,e.intrinsicHeight,r.left,r.top,r.width,r.height),this.ctx.restore()}},t.prototype.renderNodeContent=function(e){return lQ(this,0,void 0,function(){var A,r,a,n,s,i,o,l,c,u,d,h,p,f,g,m,v,y;return cQ(this,function(w){switch(w.label){case 0:this.applyEffects(e.getEffects(4)),A=e.container,r=e.curves,a=A.styles,n=0,s=A.textNodes,w.label=1;case 1:return n<s.length?(i=s[n],[4,this.renderTextNode(i,a)]):[3,4];case 2:w.sent(),w.label=3;case 3:return n++,[3,1];case 4:if(!(A instanceof CM))return[3,8];w.label=5;case 5:return w.trys.push([5,7,,8]),[4,this.context.cache.match(A.src)];case 6:return g=w.sent(),this.renderReplacedElement(A,r,g),[3,8];case 7:return w.sent(),this.context.logger.error("Error loading image "+A.src),[3,8];case 8:if(A instanceof QM&&this.renderReplacedElement(A,r,A.canvas),!(A instanceof FM))return[3,12];w.label=9;case 9:return w.trys.push([9,11,,12]),[4,this.context.cache.match(A.svg)];case 10:return g=w.sent(),this.renderReplacedElement(A,r,g),[3,12];case 11:return w.sent(),this.context.logger.error("Error loading svg "+A.svg.substring(0,255)),[3,12];case 12:return A instanceof TM&&A.tree?[4,new t(this.context,{scale:this.options.scale,backgroundColor:A.backgroundColor,x:0,y:0,width:A.width,height:A.height}).render(A.tree)]:[3,14];case 13:o=w.sent(),A.width&&A.height&&this.ctx.drawImage(o,0,0,A.width,A.height,A.bounds.left,A.bounds.top,A.bounds.width,A.bounds.height),w.label=14;case 14:if(A instanceof LM&&(l=Math.min(A.bounds.width,A.bounds.height),A.type===SM?A.checked&&(this.ctx.save(),this.path([new JS(A.bounds.left+.39363*l,A.bounds.top+.79*l),new JS(A.bounds.left+.16*l,A.bounds.top+.5549*l),new JS(A.bounds.left+.27347*l,A.bounds.top+.44071*l),new JS(A.bounds.left+.39694*l,A.bounds.top+.5649*l),new JS(A.bounds.left+.72983*l,A.bounds.top+.23*l),new JS(A.bounds.left+.84*l,A.bounds.top+.34085*l),new JS(A.bounds.left+.39363*l,A.bounds.top+.79*l)]),this.ctx.fillStyle=xE(IM),this.ctx.fill(),this.ctx.restore()):A.type===kM&&A.checked&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(A.bounds.left+l/2,A.bounds.top+l/2,l/4,0,2*Math.PI,!0),this.ctx.fillStyle=xE(IM),this.ctx.fill(),this.ctx.restore())),Mk(A)&&A.value.length){switch(c=this.createFontStyle(a),v=c[0],u=c[1],d=this.fontMetrics.getMetrics(v,u).baseline,this.ctx.font=v,this.ctx.fillStyle=xE(a.color),this.ctx.textBaseline="alphabetic",this.ctx.textAlign=kk(A.styles.textAlign),y=vk(A),h=0,A.styles.textAlign){case 1:h+=y.width/2;break;case 2:h+=y.width}p=y.add(h,0,0,-y.height/2+1),this.ctx.save(),this.path([new JS(y.left,y.top),new JS(y.left+y.width,y.top),new JS(y.left+y.width,y.top+y.height),new JS(y.left,y.top+y.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new dM(A.value,p),a.letterSpacing,d),this.ctx.restore(),this.ctx.textBaseline="alphabetic",this.ctx.textAlign="left"}if(!FU(A.styles.display,2048))return[3,20];if(null===A.styles.listStyleImage)return[3,19];if(0!==(f=A.styles.listStyleImage).type)return[3,18];g=void 0,m=f.url,w.label=15;case 15:return w.trys.push([15,17,,18]),[4,this.context.cache.match(m)];case 16:return g=w.sent(),this.ctx.drawImage(g,A.bounds.left-(g.width+10),A.bounds.top),[3,18];case 17:return w.sent(),this.context.logger.error("Error loading list-style-image "+m),[3,18];case 18:return[3,20];case 19:e.listValue&&-1!==A.styles.listStyleType&&(v=this.createFontStyle(a)[0],this.ctx.font=v,this.ctx.fillStyle=xE(a.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",y=new uQ(A.bounds.left,A.bounds.top+vE(A.styles.paddingTop,A.bounds.width),A.bounds.width,Rx(a.lineHeight,a.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new dM(e.listValue,y),a.letterSpacing,Rx(a.lineHeight,a.fontSize.number)/2+2),this.ctx.textBaseline="bottom",this.ctx.textAlign="left"),w.label=20;case 20:return[2]}})})},t.prototype.renderStackContent=function(e){return lQ(this,0,void 0,function(){var t,A,r,a,n,s,i,o,l,c,u,d,h,p,f;return cQ(this,function(g){switch(g.label){case 0:return FU(e.element.container.flags,16),[4,this.renderNodeBackgroundAndBorders(e.element)];case 1:g.sent(),t=0,A=e.negativeZIndex,g.label=2;case 2:return t<A.length?(f=A[t],[4,this.renderStack(f)]):[3,5];case 3:g.sent(),g.label=4;case 4:return t++,[3,2];case 5:return[4,this.renderNodeContent(e.element)];case 6:g.sent(),r=0,a=e.nonInlineLevel,g.label=7;case 7:return r<a.length?(f=a[r],[4,this.renderNode(f)]):[3,10];case 8:g.sent(),g.label=9;case 9:return r++,[3,7];case 10:n=0,s=e.nonPositionedFloats,g.label=11;case 11:return n<s.length?(f=s[n],[4,this.renderStack(f)]):[3,14];case 12:g.sent(),g.label=13;case 13:return n++,[3,11];case 14:i=0,o=e.nonPositionedInlineLevel,g.label=15;case 15:return i<o.length?(f=o[i],[4,this.renderStack(f)]):[3,18];case 16:g.sent(),g.label=17;case 17:return i++,[3,15];case 18:l=0,c=e.inlineLevel,g.label=19;case 19:return l<c.length?(f=c[l],[4,this.renderNode(f)]):[3,22];case 20:g.sent(),g.label=21;case 21:return l++,[3,19];case 22:u=0,d=e.zeroOrAutoZIndexOrTransformedOrOpacity,g.label=23;case 23:return u<d.length?(f=d[u],[4,this.renderStack(f)]):[3,26];case 24:g.sent(),g.label=25;case 25:return u++,[3,23];case 26:h=0,p=e.positiveZIndex,g.label=27;case 27:return h<p.length?(f=p[h],[4,this.renderStack(f)]):[3,30];case 28:g.sent(),g.label=29;case 29:return h++,[3,27];case 30:return[2]}})})},t.prototype.mask=function(e){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(e.slice(0).reverse()),this.ctx.closePath()},t.prototype.path=function(e){this.ctx.beginPath(),this.formatPath(e),this.ctx.closePath()},t.prototype.formatPath=function(e){var t=this;e.forEach(function(e,A){var r=ek(e)?e.start:e;0===A?t.ctx.moveTo(r.x,r.y):t.ctx.lineTo(r.x,r.y),ek(e)&&t.ctx.bezierCurveTo(e.startControl.x,e.startControl.y,e.endControl.x,e.endControl.y,e.end.x,e.end.y)})},t.prototype.renderRepeat=function(e,t,A,r){this.path(e),this.ctx.fillStyle=t,this.ctx.translate(A,r),this.ctx.fill(),this.ctx.translate(-A,-r)},t.prototype.resizeImage=function(e,t,A){var r;if(e.width===t&&e.height===A)return e;var a=(null!==(r=this.canvas.ownerDocument)&&void 0!==r?r:document).createElement("canvas");return a.width=Math.max(1,t),a.height=Math.max(1,A),a.getContext("2d").drawImage(e,0,0,e.width,e.height,0,0,t,A),a},t.prototype.renderBackgroundImage=function(e){return lQ(this,0,void 0,function(){var t,A,r,a,n,s;return cQ(this,function(i){switch(i.label){case 0:t=e.styles.backgroundImage.length-1,A=function(A){var a,n,s,i,o,l,c,u,d,h,p,f,g,m,v,y,w,B,b,C,Q,F,E,x,U,M,S,k,_,I,L;return cQ(this,function(H){switch(H.label){case 0:if(0!==A.type)return[3,5];a=void 0,n=A.url,H.label=1;case 1:return H.trys.push([1,3,,4]),[4,r.context.cache.match(n)];case 2:return a=H.sent(),[3,4];case 3:return H.sent(),r.context.logger.error("Error loading background-image "+n),[3,4];case 4:return a&&(s=yk(e,t,[a.width,a.height,a.width/a.height]),y=s[0],F=s[1],E=s[2],b=s[3],C=s[4],m=r.ctx.createPattern(r.resizeImage(a,b,C),"repeat"),r.renderRepeat(y,m,F,E)),[3,6];case 5:1===A.type?(i=yk(e,t,[null,null,null]),y=i[0],F=i[1],E=i[2],b=i[3],C=i[4],o=NE(A.angle,b,C),l=o[0],c=o[1],u=o[2],d=o[3],h=o[4],(p=document.createElement("canvas")).width=b,p.height=C,f=p.getContext("2d"),g=f.createLinearGradient(c,d,u,h),DE(A.stops,l).forEach(function(e){return g.addColorStop(e.stop,xE(e.color))}),f.fillStyle=g,f.fillRect(0,0,b,C),b>0&&C>0&&(m=r.ctx.createPattern(p,"repeat"),r.renderRepeat(y,m,F,E))):function(e){return 2===e.type}(A)&&(v=yk(e,t,[null,null,null]),y=v[0],w=v[1],B=v[2],b=v[3],C=v[4],Q=0===A.position.length?[fE]:A.position,F=vE(Q[0],b),E=vE(Q[Q.length-1],C),x=function(e,t,A,r,a){var n=0,s=0;switch(e.size){case 0:0===e.shape?n=s=Math.min(Math.abs(t),Math.abs(t-r),Math.abs(A),Math.abs(A-a)):1===e.shape&&(n=Math.min(Math.abs(t),Math.abs(t-r)),s=Math.min(Math.abs(A),Math.abs(A-a)));break;case 2:if(0===e.shape)n=s=Math.min(KE(t,A),KE(t,A-a),KE(t-r,A),KE(t-r,A-a));else if(1===e.shape){var i=Math.min(Math.abs(A),Math.abs(A-a))/Math.min(Math.abs(t),Math.abs(t-r)),o=RE(r,a,t,A,!0),l=o[0],c=o[1];s=i*(n=KE(l-t,(c-A)/i))}break;case 1:0===e.shape?n=s=Math.max(Math.abs(t),Math.abs(t-r),Math.abs(A),Math.abs(A-a)):1===e.shape&&(n=Math.max(Math.abs(t),Math.abs(t-r)),s=Math.max(Math.abs(A),Math.abs(A-a)));break;case 3:if(0===e.shape)n=s=Math.max(KE(t,A),KE(t,A-a),KE(t-r,A),KE(t-r,A-a));else if(1===e.shape){i=Math.max(Math.abs(A),Math.abs(A-a))/Math.max(Math.abs(t),Math.abs(t-r));var u=RE(r,a,t,A,!1);l=u[0],c=u[1],s=i*(n=KE(l-t,(c-A)/i))}}return Array.isArray(e.size)&&(n=vE(e.size[0],r),s=2===e.size.length?vE(e.size[1],a):n),[n,s]}(A,F,E,b,C),U=x[0],M=x[1],U>0&&M>0&&(S=r.ctx.createRadialGradient(w+F,B+E,0,w+F,B+E,U),DE(A.stops,2*U).forEach(function(e){return S.addColorStop(e.stop,xE(e.color))}),r.path(y),r.ctx.fillStyle=S,U!==M?(k=e.bounds.left+.5*e.bounds.width,_=e.bounds.top+.5*e.bounds.height,L=1/(I=M/U),r.ctx.save(),r.ctx.translate(k,_),r.ctx.transform(1,0,0,I,0,0),r.ctx.translate(-k,-_),r.ctx.fillRect(w,L*(B-_)+_,b,C*L),r.ctx.restore()):r.ctx.fill())),H.label=6;case 6:return t--,[2]}})},r=this,a=0,n=e.styles.backgroundImage.slice(0).reverse(),i.label=1;case 1:return a<n.length?(s=n[a],[5,A(s)]):[3,4];case 2:i.sent(),i.label=3;case 3:return a++,[3,1];case 4:return[2]}})})},t.prototype.renderSolidBorder=function(e,t,A){return lQ(this,0,void 0,function(){return cQ(this,function(r){return this.path(pk(A,t)),this.ctx.fillStyle=xE(e),this.ctx.fill(),[2]})})},t.prototype.renderDoubleBorder=function(e,t,A,r){return lQ(this,0,void 0,function(){var a,n;return cQ(this,function(s){switch(s.label){case 0:return t<3?[4,this.renderSolidBorder(e,A,r)]:[3,2];case 1:return s.sent(),[2];case 2:return a=function(e,t){switch(t){case 0:return gk(e.topLeftBorderBox,e.topLeftBorderDoubleOuterBox,e.topRightBorderBox,e.topRightBorderDoubleOuterBox);case 1:return gk(e.topRightBorderBox,e.topRightBorderDoubleOuterBox,e.bottomRightBorderBox,e.bottomRightBorderDoubleOuterBox);case 2:return gk(e.bottomRightBorderBox,e.bottomRightBorderDoubleOuterBox,e.bottomLeftBorderBox,e.bottomLeftBorderDoubleOuterBox);default:return gk(e.bottomLeftBorderBox,e.bottomLeftBorderDoubleOuterBox,e.topLeftBorderBox,e.topLeftBorderDoubleOuterBox)}}(r,A),this.path(a),this.ctx.fillStyle=xE(e),this.ctx.fill(),n=function(e,t){switch(t){case 0:return gk(e.topLeftBorderDoubleInnerBox,e.topLeftPaddingBox,e.topRightBorderDoubleInnerBox,e.topRightPaddingBox);case 1:return gk(e.topRightBorderDoubleInnerBox,e.topRightPaddingBox,e.bottomRightBorderDoubleInnerBox,e.bottomRightPaddingBox);case 2:return gk(e.bottomRightBorderDoubleInnerBox,e.bottomRightPaddingBox,e.bottomLeftBorderDoubleInnerBox,e.bottomLeftPaddingBox);default:return gk(e.bottomLeftBorderDoubleInnerBox,e.bottomLeftPaddingBox,e.topLeftBorderDoubleInnerBox,e.topLeftPaddingBox)}}(r,A),this.path(n),this.ctx.fill(),[2]}})})},t.prototype.renderNodeBackgroundAndBorders=function(e){return lQ(this,0,void 0,function(){var t,A,r,a,n,s,i,o,l=this;return cQ(this,function(c){switch(c.label){case 0:return this.applyEffects(e.getEffects(2)),t=e.container.styles,A=!EE(t.backgroundColor)||t.backgroundImage.length,r=[{style:t.borderTopStyle,color:t.borderTopColor,width:t.borderTopWidth},{style:t.borderRightStyle,color:t.borderRightColor,width:t.borderRightWidth},{style:t.borderBottomStyle,color:t.borderBottomColor,width:t.borderBottomWidth},{style:t.borderLeftStyle,color:t.borderLeftColor,width:t.borderLeftWidth}],a=Sk(Ck(t.backgroundClip,0),e.curves),A||t.boxShadow.length?(this.ctx.save(),this.path(a),this.ctx.clip(),EE(t.backgroundColor)||(this.ctx.fillStyle=xE(t.backgroundColor),this.ctx.fill()),[4,this.renderBackgroundImage(e.container)]):[3,2];case 1:c.sent(),this.ctx.restore(),t.boxShadow.slice(0).reverse().forEach(function(t){l.ctx.save();var A,r,a,n,s,i=rk(e.curves),o=t.inset?0:1e4,c=(A=i,r=-o+(t.inset?1:-1)*t.spread.number,a=(t.inset?1:-1)*t.spread.number,n=t.spread.number*(t.inset?-2:2),s=t.spread.number*(t.inset?-2:2),A.map(function(e,t){switch(t){case 0:return e.add(r,a);case 1:return e.add(r+n,a);case 2:return e.add(r+n,a+s);case 3:return e.add(r,a+s)}return e}));t.inset?(l.path(i),l.ctx.clip(),l.mask(c)):(l.mask(i),l.ctx.clip(),l.path(c)),l.ctx.shadowOffsetX=t.offsetX.number+o,l.ctx.shadowOffsetY=t.offsetY.number,l.ctx.shadowColor=xE(t.color),l.ctx.shadowBlur=t.blur.number,l.ctx.fillStyle=t.inset?xE(t.color):"rgba(0,0,0,1)",l.ctx.fill(),l.ctx.restore()}),c.label=2;case 2:n=0,s=0,i=r,c.label=3;case 3:return s<i.length?0!==(o=i[s]).style&&!EE(o.color)&&o.width>0?2!==o.style?[3,5]:[4,this.renderDashedDottedBorder(o.color,o.width,n,e.curves,2)]:[3,11]:[3,13];case 4:return c.sent(),[3,11];case 5:return 3!==o.style?[3,7]:[4,this.renderDashedDottedBorder(o.color,o.width,n,e.curves,3)];case 6:return c.sent(),[3,11];case 7:return 4!==o.style?[3,9]:[4,this.renderDoubleBorder(o.color,o.width,n,e.curves)];case 8:return c.sent(),[3,11];case 9:return[4,this.renderSolidBorder(o.color,n,e.curves)];case 10:c.sent(),c.label=11;case 11:n++,c.label=12;case 12:return s++,[3,3];case 13:return[2]}})})},t.prototype.renderDashedDottedBorder=function(e,t,A,r,a){return lQ(this,0,void 0,function(){var n,s,i,o,l,c,u,d,h,p,f,g,m,v,y,w;return cQ(this,function(B){return this.ctx.save(),n=function(e,t){switch(t){case 0:return fk(e.topLeftBorderStroke,e.topRightBorderStroke);case 1:return fk(e.topRightBorderStroke,e.bottomRightBorderStroke);case 2:return fk(e.bottomRightBorderStroke,e.bottomLeftBorderStroke);default:return fk(e.bottomLeftBorderStroke,e.topLeftBorderStroke)}}(r,A),s=pk(r,A),2===a&&(this.path(s),this.ctx.clip()),ek(s[0])?(i=s[0].start.x,o=s[0].start.y):(i=s[0].x,o=s[0].y),ek(s[1])?(l=s[1].end.x,c=s[1].end.y):(l=s[1].x,c=s[1].y),u=0===A||2===A?Math.abs(i-l):Math.abs(o-c),this.ctx.beginPath(),3===a?this.formatPath(n):this.formatPath(s.slice(0,2)),d=t<3?3*t:2*t,h=t<3?2*t:t,3===a&&(d=t,h=t),p=!0,u<=2*d?p=!1:u<=2*d+h?(d*=f=u/(2*d+h),h*=f):(g=Math.floor((u+h)/(d+h)),m=(u-g*d)/(g-1),h=(v=(u-(g+1)*d)/g)<=0||Math.abs(h-m)<Math.abs(h-v)?m:v),p&&(3===a?this.ctx.setLineDash([0,d+h]):this.ctx.setLineDash([d,h])),3===a?(this.ctx.lineCap="round",this.ctx.lineWidth=t):this.ctx.lineWidth=2*t+1.1,this.ctx.strokeStyle=xE(e),this.ctx.stroke(),this.ctx.setLineDash([]),2===a&&(ek(s[0])&&(y=s[3],w=s[0],this.ctx.beginPath(),this.formatPath([new JS(y.end.x,y.end.y),new JS(w.start.x,w.start.y)]),this.ctx.stroke()),ek(s[1])&&(y=s[1],w=s[2],this.ctx.beginPath(),this.formatPath([new JS(y.end.x,y.end.y),new JS(w.start.x,w.start.y)]),this.ctx.stroke())),this.ctx.restore(),[2]})})},t.prototype.render=function(e){return lQ(this,0,void 0,function(){var t;return cQ(this,function(A){switch(A.label){case 0:return this.options.backgroundColor&&(this.ctx.fillStyle=xE(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height)),r=new uk(e,null),a=new ck(r),dk(r,a,a,n=[]),hk(r.container,n),t=a,[4,this.renderStack(t)];case 1:return A.sent(),this.applyEffects([]),[2,this.canvas]}var r,a,n})})},t}(xk),Mk=function(e){return e instanceof OM||(e instanceof HM||e instanceof LM&&e.type!==kM&&e.type!==SM)},Sk=function(e,t){switch(e){case 0:return rk(t);case 2:return function(e){return[e.topLeftContentBox,e.topRightContentBox,e.bottomRightContentBox,e.bottomLeftContentBox]}(t);default:return ak(t)}},kk=function(e){switch(e){case 1:return"center";case 2:return"right";default:return"left"}},_k=["-apple-system","system-ui"],Ik=function(e){return/iPhone OS 15_(0|1)/.test(window.navigator.userAgent)?e.filter(function(e){return-1===_k.indexOf(e)}):e},Lk=function(e){function t(t,A){var r=e.call(this,t,A)||this;return r.canvas=A.canvas?A.canvas:document.createElement("canvas"),r.ctx=r.canvas.getContext("2d"),r.options=A,r.canvas.width=Math.floor(A.width*A.scale),r.canvas.height=Math.floor(A.height*A.scale),r.canvas.style.width=A.width+"px",r.canvas.style.height=A.height+"px",r.ctx.scale(r.options.scale,r.options.scale),r.ctx.translate(-A.x,-A.y),r.context.logger.debug("EXPERIMENTAL ForeignObject renderer initialized ("+A.width+"x"+A.height+" at "+A.x+","+A.y+") with scale "+A.scale),r}return iQ(t,e),t.prototype.render=function(e){return lQ(this,0,void 0,function(){var t,A;return cQ(this,function(r){switch(r.label){case 0:return t=lM(this.options.width*this.options.scale,this.options.height*this.options.scale,this.options.scale,this.options.scale,e),[4,Hk(t)];case 1:return A=r.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=xE(this.options.backgroundColor),this.ctx.fillRect(0,0,this.options.width*this.options.scale,this.options.height*this.options.scale)),this.ctx.drawImage(A,-this.options.x*this.options.scale,-this.options.y*this.options.scale),[2,this.canvas]}})})},t}(xk),Hk=function(e){return new Promise(function(t,A){var r=new Image;r.onload=function(){t(r)},r.onerror=A,r.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent((new XMLSerializer).serializeToString(e))})},Ok=function(){function e(e){var t=e.id,A=e.enabled;this.id=t,this.enabled=A,this.start=Date.now()}return e.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.enabled&&("undefined"!=typeof window&&window.console&&"function"==typeof console.debug||this.info.apply(this,e))},e.prototype.getTime=function(){return Date.now()-this.start},e.prototype.info=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.enabled&&"undefined"!=typeof window&&window.console&&console.info},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.enabled&&("undefined"!=typeof window&&window.console&&"function"==typeof console.warn||this.info.apply(this,e))},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.enabled&&("undefined"!=typeof window&&window.console&&"function"==typeof console.error||this.info.apply(this,e))},e.instances={},e}(),Tk=function(){function e(t,A){var r;this.windowBounds=A,this.instanceName="#"+e.instanceCount++,this.logger=new Ok({id:this.instanceName,enabled:t.logging}),this.cache=null!==(r=t.cache)&&void 0!==r?r:new RS(this,t)}return e.instanceCount=1,e}();"undefined"!=typeof window&&KS.setContext(window);var Pk=function(e,t){return lQ(void 0,0,void 0,function(){var A,r,a,n,s,i,o,l,c,u,d,h,p,f,g,m,v,y,w,B,b,C,Q,F,E,x,U,M,S,k,_,I,L,H,O,T,P,D;return cQ(this,function(N){switch(N.label){case 0:if(!e||"object"!=typeof e)return[2,Promise.reject("Invalid element provided as first argument")];if(!(A=e.ownerDocument))throw new Error("Element is not attached to a Document");if(!(r=A.defaultView))throw new Error("Document is not attached to a Window");return a={allowTaint:null!==(C=t.allowTaint)&&void 0!==C&&C,imageTimeout:null!==(Q=t.imageTimeout)&&void 0!==Q?Q:15e3,proxy:t.proxy,useCORS:null!==(F=t.useCORS)&&void 0!==F&&F},n=oQ({logging:null===(E=t.logging)||void 0===E||E,cache:t.cache},a),s={windowWidth:null!==(x=t.windowWidth)&&void 0!==x?x:r.innerWidth,windowHeight:null!==(U=t.windowHeight)&&void 0!==U?U:r.innerHeight,scrollX:null!==(M=t.scrollX)&&void 0!==M?M:r.pageXOffset,scrollY:null!==(S=t.scrollY)&&void 0!==S?S:r.pageYOffset},i=new uQ(s.scrollX,s.scrollY,s.windowWidth,s.windowHeight),o=new Tk(n,i),l=null!==(k=t.foreignObjectRendering)&&void 0!==k&&k,c={allowTaint:null!==(_=t.allowTaint)&&void 0!==_&&_,onclone:t.onclone,ignoreElements:t.ignoreElements,inlineImages:l,copyStyles:l},o.logger.debug("Starting document clone with size "+i.width+"x"+i.height+" scrolled to "+-i.left+","+-i.top),u=new QS(o,e,c),(d=u.clonedReferenceElement)?[4,u.toIFrame(A,i)]:[2,Promise.reject("Unable to find element in cloned iframe")];case 1:return h=N.sent(),p=YM(d)||"HTML"===d.tagName?function(e){var t=e.body,A=e.documentElement;if(!t||!A)throw new Error("Unable to get document size");var r=Math.max(Math.max(t.scrollWidth,A.scrollWidth),Math.max(t.offsetWidth,A.offsetWidth),Math.max(t.clientWidth,A.clientWidth)),a=Math.max(Math.max(t.scrollHeight,A.scrollHeight),Math.max(t.offsetHeight,A.offsetHeight),Math.max(t.clientHeight,A.clientHeight));return new uQ(0,0,r,a)}(d.ownerDocument):dQ(o,d),f=p.width,g=p.height,m=p.left,v=p.top,y=Dk(o,d,t.backgroundColor),w={canvas:t.canvas,backgroundColor:y,scale:null!==(L=null!==(I=t.scale)&&void 0!==I?I:r.devicePixelRatio)&&void 0!==L?L:1,x:(null!==(H=t.x)&&void 0!==H?H:0)+m,y:(null!==(O=t.y)&&void 0!==O?O:0)+v,width:null!==(T=t.width)&&void 0!==T?T:Math.ceil(f),height:null!==(P=t.height)&&void 0!==P?P:Math.ceil(g)},l?(o.logger.debug("Document cloned, using foreign object rendering"),[4,new Lk(o,w).render(d)]):[3,3];case 2:return B=N.sent(),[3,5];case 3:return o.logger.debug("Document cloned, element located at "+m+","+v+" with size "+f+"x"+g+" using computed rendering"),o.logger.debug("Starting DOM parsing"),b=KM(o,d),y===b.styles.backgroundColor&&(b.styles.backgroundColor=HE.TRANSPARENT),o.logger.debug("Starting renderer for element at "+w.x+","+w.y+" with size "+w.width+"x"+w.height),[4,new Uk(o,w).render(b)];case 4:B=N.sent(),N.label=5;case 5:return(null===(D=t.removeContainer)||void 0===D||D)&&(QS.destroy(h)||o.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore")),o.logger.debug("Finished rendering"),[2,B]}})})},Dk=function(e,t,A){var r=t.ownerDocument,a=r.documentElement?LE(e,getComputedStyle(r.documentElement).backgroundColor):HE.TRANSPARENT,n=r.body?LE(e,getComputedStyle(r.body).backgroundColor):HE.TRANSPARENT,s="string"==typeof A?LE(e,A):null===A?HE.TRANSPARENT:4294967295;return t===r.documentElement?EE(a)?EE(n)?s:n:a:s};const Nk={async domToImage(e,t={}){const{format:A="png",quality:r=1,scale:a=1,backgroundColor:n="#ffffff"}=t;try{const t=await function(e,t){return void 0===t&&(t={}),Pk(e,t)}(e,{scale:a,backgroundColor:n,useCORS:!0,logging:!1,removeContainer:!0});return new Promise((e,a)=>{t.toBlob(t=>{t?e(t):a(new Error("Canvas 转换失败"))},`image/${A}`,r)})}catch(s){throw s}},downloadImage(e,t){const A=URL.createObjectURL(e),r=document.createElement("a");r.href=A,r.download=t,r.click(),URL.revokeObjectURL(A)},async printElement(e,t={}){const A=await this.domToImage(e,t);this.downloadImage(A,t.filename||`print-${Date.now()}.${t.format||"png"}`)}};const Kk=/* @__PURE__ */new WeakMap,Rk=/* @__PURE__ */new WeakMap,Gk={mounted(e,t){const{activeClass:A="is-touching",delay:r=300,disabled:a=!1,disabledClass:n="disabled",rippleClass:s="is-rippling"}=t.value||{};e.style.position="relative",e.style.overflow="hidden";const i=t=>{if(a||e.classList.contains(n))return;const r=t,i=e.getBoundingClientRect(),o=r.touches[0],l=o.clientX-i.left,c=o.clientY-i.top,u=document.createElement("span");u.className=s,u.style.cssText=`\n position: absolute;\n border-radius: 50%;\n background: var(--gismap-primary);\n opacity: 0.3;\n transform: scale(0);\n animation: ripple-effect 0.5s ease-out forwards;\n pointer-events: none;\n width: ${Math.max(i.width,i.height)}px;\n height: ${Math.max(i.width,i.height)}px;\n left: ${l-Math.max(i.width,i.height)/2}px;\n top: ${c-Math.max(i.width,i.height)/2}px;\n `,e.appendChild(u),Rk.set(e,u),u.addEventListener("animationend",()=>{u.remove(),Rk.delete(e)},{once:!0}),e.classList.add(A)},o=()=>{setTimeout(()=>{e.classList.remove(A)},r)},l=()=>{e.classList.remove(A);const t=Rk.get(e);t&&(t.remove(),Rk.delete(e))},c={onStart:i,onEnd:o,onCancel:l};Kk.set(e,c),e.addEventListener("touchstart",i,{passive:!0}),e.addEventListener("touchend",o,{passive:!0}),e.addEventListener("touchcancel",l,{passive:!0});const u=document.createElement("style");u.textContent="\n @keyframes ripple-effect {\n to {\n transform: scale(2.5);\n opacity: 0;\n }\n }\n ",document.head.appendChild(u)},unmounted(e){const t=Kk.get(e);if(!t)return;e.removeEventListener("touchstart",t.onStart),e.removeEventListener("touchend",t.onEnd),e.removeEventListener("touchcancel",t.onCancel),Kk.delete(e);const A=Rk.get(e);A&&(A.remove(),Rk.delete(e))}},Vk={class:"gismap-tools"},zk={class:"tools-toggle-wrapper"},jk={class:"tools-panel"},$k={key:0,class:"tool-group"},qk=["onClick","title"],Wk=/* @__PURE__ */o({__name:"index",props:{data:{default:()=>[]},defaultCollapsed:{type:Boolean,default:!1},showToggle:{type:Boolean,default:!0}},emits:["tool-click"],setup(e,{emit:A}){const r=Gk,a=e,n=A,s=t(a.defaultCollapsed),o=Gt(),l=t(null),p=i(()=>a.data&&0!==a.data.length?a.data.map(e=>({type:"group",name:e.name,label:e.label,children:e.children.filter(e=>!e.hidden)})).filter(e=>e.children&&e.children.length>0):!0===o.value?.isMobile?g().filter(e=>e.showMode?.includes("mobile")):g().filter(e=>e.showMode?.includes("pc"))),g=()=>[{type:"group",name:"navigation",label:"导航",showMode:["pc"],children:[{name:"location",label:"定位",icon:"aim",showMode:["mobile"]}]},{type:"group",name:"fullscreen",label:"全屏",showMode:["pc"],children:[{name:"fullscreen",label:"全屏",icon:"fullscreen",showMode:["pc"]}]},{type:"group",name:"navigation",label:"导航",showMode:["pc","mobile"],children:[{name:"reset",label:"重置",icon:"reset"},{name:"zoomIn",label:"放大",icon:"zoomIn"},{name:"zoomOut",label:"缩小",icon:"zoomOut"}]},{type:"group",name:"tools",label:"测量",showMode:["pc","mobile"],children:[{name:"measurePoint",label:"点",icon:"measurePoint"},{name:"measureLine",label:"线",icon:"measureLength"},{name:"measureArea",label:"面",icon:"measureArea"}]},{type:"group",name:"export",label:"导出",showMode:["pc"],children:[{name:"print",label:"打印",icon:"print"}]},{type:"group",name:"clear",label:"清除",showMode:["pc","mobile"],children:[{name:"clear",label:"清除",icon:"clear"}]}],m=()=>{s.value=!s.value},v=e=>{e.disabled||(l.value===e.name?l.value=null:l.value=e.name,"location"===e.name?function(e){navigator.geolocation&&navigator.geolocation.getCurrentPosition(t=>{const{latitude:A,longitude:r}=t.coords,a=[r,A];e&&e.flyTo(a,{zoom:16})},e=>{})}(o.value):"fullscreen"===e.name?function(e){if(e){const t=e.adapter.getMap();t&&nQ.toggleFullscreen(t.getContainer().parentElement)}}(o.value):"zoomIn"===e.name?function(e){e&&e.zoomIn()}(o.value):"zoomOut"===e.name?function(e){e&&e.zoomOut()}(o.value):"clear"===e.name?function(e){e&&(e.events.emit("clear",{}),e.measureManager?.clearAllResults())}(o.value):"reset"===e.name?function(e){if(e){const t=e.getInitialViewState();if(t){const A=[t.center.lng,t.center.lat];e.setView(A,t.zoom,{pitch:t.pitch,bearing:t.bearing,animate:!0})}}}(o.value):"measurePoint"===e.name?function(e){e?.measureManager&&e.measureManager.startMeasure("point")}(o.value):"measureLine"===e.name?function(e){e?.measureManager&&e.measureManager.startMeasure("line")}(o.value):"measureArea"===e.name?function(e){e?.measureManager&&e.measureManager.startMeasure("polygon")}(o.value):"stopMeasure"===e.name?function(e){e?.measureManager&&e.measureManager.stopMeasure()}(o.value):"print"===e.name&&function(e){e&&Nk.domToImage(e.adapter.getMap().getContainer(),{format:"png",quality:1,scale:1,backgroundColor:"#ffffff"}).then(e=>{Nk.downloadImage(e,"map.png")})}(o.value),n("tool-click",e))};return(t,A)=>{const a=cc;return c(),u("div",Vk,[e.showToggle?(c(),u("div",{key:0,class:"tools-toggle",onClick:m},[H((c(),u("div",zk,[P(a,{class:d({"is-collapse":s.value}),size:"20"},{default:D(()=>[s.value?(c(),k(w(DC),{key:1})):(c(),k(w(TC),{key:0}))]),_:1},8,["class"])])),[[w(r)]])])):f("",!0),P(q,{name:"fade-slide"},{default:D(()=>[H(h("div",jk,[(c(!0),u(S,null,ne(p.value,(e,t)=>(c(),u(S,{key:e.name||`group-${t}`},[e.children&&e.children.length?(c(),u("div",$k,[(c(!0),u(S,null,ne(e.children,e=>H((c(),u("div",{key:e.name,class:d(["tool-item",{"is-active":l.value===e.name}]),onClick:t=>v(e),title:e.label},[P(a,{size:20},{default:D(()=>[(c(),k(V(w(aQ)(e.icon,l.value===e.name))))]),_:2},1024)],10,qk)),[[w(r)]])),128))])):f("",!0)],64))),128))],512),[[W,!s.value]])]),_:1})])}}}),Xk={class:"gismap-switch"},Jk={key:0,class:"gismap-switch-extensions"},Yk=["onClick"],Zk={class:"gismap-switch-item-content"},e_={class:"gismap-switch-item-icon"},t_={class:"gismap-switch-item-text"},A_={class:"gismap-switch-layers"},r_=["onClick"],a_={class:"gismap-switch-item-content"},n_={class:"gismap-switch-item-text"},s_={class:"style-list"},i_=["onClick"],o_={key:1,class:"gismap-switch-extensions"},l_=["onClick"],c_={class:"gismap-switch-item-content"},u_={class:"gismap-switch-item-icon"},d_={class:"gismap-switch-item-text"},h_=/* @__PURE__ */o({name:"MapSwitch",props:{data:{type:Object,default:()=>({layers:[],extensions:[]})},extensionsPosition:{type:String,default:"left"},gray:{type:Boolean,default:!1}},setup(e){const A=e,r=Gt(),{tdt:a,terrain:n,style:s}=Sv(),o=i(()=>r.value?.events),g=t(""),m=e=>{if(g.value!==e.name){switch((e=>{switch(e){case"tdt-vec":a.value?.removeVecLayer();break;case"tdt-img":a.value?.removeImgLayer()}})(g.value),g.value=e.name,e.name){case"tdt-vec":a.value?.addVecLayer(e?.source||void 0,Qe.layerPolygonId);break;case"tdt-img":a.value?.addImgLayer(e?.source||void 0,Qe.layerPolygonId);break;default:o.value?.emit("switch:layer",e)}e.styles&&e.styles.length>0&&v(e),o.value?.emit("switch:widgets",e)}},v=e=>{m(e)},y=(e,t)=>{"click"===e&&(t.checked=!t.checked);const A={checked:!!t.checked,data:t};switch(t.name){case"tdt-cia":t.checked?a.value?.addCiaLayer(t?.source||null,Qe.layerPointId):a.value?.removeCiaLayer();break;case"terrain":t.checked?n.value?.add(t?.config||{}):n.value?.remove();break;default:o.value?.emit("switch:click",A)}o.value?.emit("switch:click",A)};return l(()=>{A.data.layers.forEach(e=>{e.checked&&(m(e),g.value=e.name)}),A.data.extensions.forEach(e=>{e.checked&&y("check",e)})}),(t,A)=>{const r=vp,a=fv;return c(),u("div",Xk,[p(t.$slots,"left"),"left"===e.extensionsPosition?(c(),u("div",Jk,[(c(!0),u(S,null,ne(e.data.extensions,e=>(c(),u("div",{class:"gismap-switch-item",key:e.name,onClick:Z(t=>y("click",e),["stop"])},[h("div",Zk,[h("div",e_,[P(r,{modelValue:e.checked,"onUpdate:modelValue":t=>e.checked=t,style:{"margin-right":"6px"}},null,8,["modelValue","onUpdate:modelValue"])]),h("span",t_,j(e.label),1)])],8,Yk))),128))])):f("",!0),h("div",A_,[(c(!0),u(S,null,ne(e.data.layers,e=>(c(),u("div",{class:d(["gismap-switch-item",{active:g.value===e.name}]),key:e.name,onClick:t=>v(e)},[h("div",a_,[h("div",{class:d(["gismap-switch-item-icon",e.iconName])},null,2),h("span",n_,j(e.label),1),e.styles&&e.styles.length>0?(c(),k(a,{key:0,placement:"bottom",width:100,trigger:"click","popper-class":"style-popover"},{reference:D(()=>[g.value===e.name?(c(),u("div",{key:0,class:"style-trigger",onClick:A[0]||(A[0]=Z(()=>{},["stop"]))},[...A[1]||(A[1]=[h("span",{class:"style-arrow"},"▼",-1)])])):f("",!0)]),default:D(()=>[h("div",s_,[(c(!0),u(S,null,ne(e.styles,t=>(c(),u("div",{key:t.name,class:d(["style-item",{active:t.checked}]),onClick:A=>((e,t)=>{e.forEach(e=>{e.checked=!1}),t.checked=!t.checked,s.value?.applyStyle(g.value,t?.name)})(e.styles,t)},j(t.label),11,i_))),128))])]),_:2},1024)):f("",!0)])],10,r_))),128))]),"right"===e.extensionsPosition?(c(),u("div",o_,[(c(!0),u(S,null,ne(e.data.extensions,e=>(c(),u("div",{class:"gismap-switch-item",key:e.name,onClick:Z(t=>y("click",e),["stop"])},[h("div",c_,[h("div",u_,[P(r,{modelValue:e.checked,"onUpdate:modelValue":t=>e.checked=t,style:{"margin-right":"6px"}},null,8,["modelValue","onUpdate:modelValue"])]),h("span",d_,j(e.label),1)])],8,l_))),128))])):f("",!0),p(t.$slots,"right")])}}});function p_(e,t){return function(){return e.apply(t,arguments)}}const{toString:f_}=Object.prototype,{getPrototypeOf:g_}=Object,{iterator:m_,toStringTag:v_}=Symbol,y_=/* @__PURE__ */(e=>t=>{const A=f_.call(t);return e[A]||(e[A]=A.slice(8,-1).toLowerCase())})(/* @__PURE__ */Object.create(null)),w_=e=>(e=e.toLowerCase(),t=>y_(t)===e),B_=e=>t=>typeof t===e,{isArray:b_}=Array,C_=B_("undefined");function Q_(e){return null!==e&&!C_(e)&&null!==e.constructor&&!C_(e.constructor)&&x_(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const F_=w_("ArrayBuffer");const E_=B_("string"),x_=B_("function"),U_=B_("number"),M_=e=>null!==e&&"object"==typeof e,S_=e=>{if("object"!==y_(e))return!1;const t=g_(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||v_ in e||m_ in e)},k_=w_("Date"),__=w_("File"),I_=w_("Blob"),L_=w_("FileList");const H_="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},O_=void 0!==H_.FormData?H_.FormData:void 0,T_=w_("URLSearchParams"),[P_,D_,N_,K_]=["ReadableStream","Request","Response","Headers"].map(w_);function R_(e,t,{allOwnKeys:A=!1}={}){if(null==e)return;let r,a;if("object"!=typeof e&&(e=[e]),b_(e))for(r=0,a=e.length;r<a;r++)t.call(null,e[r],r,e);else{if(Q_(e))return;const a=A?Object.getOwnPropertyNames(e):Object.keys(e),n=a.length;let s;for(r=0;r<n;r++)s=a[r],t.call(null,e[s],s,e)}}function G_(e,t){if(Q_(e))return null;t=t.toLowerCase();const A=Object.keys(e);let r,a=A.length;for(;a-- >0;)if(r=A[a],t===r.toLowerCase())return r;return null}const V_="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,z_=e=>!C_(e)&&e!==V_;const j_=/* @__PURE__ */(e=>t=>e&&t instanceof e)("undefined"!=typeof Uint8Array&&g_(Uint8Array)),$_=w_("HTMLFormElement"),q_=(({hasOwnProperty:e})=>(t,A)=>e.call(t,A))(Object.prototype),W_=w_("RegExp"),X_=(e,t)=>{const A=Object.getOwnPropertyDescriptors(e),r={};R_(A,(A,a)=>{let n;!1!==(n=t(A,a,e))&&(r[a]=n||A)}),Object.defineProperties(e,r)};const J_=w_("AsyncFunction"),Y_=(Z_="function"==typeof setImmediate,eI=x_(V_.postMessage),Z_?setImmediate:eI?(tI=`axios@${Math.random()}`,AI=[],V_.addEventListener("message",({source:e,data:t})=>{e===V_&&t===tI&&AI.length&&AI.shift()()},!1),e=>{AI.push(e),V_.postMessage(tI,"*")}):e=>setTimeout(e));var Z_,eI,tI,AI;const rI="undefined"!=typeof queueMicrotask?queueMicrotask.bind(V_):"undefined"!=typeof process&&process.nextTick||Y_,aI={isArray:b_,isArrayBuffer:F_,isBuffer:Q_,isFormData:e=>{let t;return e&&(O_&&e instanceof O_||x_(e.append)&&("formdata"===(t=y_(e))||"object"===t&&x_(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&F_(e.buffer),t},isString:E_,isNumber:U_,isBoolean:e=>!0===e||!1===e,isObject:M_,isPlainObject:S_,isEmptyObject:e=>{if(!M_(e)||Q_(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(t){return!1}},isReadableStream:P_,isRequest:D_,isResponse:N_,isHeaders:K_,isUndefined:C_,isDate:k_,isFile:__,isReactNativeBlob:e=>!(!e||void 0===e.uri),isReactNative:e=>e&&void 0!==e.getParts,isBlob:I_,isRegExp:W_,isFunction:x_,isStream:e=>M_(e)&&x_(e.pipe),isURLSearchParams:T_,isTypedArray:j_,isFileList:L_,forEach:R_,merge:function e(){const{caseless:t,skipUndefined:A}=z_(this)&&this||{},r={},a=(a,n)=>{if("__proto__"===n||"constructor"===n||"prototype"===n)return;const s=t&&G_(r,n)||n;S_(r[s])&&S_(a)?r[s]=e(r[s],a):S_(a)?r[s]=e({},a):b_(a)?r[s]=a.slice():A&&C_(a)||(r[s]=a)};for(let n=0,s=arguments.length;n<s;n++)arguments[n]&&R_(arguments[n],a);return r},extend:(e,t,A,{allOwnKeys:r}={})=>(R_(t,(t,r)=>{A&&x_(t)?Object.defineProperty(e,r,{value:p_(t,A),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,r,{value:t,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,A,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{value:t.prototype}),A&&Object.assign(e.prototype,A)},toFlatObject:(e,t,A,r)=>{let a,n,s;const i={};if(t=t||{},null==e)return t;do{for(a=Object.getOwnPropertyNames(e),n=a.length;n-- >0;)s=a[n],r&&!r(s,e,t)||i[s]||(t[s]=e[s],i[s]=!0);e=!1!==A&&g_(e)}while(e&&(!A||A(e,t))&&e!==Object.prototype);return t},kindOf:y_,kindOfTest:w_,endsWith:(e,t,A)=>{e=String(e),(void 0===A||A>e.length)&&(A=e.length),A-=t.length;const r=e.indexOf(t,A);return-1!==r&&r===A},toArray:e=>{if(!e)return null;if(b_(e))return e;let t=e.length;if(!U_(t))return null;const A=new Array(t);for(;t-- >0;)A[t]=e[t];return A},forEachEntry:(e,t)=>{const A=(e&&e[m_]).call(e);let r;for(;(r=A.next())&&!r.done;){const A=r.value;t.call(e,A[0],A[1])}},matchAll:(e,t)=>{let A;const r=[];for(;null!==(A=e.exec(t));)r.push(A);return r},isHTMLForm:$_,hasOwnProperty:q_,hasOwnProp:q_,reduceDescriptors:X_,freezeMethods:e=>{X_(e,(t,A)=>{if(x_(e)&&-1!==["arguments","caller","callee"].indexOf(A))return!1;const r=e[A];x_(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+A+"'")}))})},toObjectSet:(e,t)=>{const A={},r=e=>{e.forEach(e=>{A[e]=!0})};return b_(e)?r(e):r(String(e).split(t)),A},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,A){return t.toUpperCase()+A}),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:G_,global:V_,isContextDefined:z_,isSpecCompliantForm:function(e){return!!(e&&x_(e.append)&&"FormData"===e[v_]&&e[m_])},toJSONObject:e=>{const t=new Array(10),A=(e,r)=>{if(M_(e)){if(t.indexOf(e)>=0)return;if(Q_(e))return e;if(!("toJSON"in e)){t[r]=e;const a=b_(e)?[]:{};return R_(e,(e,t)=>{const n=A(e,r+1);!C_(n)&&(a[t]=n)}),t[r]=void 0,a}}return e};return A(e,0)},isAsyncFn:J_,isThenable:e=>e&&(M_(e)||x_(e))&&x_(e.then)&&x_(e.catch),setImmediate:Y_,asap:rI,isIterable:e=>null!=e&&x_(e[m_])};let nI=class e extends Error{static from(t,A,r,a,n,s){const i=new e(t.message,A||t.code,r,a,n);return i.cause=t,i.name=t.name,null!=t.status&&null==i.status&&(i.status=t.status),s&&Object.assign(i,s),i}constructor(e,t,A,r,a){super(e),Object.defineProperty(this,"message",{value:e,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,t&&(this.code=t),A&&(this.config=A),r&&(this.request=r),a&&(this.response=a,this.status=a.status)}toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:aI.toJSONObject(this.config),code:this.code,status:this.status}}};nI.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",nI.ERR_BAD_OPTION="ERR_BAD_OPTION",nI.ECONNABORTED="ECONNABORTED",nI.ETIMEDOUT="ETIMEDOUT",nI.ERR_NETWORK="ERR_NETWORK",nI.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",nI.ERR_DEPRECATED="ERR_DEPRECATED",nI.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",nI.ERR_BAD_REQUEST="ERR_BAD_REQUEST",nI.ERR_CANCELED="ERR_CANCELED",nI.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",nI.ERR_INVALID_URL="ERR_INVALID_URL";function sI(e){return aI.isPlainObject(e)||aI.isArray(e)}function iI(e){return aI.endsWith(e,"[]")?e.slice(0,-2):e}function oI(e,t,A){return e?e.concat(t).map(function(e,t){return e=iI(e),!A&&t?"["+e+"]":e}).join(A?".":""):t}const lI=aI.toFlatObject(aI,{},null,function(e){return/^is[A-Z]/.test(e)});function cI(e,t,A){if(!aI.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(A=aI.toFlatObject(A,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!aI.isUndefined(t[e])})).metaTokens,a=A.visitor||l,n=A.dots,s=A.indexes,i=(A.Blob||"undefined"!=typeof Blob&&Blob)&&aI.isSpecCompliantForm(t);if(!aI.isFunction(a))throw new TypeError("visitor must be a function");function o(e){if(null===e)return"";if(aI.isDate(e))return e.toISOString();if(aI.isBoolean(e))return e.toString();if(!i&&aI.isBlob(e))throw new nI("Blob is not supported. Use a Buffer instead.");return aI.isArrayBuffer(e)||aI.isTypedArray(e)?i&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function l(e,A,a){let i=e;if(aI.isReactNative(t)&&aI.isReactNativeBlob(e))return t.append(oI(a,A,n),o(e)),!1;if(e&&!a&&"object"==typeof e)if(aI.endsWith(A,"{}"))A=r?A:A.slice(0,-2),e=JSON.stringify(e);else if(aI.isArray(e)&&function(e){return aI.isArray(e)&&!e.some(sI)}(e)||(aI.isFileList(e)||aI.endsWith(A,"[]"))&&(i=aI.toArray(e)))return A=iI(A),i.forEach(function(e,r){!aI.isUndefined(e)&&null!==e&&t.append(!0===s?oI([A],r,n):null===s?A:A+"[]",o(e))}),!1;return!!sI(e)||(t.append(oI(a,A,n),o(e)),!1)}const c=[],u=Object.assign(lI,{defaultVisitor:l,convertValue:o,isVisitable:sI});if(!aI.isObject(e))throw new TypeError("data must be an object");return function e(A,r){if(!aI.isUndefined(A)){if(-1!==c.indexOf(A))throw Error("Circular reference detected in "+r.join("."));c.push(A),aI.forEach(A,function(A,n){!0===(!(aI.isUndefined(A)||null===A)&&a.call(t,A,aI.isString(n)?n.trim():n,r,u))&&e(A,r?r.concat(n):[n])}),c.pop()}}(e),t}function uI(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function dI(e,t){this._pairs=[],e&&cI(e,this,t)}const hI=dI.prototype;function pI(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function fI(e,t,A){if(!t)return e;const r=A&&A.encode||pI,a=aI.isFunction(A)?{serialize:A}:A,n=a&&a.serialize;let s;if(s=n?n(t,a):aI.isURLSearchParams(t)?t.toString():new dI(t,a).toString(r),s){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+s}return e}hI.append=function(e,t){this._pairs.push([e,t])},hI.toString=function(e){const t=e?function(t){return e.call(this,t,uI)}:uI;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};class gI{constructor(){this.handlers=[]}use(e,t,A){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!A&&A.synchronous,runWhen:A?A.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){aI.forEach(this.handlers,function(t){null!==t&&e(t)})}}const mI={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},vI={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:dI,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},yI="undefined"!=typeof window&&"undefined"!=typeof document,wI="object"==typeof navigator&&navigator||void 0,BI=yI&&(!wI||["ReactNative","NativeScript","NS"].indexOf(wI.product)<0),bI="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,CI=yI&&window.location.href||"http://localhost",QI={.../* @__PURE__ */Object.freeze(/* @__PURE__ */Object.defineProperty({__proto__:null,hasBrowserEnv:yI,hasStandardBrowserEnv:BI,hasStandardBrowserWebWorkerEnv:bI,navigator:wI,origin:CI},Symbol.toStringTag,{value:"Module"})),...vI};function FI(e){function t(e,A,r,a){let n=e[a++];if("__proto__"===n)return!0;const s=Number.isFinite(+n),i=a>=e.length;if(n=!n&&aI.isArray(r)?r.length:n,i)return aI.hasOwnProp(r,n)?r[n]=[r[n],A]:r[n]=A,!s;r[n]&&aI.isObject(r[n])||(r[n]=[]);return t(e,A,r[n],a)&&aI.isArray(r[n])&&(r[n]=function(e){const t={},A=Object.keys(e);let r;const a=A.length;let n;for(r=0;r<a;r++)n=A[r],t[n]=e[n];return t}(r[n])),!s}if(aI.isFormData(e)&&aI.isFunction(e.entries)){const A={};return aI.forEachEntry(e,(e,r)=>{t(function(e){return aI.matchAll(/\w+|\[(\w*)]/g,e).map(e=>"[]"===e[0]?"":e[1]||e[0])}(e),r,A,0)}),A}return null}const EI={transitional:mI,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const A=t.getContentType()||"",r=A.indexOf("application/json")>-1,a=aI.isObject(e);a&&aI.isHTMLForm(e)&&(e=new FormData(e));if(aI.isFormData(e))return r?JSON.stringify(FI(e)):e;if(aI.isArrayBuffer(e)||aI.isBuffer(e)||aI.isStream(e)||aI.isFile(e)||aI.isBlob(e)||aI.isReadableStream(e))return e;if(aI.isArrayBufferView(e))return e.buffer;if(aI.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let n;if(a){if(A.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return cI(e,new QI.classes.URLSearchParams,{visitor:function(e,t,A,r){return QI.isNode&&aI.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)},...t})}(e,this.formSerializer).toString();if((n=aI.isFileList(e))||A.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return cI(n?{"files[]":e}:e,t&&new t,this.formSerializer)}}return a||r?(t.setContentType("application/json",!1),function(e,t,A){if(aI.isString(e))try{return(t||JSON.parse)(e),aI.trim(e)}catch(r){if("SyntaxError"!==r.name)throw r}return(A||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||EI.transitional,A=t&&t.forcedJSONParsing,r="json"===this.responseType;if(aI.isResponse(e)||aI.isReadableStream(e))return e;if(e&&aI.isString(e)&&(A&&!this.responseType||r)){const A=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e,this.parseReviver)}catch(a){if(A){if("SyntaxError"===a.name)throw nI.from(a,nI.ERR_BAD_RESPONSE,this,null,this.response);throw a}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:QI.classes.FormData,Blob:QI.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};aI.forEach(["delete","get","head","post","put","patch"],e=>{EI.headers[e]={}});const xI=aI.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),UI=/* @__PURE__ */Symbol("internals");function MI(e){return e&&String(e).trim().toLowerCase()}function SI(e){return!1===e||null==e?e:aI.isArray(e)?e.map(SI):String(e)}function kI(e,t,A,r,a){return aI.isFunction(r)?r.call(this,t,A):(a&&(t=A),aI.isString(t)?aI.isString(r)?-1!==t.indexOf(r):aI.isRegExp(r)?r.test(t):void 0:void 0)}let _I=class{constructor(e){e&&this.set(e)}set(e,t,A){const r=this;function a(e,t,A){const a=MI(t);if(!a)throw new Error("header name must be a non-empty string");const n=aI.findKey(r,a);(!n||void 0===r[n]||!0===A||void 0===A&&!1!==r[n])&&(r[n||t]=SI(e))}const n=(e,t)=>aI.forEach(e,(e,A)=>a(e,A,t));if(aI.isPlainObject(e)||e instanceof this.constructor)n(e,t);else if(aI.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))n((e=>{const t={};let A,r,a;return e&&e.split("\n").forEach(function(e){a=e.indexOf(":"),A=e.substring(0,a).trim().toLowerCase(),r=e.substring(a+1).trim(),!A||t[A]&&xI[A]||("set-cookie"===A?t[A]?t[A].push(r):t[A]=[r]:t[A]=t[A]?t[A]+", "+r:r)}),t})(e),t);else if(aI.isObject(e)&&aI.isIterable(e)){let A,r,a={};for(const t of e){if(!aI.isArray(t))throw TypeError("Object iterator must return a key-value pair");a[r=t[0]]=(A=a[r])?aI.isArray(A)?[...A,t[1]]:[A,t[1]]:t[1]}n(a,t)}else null!=e&&a(t,e,A);return this}get(e,t){if(e=MI(e)){const A=aI.findKey(this,e);if(A){const e=this[A];if(!t)return e;if(!0===t)return function(e){const t=/* @__PURE__ */Object.create(null),A=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=A.exec(e);)t[r[1]]=r[2];return t}(e);if(aI.isFunction(t))return t.call(this,e,A);if(aI.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=MI(e)){const A=aI.findKey(this,e);return!(!A||void 0===this[A]||t&&!kI(0,this[A],A,t))}return!1}delete(e,t){const A=this;let r=!1;function a(e){if(e=MI(e)){const a=aI.findKey(A,e);!a||t&&!kI(0,A[a],a,t)||(delete A[a],r=!0)}}return aI.isArray(e)?e.forEach(a):a(e),r}clear(e){const t=Object.keys(this);let A=t.length,r=!1;for(;A--;){const a=t[A];e&&!kI(0,this[a],a,e,!0)||(delete this[a],r=!0)}return r}normalize(e){const t=this,A={};return aI.forEach(this,(r,a)=>{const n=aI.findKey(A,a);if(n)return t[n]=SI(r),void delete t[a];const s=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,A)=>t.toUpperCase()+A)}(a):String(a).trim();s!==a&&delete t[a],t[s]=SI(r),A[s]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=/* @__PURE__ */Object.create(null);return aI.forEach(this,(A,r)=>{null!=A&&!1!==A&&(t[r]=e&&aI.isArray(A)?A.join(", "):A)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const A=new this(e);return t.forEach(e=>A.set(e)),A}static accessor(e){const t=(this[UI]=this[UI]={accessors:{}}).accessors,A=this.prototype;function r(e){const r=MI(e);t[r]||(!function(e,t){const A=aI.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+A,{value:function(e,A,a){return this[r].call(this,t,e,A,a)},configurable:!0})})}(A,e),t[r]=!0)}return aI.isArray(e)?e.forEach(r):r(e),this}};function II(e,t){const A=this||EI,r=t||A,a=_I.from(r.headers);let n=r.data;return aI.forEach(e,function(e){n=e.call(A,n,a.normalize(),t?t.status:void 0)}),a.normalize(),n}function LI(e){return!(!e||!e.__CANCEL__)}_I.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),aI.reduceDescriptors(_I.prototype,({value:e},t)=>{let A=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[A]=e}}}),aI.freezeMethods(_I);let HI=class extends nI{constructor(e,t,A){super(null==e?"canceled":e,nI.ERR_CANCELED,t,A),this.name="CanceledError",this.__CANCEL__=!0}};function OI(e,t,A){const r=A.config.validateStatus;A.status&&r&&!r(A.status)?t(new nI("Request failed with status code "+A.status,[nI.ERR_BAD_REQUEST,nI.ERR_BAD_RESPONSE][Math.floor(A.status/100)-4],A.config,A.request,A)):e(A)}const TI=(e,t,A=3)=>{let r=0;const a=function(e,t){e=e||10;const A=new Array(e),r=new Array(e);let a,n=0,s=0;return t=void 0!==t?t:1e3,function(i){const o=Date.now(),l=r[s];a||(a=o),A[n]=i,r[n]=o;let c=s,u=0;for(;c!==n;)u+=A[c++],c%=e;if(n=(n+1)%e,n===s&&(s=(s+1)%e),o-a<t)return;const d=l&&o-l;return d?Math.round(1e3*u/d):void 0}}(50,250);return function(e,t){let A,r,a=0,n=1e3/t;const s=(t,n=Date.now())=>{a=n,A=null,r&&(clearTimeout(r),r=null),e(...t)};return[(...e)=>{const t=Date.now(),i=t-a;i>=n?s(e,t):(A=e,r||(r=setTimeout(()=>{r=null,s(A)},n-i)))},()=>A&&s(A)]}(A=>{const n=A.loaded,s=A.lengthComputable?A.total:void 0,i=n-r,o=a(i);r=n;e({loaded:n,total:s,progress:s?n/s:void 0,bytes:i,rate:o||void 0,estimated:o&&s&&n<=s?(s-n)/o:void 0,event:A,lengthComputable:null!=s,[t?"download":"upload"]:!0})},A)},PI=(e,t)=>{const A=null!=e;return[r=>t[0]({lengthComputable:A,total:e,loaded:r}),t[1]]},DI=e=>(...t)=>aI.asap(()=>e(...t)),NI=QI.hasStandardBrowserEnv?/* @__PURE__ */((e,t)=>A=>(A=new URL(A,QI.origin),e.protocol===A.protocol&&e.host===A.host&&(t||e.port===A.port)))(new URL(QI.origin),QI.navigator&&/(msie|trident)/i.test(QI.navigator.userAgent)):()=>!0,KI=QI.hasStandardBrowserEnv?{write(e,t,A,r,a,n,s){if("undefined"==typeof document)return;const i=[`${e}=${encodeURIComponent(t)}`];aI.isNumber(A)&&i.push(`expires=${new Date(A).toUTCString()}`),aI.isString(r)&&i.push(`path=${r}`),aI.isString(a)&&i.push(`domain=${a}`),!0===n&&i.push("secure"),aI.isString(s)&&i.push(`SameSite=${s}`),document.cookie=i.join("; ")},read(e){if("undefined"==typeof document)return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read:()=>null,remove(){}};function RI(e,t,A){let r=!("string"==typeof(a=t)&&/^([a-z][a-z\d+\-.]*:)?\/\//i.test(a));var a;return e&&(r||0==A)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const GI=e=>e instanceof _I?{...e}:e;function VI(e,t){t=t||{};const A={};function r(e,t,A,r){return aI.isPlainObject(e)&&aI.isPlainObject(t)?aI.merge.call({caseless:r},e,t):aI.isPlainObject(t)?aI.merge({},t):aI.isArray(t)?t.slice():t}function a(e,t,A,a){return aI.isUndefined(t)?aI.isUndefined(e)?void 0:r(void 0,e,0,a):r(e,t,0,a)}function n(e,t){if(!aI.isUndefined(t))return r(void 0,t)}function s(e,t){return aI.isUndefined(t)?aI.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function i(A,a,n){return n in t?r(A,a):n in e?r(void 0,A):void 0}const o={url:n,method:n,data:n,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:i,headers:(e,t,A)=>a(GI(e),GI(t),0,!0)};return aI.forEach(Object.keys({...e,...t}),function(r){if("__proto__"===r||"constructor"===r||"prototype"===r)return;const n=aI.hasOwnProp(o,r)?o[r]:a,s=n(e[r],t[r],r);aI.isUndefined(s)&&n!==i||(A[r]=s)}),A}const zI=e=>{const t=VI({},e);let{data:A,withXSRFToken:r,xsrfHeaderName:a,xsrfCookieName:n,headers:s,auth:i}=t;if(t.headers=s=_I.from(s),t.url=fI(RI(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),i&&s.set("Authorization","Basic "+btoa((i.username||"")+":"+(i.password?unescape(encodeURIComponent(i.password)):""))),aI.isFormData(A))if(QI.hasStandardBrowserEnv||QI.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if(aI.isFunction(A.getHeaders)){const e=A.getHeaders(),t=["content-type","content-length"];Object.entries(e).forEach(([e,A])=>{t.includes(e.toLowerCase())&&s.set(e,A)})}if(QI.hasStandardBrowserEnv&&(r&&aI.isFunction(r)&&(r=r(t)),r||!1!==r&&NI(t.url))){const e=a&&n&&KI.read(n);e&&s.set(a,e)}return t},jI="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise(function(t,A){const r=zI(e);let a=r.data;const n=_I.from(r.headers).normalize();let s,i,o,l,c,{responseType:u,onUploadProgress:d,onDownloadProgress:h}=r;function p(){l&&l(),c&&c(),r.cancelToken&&r.cancelToken.unsubscribe(s),r.signal&&r.signal.removeEventListener("abort",s)}let f=new XMLHttpRequest;function g(){if(!f)return;const r=_I.from("getAllResponseHeaders"in f&&f.getAllResponseHeaders());OI(function(e){t(e),p()},function(e){A(e),p()},{data:u&&"text"!==u&&"json"!==u?f.response:f.responseText,status:f.status,statusText:f.statusText,headers:r,config:e,request:f}),f=null}f.open(r.method.toUpperCase(),r.url,!0),f.timeout=r.timeout,"onloadend"in f?f.onloadend=g:f.onreadystatechange=function(){f&&4===f.readyState&&(0!==f.status||f.responseURL&&0===f.responseURL.indexOf("file:"))&&setTimeout(g)},f.onabort=function(){f&&(A(new nI("Request aborted",nI.ECONNABORTED,e,f)),f=null)},f.onerror=function(t){const r=t&&t.message?t.message:"Network Error",a=new nI(r,nI.ERR_NETWORK,e,f);a.event=t||null,A(a),f=null},f.ontimeout=function(){let t=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const a=r.transitional||mI;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),A(new nI(t,a.clarifyTimeoutError?nI.ETIMEDOUT:nI.ECONNABORTED,e,f)),f=null},void 0===a&&n.setContentType(null),"setRequestHeader"in f&&aI.forEach(n.toJSON(),function(e,t){f.setRequestHeader(t,e)}),aI.isUndefined(r.withCredentials)||(f.withCredentials=!!r.withCredentials),u&&"json"!==u&&(f.responseType=r.responseType),h&&([o,c]=TI(h,!0),f.addEventListener("progress",o)),d&&f.upload&&([i,l]=TI(d),f.upload.addEventListener("progress",i),f.upload.addEventListener("loadend",l)),(r.cancelToken||r.signal)&&(s=t=>{f&&(A(!t||t.type?new HI(null,e,f):t),f.abort(),f=null)},r.cancelToken&&r.cancelToken.subscribe(s),r.signal&&(r.signal.aborted?s():r.signal.addEventListener("abort",s)));const m=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(r.url);m&&-1===QI.protocols.indexOf(m)?A(new nI("Unsupported protocol "+m+":",nI.ERR_BAD_REQUEST,e)):f.send(a||null)})},$I=(e,t)=>{const{length:A}=e=e?e.filter(Boolean):[];if(t||A){let A,r=new AbortController;const a=function(e){if(!A){A=!0,s();const t=e instanceof Error?e:this.reason;r.abort(t instanceof nI?t:new HI(t instanceof Error?t.message:t))}};let n=t&&setTimeout(()=>{n=null,a(new nI(`timeout of ${t}ms exceeded`,nI.ETIMEDOUT))},t);const s=()=>{e&&(n&&clearTimeout(n),n=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(a):e.removeEventListener("abort",a)}),e=null)};e.forEach(e=>e.addEventListener("abort",a));const{signal:i}=r;return i.unsubscribe=()=>aI.asap(s),i}},qI=function*(e,t){let A=e.byteLength;if(A<t)return void(yield e);let r,a=0;for(;a<A;)r=a+t,yield e.slice(a,r),a=r},WI=async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:A}=await t.read();if(e)break;yield A}}finally{await t.cancel()}},XI=(e,t,A,r)=>{const a=async function*(e,t){for await(const A of WI(e))yield*qI(A,t)}(e,t);let n,s=0,i=e=>{n||(n=!0,r&&r(e))};return new ReadableStream({async pull(e){try{const{done:t,value:r}=await a.next();if(t)return i(),void e.close();let n=r.byteLength;if(A){let e=s+=n;A(e)}e.enqueue(new Uint8Array(r))}catch(t){throw i(t),t}},cancel:e=>(i(e),a.return())},{highWaterMark:2})},{isFunction:JI}=aI,YI=(({Request:e,Response:t})=>({Request:e,Response:t}))(aI.global),{ReadableStream:ZI,TextEncoder:eL}=aI.global,tL=(e,...t)=>{try{return!!e(...t)}catch(A){return!1}},AL=e=>{e=aI.merge.call({skipUndefined:!0},YI,e);const{fetch:t,Request:A,Response:r}=e,a=t?JI(t):"function"==typeof fetch,n=JI(A),s=JI(r);if(!a)return!1;const i=a&&JI(ZI),o=a&&("function"==typeof eL?/* @__PURE__ */(e=>t=>e.encode(t))(new eL):async e=>new Uint8Array(await new A(e).arrayBuffer())),l=n&&i&&tL(()=>{let e=!1;const t=new A(QI.origin,{body:new ZI,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),c=s&&i&&tL(()=>aI.isReadableStream(new r("").body)),u={stream:c&&(e=>e.body)};a&&["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!u[e]&&(u[e]=(t,A)=>{let r=t&&t[e];if(r)return r.call(t);throw new nI(`Response type '${e}' is not supported`,nI.ERR_NOT_SUPPORT,A)})});const d=async(e,t)=>{const r=aI.toFiniteNumber(e.getContentLength());return null==r?(async e=>{if(null==e)return 0;if(aI.isBlob(e))return e.size;if(aI.isSpecCompliantForm(e)){const t=new A(QI.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return aI.isArrayBufferView(e)||aI.isArrayBuffer(e)?e.byteLength:(aI.isURLSearchParams(e)&&(e+=""),aI.isString(e)?(await o(e)).byteLength:void 0)})(t):r};return async e=>{let{url:a,method:s,data:i,signal:o,cancelToken:h,timeout:p,onDownloadProgress:f,onUploadProgress:g,responseType:m,headers:v,withCredentials:y="same-origin",fetchOptions:w}=zI(e),B=t||fetch;m=m?(m+"").toLowerCase():"text";let b=$I([o,h&&h.toAbortSignal()],p),C=null;const Q=b&&b.unsubscribe&&(()=>{b.unsubscribe()});let F;try{if(g&&l&&"get"!==s&&"head"!==s&&0!==(F=await d(v,i))){let e,t=new A(a,{method:"POST",body:i,duplex:"half"});if(aI.isFormData(i)&&(e=t.headers.get("content-type"))&&v.setContentType(e),t.body){const[e,A]=PI(F,TI(DI(g)));i=XI(t.body,65536,e,A)}}aI.isString(y)||(y=y?"include":"omit");const t=n&&"credentials"in A.prototype,o={...w,signal:b,method:s.toUpperCase(),headers:v.normalize().toJSON(),body:i,duplex:"half",credentials:t?y:void 0};C=n&&new A(a,o);let h=await(n?B(C,w):B(a,o));const p=c&&("stream"===m||"response"===m);if(c&&(f||p&&Q)){const e={};["status","statusText","headers"].forEach(t=>{e[t]=h[t]});const t=aI.toFiniteNumber(h.headers.get("content-length")),[A,a]=f&&PI(t,TI(DI(f),!0))||[];h=new r(XI(h.body,65536,A,()=>{a&&a(),Q&&Q()}),e)}m=m||"text";let E=await u[aI.findKey(u,m)||"text"](h,e);return!p&&Q&&Q(),await new Promise((t,A)=>{OI(t,A,{data:E,headers:_I.from(h.headers),status:h.status,statusText:h.statusText,config:e,request:C})})}catch(E){if(Q&&Q(),E&&"TypeError"===E.name&&/Load failed|fetch/i.test(E.message))throw Object.assign(new nI("Network Error",nI.ERR_NETWORK,e,C,E&&E.response),{cause:E.cause||E});throw nI.from(E,E&&E.code,e,C,E&&E.response)}}},rL=/* @__PURE__ */new Map,aL=e=>{let t=e&&e.env||{};const{fetch:A,Request:r,Response:a}=t,n=[r,a,A];let s,i,o=n.length,l=rL;for(;o--;)s=n[o],i=l.get(s),void 0===i&&l.set(s,i=o?/* @__PURE__ */new Map:AL(t)),l=i;return i};aL();const nL={http:null,xhr:jI,fetch:{get:aL}};aI.forEach(nL,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(A){}Object.defineProperty(e,"adapterName",{value:t})}});const sL=e=>`- ${e}`,iL=e=>aI.isFunction(e)||null===e||!1===e;const oL={getAdapter:function(e,t){e=aI.isArray(e)?e:[e];const{length:A}=e;let r,a;const n={};for(let s=0;s<A;s++){let A;if(r=e[s],a=r,!iL(r)&&(a=nL[(A=String(r)).toLowerCase()],void 0===a))throw new nI(`Unknown adapter '${A}'`);if(a&&(aI.isFunction(a)||(a=a.get(t))))break;n[A||"#"+s]=a}if(!a){const e=Object.entries(n).map(([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build"));let t=A?e.length>1?"since :\n"+e.map(sL).join("\n"):" "+sL(e[0]):"as no adapter specified";throw new nI("There is no suitable adapter to dispatch the request "+t,"ERR_NOT_SUPPORT")}return a},adapters:nL};function lL(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new HI(null,e)}function cL(e){lL(e),e.headers=_I.from(e.headers),e.data=II.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return oL.getAdapter(e.adapter||EI.adapter,e)(e).then(function(t){return lL(e),t.data=II.call(e,e.transformResponse,t),t.headers=_I.from(t.headers),t},function(t){return LI(t)||(lL(e),t&&t.response&&(t.response.data=II.call(e,e.transformResponse,t.response),t.response.headers=_I.from(t.response.headers))),Promise.reject(t)})}const uL="1.13.6",dL={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{dL[e]=function(A){return typeof A===e||"a"+(t<1?"n ":" ")+e}});const hL={};dL.transitional=function(e,t,A){return(r,a,n)=>{if(!1===e)throw new nI(function(e,t){return"[Axios v"+uL+"] Transitional option '"+e+"'"+t+(A?". "+A:"")}(a," has been removed"+(t?" in "+t:"")),nI.ERR_DEPRECATED);return t&&!hL[a]&&(hL[a]=!0),!e||e(r,a,n)}},dL.spelling=function(e){return(e,t)=>!0};const pL={assertOptions:function(e,t,A){if("object"!=typeof e)throw new nI("options must be an object",nI.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let a=r.length;for(;a-- >0;){const n=r[a],s=t[n];if(s){const t=e[n],A=void 0===t||s(t,n,e);if(!0!==A)throw new nI("option "+n+" must be "+A,nI.ERR_BAD_OPTION_VALUE);continue}if(!0!==A)throw new nI("Unknown option "+n,nI.ERR_BAD_OPTION)}},validators:dL},fL=pL.validators;let gL=class{constructor(e){this.defaults=e||{},this.interceptors={request:new gI,response:new gI}}async request(e,t){try{return await this._request(e,t)}catch(A){if(A instanceof Error){let e={};Error.captureStackTrace?Error.captureStackTrace(e):e=new Error;const t=e.stack?e.stack.replace(/^.+\n/,""):"";try{A.stack?t&&!String(A.stack).endsWith(t.replace(/^.+\n.+\n/,""))&&(A.stack+="\n"+t):A.stack=t}catch(r){}}throw A}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=VI(this.defaults,t);const{transitional:A,paramsSerializer:r,headers:a}=t;void 0!==A&&pL.assertOptions(A,{silentJSONParsing:fL.transitional(fL.boolean),forcedJSONParsing:fL.transitional(fL.boolean),clarifyTimeoutError:fL.transitional(fL.boolean),legacyInterceptorReqResOrdering:fL.transitional(fL.boolean)},!1),null!=r&&(aI.isFunction(r)?t.paramsSerializer={serialize:r}:pL.assertOptions(r,{encode:fL.function,serialize:fL.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),pL.assertOptions(t,{baseUrl:fL.spelling("baseURL"),withXsrfToken:fL.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let n=a&&aI.merge(a.common,a[t.method]);a&&aI.forEach(["delete","get","head","post","put","patch","common"],e=>{delete a[e]}),t.headers=_I.concat(n,a);const s=[];let i=!0;this.interceptors.request.forEach(function(e){if("function"==typeof e.runWhen&&!1===e.runWhen(t))return;i=i&&e.synchronous;const A=t.transitional||mI;A&&A.legacyInterceptorReqResOrdering?s.unshift(e.fulfilled,e.rejected):s.push(e.fulfilled,e.rejected)});const o=[];let l;this.interceptors.response.forEach(function(e){o.push(e.fulfilled,e.rejected)});let c,u=0;if(!i){const e=[cL.bind(this),void 0];for(e.unshift(...s),e.push(...o),c=e.length,l=Promise.resolve(t);u<c;)l=l.then(e[u++],e[u++]);return l}c=s.length;let d=t;for(;u<c;){const e=s[u++],t=s[u++];try{d=e(d)}catch(h){t.call(this,h);break}}try{l=cL.call(this,d)}catch(h){return Promise.reject(h)}for(u=0,c=o.length;u<c;)l=l.then(o[u++],o[u++]);return l}getUri(e){return fI(RI((e=VI(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}};aI.forEach(["delete","get","head","options"],function(e){gL.prototype[e]=function(t,A){return this.request(VI(A||{},{method:e,url:t,data:(A||{}).data}))}}),aI.forEach(["post","put","patch"],function(e){function t(t){return function(A,r,a){return this.request(VI(a||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:A,data:r}))}}gL.prototype[e]=t(),gL.prototype[e+"Form"]=t(!0)});const mL={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(mL).forEach(([e,t])=>{mL[t]=e});const vL=function e(t){const A=new gL(t),r=p_(gL.prototype.request,A);return aI.extend(r,gL.prototype,A,{allOwnKeys:!0}),aI.extend(r,A,null,{allOwnKeys:!0}),r.create=function(A){return e(VI(t,A))},r}(EI);vL.Axios=gL,vL.CanceledError=HI,vL.CancelToken=class e{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(e){t=e});const A=this;this.promise.then(e=>{if(!A._listeners)return;let t=A._listeners.length;for(;t-- >0;)A._listeners[t](e);A._listeners=null}),this.promise.then=e=>{let t;const r=new Promise(e=>{A.subscribe(e),t=e}).then(e);return r.cancel=function(){A.unsubscribe(t)},r},e(function(e,r,a){A.reason||(A.reason=new HI(e,r,a),t(A.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let t;return{token:new e(function(e){t=e}),cancel:t}}},vL.isCancel=LI,vL.VERSION=uL,vL.toFormData=cI,vL.AxiosError=nI,vL.Cancel=vL.CanceledError,vL.all=function(e){return Promise.all(e)},vL.spread=function(e){return function(t){return e.apply(null,t)}},vL.isAxiosError=function(e){return aI.isObject(e)&&!0===e.isAxiosError},vL.mergeConfig=VI,vL.AxiosHeaders=_I,vL.formToJSON=e=>FI(aI.isHTMLForm(e)?new FormData(e):e),vL.getAdapter=oL.getAdapter,vL.HttpStatusCode=mL,vL.default=vL;const{Axios:yL,AxiosError:wL,CanceledError:BL,isCancel:bL,CancelToken:CL,VERSION:QL,all:FL,Cancel:EL,isAxiosError:xL,spread:UL,toFormData:ML,AxiosHeaders:SL,HttpStatusCode:kL,formToJSON:_L,getAdapter:IL,mergeConfig:LL}=vL,HL=vL.create({baseURL:"http://www.gisx.work/gismap-server",timeout:3e4,withCredentials:!1,headers:{"Content-Type":"application/json; charset=utf-8"},validateStatus:e=>200===e||401===e,transformResponse:[function(e){if("string"==typeof e&&e)try{return JSON.parse(e)}catch(t){return e}return e}]});HL.interceptors.request.use(e=>{const t=sessionStorage.getItem("token");return null!=t&&!1!==e.isAuth&&(e.headers.Authorization=t),e},e=>{Promise.reject(e)}),HL.interceptors.response.use(e=>{const{data:t,status:A}=e;return 401===A?Promise.reject(new Error("您未登录,或者登录已经超时,请先登录!")):t},e=>{let t="";if(e&&e.response){switch(e.response.status){case 302:t="接口重定向了!";break;case 400:t="参数不正确!";break;case 401:t="您未登录,或者登录已经超时,请先登录!";break;case 403:t="您没有权限操作!";break;case 404:t=`请求地址出错: ${e.response.config.url}`;break;case 408:t="请求超时!";break;case 409:t="系统已存在相同数据!";break;case 500:t="服务器内部错误!";break;case 501:t="服务未实现!";break;case 502:t="网关错误!";break;case 503:t="服务不可用!";break;case 504:t="服务暂时无法访问,请稍后再试!";break;case 505:t="HTTP 版本不受支持!";break;default:t="异常问题,请联系管理员!"}return Promise.reject(t)}return Promise.reject(e.message)});const OL={responseType:"json"};async function TL(e,t,A,r,a){let n=e;const s={...OL,...a,...r?.axiosOption||{}};let i={params:t};"get"!==A&&(i={data:t});try{const e=await HL({url:n,method:A,...i,...s,...r});return Promise.resolve(e)}catch(o){return Promise.reject(o)}}class PL{static async get(e,t,A,r){return await TL(e,t,"get",A,r)}static async post(e,t,A,r){return await TL(e,t,"post",A,r)}}class DL extends PL{static login(e){return super.post(wt("login"),e)}static getMenu(e){return super.get(wt("getMenu"),e)}static getModules(e){return super.get(wt("getModules"),e)}static getMapView(e){return super.get(wt("getMapView"),e)}static getLayer(e){return super.get(wt("getLayer"),e)}static getTools(e){return super.get(wt("getTools"),e)}static getTemplate(e){const t=Bt("getTemplate");return super.get(t,e,{baseURL:""},{baseURL:""})}static getQuickSearch(e){const t=Bt("getQuickSearch");return super.get(t,e,{baseURL:""},{baseURL:""})}static getQuickSearchResult(e,t){return super.post(`${e}`,t)}static getTiandituSearch(e,t){const A=e||wt("tiandituSearch");return super.get(`${A}`,t,{isAuth:!1})}}const NL={class:"search-input-wrapper"},KL={class:"gis-search-filter"},RL={key:0,class:"gismap-search-history"},GL={class:"history-items"},VL=["onClick"],zL={class:"history-text"},jL={key:1,class:"gismap-search-result"},$L={class:"search-result-header"},qL={class:"search_header_title"},WL=["onClick"],XL={class:"search-result-item-title"},JL={class:"search_marker"},YL=["innerHTML"],ZL={class:"search-result-item-content"},eH={key:0,class:"search-result-item-content-row-label"},tH={class:"search-result-item-content-row-value"},AH=/* @__PURE__ */o({name:"GisMapSearch",props:{data:{type:Array,default:()=>[]},round:{type:Boolean,default:!1},func:{type:Function,default:void 0},tianditu:{type:Object,default:()=>({})}},setup(e){const A="gismap_search_history",r=e,a=Gt(),{mapHeight:n}=function(e){const A=t(0);return e?(e?.getMap()?.on("resize",()=>{A.value=e?.getMap()?.getContainer()?.clientHeight||0}),l(()=>{e&&(A.value=e?.getMap()?.getContainer()?.clientHeight||0)}),{mapHeight:A}):{mapHeight:A}}(a.value?.adapter),o=t(!0),p=/* @__PURE__ */new Map,g=t(""),m=t(""),v=t(""),y=t("请输入搜索内容"),B=t(""),b=t(),C=t([]),Q=t(!1),F=t(""),E=t([]),x=i(()=>r.data.length>1?350:260),U={specify:"156321000",queryType:"12",start:"0",count:"10",dataTypes:"",show:"2"},M=e=>{if(e){const t=p.get(e);t&&(y.value=t.placeholder||"请输入搜索内容",g.value=t.defaultValue||"",m.value=t.id||"",v.value=t.serviceUrl||"",B.value=t.templateId||"")}},_=()=>{if(!g.value)return void(o.value=!1);if((e=>{if(!e.trim())return;const t=E.value.filter(t=>t!==e);t.unshift(e),t.length>10&&t.pop(),E.value=t,localStorage.setItem(A,JSON.stringify(E.value))})(g.value),b.value=a.value?.templateManager?.getTemplate(B.value),!b.value)return void Xm.error("模板不存在");o.value=!0,Q.value=!0;const e=p.get(m.value);if("tainditu"===e?.name)return void I();if(!v.value)return void(Q.value=!1);const t=r.func||DL.getQuickSearchResult,n=JSON.stringify({key:`%${g.value}%`});t(v.value,n).then(e=>{const t=e.data?.features||[];C.value=t.map((e,t)=>({...e,index:t+1,uuid:Tv(),templateId:B.value||""})),Q.value=!1})},I=()=>{const e={type:"query",tk:a.value?.tdtToken||"",postStr:JSON.stringify(Object.assign({},U,r.tianditu,{keyWord:`%${g.value}%`}))};DL.getTiandituSearch(v.value,e).then(e=>{if(Q.value=!1,1e3===e?.status?.infocode){const t=e?.pois||[];C.value=t.map((e,t)=>({...e,index:t+1,uuid:Tv()}));const A=C.value.map(e=>({id:e.uuid,index:e.index,lngLat:e.lonlat.split(",").map(Number),properties:e,templateId:B.value||""}));H(A)}else Xm.error(e?.status?.cndesc||"搜索失败")})},H=e=>{a.value?.markerManager?.clear(),a.value?.markerManager?.addMarkers(e),a.value?.markerManager?.setOnMarkerClick(e=>{F.value=e.id,a.value?.markerManager?.flyTo(e.id,15,!0)}),e.length>0&&setTimeout(()=>{const t=e[0].id;a.value?.markerManager?.flyTo(t,15,!0)},1e3)},O=()=>{o.value=!1,C.value=[],g.value="",a.value?.markerManager?.clear(),a.value?.events.emit("layer:removePopup",{})},T=()=>{if(0===r.data.length)return;p.clear(),r.data.forEach(e=>{p.set(e.id,e)});const e=r.data[0];e&&M(e.id)},N=(e,t)=>Pv(e[t.fieldName]||"",t);return l(()=>{Ft.templates.forEach(e=>{a.value?.templateManager?.addTemplate(e.id,e)}),T(),(()=>{try{const e=localStorage.getItem(A);e&&(E.value=JSON.parse(e))}catch{E.value=[]}})()}),s(()=>r.data,()=>{T()}),(t,s)=>(c(),u("div",{class:d(["gismap-search",{round:e.round,"no-select":1===r.data.length}])},[P(w(fv),{visible:o.value,width:x.value,trigger:"hover","popper-class":"gismap-search-popover",onClose:O},{reference:D(()=>[h("div",NL,[P(w(bd),{modelValue:g.value,"onUpdate:modelValue":s[0]||(s[0]=e=>g.value=e),placeholder:y.value,size:"large",style:L({width:x.value+"px"}),onKeyup:le(_,["enter"]),onFocus:s[1]||(s[1]=e=>o.value=!0)},{suffix:D(()=>[Q.value?(c(),k(w(cc),{key:1,class:"is-loading"},{default:D(()=>[P(w(Gl))]),_:1})):(c(),k(w(cc),{key:0},{default:D(()=>[P(w(Xl))]),_:1}))]),_:1},8,["modelValue","placeholder","style"])])]),default:D(()=>[h("div",KL,[P(w(Op),{modelValue:m.value,"onUpdate:modelValue":s[2]||(s[2]=e=>m.value=e),onChange:M},{default:D(()=>[(c(!0),u(S,null,ne(r.data,e=>(c(),k(w(Hp),{key:e.id,label:e.id},{default:D(()=>[z(j(e.label),1)]),_:2},1032,["label"]))),128))]),_:1},8,["modelValue"])]),E.value.length>0?(c(),u("div",RL,[h("div",GL,[(c(!0),u(S,null,ne(E.value,(e,t)=>(c(),u("span",{key:t,class:"history-item",onClick:t=>{return A=e,g.value=A,void _();var A}},[P(w(cc),{size:"14"},{default:D(()=>[P(w(Ol))]),_:1}),h("span",zL,j(e),1),P(w(cc),{class:"history-delete",size:"10",onClick:Z(e=>(e=>{E.value.splice(e,1),localStorage.setItem(A,JSON.stringify(E.value))})(t),["stop"])},{default:D(()=>[P(w(Tl))]),_:1},8,["onClick"])],8,VL))),128))])])):f("",!0),C.value.length>0?(c(),u("div",jL,[h("header",$L,[h("span",qL,"搜索结果("+j(C.value.length)+")条",1),h("span",{class:"search_header_close",onClick:O,title:"清除"},[P(w(cc),null,{default:D(()=>[P(w(Tl))]),_:1})])]),h("section",{class:"search-result-content no-scrollbar",style:L({maxHeight:w(n)-280+"px"})},[(c(!0),u(S,null,ne(C.value,e=>{return c(),u("div",{key:e?.uuid,class:d(["search-result-item",{active:e.uuid===F.value}]),onClick:t=>(e=>{e.uuid&&(F.value=e.uuid,a.value?.markerManager?.flyTo(e.uuid,15,!0))})(e)},[h("div",XL,[h("span",JL,j(e.index),1),h("span",{class:"search_value",innerHTML:(t=e,((b.value?.header||"").match(/\{[^}]+\}/g)||[]).map(e=>{const A=e.replace(/[{}]/g,"").split(".").pop()||"";return t[A]||""}).join(" "))},null,8,YL)]),h("div",ZL,[(c(!0),u(S,null,ne(b.value?.body||[],t=>(c(),u("div",{class:"search-result-item-content-row",key:t.fieldName},[t.fieldLabel?(c(),u("div",eH,j(t.fieldLabel)+":",1)):f("",!0),h("div",tH,["tag"===t.fieldType?(c(!0),u(S,{key:0},ne(N(e,t),e=>(c(),k(w(Lh),{key:e,type:"primary"},{default:D(()=>[z(j(e),1)]),_:2},1024))),128)):(c(),u(S,{key:1},[z(j(N(e,t)),1)],64))])]))),128))])],10,WL);var t}),128))],4)])):f("",!0)]),_:1},8,["visible","width"])],2))}}),rH={class:"gismap-mapcompare"},aH={class:"compare-toolbar"},nH={class:"compare-group"},sH={class:"compare-action-group"},iH={class:"compare-group"},oH={class:"compare-direction-group"},lH=/* @__PURE__ */o({name:"GisMapCompareSplit",__name:"Split",props:{active:{type:Boolean,default:!1},direction:{type:String,default:"vertical"}},emits:["update:active","update:direction","toggle","change"],setup(e,{emit:A}){const r=e,a=A,n=t(r.active),i=t(r.direction),o=()=>{n.value=!n.value,a("update:active",n.value),a("toggle"),a("change",{active:n.value,direction:i.value})},l=e=>{i.value=e,a("update:direction",e),a("change",{active:n.value,direction:e})};return s(()=>r.active,e=>{n.value=e}),s(()=>r.direction,e=>{i.value=e}),(e,t)=>(c(),u("div",rH,[h("div",aH,[h("div",nH,[t[2]||(t[2]=h("div",{class:"group-title"},"双屏模式",-1)),h("div",sH,[h("button",{class:d(["compare-btn",{active:n.value}]),onClick:o},j(n.value?"关闭双屏":"开启双屏"),3)])]),n.value?(c(),u(S,{key:0},[h("div",iH,[t[5]||(t[5]=h("div",{class:"group-title"},"分割方向",-1)),h("div",oH,[h("button",{class:d(["compare-btn",{active:"horizontal"===i.value}]),onClick:t[0]||(t[0]=e=>l("horizontal"))},[...t[3]||(t[3]=[h("span",{class:"btn-icon"},"—",-1),h("span",{class:"btn-label"},"水平",-1)])],2),h("button",{class:d(["compare-btn",{active:"vertical"===i.value}]),onClick:t[1]||(t[1]=e=>l("vertical"))},[...t[4]||(t[4]=[h("span",{class:"btn-icon"},"|",-1),h("span",{class:"btn-label"},"垂直",-1)])],2)])]),t[6]||(t[6]=fe('<div class="compare-group"><div class="group-title">图层说明</div><div class="layer-info"><div class="layer-item"><span class="layer-dot map"></span><span class="layer-text">左侧:天地图矢量地图</span></div><div class="layer-item"><span class="layer-dot image"></span><span class="layer-text">右侧:天地图影像地图</span></div></div></div>',1))],64)):f("",!0)])]))}}),cH={class:"gismap-mapcompare"},uH={class:"compare-toolbar"},dH={class:"compare-group"},hH={class:"compare-direction-group"},pH={class:"compare-group"},fH={class:"compare-position-group"},gH={class:"compare-value"},mH=/* @__PURE__ */o({name:"GisMapCompareFrame",__name:"Frame",props:{direction:{type:String,default:"vertical"},initialPercent:{type:Number,default:50}},emits:["update:direction","update:percent","change","confirm","cancel"],setup(e,{emit:A}){const r=e,a=A,{direction:n,percent:i,setDirection:o,setPercent:l,confirm:p,cancel:f}=Hv({direction:r.direction,percent:r.initialPercent}),g=t(r.direction),m=t(r.initialPercent),v=e=>{g.value=e,o(e),a("update:direction",e),a("change",{direction:e,percent:m.value})},y=()=>{o(g.value),l(m.value),p(),a("confirm",{direction:g.value,percent:m.value})},w=()=>{f(),a("cancel")};return s(()=>r.direction,e=>{g.value=e}),s(()=>r.initialPercent,e=>{m.value=e}),s(m,e=>{l(e),a("update:percent",e),a("change",{direction:g.value,percent:e})}),s(n,e=>{g.value=e}),s(i,e=>{m.value=e}),(e,t)=>(c(),u("div",cH,[h("div",uH,[h("div",dH,[t[5]||(t[5]=h("div",{class:"group-title"},"分割方向",-1)),h("div",hH,[h("button",{class:d(["compare-btn",{active:"vertical"===g.value}]),onClick:t[0]||(t[0]=e=>v("vertical"))},[...t[3]||(t[3]=[h("span",{class:"btn-icon"},"|",-1),h("span",{class:"btn-label"},"垂直",-1)])],2),h("button",{class:d(["compare-btn",{active:"horizontal"===g.value}]),onClick:t[1]||(t[1]=e=>v("horizontal"))},[...t[4]||(t[4]=[h("span",{class:"btn-icon"},"—",-1),h("span",{class:"btn-label"},"水平",-1)])],2)])]),h("div",pH,[t[6]||(t[6]=h("div",{class:"group-title"},"分割位置",-1)),h("div",fH,[H(h("input",{type:"range",min:"10",max:"90",step:"1","onUpdate:modelValue":t[2]||(t[2]=e=>m.value=e),class:"compare-slider"},null,512),[[ge,m.value,void 0,{number:!0}]]),h("span",gH,j(m.value)+"%",1)])]),h("div",{class:"compare-group"},[h("div",{class:"compare-action-group"},[h("button",{class:"compare-btn confirm",onClick:y},"确定"),h("button",{class:"compare-btn cancel",onClick:w},"取消")])])])]))}}),vH=/* @__PURE__ */vC(/* @__PURE__ */o({name:"MapCompass",setup(e){const{context:A}=Sv();let r=t(0),a=t(0);const n=()=>{const e=A.value?.adapter?.getMap();e&&(e.setBearing(0),e.setPitch(0))};return l(()=>{const e=A.value?.adapter?.getMap();e&&(r.value=e.getBearing()||0,a.value=e.getPitch()||0,e.on("rotate",()=>{r.value=e.getBearing()||0}),e.on("pitch",()=>{a.value=e.getPitch()||0}))}),(e,t)=>(c(),u("div",{class:"gismap-compass",onClick:n},[(c(),u("svg",{viewBox:"0 0 1024 1024",class:"compass",style:L({transformStyle:"preserve-3d",transform:`rotate(${-w(r)}deg)`})},[...t[0]||(t[0]=[h("path",{d:"M511.552 0l159.616 512.192-159.616 508.16L352 512.384 511.552 0zM512 448a64 64 0 1 0 0 128 64 64 0 0 0 0-128z",fill:"#B6CDFF","p-id":"9383"},null,-1),h("path",{d:"M512 0l160 512H576a64 64 0 1 0-128 0H352L512 0z",fill:"#FF0000","p-id":"9384"},null,-1),h("path",{d:"M751.872 192V58.368h1.024L844.288 192h29.184V9.216h-30.208v131.84h-1.024L751.872 9.216h-29.952V192z",fill:"#606266","p-id":"9385"},null,-1)])],4))]))}}),[["__scopeId","data-v-0ec382dd"]]),yH=/* @__PURE__ */o({name:"GisMapPopupBar",props:{float:{type:String,default:"top"}},setup(e){const A=t(null);return a("popupBarContext",{activeIndex:A,setActiveIndex:e=>{A.value=e}}),(t,A)=>(c(),u("div",{class:d(["gismap-popupbar",e.float])},[p(t.$slots,"default")],2))}}),wH={class:"popup-bar-item-wrapper"},BH={class:"icon-wrapper"},bH={class:"text"},CH={class:"popover-content"},QH=/* @__PURE__ */o({name:"GisMapPopupBarItem",props:{text:{type:String,default:""},iconName:{type:String,default:""},placement:{type:String||void 0,default:"top-start"},visible:{type:Boolean,default:!1},trigger:{type:String||void 0,default:void 0},width:{type:Number,default:260},index:{type:Number,required:!0}},setup(e){const t=e,A=r("popupBarContext",{activeIndex:{value:null},setActiveIndex:e=>{}}),a=i(()=>A.activeIndex.value===t.index),n=()=>{a.value?A.setActiveIndex(null):A.setActiveIndex(t.index)};return l(()=>{t.visible&&A.setActiveIndex(t.index)}),(A,r)=>{const s=cc;return c(),u("div",wH,[P(w(fv),{trigger:e.trigger,placement:e.placement,width:e.width,visible:a.value,teleported:!1,"popper-class":"popup-bar-item-box"},{reference:D(()=>[p(A.$slots,"btn",{},()=>[h("div",{class:d(["gis-map-popup-bar-item",{active:a.value}]),onClick:n},[h("div",BH,[P(s,{size:20},{default:D(()=>[(c(),k(V(w(aQ)(t.iconName))))]),_:1})]),h("div",bH,j(e.text),1)],2)])]),default:D(()=>[h("div",CH,[p(A.$slots,"default")])]),_:3},8,["trigger","placement","width","visible"]),r[0]||(r[0]=h("div",{class:"popup-bar-item-divider"},null,-1))])}}});function FH(){}const EH=Object.assign,xH="undefined"!=typeof window,UH=e=>null!==e&&"object"==typeof e,MH=e=>null!=e,SH=e=>"function"==typeof e,kH=e=>UH(e)&&SH(e.then)&&SH(e.catch),_H=e=>"number"==typeof e||/^\d+(\.\d+)?$/.test(e);function IH(e,t){const A=t.split(".");let r=e;return A.forEach(e=>{var t;r=UH(r)&&null!=(t=r[e])?t:""}),r}function LH(e,t,A){return t.reduce((t,A)=>(t[A]=e[A],t),{})}const HH=e=>Array.isArray(e)?e:[e],OH=null,TH=[Number,String],PH={type:Boolean,default:!0},DH=e=>({type:e,required:!0}),NH=()=>({type:Array,default:()=>[]}),KH=e=>({type:TH,default:e}),RH=e=>({type:String,default:e});var GH="undefined"!=typeof window;function VH(e){return GH?requestAnimationFrame(e):-1}function zH(e){VH(()=>VH(e))}var jH=(e,t)=>({top:0,left:0,right:e,bottom:t,width:e,height:t}),$H=e=>{const t=w(e);if(t===window){const e=t.innerWidth,A=t.innerHeight;return jH(e,A)}return(null==t?void 0:t.getBoundingClientRect)?t.getBoundingClientRect():jH(0,0)};function qH(e){const A=r(e,null);if(A){const e=m(),{link:t,unlink:r,internalChildren:a}=A;t(e),n(()=>r(e));return{parent:A,index:i(()=>a.indexOf(e))}}return{parent:null,index:t(-1)}}var WH,XH,JH=(e,t)=>{const A=e.indexOf(t);return-1===A?e.findIndex(e=>void 0!==t.key&&null!==t.key&&e.type===t.type&&e.key===t.key):A};function YH(e,t,A){const r=function(e){const t=[],A=e=>{Array.isArray(e)&&e.forEach(e=>{var r;U(e)&&(t.push(e),(null==(r=e.component)?void 0:r.subTree)&&(t.push(e.component.subTree),A(e.component.subTree.children)),e.children&&A(e.children))})};return A(e),t}(e.subTree.children);A.sort((e,t)=>JH(r,e.vnode)-JH(r,t.vnode));const a=A.map(e=>e.proxy);t.sort((e,t)=>a.indexOf(e)-a.indexOf(t))}function ZH(e){const t=Q([]),A=Q([]),r=m();return{children:t,linkChildren:n=>{a(e,Object.assign({link:e=>{e.proxy&&(A.push(e),t.push(e.proxy),YH(r,t,A))},unlink:e=>{const r=A.indexOf(e);t.splice(r,1),A.splice(r,1)},children:t,internalChildren:A},n))}}}function eO(e){let t;l(()=>{e(),F(()=>{t=!0})}),ee(()=>{t&&e()})}function tO(e,t,A={}){if(!GH)return;const{target:r=window,passive:a=!1,capture:i=!1}=A;let o,l=!1;const c=A=>{if(l)return;const r=w(A);r&&!o&&(r.addEventListener(e,t,{capture:i,passive:a}),o=!0)},u=A=>{if(l)return;const r=w(A);r&&o&&(r.removeEventListener(e,t,i),o=!1)};let d;return n(()=>u(r)),X(()=>u(r)),eO(()=>c(r)),C(r)&&(d=s(r,(e,t)=>{u(t),c(e)})),()=>{null==d||d(),u(r),l=!0}}var AO,rO=/scroll|auto|overlay/i,aO=GH?window:void 0;function nO(e){return"HTML"!==e.tagName&&"BODY"!==e.tagName&&1===e.nodeType}var sO=/* @__PURE__ */Symbol("van-field");function iO(e){const t=r(sO,null);t&&!t.customValue.value&&(t.customValue.value=e,s(e,()=>{t.resetValidation(),t.validateWithTrigger("onChange")}))}function oO(e,t){"scrollTop"in e?e.scrollTop=t:e.scrollTo(e.scrollX,t)}function lO(){return window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0}function cO(e){oO(window,e),oO(document.body,e)}const uO=!!xH&&/ios|iphone|ipad|ipod/.test(navigator.userAgent.toLowerCase());function dO(e,t){("boolean"!=typeof e.cancelable||e.cancelable)&&e.preventDefault(),t&&(e=>{e.stopPropagation()})(e)}function hO(e){const t=w(e);if(!t)return!1;const A=window.getComputedStyle(t),r="none"===A.display,a=null===t.offsetParent&&"fixed"!==A.position;return r||a}const{width:pO,height:fO}=function(){if(!WH&&(WH=t(0),XH=t(0),GH)){const e=()=>{WH.value=window.innerWidth,XH.value=window.innerHeight};e(),window.addEventListener("resize",e,{passive:!0}),window.addEventListener("orientationchange",e,{passive:!0})}return{width:WH,height:XH}}();function gO(e){if(MH(e))return _H(e)?`${e}px`:String(e)}function mO(e){if(MH(e)){if(Array.isArray(e))return{width:gO(e[0]),height:gO(e[1])};const t=gO(e);return{width:t,height:t}}}const vO=/-(\w)/g,yO=e=>e.replace(vO,(e,t)=>t.toUpperCase()),wO=(e,t,A)=>Math.min(Math.max(e,t),A);function BO(e,t,A){const r=e.indexOf(t);return-1===r?e:"-"===t&&0!==r?e.slice(0,r):e.slice(0,r+1)+e.slice(r).replace(A,"")}const{hasOwnProperty:bO}=Object.prototype;function CO(e,t){return Object.keys(t).forEach(A=>{!function(e,t,A){const r=t[A];MH(r)&&(bO.call(e,A)&&UH(r)?e[A]=CO(Object(e[A]),r):e[A]=r)}(e,t,A)}),e}const QO=t("zh-CN"),FO=Q({"zh-CN":{name:"姓名",tel:"电话",save:"保存",clear:"清空",cancel:"取消",confirm:"确认",delete:"删除",loading:"加载中...",noCoupon:"暂无优惠券",nameEmpty:"请填写姓名",addContact:"添加联系人",telInvalid:"请填写正确的电话",vanCalendar:{end:"结束",start:"开始",title:"日期选择",weekdays:["日","一","二","三","四","五","六"],monthTitle:(e,t)=>`${e}年${t}月`,rangePrompt:e=>`最多选择 ${e} 天`},vanCascader:{select:"请选择"},vanPagination:{prev:"上一页",next:"下一页"},vanPullRefresh:{pulling:"下拉即可刷新...",loosing:"释放即可刷新..."},vanSubmitBar:{label:"合计:"},vanCoupon:{unlimited:"无门槛",discount:e=>`${e}折`,condition:e=>`满${e}元可用`},vanCouponCell:{title:"优惠券",count:e=>`${e}张可用`},vanCouponList:{exchange:"兑换",close:"不使用",enable:"可用",disabled:"不可用",placeholder:"输入优惠码"},vanAddressEdit:{area:"地区",areaEmpty:"请选择地区",addressEmpty:"请填写详细地址",addressDetail:"详细地址",defaultAddress:"设为默认收货地址"},vanAddressList:{add:"新增地址"}}});var EO={messages:()=>FO[QO.value],use(e,t){QO.value=e,this.add({[e]:t})},add(e={}){CO(FO,e)}};function xO(e){const t=yO(e)+".";return(e,...A)=>{const r=EO.messages(),a=IH(r,t+e)||IH(r,e);return SH(a)?a(...A):a}}function UO(e,t){return t?"string"==typeof t?` ${e}--${t}`:Array.isArray(t)?t.reduce((t,A)=>t+UO(e,A),""):Object.keys(t).reduce((A,r)=>A+(t[r]?UO(e,r):""),""):""}function MO(e){return(t,A)=>(t&&"string"!=typeof t&&(A=t,t=""),`${t=t?`${e}__${t}`:e}${UO(t,A)}`)}function SO(e){const t=`van-${e}`;return[t,MO(t),xO(t)]}const kO="van-hairline--surround",_O="van-haptics-feedback",IO=/* @__PURE__ */Symbol("van-form");function LO(e,{args:t=[],done:A,canceled:r,error:a}){if(e){const n=e.apply(null,t);kH(n)?n.then(e=>{e?A():r&&r()}).catch(a||FH):n?A():r&&r()}else A()}function HO(e){return e.install=t=>{const{name:A}=e;A&&(t.component(A,e),t.component(yO(`-${A}`),e))},e}function OO(e,t){return e.reduce((e,A)=>Math.abs(e-t)<Math.abs(A-t)?e:A)}const TO=/* @__PURE__ */Symbol();function PO(e){const t=m();t&&EH(t.proxy,e)}const DO={to:[String,Object],url:String,replace:Boolean};function NO(){const e=m().proxy;return()=>function({to:e,url:t,replace:A,$router:r}){e&&r?r[A?"replace":"push"](e):t&&(A?location.replace(t):location.href=t)}(e)}const[KO,RO]=SO("badge");const GO=HO(o({name:KO,props:{dot:Boolean,max:TH,tag:RH("div"),color:String,offset:Array,content:TH,showZero:PH,position:RH("top-right")},setup(e,{slots:t}){const A=()=>{if(t.content)return!0;const{content:A,showZero:r}=e;return MH(A)&&""!==A&&(r||0!==A&&"0"!==A)},r=()=>{const{dot:r,max:a,content:n}=e;if(!r&&A())return t.content?t.content():MH(a)&&_H(n)&&+n>+a?`${a}+`:n},a=e=>e.startsWith("-")?e.replace("-",""):`-${e}`,n=i(()=>{const A={background:e.color};if(e.offset){const[r,n]=e.offset,{position:s}=e,[i,o]=s.split("-");t.default?(A[i]="number"==typeof n?gO("top"===i?n:-n):"top"===i?gO(n):a(n),A[o]="number"==typeof r?gO("left"===o?r:-r):"left"===o?gO(r):a(r)):(A.marginTop=gO(n),A.marginLeft=gO(r))}return A}),s=()=>{if(A()||e.dot)return P("div",{class:RO([e.position,{dot:e.dot,fixed:!!t.default}]),style:n.value},[r()])};return()=>{if(t.default){const{tag:A}=e;return P(A,{class:RO("wrapper")},{default:()=>[t.default(),s()]})}return s()}}}));let VO=2e3;const[zO,jO]=SO("config-provider"),$O=Symbol(zO);function qO(e={},t={}){Object.keys(e).forEach(A=>{e[A]!==t[A]&&document.documentElement.style.setProperty(A,e[A])}),Object.keys(t).forEach(t=>{e[t]||document.documentElement.style.removeProperty(t)})}o({name:zO,props:{tag:RH("div"),theme:RH("light"),zIndex:Number,themeVars:Object,themeVarsDark:Object,themeVarsLight:Object,themeVarsScope:RH("local"),iconPrefix:String},setup(e,{slots:t}){const A=i(()=>function(e){const t={};return Object.keys(e).forEach(A=>{const r=A.replace(/([A-Z])/g,"-$1").toLowerCase().replace(/^-/,"").replace(/([a-zA-Z])(\d)/g,"$1-$2");t[`--van-${r}`]=e[A]}),t}(EH({},e.themeVars,"dark"===e.theme?e.themeVarsDark:e.themeVarsLight)));if(xH){const t=()=>{document.documentElement.classList.add(`van-theme-${e.theme}`)},r=(t=e.theme)=>{document.documentElement.classList.remove(`van-theme-${t}`)};s(()=>e.theme,(e,A)=>{A&&r(A),t()},{immediate:!0}),ee(t),X(r),E(r),s(A,(t,A)=>{"global"===e.themeVarsScope&&qO(t,A)}),s(()=>e.themeVarsScope,(e,t)=>{"global"===t&&qO({},A.value),"global"===e&&qO(A.value,{})}),"global"===e.themeVarsScope&&qO(A.value,{})}return a($O,e),y(()=>{var t;void 0!==e.zIndex&&(t=e.zIndex,VO=t)}),()=>P(e.tag,{class:jO(),style:"local"===e.themeVarsScope?A.value:void 0},{default:()=>{var e;return[null==(e=t.default)?void 0:e.call(t)]}})}});const[WO,XO]=SO("icon");var JO=o({name:WO,props:{dot:Boolean,tag:RH("i"),name:String,size:TH,badge:TH,color:String,badgeProps:Object,classPrefix:String},setup(e,{slots:t}){const A=r($O,null),a=i(()=>e.classPrefix||(null==A?void 0:A.iconPrefix)||XO());return()=>{const{tag:A,dot:r,name:n,size:s,badge:i,color:o}=e,l=(e=>null==e?void 0:e.includes("/"))(n);return P(GO,I({dot:r,tag:A,class:[a.value,l?"":`${a.value}-${n}`],style:{color:o,fontSize:gO(s)},content:i},e.badgeProps),{default:()=>{var e;return[null==(e=t.default)?void 0:e.call(t),l&&P("img",{class:XO("image"),src:n},null)]}})}}});const YO=HO(JO),[ZO,eT]=SO("loading"),tT=Array(12).fill(null).map((e,t)=>P("i",{class:eT("line",String(t+1))},null)),AT=P("svg",{class:eT("circular"),viewBox:"25 25 50 50"},[P("circle",{cx:"50",cy:"50",r:"20",fill:"none"},null)]);const rT=HO(o({name:ZO,props:{size:TH,type:RH("circular"),color:String,vertical:Boolean,textSize:TH,textColor:String},setup(e,{slots:t}){const A=i(()=>EH({color:e.color},mO(e.size))),r=()=>{const r="spinner"===e.type?tT:AT;return P("span",{class:eT("spinner",e.type),style:A.value},[t.icon?t.icon():r])},a=()=>{var A;if(t.default)return P("span",{class:eT("text"),style:{fontSize:gO(e.textSize),color:null!=(A=e.textColor)?A:e.color}},[t.default()])};return()=>{const{type:t,vertical:A}=e;return P("div",{class:eT([t,{vertical:A}]),"aria-live":"polite","aria-busy":!0},[r(),a()])}}})),[aT,nT]=SO("button");const sT=HO(o({name:aT,props:EH({},DO,{tag:RH("button"),text:String,icon:String,type:RH("default"),size:RH("normal"),color:String,block:Boolean,plain:Boolean,round:Boolean,square:Boolean,loading:Boolean,hairline:Boolean,disabled:Boolean,iconPrefix:String,nativeType:RH("button"),loadingSize:TH,loadingText:String,loadingType:String,iconPosition:RH("left")}),emits:["click"],setup(e,{emit:t,slots:A}){const r=NO(),a=()=>e.loading?A.loading?A.loading():P(rT,{size:e.loadingSize,type:e.loadingType,class:nT("loading")},null):A.icon?P("div",{class:nT("icon")},[A.icon()]):e.icon?P(YO,{name:e.icon,class:nT("icon"),classPrefix:e.iconPrefix},null):void 0,n=()=>{let t;if(t=e.loading?e.loadingText:A.default?A.default():e.text,t)return P("span",{class:nT("text")},[t])},s=()=>{const{color:t,plain:A}=e;if(t){const e={color:A?t:"white"};return A||(e.background=t),t.includes("gradient")?e.border=0:e.borderColor=t,e}},i=A=>{e.loading?dO(A):e.disabled||(t("click",A),r())};return()=>{const{tag:t,type:A,size:r,block:o,round:l,plain:c,square:u,loading:d,disabled:h,hairline:p,nativeType:f,iconPosition:g}=e,m=[nT([A,r,{plain:c,block:o,round:l,square:u,loading:d,disabled:h,hairline:p}]),{[kO]:p}];return P(t,{type:f,class:m,style:s(),disabled:h,onClick:i},{default:()=>[P("div",{class:nT("content")},["left"===g&&a(),n(),"right"===g&&a()])]})}}})),iT={show:Boolean,zIndex:TH,overlay:PH,duration:TH,teleport:[String,Object],lockScroll:PH,lazyRender:PH,beforeClose:Function,overlayProps:Object,overlayStyle:Object,overlayClass:OH,transitionAppear:Boolean,closeOnClickOverlay:PH};function oT(){const e=t(0),A=t(0),r=t(0),a=t(0),n=t(0),s=t(0),i=t(""),o=t(!0),l=()=>{r.value=0,a.value=0,n.value=0,s.value=0,i.value="",o.value=!0};return{move:t=>{const l=t.touches[0];r.value=(l.clientX<0?0:l.clientX)-e.value,a.value=l.clientY-A.value,n.value=Math.abs(r.value),s.value=Math.abs(a.value);var c,u;(!i.value||n.value<10&&s.value<10)&&(i.value=(c=n.value,u=s.value,c>u?"horizontal":u>c?"vertical":"")),o.value&&(n.value>5||s.value>5)&&(o.value=!1)},start:t=>{l(),e.value=t.touches[0].clientX,A.value=t.touches[0].clientY},reset:l,startX:e,startY:A,deltaX:r,deltaY:a,offsetX:n,offsetY:s,direction:i,isVertical:()=>"vertical"===i.value,isHorizontal:()=>"horizontal"===i.value,isTap:o}}let lT=0;const cT="van-overflow-hidden";function uT(e,t){const A=oT(),r=t=>{A.move(t);const r=A.deltaY.value>0?"10":"01",a=function(e,t=aO){let A=e;for(;A&&A!==t&&nO(A);){const{overflowY:e}=window.getComputedStyle(A);if(rO.test(e))return A;A=A.parentNode}return t}(t.target,e.value),{scrollHeight:n,offsetHeight:s,scrollTop:i}=a;let o="11";0===i?o=s>=n?"00":"01":i+s>=n&&(o="10"),"11"===o||!A.isVertical()||parseInt(o,2)&parseInt(r,2)||dO(t,!0)},a=()=>{document.addEventListener("touchstart",A.start),document.addEventListener("touchmove",r,{passive:!1}),lT||document.body.classList.add(cT),lT++},n=()=>{lT&&(document.removeEventListener("touchstart",A.start),document.removeEventListener("touchmove",r),lT--,lT||document.body.classList.remove(cT))},i=()=>t()&&n();eO(()=>t()&&a()),X(i),E(i),s(t,e=>{e?a():n()})}function dT(e){const A=t(!1);return s(e,e=>{e&&(A.value=e)},{immediate:!0}),e=>()=>A.value?e():null}const hT=()=>{var e;const{scopeId:t}=(null==(e=m())?void 0:e.vnode)||{};return t?{[t]:""}:null},[pT,fT]=SO("overlay");const gT=HO(o({name:pT,inheritAttrs:!1,props:{show:Boolean,zIndex:TH,duration:TH,className:OH,lockScroll:PH,lazyRender:PH,customStyle:Object,teleport:[String,Object]},setup(e,{attrs:A,slots:r}){const a=t(),n=dT(()=>e.show||!e.lazyRender)(()=>{var t;const n=EH(function(e){const t={};return void 0!==e&&(t.zIndex=+e),t}(e.zIndex),e.customStyle);return MH(e.duration)&&(n.animationDuration=`${e.duration}s`),H(P("div",I({ref:a,style:n,class:[fT(),e.className]},A),[null==(t=r.default)?void 0:t.call(r)]),[[W,e.show]])});return tO("touchmove",t=>{e.lockScroll&&dO(t,!0)},{target:a}),()=>{const t=P(q,{name:"van-fade",appear:!0},{default:n});return e.teleport?P(_,{to:e.teleport},{default:()=>[t]}):t}}})),mT=EH({},iT,{round:Boolean,position:RH("center"),closeIcon:RH("cross"),closeable:Boolean,transition:String,iconPrefix:String,closeOnPopstate:Boolean,closeIconPosition:RH("top-right"),destroyOnClose:Boolean,safeAreaInsetTop:Boolean,safeAreaInsetBottom:Boolean}),[vT,yT]=SO("popup");const wT=HO(o({name:vT,inheritAttrs:!1,props:mT,emits:["open","close","opened","closed","keydown","update:show","clickOverlay","clickCloseIcon"],setup(e,{emit:A,attrs:r,slots:n}){let o,c;const u=t(),d=t(),h=dT(()=>e.show||!e.lazyRender),p=i(()=>{const t={zIndex:u.value};if(MH(e.duration)){t["center"===e.position?"animationDuration":"transitionDuration"]=`${e.duration}s`}return t}),f=()=>{o||(o=!0,u.value=void 0!==e.zIndex?+e.zIndex:++VO,A("open"))},g=()=>{o&&LO(e.beforeClose,{done(){o=!1,A("close"),A("update:show",!1)}})},m=t=>{A("clickOverlay",t),e.closeOnClickOverlay&&g()},v=()=>{if(e.overlay){const t=EH({show:e.show,class:e.overlayClass,zIndex:u.value,duration:e.duration,customStyle:e.overlayStyle,role:e.closeOnClickOverlay?"button":void 0,tabindex:e.closeOnClickOverlay?0:void 0},e.overlayProps);return P(gT,I(t,hT(),{onClick:m}),{default:n["overlay-content"]})}},y=e=>{A("clickCloseIcon",e),g()},w=()=>{if(e.closeable)return P(YO,{role:"button",tabindex:0,name:e.closeIcon,class:[yT("close-icon",e.closeIconPosition),_O],classPrefix:e.iconPrefix,onClick:y},null)};let B;const b=()=>{B&&clearTimeout(B),B=setTimeout(()=>{A("opened")})},C=()=>A("closed"),Q=e=>A("keydown",e),E=h(()=>{var t;const{destroyOnClose:A,round:a,position:s,safeAreaInsetTop:i,safeAreaInsetBottom:o,show:l}=e;if(l||!A)return H(P("div",I({ref:d,style:p.value,role:"dialog",tabindex:0,class:[yT({round:a,[s]:s}),{"van-safe-area-top":i,"van-safe-area-bottom":o}],onKeydown:Q},r,hT()),[null==(t=n.default)?void 0:t.call(n),w()]),[[W,l]])}),x=()=>{const{position:t,transition:A,transitionAppear:r}=e;return P(q,{name:A||("center"===t?"van-fade":`van-popup-slide-${t}`),appear:r,onAfterEnter:b,onAfterLeave:C},{default:E})};return s(()=>e.show,e=>{e&&!o&&(f(),0===r.tabindex&&F(()=>{var e;null==(e=d.value)||e.focus()})),!e&&o&&(o=!1,A("close"))}),PO({popupRef:d}),uT(d,()=>e.show&&e.lockScroll),tO("popstate",()=>{e.closeOnPopstate&&(g(),c=!1)}),l(()=>{e.show&&f()}),ee(()=>{c&&(A("update:show",!0),c=!1)}),X(()=>{e.show&&e.teleport&&(g(),c=!0)}),a(TO,()=>e.show),()=>e.teleport?P(_,{to:e.teleport},{default:()=>[v(),x()]}):P(S,null,[v(),x()])}}));let BT=0;function bT(){const e=m(),{name:t="unknown"}=(null==e?void 0:e.type)||{};return"test"===process.env.NODE_ENV?t:`${t}-${++BT}`}const[CT,QT]=SO("swipe"),FT={loop:PH,width:TH,height:TH,vertical:Boolean,autoplay:KH(0),duration:KH(500),touchable:PH,lazyRender:Boolean,initialSwipe:KH(0),indicatorColor:String,showIndicators:PH,stopPropagation:PH},ET=Symbol(CT);var xT=o({name:CT,props:FT,emits:["change","dragStart","dragEnd"],setup(e,{emit:A,slots:a}){const n=t(),o=t(),c=Q({rect:null,width:0,height:0,offset:0,active:0,swiping:!1});let u=!1;const d=oT(),{children:h,linkChildren:p}=ZH(ET),f=i(()=>h.length),g=i(()=>c[e.vertical?"height":"width"]),m=i(()=>e.vertical?d.deltaY.value:d.deltaX.value),v=i(()=>{if(c.rect){return(e.vertical?c.rect.height:c.rect.width)-g.value*f.value}return 0}),y=i(()=>g.value?Math.ceil(Math.abs(v.value)/g.value):f.value),w=i(()=>f.value*g.value),B=i(()=>(c.active+f.value)%f.value),b=i(()=>{const t=e.vertical?"vertical":"horizontal";return d.direction.value===t}),C=i(()=>{const t={transitionDuration:`${c.swiping?0:e.duration}ms`,transform:`translate${e.vertical?"Y":"X"}(${+c.offset.toFixed(2)}px)`};if(g.value){const A=e.vertical?"height":"width",r=e.vertical?"width":"height";t[A]=`${w.value}px`,t[r]=e[r]?`${e[r]}px`:""}return t}),x=(t,A=0)=>{let r=t*g.value;e.loop||(r=Math.min(r,-v.value));let a=A-r;return e.loop||(a=wO(a,v.value,0)),a},U=({pace:t=0,offset:r=0,emitChange:a})=>{if(f.value<=1)return;const{active:n}=c,s=(t=>{const{active:A}=c;return t?e.loop?wO(A+t,-1,f.value):wO(A+t,0,y.value):A})(t),i=x(s,r);if(e.loop){if(h[0]&&i!==v.value){const e=i<v.value;h[0].setOffset(e?w.value:0)}if(h[f.value-1]&&0!==i){const e=i>0;h[f.value-1].setOffset(e?-w.value:0)}}c.active=s,c.offset=i,a&&s!==n&&A("change",B.value)},M=()=>{c.swiping=!0,c.active<=-1?U({pace:f.value}):c.active>=f.value&&U({pace:-f.value})},S=()=>{M(),d.reset(),zH(()=>{c.swiping=!1,U({pace:1,emitChange:!0})})};let k;const _=()=>clearTimeout(k),I=()=>{_(),+e.autoplay>0&&f.value>1&&(k=setTimeout(()=>{S(),I()},+e.autoplay))},L=(t=+e.initialSwipe)=>{if(!n.value)return;const A=()=>{var A,r;if(!hO(n)){const t={width:n.value.offsetWidth,height:n.value.offsetHeight};c.rect=t,c.width=+(null!=(A=e.width)?A:t.width),c.height=+(null!=(r=e.height)?r:t.height)}f.value&&-1===(t=Math.min(f.value-1,t))&&(t=f.value-1),c.active=t,c.swiping=!0,c.offset=x(t),h.forEach(e=>{e.setOffset(0)}),I()};hO(n)?F().then(A):A()},H=()=>L(c.active);let O;const T=t=>{!e.touchable||t.touches.length>1||(d.start(t),u=!1,O=Date.now(),_(),M())},D=()=>{if(!e.touchable||!c.swiping)return;const t=Date.now()-O,r=m.value/t;if((Math.abs(r)>.25||Math.abs(m.value)>g.value/2)&&b.value){const t=e.vertical?d.offsetY.value:d.offsetX.value;let A=0;A=e.loop?t>0?m.value>0?-1:1:0:-Math[m.value>0?"ceil":"floor"](m.value/g.value),U({pace:A,emitChange:!0})}else m.value&&U({pace:0});u=!1,c.swiping=!1,A("dragEnd",{index:B.value}),I()},N=(t,A)=>{const r=A===B.value,a=r?{backgroundColor:e.indicatorColor}:void 0;return P("i",{style:a,class:QT("indicator",{active:r})},null)};return PO({prev:()=>{M(),d.reset(),zH(()=>{c.swiping=!1,U({pace:-1,emitChange:!0})})},next:S,state:c,resize:H,swipeTo:(t,A={})=>{M(),d.reset(),zH(()=>{let r;r=e.loop&&t===f.value?0===c.active?0:t:t%f.value,A.immediate?zH(()=>{c.swiping=!1}):c.swiping=!1,U({pace:r-c.active,emitChange:!0})})}}),p({size:g,props:e,count:f,activeIndicator:B}),s(()=>e.initialSwipe,e=>L(+e)),s(f,()=>L(c.active)),s(()=>e.autoplay,I),s([pO,fO,()=>e.width,()=>e.height],H),s(function(){if(!AO&&(AO=t("visible"),GH)){const e=()=>{AO.value=document.hidden?"hidden":"visible"};e(),window.addEventListener("visibilitychange",e)}return AO}(),e=>{"visible"===e?I():_()}),l(L),ee(()=>L(c.active)),function(e){const t=r(TO,null);t&&s(t,t=>{t&&e()})}(()=>L(c.active)),X(_),E(_),tO("touchmove",t=>{if(e.touchable&&c.swiping&&(d.move(t),b.value)){!e.loop&&(0===c.active&&m.value>0||c.active===f.value-1&&m.value<0)||(dO(t,e.stopPropagation),U({offset:m.value}),u||(A("dragStart",{index:B.value}),u=!0))}},{target:o}),()=>{var t;return P("div",{ref:n,class:QT()},[P("div",{ref:o,style:C.value,class:QT("track",{vertical:e.vertical}),onTouchstartPassive:T,onTouchend:D,onTouchcancel:D},[null==(t=a.default)?void 0:t.call(a)]),a.indicator?a.indicator({active:B.value,total:f.value}):e.showIndicators&&f.value>1?P("div",{class:QT("indicators",{vertical:e.vertical})},[Array(f.value).fill("").map(N)]):void 0])}}});const UT=HO(xT),[MT,ST]=SO("swipe-item");var kT=o({name:MT,setup(e,{slots:t}){let A;const r=Q({offset:0,inited:!1,mounted:!1}),{parent:a,index:n}=qH(ET);if(!a)return void process.env.NODE_ENV;const s=i(()=>{const e={},{vertical:t}=a.props;return a.size.value&&(e[t?"height":"width"]=`${a.size.value}px`),r.offset&&(e.transform=`translate${t?"Y":"X"}(${r.offset}px)`),e}),o=i(()=>{const{loop:e,lazyRender:t}=a.props;if(!t||A)return!0;if(!r.mounted)return!1;const s=a.activeIndicator.value,i=a.count.value-1,o=0===s&&e?i:s-1,l=s===i&&e?0:s+1;return A=n.value===s||n.value===o||n.value===l,A});return l(()=>{F(()=>{r.mounted=!0})}),PO({setOffset:e=>{r.offset=e}}),()=>{var e;return P("div",{class:ST(),style:s.value},[o.value?null==(e=t.default)?void 0:e.call(t):null])}}});const _T=HO(kT),[IT,LT]=SO("cell"),HT={tag:RH("div"),icon:String,size:String,title:TH,value:TH,label:TH,center:Boolean,isLink:Boolean,border:PH,iconPrefix:String,valueClass:OH,labelClass:OH,titleClass:OH,titleStyle:null,arrowDirection:String,required:{type:[Boolean,String],default:null},clickable:{type:Boolean,default:null}};var OT=o({name:IT,props:EH({},HT,DO),setup(e,{slots:t}){const A=NO(),r=()=>{if(t.label||MH(e.label))return P("div",{class:[LT("label"),e.labelClass]},[t.label?t.label():e.label])},a=()=>{var A;if(t.title||MH(e.title)){const a=null==(A=t.title)?void 0:A.call(t);if(Array.isArray(a)&&0===a.length)return;return P("div",{class:[LT("title"),e.titleClass],style:e.titleStyle},[a||P("span",null,[e.title]),r()])}},n=()=>{const A=t.value||t.default;if(A||MH(e.value))return P("div",{class:[LT("value"),e.valueClass]},[A?A():P("span",null,[e.value])])},s=()=>{if(t["right-icon"])return t["right-icon"]();if(e.isLink){const t=e.arrowDirection&&"right"!==e.arrowDirection?`arrow-${e.arrowDirection}`:"arrow";return P(YO,{name:t,class:LT("right-icon")},null)}};return()=>{var r;const{tag:i,size:o,center:l,border:c,isLink:u,required:d}=e,h=null!=(r=e.clickable)?r:u,p={center:l,required:!!d,clickable:h,borderless:!c};return o&&(p[o]=!!o),P(i,{class:LT(p),role:h?"button":void 0,tabindex:h?0:void 0,onClick:A},{default:()=>{var A;return[t.icon?t.icon():e.icon?P(YO,{name:e.icon,class:LT("left-icon"),classPrefix:e.iconPrefix},null):void 0,a(),n(),s(),null==(A=t.extra)?void 0:A.call(t)]}})}}});const TT=HO(OT);function PT(e){return Array.isArray(e)?!e.length:0!==e&&!e}function DT(e,t){const{message:A}=t;return SH(A)?A(e,t):A||""}function NT({target:e}){e.composing=!0}function KT({target:e}){e.composing&&(e.composing=!1,e.dispatchEvent(new Event("input")))}function RT(e){return[...e].length}function GT(e,t){return[...e].slice(0,t).join("")}const[VT,zT]=SO("field"),jT={id:String,name:String,leftIcon:String,rightIcon:String,autofocus:Boolean,clearable:Boolean,maxlength:TH,max:Number,min:Number,formatter:Function,clearIcon:RH("clear"),modelValue:KH(""),inputAlign:String,placeholder:String,autocomplete:String,autocapitalize:String,autocorrect:String,errorMessage:String,enterkeyhint:String,clearTrigger:RH("focus"),formatTrigger:RH("onChange"),spellcheck:{type:Boolean,default:null},error:{type:Boolean,default:null},disabled:{type:Boolean,default:null},readonly:{type:Boolean,default:null},inputmode:String};var $T=o({name:VT,props:EH({},HT,jT,{rows:TH,type:RH("text"),rules:Array,autosize:[Boolean,Object],labelWidth:TH,labelClass:OH,labelAlign:String,showWordLimit:Boolean,errorMessageAlign:String,colon:{type:Boolean,default:null}}),emits:["blur","focus","clear","keypress","clickInput","endValidate","startValidate","clickLeftIcon","clickRightIcon","update:modelValue"],setup(e,{emit:A,slots:r}){const n=bT(),o=Q({status:"unvalidated",focused:!1,validateMessage:""}),c=t(),u=t(),d=t(),{parent:h}=qH(IO),p=()=>{var t;return String(null!=(t=e.modelValue)?t:"")},f=t=>MH(e[t])?e[t]:h&&MH(h.props[t])?h.props[t]:void 0,g=i(()=>{const t=f("readonly");if(e.clearable&&!t){const t=""!==p(),A="always"===e.clearTrigger||"focus"===e.clearTrigger&&o.focused;return t&&A}return!1}),m=i(()=>d.value&&r.input?d.value():e.modelValue),v=i(()=>{var t;const A=f("required");return"auto"===A?null==(t=e.rules)?void 0:t.some(e=>e.required):A}),y=e=>e.reduce((e,t)=>e.then(()=>{if("failed"===o.status)return;let{value:e}=m;if(t.formatter&&(e=t.formatter(e,t)),!function(e,t){if(PT(e)){if(t.required)return!1;if(!1===t.validateEmpty)return!0}return!(t.pattern&&!t.pattern.test(String(e)))}(e,t))return o.status="failed",void(o.validateMessage=DT(e,t));if(t.validator){if(PT(e)&&!1===t.validateEmpty)return;return function(e,t){return new Promise(A=>{const r=t.validator(e,t);kH(r)?r.then(A):A(r)})}(e,t).then(A=>{A&&"string"==typeof A?(o.status="failed",o.validateMessage=A):!1===A&&(o.status="failed",o.validateMessage=DT(e,t))})}}),Promise.resolve()),w=()=>{o.status="unvalidated",o.validateMessage=""},B=()=>A("endValidate",{status:o.status,message:o.validateMessage}),b=(t=e.rules)=>new Promise(r=>{w(),t?(A("startValidate"),y(t).then(()=>{"failed"===o.status?(r({name:e.name,message:o.validateMessage}),B()):(o.status="passed",r(),B())})):r()}),C=t=>{if(h&&e.rules){const{validateTrigger:A}=h.props,r=HH(A).includes(t),a=e.rules.filter(e=>e.trigger?HH(e.trigger).includes(t):r);a.length&&b(a)}},E=(t,r="onChange")=>{var a,n;const s=t;t=(t=>{var A;const{maxlength:r}=e;if(MH(r)&&RT(t)>+r){const e=p();if(e&&RT(e)===+r)return e;const a=null==(A=c.value)?void 0:A.selectionEnd;if(o.focused&&a){const e=[...t],A=e.length-+r;return e.splice(a-A,A),e.join("")}return GT(t,+r)}return t})(t);const i=s.length-t.length;if("number"===e.type||"digit"===e.type){const A="number"===e.type;if(t=function(e,t=!0,A=!0){e=t?BO(e,".",/\./g):e.split(".")[0];const r=t?/[^-0-9.]/g:/[^-0-9]/g;return(e=A?BO(e,"-",/-/g):e.replace(/-/,"")).replace(r,"")}(t,A,A),"onBlur"===r&&""!==t&&(void 0!==e.min||void 0!==e.max)){const A=wO(+t,null!=(a=e.min)?a:-1/0,null!=(n=e.max)?n:1/0);+t!==A&&(t=A.toString())}}let l=0;if(e.formatter&&r===e.formatTrigger){const{formatter:A,maxlength:r}=e;if(t=A(t),MH(r)&&RT(t)>+r&&(t=GT(t,+r)),c.value&&o.focused){const{selectionEnd:e}=c.value,t=GT(s,e);l=A(t).length-t.length}}if(c.value&&c.value.value!==t)if(o.focused){let{selectionStart:e,selectionEnd:A}=c.value;if(c.value.value=t,MH(e)&&MH(A)){const r=t.length;i?(e-=i,A-=i):l&&(e+=l,A+=l),c.value.setSelectionRange(Math.min(e,r),Math.min(A,r))}}else c.value.value=t;t!==e.modelValue&&A("update:modelValue",t)},x=e=>{e.target.composing||E(e.target.value)},U=()=>{var e;return null==(e=c.value)?void 0:e.blur()},M=()=>{var e;return null==(e=c.value)?void 0:e.focus()},S=()=>{const t=c.value;"textarea"===e.type&&e.autosize&&t&&function(e,t){const A=lO();e.style.height="auto";let r=e.scrollHeight;if(UH(t)){const{maxHeight:e,minHeight:A}=t;void 0!==e&&(r=Math.min(r,e)),void 0!==A&&(r=Math.max(r,A))}r&&(e.style.height=`${r}px`,cO(A))}(t,e.autosize)},k=e=>{o.focused=!0,A("focus",e),F(S),f("readonly")&&U()},_=e=>{o.focused=!1,E(p(),"onBlur"),A("blur",e),f("readonly")||(C("onBlur"),F(S),uO&&cO(lO()))},L=e=>A("clickInput",e),H=e=>A("clickLeftIcon",e),O=e=>A("clickRightIcon",e),T=i(()=>"boolean"==typeof e.error?e.error:!(!h||!h.props.showError||"failed"!==o.status)||void 0),D=i(()=>{const e=f("labelWidth"),t=f("labelAlign");if(e&&"top"!==t)return{width:gO(e)}}),N=t=>{if(13===t.keyCode){h&&h.props.submitOnEnter||"textarea"===e.type||dO(t),"search"===e.type&&U()}A("keypress",t)},K=()=>e.id||`${n}-input`,R=()=>{const t=zT("control",[f("inputAlign"),{error:T.value,custom:!!r.input,"min-height":"textarea"===e.type&&!e.autosize}]);if(r.input)return P("div",{class:t,onClick:L},[r.input()]);const A={id:K(),ref:c,name:e.name,rows:void 0!==e.rows?+e.rows:void 0,class:t,disabled:f("disabled"),readonly:f("readonly"),autofocus:e.autofocus,placeholder:e.placeholder,autocomplete:e.autocomplete,autocapitalize:e.autocapitalize,autocorrect:e.autocorrect,enterkeyhint:e.enterkeyhint,spellcheck:e.spellcheck,"aria-labelledby":e.label?`${n}-label`:void 0,"data-allow-mismatch":"attribute",onBlur:_,onFocus:k,onInput:x,onClick:L,onChange:KT,onKeypress:N,onCompositionend:KT,onCompositionstart:NT};return"textarea"===e.type?P("textarea",I(A,{inputmode:e.inputmode}),null):P("input",I((a=e.type,s=e.inputmode,"number"===a&&(a="text",null!=s||(s="decimal")),"digit"===a&&(a="tel",null!=s||(s="numeric")),{type:a,inputmode:s}),A),null);var a,s},G=()=>{const t=r["right-icon"];if(e.rightIcon||t)return P("div",{class:zT("right-icon"),onClick:O},[t?t():P(YO,{name:e.rightIcon,classPrefix:e.iconPrefix},null)])},V=()=>{if(e.showWordLimit&&e.maxlength){const t=RT(p());return P("div",{class:zT("word-limit")},[P("span",{class:zT("word-num")},[t]),z("/"),e.maxlength])}},j=()=>{if(h&&!1===h.props.showErrorMessage)return;const t=e.errorMessage||o.validateMessage;if(t){const e=r["error-message"],A=f("errorMessageAlign");return P("div",{class:zT("error-message",A)},[e?e({message:t}):t])}},$=()=>[P("div",{class:zT("body")},[R(),g.value&&P(YO,{ref:u,name:e.clearIcon,class:zT("clear")},null),G(),r.button&&P("div",{class:zT("button")},[r.button()])]),V(),j()];return PO({blur:U,focus:M,validate:b,formValue:m,resetValidation:w,getValidationStatus:()=>o.status}),a(sO,{customValue:d,resetValidation:w,validateWithTrigger:C}),s(()=>e.modelValue,()=>{E(p()),w(),C("onChange"),F(S)}),l(()=>{E(p(),e.formatTrigger),F(S)}),tO("touchstart",e=>{dO(e),A("update:modelValue",""),A("clear",e)},{target:i(()=>{var e;return null==(e=u.value)?void 0:e.$el})}),()=>{const t=f("disabled"),A=f("labelAlign"),a=(()=>{const t=r["left-icon"];if(e.leftIcon||t)return P("div",{class:zT("left-icon"),onClick:H},[t?t():P(YO,{name:e.leftIcon,classPrefix:e.iconPrefix},null)])})();return P(TT,{size:e.size,class:zT({error:T.value,disabled:t,[`label-${A}`]:A}),center:e.center,border:e.border,isLink:e.isLink,clickable:e.clickable,titleStyle:D.value,valueClass:zT("value"),titleClass:[zT("label",[A,{required:v.value}]),e.labelClass],arrowDirection:e.arrowDirection},{icon:a&&"top"!==A?()=>a:null,title:()=>{const t=(()=>{const t=f("labelWidth"),A=f("labelAlign"),a=f("colon")?":":"";return r.label?[r.label(),a]:e.label?P("label",{id:`${n}-label`,for:r.input?void 0:K(),"data-allow-mismatch":"attribute",onClick:e=>{dO(e),M()},style:"top"===A&&t?{width:gO(t)}:void 0},[e.label+a]):void 0})();return"top"===A?[a,t].filter(Boolean):t||[]},value:$,extra:r.extra})}}});const qT=HO($T);let WT=0;const[XT,JT]=SO("toast"),YT=["show","overlay","teleport","transition","overlayClass","overlayStyle","closeOnClickOverlay","zIndex"];var ZT,eP=o({name:XT,props:{icon:String,show:Boolean,type:RH("text"),overlay:Boolean,message:TH,iconSize:TH,duration:(ZT=2e3,{type:Number,default:ZT}),position:RH("middle"),teleport:[String,Object],wordBreak:String,className:OH,iconPrefix:String,transition:RH("van-fade"),loadingType:String,forbidClick:Boolean,overlayClass:OH,overlayStyle:Object,closeOnClick:Boolean,closeOnClickOverlay:Boolean,zIndex:TH},emits:["update:show"],setup(e,{emit:t,slots:A}){let r,a=!1;const i=()=>{const t=e.show&&e.forbidClick;a!==t&&(a=t,a?(WT||document.body.classList.add("van-toast--unclickable"),WT++):WT&&(WT--,WT||document.body.classList.remove("van-toast--unclickable")))},o=e=>t("update:show",e),c=()=>{e.closeOnClick&&o(!1)},u=()=>clearTimeout(r),d=()=>{const{icon:t,type:A,iconSize:r,iconPrefix:a,loadingType:n}=e;return t||"success"===A||"fail"===A?P(YO,{name:t||A,size:r,class:JT("icon"),classPrefix:a},null):"loading"===A?P(rT,{class:JT("loading"),size:r,type:n},null):void 0},h=()=>{const{type:t,message:r}=e;return A.message?P("div",{class:JT("text")},[A.message()]):MH(r)&&""!==r?"html"===t?P("div",{key:0,class:JT("text"),innerHTML:String(r)},null):P("div",{class:JT("text")},[r]):void 0};return s(()=>[e.show,e.forbidClick],i),s(()=>[e.show,e.type,e.message,e.duration],()=>{u(),e.show&&e.duration>0&&(r=setTimeout(()=>{o(!1)},e.duration))}),l(i),n(i),()=>P(wT,I({class:[JT([e.position,"normal"===e.wordBreak?"break-normal":e.wordBreak,{[e.type]:!e.icon}]),e.className],lockScroll:!1,onClick:c,onClosed:u,"onUpdate:show":o},LH(e,YT)),{default:()=>[d(),h()]})}});function tP(){const e=Q({show:!1}),t=t=>{e.show=t},A=A=>{EH(e,A,{transitionAppear:!0}),t(!0)},r=()=>t(!1);return PO({open:A,close:r,toggle:t}),{open:A,close:r,state:e,toggle:t}}function AP(e){const t=me(e),A=document.createElement("div");return document.body.appendChild(A),{instance:t.mount(A),unmount(){t.unmount(),document.body.removeChild(A)}}}let rP=[],aP=EH({},{icon:"",type:"text",message:"",className:"",overlay:!1,onClose:void 0,onOpened:void 0,duration:2e3,teleport:"body",iconSize:void 0,iconPrefix:void 0,position:"middle",transition:"van-fade",forbidClick:!1,loadingType:void 0,overlayClass:"",overlayStyle:void 0,closeOnClick:!1,closeOnClickOverlay:!1});const nP=/* @__PURE__ */new Map;function sP(){if(!rP.length){const e=function(){const{instance:e}=AP({setup(){const e=t(""),{open:A,state:r,close:a,toggle:n}=tP(),i=()=>{};return s(e,e=>{r.message=e}),m().render=()=>P(eP,I(r,{onClosed:i,"onUpdate:show":n}),null),{open:A,close:a,message:e}}});return e}();rP.push(e)}return rP[rP.length-1]}function iP(e={}){if(!xH)return{};const t=sP(),A=UH(r=e)?r:{message:r};var r;return t.open(EH({},aP,nP.get(A.type||aP.type),A)),t}HO(eP);const[oP,lP]=SO("switch");const cP=HO(o({name:oP,props:{size:TH,loading:Boolean,disabled:Boolean,modelValue:OH,activeColor:String,inactiveColor:String,activeValue:{type:OH,default:!0},inactiveValue:{type:OH,default:!1}},emits:["change","update:modelValue"],setup(e,{emit:t,slots:A}){const r=()=>e.modelValue===e.activeValue,a=()=>{if(!e.disabled&&!e.loading){const A=r()?e.inactiveValue:e.activeValue;t("update:modelValue",A),t("change",A)}},n=()=>{if(e.loading){const t=r()?e.activeColor:e.inactiveColor;return P(rT,{class:lP("loading"),color:t},null)}if(A.node)return A.node()};return iO(()=>e.modelValue),()=>{var t;const{size:s,loading:i,disabled:o,activeColor:l,inactiveColor:c}=e,u=r(),d={fontSize:gO(s),backgroundColor:u?l:c};return P("div",{role:"switch",class:lP({on:u,loading:i,disabled:o}),style:d,tabindex:o?void 0:0,"aria-checked":u,onClick:a},[P("div",{class:lP("node")},[n()]),null==(t=A.background)?void 0:t.call(A)])}}})),[uP,dP]=SO("radio-group"),hP={shape:String,disabled:Boolean,iconSize:TH,direction:String,modelValue:OH,checkedColor:String},pP=Symbol(uP);const fP=HO(o({name:uP,props:hP,emits:["change","update:modelValue"],setup(e,{emit:t,slots:A}){const{linkChildren:r}=ZH(pP);return s(()=>e.modelValue,e=>t("change",e)),r({props:e,updateValue:e=>t("update:modelValue",e)}),iO(()=>e.modelValue),()=>{var t;return P("div",{class:dP([e.direction]),role:"radiogroup"},[null==(t=A.default)?void 0:t.call(A)])}}})),[gP,mP]=SO("tag");const vP=HO(o({name:gP,props:{size:String,mark:Boolean,show:PH,type:RH("default"),color:String,plain:Boolean,round:Boolean,textColor:String,closeable:Boolean},emits:["close"],setup(e,{slots:t,emit:A}){const r=e=>{e.stopPropagation(),A("close",e)},a=()=>{var A;const{type:a,mark:n,plain:s,round:i,size:o,closeable:l}=e,c={mark:n,plain:s,round:i};o&&(c[o]=o);const u=l&&P(YO,{name:"cross",class:[mP("close"),_O],onClick:r},null);return P("span",{style:e.plain?{color:e.textColor||e.color,borderColor:e.color}:{color:e.textColor,background:e.color},class:mP([c,a])},[null==(A=t.default)?void 0:A.call(t),u])};return()=>P(q,{name:e.closeable?"van-fade":void 0},{default:()=>[e.show?a():null]})}})),yP={name:OH,disabled:Boolean,iconSize:TH,modelValue:OH,checkedColor:String,labelPosition:String,labelDisabled:Boolean};var wP=o({props:EH({},yP,{bem:DH(Function),role:String,shape:String,parent:Object,checked:Boolean,bindGroup:PH,indeterminate:{type:Boolean,default:null}}),emits:["click","toggle"],setup(e,{emit:A,slots:r}){const a=t(),n=t=>{if(e.parent&&e.bindGroup)return e.parent.props[t]},s=i(()=>{if(e.parent&&e.bindGroup){const t=n("disabled")||e.disabled;if("checkbox"===e.role){const A=n("modelValue").length,r=n("max");return t||r&&A>=+r&&!e.checked}return t}return e.disabled}),o=i(()=>n("direction")),l=i(()=>{const t=e.checkedColor||n("checkedColor");if(t&&(e.checked||e.indeterminate)&&!s.value)return{borderColor:t,backgroundColor:t}}),c=i(()=>e.shape||n("shape")||"round"),u=t=>{const{target:r}=t,n=a.value,i=n===r||(null==n?void 0:n.contains(r));s.value||!i&&e.labelDisabled||A("toggle"),A("click",t)},d=()=>{var t,A;const{bem:i,checked:o,indeterminate:u}=e,d=e.iconSize||n("iconSize");return P("div",{ref:a,class:i("icon",[c.value,{disabled:s.value,checked:o,indeterminate:u}]),style:"dot"!==c.value?{fontSize:gO(d)}:{width:gO(d),height:gO(d),borderColor:null==(t=l.value)?void 0:t.borderColor}},[r.icon?r.icon({checked:o,disabled:s.value}):"dot"!==c.value?P(YO,{name:u?"minus":"success",style:l.value},null):P("div",{class:i("icon--dot__icon"),style:{backgroundColor:null==(A=l.value)?void 0:A.backgroundColor}},null)])},h=()=>{const{checked:t}=e;if(r.default)return P("span",{class:e.bem("label",[e.labelPosition,{disabled:s.value}])},[r.default({checked:t,disabled:s.value})])};return()=>{const t="left"===e.labelPosition?[h(),d()]:[d(),h()];return P("div",{role:e.role,class:e.bem([{disabled:s.value,"label-disabled":e.labelDisabled},o.value]),tabindex:s.value?void 0:0,"aria-checked":e.checked,onClick:u},[t])}}});const BP=EH({},yP,{shape:String}),[bP,CP]=SO("radio");const QP=HO(o({name:bP,props:BP,emits:["update:modelValue"],setup(e,{emit:t,slots:A}){const{parent:r}=qH(pP),a=()=>{r?r.updateValue(e.name):t("update:modelValue",e.name)};return()=>P(wP,I({bem:CP,role:"radio",parent:r,checked:(r?r.props.modelValue:e.modelValue)===e.name,onToggle:a},e),LH(A,["default","icon"]))}})),[FP,EP]=SO("image");var xP=o({name:FP,props:{src:String,alt:String,fit:String,position:String,round:Boolean,block:Boolean,width:TH,height:TH,radius:TH,lazyLoad:Boolean,iconSize:TH,showError:PH,errorIcon:RH("photo-fail"),iconPrefix:String,showLoading:PH,loadingIcon:RH("photo"),crossorigin:String,referrerpolicy:String,decoding:String},emits:["load","error"],setup(e,{emit:A,slots:r}){const a=t(!1),n=t(!0),o=t(),{$Lazyload:c}=m().proxy,u=i(()=>{const t={width:gO(e.width),height:gO(e.height)};return MH(e.radius)&&(t.overflow="hidden",t.borderRadius=gO(e.radius)),t});s(()=>e.src,()=>{a.value=!1,n.value=!0});const d=e=>{n.value&&(n.value=!1,A("load",e))},h=()=>{const e=new Event("load");Object.defineProperty(e,"target",{value:o.value,enumerable:!0}),d(e)},p=e=>{a.value=!0,n.value=!1,A("error",e)},f=(t,A,r)=>r?r():P(YO,{name:t,size:e.iconSize,class:A,classPrefix:e.iconPrefix},null),g=()=>{if(a.value||!e.src)return;const t={alt:e.alt,class:EP("img"),decoding:e.decoding,style:{objectFit:e.fit,objectPosition:e.position},crossorigin:e.crossorigin,referrerpolicy:e.referrerpolicy};return e.lazyLoad?H(P("img",I({ref:o},t),null),[[re("lazy"),e.src]]):P("img",I({ref:o,src:e.src,onLoad:d,onError:p},t),null)},v=({el:e})=>{const t=()=>{e===o.value&&n.value&&h()};o.value?t():F(t)},y=({el:e})=>{e!==o.value||a.value||p()};return c&&xH&&(c.$on("loaded",v),c.$on("error",y),E(()=>{c.$off("loaded",v),c.$off("error",y)})),l(()=>{F(()=>{var t;(null==(t=o.value)?void 0:t.complete)&&!e.lazyLoad&&h()})}),()=>{var t;return P("div",{class:EP({round:e.round,block:e.block}),style:u.value},[g(),n.value&&e.showLoading?P("div",{class:EP("loading")},[f(e.loadingIcon,EP("loading-icon"),r.loading)]):a.value&&e.showError?P("div",{class:EP("error")},[f(e.errorIcon,EP("error-icon"),r.error)]):void 0,null==(t=r.default)?void 0:t.call(r)])}}});const UP=HO(xP),[MP,SP]=SO("empty");const kP=HO(o({name:MP,props:{image:RH("default"),imageSize:[Number,String,Array],description:String},setup(e,{slots:t}){const A=()=>{const A=t.description?t.description():e.description;if(A)return P("p",{class:SP("description")},[A])},r=()=>{if(t.default)return P("div",{class:SP("bottom")},[t.default()])},a=bT(),n=e=>`${a}-${e}`,s=e=>`url(#${n(e)})`,i=(e,t,A)=>P("stop",{"stop-color":e,offset:`${t}%`,"stop-opacity":A},null),o=(e,t)=>[i(e,0),i(t,100)],l=e=>[P("defs",null,[P("radialGradient",{id:n(e),cx:"50%",cy:"54%",fx:"50%",fy:"54%",r:"297%",gradientTransform:"matrix(-.16 0 0 -.33 .58 .72)","data-allow-mismatch":"attribute"},[i("#EBEDF0",0),i("#F2F3F5",100,.3)])]),P("ellipse",{fill:s(e),opacity:".8",cx:"80",cy:"140",rx:"46",ry:"8","data-allow-mismatch":"attribute"},null)],c=()=>[P("defs",null,[P("linearGradient",{id:n("a"),x1:"64%",y1:"100%",x2:"64%","data-allow-mismatch":"attribute"},[i("#FFF",0,.5),i("#F2F3F5",100)])]),P("g",{opacity:".8","data-allow-mismatch":"children"},[P("path",{d:"M36 131V53H16v20H2v58h34z",fill:s("a")},null),P("path",{d:"M123 15h22v14h9v77h-31V15z",fill:s("a")},null)])],u=()=>[P("defs",null,[P("linearGradient",{id:n("b"),x1:"64%",y1:"97%",x2:"64%",y2:"0%","data-allow-mismatch":"attribute"},[i("#F2F3F5",0,.3),i("#F2F3F5",100)])]),P("g",{opacity:".8","data-allow-mismatch":"children"},[P("path",{d:"M87 6c3 0 7 3 8 6a8 8 0 1 1-1 16H80a7 7 0 0 1-8-6c0-4 3-7 6-7 0-5 4-9 9-9Z",fill:s("b")},null),P("path",{d:"M19 23c2 0 3 1 4 3 2 0 4 2 4 4a4 4 0 0 1-4 3v1h-7v-1l-1 1c-2 0-3-2-3-4 0-1 1-3 3-3 0-2 2-4 4-4Z",fill:s("b")},null)])],d=()=>P("svg",{viewBox:"0 0 160 160"},[P("defs",{"data-allow-mismatch":"children"},[P("linearGradient",{id:n(1),x1:"64%",y1:"100%",x2:"64%"},[i("#FFF",0,.5),i("#F2F3F5",100)]),P("linearGradient",{id:n(2),x1:"50%",x2:"50%",y2:"84%"},[i("#EBEDF0",0),i("#DCDEE0",100,0)]),P("linearGradient",{id:n(3),x1:"100%",x2:"100%",y2:"100%"},[o("#EAEDF0","#DCDEE0")]),P("radialGradient",{id:n(4),cx:"50%",cy:"0%",fx:"50%",fy:"0%",r:"100%",gradientTransform:"matrix(0 1 -.54 0 .5 -.5)"},[i("#EBEDF0",0),i("#FFF",100,0)])]),P("g",{fill:"none"},[c(),P("path",{fill:s(4),d:"M0 139h160v21H0z","data-allow-mismatch":"attribute"},null),P("path",{d:"M80 54a7 7 0 0 1 3 13v27l-2 2h-2a2 2 0 0 1-2-2V67a7 7 0 0 1 3-13z",fill:s(2),"data-allow-mismatch":"attribute"},null),P("g",{opacity:".6","stroke-linecap":"round","stroke-width":"7","data-allow-mismatch":"children"},[P("path",{d:"M64 47a19 19 0 0 0-5 13c0 5 2 10 5 13",stroke:s(3)},null),P("path",{d:"M53 36a34 34 0 0 0 0 48",stroke:s(3)},null),P("path",{d:"M95 73a19 19 0 0 0 6-13c0-5-2-9-6-13",stroke:s(3)},null),P("path",{d:"M106 84a34 34 0 0 0 0-48",stroke:s(3)},null)]),P("g",{transform:"translate(31 105)"},[P("rect",{fill:"#EBEDF0",width:"98",height:"34",rx:"2"},null),P("rect",{fill:"#FFF",x:"9",y:"8",width:"80",height:"18",rx:"1.1"},null),P("rect",{fill:"#EBEDF0",x:"15",y:"12",width:"18",height:"6",rx:"1.1"},null)])])]),h=()=>P("svg",{viewBox:"0 0 160 160"},[P("defs",{"data-allow-mismatch":"children"},[P("linearGradient",{x1:"50%",x2:"50%",y2:"100%",id:n(5)},[o("#F2F3F5","#DCDEE0")]),P("linearGradient",{x1:"95%",y1:"48%",x2:"5.5%",y2:"51%",id:n(6)},[o("#EAEDF1","#DCDEE0")]),P("linearGradient",{y1:"45%",x2:"100%",y2:"54%",id:n(7)},[o("#EAEDF1","#DCDEE0")])]),c(),u(),P("g",{transform:"translate(36 50)",fill:"none"},[P("g",{transform:"translate(8)"},[P("rect",{fill:"#EBEDF0",opacity:".6",x:"38",y:"13",width:"36",height:"53",rx:"2"},null),P("rect",{fill:s(5),width:"64",height:"66",rx:"2","data-allow-mismatch":"attribute"},null),P("rect",{fill:"#FFF",x:"6",y:"6",width:"52",height:"55",rx:"1"},null),P("g",{transform:"translate(15 17)",fill:s(6),"data-allow-mismatch":"attribute"},[P("rect",{width:"34",height:"6",rx:"1"},null),P("path",{d:"M0 14h34v6H0z"},null),P("rect",{y:"28",width:"34",height:"6",rx:"1"},null)])]),P("rect",{fill:s(7),y:"61",width:"88",height:"28",rx:"1","data-allow-mismatch":"attribute"},null),P("rect",{fill:"#F7F8FA",x:"29",y:"72",width:"30",height:"6",rx:"1"},null)])]),p=()=>P("svg",{viewBox:"0 0 160 160"},[P("defs",null,[P("linearGradient",{x1:"50%",x2:"50%",y2:"100%",id:n(8),"data-allow-mismatch":"attribute"},[o("#EAEDF1","#DCDEE0")])]),c(),u(),l("c"),P("path",{d:"m59 60 21 21 21-21h3l9 9v3L92 93l21 21v3l-9 9h-3l-21-21-21 21h-3l-9-9v-3l21-21-21-21v-3l9-9h3Z",fill:s(8),"data-allow-mismatch":"attribute"},null)]),f=()=>P("svg",{viewBox:"0 0 160 160"},[P("defs",{"data-allow-mismatch":"children"},[P("linearGradient",{x1:"50%",y1:"100%",x2:"50%",id:n(9)},[o("#EEE","#D8D8D8")]),P("linearGradient",{x1:"100%",y1:"50%",y2:"50%",id:n(10)},[o("#F2F3F5","#DCDEE0")]),P("linearGradient",{x1:"50%",x2:"50%",y2:"100%",id:n(11)},[o("#F2F3F5","#DCDEE0")]),P("linearGradient",{x1:"50%",x2:"50%",y2:"100%",id:n(12)},[o("#FFF","#F7F8FA")])]),c(),u(),l("d"),P("g",{transform:"rotate(-45 113 -4)",fill:"none","data-allow-mismatch":"children"},[P("rect",{fill:s(9),x:"24",y:"52.8",width:"5.8",height:"19",rx:"1"},null),P("rect",{fill:s(10),x:"22.1",y:"67.3",width:"9.9",height:"28",rx:"1"},null),P("circle",{stroke:s(11),"stroke-width":"8",cx:"27",cy:"27",r:"27"},null),P("circle",{fill:s(12),cx:"27",cy:"27",r:"16"},null),P("path",{d:"M37 7c-8 0-15 5-16 12",stroke:s(11),"stroke-width":"3",opacity:".5","stroke-linecap":"round",transform:"rotate(45 29 13)"},null)])]),g=()=>{var A;if(t.image)return t.image();const r={error:p,search:f,network:d,default:h};return(null==(A=r[e.image])?void 0:A.call(r))||P("img",{src:e.image},null)};return()=>P("div",{class:SP()},[P("div",{class:SP("image"),style:mO(e.imageSize)},[g()]),A(),r()])}})),_P={height:KH(0),anchors:NH(),duration:KH(.3),magnetic:PH,contentDraggable:PH,lockScroll:Boolean,safeAreaInsetBottom:PH},[IP,LP]=SO("floating-panel");const HP=HO(o({name:IP,props:_P,emits:["heightChange","update:height"],setup(e,{emit:A,slots:r}){const a=t(),n=t(),o=((e,A)=>{const r=t(e());return s(e,e=>{e!==r.value&&(r.value=e)}),s(r,t=>{t!==e()&&A(t)}),r})(()=>+e.height,e=>A("update:height",e)),l=i(()=>{var t,A;return{min:null!=(t=e.anchors[0])?t:100,max:null!=(A=e.anchors[e.anchors.length-1])?A:Math.round(.6*fO.value)}}),c=i(()=>e.anchors.length>=2?e.anchors:[l.value.min,l.value.max]),u=t(!1),d=i(()=>({height:gO(l.value.max),transform:`translateY(calc(100% + ${gO(-o.value)}))`,transition:u.value?"none":`transform ${e.duration}s cubic-bezier(0.18, 0.89, 0.32, 1.28)`}));let h,p=-1;const f=oT(),g=e=>{f.start(e),u.value=!0,h=-o.value,p=-1},m=()=>{if(p=-1,u.value=!1,e.magnetic)o.value=OO(c.value,o.value);else{const{min:e,max:t}=l.value;o.value=Math.max(e,Math.min(t,o.value))}o.value!==-h&&A("heightChange",{height:o.value})};s(l,()=>{o.value=OO(c.value,o.value)},{immediate:!0}),uT(a,()=>e.lockScroll||u.value),tO("touchmove",t=>{var A;f.move(t);const r=t.target;if(n.value===r||(null==(A=n.value)?void 0:A.contains(r))){const{scrollTop:A}=n.value;if(p=Math.max(p,A),!e.contentDraggable)return;if(-h<l.value.max)dO(t,!0);else if(!(A<=0&&f.deltaY.value>0)||p>0)return}const a=f.deltaY.value+h;o.value=-(e=>{const t=Math.abs(e),{min:A,max:r}=l.value;return t>r?-(r+.2*(t-r)):t<A?-(A-.2*(A-t)):e})(a)},{target:a});return()=>{var t;return P("div",{class:[LP(),{"van-safe-area-bottom":e.safeAreaInsetBottom}],ref:a,style:d.value,onTouchstartPassive:g,onTouchend:m,onTouchcancel:m},[r.header?r.header():P("div",{class:LP("header")},[P("div",{class:LP("header-bar")},null)]),P("div",{class:LP("content"),ref:n,style:{paddingBottom:gO(l.value.max-o.value)}},[null==(t=r.default)?void 0:t.call(r)])])}}})),OP=e=>Math.sqrt((e[0].clientX-e[1].clientX)**2+(e[0].clientY-e[1].clientY)**2),TP=SO("image-preview")[1];var PP=o({props:{src:String,show:Boolean,active:Number,minZoom:DH(TH),maxZoom:DH(TH),rootWidth:DH(Number),rootHeight:DH(Number),disableZoom:Boolean,doubleScale:Boolean,closeOnClickImage:Boolean,closeOnClickOverlay:Boolean,vertical:Boolean},emits:["scale","close","longPress"],setup(e,{emit:A,slots:r}){const a=Q({scale:1,moveX:0,moveY:0,moving:!1,zooming:!1,initializing:!1,imageRatio:0}),n=oT(),o=t(),l=t(),c=t(!1),u=t(!1);let d=0;const h=i(()=>{const{scale:e,moveX:t,moveY:A,moving:r,zooming:n,initializing:s}=a,i={transitionDuration:n||r||s?"0s":".3s"};return(1!==e||u.value)&&(i.transform=`matrix(${e}, 0, 0, ${e}, ${t}, ${A})`),i}),p=i(()=>{if(a.imageRatio){const{rootWidth:t,rootHeight:A}=e,r=c.value?A/a.imageRatio:t;return Math.max(0,(a.scale*r-t)/2)}return 0}),f=i(()=>{if(a.imageRatio){const{rootWidth:t,rootHeight:A}=e,r=c.value?A:t*a.imageRatio;return Math.max(0,(a.scale*r-A)/2)}return 0}),g=(t,r)=>{var n;if((t=wO(t,+e.minZoom,+e.maxZoom+1))!==a.scale){const s=t/a.scale;if(a.scale=t,r){const e=$H(null==(n=o.value)?void 0:n.$el),t={x:.5*e.width,y:.5*e.height},A=a.moveX-(r.x-e.left-t.x)*(s-1),i=a.moveY-(r.y-e.top-t.y)*(s-1);a.moveX=wO(A,-p.value,p.value),a.moveY=wO(i,-f.value,f.value)}else a.moveX=0,a.moveY=u.value?d:0;A("scale",{scale:t,index:e.active})}},m=()=>{g(1)};let v,y,w,B,b,C,F,E,x=!1;const U=t=>{const{touches:A}=t;if(v=A.length,2===v&&e.disableZoom)return;const{offsetX:r}=n;n.start(t),y=a.moveX,w=a.moveY,E=Date.now(),x=!1,a.moving=1===v&&(1!==a.scale||u.value),a.zooming=2===v&&!r.value,a.zooming&&(B=a.scale,b=OP(A))},M=t=>{var r;const a=null==(r=l.value)?void 0:r.$el;if(!a)return;const n=a.firstElementChild,s=t.target===a,i=null==n?void 0:n.contains(t.target);!e.closeOnClickImage&&i||!e.closeOnClickOverlay&&s||A("close")},S=t=>{if(v>1)return;const r=Date.now()-E;n.isTap.value&&(r<250?e.doubleScale?F?(clearTimeout(F),F=null,(()=>{const e=a.scale>1?1:2;g(e,2===e||u.value?{x:n.startX.value,y:n.startY.value}:void 0)})()):F=setTimeout(()=>{M(t),F=null},250):M(t):r>500&&A("longPress"))},k=t=>{let A=!1;if((a.moving||a.zooming)&&(A=!0,a.moving&&y===a.moveX&&w===a.moveY&&(A=!1),!t.touches.length)){a.zooming&&(a.moveX=wO(a.moveX,-p.value,p.value),a.moveY=wO(a.moveY,-f.value,f.value),a.zooming=!1),a.moving=!1,y=0,w=0,B=1,a.scale<1&&m();const t=+e.maxZoom;a.scale>t&&g(t,C)}dO(t,A),S(t),n.reset()},_=()=>{const{rootWidth:t,rootHeight:A}=e,r=A/t,{imageRatio:n}=a;c.value=a.imageRatio>r&&n<2.6,u.value=a.imageRatio>r&&n>=2.6,u.value&&(d=(n*t-A)/2,a.moveY=d,a.initializing=!0,VH(()=>{a.initializing=!1})),m()},I=e=>{const{naturalWidth:t,naturalHeight:A}=e.target;a.imageRatio=A/t,_()};return s(()=>e.active,m),s(()=>e.show,e=>{e||m()}),s(()=>[e.rootWidth,e.rootHeight],_),tO("touchmove",t=>{const{touches:A}=t;if(n.move(t),a.moving){const{deltaX:A,deltaY:r}=n,s=A.value+y,i=r.value+w;if((e.vertical?n.isVertical()&&Math.abs(i)>f.value:n.isHorizontal()&&Math.abs(s)>p.value)&&!x)return void(a.moving=!1);x=!0,dO(t,!0),a.moveX=wO(s,-p.value,p.value),a.moveY=wO(i,-f.value,f.value)}if(a.zooming&&(dO(t,!0),2===A.length)){const e=OP(A),t=B*e/b;C=(e=>({x:(e[0].clientX+e[1].clientX)/2,y:(e[0].clientY+e[1].clientY)/2}))(A),g(t,C)}},{target:i(()=>{var e;return null==(e=l.value)?void 0:e.$el})}),PO({resetScale:m}),()=>{const t={loading:()=>P(rT,{type:"spinner"},null)};return P(_T,{ref:l,class:TP("swipe-item"),onTouchstartPassive:U,onTouchend:k,onTouchcancel:k},{default:()=>[r.image?P("div",{class:TP("image-wrap")},[r.image({src:e.src,onLoad:I,style:h.value})]):P(UP,{ref:o,src:e.src,fit:"contain",class:TP("image",{vertical:c.value}),style:h.value,onLoad:I},t)]})}}});const[DP,NP]=SO("image-preview"),KP=["show","teleport","transition","overlayStyle","closeOnPopstate"];var RP=o({name:DP,props:{show:Boolean,loop:PH,images:NH(),minZoom:KH(1/3),maxZoom:KH(3),overlay:PH,vertical:Boolean,closeable:Boolean,showIndex:PH,className:OH,closeIcon:RH("clear"),transition:String,beforeClose:Function,doubleScale:PH,overlayClass:OH,overlayStyle:Object,swipeDuration:KH(300),startPosition:KH(0),showIndicators:Boolean,closeOnPopstate:PH,closeOnClickImage:PH,closeOnClickOverlay:PH,closeIconPosition:RH("top-right"),teleport:[String,Object]},emits:["scale","close","closed","change","longPress","update:show"],setup(e,{emit:A,slots:r}){const a=t(),n=t(),i=Q({active:0,rootWidth:0,rootHeight:0,disableZoom:!1}),o=()=>{if(a.value){const e=$H(a.value.$el);i.rootWidth=e.width,i.rootHeight=e.height,a.value.resize()}},c=e=>A("scale",e),u=e=>A("update:show",e),d=()=>{LO(e.beforeClose,{args:[i.active],done:()=>u(!1)})},h=e=>{e!==i.active&&(i.active=e,A("change",e))},p=()=>{if(e.showIndex)return P("div",{class:NP("index")},[r.index?r.index({index:i.active}):`${i.active+1} / ${e.images.length}`])},f=()=>{if(r.cover)return P("div",{class:NP("cover")},[r.cover()])},g=()=>{i.disableZoom=!0},m=()=>{i.disableZoom=!1},v=()=>{if(e.closeable)return P(YO,{role:"button",name:e.closeIcon,class:[NP("close-icon",e.closeIconPosition),_O],onClick:d},null)},y=()=>A("closed"),w=(e,t)=>{var A;return null==(A=a.value)?void 0:A.swipeTo(e,t)};return PO({resetScale:()=>{var e;null==(e=n.value)||e.resetScale()},swipeTo:w}),l(o),s([pO,fO],o),s(()=>e.startPosition,e=>h(+e)),s(()=>e.show,t=>{const{images:r,startPosition:a}=e;t?(h(+a),F(()=>{o(),w(+a,{immediate:!0})})):A("close",{index:i.active,url:r[i.active]})}),()=>P(wT,I({class:[NP(),e.className],overlayClass:[NP("overlay"),e.overlayClass],onClosed:y,"onUpdate:show":u},LH(e,KP)),{default:()=>[v(),P(UT,{ref:a,lazyRender:!0,loop:e.loop,class:NP("swipe"),vertical:e.vertical,duration:e.swipeDuration,initialSwipe:e.startPosition,showIndicators:e.showIndicators,indicatorColor:"white",onChange:h,onDragEnd:m,onDragStart:g},{default:()=>[e.images.map((t,a)=>P(PP,{ref:e=>{a===i.active&&(n.value=e)},src:t,show:e.show,active:i.active,maxZoom:e.maxZoom,minZoom:e.minZoom,rootWidth:i.rootWidth,rootHeight:i.rootHeight,disableZoom:i.disableZoom,doubleScale:e.doubleScale,closeOnClickImage:e.closeOnClickImage,closeOnClickOverlay:e.closeOnClickOverlay,vertical:e.vertical,onScale:c,onClose:d,onLongPress:()=>A("longPress",{index:a})},{image:r.image}))]}),p(),f()]})}});let GP;const VP={loop:!0,images:[],maxZoom:3,minZoom:1/3,onScale:void 0,onClose:void 0,onChange:void 0,vertical:!1,teleport:"body",className:"",showIndex:!0,closeable:!1,closeIcon:"clear",transition:void 0,beforeClose:void 0,doubleScale:!0,overlayStyle:void 0,overlayClass:void 0,startPosition:0,swipeDuration:300,showIndicators:!1,closeOnPopstate:!0,closeOnClickOverlay:!0,closeIconPosition:"top-right"};const zP=(e,t=0)=>{if(xH)return GP||({instance:GP}=AP({setup(){const{state:e,toggle:t}=tP(),A=()=>{e.images=[]};return()=>P(RP,I(e,{onClosed:A,"onUpdate:show":t}),null)}})),e=Array.isArray(e)?{images:e,startPosition:t}:e,GP.open(EH({},VP,e)),GP};HO(RP);const[jP,$P,qP]=SO("search");const WP=HO(o({name:jP,props:EH({},jT,{label:String,shape:RH("square"),leftIcon:RH("search"),clearable:PH,actionText:String,background:String,showAction:Boolean}),emits:["blur","focus","clear","search","cancel","clickInput","clickLeftIcon","clickRightIcon","update:modelValue"],setup(e,{emit:A,slots:r,attrs:a}){const n=bT(),s=t(),i=()=>{r.action||(A("update:modelValue",""),A("cancel"))},o=t=>{13===t.keyCode&&(dO(t),A("search",e.modelValue))},l=()=>e.id||`${n}-input`,c=()=>{if(r.label||e.label)return P("label",{class:$P("label"),for:l(),"data-allow-mismatch":"attribute"},[r.label?r.label():e.label])},u=()=>{if(e.showAction){const t=e.actionText||qP("cancel");return P("div",{class:$P("action"),role:"button",tabindex:0,onClick:i},[r.action?r.action():t])}},d=e=>A("blur",e),h=e=>A("focus",e),p=e=>A("clear",e),f=e=>A("clickInput",e),g=e=>A("clickLeftIcon",e),m=e=>A("clickRightIcon",e),v=Object.keys(jT),y=()=>{const t=EH({},a,LH(e,v),{id:l()});return P(qT,I({ref:s,type:"search",class:$P("field",{"with-message":t.errorMessage}),border:!1,labelAlign:"left",onBlur:d,onFocus:h,onClear:p,onKeypress:o,onClickInput:f,onClickLeftIcon:g,onClickRightIcon:m,"onUpdate:modelValue":e=>A("update:modelValue",e)},t),LH(r,["left-icon","right-icon"]))};return PO({focus:()=>{var e;return null==(e=s.value)?void 0:e.focus()},blur:()=>{var e;return null==(e=s.value)?void 0:e.blur()}}),()=>{var t;return P("div",{class:$P({"show-action":e.showAction}),style:{background:e.background}},[null==(t=r.left)?void 0:t.call(r),P("div",{class:$P("content",e.shape)},[c(),y()]),u()])}}})),XP={class:"mobile-image-list"},JP=/* @__PURE__ */vC(/* @__PURE__ */o({name:"MobileImageList",props:{data:{type:Array,default:()=>[]}},setup(e){const t=e;return(A,r)=>{const a=rT,n=UP;return c(),u("div",XP,[(c(!0),u(S,null,ne(e.data,e=>(c(),k(n,{key:e,width:"80",height:"80",src:e,onClick:A=>(e=>{zP({images:t.data,startPosition:t.data.indexOf(e)})})(e)},{loading:D(()=>[P(a,{type:"spinner",size:"20"})]),_:1},8,["src","onClick"]))),128))])}}}),[["__scopeId","data-v-56e3881b"]]),YP={class:"gismap-query-result-header"},ZP={class:"gismap-query-result-title"},eD={style:{margin:"1px 5px 0"}},tD=["innerHTML"],AD={class:"gismap-query-result-actions"},rD={class:"gismap-query-result-body gismap-table"},aD={class:"gismap-query-result-value"},nD=/* @__PURE__ */o({__name:"index",props:{downloadUrl:{type:Function||void 0,default:void 0}},setup(e){const A=e,r=t(!1),a=t({}),s=Gt(),i=t(),o=t(800),d=()=>{let e=i.value?.header||"查询结果";return e=e.replace(/{p\.(\w+)}/g,(e,t)=>a.value[t]||""),e},f=e=>Pv(a.value[e.fieldName],e),g=e=>{if(!A?.downloadUrl)return[];const t=JSON.parse(a.value[e.fieldName]||"[]"),r=[];return t.forEach(e=>{const t=A?.downloadUrl?.(e)||"";r.push(t)}),r};return l(()=>{s.value?.events.on("layer:morePopupClick",e=>{let t=e?.feature?.properties||{};a.value=t,e.templateId&&s.value?.templateManager&&s.value?.templateManager.hasTemplate(e.templateId)&&(i.value=s.value.templateManager.getTemplate(e.templateId),r.value=!0)})}),n(()=>{s.value?.events.off("layer:morePopupClick")}),(e,t)=>{const A=cc,a=JP;return c(),k(w(kf),{modelValue:r.value,"onUpdate:modelValue":t[0]||(t[0]=e=>r.value=e),draggable:"",width:o.value,"append-to-body":!0,class:"gismap-query-result","close-on-click-modal":!1,"align-center":"","modal-penetrable":""},{header:D(()=>[h("div",YP,[h("div",ZP,[h("span",eD,[P(A,{color:"#409EFF",size:20},{default:D(()=>[P(w(Vl))]),_:1})]),h("span",{innerHTML:d()},null,8,tD)]),h("div",AD,[p(e.$slots,"actions")])])]),default:D(()=>[h("div",rD,[P(w(Np),null,{default:D(()=>[(c(!0),u(S,null,ne(i.value?.body?.filter(e=>e.isShowMore)||[],e=>(c(),k(w(Kp),{span:e?.style?.span||12,class:"gismap-query-result-item"},{default:D(()=>[h("div",{class:"gismap-query-result-label",style:L({width:i.value?.labelWidth+"px"||"100px"})},j(e.fieldLabel),5),h("div",aD,["image"===e.fieldType?(c(),k(a,{key:0,data:g(e)},null,8,["data"])):(c(),u(S,{key:1},[z(j(f(e))+" "+j(e.unit),1)],64))])]),_:2},1032,["span"]))),256))]),_:1})])]),_:3},8,["modelValue","width"])}}}),sD=["innerHTML"],iD={class:"gismap-query-result-header"},oD={class:"gismap-query-result-title"},lD={style:{"margin-right":"5px"}},cD=["innerHTML"],uD={class:"gismap-query-result-body"},dD={class:"gismap-query-result-value"},hD={key:0,class:"gismap-query-result-footer"},pD=/* @__PURE__ */o({name:"MapQueryPopup",props:{downloadUrl:{type:Function||void 0,default:void 0}},setup(A){const r=A,a=t(void 0),s=t({}),i=Gt(),o=t(),p=t(o.value?.width||"400px"),g=t(o.value?.isSmallPopup||!1),m=t(void 0),v=new e.Popup({closeOnClick:!1,closeOnMove:!1,className:"gismap-popup",anchor:"bottom"}),y=()=>{let e=o.value?.header||"查询结果";return e=e.replace(/{p\.(\w+)}/g,(e,t)=>s.value[t]||""),e},B=e=>Pv(s.value[e.fieldName],e),b=e=>{if(!r?.downloadUrl)return[];const t=JSON.parse(s.value[e.fieldName]||"[]"),A=[];return t.forEach(e=>{const t=r?.downloadUrl?.(e)||"";A.push(t)}),A};return l(()=>{a.value&&(v.setDOMContent(a?.value),i.value?.events.on("layer:smallPopupClick",e=>{if(!e.center)return;m.value=e;let t=e?.properties||e?.feature?.properties||{};if(s.value=t,e.templateId&&i.value?.templateManager&&i.value?.templateManager.hasTemplate(e.templateId)){o.value=i.value.templateManager.getTemplate(e.templateId),p.value=o.value?.width||"400px",g.value=o.value?.isSmallPopup??!1,v.setLngLat(e.center);["LineString","MultiLineString","Polygon","MultiPolygon"].includes(e?.feature?.type||"")?v.setOffset([0,0]):v.setOffset(e.offset||[0,-10]),v.addTo(i.value?.adapter.getMap())}}),i.value?.events.on("layer:removePopup",()=>{v.remove()}))}),n(()=>{i.value?.events.off("layer:smallPopupClick"),i.value?.events.off("layer:removePopup")}),(e,t)=>{const A=cc,r=JP,n=fh;return c(),u("div",{class:d(["gismap-query-result-popup",{"gismap-query-result-small-popup":g.value}]),ref_key:"popupRef",ref:a},[g.value?(c(),u("span",{key:0,innerHTML:((o.value?.header||"").match(/\{[^}]+\}/g)||[]).map(e=>{const t=e.replace(/[{}]/g,"").split(".").pop()||"";return s.value[t]||""}).join(" ")},null,8,sD)):(c(),u("div",{key:1,style:L({width:p.value+"px"})},[h("div",iD,[h("div",oD,[h("span",lD,[P(A,{color:"#409EFF",size:20},{default:D(()=>[P(w(Vl))]),_:1})]),h("span",{innerHTML:y()},null,8,cD)])]),h("div",uD,[P(w(Np),{class:"gismap-table"},{default:D(()=>[(c(!0),u(S,null,ne(o.value?.body?.filter(e=>e.isShowInfo)||[],e=>(c(),k(w(Kp),{span:24,class:"gismap-query-result-item"},{default:D(()=>[h("div",{class:"gismap-query-result-label",style:L({width:o.value?.labelWidth+"px"||"90px"})},j(e.fieldLabel)+":",5),h("div",dD,["image"===e.fieldType?(c(),k(r,{key:0,data:b(e)},null,8,["data"])):(c(),u(S,{key:1},[z(j(B(e))+" "+j(e.unit),1)],64))])]),_:2},1024))),256))]),_:1})]),o.value?.footer&&o.value?.footer?.length>0?(c(),u("div",hD,[(c(!0),u(S,null,ne(o.value?.footer||[],e=>(c(),k(n,{type:"default",size:"small",dashed:"",onClick:t=>(e=>{"more"===e.type&&i.value?.events.emit("layer:morePopupClick",m.value)})(e)},{default:D(()=>[z(j(e.label),1)]),_:2},1032,["onClick"]))),256))])):f("",!0)],4))],2)}}});const fD={class:"gismap-mapmeasure"},gD={class:"measure-toolbar"},mD={class:"measure-group"},vD={class:"measure-type-group"},yD={class:"measure-group"},wD={class:"measure-action-group"},BD={key:0,class:"measure-group"},bD={class:"config-options"},CD={key:0,class:"config-item"},QD={class:"config-select"},FD={key:1,class:"config-item"},ED={class:"config-select"},xD={key:2,class:"config-item"},UD={class:"config-select"},MD=/* @__PURE__ */o({name:"GisMapMeasure",setup(e){const r=t("lnglat"),a=t(6),n=t(2),i=t("meter"),o=t("squareMeter"),{isMeasuring:l,measureType:p,startMeasure:g,stopMeasure:m,clear:v,updateOptions:y}=function(e={}){const r=Gt(),a=t(!1),n=t("none"),s=t(0),i=()=>{const e=r.value;if(!e)return null;return e.measureManager||null},o=()=>{const e=i();e&&(a.value=e.getIsMeasuring(),s.value=e.getResultCount(),n.value=e.getMeasureType())},l=e=>{const t=i();t&&t.onMeasure(t=>{e(t),o()})};return e.onMeasure&&setTimeout(()=>l(e.onMeasure),0),{isMeasuring:A(a),measureType:A(n),count:A(s),startMeasure:t=>{const A=i();A&&(A.startMeasure(t,t=>{e.onMeasure&&e.onMeasure(t),o()}),o())},stopMeasure:()=>{const e=i();e&&(e.stopMeasure(),o())},clearMeasuring:()=>{const e=i();e&&(e.clearMeasuring(),o())},getAll:()=>{const e=i();return e?e.getAllResults():[]},get:e=>{const t=i();if(t)return t.getResult(e)},delete:e=>{const t=i();if(!t)return!1;const A=t.deleteResult(e);return o(),A},clear:()=>{const e=i();e&&(e.clearAllResults(),o())},updateOptions:t=>{const A=i();A&&(e={...e,...t},A.updateOptions({coordinateType:e.coordinateType,lnglatDecimal:e.lnglatDecimal,mercatorDecimal:e.mercatorDecimal,distanceUnit:e.distanceUnit,areaUnit:e.areaUnit}))},onMeasure:l}}({coordinateType:r.value,lnglatDecimal:a.value,mercatorDecimal:n.value,distanceUnit:i.value,areaUnit:o.value});return s(r,e=>{y({coordinateType:e})}),s(a,e=>{y({lnglatDecimal:e})}),s(n,e=>{y({mercatorDecimal:e})}),s(i,e=>{y({distanceUnit:e})}),s(o,e=>{y({areaUnit:e})}),(e,t)=>(c(),u("div",fD,[h("div",gD,[h("div",mD,[t[15]||(t[15]=h("div",{class:"group-title"},"测量类型",-1)),h("div",vD,[h("button",{class:d(["measure-btn",{active:"point"===w(p),measuring:w(l)&&"point"===w(p)}]),onClick:t[0]||(t[0]=e=>w(g)("point")),title:"测量点坐标"},[...t[12]||(t[12]=[h("span",{class:"btn-icon"},"📍",-1),h("span",{class:"btn-label"},"点",-1)])],2),h("button",{class:d(["measure-btn",{active:"line"===w(p),measuring:w(l)&&"line"===w(p)}]),onClick:t[1]||(t[1]=e=>w(g)("line")),title:"测量线段距离"},[...t[13]||(t[13]=[h("span",{class:"btn-icon"},"📏",-1),h("span",{class:"btn-label"},"线",-1)])],2),h("button",{class:d(["measure-btn",{active:"polygon"===w(p),measuring:w(l)&&"polygon"===w(p)}]),onClick:t[2]||(t[2]=e=>w(g)("polygon")),title:"测量多边形面积"},[...t[14]||(t[14]=[h("span",{class:"btn-icon"},"⬡",-1),h("span",{class:"btn-label"},"面",-1)])],2)])]),h("div",yD,[t[18]||(t[18]=h("div",{class:"group-title"},"测量操作",-1)),h("div",wD,[h("button",{class:d(["measure-btn stop",{active:w(l)}]),onClick:t[3]||(t[3]=(...e)=>w(m)&&w(m)(...e)),title:"停止测量"},[...t[16]||(t[16]=[h("span",{class:"btn-icon"},"⏹",-1),h("span",{class:"btn-label"},"停止",-1)])],2),h("button",{class:"measure-btn clear",onClick:t[4]||(t[4]=(...e)=>w(v)&&w(v)(...e)),title:"清除所有测量结果"},[...t[17]||(t[17]=[h("span",{class:"btn-icon"},"🗑",-1),h("span",{class:"btn-label"},"清除",-1)])])])]),w(l)?(c(),u("div",BD,[t[22]||(t[22]=h("div",{class:"group-title"},"配置选项",-1)),h("div",bD,["point"===w(p)?(c(),u("div",CD,[t[19]||(t[19]=h("label",{class:"config-label"},"坐标类型",-1)),h("div",QD,[h("button",{class:d({active:"lnglat"===r.value}),onClick:t[5]||(t[5]=e=>r.value="lnglat")}," 经纬度坐标 ",2),h("button",{class:d({active:"mercator"===r.value}),onClick:t[6]||(t[6]=e=>r.value="mercator")}," 平面坐标 ",2)])])):f("",!0),"line"===w(p)?(c(),u("div",FD,[t[20]||(t[20]=h("label",{class:"config-label"},"距离单位",-1)),h("div",ED,[h("button",{class:d({active:"meter"===i.value}),onClick:t[7]||(t[7]=e=>i.value="meter")}," 米 ",2),h("button",{class:d({active:"kilometer"===i.value}),onClick:t[8]||(t[8]=e=>i.value="kilometer")}," 千米 ",2)])])):f("",!0),"polygon"===w(p)?(c(),u("div",xD,[t[21]||(t[21]=h("label",{class:"config-label"},"面积单位",-1)),h("div",UD,[h("button",{class:d({active:"squareMeter"===o.value}),onClick:t[9]||(t[9]=e=>o.value="squareMeter")}," 平方米 ",2),h("button",{class:d({active:"squareKilometer"===o.value}),onClick:t[10]||(t[10]=e=>o.value="squareKilometer")}," 平方千米 ",2),h("button",{class:d({active:"mu"===o.value}),onClick:t[11]||(t[11]=e=>o.value="mu")}," 亩 ",2)])])):f("",!0)])])):f("",!0)])]))}}),SD=/* @__PURE__ */o({name:"GisMapMobilePopupBarGroup",props:{float:{type:String,default:"top"}},setup(e){const A=t(null);return a("popupBarContext",{activeIndex:A,setActiveIndex:e=>{A.value=e}}),(t,A)=>(c(),u("div",{class:d(["gismap-mobile-popupbar",e.float])},[p(t.$slots,"default")],2))}}),kD={class:"gismap-mobile-popupbar-item-wrapper"},_D={class:"icon-wrapper"},ID={class:"text"},LD={class:"gismap-mobile-popupbar-content"},HD=/* @__PURE__ */o({name:"GisMapMobileBarPopupItem",props:{text:{type:String,default:""},iconName:{type:String,default:""},position:{type:String,default:"right"},visible:{type:Boolean,default:!1},trigger:{type:String||void 0,default:void 0},width:{type:String||void 0,default:"100%"},height:{type:String||void 0,default:"100%"},overlay:{type:Boolean,default:!0}},setup(e){const A=Gk,r=e,a=t(r.visible),n=()=>{a.value=!a.value};return(t,s)=>{const i=cc,o=wT;return c(),u("div",kD,[H((c(),u("div",{class:d(["gismap-mobile-popupbar-item",{active:a.value}]),onClick:n},[h("div",_D,[P(i,{size:20},{default:D(()=>[(c(),k(V(w(aQ)(r.iconName))))]),_:1})]),h("div",ID,j(e.text),1)],2)),[[w(A)]]),s[1]||(s[1]=h("div",{class:"divider"},null,-1)),P(o,{show:a.value,"onUpdate:show":s[0]||(s[0]=e=>a.value=e),position:e.position,round:"",overlay:e.overlay,"safe-area-inset-bottom":!0,"lazy-render":!1,class:"mobile-map-layer-popup",style:L({width:e.width,height:e.height}),"get-container":"#app","close-on-popstate":!0,onClose:n},{default:D(()=>[h("div",LD,[p(t.$slots,"default")])]),_:3},8,["show","position","overlay","style"])])}}}),OD={class:"gismap-mobile-floatpanelbar-item-wrapper"},TD={class:"icon-wrapper"},PD={class:"text"},DD={class:"gismap-mobile-floatpanelbar-content"},ND=/* @__PURE__ */o({name:"GisMapMobileBarFloatPanelItem",props:{text:{type:String,default:""},iconName:{type:String,default:""},height:{type:[Number,String],default:150},anchors:{type:Array,default:()=>[150,Math.round(.4*window.innerHeight),Math.round(.8*window.innerHeight)]},visible:{type:Boolean,default:!1},contentDraggable:{type:Boolean,default:!1}},setup(e){const A=Gk,r=e,a=t(r.height);s(()=>r.height,e=>{a.value=e});const n=t(r.visible),i=()=>{n.value=!n.value};return(t,s)=>{const o=cc,l=HP;return c(),u("div",OD,[H((c(),u("div",{class:d(["gismap-mobile-floatpanelbar-item",{active:n.value}]),onClick:i},[h("div",TD,[P(o,{size:20},{default:D(()=>[(c(),k(V(w(aQ)(r.iconName))))]),_:1})]),h("div",PD,j(e.text),1)],2)),[[w(A)]]),s[1]||(s[1]=h("div",{class:"divider"},null,-1)),n.value?(c(),k(l,{key:0,height:a.value,"onUpdate:height":s[0]||(s[0]=e=>a.value=e),anchors:e.anchors,"safe-area-inset-bottom":!0,"content-draggable":e.contentDraggable,class:"gismap-mobile-floatpanelbar"},{default:D(()=>[h("div",DD,[p(t.$slots,"default")])]),_:3},8,["height","anchors","content-draggable"])):f("",!0)])}}}),KD={class:"gismap-mobile-layer-panel"},RD={class:"gismap-mobile-layer-panel-title"},GD={class:"gismap-mobile-layer-panel-content"},VD=/* @__PURE__ */o({name:"GisMapMobileLayerPanel",props:{title:{type:String,default:"资源"}},setup:e=>(t,A)=>(c(),u("div",KD,[h("div",RD,j(e.title),1),h("div",GD,[p(t.$slots,"default")])]))}),zD={class:"gismap-mobile-layer-box"},jD={key:0,class:"gismap-mobile-layer-box-title"},$D={class:"gismap-mobile-layer-box-content"},qD=/* @__PURE__ */vC(/* @__PURE__ */o({name:"GisMapMobileLayerBox",props:{title:{type:String||void 0,default:void 0}},setup:e=>(t,A)=>(c(),u("div",zD,[e.title?(c(),u("div",jD,j(e.title),1)):f("",!0),h("div",$D,[p(t.$slots,"default",{},void 0,!0)])]))}),[["__scopeId","data-v-b2e97b4f"]]),WD={class:"gismap-mobile-switch"},XD={class:"gismap-switch-layers"},JD=["onClick"],YD={class:"gismap-switch-item-text"},ZD={class:"style-list"},eN={class:"style-list-container"},tN={class:"gismap-switch-layers"},AN=["onClick"],rN={class:"gismap-switch-item-text"},aN=/* @__PURE__ */o({name:"GisMapMobileLayerSwitch",props:{data:{type:Object,default:()=>({layers:[],extensions:[]})},extensionsPosition:{type:String,default:"left"},gray:{type:Boolean,default:!1}},setup(e){const A=e,r=Gt(),{tdt:a,terrain:n,style:s}=Sv(),o=i(()=>r.value?.events),p=t([]),g=t(""),m=t(0),v=i(()=>{const e=p.value.findIndex(e=>e.checked),t=100/(p.value.length||1);return-1===e?{transform:"translateX(0px)",width:`${t}%`}:{transform:`translateX(${100*e}%)`,width:`${t}%`}}),y=e=>{if(g.value!==e.name){switch((e=>{switch(e){case"tdt-vec":a.value?.removeVecLayer();break;case"tdt-img":a.value?.removeImgLayer()}})(g.value),g.value=e.name,e.name){case"tdt-vec":a.value?.addVecLayer(e?.source||void 0,Qe.layerPolygonId);break;case"tdt-img":a.value?.addImgLayer(e?.source||void 0,Qe.layerPolygonId);break;default:o.value?.emit("switch:layer",e)}e.styles&&e.styles.length>0&&w(e),o.value?.emit("switch:widgets",e)}},w=e=>{p.value=e.styles||[],y(e),p.value.length>0&&(p.value[0].checked=!0,m.value=0)},B=(e,t)=>{"click"===e&&(t.checked=!t.checked);const A={checked:!!t.checked,data:t};switch(t.name){case"tdt-cia":t.checked?a.value?.addCiaLayer(t?.source||null,Qe.layerPointId):a.value?.removeCiaLayer();break;case"terrain":t.checked?n.value?.add(t?.config||{}):n.value?.remove();break;default:o.value?.emit("switch:click",A)}o.value?.emit("switch:click",A)};return l(()=>{A.data.layers.forEach(e=>{e.checked&&(y(e),g.value=e.name)}),A.data.extensions.forEach(e=>{e.checked&&B("check",e)})}),(t,A)=>{const r=sT;return c(),u("div",WD,[P(qD,null,{default:D(()=>[h("div",XD,[(c(!0),u(S,null,ne(e.data.layers,e=>(c(),u("div",{class:d(["gismap-switch-item",{active:g.value===e.name}]),key:e.name,onClick:t=>w(e)},[h("div",{class:d(["gismap-switch-item-image",e.iconName])},null,2),h("span",YD,j(e.label),1)],10,JD))),128))])]),_:1}),p.value&&p.value.length>0?(c(),k(qD,{key:0,title:"外观模式",class:"style-settings"},{default:D(()=>[h("div",ZD,[h("div",eN,[h("div",{class:"style-indicator",style:L(v.value)},null,4),(c(!0),u(S,null,ne(p.value,e=>(c(),u("div",{key:e.name,class:d(["style-item",{active:e.checked}])},[P(r,{type:"primary",round:"",plain:!e.checked,style:{width:"100%"},size:"small",class:d({default:!e.checked}),onClick:t=>((e,t)=>{e.forEach(e=>{e.checked=!1}),t.checked=!t.checked,m.value=e.findIndex(e=>e.name===t.name),s.value?.applyStyle(g.value,t?.name)})(p.value,e)},{default:D(()=>[z(j(e.label),1)]),_:2},1032,["plain","class","onClick"])],2))),128))])])]),_:1})):f("",!0),e.data.extensions&&e.data.extensions.length>0?(c(),k(qD,{key:1,title:"扩展地图"},{default:D(()=>[h("div",tN,[(c(!0),u(S,null,ne(e.data.extensions,e=>(c(),u("div",{class:d(["gismap-switch-item",{active:e.checked}]),key:e.name,onClick:t=>B("click",e)},[h("div",{class:d(["gismap-switch-item-image",e.iconName])},null,2),h("span",rN,j(e.label),1)],10,AN))),128))])]),_:1})):f("",!0)])}}}),nN={class:"gismap-mobile-search"},sN={class:"query-header"},iN={class:"query-search-wrapper"},oN={class:"query-tabs"},lN={key:0,class:"query-history"},cN=["onClick"],uN={class:"history-text"},dN={class:"query-result"},hN={key:0,class:"result-list"},pN=["onClick"],fN={class:"result-item-title"},gN={class:"result-marker"},mN=["innerHTML"],vN={class:"result-item-content"},yN={key:0,class:"result-item-content-row-label"},wN={class:"result-item-content-row-value"},BN=/* @__PURE__ */o({name:"GisMapMobileSearch",props:{data:{type:Array,default:()=>[]},tianditu:{type:Object,default:()=>({})}},setup(e,{expose:A}){const r=e,a=Gt(),n=t(/* @__PURE__ */new Map),i=t(""),o=t(""),p=t(""),g=t("请输入搜索内容"),m=t(""),v=t(),y=t([]),w=t(!1),B=t(""),b=t(!1),C=t(""),Q=t(!1),F=t([]),E=e=>{C.value=e;const t=n.value.get(e);t&&(g.value=t.placeholder||"请输入搜索内容",i.value=t.defaultValue||"",o.value=t.id||"",p.value=t.serviceUrl||"",m.value=t.templateId||"")},x=()=>{if(!i.value)return void(b.value=!1);if(v.value=a.value?.templateManager?.getTemplate(m.value),!v.value)return void iP("模板不存在");b.value=!0,w.value=!0,Q.value=!1,T(i.value);const e=n.value.get(C.value);if("tainditu"===e?.name)return void U();if(!p.value)return void(w.value=!1);const t=DL.getQuickSearchResult,A=JSON.stringify({key:`%${i.value}%`});t(p.value,A).then(e=>{const t=e.data?.features||[];y.value=t.map((e,t)=>({...e,index:t+1,uuid:Tv(),templateId:m.value||""})),w.value=!1})},U=()=>{const e={type:"query",tk:a.value?.tdtToken||"",postStr:JSON.stringify(Object.assign({},{specify:"156321000",queryType:"12",start:"0",count:"10",dataTypes:"",show:"2"},r.tianditu,{keyWord:`%${i.value}%`}))};DL.getTiandituSearch(p.value,e).then(e=>{if(w.value=!1,1e3===e?.status?.infocode){const t=e?.pois||[];y.value=t.map((e,t)=>({...e,index:t+1,uuid:Tv()}));const A=y.value.map(e=>({id:e.uuid,index:e.index,lngLat:e.lonlat.split(",").map(Number),properties:e,templateId:m.value||""}));M(A)}else iP(e?.status?.cndesc||"搜索失败")})},M=e=>{a.value?.markerManager?.clear(),a.value?.markerManager?.addMarkers(e),a.value?.markerManager?.setOnMarkerClick(e=>{B.value=e.id,a.value?.markerManager?.flyTo(e.id,15,!0)}),e.length>0&&setTimeout(()=>{const t=e[0].id;B.value=t,a.value?.markerManager?.flyTo(t,15,!1)},1e3)},_=()=>{b.value=!1,y.value=[],i.value="",a.value?.markerManager?.clear(),a.value?.events.emit("layer:removePopup",{})},I=(e,t)=>Pv(e[t.fieldName]||"",t),L=()=>{if(0===r.data.length)return;n.value.clear(),r.data.forEach(e=>{n.value.set(e.name,e)});const e=r.data[0];e&&(C.value=e.name,g.value=e.placeholder||"请输入搜索内容",i.value=e.defaultValue||"",o.value=e.id||"",p.value=e.serviceUrl||"",m.value=e.templateId||"")},O=()=>{const e=localStorage.getItem("gismap_search_history");if(e)try{F.value=JSON.parse(e)}catch(t){F.value=[]}},T=e=>{if(!e.trim())return;const t=F.value.indexOf(e);t>-1&&F.value.splice(t,1),F.value.unshift(e),F.value.length>10&&(F.value=F.value.slice(0,10)),localStorage.setItem("gismap_search_history",JSON.stringify(F.value))};return l(()=>{Ft.templates.forEach(e=>{a.value?.templateManager?.addTemplate(e.id,e)}),L(),O()}),s(()=>r.data,()=>{L()}),A({searchText:i,activeTab:C,showResults:b,resultList:y,selectUUID:B,showHistory:Q,historyList:F,loadHistory:O,saveHistory:T,clearHistory:()=>{F.value=[],localStorage.removeItem("gismap_search_history"),Q.value=!1}}),(e,t)=>{const A=WP,n=QP,s=fP,o=YO,l=vP,p=kP,m=rT;return c(),u("div",nN,[h("div",sN,[h("div",iN,[P(A,{modelValue:i.value,"onUpdate:modelValue":t[0]||(t[0]=e=>i.value=e),placeholder:g.value,shape:"round",background:"transparent",onSearch:x,onCancel:_},null,8,["modelValue","placeholder"])]),h("div",oN,[P(s,{modelValue:C.value,"onUpdate:modelValue":t[1]||(t[1]=e=>C.value=e),direction:"horizontal",onChange:E},{default:D(()=>[(c(!0),u(S,null,ne(r.data,e=>(c(),k(n,{key:e.id,name:e.name,value:e.name},{default:D(()=>[z(j(e.label),1)]),_:2},1032,["name","value"]))),128))]),_:1},8,["modelValue"])]),F.value.length>0?(c(),u("div",lN,[(c(!0),u(S,null,ne(F.value,(e,t)=>(c(),u("span",{key:t,class:"history-item",onClick:t=>{return A=e,i.value=A,Q.value=!1,void x();var A}},[P(o,{name:"clock-o",size:"16"}),h("span",uN,j(e),1)],8,cN))),128))])):f("",!0)]),H(h("div",dN,[y.value.length>0?(c(),u("div",hN,[(c(!0),u(S,null,ne(y.value,e=>{return c(),u("div",{key:e.uuid,class:d(["result-item",{active:e.uuid===B.value}]),onClick:t=>(e=>{e.uuid&&(B.value=e.uuid,a.value?.markerManager?.flyTo(e.uuid,15,!0))})(e)},[h("div",fN,[h("span",gN,j(e.index),1),h("span",{class:"result-value",innerHTML:(t=e,((v.value?.header||"").match(/\{[^}]+\}/g)||[]).map(e=>{const A=e.replace(/[{}]/g,"").split(".").pop()||"";return t[A]||""}).join(" "))},null,8,mN)]),h("div",vN,[(c(!0),u(S,null,ne(v.value?.body||[],t=>(c(),u("div",{class:"result-item-content-row",key:t.fieldName},[t.fieldLabel?(c(),u("div",yN,j(t.fieldLabel)+": ",1)):f("",!0),h("div",wN,["tag"===t.fieldType?(c(!0),u(S,{key:0},ne(I(e,t),e=>(c(),k(l,{type:"primary",key:e},{default:D(()=>[z(j(e),1)]),_:2},1024))),128)):(c(),u(S,{key:1},[z(j(I(e,t)),1)],64))])]))),128))])],10,pN);var t}),128))])):!w.value&&b.value?(c(),k(p,{key:1,description:"未找到相关结果"})):f("",!0),w.value?(c(),k(m,{key:2,class:"loading-wrapper",size:"24px"},{default:D(()=>[...t[2]||(t[2]=[z("搜索中...",-1)])]),_:1})):f("",!0)],512),[[W,b.value]])])}}}),bN=["innerHTML"],CN={class:"gismap-mobile-query-header"},QN={class:"gismap-mobile-header-left",style:{"margin-right":"5px"}},FN=["innerHTML"],EN={class:"gismap-mobile-query-body"},xN={class:"gismap-mobile-query-value"},UN=/* @__PURE__ */o({name:"GisMapMobileQueryPopup",props:{downloadUrl:{type:Function||void 0,default:void 0},height:{type:[Number,String],default:200},anchors:{type:Array,default:()=>[200,Math.round(.4*window.innerHeight),Math.round(.8*window.innerHeight)]}},setup(A){const r=A,a=t(r.height),s=t(!1),i=t(void 0),o=t({}),d=Gt(),p=t(),f=t(""),g=t(void 0),m=new e.Popup({closeOnClick:!1,closeOnMove:!1,className:"gismap-mobile-popup",anchor:"bottom"}),v=()=>{let e=p.value?.header||"查询结果";return e=e.replace(/{p\.(\w+)}/g,(e,t)=>o.value[t]||""),e},y=e=>Pv(o.value[e.fieldName],e),B=e=>{if(!r?.downloadUrl)return[];const t=JSON.parse(o.value[e.fieldName]||"[]"),A=[];return t.forEach(e=>{const t=r?.downloadUrl?.(e)||"";A.push(t)}),A},b=()=>{s.value=!1};return l(()=>{i.value&&(m.setDOMContent(i?.value),d.value?.events.on("layer:smallPopupClick",e=>{if(!e.center)return;g.value=e;let t=e?.properties||e?.feature?.properties||{};o.value=t,e.templateId?(m.remove(),d.value?.templateManager&&d.value?.templateManager.hasTemplate(e.templateId)&&(p.value=d.value.templateManager.getTemplate(e.templateId),s.value=(p?.value?.body?.filter(e=>e.isShowMore)?.length||0)>0)):e.data?.tooltipContent&&(s.value=!1,f.value=e.data.tooltipContent,m.setLngLat(e.center),m.setOffset(e.offset||[0,0]),m.addTo(d.value?.adapter.getMap()))}),d.value?.events.on("layer:removePopup",()=>{m.remove()}),d.value?.events.on("clear",()=>{s.value=!1,m.remove()}))}),n(()=>{d.value?.events.off("layer:smallPopupClick"),d.value?.events.off("layer:removePopup"),d.value?.events.off("layer:showPopup")}),(e,t)=>{const r=cc,n=YO,o=vP,l=HP;return c(),u(S,null,[h("div",{class:"gismap-mobile-query-popup",ref_key:"popupRef",ref:i},[h("span",{innerHTML:f.value},null,8,bN)],512),H(P(l,{height:a.value,"onUpdate:height":t[0]||(t[0]=e=>a.value=e),anchors:A.anchors,"safe-area-inset-bottom":!0,"content-draggable":!1,class:"gismap-mobile-query"},{header:D(()=>[h("div",CN,[h("span",QN,[P(r,{color:"#409EFF",size:20},{default:D(()=>[P(w(Vl))]),_:1})]),h("span",{class:"gismap-mobile-header-left",innerHTML:v()},null,8,FN),h("span",{class:"gismap-mobile-close",onClick:b},[P(n,{name:"cross"})])])]),default:D(()=>[h("div",EN,[P(w(Np),null,{default:D(()=>[(c(!0),u(S,null,ne(p.value?.body?.filter(e=>e.isShowMore)||[],e=>(c(),k(w(Kp),{span:24,class:"gismap-mobile-query-item"},{default:D(()=>[h("div",{class:"gismap-mobile-query-label",style:L({width:p.value?.labelWidth+"px"||"90px"})},j(e.fieldLabel)+":",5),h("div",xN,["image"===e.fieldType?(c(),k(JP,{key:0,data:B(e)},null,8,["data"])):"tag"===e.fieldType?(c(!0),u(S,{key:1},ne(y(e),e=>(c(),k(o,{type:"primary",key:e,size:"medium"},{default:D(()=>[z(j(e),1)]),_:2},1024))),128)):(c(),u(S,{key:2},[z(j(y(e))+" "+j(e.unit),1)],64))])]),_:2},1024))),256))]),_:1})])]),_:1},8,["height","anchors"]),[[W,s.value]])],64)}}}),MN={class:"gismap-mobile-layer"},SN={key:0,class:"layer-search"},kN={class:"layer-tree"},_N={key:0,class:"layer-group"},IN=["onClick"],LN={class:"layer-group-info"},HN=["src"],ON={class:"layer-label"},TN={key:0,class:"layer-group-children"},PN={class:"layer-child-info"},DN=["src"],NN={class:"layer-label"},KN={key:1,class:"layer-single-item"},RN={class:"layer-single-info"},GN=["src"],VN={class:"layer-label"},zN=/* @__PURE__ */o({name:"GisMapMobileLayer",props:{title:{type:String,default:"未命名"},data:{type:Array,default:()=>[]},showSearch:{type:Boolean,default:!0}},emits:["close","layer-toggle"],setup(e,{emit:A}){const r=e,a=A,{layer:n}=Sv(),o=t(""),p=t([]),g=t([]),m=i(()=>{if(!o.value)return g.value;const e=[],t=/* @__PURE__ */new Set,A=r=>{for(const a of r){if(a.title.includes(o.value))if(a.children&&a.children.length>0)e.includes(a)||e.push(a);else{const A=v(g.value,a);A?t.has(A)||(t.add(A),e.push(A)):e.includes(a)||e.push(a)}a.children&&a.children.length>0&&A(a.children)}};return A(g.value),e}),v=(e,t,A=null)=>{for(const r of e){if(r===t)return A;if(r.children&&r.children.length>0){const e=v(r.children,t,r);if(null!==e)return e}}return null},y=e=>{e.checked?e.layers&&e.layers.length>0?n.value?.addGroupLayer(e):n.value?.addLayer(e):e.layers&&e.layers.length>0?n.value?.removeGroupLayer(e):n.value?.removeLayer(e.id),a("layer-toggle",e)},w=e=>e?.icon?`assets/icons/${e.icon}`:e?.children&&e?.children.length>0?"assets/icons/layer_group.png":e?.query||e?.isQuery?"assets/icons/layer_query.png":"assets/icons/layer_default.png",B=()=>{(e=>{g.value=JSON.parse(JSON.stringify(e));const t=[];Ov(g.value,e=>{e.sourceInit&&e.source&&n.value?.addSource(e.source),e.expand&&t.push(e.id),e.checked&&(e.layers&&e.layers.length>0?n.value?.addGroupLayer(e):n.value?.addLayer(e))}),p.value=t})(r.data)};return s(()=>r.data,()=>{B()},{deep:!0}),l(()=>{B()}),(t,A)=>{const r=WP,a=YO,n=cP,s=kP;return c(),u("div",MN,[e.showSearch?(c(),u("div",SN,[P(r,{modelValue:o.value,"onUpdate:modelValue":A[0]||(A[0]=e=>o.value=e),placeholder:"搜索图层",shape:"round"},null,8,["modelValue"])])):f("",!0),h("div",kN,[(c(!0),u(S,null,ne(m.value,e=>(c(),u("div",{key:e.id,class:"layer-item"},[e.children&&e.children.length>0?(c(),u("div",_N,[h("div",{class:"layer-group-header",onClick:t=>(e=>{const t=p.value.indexOf(e);t>-1?p.value.splice(t,1):p.value.push(e)})(e.id)},[h("div",LN,[h("img",{src:w(e),class:"layer-icon"},null,8,HN),h("span",ON,j(e.title)+"("+j(e.children.length)+")",1)]),h("div",{class:d(["arrow-icon",{rotated:p.value.includes(e.id)}])},[P(a,{name:"arrow-down",size:"14"})],2)],8,IN),p.value.includes(e.id)?(c(),u("div",TN,[(c(!0),u(S,null,ne(e.children,e=>(c(),u("div",{key:e.id,class:"layer-child-item"},[h("div",PN,[h("img",{src:w(e),class:"layer-icon"},null,8,DN),h("span",NN,j(e.title),1)]),P(n,{modelValue:e.checked,"onUpdate:modelValue":t=>e.checked=t,onChange:t=>y(e),size:"14"},null,8,["modelValue","onUpdate:modelValue","onChange"])]))),128))])):f("",!0)])):(c(),u("div",KN,[h("div",RN,[h("img",{src:w(e),class:"layer-icon"},null,8,GN),h("span",VN,j(e.title),1)]),P(n,{modelValue:e.checked,"onUpdate:modelValue":t=>e.checked=t,onChange:t=>y(e),size:"14"},null,8,["modelValue","onUpdate:modelValue","onChange"])]))]))),128)),0===m.value.length?(c(),k(s,{key:0,description:"未找到图层"})):f("",!0)])])}}});export{yt as API_CONFIG,pt as BasePlugin,mt as EventBus,mH as GisMapCompareFrame,lH as GisMapCompareSplit,vH as GisMapCompass,tA as GisMapContainer,xC as GisMapLayer,HC as GisMapLegend,MD as GisMapMeasure,ND as GisMapMobileBarFloatPanelItem,SD as GisMapMobileBarGroup,HD as GisMapMobileBarPopupItem,qD as GisMapMobileLayerBox,VD as GisMapMobileLayerPanel,aN as GisMapMobileLayerSwitch,zN as GisMapMobileMapLayer,UN as GisMapMobileMapQuery,BN as GisMapMobileMapSearch,yH as GisMapPopupBar,QH as GisMapPopupBarItem,pD as GisMapQueryPopup,nD as GisMapQueryResult,AH as GisMapSearch,h_ as GisMapSwitch,Wk as GisMapTools,ze as IconManager,xe as LayerManager,dt as ManagerRegistry,rt as MapContext,Nt as MapContextKey,Kt as MapStateKey,vt as MarkerLayer,At as MarkerManager,gt as PluginManager,ht as PluginRegistry,Ue as QueryLayerManager,Ve as RadarManager,it as StateStore,qe as StyleManager,ot as TimeTravelStateStore,at as TypedEventEmitter,Et as configManager,nt as createEventEmitter,ft as createPluginRegistry,lt as createStateStore,ct as createTimeTravelStore,Qt as getConfig,wt as getEndpoint,Bt as getFullUrl,Wt as installMapPlugin,qt as provideMap,bt as setBaseURL,Ct as setEndpoint,xt as useConfig,Sv as useControl,kv as useDraw,gv as useLayer,vv as useLayerGroup,yv as useLayerManager,mv as useLayers,Gt as useMap,jt as useMapEvent,$t as useMapReady,Vt as useMapState,wv as useMarker,bv as useMarkerManager,Bv as useMarkers,zt as useViewState};
|
|
12
|
+
/* @__PURE__ */function(){return function(e,t){this.context=e,this.options=t}}(),Uk=function(e){function t(t,A){var r=e.call(this,t,A)||this;return r._activeEffects=[],r.canvas=A.canvas?A.canvas:document.createElement("canvas"),r.ctx=r.canvas.getContext("2d"),A.canvas||(r.canvas.width=Math.floor(A.width*A.scale),r.canvas.height=Math.floor(A.height*A.scale),r.canvas.style.width=A.width+"px",r.canvas.style.height=A.height+"px"),r.fontMetrics=new Ek(document),r.ctx.scale(r.options.scale,r.options.scale),r.ctx.translate(-A.x,-A.y),r.ctx.textBaseline="bottom",r._activeEffects=[],r.context.logger.debug("Canvas renderer initialized ("+A.width+"x"+A.height+") with scale "+A.scale),r}return iQ(t,e),t.prototype.applyEffects=function(e){for(var t=this;this._activeEffects.length;)this.popEffect();e.forEach(function(e){return t.applyEffect(e)})},t.prototype.applyEffect=function(e){this.ctx.save(),function(e){return 2===e.type}(e)&&(this.ctx.globalAlpha=e.opacity),function(e){return 0===e.type}(e)&&(this.ctx.translate(e.offsetX,e.offsetY),this.ctx.transform(e.matrix[0],e.matrix[1],e.matrix[2],e.matrix[3],e.matrix[4],e.matrix[5]),this.ctx.translate(-e.offsetX,-e.offsetY)),ok(e)&&(this.path(e.path),this.ctx.clip()),this._activeEffects.push(e)},t.prototype.popEffect=function(){this._activeEffects.pop(),this.ctx.restore()},t.prototype.renderStack=function(e){return lQ(this,0,void 0,function(){return cQ(this,function(t){switch(t.label){case 0:return e.element.container.styles.isVisible()?[4,this.renderStackContent(e)]:[3,2];case 1:t.sent(),t.label=2;case 2:return[2]}})})},t.prototype.renderNode=function(e){return lQ(this,0,void 0,function(){return cQ(this,function(t){switch(t.label){case 0:return FU(e.container.flags,16),e.container.styles.isVisible()?[4,this.renderNodeBackgroundAndBorders(e)]:[3,3];case 1:return t.sent(),[4,this.renderNodeContent(e)];case 2:t.sent(),t.label=3;case 3:return[2]}})})},t.prototype.renderTextWithLetterSpacing=function(e,t,A){var r=this;0===t?this.ctx.fillText(e.text,e.bounds.left,e.bounds.top+A):fM(e.text).reduce(function(t,a){return r.ctx.fillText(a,t,e.bounds.top+A),t+r.ctx.measureText(a).width},e.bounds.left)},t.prototype.createFontStyle=function(e){var t=e.fontVariant.filter(function(e){return"normal"===e||"small-caps"===e}).join(""),A=Ik(e.fontFamily).join(", "),r=AE(e.fontSize)?""+e.fontSize.number+e.fontSize.unit:e.fontSize.number+"px";return[[e.fontStyle,t,e.fontWeight,r,A].join(" "),A,r]},t.prototype.renderTextNode=function(e,t){return lQ(this,0,void 0,function(){var A,r,a,n,s,i,o,l,c=this;return cQ(this,function(u){return A=this.createFontStyle(t),r=A[0],a=A[1],n=A[2],this.ctx.font=r,this.ctx.direction=1===t.direction?"rtl":"ltr",this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic",s=this.fontMetrics.getMetrics(a,n),i=s.baseline,o=s.middle,l=t.paintOrder,e.textBounds.forEach(function(e){l.forEach(function(A){switch(A){case 0:c.ctx.fillStyle=xE(t.color),c.renderTextWithLetterSpacing(e,t.letterSpacing,i);var r=t.textShadow;r.length&&e.text.trim().length&&(r.slice(0).reverse().forEach(function(A){c.ctx.shadowColor=xE(A.color),c.ctx.shadowOffsetX=A.offsetX.number*c.options.scale,c.ctx.shadowOffsetY=A.offsetY.number*c.options.scale,c.ctx.shadowBlur=A.blur.number,c.renderTextWithLetterSpacing(e,t.letterSpacing,i)}),c.ctx.shadowColor="",c.ctx.shadowOffsetX=0,c.ctx.shadowOffsetY=0,c.ctx.shadowBlur=0),t.textDecorationLine.length&&(c.ctx.fillStyle=xE(t.textDecorationColor||t.color),t.textDecorationLine.forEach(function(t){switch(t){case 1:c.ctx.fillRect(e.bounds.left,Math.round(e.bounds.top+i),e.bounds.width,1);break;case 2:c.ctx.fillRect(e.bounds.left,Math.round(e.bounds.top),e.bounds.width,1);break;case 3:c.ctx.fillRect(e.bounds.left,Math.ceil(e.bounds.top+o),e.bounds.width,1)}}));break;case 1:t.webkitTextStrokeWidth&&e.text.trim().length&&(c.ctx.strokeStyle=xE(t.webkitTextStrokeColor),c.ctx.lineWidth=t.webkitTextStrokeWidth,c.ctx.lineJoin=window.chrome?"miter":"round",c.ctx.strokeText(e.text,e.bounds.left,e.bounds.top+i)),c.ctx.strokeStyle="",c.ctx.lineWidth=0,c.ctx.lineJoin="miter"}})}),[2]})})},t.prototype.renderReplacedElement=function(e,t,A){if(A&&e.intrinsicWidth>0&&e.intrinsicHeight>0){var r=vk(e),a=ak(t);this.path(a),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(A,0,0,e.intrinsicWidth,e.intrinsicHeight,r.left,r.top,r.width,r.height),this.ctx.restore()}},t.prototype.renderNodeContent=function(e){return lQ(this,0,void 0,function(){var A,r,a,n,s,i,o,l,c,u,d,h,p,f,g,m,v,y;return cQ(this,function(w){switch(w.label){case 0:this.applyEffects(e.getEffects(4)),A=e.container,r=e.curves,a=A.styles,n=0,s=A.textNodes,w.label=1;case 1:return n<s.length?(i=s[n],[4,this.renderTextNode(i,a)]):[3,4];case 2:w.sent(),w.label=3;case 3:return n++,[3,1];case 4:if(!(A instanceof CM))return[3,8];w.label=5;case 5:return w.trys.push([5,7,,8]),[4,this.context.cache.match(A.src)];case 6:return g=w.sent(),this.renderReplacedElement(A,r,g),[3,8];case 7:return w.sent(),this.context.logger.error("Error loading image "+A.src),[3,8];case 8:if(A instanceof QM&&this.renderReplacedElement(A,r,A.canvas),!(A instanceof FM))return[3,12];w.label=9;case 9:return w.trys.push([9,11,,12]),[4,this.context.cache.match(A.svg)];case 10:return g=w.sent(),this.renderReplacedElement(A,r,g),[3,12];case 11:return w.sent(),this.context.logger.error("Error loading svg "+A.svg.substring(0,255)),[3,12];case 12:return A instanceof TM&&A.tree?[4,new t(this.context,{scale:this.options.scale,backgroundColor:A.backgroundColor,x:0,y:0,width:A.width,height:A.height}).render(A.tree)]:[3,14];case 13:o=w.sent(),A.width&&A.height&&this.ctx.drawImage(o,0,0,A.width,A.height,A.bounds.left,A.bounds.top,A.bounds.width,A.bounds.height),w.label=14;case 14:if(A instanceof LM&&(l=Math.min(A.bounds.width,A.bounds.height),A.type===SM?A.checked&&(this.ctx.save(),this.path([new JS(A.bounds.left+.39363*l,A.bounds.top+.79*l),new JS(A.bounds.left+.16*l,A.bounds.top+.5549*l),new JS(A.bounds.left+.27347*l,A.bounds.top+.44071*l),new JS(A.bounds.left+.39694*l,A.bounds.top+.5649*l),new JS(A.bounds.left+.72983*l,A.bounds.top+.23*l),new JS(A.bounds.left+.84*l,A.bounds.top+.34085*l),new JS(A.bounds.left+.39363*l,A.bounds.top+.79*l)]),this.ctx.fillStyle=xE(IM),this.ctx.fill(),this.ctx.restore()):A.type===kM&&A.checked&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(A.bounds.left+l/2,A.bounds.top+l/2,l/4,0,2*Math.PI,!0),this.ctx.fillStyle=xE(IM),this.ctx.fill(),this.ctx.restore())),Mk(A)&&A.value.length){switch(c=this.createFontStyle(a),v=c[0],u=c[1],d=this.fontMetrics.getMetrics(v,u).baseline,this.ctx.font=v,this.ctx.fillStyle=xE(a.color),this.ctx.textBaseline="alphabetic",this.ctx.textAlign=kk(A.styles.textAlign),y=vk(A),h=0,A.styles.textAlign){case 1:h+=y.width/2;break;case 2:h+=y.width}p=y.add(h,0,0,-y.height/2+1),this.ctx.save(),this.path([new JS(y.left,y.top),new JS(y.left+y.width,y.top),new JS(y.left+y.width,y.top+y.height),new JS(y.left,y.top+y.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new dM(A.value,p),a.letterSpacing,d),this.ctx.restore(),this.ctx.textBaseline="alphabetic",this.ctx.textAlign="left"}if(!FU(A.styles.display,2048))return[3,20];if(null===A.styles.listStyleImage)return[3,19];if(0!==(f=A.styles.listStyleImage).type)return[3,18];g=void 0,m=f.url,w.label=15;case 15:return w.trys.push([15,17,,18]),[4,this.context.cache.match(m)];case 16:return g=w.sent(),this.ctx.drawImage(g,A.bounds.left-(g.width+10),A.bounds.top),[3,18];case 17:return w.sent(),this.context.logger.error("Error loading list-style-image "+m),[3,18];case 18:return[3,20];case 19:e.listValue&&-1!==A.styles.listStyleType&&(v=this.createFontStyle(a)[0],this.ctx.font=v,this.ctx.fillStyle=xE(a.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",y=new uQ(A.bounds.left,A.bounds.top+vE(A.styles.paddingTop,A.bounds.width),A.bounds.width,Rx(a.lineHeight,a.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new dM(e.listValue,y),a.letterSpacing,Rx(a.lineHeight,a.fontSize.number)/2+2),this.ctx.textBaseline="bottom",this.ctx.textAlign="left"),w.label=20;case 20:return[2]}})})},t.prototype.renderStackContent=function(e){return lQ(this,0,void 0,function(){var t,A,r,a,n,s,i,o,l,c,u,d,h,p,f;return cQ(this,function(g){switch(g.label){case 0:return FU(e.element.container.flags,16),[4,this.renderNodeBackgroundAndBorders(e.element)];case 1:g.sent(),t=0,A=e.negativeZIndex,g.label=2;case 2:return t<A.length?(f=A[t],[4,this.renderStack(f)]):[3,5];case 3:g.sent(),g.label=4;case 4:return t++,[3,2];case 5:return[4,this.renderNodeContent(e.element)];case 6:g.sent(),r=0,a=e.nonInlineLevel,g.label=7;case 7:return r<a.length?(f=a[r],[4,this.renderNode(f)]):[3,10];case 8:g.sent(),g.label=9;case 9:return r++,[3,7];case 10:n=0,s=e.nonPositionedFloats,g.label=11;case 11:return n<s.length?(f=s[n],[4,this.renderStack(f)]):[3,14];case 12:g.sent(),g.label=13;case 13:return n++,[3,11];case 14:i=0,o=e.nonPositionedInlineLevel,g.label=15;case 15:return i<o.length?(f=o[i],[4,this.renderStack(f)]):[3,18];case 16:g.sent(),g.label=17;case 17:return i++,[3,15];case 18:l=0,c=e.inlineLevel,g.label=19;case 19:return l<c.length?(f=c[l],[4,this.renderNode(f)]):[3,22];case 20:g.sent(),g.label=21;case 21:return l++,[3,19];case 22:u=0,d=e.zeroOrAutoZIndexOrTransformedOrOpacity,g.label=23;case 23:return u<d.length?(f=d[u],[4,this.renderStack(f)]):[3,26];case 24:g.sent(),g.label=25;case 25:return u++,[3,23];case 26:h=0,p=e.positiveZIndex,g.label=27;case 27:return h<p.length?(f=p[h],[4,this.renderStack(f)]):[3,30];case 28:g.sent(),g.label=29;case 29:return h++,[3,27];case 30:return[2]}})})},t.prototype.mask=function(e){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(e.slice(0).reverse()),this.ctx.closePath()},t.prototype.path=function(e){this.ctx.beginPath(),this.formatPath(e),this.ctx.closePath()},t.prototype.formatPath=function(e){var t=this;e.forEach(function(e,A){var r=ek(e)?e.start:e;0===A?t.ctx.moveTo(r.x,r.y):t.ctx.lineTo(r.x,r.y),ek(e)&&t.ctx.bezierCurveTo(e.startControl.x,e.startControl.y,e.endControl.x,e.endControl.y,e.end.x,e.end.y)})},t.prototype.renderRepeat=function(e,t,A,r){this.path(e),this.ctx.fillStyle=t,this.ctx.translate(A,r),this.ctx.fill(),this.ctx.translate(-A,-r)},t.prototype.resizeImage=function(e,t,A){var r;if(e.width===t&&e.height===A)return e;var a=(null!==(r=this.canvas.ownerDocument)&&void 0!==r?r:document).createElement("canvas");return a.width=Math.max(1,t),a.height=Math.max(1,A),a.getContext("2d").drawImage(e,0,0,e.width,e.height,0,0,t,A),a},t.prototype.renderBackgroundImage=function(e){return lQ(this,0,void 0,function(){var t,A,r,a,n,s;return cQ(this,function(i){switch(i.label){case 0:t=e.styles.backgroundImage.length-1,A=function(A){var a,n,s,i,o,l,c,u,d,h,p,f,g,m,v,y,w,B,b,C,Q,F,E,x,U,M,S,k,_,I,L;return cQ(this,function(H){switch(H.label){case 0:if(0!==A.type)return[3,5];a=void 0,n=A.url,H.label=1;case 1:return H.trys.push([1,3,,4]),[4,r.context.cache.match(n)];case 2:return a=H.sent(),[3,4];case 3:return H.sent(),r.context.logger.error("Error loading background-image "+n),[3,4];case 4:return a&&(s=yk(e,t,[a.width,a.height,a.width/a.height]),y=s[0],F=s[1],E=s[2],b=s[3],C=s[4],m=r.ctx.createPattern(r.resizeImage(a,b,C),"repeat"),r.renderRepeat(y,m,F,E)),[3,6];case 5:1===A.type?(i=yk(e,t,[null,null,null]),y=i[0],F=i[1],E=i[2],b=i[3],C=i[4],o=NE(A.angle,b,C),l=o[0],c=o[1],u=o[2],d=o[3],h=o[4],(p=document.createElement("canvas")).width=b,p.height=C,f=p.getContext("2d"),g=f.createLinearGradient(c,d,u,h),DE(A.stops,l).forEach(function(e){return g.addColorStop(e.stop,xE(e.color))}),f.fillStyle=g,f.fillRect(0,0,b,C),b>0&&C>0&&(m=r.ctx.createPattern(p,"repeat"),r.renderRepeat(y,m,F,E))):function(e){return 2===e.type}(A)&&(v=yk(e,t,[null,null,null]),y=v[0],w=v[1],B=v[2],b=v[3],C=v[4],Q=0===A.position.length?[fE]:A.position,F=vE(Q[0],b),E=vE(Q[Q.length-1],C),x=function(e,t,A,r,a){var n=0,s=0;switch(e.size){case 0:0===e.shape?n=s=Math.min(Math.abs(t),Math.abs(t-r),Math.abs(A),Math.abs(A-a)):1===e.shape&&(n=Math.min(Math.abs(t),Math.abs(t-r)),s=Math.min(Math.abs(A),Math.abs(A-a)));break;case 2:if(0===e.shape)n=s=Math.min(KE(t,A),KE(t,A-a),KE(t-r,A),KE(t-r,A-a));else if(1===e.shape){var i=Math.min(Math.abs(A),Math.abs(A-a))/Math.min(Math.abs(t),Math.abs(t-r)),o=RE(r,a,t,A,!0),l=o[0],c=o[1];s=i*(n=KE(l-t,(c-A)/i))}break;case 1:0===e.shape?n=s=Math.max(Math.abs(t),Math.abs(t-r),Math.abs(A),Math.abs(A-a)):1===e.shape&&(n=Math.max(Math.abs(t),Math.abs(t-r)),s=Math.max(Math.abs(A),Math.abs(A-a)));break;case 3:if(0===e.shape)n=s=Math.max(KE(t,A),KE(t,A-a),KE(t-r,A),KE(t-r,A-a));else if(1===e.shape){i=Math.max(Math.abs(A),Math.abs(A-a))/Math.max(Math.abs(t),Math.abs(t-r));var u=RE(r,a,t,A,!1);l=u[0],c=u[1],s=i*(n=KE(l-t,(c-A)/i))}}return Array.isArray(e.size)&&(n=vE(e.size[0],r),s=2===e.size.length?vE(e.size[1],a):n),[n,s]}(A,F,E,b,C),U=x[0],M=x[1],U>0&&M>0&&(S=r.ctx.createRadialGradient(w+F,B+E,0,w+F,B+E,U),DE(A.stops,2*U).forEach(function(e){return S.addColorStop(e.stop,xE(e.color))}),r.path(y),r.ctx.fillStyle=S,U!==M?(k=e.bounds.left+.5*e.bounds.width,_=e.bounds.top+.5*e.bounds.height,L=1/(I=M/U),r.ctx.save(),r.ctx.translate(k,_),r.ctx.transform(1,0,0,I,0,0),r.ctx.translate(-k,-_),r.ctx.fillRect(w,L*(B-_)+_,b,C*L),r.ctx.restore()):r.ctx.fill())),H.label=6;case 6:return t--,[2]}})},r=this,a=0,n=e.styles.backgroundImage.slice(0).reverse(),i.label=1;case 1:return a<n.length?(s=n[a],[5,A(s)]):[3,4];case 2:i.sent(),i.label=3;case 3:return a++,[3,1];case 4:return[2]}})})},t.prototype.renderSolidBorder=function(e,t,A){return lQ(this,0,void 0,function(){return cQ(this,function(r){return this.path(pk(A,t)),this.ctx.fillStyle=xE(e),this.ctx.fill(),[2]})})},t.prototype.renderDoubleBorder=function(e,t,A,r){return lQ(this,0,void 0,function(){var a,n;return cQ(this,function(s){switch(s.label){case 0:return t<3?[4,this.renderSolidBorder(e,A,r)]:[3,2];case 1:return s.sent(),[2];case 2:return a=function(e,t){switch(t){case 0:return gk(e.topLeftBorderBox,e.topLeftBorderDoubleOuterBox,e.topRightBorderBox,e.topRightBorderDoubleOuterBox);case 1:return gk(e.topRightBorderBox,e.topRightBorderDoubleOuterBox,e.bottomRightBorderBox,e.bottomRightBorderDoubleOuterBox);case 2:return gk(e.bottomRightBorderBox,e.bottomRightBorderDoubleOuterBox,e.bottomLeftBorderBox,e.bottomLeftBorderDoubleOuterBox);default:return gk(e.bottomLeftBorderBox,e.bottomLeftBorderDoubleOuterBox,e.topLeftBorderBox,e.topLeftBorderDoubleOuterBox)}}(r,A),this.path(a),this.ctx.fillStyle=xE(e),this.ctx.fill(),n=function(e,t){switch(t){case 0:return gk(e.topLeftBorderDoubleInnerBox,e.topLeftPaddingBox,e.topRightBorderDoubleInnerBox,e.topRightPaddingBox);case 1:return gk(e.topRightBorderDoubleInnerBox,e.topRightPaddingBox,e.bottomRightBorderDoubleInnerBox,e.bottomRightPaddingBox);case 2:return gk(e.bottomRightBorderDoubleInnerBox,e.bottomRightPaddingBox,e.bottomLeftBorderDoubleInnerBox,e.bottomLeftPaddingBox);default:return gk(e.bottomLeftBorderDoubleInnerBox,e.bottomLeftPaddingBox,e.topLeftBorderDoubleInnerBox,e.topLeftPaddingBox)}}(r,A),this.path(n),this.ctx.fill(),[2]}})})},t.prototype.renderNodeBackgroundAndBorders=function(e){return lQ(this,0,void 0,function(){var t,A,r,a,n,s,i,o,l=this;return cQ(this,function(c){switch(c.label){case 0:return this.applyEffects(e.getEffects(2)),t=e.container.styles,A=!EE(t.backgroundColor)||t.backgroundImage.length,r=[{style:t.borderTopStyle,color:t.borderTopColor,width:t.borderTopWidth},{style:t.borderRightStyle,color:t.borderRightColor,width:t.borderRightWidth},{style:t.borderBottomStyle,color:t.borderBottomColor,width:t.borderBottomWidth},{style:t.borderLeftStyle,color:t.borderLeftColor,width:t.borderLeftWidth}],a=Sk(Ck(t.backgroundClip,0),e.curves),A||t.boxShadow.length?(this.ctx.save(),this.path(a),this.ctx.clip(),EE(t.backgroundColor)||(this.ctx.fillStyle=xE(t.backgroundColor),this.ctx.fill()),[4,this.renderBackgroundImage(e.container)]):[3,2];case 1:c.sent(),this.ctx.restore(),t.boxShadow.slice(0).reverse().forEach(function(t){l.ctx.save();var A,r,a,n,s,i=rk(e.curves),o=t.inset?0:1e4,c=(A=i,r=-o+(t.inset?1:-1)*t.spread.number,a=(t.inset?1:-1)*t.spread.number,n=t.spread.number*(t.inset?-2:2),s=t.spread.number*(t.inset?-2:2),A.map(function(e,t){switch(t){case 0:return e.add(r,a);case 1:return e.add(r+n,a);case 2:return e.add(r+n,a+s);case 3:return e.add(r,a+s)}return e}));t.inset?(l.path(i),l.ctx.clip(),l.mask(c)):(l.mask(i),l.ctx.clip(),l.path(c)),l.ctx.shadowOffsetX=t.offsetX.number+o,l.ctx.shadowOffsetY=t.offsetY.number,l.ctx.shadowColor=xE(t.color),l.ctx.shadowBlur=t.blur.number,l.ctx.fillStyle=t.inset?xE(t.color):"rgba(0,0,0,1)",l.ctx.fill(),l.ctx.restore()}),c.label=2;case 2:n=0,s=0,i=r,c.label=3;case 3:return s<i.length?0!==(o=i[s]).style&&!EE(o.color)&&o.width>0?2!==o.style?[3,5]:[4,this.renderDashedDottedBorder(o.color,o.width,n,e.curves,2)]:[3,11]:[3,13];case 4:return c.sent(),[3,11];case 5:return 3!==o.style?[3,7]:[4,this.renderDashedDottedBorder(o.color,o.width,n,e.curves,3)];case 6:return c.sent(),[3,11];case 7:return 4!==o.style?[3,9]:[4,this.renderDoubleBorder(o.color,o.width,n,e.curves)];case 8:return c.sent(),[3,11];case 9:return[4,this.renderSolidBorder(o.color,n,e.curves)];case 10:c.sent(),c.label=11;case 11:n++,c.label=12;case 12:return s++,[3,3];case 13:return[2]}})})},t.prototype.renderDashedDottedBorder=function(e,t,A,r,a){return lQ(this,0,void 0,function(){var n,s,i,o,l,c,u,d,h,p,f,g,m,v,y,w;return cQ(this,function(B){return this.ctx.save(),n=function(e,t){switch(t){case 0:return fk(e.topLeftBorderStroke,e.topRightBorderStroke);case 1:return fk(e.topRightBorderStroke,e.bottomRightBorderStroke);case 2:return fk(e.bottomRightBorderStroke,e.bottomLeftBorderStroke);default:return fk(e.bottomLeftBorderStroke,e.topLeftBorderStroke)}}(r,A),s=pk(r,A),2===a&&(this.path(s),this.ctx.clip()),ek(s[0])?(i=s[0].start.x,o=s[0].start.y):(i=s[0].x,o=s[0].y),ek(s[1])?(l=s[1].end.x,c=s[1].end.y):(l=s[1].x,c=s[1].y),u=0===A||2===A?Math.abs(i-l):Math.abs(o-c),this.ctx.beginPath(),3===a?this.formatPath(n):this.formatPath(s.slice(0,2)),d=t<3?3*t:2*t,h=t<3?2*t:t,3===a&&(d=t,h=t),p=!0,u<=2*d?p=!1:u<=2*d+h?(d*=f=u/(2*d+h),h*=f):(g=Math.floor((u+h)/(d+h)),m=(u-g*d)/(g-1),h=(v=(u-(g+1)*d)/g)<=0||Math.abs(h-m)<Math.abs(h-v)?m:v),p&&(3===a?this.ctx.setLineDash([0,d+h]):this.ctx.setLineDash([d,h])),3===a?(this.ctx.lineCap="round",this.ctx.lineWidth=t):this.ctx.lineWidth=2*t+1.1,this.ctx.strokeStyle=xE(e),this.ctx.stroke(),this.ctx.setLineDash([]),2===a&&(ek(s[0])&&(y=s[3],w=s[0],this.ctx.beginPath(),this.formatPath([new JS(y.end.x,y.end.y),new JS(w.start.x,w.start.y)]),this.ctx.stroke()),ek(s[1])&&(y=s[1],w=s[2],this.ctx.beginPath(),this.formatPath([new JS(y.end.x,y.end.y),new JS(w.start.x,w.start.y)]),this.ctx.stroke())),this.ctx.restore(),[2]})})},t.prototype.render=function(e){return lQ(this,0,void 0,function(){var t;return cQ(this,function(A){switch(A.label){case 0:return this.options.backgroundColor&&(this.ctx.fillStyle=xE(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height)),r=new uk(e,null),a=new ck(r),dk(r,a,a,n=[]),hk(r.container,n),t=a,[4,this.renderStack(t)];case 1:return A.sent(),this.applyEffects([]),[2,this.canvas]}var r,a,n})})},t}(xk),Mk=function(e){return e instanceof OM||(e instanceof HM||e instanceof LM&&e.type!==kM&&e.type!==SM)},Sk=function(e,t){switch(e){case 0:return rk(t);case 2:return function(e){return[e.topLeftContentBox,e.topRightContentBox,e.bottomRightContentBox,e.bottomLeftContentBox]}(t);default:return ak(t)}},kk=function(e){switch(e){case 1:return"center";case 2:return"right";default:return"left"}},_k=["-apple-system","system-ui"],Ik=function(e){return/iPhone OS 15_(0|1)/.test(window.navigator.userAgent)?e.filter(function(e){return-1===_k.indexOf(e)}):e},Lk=function(e){function t(t,A){var r=e.call(this,t,A)||this;return r.canvas=A.canvas?A.canvas:document.createElement("canvas"),r.ctx=r.canvas.getContext("2d"),r.options=A,r.canvas.width=Math.floor(A.width*A.scale),r.canvas.height=Math.floor(A.height*A.scale),r.canvas.style.width=A.width+"px",r.canvas.style.height=A.height+"px",r.ctx.scale(r.options.scale,r.options.scale),r.ctx.translate(-A.x,-A.y),r.context.logger.debug("EXPERIMENTAL ForeignObject renderer initialized ("+A.width+"x"+A.height+" at "+A.x+","+A.y+") with scale "+A.scale),r}return iQ(t,e),t.prototype.render=function(e){return lQ(this,0,void 0,function(){var t,A;return cQ(this,function(r){switch(r.label){case 0:return t=lM(this.options.width*this.options.scale,this.options.height*this.options.scale,this.options.scale,this.options.scale,e),[4,Hk(t)];case 1:return A=r.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=xE(this.options.backgroundColor),this.ctx.fillRect(0,0,this.options.width*this.options.scale,this.options.height*this.options.scale)),this.ctx.drawImage(A,-this.options.x*this.options.scale,-this.options.y*this.options.scale),[2,this.canvas]}})})},t}(xk),Hk=function(e){return new Promise(function(t,A){var r=new Image;r.onload=function(){t(r)},r.onerror=A,r.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent((new XMLSerializer).serializeToString(e))})},Ok=function(){function e(e){var t=e.id,A=e.enabled;this.id=t,this.enabled=A,this.start=Date.now()}return e.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.enabled&&("undefined"!=typeof window&&window.console&&"function"==typeof console.debug||this.info.apply(this,e))},e.prototype.getTime=function(){return Date.now()-this.start},e.prototype.info=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.enabled&&"undefined"!=typeof window&&window.console&&console.info},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.enabled&&("undefined"!=typeof window&&window.console&&"function"==typeof console.warn||this.info.apply(this,e))},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.enabled&&("undefined"!=typeof window&&window.console&&"function"==typeof console.error||this.info.apply(this,e))},e.instances={},e}(),Tk=function(){function e(t,A){var r;this.windowBounds=A,this.instanceName="#"+e.instanceCount++,this.logger=new Ok({id:this.instanceName,enabled:t.logging}),this.cache=null!==(r=t.cache)&&void 0!==r?r:new RS(this,t)}return e.instanceCount=1,e}();"undefined"!=typeof window&&KS.setContext(window);var Pk=function(e,t){return lQ(void 0,0,void 0,function(){var A,r,a,n,s,i,o,l,c,u,d,h,p,f,g,m,v,y,w,B,b,C,Q,F,E,x,U,M,S,k,_,I,L,H,O,T,P,D;return cQ(this,function(N){switch(N.label){case 0:if(!e||"object"!=typeof e)return[2,Promise.reject("Invalid element provided as first argument")];if(!(A=e.ownerDocument))throw new Error("Element is not attached to a Document");if(!(r=A.defaultView))throw new Error("Document is not attached to a Window");return a={allowTaint:null!==(C=t.allowTaint)&&void 0!==C&&C,imageTimeout:null!==(Q=t.imageTimeout)&&void 0!==Q?Q:15e3,proxy:t.proxy,useCORS:null!==(F=t.useCORS)&&void 0!==F&&F},n=oQ({logging:null===(E=t.logging)||void 0===E||E,cache:t.cache},a),s={windowWidth:null!==(x=t.windowWidth)&&void 0!==x?x:r.innerWidth,windowHeight:null!==(U=t.windowHeight)&&void 0!==U?U:r.innerHeight,scrollX:null!==(M=t.scrollX)&&void 0!==M?M:r.pageXOffset,scrollY:null!==(S=t.scrollY)&&void 0!==S?S:r.pageYOffset},i=new uQ(s.scrollX,s.scrollY,s.windowWidth,s.windowHeight),o=new Tk(n,i),l=null!==(k=t.foreignObjectRendering)&&void 0!==k&&k,c={allowTaint:null!==(_=t.allowTaint)&&void 0!==_&&_,onclone:t.onclone,ignoreElements:t.ignoreElements,inlineImages:l,copyStyles:l},o.logger.debug("Starting document clone with size "+i.width+"x"+i.height+" scrolled to "+-i.left+","+-i.top),u=new QS(o,e,c),(d=u.clonedReferenceElement)?[4,u.toIFrame(A,i)]:[2,Promise.reject("Unable to find element in cloned iframe")];case 1:return h=N.sent(),p=YM(d)||"HTML"===d.tagName?function(e){var t=e.body,A=e.documentElement;if(!t||!A)throw new Error("Unable to get document size");var r=Math.max(Math.max(t.scrollWidth,A.scrollWidth),Math.max(t.offsetWidth,A.offsetWidth),Math.max(t.clientWidth,A.clientWidth)),a=Math.max(Math.max(t.scrollHeight,A.scrollHeight),Math.max(t.offsetHeight,A.offsetHeight),Math.max(t.clientHeight,A.clientHeight));return new uQ(0,0,r,a)}(d.ownerDocument):dQ(o,d),f=p.width,g=p.height,m=p.left,v=p.top,y=Dk(o,d,t.backgroundColor),w={canvas:t.canvas,backgroundColor:y,scale:null!==(L=null!==(I=t.scale)&&void 0!==I?I:r.devicePixelRatio)&&void 0!==L?L:1,x:(null!==(H=t.x)&&void 0!==H?H:0)+m,y:(null!==(O=t.y)&&void 0!==O?O:0)+v,width:null!==(T=t.width)&&void 0!==T?T:Math.ceil(f),height:null!==(P=t.height)&&void 0!==P?P:Math.ceil(g)},l?(o.logger.debug("Document cloned, using foreign object rendering"),[4,new Lk(o,w).render(d)]):[3,3];case 2:return B=N.sent(),[3,5];case 3:return o.logger.debug("Document cloned, element located at "+m+","+v+" with size "+f+"x"+g+" using computed rendering"),o.logger.debug("Starting DOM parsing"),b=KM(o,d),y===b.styles.backgroundColor&&(b.styles.backgroundColor=HE.TRANSPARENT),o.logger.debug("Starting renderer for element at "+w.x+","+w.y+" with size "+w.width+"x"+w.height),[4,new Uk(o,w).render(b)];case 4:B=N.sent(),N.label=5;case 5:return(null===(D=t.removeContainer)||void 0===D||D)&&(QS.destroy(h)||o.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore")),o.logger.debug("Finished rendering"),[2,B]}})})},Dk=function(e,t,A){var r=t.ownerDocument,a=r.documentElement?LE(e,getComputedStyle(r.documentElement).backgroundColor):HE.TRANSPARENT,n=r.body?LE(e,getComputedStyle(r.body).backgroundColor):HE.TRANSPARENT,s="string"==typeof A?LE(e,A):null===A?HE.TRANSPARENT:4294967295;return t===r.documentElement?EE(a)?EE(n)?s:n:a:s};const Nk={async domToImage(e,t={}){const{format:A="png",quality:r=1,scale:a=1,backgroundColor:n="#ffffff"}=t;try{const t=await function(e,t){return void 0===t&&(t={}),Pk(e,t)}(e,{scale:a,backgroundColor:n,useCORS:!0,logging:!1,removeContainer:!0});return new Promise((e,a)=>{t.toBlob(t=>{t?e(t):a(new Error("Canvas 转换失败"))},`image/${A}`,r)})}catch(s){throw s}},downloadImage(e,t){const A=URL.createObjectURL(e),r=document.createElement("a");r.href=A,r.download=t,r.click(),URL.revokeObjectURL(A)},async printElement(e,t={}){const A=await this.domToImage(e,t);this.downloadImage(A,t.filename||`print-${Date.now()}.${t.format||"png"}`)}};const Kk=/* @__PURE__ */new WeakMap,Rk=/* @__PURE__ */new WeakMap,Gk={mounted(e,t){const{activeClass:A="is-touching",delay:r=300,disabled:a=!1,disabledClass:n="disabled",rippleClass:s="is-rippling"}=t.value||{};e.style.position="relative",e.style.overflow="hidden";const i=t=>{if(a||e.classList.contains(n))return;const r=t,i=e.getBoundingClientRect(),o=r.touches[0],l=o.clientX-i.left,c=o.clientY-i.top,u=document.createElement("span");u.className=s,u.style.cssText=`\n position: absolute;\n border-radius: 50%;\n background: var(--gismap-primary);\n opacity: 0.3;\n transform: scale(0);\n animation: ripple-effect 0.5s ease-out forwards;\n pointer-events: none;\n width: ${Math.max(i.width,i.height)}px;\n height: ${Math.max(i.width,i.height)}px;\n left: ${l-Math.max(i.width,i.height)/2}px;\n top: ${c-Math.max(i.width,i.height)/2}px;\n `,e.appendChild(u),Rk.set(e,u),u.addEventListener("animationend",()=>{u.remove(),Rk.delete(e)},{once:!0}),e.classList.add(A)},o=()=>{setTimeout(()=>{e.classList.remove(A)},r)},l=()=>{e.classList.remove(A);const t=Rk.get(e);t&&(t.remove(),Rk.delete(e))},c={onStart:i,onEnd:o,onCancel:l};Kk.set(e,c),e.addEventListener("touchstart",i,{passive:!0}),e.addEventListener("touchend",o,{passive:!0}),e.addEventListener("touchcancel",l,{passive:!0});const u=document.createElement("style");u.textContent="\n @keyframes ripple-effect {\n to {\n transform: scale(2.5);\n opacity: 0;\n }\n }\n ",document.head.appendChild(u)},unmounted(e){const t=Kk.get(e);if(!t)return;e.removeEventListener("touchstart",t.onStart),e.removeEventListener("touchend",t.onEnd),e.removeEventListener("touchcancel",t.onCancel),Kk.delete(e);const A=Rk.get(e);A&&(A.remove(),Rk.delete(e))}},Vk={class:"gismap-tools"},zk={class:"tools-toggle-wrapper"},jk={class:"tools-panel"},$k={key:0,class:"tool-group"},qk=["onClick","title"],Wk=/* @__PURE__ */o({__name:"index",props:{data:{default:()=>[]},defaultCollapsed:{type:Boolean,default:!1},showToggle:{type:Boolean,default:!0}},emits:["tool-click"],setup(e,{emit:A}){const r=Gk,a=e,n=A,s=t(a.defaultCollapsed),o=Gt(),l=t(null),p=i(()=>a.data&&0!==a.data.length?a.data.map(e=>({type:"group",name:e.name,label:e.label,children:e.children.filter(e=>!e.hidden)})).filter(e=>e.children&&e.children.length>0):!0===o.value?.isMobile?g().filter(e=>e.showMode?.includes("mobile")):g().filter(e=>e.showMode?.includes("pc"))),g=()=>[{type:"group",name:"navigation",label:"导航",showMode:["pc"],children:[{name:"location",label:"定位",icon:"aim",showMode:["mobile"]}]},{type:"group",name:"fullscreen",label:"全屏",showMode:["pc"],children:[{name:"fullscreen",label:"全屏",icon:"fullscreen",showMode:["pc"]}]},{type:"group",name:"navigation",label:"导航",showMode:["pc","mobile"],children:[{name:"reset",label:"重置",icon:"reset"},{name:"zoomIn",label:"放大",icon:"zoomIn"},{name:"zoomOut",label:"缩小",icon:"zoomOut"}]},{type:"group",name:"tools",label:"测量",showMode:["pc","mobile"],children:[{name:"measurePoint",label:"点",icon:"measurePoint"},{name:"measureLine",label:"线",icon:"measureLength"},{name:"measureArea",label:"面",icon:"measureArea"}]},{type:"group",name:"export",label:"导出",showMode:["pc"],children:[{name:"print",label:"打印",icon:"print"}]},{type:"group",name:"clear",label:"清除",showMode:["pc","mobile"],children:[{name:"clear",label:"清除",icon:"clear"}]}],m=()=>{s.value=!s.value},v=e=>{e.disabled||(l.value===e.name?l.value=null:l.value=e.name,"location"===e.name?function(e){navigator.geolocation&&navigator.geolocation.getCurrentPosition(t=>{const{latitude:A,longitude:r}=t.coords,a=[r,A];e&&e.flyTo(a,{zoom:16})},e=>{})}(o.value):"fullscreen"===e.name?function(e){if(e){const t=e.adapter.getMap();t&&nQ.toggleFullscreen(t.getContainer().parentElement)}}(o.value):"zoomIn"===e.name?function(e){e&&e.zoomIn()}(o.value):"zoomOut"===e.name?function(e){e&&e.zoomOut()}(o.value):"clear"===e.name?function(e){e&&(e.events.emit("clear",{}),e.measureManager?.clearAllResults())}(o.value):"reset"===e.name?function(e){if(e){const t=e.getInitialViewState();if(t){const A=[t.center.lng,t.center.lat];e.setView(A,t.zoom,{pitch:t.pitch,bearing:t.bearing,animate:!0})}}}(o.value):"measurePoint"===e.name?function(e){e?.measureManager&&e.measureManager.startMeasure("point")}(o.value):"measureLine"===e.name?function(e){e?.measureManager&&e.measureManager.startMeasure("line")}(o.value):"measureArea"===e.name?function(e){e?.measureManager&&e.measureManager.startMeasure("polygon")}(o.value):"stopMeasure"===e.name?function(e){e?.measureManager&&e.measureManager.stopMeasure()}(o.value):"print"===e.name&&function(e){e&&Nk.domToImage(e.adapter.getMap().getContainer(),{format:"png",quality:1,scale:1,backgroundColor:"#ffffff"}).then(e=>{Nk.downloadImage(e,"map.png")})}(o.value),n("tool-click",e))};return(t,A)=>{const a=cc;return c(),u("div",Vk,[e.showToggle?(c(),u("div",{key:0,class:"tools-toggle",onClick:m},[H((c(),u("div",zk,[P(a,{class:d({"is-collapse":s.value}),size:"20"},{default:D(()=>[s.value?(c(),k(w(DC),{key:1})):(c(),k(w(TC),{key:0}))]),_:1},8,["class"])])),[[w(r)]])])):f("",!0),P(q,{name:"fade-slide"},{default:D(()=>[H(h("div",jk,[(c(!0),u(S,null,ne(p.value,(e,t)=>(c(),u(S,{key:e.name||`group-${t}`},[e.children&&e.children.length?(c(),u("div",$k,[(c(!0),u(S,null,ne(e.children,e=>H((c(),u("div",{key:e.name,class:d(["tool-item",{"is-active":l.value===e.name}]),onClick:t=>v(e),title:e.label},[P(a,{size:20},{default:D(()=>[(c(),k(V(w(aQ)(e.icon,l.value===e.name))))]),_:2},1024)],10,qk)),[[w(r)]])),128))])):f("",!0)],64))),128))],512),[[W,!s.value]])]),_:1})])}}}),Xk={class:"gismap-switch"},Jk={key:0,class:"gismap-switch-extensions"},Yk=["onClick"],Zk={class:"gismap-switch-item-content"},e_={class:"gismap-switch-item-icon"},t_={class:"gismap-switch-item-text"},A_={class:"gismap-switch-layers"},r_=["onClick"],a_={class:"gismap-switch-item-content"},n_={class:"gismap-switch-item-text"},s_={class:"style-list"},i_=["onClick"],o_={key:1,class:"gismap-switch-extensions"},l_=["onClick"],c_={class:"gismap-switch-item-content"},u_={class:"gismap-switch-item-icon"},d_={class:"gismap-switch-item-text"},h_=/* @__PURE__ */o({name:"MapSwitch",props:{data:{type:Object,default:()=>({layers:[],extensions:[]})},extensionsPosition:{type:String,default:"left"},gray:{type:Boolean,default:!1}},setup(e){const A=e,r=Gt(),{tdt:a,terrain:n,style:s}=Sv(),o=i(()=>r.value?.events),g=t(""),m=e=>{if(g.value!==e.name){switch((e=>{switch(e){case"tdt-vec":a.value?.removeVecLayer();break;case"tdt-img":a.value?.removeImgLayer()}})(g.value),g.value=e.name,e.name){case"tdt-vec":a.value?.addVecLayer(e?.source||void 0,Qe.layerPolygonId);break;case"tdt-img":a.value?.addImgLayer(e?.source||void 0,Qe.layerPolygonId);break;default:o.value?.emit("switch:layer",e)}e.styles&&e.styles.length>0&&v(e),o.value?.emit("switch:widgets",e)}},v=e=>{m(e)},y=(e,t)=>{"click"===e&&(t.checked=!t.checked);const A={checked:!!t.checked,data:t};switch(t.name){case"tdt-cia":t.checked?a.value?.addCiaLayer(t?.source||null,Qe.layerPointId):a.value?.removeCiaLayer();break;case"terrain":t.checked?n.value?.add(t?.config||{}):n.value?.remove();break;default:o.value?.emit("switch:click",A)}o.value?.emit("switch:click",A)};return l(()=>{A.data.layers.forEach(e=>{e.checked&&(m(e),g.value=e.name)}),A.data.extensions.forEach(e=>{e.checked&&y("check",e)})}),(t,A)=>{const r=vp,a=fv;return c(),u("div",Xk,[p(t.$slots,"left"),"left"===e.extensionsPosition?(c(),u("div",Jk,[(c(!0),u(S,null,ne(e.data.extensions,e=>(c(),u("div",{class:"gismap-switch-item",key:e.name,onClick:Z(t=>y("click",e),["stop"])},[h("div",Zk,[h("div",e_,[P(r,{modelValue:e.checked,"onUpdate:modelValue":t=>e.checked=t,style:{"margin-right":"6px"}},null,8,["modelValue","onUpdate:modelValue"])]),h("span",t_,j(e.label),1)])],8,Yk))),128))])):f("",!0),h("div",A_,[(c(!0),u(S,null,ne(e.data.layers,e=>(c(),u("div",{class:d(["gismap-switch-item",{active:g.value===e.name}]),key:e.name,onClick:t=>v(e)},[h("div",a_,[h("div",{class:d(["gismap-switch-item-icon",e.iconName])},null,2),h("span",n_,j(e.label),1),e.styles&&e.styles.length>0?(c(),k(a,{key:0,placement:"bottom",width:100,trigger:"click","popper-class":"style-popover"},{reference:D(()=>[g.value===e.name?(c(),u("div",{key:0,class:"style-trigger",onClick:A[0]||(A[0]=Z(()=>{},["stop"]))},[...A[1]||(A[1]=[h("span",{class:"style-arrow"},"▼",-1)])])):f("",!0)]),default:D(()=>[h("div",s_,[(c(!0),u(S,null,ne(e.styles,t=>(c(),u("div",{key:t.name,class:d(["style-item",{active:t.checked}]),onClick:A=>((e,t)=>{e.forEach(e=>{e.checked=!1}),t.checked=!t.checked,s.value?.applyStyle(g.value,t?.name)})(e.styles,t)},j(t.label),11,i_))),128))])]),_:2},1024)):f("",!0)])],10,r_))),128))]),"right"===e.extensionsPosition?(c(),u("div",o_,[(c(!0),u(S,null,ne(e.data.extensions,e=>(c(),u("div",{class:"gismap-switch-item",key:e.name,onClick:Z(t=>y("click",e),["stop"])},[h("div",c_,[h("div",u_,[P(r,{modelValue:e.checked,"onUpdate:modelValue":t=>e.checked=t,style:{"margin-right":"6px"}},null,8,["modelValue","onUpdate:modelValue"])]),h("span",d_,j(e.label),1)])],8,l_))),128))])):f("",!0),p(t.$slots,"right")])}}});function p_(e,t){return function(){return e.apply(t,arguments)}}const{toString:f_}=Object.prototype,{getPrototypeOf:g_}=Object,{iterator:m_,toStringTag:v_}=Symbol,y_=/* @__PURE__ */(e=>t=>{const A=f_.call(t);return e[A]||(e[A]=A.slice(8,-1).toLowerCase())})(/* @__PURE__ */Object.create(null)),w_=e=>(e=e.toLowerCase(),t=>y_(t)===e),B_=e=>t=>typeof t===e,{isArray:b_}=Array,C_=B_("undefined");function Q_(e){return null!==e&&!C_(e)&&null!==e.constructor&&!C_(e.constructor)&&x_(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const F_=w_("ArrayBuffer");const E_=B_("string"),x_=B_("function"),U_=B_("number"),M_=e=>null!==e&&"object"==typeof e,S_=e=>{if("object"!==y_(e))return!1;const t=g_(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||v_ in e||m_ in e)},k_=w_("Date"),__=w_("File"),I_=w_("Blob"),L_=w_("FileList");const H_="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},O_=void 0!==H_.FormData?H_.FormData:void 0,T_=w_("URLSearchParams"),[P_,D_,N_,K_]=["ReadableStream","Request","Response","Headers"].map(w_);function R_(e,t,{allOwnKeys:A=!1}={}){if(null==e)return;let r,a;if("object"!=typeof e&&(e=[e]),b_(e))for(r=0,a=e.length;r<a;r++)t.call(null,e[r],r,e);else{if(Q_(e))return;const a=A?Object.getOwnPropertyNames(e):Object.keys(e),n=a.length;let s;for(r=0;r<n;r++)s=a[r],t.call(null,e[s],s,e)}}function G_(e,t){if(Q_(e))return null;t=t.toLowerCase();const A=Object.keys(e);let r,a=A.length;for(;a-- >0;)if(r=A[a],t===r.toLowerCase())return r;return null}const V_="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,z_=e=>!C_(e)&&e!==V_;const j_=/* @__PURE__ */(e=>t=>e&&t instanceof e)("undefined"!=typeof Uint8Array&&g_(Uint8Array)),$_=w_("HTMLFormElement"),q_=(({hasOwnProperty:e})=>(t,A)=>e.call(t,A))(Object.prototype),W_=w_("RegExp"),X_=(e,t)=>{const A=Object.getOwnPropertyDescriptors(e),r={};R_(A,(A,a)=>{let n;!1!==(n=t(A,a,e))&&(r[a]=n||A)}),Object.defineProperties(e,r)};const J_=w_("AsyncFunction"),Y_=(Z_="function"==typeof setImmediate,eI=x_(V_.postMessage),Z_?setImmediate:eI?(tI=`axios@${Math.random()}`,AI=[],V_.addEventListener("message",({source:e,data:t})=>{e===V_&&t===tI&&AI.length&&AI.shift()()},!1),e=>{AI.push(e),V_.postMessage(tI,"*")}):e=>setTimeout(e));var Z_,eI,tI,AI;const rI="undefined"!=typeof queueMicrotask?queueMicrotask.bind(V_):"undefined"!=typeof process&&process.nextTick||Y_,aI={isArray:b_,isArrayBuffer:F_,isBuffer:Q_,isFormData:e=>{let t;return e&&(O_&&e instanceof O_||x_(e.append)&&("formdata"===(t=y_(e))||"object"===t&&x_(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&F_(e.buffer),t},isString:E_,isNumber:U_,isBoolean:e=>!0===e||!1===e,isObject:M_,isPlainObject:S_,isEmptyObject:e=>{if(!M_(e)||Q_(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(t){return!1}},isReadableStream:P_,isRequest:D_,isResponse:N_,isHeaders:K_,isUndefined:C_,isDate:k_,isFile:__,isReactNativeBlob:e=>!(!e||void 0===e.uri),isReactNative:e=>e&&void 0!==e.getParts,isBlob:I_,isRegExp:W_,isFunction:x_,isStream:e=>M_(e)&&x_(e.pipe),isURLSearchParams:T_,isTypedArray:j_,isFileList:L_,forEach:R_,merge:function e(){const{caseless:t,skipUndefined:A}=z_(this)&&this||{},r={},a=(a,n)=>{if("__proto__"===n||"constructor"===n||"prototype"===n)return;const s=t&&G_(r,n)||n;S_(r[s])&&S_(a)?r[s]=e(r[s],a):S_(a)?r[s]=e({},a):b_(a)?r[s]=a.slice():A&&C_(a)||(r[s]=a)};for(let n=0,s=arguments.length;n<s;n++)arguments[n]&&R_(arguments[n],a);return r},extend:(e,t,A,{allOwnKeys:r}={})=>(R_(t,(t,r)=>{A&&x_(t)?Object.defineProperty(e,r,{value:p_(t,A),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,r,{value:t,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,A,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{value:t.prototype}),A&&Object.assign(e.prototype,A)},toFlatObject:(e,t,A,r)=>{let a,n,s;const i={};if(t=t||{},null==e)return t;do{for(a=Object.getOwnPropertyNames(e),n=a.length;n-- >0;)s=a[n],r&&!r(s,e,t)||i[s]||(t[s]=e[s],i[s]=!0);e=!1!==A&&g_(e)}while(e&&(!A||A(e,t))&&e!==Object.prototype);return t},kindOf:y_,kindOfTest:w_,endsWith:(e,t,A)=>{e=String(e),(void 0===A||A>e.length)&&(A=e.length),A-=t.length;const r=e.indexOf(t,A);return-1!==r&&r===A},toArray:e=>{if(!e)return null;if(b_(e))return e;let t=e.length;if(!U_(t))return null;const A=new Array(t);for(;t-- >0;)A[t]=e[t];return A},forEachEntry:(e,t)=>{const A=(e&&e[m_]).call(e);let r;for(;(r=A.next())&&!r.done;){const A=r.value;t.call(e,A[0],A[1])}},matchAll:(e,t)=>{let A;const r=[];for(;null!==(A=e.exec(t));)r.push(A);return r},isHTMLForm:$_,hasOwnProperty:q_,hasOwnProp:q_,reduceDescriptors:X_,freezeMethods:e=>{X_(e,(t,A)=>{if(x_(e)&&-1!==["arguments","caller","callee"].indexOf(A))return!1;const r=e[A];x_(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+A+"'")}))})},toObjectSet:(e,t)=>{const A={},r=e=>{e.forEach(e=>{A[e]=!0})};return b_(e)?r(e):r(String(e).split(t)),A},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,A){return t.toUpperCase()+A}),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:G_,global:V_,isContextDefined:z_,isSpecCompliantForm:function(e){return!!(e&&x_(e.append)&&"FormData"===e[v_]&&e[m_])},toJSONObject:e=>{const t=new Array(10),A=(e,r)=>{if(M_(e)){if(t.indexOf(e)>=0)return;if(Q_(e))return e;if(!("toJSON"in e)){t[r]=e;const a=b_(e)?[]:{};return R_(e,(e,t)=>{const n=A(e,r+1);!C_(n)&&(a[t]=n)}),t[r]=void 0,a}}return e};return A(e,0)},isAsyncFn:J_,isThenable:e=>e&&(M_(e)||x_(e))&&x_(e.then)&&x_(e.catch),setImmediate:Y_,asap:rI,isIterable:e=>null!=e&&x_(e[m_])};let nI=class e extends Error{static from(t,A,r,a,n,s){const i=new e(t.message,A||t.code,r,a,n);return i.cause=t,i.name=t.name,null!=t.status&&null==i.status&&(i.status=t.status),s&&Object.assign(i,s),i}constructor(e,t,A,r,a){super(e),Object.defineProperty(this,"message",{value:e,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,t&&(this.code=t),A&&(this.config=A),r&&(this.request=r),a&&(this.response=a,this.status=a.status)}toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:aI.toJSONObject(this.config),code:this.code,status:this.status}}};nI.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",nI.ERR_BAD_OPTION="ERR_BAD_OPTION",nI.ECONNABORTED="ECONNABORTED",nI.ETIMEDOUT="ETIMEDOUT",nI.ERR_NETWORK="ERR_NETWORK",nI.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",nI.ERR_DEPRECATED="ERR_DEPRECATED",nI.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",nI.ERR_BAD_REQUEST="ERR_BAD_REQUEST",nI.ERR_CANCELED="ERR_CANCELED",nI.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",nI.ERR_INVALID_URL="ERR_INVALID_URL";function sI(e){return aI.isPlainObject(e)||aI.isArray(e)}function iI(e){return aI.endsWith(e,"[]")?e.slice(0,-2):e}function oI(e,t,A){return e?e.concat(t).map(function(e,t){return e=iI(e),!A&&t?"["+e+"]":e}).join(A?".":""):t}const lI=aI.toFlatObject(aI,{},null,function(e){return/^is[A-Z]/.test(e)});function cI(e,t,A){if(!aI.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(A=aI.toFlatObject(A,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!aI.isUndefined(t[e])})).metaTokens,a=A.visitor||l,n=A.dots,s=A.indexes,i=(A.Blob||"undefined"!=typeof Blob&&Blob)&&aI.isSpecCompliantForm(t);if(!aI.isFunction(a))throw new TypeError("visitor must be a function");function o(e){if(null===e)return"";if(aI.isDate(e))return e.toISOString();if(aI.isBoolean(e))return e.toString();if(!i&&aI.isBlob(e))throw new nI("Blob is not supported. Use a Buffer instead.");return aI.isArrayBuffer(e)||aI.isTypedArray(e)?i&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function l(e,A,a){let i=e;if(aI.isReactNative(t)&&aI.isReactNativeBlob(e))return t.append(oI(a,A,n),o(e)),!1;if(e&&!a&&"object"==typeof e)if(aI.endsWith(A,"{}"))A=r?A:A.slice(0,-2),e=JSON.stringify(e);else if(aI.isArray(e)&&function(e){return aI.isArray(e)&&!e.some(sI)}(e)||(aI.isFileList(e)||aI.endsWith(A,"[]"))&&(i=aI.toArray(e)))return A=iI(A),i.forEach(function(e,r){!aI.isUndefined(e)&&null!==e&&t.append(!0===s?oI([A],r,n):null===s?A:A+"[]",o(e))}),!1;return!!sI(e)||(t.append(oI(a,A,n),o(e)),!1)}const c=[],u=Object.assign(lI,{defaultVisitor:l,convertValue:o,isVisitable:sI});if(!aI.isObject(e))throw new TypeError("data must be an object");return function e(A,r){if(!aI.isUndefined(A)){if(-1!==c.indexOf(A))throw Error("Circular reference detected in "+r.join("."));c.push(A),aI.forEach(A,function(A,n){!0===(!(aI.isUndefined(A)||null===A)&&a.call(t,A,aI.isString(n)?n.trim():n,r,u))&&e(A,r?r.concat(n):[n])}),c.pop()}}(e),t}function uI(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function dI(e,t){this._pairs=[],e&&cI(e,this,t)}const hI=dI.prototype;function pI(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function fI(e,t,A){if(!t)return e;const r=A&&A.encode||pI,a=aI.isFunction(A)?{serialize:A}:A,n=a&&a.serialize;let s;if(s=n?n(t,a):aI.isURLSearchParams(t)?t.toString():new dI(t,a).toString(r),s){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+s}return e}hI.append=function(e,t){this._pairs.push([e,t])},hI.toString=function(e){const t=e?function(t){return e.call(this,t,uI)}:uI;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};class gI{constructor(){this.handlers=[]}use(e,t,A){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!A&&A.synchronous,runWhen:A?A.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){aI.forEach(this.handlers,function(t){null!==t&&e(t)})}}const mI={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},vI={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:dI,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},yI="undefined"!=typeof window&&"undefined"!=typeof document,wI="object"==typeof navigator&&navigator||void 0,BI=yI&&(!wI||["ReactNative","NativeScript","NS"].indexOf(wI.product)<0),bI="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,CI=yI&&window.location.href||"http://localhost",QI={.../* @__PURE__ */Object.freeze(/* @__PURE__ */Object.defineProperty({__proto__:null,hasBrowserEnv:yI,hasStandardBrowserEnv:BI,hasStandardBrowserWebWorkerEnv:bI,navigator:wI,origin:CI},Symbol.toStringTag,{value:"Module"})),...vI};function FI(e){function t(e,A,r,a){let n=e[a++];if("__proto__"===n)return!0;const s=Number.isFinite(+n),i=a>=e.length;if(n=!n&&aI.isArray(r)?r.length:n,i)return aI.hasOwnProp(r,n)?r[n]=[r[n],A]:r[n]=A,!s;r[n]&&aI.isObject(r[n])||(r[n]=[]);return t(e,A,r[n],a)&&aI.isArray(r[n])&&(r[n]=function(e){const t={},A=Object.keys(e);let r;const a=A.length;let n;for(r=0;r<a;r++)n=A[r],t[n]=e[n];return t}(r[n])),!s}if(aI.isFormData(e)&&aI.isFunction(e.entries)){const A={};return aI.forEachEntry(e,(e,r)=>{t(function(e){return aI.matchAll(/\w+|\[(\w*)]/g,e).map(e=>"[]"===e[0]?"":e[1]||e[0])}(e),r,A,0)}),A}return null}const EI={transitional:mI,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const A=t.getContentType()||"",r=A.indexOf("application/json")>-1,a=aI.isObject(e);a&&aI.isHTMLForm(e)&&(e=new FormData(e));if(aI.isFormData(e))return r?JSON.stringify(FI(e)):e;if(aI.isArrayBuffer(e)||aI.isBuffer(e)||aI.isStream(e)||aI.isFile(e)||aI.isBlob(e)||aI.isReadableStream(e))return e;if(aI.isArrayBufferView(e))return e.buffer;if(aI.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let n;if(a){if(A.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return cI(e,new QI.classes.URLSearchParams,{visitor:function(e,t,A,r){return QI.isNode&&aI.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)},...t})}(e,this.formSerializer).toString();if((n=aI.isFileList(e))||A.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return cI(n?{"files[]":e}:e,t&&new t,this.formSerializer)}}return a||r?(t.setContentType("application/json",!1),function(e,t,A){if(aI.isString(e))try{return(t||JSON.parse)(e),aI.trim(e)}catch(r){if("SyntaxError"!==r.name)throw r}return(A||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||EI.transitional,A=t&&t.forcedJSONParsing,r="json"===this.responseType;if(aI.isResponse(e)||aI.isReadableStream(e))return e;if(e&&aI.isString(e)&&(A&&!this.responseType||r)){const A=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e,this.parseReviver)}catch(a){if(A){if("SyntaxError"===a.name)throw nI.from(a,nI.ERR_BAD_RESPONSE,this,null,this.response);throw a}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:QI.classes.FormData,Blob:QI.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};aI.forEach(["delete","get","head","post","put","patch"],e=>{EI.headers[e]={}});const xI=aI.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),UI=/* @__PURE__ */Symbol("internals");function MI(e){return e&&String(e).trim().toLowerCase()}function SI(e){return!1===e||null==e?e:aI.isArray(e)?e.map(SI):String(e)}function kI(e,t,A,r,a){return aI.isFunction(r)?r.call(this,t,A):(a&&(t=A),aI.isString(t)?aI.isString(r)?-1!==t.indexOf(r):aI.isRegExp(r)?r.test(t):void 0:void 0)}let _I=class{constructor(e){e&&this.set(e)}set(e,t,A){const r=this;function a(e,t,A){const a=MI(t);if(!a)throw new Error("header name must be a non-empty string");const n=aI.findKey(r,a);(!n||void 0===r[n]||!0===A||void 0===A&&!1!==r[n])&&(r[n||t]=SI(e))}const n=(e,t)=>aI.forEach(e,(e,A)=>a(e,A,t));if(aI.isPlainObject(e)||e instanceof this.constructor)n(e,t);else if(aI.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))n((e=>{const t={};let A,r,a;return e&&e.split("\n").forEach(function(e){a=e.indexOf(":"),A=e.substring(0,a).trim().toLowerCase(),r=e.substring(a+1).trim(),!A||t[A]&&xI[A]||("set-cookie"===A?t[A]?t[A].push(r):t[A]=[r]:t[A]=t[A]?t[A]+", "+r:r)}),t})(e),t);else if(aI.isObject(e)&&aI.isIterable(e)){let A,r,a={};for(const t of e){if(!aI.isArray(t))throw TypeError("Object iterator must return a key-value pair");a[r=t[0]]=(A=a[r])?aI.isArray(A)?[...A,t[1]]:[A,t[1]]:t[1]}n(a,t)}else null!=e&&a(t,e,A);return this}get(e,t){if(e=MI(e)){const A=aI.findKey(this,e);if(A){const e=this[A];if(!t)return e;if(!0===t)return function(e){const t=/* @__PURE__ */Object.create(null),A=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=A.exec(e);)t[r[1]]=r[2];return t}(e);if(aI.isFunction(t))return t.call(this,e,A);if(aI.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=MI(e)){const A=aI.findKey(this,e);return!(!A||void 0===this[A]||t&&!kI(0,this[A],A,t))}return!1}delete(e,t){const A=this;let r=!1;function a(e){if(e=MI(e)){const a=aI.findKey(A,e);!a||t&&!kI(0,A[a],a,t)||(delete A[a],r=!0)}}return aI.isArray(e)?e.forEach(a):a(e),r}clear(e){const t=Object.keys(this);let A=t.length,r=!1;for(;A--;){const a=t[A];e&&!kI(0,this[a],a,e,!0)||(delete this[a],r=!0)}return r}normalize(e){const t=this,A={};return aI.forEach(this,(r,a)=>{const n=aI.findKey(A,a);if(n)return t[n]=SI(r),void delete t[a];const s=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,A)=>t.toUpperCase()+A)}(a):String(a).trim();s!==a&&delete t[a],t[s]=SI(r),A[s]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=/* @__PURE__ */Object.create(null);return aI.forEach(this,(A,r)=>{null!=A&&!1!==A&&(t[r]=e&&aI.isArray(A)?A.join(", "):A)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const A=new this(e);return t.forEach(e=>A.set(e)),A}static accessor(e){const t=(this[UI]=this[UI]={accessors:{}}).accessors,A=this.prototype;function r(e){const r=MI(e);t[r]||(!function(e,t){const A=aI.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+A,{value:function(e,A,a){return this[r].call(this,t,e,A,a)},configurable:!0})})}(A,e),t[r]=!0)}return aI.isArray(e)?e.forEach(r):r(e),this}};function II(e,t){const A=this||EI,r=t||A,a=_I.from(r.headers);let n=r.data;return aI.forEach(e,function(e){n=e.call(A,n,a.normalize(),t?t.status:void 0)}),a.normalize(),n}function LI(e){return!(!e||!e.__CANCEL__)}_I.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),aI.reduceDescriptors(_I.prototype,({value:e},t)=>{let A=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[A]=e}}}),aI.freezeMethods(_I);let HI=class extends nI{constructor(e,t,A){super(null==e?"canceled":e,nI.ERR_CANCELED,t,A),this.name="CanceledError",this.__CANCEL__=!0}};function OI(e,t,A){const r=A.config.validateStatus;A.status&&r&&!r(A.status)?t(new nI("Request failed with status code "+A.status,[nI.ERR_BAD_REQUEST,nI.ERR_BAD_RESPONSE][Math.floor(A.status/100)-4],A.config,A.request,A)):e(A)}const TI=(e,t,A=3)=>{let r=0;const a=function(e,t){e=e||10;const A=new Array(e),r=new Array(e);let a,n=0,s=0;return t=void 0!==t?t:1e3,function(i){const o=Date.now(),l=r[s];a||(a=o),A[n]=i,r[n]=o;let c=s,u=0;for(;c!==n;)u+=A[c++],c%=e;if(n=(n+1)%e,n===s&&(s=(s+1)%e),o-a<t)return;const d=l&&o-l;return d?Math.round(1e3*u/d):void 0}}(50,250);return function(e,t){let A,r,a=0,n=1e3/t;const s=(t,n=Date.now())=>{a=n,A=null,r&&(clearTimeout(r),r=null),e(...t)};return[(...e)=>{const t=Date.now(),i=t-a;i>=n?s(e,t):(A=e,r||(r=setTimeout(()=>{r=null,s(A)},n-i)))},()=>A&&s(A)]}(A=>{const n=A.loaded,s=A.lengthComputable?A.total:void 0,i=n-r,o=a(i);r=n;e({loaded:n,total:s,progress:s?n/s:void 0,bytes:i,rate:o||void 0,estimated:o&&s&&n<=s?(s-n)/o:void 0,event:A,lengthComputable:null!=s,[t?"download":"upload"]:!0})},A)},PI=(e,t)=>{const A=null!=e;return[r=>t[0]({lengthComputable:A,total:e,loaded:r}),t[1]]},DI=e=>(...t)=>aI.asap(()=>e(...t)),NI=QI.hasStandardBrowserEnv?/* @__PURE__ */((e,t)=>A=>(A=new URL(A,QI.origin),e.protocol===A.protocol&&e.host===A.host&&(t||e.port===A.port)))(new URL(QI.origin),QI.navigator&&/(msie|trident)/i.test(QI.navigator.userAgent)):()=>!0,KI=QI.hasStandardBrowserEnv?{write(e,t,A,r,a,n,s){if("undefined"==typeof document)return;const i=[`${e}=${encodeURIComponent(t)}`];aI.isNumber(A)&&i.push(`expires=${new Date(A).toUTCString()}`),aI.isString(r)&&i.push(`path=${r}`),aI.isString(a)&&i.push(`domain=${a}`),!0===n&&i.push("secure"),aI.isString(s)&&i.push(`SameSite=${s}`),document.cookie=i.join("; ")},read(e){if("undefined"==typeof document)return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read:()=>null,remove(){}};function RI(e,t,A){let r=!("string"==typeof(a=t)&&/^([a-z][a-z\d+\-.]*:)?\/\//i.test(a));var a;return e&&(r||0==A)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const GI=e=>e instanceof _I?{...e}:e;function VI(e,t){t=t||{};const A={};function r(e,t,A,r){return aI.isPlainObject(e)&&aI.isPlainObject(t)?aI.merge.call({caseless:r},e,t):aI.isPlainObject(t)?aI.merge({},t):aI.isArray(t)?t.slice():t}function a(e,t,A,a){return aI.isUndefined(t)?aI.isUndefined(e)?void 0:r(void 0,e,0,a):r(e,t,0,a)}function n(e,t){if(!aI.isUndefined(t))return r(void 0,t)}function s(e,t){return aI.isUndefined(t)?aI.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function i(A,a,n){return n in t?r(A,a):n in e?r(void 0,A):void 0}const o={url:n,method:n,data:n,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:i,headers:(e,t,A)=>a(GI(e),GI(t),0,!0)};return aI.forEach(Object.keys({...e,...t}),function(r){if("__proto__"===r||"constructor"===r||"prototype"===r)return;const n=aI.hasOwnProp(o,r)?o[r]:a,s=n(e[r],t[r],r);aI.isUndefined(s)&&n!==i||(A[r]=s)}),A}const zI=e=>{const t=VI({},e);let{data:A,withXSRFToken:r,xsrfHeaderName:a,xsrfCookieName:n,headers:s,auth:i}=t;if(t.headers=s=_I.from(s),t.url=fI(RI(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),i&&s.set("Authorization","Basic "+btoa((i.username||"")+":"+(i.password?unescape(encodeURIComponent(i.password)):""))),aI.isFormData(A))if(QI.hasStandardBrowserEnv||QI.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if(aI.isFunction(A.getHeaders)){const e=A.getHeaders(),t=["content-type","content-length"];Object.entries(e).forEach(([e,A])=>{t.includes(e.toLowerCase())&&s.set(e,A)})}if(QI.hasStandardBrowserEnv&&(r&&aI.isFunction(r)&&(r=r(t)),r||!1!==r&&NI(t.url))){const e=a&&n&&KI.read(n);e&&s.set(a,e)}return t},jI="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise(function(t,A){const r=zI(e);let a=r.data;const n=_I.from(r.headers).normalize();let s,i,o,l,c,{responseType:u,onUploadProgress:d,onDownloadProgress:h}=r;function p(){l&&l(),c&&c(),r.cancelToken&&r.cancelToken.unsubscribe(s),r.signal&&r.signal.removeEventListener("abort",s)}let f=new XMLHttpRequest;function g(){if(!f)return;const r=_I.from("getAllResponseHeaders"in f&&f.getAllResponseHeaders());OI(function(e){t(e),p()},function(e){A(e),p()},{data:u&&"text"!==u&&"json"!==u?f.response:f.responseText,status:f.status,statusText:f.statusText,headers:r,config:e,request:f}),f=null}f.open(r.method.toUpperCase(),r.url,!0),f.timeout=r.timeout,"onloadend"in f?f.onloadend=g:f.onreadystatechange=function(){f&&4===f.readyState&&(0!==f.status||f.responseURL&&0===f.responseURL.indexOf("file:"))&&setTimeout(g)},f.onabort=function(){f&&(A(new nI("Request aborted",nI.ECONNABORTED,e,f)),f=null)},f.onerror=function(t){const r=t&&t.message?t.message:"Network Error",a=new nI(r,nI.ERR_NETWORK,e,f);a.event=t||null,A(a),f=null},f.ontimeout=function(){let t=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const a=r.transitional||mI;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),A(new nI(t,a.clarifyTimeoutError?nI.ETIMEDOUT:nI.ECONNABORTED,e,f)),f=null},void 0===a&&n.setContentType(null),"setRequestHeader"in f&&aI.forEach(n.toJSON(),function(e,t){f.setRequestHeader(t,e)}),aI.isUndefined(r.withCredentials)||(f.withCredentials=!!r.withCredentials),u&&"json"!==u&&(f.responseType=r.responseType),h&&([o,c]=TI(h,!0),f.addEventListener("progress",o)),d&&f.upload&&([i,l]=TI(d),f.upload.addEventListener("progress",i),f.upload.addEventListener("loadend",l)),(r.cancelToken||r.signal)&&(s=t=>{f&&(A(!t||t.type?new HI(null,e,f):t),f.abort(),f=null)},r.cancelToken&&r.cancelToken.subscribe(s),r.signal&&(r.signal.aborted?s():r.signal.addEventListener("abort",s)));const m=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(r.url);m&&-1===QI.protocols.indexOf(m)?A(new nI("Unsupported protocol "+m+":",nI.ERR_BAD_REQUEST,e)):f.send(a||null)})},$I=(e,t)=>{const{length:A}=e=e?e.filter(Boolean):[];if(t||A){let A,r=new AbortController;const a=function(e){if(!A){A=!0,s();const t=e instanceof Error?e:this.reason;r.abort(t instanceof nI?t:new HI(t instanceof Error?t.message:t))}};let n=t&&setTimeout(()=>{n=null,a(new nI(`timeout of ${t}ms exceeded`,nI.ETIMEDOUT))},t);const s=()=>{e&&(n&&clearTimeout(n),n=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(a):e.removeEventListener("abort",a)}),e=null)};e.forEach(e=>e.addEventListener("abort",a));const{signal:i}=r;return i.unsubscribe=()=>aI.asap(s),i}},qI=function*(e,t){let A=e.byteLength;if(A<t)return void(yield e);let r,a=0;for(;a<A;)r=a+t,yield e.slice(a,r),a=r},WI=async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:A}=await t.read();if(e)break;yield A}}finally{await t.cancel()}},XI=(e,t,A,r)=>{const a=async function*(e,t){for await(const A of WI(e))yield*qI(A,t)}(e,t);let n,s=0,i=e=>{n||(n=!0,r&&r(e))};return new ReadableStream({async pull(e){try{const{done:t,value:r}=await a.next();if(t)return i(),void e.close();let n=r.byteLength;if(A){let e=s+=n;A(e)}e.enqueue(new Uint8Array(r))}catch(t){throw i(t),t}},cancel:e=>(i(e),a.return())},{highWaterMark:2})},{isFunction:JI}=aI,YI=(({Request:e,Response:t})=>({Request:e,Response:t}))(aI.global),{ReadableStream:ZI,TextEncoder:eL}=aI.global,tL=(e,...t)=>{try{return!!e(...t)}catch(A){return!1}},AL=e=>{e=aI.merge.call({skipUndefined:!0},YI,e);const{fetch:t,Request:A,Response:r}=e,a=t?JI(t):"function"==typeof fetch,n=JI(A),s=JI(r);if(!a)return!1;const i=a&&JI(ZI),o=a&&("function"==typeof eL?/* @__PURE__ */(e=>t=>e.encode(t))(new eL):async e=>new Uint8Array(await new A(e).arrayBuffer())),l=n&&i&&tL(()=>{let e=!1;const t=new A(QI.origin,{body:new ZI,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),c=s&&i&&tL(()=>aI.isReadableStream(new r("").body)),u={stream:c&&(e=>e.body)};a&&["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!u[e]&&(u[e]=(t,A)=>{let r=t&&t[e];if(r)return r.call(t);throw new nI(`Response type '${e}' is not supported`,nI.ERR_NOT_SUPPORT,A)})});const d=async(e,t)=>{const r=aI.toFiniteNumber(e.getContentLength());return null==r?(async e=>{if(null==e)return 0;if(aI.isBlob(e))return e.size;if(aI.isSpecCompliantForm(e)){const t=new A(QI.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return aI.isArrayBufferView(e)||aI.isArrayBuffer(e)?e.byteLength:(aI.isURLSearchParams(e)&&(e+=""),aI.isString(e)?(await o(e)).byteLength:void 0)})(t):r};return async e=>{let{url:a,method:s,data:i,signal:o,cancelToken:h,timeout:p,onDownloadProgress:f,onUploadProgress:g,responseType:m,headers:v,withCredentials:y="same-origin",fetchOptions:w}=zI(e),B=t||fetch;m=m?(m+"").toLowerCase():"text";let b=$I([o,h&&h.toAbortSignal()],p),C=null;const Q=b&&b.unsubscribe&&(()=>{b.unsubscribe()});let F;try{if(g&&l&&"get"!==s&&"head"!==s&&0!==(F=await d(v,i))){let e,t=new A(a,{method:"POST",body:i,duplex:"half"});if(aI.isFormData(i)&&(e=t.headers.get("content-type"))&&v.setContentType(e),t.body){const[e,A]=PI(F,TI(DI(g)));i=XI(t.body,65536,e,A)}}aI.isString(y)||(y=y?"include":"omit");const t=n&&"credentials"in A.prototype,o={...w,signal:b,method:s.toUpperCase(),headers:v.normalize().toJSON(),body:i,duplex:"half",credentials:t?y:void 0};C=n&&new A(a,o);let h=await(n?B(C,w):B(a,o));const p=c&&("stream"===m||"response"===m);if(c&&(f||p&&Q)){const e={};["status","statusText","headers"].forEach(t=>{e[t]=h[t]});const t=aI.toFiniteNumber(h.headers.get("content-length")),[A,a]=f&&PI(t,TI(DI(f),!0))||[];h=new r(XI(h.body,65536,A,()=>{a&&a(),Q&&Q()}),e)}m=m||"text";let E=await u[aI.findKey(u,m)||"text"](h,e);return!p&&Q&&Q(),await new Promise((t,A)=>{OI(t,A,{data:E,headers:_I.from(h.headers),status:h.status,statusText:h.statusText,config:e,request:C})})}catch(E){if(Q&&Q(),E&&"TypeError"===E.name&&/Load failed|fetch/i.test(E.message))throw Object.assign(new nI("Network Error",nI.ERR_NETWORK,e,C,E&&E.response),{cause:E.cause||E});throw nI.from(E,E&&E.code,e,C,E&&E.response)}}},rL=/* @__PURE__ */new Map,aL=e=>{let t=e&&e.env||{};const{fetch:A,Request:r,Response:a}=t,n=[r,a,A];let s,i,o=n.length,l=rL;for(;o--;)s=n[o],i=l.get(s),void 0===i&&l.set(s,i=o?/* @__PURE__ */new Map:AL(t)),l=i;return i};aL();const nL={http:null,xhr:jI,fetch:{get:aL}};aI.forEach(nL,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(A){}Object.defineProperty(e,"adapterName",{value:t})}});const sL=e=>`- ${e}`,iL=e=>aI.isFunction(e)||null===e||!1===e;const oL={getAdapter:function(e,t){e=aI.isArray(e)?e:[e];const{length:A}=e;let r,a;const n={};for(let s=0;s<A;s++){let A;if(r=e[s],a=r,!iL(r)&&(a=nL[(A=String(r)).toLowerCase()],void 0===a))throw new nI(`Unknown adapter '${A}'`);if(a&&(aI.isFunction(a)||(a=a.get(t))))break;n[A||"#"+s]=a}if(!a){const e=Object.entries(n).map(([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build"));let t=A?e.length>1?"since :\n"+e.map(sL).join("\n"):" "+sL(e[0]):"as no adapter specified";throw new nI("There is no suitable adapter to dispatch the request "+t,"ERR_NOT_SUPPORT")}return a},adapters:nL};function lL(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new HI(null,e)}function cL(e){lL(e),e.headers=_I.from(e.headers),e.data=II.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return oL.getAdapter(e.adapter||EI.adapter,e)(e).then(function(t){return lL(e),t.data=II.call(e,e.transformResponse,t),t.headers=_I.from(t.headers),t},function(t){return LI(t)||(lL(e),t&&t.response&&(t.response.data=II.call(e,e.transformResponse,t.response),t.response.headers=_I.from(t.response.headers))),Promise.reject(t)})}const uL="1.13.6",dL={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{dL[e]=function(A){return typeof A===e||"a"+(t<1?"n ":" ")+e}});const hL={};dL.transitional=function(e,t,A){return(r,a,n)=>{if(!1===e)throw new nI(function(e,t){return"[Axios v"+uL+"] Transitional option '"+e+"'"+t+(A?". "+A:"")}(a," has been removed"+(t?" in "+t:"")),nI.ERR_DEPRECATED);return t&&!hL[a]&&(hL[a]=!0),!e||e(r,a,n)}},dL.spelling=function(e){return(e,t)=>!0};const pL={assertOptions:function(e,t,A){if("object"!=typeof e)throw new nI("options must be an object",nI.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let a=r.length;for(;a-- >0;){const n=r[a],s=t[n];if(s){const t=e[n],A=void 0===t||s(t,n,e);if(!0!==A)throw new nI("option "+n+" must be "+A,nI.ERR_BAD_OPTION_VALUE);continue}if(!0!==A)throw new nI("Unknown option "+n,nI.ERR_BAD_OPTION)}},validators:dL},fL=pL.validators;let gL=class{constructor(e){this.defaults=e||{},this.interceptors={request:new gI,response:new gI}}async request(e,t){try{return await this._request(e,t)}catch(A){if(A instanceof Error){let e={};Error.captureStackTrace?Error.captureStackTrace(e):e=new Error;const t=e.stack?e.stack.replace(/^.+\n/,""):"";try{A.stack?t&&!String(A.stack).endsWith(t.replace(/^.+\n.+\n/,""))&&(A.stack+="\n"+t):A.stack=t}catch(r){}}throw A}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=VI(this.defaults,t);const{transitional:A,paramsSerializer:r,headers:a}=t;void 0!==A&&pL.assertOptions(A,{silentJSONParsing:fL.transitional(fL.boolean),forcedJSONParsing:fL.transitional(fL.boolean),clarifyTimeoutError:fL.transitional(fL.boolean),legacyInterceptorReqResOrdering:fL.transitional(fL.boolean)},!1),null!=r&&(aI.isFunction(r)?t.paramsSerializer={serialize:r}:pL.assertOptions(r,{encode:fL.function,serialize:fL.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),pL.assertOptions(t,{baseUrl:fL.spelling("baseURL"),withXsrfToken:fL.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let n=a&&aI.merge(a.common,a[t.method]);a&&aI.forEach(["delete","get","head","post","put","patch","common"],e=>{delete a[e]}),t.headers=_I.concat(n,a);const s=[];let i=!0;this.interceptors.request.forEach(function(e){if("function"==typeof e.runWhen&&!1===e.runWhen(t))return;i=i&&e.synchronous;const A=t.transitional||mI;A&&A.legacyInterceptorReqResOrdering?s.unshift(e.fulfilled,e.rejected):s.push(e.fulfilled,e.rejected)});const o=[];let l;this.interceptors.response.forEach(function(e){o.push(e.fulfilled,e.rejected)});let c,u=0;if(!i){const e=[cL.bind(this),void 0];for(e.unshift(...s),e.push(...o),c=e.length,l=Promise.resolve(t);u<c;)l=l.then(e[u++],e[u++]);return l}c=s.length;let d=t;for(;u<c;){const e=s[u++],t=s[u++];try{d=e(d)}catch(h){t.call(this,h);break}}try{l=cL.call(this,d)}catch(h){return Promise.reject(h)}for(u=0,c=o.length;u<c;)l=l.then(o[u++],o[u++]);return l}getUri(e){return fI(RI((e=VI(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}};aI.forEach(["delete","get","head","options"],function(e){gL.prototype[e]=function(t,A){return this.request(VI(A||{},{method:e,url:t,data:(A||{}).data}))}}),aI.forEach(["post","put","patch"],function(e){function t(t){return function(A,r,a){return this.request(VI(a||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:A,data:r}))}}gL.prototype[e]=t(),gL.prototype[e+"Form"]=t(!0)});const mL={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(mL).forEach(([e,t])=>{mL[t]=e});const vL=function e(t){const A=new gL(t),r=p_(gL.prototype.request,A);return aI.extend(r,gL.prototype,A,{allOwnKeys:!0}),aI.extend(r,A,null,{allOwnKeys:!0}),r.create=function(A){return e(VI(t,A))},r}(EI);vL.Axios=gL,vL.CanceledError=HI,vL.CancelToken=class e{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(e){t=e});const A=this;this.promise.then(e=>{if(!A._listeners)return;let t=A._listeners.length;for(;t-- >0;)A._listeners[t](e);A._listeners=null}),this.promise.then=e=>{let t;const r=new Promise(e=>{A.subscribe(e),t=e}).then(e);return r.cancel=function(){A.unsubscribe(t)},r},e(function(e,r,a){A.reason||(A.reason=new HI(e,r,a),t(A.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let t;return{token:new e(function(e){t=e}),cancel:t}}},vL.isCancel=LI,vL.VERSION=uL,vL.toFormData=cI,vL.AxiosError=nI,vL.Cancel=vL.CanceledError,vL.all=function(e){return Promise.all(e)},vL.spread=function(e){return function(t){return e.apply(null,t)}},vL.isAxiosError=function(e){return aI.isObject(e)&&!0===e.isAxiosError},vL.mergeConfig=VI,vL.AxiosHeaders=_I,vL.formToJSON=e=>FI(aI.isHTMLForm(e)?new FormData(e):e),vL.getAdapter=oL.getAdapter,vL.HttpStatusCode=mL,vL.default=vL;const{Axios:yL,AxiosError:wL,CanceledError:BL,isCancel:bL,CancelToken:CL,VERSION:QL,all:FL,Cancel:EL,isAxiosError:xL,spread:UL,toFormData:ML,AxiosHeaders:SL,HttpStatusCode:kL,formToJSON:_L,getAdapter:IL,mergeConfig:LL}=vL,HL=vL.create({baseURL:"http://www.gisx.work/gismap-server",timeout:3e4,withCredentials:!1,headers:{"Content-Type":"application/json; charset=utf-8"},validateStatus:e=>200===e||401===e,transformResponse:[function(e){if("string"==typeof e&&e)try{return JSON.parse(e)}catch(t){return e}return e}]});HL.interceptors.request.use(e=>{const t=sessionStorage.getItem("token");return null!=t&&!1!==e.isAuth&&(e.headers.Authorization=t),e},e=>{Promise.reject(e)}),HL.interceptors.response.use(e=>{const{data:t,status:A}=e;return 401===A?Promise.reject(new Error("您未登录,或者登录已经超时,请先登录!")):t},e=>{let t="";if(e&&e.response){switch(e.response.status){case 302:t="接口重定向了!";break;case 400:t="参数不正确!";break;case 401:t="您未登录,或者登录已经超时,请先登录!";break;case 403:t="您没有权限操作!";break;case 404:t=`请求地址出错: ${e.response.config.url}`;break;case 408:t="请求超时!";break;case 409:t="系统已存在相同数据!";break;case 500:t="服务器内部错误!";break;case 501:t="服务未实现!";break;case 502:t="网关错误!";break;case 503:t="服务不可用!";break;case 504:t="服务暂时无法访问,请稍后再试!";break;case 505:t="HTTP 版本不受支持!";break;default:t="异常问题,请联系管理员!"}return Promise.reject(t)}return Promise.reject(e.message)});const OL={responseType:"json"};async function TL(e,t,A,r,a){let n=e;const s={...OL,...a,...r?.axiosOption||{}};let i={params:t};"get"!==A&&(i={data:t});try{const e=await HL({url:n,method:A,...i,...s,...r});return Promise.resolve(e)}catch(o){return Promise.reject(o)}}class PL{static async get(e,t,A,r){return await TL(e,t,"get",A,r)}static async post(e,t,A,r){return await TL(e,t,"post",A,r)}}class DL extends PL{static login(e){return super.post(wt("login"),e)}static getMenu(e){return super.get(wt("getMenu"),e)}static getModules(e){return super.get(wt("getModules"),e)}static getMapView(e){return super.get(wt("getMapView"),e)}static getLayer(e){return super.get(wt("getLayer"),e)}static getTools(e){return super.get(wt("getTools"),e)}static getTemplate(e){const t=Bt("getTemplate");return super.get(t,e,{baseURL:""},{baseURL:""})}static getQuickSearch(e){const t=Bt("getQuickSearch");return super.get(t,e,{baseURL:""},{baseURL:""})}static getQuickSearchResult(e,t){return super.post(`${e}`,t)}static getTiandituSearch(e,t){const A=e||wt("tiandituSearch");return super.get(`${A}`,t,{isAuth:!1})}}const NL={class:"search-input-wrapper"},KL={class:"gis-search-filter"},RL={key:0,class:"gismap-search-history"},GL={class:"history-items"},VL=["onClick"],zL={class:"history-text"},jL={key:1,class:"gismap-search-result"},$L={class:"search-result-header"},qL={class:"search_header_title"},WL=["onClick"],XL={class:"search-result-item-title"},JL={class:"search_marker"},YL=["innerHTML"],ZL={class:"search-result-item-content"},eH={key:0,class:"search-result-item-content-row-label"},tH={class:"search-result-item-content-row-value"},AH=/* @__PURE__ */o({name:"GisMapSearch",props:{data:{type:Array,default:()=>[]},round:{type:Boolean,default:!1},func:{type:Function,default:void 0},tianditu:{type:Object,default:()=>({})}},setup(e){const A="gismap_search_history",r=e,a=Gt(),{mapHeight:n}=function(e){const A=t(0);return e?(e?.getMap()?.on("resize",()=>{A.value=e?.getMap()?.getContainer()?.clientHeight||0}),l(()=>{e&&(A.value=e?.getMap()?.getContainer()?.clientHeight||0)}),{mapHeight:A}):{mapHeight:A}}(a.value?.adapter),o=t(!0),p=/* @__PURE__ */new Map,g=t(""),m=t(""),v=t(""),y=t("请输入搜索内容"),B=t(""),b=t(),C=t([]),Q=t(!1),F=t(""),E=t([]),x=i(()=>r.data.length>1?350:260),U={specify:"156321000",queryType:"12",start:"0",count:"10",dataTypes:"",show:"2"},M=e=>{if(e){const t=p.get(e);t&&(y.value=t.placeholder||"请输入搜索内容",g.value=t.defaultValue||"",m.value=t.id||"",v.value=t.serviceUrl||"",B.value=t.templateId||"")}},_=()=>{if(!g.value)return void(o.value=!1);if((e=>{if(!e.trim())return;const t=E.value.filter(t=>t!==e);t.unshift(e),t.length>10&&t.pop(),E.value=t,localStorage.setItem(A,JSON.stringify(E.value))})(g.value),b.value=a.value?.templateManager?.getTemplate(B.value),!b.value)return void Xm.error("模板不存在");o.value=!0,Q.value=!0;const e=p.get(m.value);if("tainditu"===e?.name)return void I();if(!v.value)return void(Q.value=!1);const t=r.func||DL.getQuickSearchResult,n=JSON.stringify({key:`%${g.value}%`});t(v.value,n).then(e=>{const t=e.data?.features||[];C.value=t.map((e,t)=>({...e,index:t+1,uuid:Tv(),templateId:B.value||""})),Q.value=!1})},I=()=>{const e={type:"query",tk:a.value?.tdtToken||"",postStr:JSON.stringify(Object.assign({},U,r.tianditu,{keyWord:`%${g.value}%`}))};DL.getTiandituSearch(v.value,e).then(e=>{if(Q.value=!1,1e3===e?.status?.infocode){const t=e?.pois||[];C.value=t.map((e,t)=>({...e,index:t+1,uuid:Tv()}));const A=C.value.map(e=>({id:e.uuid,index:e.index,lngLat:e.lonlat.split(",").map(Number),properties:e,templateId:B.value||""}));H(A)}else Xm.error(e?.status?.cndesc||"搜索失败")})},H=e=>{a.value?.markerManager?.clear(),a.value?.markerManager?.addMarkers(e),a.value?.markerManager?.setOnMarkerClick(e=>{F.value=e.id,a.value?.markerManager?.flyTo(e.id,15,!0)}),e.length>0&&setTimeout(()=>{const t=e[0].id;a.value?.markerManager?.flyTo(t,15,!0)},1e3)},O=()=>{o.value=!1,C.value=[],g.value="",a.value?.markerManager?.clear(),a.value?.events.emit("layer:removePopup",{})},T=()=>{if(0===r.data.length)return;p.clear(),r.data.forEach(e=>{p.set(e.id,e)});const e=r.data[0];e&&M(e.id)},N=(e,t)=>Pv(e[t.fieldName]||"",t);return l(()=>{Ft.templates.forEach(e=>{a.value?.templateManager?.addTemplate(e.id,e)}),T(),(()=>{try{const e=localStorage.getItem(A);e&&(E.value=JSON.parse(e))}catch{E.value=[]}})()}),s(()=>r.data,()=>{T()}),(t,s)=>(c(),u("div",{class:d(["gismap-search",{round:e.round,"no-select":1===r.data.length}])},[P(w(fv),{visible:o.value,width:x.value,trigger:"hover","popper-class":"gismap-search-popover",onClose:O},{reference:D(()=>[h("div",NL,[P(w(bd),{modelValue:g.value,"onUpdate:modelValue":s[0]||(s[0]=e=>g.value=e),placeholder:y.value,size:"large",style:L({width:x.value+"px"}),onKeyup:le(_,["enter"]),onFocus:s[1]||(s[1]=e=>o.value=!0)},{suffix:D(()=>[Q.value?(c(),k(w(cc),{key:1,class:"is-loading"},{default:D(()=>[P(w(Gl))]),_:1})):(c(),k(w(cc),{key:0},{default:D(()=>[P(w(Xl))]),_:1}))]),_:1},8,["modelValue","placeholder","style"])])]),default:D(()=>[h("div",KL,[P(w(Op),{modelValue:m.value,"onUpdate:modelValue":s[2]||(s[2]=e=>m.value=e),onChange:M,size:"small"},{default:D(()=>[(c(!0),u(S,null,ne(r.data,e=>(c(),k(w(Hp),{key:e.id,label:e.id},{default:D(()=>[z(j(e.label),1)]),_:2},1032,["label"]))),128))]),_:1},8,["modelValue"])]),E.value.length>0?(c(),u("div",RL,[h("div",GL,[(c(!0),u(S,null,ne(E.value,(e,t)=>(c(),u("span",{key:t,class:"history-item",onClick:t=>{return A=e,g.value=A,void _();var A}},[P(w(cc),{size:"14"},{default:D(()=>[P(w(Ol))]),_:1}),h("span",zL,j(e),1),P(w(cc),{class:"history-delete",size:"10",onClick:Z(e=>(e=>{E.value.splice(e,1),localStorage.setItem(A,JSON.stringify(E.value))})(t),["stop"])},{default:D(()=>[P(w(Tl))]),_:1},8,["onClick"])],8,VL))),128))])])):f("",!0),C.value.length>0?(c(),u("div",jL,[h("header",$L,[h("span",qL,"搜索结果("+j(C.value.length)+")条",1),h("span",{class:"search_header_close",onClick:O,title:"清除"},[P(w(cc),null,{default:D(()=>[P(w(Tl))]),_:1})])]),h("section",{class:"search-result-content no-scrollbar",style:L({maxHeight:w(n)-280+"px"})},[(c(!0),u(S,null,ne(C.value,e=>{return c(),u("div",{key:e?.uuid,class:d(["search-result-item",{active:e.uuid===F.value}]),onClick:t=>(e=>{e.uuid&&(F.value=e.uuid,a.value?.markerManager?.flyTo(e.uuid,15,!0))})(e)},[h("div",XL,[h("span",JL,j(e.index),1),h("span",{class:"search_value",innerHTML:(t=e,((b.value?.header||"").match(/\{[^}]+\}/g)||[]).map(e=>{const A=e.replace(/[{}]/g,"").split(".").pop()||"";return t[A]||""}).join(" "))},null,8,YL)]),h("div",ZL,[(c(!0),u(S,null,ne(b.value?.body||[],t=>(c(),u("div",{class:"search-result-item-content-row",key:t.fieldName},[t.fieldLabel?(c(),u("div",eH,j(t.fieldLabel)+":",1)):f("",!0),h("div",tH,["tag"===t.fieldType?(c(!0),u(S,{key:0},ne(N(e,t),e=>(c(),k(w(Lh),{key:e,type:"primary"},{default:D(()=>[z(j(e),1)]),_:2},1024))),128)):(c(),u(S,{key:1},[z(j(N(e,t)),1)],64))])]))),128))])],10,WL);var t}),128))],4)])):f("",!0)]),_:1},8,["visible","width"])],2))}}),rH={class:"gismap-mapcompare"},aH={class:"compare-toolbar"},nH={class:"compare-group"},sH={class:"compare-action-group"},iH={class:"compare-group"},oH={class:"compare-direction-group"},lH=/* @__PURE__ */o({name:"GisMapCompareSplit",__name:"Split",props:{active:{type:Boolean,default:!1},direction:{type:String,default:"vertical"}},emits:["update:active","update:direction","toggle","change"],setup(e,{emit:A}){const r=e,a=A,n=t(r.active),i=t(r.direction),o=()=>{n.value=!n.value,a("update:active",n.value),a("toggle"),a("change",{active:n.value,direction:i.value})},l=e=>{i.value=e,a("update:direction",e),a("change",{active:n.value,direction:e})};return s(()=>r.active,e=>{n.value=e}),s(()=>r.direction,e=>{i.value=e}),(e,t)=>(c(),u("div",rH,[h("div",aH,[h("div",nH,[t[2]||(t[2]=h("div",{class:"group-title"},"双屏模式",-1)),h("div",sH,[h("button",{class:d(["compare-btn",{active:n.value}]),onClick:o},j(n.value?"关闭双屏":"开启双屏"),3)])]),n.value?(c(),u(S,{key:0},[h("div",iH,[t[5]||(t[5]=h("div",{class:"group-title"},"分割方向",-1)),h("div",oH,[h("button",{class:d(["compare-btn",{active:"horizontal"===i.value}]),onClick:t[0]||(t[0]=e=>l("horizontal"))},[...t[3]||(t[3]=[h("span",{class:"btn-icon"},"—",-1),h("span",{class:"btn-label"},"水平",-1)])],2),h("button",{class:d(["compare-btn",{active:"vertical"===i.value}]),onClick:t[1]||(t[1]=e=>l("vertical"))},[...t[4]||(t[4]=[h("span",{class:"btn-icon"},"|",-1),h("span",{class:"btn-label"},"垂直",-1)])],2)])]),t[6]||(t[6]=fe('<div class="compare-group"><div class="group-title">图层说明</div><div class="layer-info"><div class="layer-item"><span class="layer-dot map"></span><span class="layer-text">左侧:天地图矢量地图</span></div><div class="layer-item"><span class="layer-dot image"></span><span class="layer-text">右侧:天地图影像地图</span></div></div></div>',1))],64)):f("",!0)])]))}}),cH={class:"gismap-mapcompare"},uH={class:"compare-toolbar"},dH={class:"compare-group"},hH={class:"compare-direction-group"},pH={class:"compare-group"},fH={class:"compare-position-group"},gH={class:"compare-value"},mH=/* @__PURE__ */o({name:"GisMapCompareFrame",__name:"Frame",props:{direction:{type:String,default:"vertical"},initialPercent:{type:Number,default:50}},emits:["update:direction","update:percent","change","confirm","cancel"],setup(e,{emit:A}){const r=e,a=A,{direction:n,percent:i,setDirection:o,setPercent:l,confirm:p,cancel:f}=Hv({direction:r.direction,percent:r.initialPercent}),g=t(r.direction),m=t(r.initialPercent),v=e=>{g.value=e,o(e),a("update:direction",e),a("change",{direction:e,percent:m.value})},y=()=>{o(g.value),l(m.value),p(),a("confirm",{direction:g.value,percent:m.value})},w=()=>{f(),a("cancel")};return s(()=>r.direction,e=>{g.value=e}),s(()=>r.initialPercent,e=>{m.value=e}),s(m,e=>{l(e),a("update:percent",e),a("change",{direction:g.value,percent:e})}),s(n,e=>{g.value=e}),s(i,e=>{m.value=e}),(e,t)=>(c(),u("div",cH,[h("div",uH,[h("div",dH,[t[5]||(t[5]=h("div",{class:"group-title"},"分割方向",-1)),h("div",hH,[h("button",{class:d(["compare-btn",{active:"vertical"===g.value}]),onClick:t[0]||(t[0]=e=>v("vertical"))},[...t[3]||(t[3]=[h("span",{class:"btn-icon"},"|",-1),h("span",{class:"btn-label"},"垂直",-1)])],2),h("button",{class:d(["compare-btn",{active:"horizontal"===g.value}]),onClick:t[1]||(t[1]=e=>v("horizontal"))},[...t[4]||(t[4]=[h("span",{class:"btn-icon"},"—",-1),h("span",{class:"btn-label"},"水平",-1)])],2)])]),h("div",pH,[t[6]||(t[6]=h("div",{class:"group-title"},"分割位置",-1)),h("div",fH,[H(h("input",{type:"range",min:"10",max:"90",step:"1","onUpdate:modelValue":t[2]||(t[2]=e=>m.value=e),class:"compare-slider"},null,512),[[ge,m.value,void 0,{number:!0}]]),h("span",gH,j(m.value)+"%",1)])]),h("div",{class:"compare-group"},[h("div",{class:"compare-action-group"},[h("button",{class:"compare-btn confirm",onClick:y},"确定"),h("button",{class:"compare-btn cancel",onClick:w},"取消")])])])]))}}),vH=/* @__PURE__ */vC(/* @__PURE__ */o({name:"MapCompass",setup(e){const{context:A}=Sv();let r=t(0),a=t(0);const n=()=>{const e=A.value?.adapter?.getMap();e&&(e.setBearing(0),e.setPitch(0))};return l(()=>{const e=A.value?.adapter?.getMap();e&&(r.value=e.getBearing()||0,a.value=e.getPitch()||0,e.on("rotate",()=>{r.value=e.getBearing()||0}),e.on("pitch",()=>{a.value=e.getPitch()||0}))}),(e,t)=>(c(),u("div",{class:"gismap-compass",onClick:n},[(c(),u("svg",{viewBox:"0 0 1024 1024",class:"compass",style:L({transformStyle:"preserve-3d",transform:`rotate(${-w(r)}deg)`})},[...t[0]||(t[0]=[h("path",{d:"M511.552 0l159.616 512.192-159.616 508.16L352 512.384 511.552 0zM512 448a64 64 0 1 0 0 128 64 64 0 0 0 0-128z",fill:"#B6CDFF","p-id":"9383"},null,-1),h("path",{d:"M512 0l160 512H576a64 64 0 1 0-128 0H352L512 0z",fill:"#FF0000","p-id":"9384"},null,-1),h("path",{d:"M751.872 192V58.368h1.024L844.288 192h29.184V9.216h-30.208v131.84h-1.024L751.872 9.216h-29.952V192z",fill:"#606266","p-id":"9385"},null,-1)])],4))]))}}),[["__scopeId","data-v-0ec382dd"]]),yH=/* @__PURE__ */o({name:"GisMapPopupBar",props:{float:{type:String,default:"top"}},setup(e){const A=t(null);return a("popupBarContext",{activeIndex:A,setActiveIndex:e=>{A.value=e}}),(t,A)=>(c(),u("div",{class:d(["gismap-popupbar",e.float])},[p(t.$slots,"default")],2))}}),wH={class:"popup-bar-item-wrapper"},BH={class:"icon-wrapper"},bH={class:"text"},CH={class:"popover-content"},QH=/* @__PURE__ */o({name:"GisMapPopupBarItem",props:{text:{type:String,default:""},iconName:{type:String,default:""},placement:{type:String||void 0,default:"top-start"},visible:{type:Boolean,default:!1},trigger:{type:String||void 0,default:void 0},width:{type:Number,default:260},index:{type:Number,required:!0}},setup(e){const t=e,A=r("popupBarContext",{activeIndex:{value:null},setActiveIndex:e=>{}}),a=i(()=>A.activeIndex.value===t.index),n=()=>{a.value?A.setActiveIndex(null):A.setActiveIndex(t.index)};return l(()=>{t.visible&&A.setActiveIndex(t.index)}),(A,r)=>{const s=cc;return c(),u("div",wH,[P(w(fv),{trigger:e.trigger,placement:e.placement,width:e.width,visible:a.value,teleported:!1,"popper-class":"popup-bar-item-box"},{reference:D(()=>[p(A.$slots,"btn",{},()=>[h("div",{class:d(["gis-map-popup-bar-item",{active:a.value}]),onClick:n},[h("div",BH,[P(s,{size:20},{default:D(()=>[(c(),k(V(w(aQ)(t.iconName))))]),_:1})]),h("div",bH,j(e.text),1)],2)])]),default:D(()=>[h("div",CH,[p(A.$slots,"default")])]),_:3},8,["trigger","placement","width","visible"]),r[0]||(r[0]=h("div",{class:"popup-bar-item-divider"},null,-1))])}}});function FH(){}const EH=Object.assign,xH="undefined"!=typeof window,UH=e=>null!==e&&"object"==typeof e,MH=e=>null!=e,SH=e=>"function"==typeof e,kH=e=>UH(e)&&SH(e.then)&&SH(e.catch),_H=e=>"number"==typeof e||/^\d+(\.\d+)?$/.test(e);function IH(e,t){const A=t.split(".");let r=e;return A.forEach(e=>{var t;r=UH(r)&&null!=(t=r[e])?t:""}),r}function LH(e,t,A){return t.reduce((t,A)=>(t[A]=e[A],t),{})}const HH=e=>Array.isArray(e)?e:[e],OH=null,TH=[Number,String],PH={type:Boolean,default:!0},DH=e=>({type:e,required:!0}),NH=()=>({type:Array,default:()=>[]}),KH=e=>({type:TH,default:e}),RH=e=>({type:String,default:e});var GH="undefined"!=typeof window;function VH(e){return GH?requestAnimationFrame(e):-1}function zH(e){VH(()=>VH(e))}var jH=(e,t)=>({top:0,left:0,right:e,bottom:t,width:e,height:t}),$H=e=>{const t=w(e);if(t===window){const e=t.innerWidth,A=t.innerHeight;return jH(e,A)}return(null==t?void 0:t.getBoundingClientRect)?t.getBoundingClientRect():jH(0,0)};function qH(e){const A=r(e,null);if(A){const e=m(),{link:t,unlink:r,internalChildren:a}=A;t(e),n(()=>r(e));return{parent:A,index:i(()=>a.indexOf(e))}}return{parent:null,index:t(-1)}}var WH,XH,JH=(e,t)=>{const A=e.indexOf(t);return-1===A?e.findIndex(e=>void 0!==t.key&&null!==t.key&&e.type===t.type&&e.key===t.key):A};function YH(e,t,A){const r=function(e){const t=[],A=e=>{Array.isArray(e)&&e.forEach(e=>{var r;U(e)&&(t.push(e),(null==(r=e.component)?void 0:r.subTree)&&(t.push(e.component.subTree),A(e.component.subTree.children)),e.children&&A(e.children))})};return A(e),t}(e.subTree.children);A.sort((e,t)=>JH(r,e.vnode)-JH(r,t.vnode));const a=A.map(e=>e.proxy);t.sort((e,t)=>a.indexOf(e)-a.indexOf(t))}function ZH(e){const t=Q([]),A=Q([]),r=m();return{children:t,linkChildren:n=>{a(e,Object.assign({link:e=>{e.proxy&&(A.push(e),t.push(e.proxy),YH(r,t,A))},unlink:e=>{const r=A.indexOf(e);t.splice(r,1),A.splice(r,1)},children:t,internalChildren:A},n))}}}function eO(e){let t;l(()=>{e(),F(()=>{t=!0})}),ee(()=>{t&&e()})}function tO(e,t,A={}){if(!GH)return;const{target:r=window,passive:a=!1,capture:i=!1}=A;let o,l=!1;const c=A=>{if(l)return;const r=w(A);r&&!o&&(r.addEventListener(e,t,{capture:i,passive:a}),o=!0)},u=A=>{if(l)return;const r=w(A);r&&o&&(r.removeEventListener(e,t,i),o=!1)};let d;return n(()=>u(r)),X(()=>u(r)),eO(()=>c(r)),C(r)&&(d=s(r,(e,t)=>{u(t),c(e)})),()=>{null==d||d(),u(r),l=!0}}var AO,rO=/scroll|auto|overlay/i,aO=GH?window:void 0;function nO(e){return"HTML"!==e.tagName&&"BODY"!==e.tagName&&1===e.nodeType}var sO=/* @__PURE__ */Symbol("van-field");function iO(e){const t=r(sO,null);t&&!t.customValue.value&&(t.customValue.value=e,s(e,()=>{t.resetValidation(),t.validateWithTrigger("onChange")}))}function oO(e,t){"scrollTop"in e?e.scrollTop=t:e.scrollTo(e.scrollX,t)}function lO(){return window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0}function cO(e){oO(window,e),oO(document.body,e)}const uO=!!xH&&/ios|iphone|ipad|ipod/.test(navigator.userAgent.toLowerCase());function dO(e,t){("boolean"!=typeof e.cancelable||e.cancelable)&&e.preventDefault(),t&&(e=>{e.stopPropagation()})(e)}function hO(e){const t=w(e);if(!t)return!1;const A=window.getComputedStyle(t),r="none"===A.display,a=null===t.offsetParent&&"fixed"!==A.position;return r||a}const{width:pO,height:fO}=function(){if(!WH&&(WH=t(0),XH=t(0),GH)){const e=()=>{WH.value=window.innerWidth,XH.value=window.innerHeight};e(),window.addEventListener("resize",e,{passive:!0}),window.addEventListener("orientationchange",e,{passive:!0})}return{width:WH,height:XH}}();function gO(e){if(MH(e))return _H(e)?`${e}px`:String(e)}function mO(e){if(MH(e)){if(Array.isArray(e))return{width:gO(e[0]),height:gO(e[1])};const t=gO(e);return{width:t,height:t}}}const vO=/-(\w)/g,yO=e=>e.replace(vO,(e,t)=>t.toUpperCase()),wO=(e,t,A)=>Math.min(Math.max(e,t),A);function BO(e,t,A){const r=e.indexOf(t);return-1===r?e:"-"===t&&0!==r?e.slice(0,r):e.slice(0,r+1)+e.slice(r).replace(A,"")}const{hasOwnProperty:bO}=Object.prototype;function CO(e,t){return Object.keys(t).forEach(A=>{!function(e,t,A){const r=t[A];MH(r)&&(bO.call(e,A)&&UH(r)?e[A]=CO(Object(e[A]),r):e[A]=r)}(e,t,A)}),e}const QO=t("zh-CN"),FO=Q({"zh-CN":{name:"姓名",tel:"电话",save:"保存",clear:"清空",cancel:"取消",confirm:"确认",delete:"删除",loading:"加载中...",noCoupon:"暂无优惠券",nameEmpty:"请填写姓名",addContact:"添加联系人",telInvalid:"请填写正确的电话",vanCalendar:{end:"结束",start:"开始",title:"日期选择",weekdays:["日","一","二","三","四","五","六"],monthTitle:(e,t)=>`${e}年${t}月`,rangePrompt:e=>`最多选择 ${e} 天`},vanCascader:{select:"请选择"},vanPagination:{prev:"上一页",next:"下一页"},vanPullRefresh:{pulling:"下拉即可刷新...",loosing:"释放即可刷新..."},vanSubmitBar:{label:"合计:"},vanCoupon:{unlimited:"无门槛",discount:e=>`${e}折`,condition:e=>`满${e}元可用`},vanCouponCell:{title:"优惠券",count:e=>`${e}张可用`},vanCouponList:{exchange:"兑换",close:"不使用",enable:"可用",disabled:"不可用",placeholder:"输入优惠码"},vanAddressEdit:{area:"地区",areaEmpty:"请选择地区",addressEmpty:"请填写详细地址",addressDetail:"详细地址",defaultAddress:"设为默认收货地址"},vanAddressList:{add:"新增地址"}}});var EO={messages:()=>FO[QO.value],use(e,t){QO.value=e,this.add({[e]:t})},add(e={}){CO(FO,e)}};function xO(e){const t=yO(e)+".";return(e,...A)=>{const r=EO.messages(),a=IH(r,t+e)||IH(r,e);return SH(a)?a(...A):a}}function UO(e,t){return t?"string"==typeof t?` ${e}--${t}`:Array.isArray(t)?t.reduce((t,A)=>t+UO(e,A),""):Object.keys(t).reduce((A,r)=>A+(t[r]?UO(e,r):""),""):""}function MO(e){return(t,A)=>(t&&"string"!=typeof t&&(A=t,t=""),`${t=t?`${e}__${t}`:e}${UO(t,A)}`)}function SO(e){const t=`van-${e}`;return[t,MO(t),xO(t)]}const kO="van-hairline--surround",_O="van-haptics-feedback",IO=/* @__PURE__ */Symbol("van-form");function LO(e,{args:t=[],done:A,canceled:r,error:a}){if(e){const n=e.apply(null,t);kH(n)?n.then(e=>{e?A():r&&r()}).catch(a||FH):n?A():r&&r()}else A()}function HO(e){return e.install=t=>{const{name:A}=e;A&&(t.component(A,e),t.component(yO(`-${A}`),e))},e}function OO(e,t){return e.reduce((e,A)=>Math.abs(e-t)<Math.abs(A-t)?e:A)}const TO=/* @__PURE__ */Symbol();function PO(e){const t=m();t&&EH(t.proxy,e)}const DO={to:[String,Object],url:String,replace:Boolean};function NO(){const e=m().proxy;return()=>function({to:e,url:t,replace:A,$router:r}){e&&r?r[A?"replace":"push"](e):t&&(A?location.replace(t):location.href=t)}(e)}const[KO,RO]=SO("badge");const GO=HO(o({name:KO,props:{dot:Boolean,max:TH,tag:RH("div"),color:String,offset:Array,content:TH,showZero:PH,position:RH("top-right")},setup(e,{slots:t}){const A=()=>{if(t.content)return!0;const{content:A,showZero:r}=e;return MH(A)&&""!==A&&(r||0!==A&&"0"!==A)},r=()=>{const{dot:r,max:a,content:n}=e;if(!r&&A())return t.content?t.content():MH(a)&&_H(n)&&+n>+a?`${a}+`:n},a=e=>e.startsWith("-")?e.replace("-",""):`-${e}`,n=i(()=>{const A={background:e.color};if(e.offset){const[r,n]=e.offset,{position:s}=e,[i,o]=s.split("-");t.default?(A[i]="number"==typeof n?gO("top"===i?n:-n):"top"===i?gO(n):a(n),A[o]="number"==typeof r?gO("left"===o?r:-r):"left"===o?gO(r):a(r)):(A.marginTop=gO(n),A.marginLeft=gO(r))}return A}),s=()=>{if(A()||e.dot)return P("div",{class:RO([e.position,{dot:e.dot,fixed:!!t.default}]),style:n.value},[r()])};return()=>{if(t.default){const{tag:A}=e;return P(A,{class:RO("wrapper")},{default:()=>[t.default(),s()]})}return s()}}}));let VO=2e3;const[zO,jO]=SO("config-provider"),$O=Symbol(zO);function qO(e={},t={}){Object.keys(e).forEach(A=>{e[A]!==t[A]&&document.documentElement.style.setProperty(A,e[A])}),Object.keys(t).forEach(t=>{e[t]||document.documentElement.style.removeProperty(t)})}o({name:zO,props:{tag:RH("div"),theme:RH("light"),zIndex:Number,themeVars:Object,themeVarsDark:Object,themeVarsLight:Object,themeVarsScope:RH("local"),iconPrefix:String},setup(e,{slots:t}){const A=i(()=>function(e){const t={};return Object.keys(e).forEach(A=>{const r=A.replace(/([A-Z])/g,"-$1").toLowerCase().replace(/^-/,"").replace(/([a-zA-Z])(\d)/g,"$1-$2");t[`--van-${r}`]=e[A]}),t}(EH({},e.themeVars,"dark"===e.theme?e.themeVarsDark:e.themeVarsLight)));if(xH){const t=()=>{document.documentElement.classList.add(`van-theme-${e.theme}`)},r=(t=e.theme)=>{document.documentElement.classList.remove(`van-theme-${t}`)};s(()=>e.theme,(e,A)=>{A&&r(A),t()},{immediate:!0}),ee(t),X(r),E(r),s(A,(t,A)=>{"global"===e.themeVarsScope&&qO(t,A)}),s(()=>e.themeVarsScope,(e,t)=>{"global"===t&&qO({},A.value),"global"===e&&qO(A.value,{})}),"global"===e.themeVarsScope&&qO(A.value,{})}return a($O,e),y(()=>{var t;void 0!==e.zIndex&&(t=e.zIndex,VO=t)}),()=>P(e.tag,{class:jO(),style:"local"===e.themeVarsScope?A.value:void 0},{default:()=>{var e;return[null==(e=t.default)?void 0:e.call(t)]}})}});const[WO,XO]=SO("icon");var JO=o({name:WO,props:{dot:Boolean,tag:RH("i"),name:String,size:TH,badge:TH,color:String,badgeProps:Object,classPrefix:String},setup(e,{slots:t}){const A=r($O,null),a=i(()=>e.classPrefix||(null==A?void 0:A.iconPrefix)||XO());return()=>{const{tag:A,dot:r,name:n,size:s,badge:i,color:o}=e,l=(e=>null==e?void 0:e.includes("/"))(n);return P(GO,I({dot:r,tag:A,class:[a.value,l?"":`${a.value}-${n}`],style:{color:o,fontSize:gO(s)},content:i},e.badgeProps),{default:()=>{var e;return[null==(e=t.default)?void 0:e.call(t),l&&P("img",{class:XO("image"),src:n},null)]}})}}});const YO=HO(JO),[ZO,eT]=SO("loading"),tT=Array(12).fill(null).map((e,t)=>P("i",{class:eT("line",String(t+1))},null)),AT=P("svg",{class:eT("circular"),viewBox:"25 25 50 50"},[P("circle",{cx:"50",cy:"50",r:"20",fill:"none"},null)]);const rT=HO(o({name:ZO,props:{size:TH,type:RH("circular"),color:String,vertical:Boolean,textSize:TH,textColor:String},setup(e,{slots:t}){const A=i(()=>EH({color:e.color},mO(e.size))),r=()=>{const r="spinner"===e.type?tT:AT;return P("span",{class:eT("spinner",e.type),style:A.value},[t.icon?t.icon():r])},a=()=>{var A;if(t.default)return P("span",{class:eT("text"),style:{fontSize:gO(e.textSize),color:null!=(A=e.textColor)?A:e.color}},[t.default()])};return()=>{const{type:t,vertical:A}=e;return P("div",{class:eT([t,{vertical:A}]),"aria-live":"polite","aria-busy":!0},[r(),a()])}}})),[aT,nT]=SO("button");const sT=HO(o({name:aT,props:EH({},DO,{tag:RH("button"),text:String,icon:String,type:RH("default"),size:RH("normal"),color:String,block:Boolean,plain:Boolean,round:Boolean,square:Boolean,loading:Boolean,hairline:Boolean,disabled:Boolean,iconPrefix:String,nativeType:RH("button"),loadingSize:TH,loadingText:String,loadingType:String,iconPosition:RH("left")}),emits:["click"],setup(e,{emit:t,slots:A}){const r=NO(),a=()=>e.loading?A.loading?A.loading():P(rT,{size:e.loadingSize,type:e.loadingType,class:nT("loading")},null):A.icon?P("div",{class:nT("icon")},[A.icon()]):e.icon?P(YO,{name:e.icon,class:nT("icon"),classPrefix:e.iconPrefix},null):void 0,n=()=>{let t;if(t=e.loading?e.loadingText:A.default?A.default():e.text,t)return P("span",{class:nT("text")},[t])},s=()=>{const{color:t,plain:A}=e;if(t){const e={color:A?t:"white"};return A||(e.background=t),t.includes("gradient")?e.border=0:e.borderColor=t,e}},i=A=>{e.loading?dO(A):e.disabled||(t("click",A),r())};return()=>{const{tag:t,type:A,size:r,block:o,round:l,plain:c,square:u,loading:d,disabled:h,hairline:p,nativeType:f,iconPosition:g}=e,m=[nT([A,r,{plain:c,block:o,round:l,square:u,loading:d,disabled:h,hairline:p}]),{[kO]:p}];return P(t,{type:f,class:m,style:s(),disabled:h,onClick:i},{default:()=>[P("div",{class:nT("content")},["left"===g&&a(),n(),"right"===g&&a()])]})}}})),iT={show:Boolean,zIndex:TH,overlay:PH,duration:TH,teleport:[String,Object],lockScroll:PH,lazyRender:PH,beforeClose:Function,overlayProps:Object,overlayStyle:Object,overlayClass:OH,transitionAppear:Boolean,closeOnClickOverlay:PH};function oT(){const e=t(0),A=t(0),r=t(0),a=t(0),n=t(0),s=t(0),i=t(""),o=t(!0),l=()=>{r.value=0,a.value=0,n.value=0,s.value=0,i.value="",o.value=!0};return{move:t=>{const l=t.touches[0];r.value=(l.clientX<0?0:l.clientX)-e.value,a.value=l.clientY-A.value,n.value=Math.abs(r.value),s.value=Math.abs(a.value);var c,u;(!i.value||n.value<10&&s.value<10)&&(i.value=(c=n.value,u=s.value,c>u?"horizontal":u>c?"vertical":"")),o.value&&(n.value>5||s.value>5)&&(o.value=!1)},start:t=>{l(),e.value=t.touches[0].clientX,A.value=t.touches[0].clientY},reset:l,startX:e,startY:A,deltaX:r,deltaY:a,offsetX:n,offsetY:s,direction:i,isVertical:()=>"vertical"===i.value,isHorizontal:()=>"horizontal"===i.value,isTap:o}}let lT=0;const cT="van-overflow-hidden";function uT(e,t){const A=oT(),r=t=>{A.move(t);const r=A.deltaY.value>0?"10":"01",a=function(e,t=aO){let A=e;for(;A&&A!==t&&nO(A);){const{overflowY:e}=window.getComputedStyle(A);if(rO.test(e))return A;A=A.parentNode}return t}(t.target,e.value),{scrollHeight:n,offsetHeight:s,scrollTop:i}=a;let o="11";0===i?o=s>=n?"00":"01":i+s>=n&&(o="10"),"11"===o||!A.isVertical()||parseInt(o,2)&parseInt(r,2)||dO(t,!0)},a=()=>{document.addEventListener("touchstart",A.start),document.addEventListener("touchmove",r,{passive:!1}),lT||document.body.classList.add(cT),lT++},n=()=>{lT&&(document.removeEventListener("touchstart",A.start),document.removeEventListener("touchmove",r),lT--,lT||document.body.classList.remove(cT))},i=()=>t()&&n();eO(()=>t()&&a()),X(i),E(i),s(t,e=>{e?a():n()})}function dT(e){const A=t(!1);return s(e,e=>{e&&(A.value=e)},{immediate:!0}),e=>()=>A.value?e():null}const hT=()=>{var e;const{scopeId:t}=(null==(e=m())?void 0:e.vnode)||{};return t?{[t]:""}:null},[pT,fT]=SO("overlay");const gT=HO(o({name:pT,inheritAttrs:!1,props:{show:Boolean,zIndex:TH,duration:TH,className:OH,lockScroll:PH,lazyRender:PH,customStyle:Object,teleport:[String,Object]},setup(e,{attrs:A,slots:r}){const a=t(),n=dT(()=>e.show||!e.lazyRender)(()=>{var t;const n=EH(function(e){const t={};return void 0!==e&&(t.zIndex=+e),t}(e.zIndex),e.customStyle);return MH(e.duration)&&(n.animationDuration=`${e.duration}s`),H(P("div",I({ref:a,style:n,class:[fT(),e.className]},A),[null==(t=r.default)?void 0:t.call(r)]),[[W,e.show]])});return tO("touchmove",t=>{e.lockScroll&&dO(t,!0)},{target:a}),()=>{const t=P(q,{name:"van-fade",appear:!0},{default:n});return e.teleport?P(_,{to:e.teleport},{default:()=>[t]}):t}}})),mT=EH({},iT,{round:Boolean,position:RH("center"),closeIcon:RH("cross"),closeable:Boolean,transition:String,iconPrefix:String,closeOnPopstate:Boolean,closeIconPosition:RH("top-right"),destroyOnClose:Boolean,safeAreaInsetTop:Boolean,safeAreaInsetBottom:Boolean}),[vT,yT]=SO("popup");const wT=HO(o({name:vT,inheritAttrs:!1,props:mT,emits:["open","close","opened","closed","keydown","update:show","clickOverlay","clickCloseIcon"],setup(e,{emit:A,attrs:r,slots:n}){let o,c;const u=t(),d=t(),h=dT(()=>e.show||!e.lazyRender),p=i(()=>{const t={zIndex:u.value};if(MH(e.duration)){t["center"===e.position?"animationDuration":"transitionDuration"]=`${e.duration}s`}return t}),f=()=>{o||(o=!0,u.value=void 0!==e.zIndex?+e.zIndex:++VO,A("open"))},g=()=>{o&&LO(e.beforeClose,{done(){o=!1,A("close"),A("update:show",!1)}})},m=t=>{A("clickOverlay",t),e.closeOnClickOverlay&&g()},v=()=>{if(e.overlay){const t=EH({show:e.show,class:e.overlayClass,zIndex:u.value,duration:e.duration,customStyle:e.overlayStyle,role:e.closeOnClickOverlay?"button":void 0,tabindex:e.closeOnClickOverlay?0:void 0},e.overlayProps);return P(gT,I(t,hT(),{onClick:m}),{default:n["overlay-content"]})}},y=e=>{A("clickCloseIcon",e),g()},w=()=>{if(e.closeable)return P(YO,{role:"button",tabindex:0,name:e.closeIcon,class:[yT("close-icon",e.closeIconPosition),_O],classPrefix:e.iconPrefix,onClick:y},null)};let B;const b=()=>{B&&clearTimeout(B),B=setTimeout(()=>{A("opened")})},C=()=>A("closed"),Q=e=>A("keydown",e),E=h(()=>{var t;const{destroyOnClose:A,round:a,position:s,safeAreaInsetTop:i,safeAreaInsetBottom:o,show:l}=e;if(l||!A)return H(P("div",I({ref:d,style:p.value,role:"dialog",tabindex:0,class:[yT({round:a,[s]:s}),{"van-safe-area-top":i,"van-safe-area-bottom":o}],onKeydown:Q},r,hT()),[null==(t=n.default)?void 0:t.call(n),w()]),[[W,l]])}),x=()=>{const{position:t,transition:A,transitionAppear:r}=e;return P(q,{name:A||("center"===t?"van-fade":`van-popup-slide-${t}`),appear:r,onAfterEnter:b,onAfterLeave:C},{default:E})};return s(()=>e.show,e=>{e&&!o&&(f(),0===r.tabindex&&F(()=>{var e;null==(e=d.value)||e.focus()})),!e&&o&&(o=!1,A("close"))}),PO({popupRef:d}),uT(d,()=>e.show&&e.lockScroll),tO("popstate",()=>{e.closeOnPopstate&&(g(),c=!1)}),l(()=>{e.show&&f()}),ee(()=>{c&&(A("update:show",!0),c=!1)}),X(()=>{e.show&&e.teleport&&(g(),c=!0)}),a(TO,()=>e.show),()=>e.teleport?P(_,{to:e.teleport},{default:()=>[v(),x()]}):P(S,null,[v(),x()])}}));let BT=0;function bT(){const e=m(),{name:t="unknown"}=(null==e?void 0:e.type)||{};return"test"===process.env.NODE_ENV?t:`${t}-${++BT}`}const[CT,QT]=SO("swipe"),FT={loop:PH,width:TH,height:TH,vertical:Boolean,autoplay:KH(0),duration:KH(500),touchable:PH,lazyRender:Boolean,initialSwipe:KH(0),indicatorColor:String,showIndicators:PH,stopPropagation:PH},ET=Symbol(CT);var xT=o({name:CT,props:FT,emits:["change","dragStart","dragEnd"],setup(e,{emit:A,slots:a}){const n=t(),o=t(),c=Q({rect:null,width:0,height:0,offset:0,active:0,swiping:!1});let u=!1;const d=oT(),{children:h,linkChildren:p}=ZH(ET),f=i(()=>h.length),g=i(()=>c[e.vertical?"height":"width"]),m=i(()=>e.vertical?d.deltaY.value:d.deltaX.value),v=i(()=>{if(c.rect){return(e.vertical?c.rect.height:c.rect.width)-g.value*f.value}return 0}),y=i(()=>g.value?Math.ceil(Math.abs(v.value)/g.value):f.value),w=i(()=>f.value*g.value),B=i(()=>(c.active+f.value)%f.value),b=i(()=>{const t=e.vertical?"vertical":"horizontal";return d.direction.value===t}),C=i(()=>{const t={transitionDuration:`${c.swiping?0:e.duration}ms`,transform:`translate${e.vertical?"Y":"X"}(${+c.offset.toFixed(2)}px)`};if(g.value){const A=e.vertical?"height":"width",r=e.vertical?"width":"height";t[A]=`${w.value}px`,t[r]=e[r]?`${e[r]}px`:""}return t}),x=(t,A=0)=>{let r=t*g.value;e.loop||(r=Math.min(r,-v.value));let a=A-r;return e.loop||(a=wO(a,v.value,0)),a},U=({pace:t=0,offset:r=0,emitChange:a})=>{if(f.value<=1)return;const{active:n}=c,s=(t=>{const{active:A}=c;return t?e.loop?wO(A+t,-1,f.value):wO(A+t,0,y.value):A})(t),i=x(s,r);if(e.loop){if(h[0]&&i!==v.value){const e=i<v.value;h[0].setOffset(e?w.value:0)}if(h[f.value-1]&&0!==i){const e=i>0;h[f.value-1].setOffset(e?-w.value:0)}}c.active=s,c.offset=i,a&&s!==n&&A("change",B.value)},M=()=>{c.swiping=!0,c.active<=-1?U({pace:f.value}):c.active>=f.value&&U({pace:-f.value})},S=()=>{M(),d.reset(),zH(()=>{c.swiping=!1,U({pace:1,emitChange:!0})})};let k;const _=()=>clearTimeout(k),I=()=>{_(),+e.autoplay>0&&f.value>1&&(k=setTimeout(()=>{S(),I()},+e.autoplay))},L=(t=+e.initialSwipe)=>{if(!n.value)return;const A=()=>{var A,r;if(!hO(n)){const t={width:n.value.offsetWidth,height:n.value.offsetHeight};c.rect=t,c.width=+(null!=(A=e.width)?A:t.width),c.height=+(null!=(r=e.height)?r:t.height)}f.value&&-1===(t=Math.min(f.value-1,t))&&(t=f.value-1),c.active=t,c.swiping=!0,c.offset=x(t),h.forEach(e=>{e.setOffset(0)}),I()};hO(n)?F().then(A):A()},H=()=>L(c.active);let O;const T=t=>{!e.touchable||t.touches.length>1||(d.start(t),u=!1,O=Date.now(),_(),M())},D=()=>{if(!e.touchable||!c.swiping)return;const t=Date.now()-O,r=m.value/t;if((Math.abs(r)>.25||Math.abs(m.value)>g.value/2)&&b.value){const t=e.vertical?d.offsetY.value:d.offsetX.value;let A=0;A=e.loop?t>0?m.value>0?-1:1:0:-Math[m.value>0?"ceil":"floor"](m.value/g.value),U({pace:A,emitChange:!0})}else m.value&&U({pace:0});u=!1,c.swiping=!1,A("dragEnd",{index:B.value}),I()},N=(t,A)=>{const r=A===B.value,a=r?{backgroundColor:e.indicatorColor}:void 0;return P("i",{style:a,class:QT("indicator",{active:r})},null)};return PO({prev:()=>{M(),d.reset(),zH(()=>{c.swiping=!1,U({pace:-1,emitChange:!0})})},next:S,state:c,resize:H,swipeTo:(t,A={})=>{M(),d.reset(),zH(()=>{let r;r=e.loop&&t===f.value?0===c.active?0:t:t%f.value,A.immediate?zH(()=>{c.swiping=!1}):c.swiping=!1,U({pace:r-c.active,emitChange:!0})})}}),p({size:g,props:e,count:f,activeIndicator:B}),s(()=>e.initialSwipe,e=>L(+e)),s(f,()=>L(c.active)),s(()=>e.autoplay,I),s([pO,fO,()=>e.width,()=>e.height],H),s(function(){if(!AO&&(AO=t("visible"),GH)){const e=()=>{AO.value=document.hidden?"hidden":"visible"};e(),window.addEventListener("visibilitychange",e)}return AO}(),e=>{"visible"===e?I():_()}),l(L),ee(()=>L(c.active)),function(e){const t=r(TO,null);t&&s(t,t=>{t&&e()})}(()=>L(c.active)),X(_),E(_),tO("touchmove",t=>{if(e.touchable&&c.swiping&&(d.move(t),b.value)){!e.loop&&(0===c.active&&m.value>0||c.active===f.value-1&&m.value<0)||(dO(t,e.stopPropagation),U({offset:m.value}),u||(A("dragStart",{index:B.value}),u=!0))}},{target:o}),()=>{var t;return P("div",{ref:n,class:QT()},[P("div",{ref:o,style:C.value,class:QT("track",{vertical:e.vertical}),onTouchstartPassive:T,onTouchend:D,onTouchcancel:D},[null==(t=a.default)?void 0:t.call(a)]),a.indicator?a.indicator({active:B.value,total:f.value}):e.showIndicators&&f.value>1?P("div",{class:QT("indicators",{vertical:e.vertical})},[Array(f.value).fill("").map(N)]):void 0])}}});const UT=HO(xT),[MT,ST]=SO("swipe-item");var kT=o({name:MT,setup(e,{slots:t}){let A;const r=Q({offset:0,inited:!1,mounted:!1}),{parent:a,index:n}=qH(ET);if(!a)return void process.env.NODE_ENV;const s=i(()=>{const e={},{vertical:t}=a.props;return a.size.value&&(e[t?"height":"width"]=`${a.size.value}px`),r.offset&&(e.transform=`translate${t?"Y":"X"}(${r.offset}px)`),e}),o=i(()=>{const{loop:e,lazyRender:t}=a.props;if(!t||A)return!0;if(!r.mounted)return!1;const s=a.activeIndicator.value,i=a.count.value-1,o=0===s&&e?i:s-1,l=s===i&&e?0:s+1;return A=n.value===s||n.value===o||n.value===l,A});return l(()=>{F(()=>{r.mounted=!0})}),PO({setOffset:e=>{r.offset=e}}),()=>{var e;return P("div",{class:ST(),style:s.value},[o.value?null==(e=t.default)?void 0:e.call(t):null])}}});const _T=HO(kT),[IT,LT]=SO("cell"),HT={tag:RH("div"),icon:String,size:String,title:TH,value:TH,label:TH,center:Boolean,isLink:Boolean,border:PH,iconPrefix:String,valueClass:OH,labelClass:OH,titleClass:OH,titleStyle:null,arrowDirection:String,required:{type:[Boolean,String],default:null},clickable:{type:Boolean,default:null}};var OT=o({name:IT,props:EH({},HT,DO),setup(e,{slots:t}){const A=NO(),r=()=>{if(t.label||MH(e.label))return P("div",{class:[LT("label"),e.labelClass]},[t.label?t.label():e.label])},a=()=>{var A;if(t.title||MH(e.title)){const a=null==(A=t.title)?void 0:A.call(t);if(Array.isArray(a)&&0===a.length)return;return P("div",{class:[LT("title"),e.titleClass],style:e.titleStyle},[a||P("span",null,[e.title]),r()])}},n=()=>{const A=t.value||t.default;if(A||MH(e.value))return P("div",{class:[LT("value"),e.valueClass]},[A?A():P("span",null,[e.value])])},s=()=>{if(t["right-icon"])return t["right-icon"]();if(e.isLink){const t=e.arrowDirection&&"right"!==e.arrowDirection?`arrow-${e.arrowDirection}`:"arrow";return P(YO,{name:t,class:LT("right-icon")},null)}};return()=>{var r;const{tag:i,size:o,center:l,border:c,isLink:u,required:d}=e,h=null!=(r=e.clickable)?r:u,p={center:l,required:!!d,clickable:h,borderless:!c};return o&&(p[o]=!!o),P(i,{class:LT(p),role:h?"button":void 0,tabindex:h?0:void 0,onClick:A},{default:()=>{var A;return[t.icon?t.icon():e.icon?P(YO,{name:e.icon,class:LT("left-icon"),classPrefix:e.iconPrefix},null):void 0,a(),n(),s(),null==(A=t.extra)?void 0:A.call(t)]}})}}});const TT=HO(OT);function PT(e){return Array.isArray(e)?!e.length:0!==e&&!e}function DT(e,t){const{message:A}=t;return SH(A)?A(e,t):A||""}function NT({target:e}){e.composing=!0}function KT({target:e}){e.composing&&(e.composing=!1,e.dispatchEvent(new Event("input")))}function RT(e){return[...e].length}function GT(e,t){return[...e].slice(0,t).join("")}const[VT,zT]=SO("field"),jT={id:String,name:String,leftIcon:String,rightIcon:String,autofocus:Boolean,clearable:Boolean,maxlength:TH,max:Number,min:Number,formatter:Function,clearIcon:RH("clear"),modelValue:KH(""),inputAlign:String,placeholder:String,autocomplete:String,autocapitalize:String,autocorrect:String,errorMessage:String,enterkeyhint:String,clearTrigger:RH("focus"),formatTrigger:RH("onChange"),spellcheck:{type:Boolean,default:null},error:{type:Boolean,default:null},disabled:{type:Boolean,default:null},readonly:{type:Boolean,default:null},inputmode:String};var $T=o({name:VT,props:EH({},HT,jT,{rows:TH,type:RH("text"),rules:Array,autosize:[Boolean,Object],labelWidth:TH,labelClass:OH,labelAlign:String,showWordLimit:Boolean,errorMessageAlign:String,colon:{type:Boolean,default:null}}),emits:["blur","focus","clear","keypress","clickInput","endValidate","startValidate","clickLeftIcon","clickRightIcon","update:modelValue"],setup(e,{emit:A,slots:r}){const n=bT(),o=Q({status:"unvalidated",focused:!1,validateMessage:""}),c=t(),u=t(),d=t(),{parent:h}=qH(IO),p=()=>{var t;return String(null!=(t=e.modelValue)?t:"")},f=t=>MH(e[t])?e[t]:h&&MH(h.props[t])?h.props[t]:void 0,g=i(()=>{const t=f("readonly");if(e.clearable&&!t){const t=""!==p(),A="always"===e.clearTrigger||"focus"===e.clearTrigger&&o.focused;return t&&A}return!1}),m=i(()=>d.value&&r.input?d.value():e.modelValue),v=i(()=>{var t;const A=f("required");return"auto"===A?null==(t=e.rules)?void 0:t.some(e=>e.required):A}),y=e=>e.reduce((e,t)=>e.then(()=>{if("failed"===o.status)return;let{value:e}=m;if(t.formatter&&(e=t.formatter(e,t)),!function(e,t){if(PT(e)){if(t.required)return!1;if(!1===t.validateEmpty)return!0}return!(t.pattern&&!t.pattern.test(String(e)))}(e,t))return o.status="failed",void(o.validateMessage=DT(e,t));if(t.validator){if(PT(e)&&!1===t.validateEmpty)return;return function(e,t){return new Promise(A=>{const r=t.validator(e,t);kH(r)?r.then(A):A(r)})}(e,t).then(A=>{A&&"string"==typeof A?(o.status="failed",o.validateMessage=A):!1===A&&(o.status="failed",o.validateMessage=DT(e,t))})}}),Promise.resolve()),w=()=>{o.status="unvalidated",o.validateMessage=""},B=()=>A("endValidate",{status:o.status,message:o.validateMessage}),b=(t=e.rules)=>new Promise(r=>{w(),t?(A("startValidate"),y(t).then(()=>{"failed"===o.status?(r({name:e.name,message:o.validateMessage}),B()):(o.status="passed",r(),B())})):r()}),C=t=>{if(h&&e.rules){const{validateTrigger:A}=h.props,r=HH(A).includes(t),a=e.rules.filter(e=>e.trigger?HH(e.trigger).includes(t):r);a.length&&b(a)}},E=(t,r="onChange")=>{var a,n;const s=t;t=(t=>{var A;const{maxlength:r}=e;if(MH(r)&&RT(t)>+r){const e=p();if(e&&RT(e)===+r)return e;const a=null==(A=c.value)?void 0:A.selectionEnd;if(o.focused&&a){const e=[...t],A=e.length-+r;return e.splice(a-A,A),e.join("")}return GT(t,+r)}return t})(t);const i=s.length-t.length;if("number"===e.type||"digit"===e.type){const A="number"===e.type;if(t=function(e,t=!0,A=!0){e=t?BO(e,".",/\./g):e.split(".")[0];const r=t?/[^-0-9.]/g:/[^-0-9]/g;return(e=A?BO(e,"-",/-/g):e.replace(/-/,"")).replace(r,"")}(t,A,A),"onBlur"===r&&""!==t&&(void 0!==e.min||void 0!==e.max)){const A=wO(+t,null!=(a=e.min)?a:-1/0,null!=(n=e.max)?n:1/0);+t!==A&&(t=A.toString())}}let l=0;if(e.formatter&&r===e.formatTrigger){const{formatter:A,maxlength:r}=e;if(t=A(t),MH(r)&&RT(t)>+r&&(t=GT(t,+r)),c.value&&o.focused){const{selectionEnd:e}=c.value,t=GT(s,e);l=A(t).length-t.length}}if(c.value&&c.value.value!==t)if(o.focused){let{selectionStart:e,selectionEnd:A}=c.value;if(c.value.value=t,MH(e)&&MH(A)){const r=t.length;i?(e-=i,A-=i):l&&(e+=l,A+=l),c.value.setSelectionRange(Math.min(e,r),Math.min(A,r))}}else c.value.value=t;t!==e.modelValue&&A("update:modelValue",t)},x=e=>{e.target.composing||E(e.target.value)},U=()=>{var e;return null==(e=c.value)?void 0:e.blur()},M=()=>{var e;return null==(e=c.value)?void 0:e.focus()},S=()=>{const t=c.value;"textarea"===e.type&&e.autosize&&t&&function(e,t){const A=lO();e.style.height="auto";let r=e.scrollHeight;if(UH(t)){const{maxHeight:e,minHeight:A}=t;void 0!==e&&(r=Math.min(r,e)),void 0!==A&&(r=Math.max(r,A))}r&&(e.style.height=`${r}px`,cO(A))}(t,e.autosize)},k=e=>{o.focused=!0,A("focus",e),F(S),f("readonly")&&U()},_=e=>{o.focused=!1,E(p(),"onBlur"),A("blur",e),f("readonly")||(C("onBlur"),F(S),uO&&cO(lO()))},L=e=>A("clickInput",e),H=e=>A("clickLeftIcon",e),O=e=>A("clickRightIcon",e),T=i(()=>"boolean"==typeof e.error?e.error:!(!h||!h.props.showError||"failed"!==o.status)||void 0),D=i(()=>{const e=f("labelWidth"),t=f("labelAlign");if(e&&"top"!==t)return{width:gO(e)}}),N=t=>{if(13===t.keyCode){h&&h.props.submitOnEnter||"textarea"===e.type||dO(t),"search"===e.type&&U()}A("keypress",t)},K=()=>e.id||`${n}-input`,R=()=>{const t=zT("control",[f("inputAlign"),{error:T.value,custom:!!r.input,"min-height":"textarea"===e.type&&!e.autosize}]);if(r.input)return P("div",{class:t,onClick:L},[r.input()]);const A={id:K(),ref:c,name:e.name,rows:void 0!==e.rows?+e.rows:void 0,class:t,disabled:f("disabled"),readonly:f("readonly"),autofocus:e.autofocus,placeholder:e.placeholder,autocomplete:e.autocomplete,autocapitalize:e.autocapitalize,autocorrect:e.autocorrect,enterkeyhint:e.enterkeyhint,spellcheck:e.spellcheck,"aria-labelledby":e.label?`${n}-label`:void 0,"data-allow-mismatch":"attribute",onBlur:_,onFocus:k,onInput:x,onClick:L,onChange:KT,onKeypress:N,onCompositionend:KT,onCompositionstart:NT};return"textarea"===e.type?P("textarea",I(A,{inputmode:e.inputmode}),null):P("input",I((a=e.type,s=e.inputmode,"number"===a&&(a="text",null!=s||(s="decimal")),"digit"===a&&(a="tel",null!=s||(s="numeric")),{type:a,inputmode:s}),A),null);var a,s},G=()=>{const t=r["right-icon"];if(e.rightIcon||t)return P("div",{class:zT("right-icon"),onClick:O},[t?t():P(YO,{name:e.rightIcon,classPrefix:e.iconPrefix},null)])},V=()=>{if(e.showWordLimit&&e.maxlength){const t=RT(p());return P("div",{class:zT("word-limit")},[P("span",{class:zT("word-num")},[t]),z("/"),e.maxlength])}},j=()=>{if(h&&!1===h.props.showErrorMessage)return;const t=e.errorMessage||o.validateMessage;if(t){const e=r["error-message"],A=f("errorMessageAlign");return P("div",{class:zT("error-message",A)},[e?e({message:t}):t])}},$=()=>[P("div",{class:zT("body")},[R(),g.value&&P(YO,{ref:u,name:e.clearIcon,class:zT("clear")},null),G(),r.button&&P("div",{class:zT("button")},[r.button()])]),V(),j()];return PO({blur:U,focus:M,validate:b,formValue:m,resetValidation:w,getValidationStatus:()=>o.status}),a(sO,{customValue:d,resetValidation:w,validateWithTrigger:C}),s(()=>e.modelValue,()=>{E(p()),w(),C("onChange"),F(S)}),l(()=>{E(p(),e.formatTrigger),F(S)}),tO("touchstart",e=>{dO(e),A("update:modelValue",""),A("clear",e)},{target:i(()=>{var e;return null==(e=u.value)?void 0:e.$el})}),()=>{const t=f("disabled"),A=f("labelAlign"),a=(()=>{const t=r["left-icon"];if(e.leftIcon||t)return P("div",{class:zT("left-icon"),onClick:H},[t?t():P(YO,{name:e.leftIcon,classPrefix:e.iconPrefix},null)])})();return P(TT,{size:e.size,class:zT({error:T.value,disabled:t,[`label-${A}`]:A}),center:e.center,border:e.border,isLink:e.isLink,clickable:e.clickable,titleStyle:D.value,valueClass:zT("value"),titleClass:[zT("label",[A,{required:v.value}]),e.labelClass],arrowDirection:e.arrowDirection},{icon:a&&"top"!==A?()=>a:null,title:()=>{const t=(()=>{const t=f("labelWidth"),A=f("labelAlign"),a=f("colon")?":":"";return r.label?[r.label(),a]:e.label?P("label",{id:`${n}-label`,for:r.input?void 0:K(),"data-allow-mismatch":"attribute",onClick:e=>{dO(e),M()},style:"top"===A&&t?{width:gO(t)}:void 0},[e.label+a]):void 0})();return"top"===A?[a,t].filter(Boolean):t||[]},value:$,extra:r.extra})}}});const qT=HO($T);let WT=0;const[XT,JT]=SO("toast"),YT=["show","overlay","teleport","transition","overlayClass","overlayStyle","closeOnClickOverlay","zIndex"];var ZT,eP=o({name:XT,props:{icon:String,show:Boolean,type:RH("text"),overlay:Boolean,message:TH,iconSize:TH,duration:(ZT=2e3,{type:Number,default:ZT}),position:RH("middle"),teleport:[String,Object],wordBreak:String,className:OH,iconPrefix:String,transition:RH("van-fade"),loadingType:String,forbidClick:Boolean,overlayClass:OH,overlayStyle:Object,closeOnClick:Boolean,closeOnClickOverlay:Boolean,zIndex:TH},emits:["update:show"],setup(e,{emit:t,slots:A}){let r,a=!1;const i=()=>{const t=e.show&&e.forbidClick;a!==t&&(a=t,a?(WT||document.body.classList.add("van-toast--unclickable"),WT++):WT&&(WT--,WT||document.body.classList.remove("van-toast--unclickable")))},o=e=>t("update:show",e),c=()=>{e.closeOnClick&&o(!1)},u=()=>clearTimeout(r),d=()=>{const{icon:t,type:A,iconSize:r,iconPrefix:a,loadingType:n}=e;return t||"success"===A||"fail"===A?P(YO,{name:t||A,size:r,class:JT("icon"),classPrefix:a},null):"loading"===A?P(rT,{class:JT("loading"),size:r,type:n},null):void 0},h=()=>{const{type:t,message:r}=e;return A.message?P("div",{class:JT("text")},[A.message()]):MH(r)&&""!==r?"html"===t?P("div",{key:0,class:JT("text"),innerHTML:String(r)},null):P("div",{class:JT("text")},[r]):void 0};return s(()=>[e.show,e.forbidClick],i),s(()=>[e.show,e.type,e.message,e.duration],()=>{u(),e.show&&e.duration>0&&(r=setTimeout(()=>{o(!1)},e.duration))}),l(i),n(i),()=>P(wT,I({class:[JT([e.position,"normal"===e.wordBreak?"break-normal":e.wordBreak,{[e.type]:!e.icon}]),e.className],lockScroll:!1,onClick:c,onClosed:u,"onUpdate:show":o},LH(e,YT)),{default:()=>[d(),h()]})}});function tP(){const e=Q({show:!1}),t=t=>{e.show=t},A=A=>{EH(e,A,{transitionAppear:!0}),t(!0)},r=()=>t(!1);return PO({open:A,close:r,toggle:t}),{open:A,close:r,state:e,toggle:t}}function AP(e){const t=me(e),A=document.createElement("div");return document.body.appendChild(A),{instance:t.mount(A),unmount(){t.unmount(),document.body.removeChild(A)}}}let rP=[],aP=EH({},{icon:"",type:"text",message:"",className:"",overlay:!1,onClose:void 0,onOpened:void 0,duration:2e3,teleport:"body",iconSize:void 0,iconPrefix:void 0,position:"middle",transition:"van-fade",forbidClick:!1,loadingType:void 0,overlayClass:"",overlayStyle:void 0,closeOnClick:!1,closeOnClickOverlay:!1});const nP=/* @__PURE__ */new Map;function sP(){if(!rP.length){const e=function(){const{instance:e}=AP({setup(){const e=t(""),{open:A,state:r,close:a,toggle:n}=tP(),i=()=>{};return s(e,e=>{r.message=e}),m().render=()=>P(eP,I(r,{onClosed:i,"onUpdate:show":n}),null),{open:A,close:a,message:e}}});return e}();rP.push(e)}return rP[rP.length-1]}function iP(e={}){if(!xH)return{};const t=sP(),A=UH(r=e)?r:{message:r};var r;return t.open(EH({},aP,nP.get(A.type||aP.type),A)),t}HO(eP);const[oP,lP]=SO("switch");const cP=HO(o({name:oP,props:{size:TH,loading:Boolean,disabled:Boolean,modelValue:OH,activeColor:String,inactiveColor:String,activeValue:{type:OH,default:!0},inactiveValue:{type:OH,default:!1}},emits:["change","update:modelValue"],setup(e,{emit:t,slots:A}){const r=()=>e.modelValue===e.activeValue,a=()=>{if(!e.disabled&&!e.loading){const A=r()?e.inactiveValue:e.activeValue;t("update:modelValue",A),t("change",A)}},n=()=>{if(e.loading){const t=r()?e.activeColor:e.inactiveColor;return P(rT,{class:lP("loading"),color:t},null)}if(A.node)return A.node()};return iO(()=>e.modelValue),()=>{var t;const{size:s,loading:i,disabled:o,activeColor:l,inactiveColor:c}=e,u=r(),d={fontSize:gO(s),backgroundColor:u?l:c};return P("div",{role:"switch",class:lP({on:u,loading:i,disabled:o}),style:d,tabindex:o?void 0:0,"aria-checked":u,onClick:a},[P("div",{class:lP("node")},[n()]),null==(t=A.background)?void 0:t.call(A)])}}})),[uP,dP]=SO("radio-group"),hP={shape:String,disabled:Boolean,iconSize:TH,direction:String,modelValue:OH,checkedColor:String},pP=Symbol(uP);const fP=HO(o({name:uP,props:hP,emits:["change","update:modelValue"],setup(e,{emit:t,slots:A}){const{linkChildren:r}=ZH(pP);return s(()=>e.modelValue,e=>t("change",e)),r({props:e,updateValue:e=>t("update:modelValue",e)}),iO(()=>e.modelValue),()=>{var t;return P("div",{class:dP([e.direction]),role:"radiogroup"},[null==(t=A.default)?void 0:t.call(A)])}}})),[gP,mP]=SO("tag");const vP=HO(o({name:gP,props:{size:String,mark:Boolean,show:PH,type:RH("default"),color:String,plain:Boolean,round:Boolean,textColor:String,closeable:Boolean},emits:["close"],setup(e,{slots:t,emit:A}){const r=e=>{e.stopPropagation(),A("close",e)},a=()=>{var A;const{type:a,mark:n,plain:s,round:i,size:o,closeable:l}=e,c={mark:n,plain:s,round:i};o&&(c[o]=o);const u=l&&P(YO,{name:"cross",class:[mP("close"),_O],onClick:r},null);return P("span",{style:e.plain?{color:e.textColor||e.color,borderColor:e.color}:{color:e.textColor,background:e.color},class:mP([c,a])},[null==(A=t.default)?void 0:A.call(t),u])};return()=>P(q,{name:e.closeable?"van-fade":void 0},{default:()=>[e.show?a():null]})}})),yP={name:OH,disabled:Boolean,iconSize:TH,modelValue:OH,checkedColor:String,labelPosition:String,labelDisabled:Boolean};var wP=o({props:EH({},yP,{bem:DH(Function),role:String,shape:String,parent:Object,checked:Boolean,bindGroup:PH,indeterminate:{type:Boolean,default:null}}),emits:["click","toggle"],setup(e,{emit:A,slots:r}){const a=t(),n=t=>{if(e.parent&&e.bindGroup)return e.parent.props[t]},s=i(()=>{if(e.parent&&e.bindGroup){const t=n("disabled")||e.disabled;if("checkbox"===e.role){const A=n("modelValue").length,r=n("max");return t||r&&A>=+r&&!e.checked}return t}return e.disabled}),o=i(()=>n("direction")),l=i(()=>{const t=e.checkedColor||n("checkedColor");if(t&&(e.checked||e.indeterminate)&&!s.value)return{borderColor:t,backgroundColor:t}}),c=i(()=>e.shape||n("shape")||"round"),u=t=>{const{target:r}=t,n=a.value,i=n===r||(null==n?void 0:n.contains(r));s.value||!i&&e.labelDisabled||A("toggle"),A("click",t)},d=()=>{var t,A;const{bem:i,checked:o,indeterminate:u}=e,d=e.iconSize||n("iconSize");return P("div",{ref:a,class:i("icon",[c.value,{disabled:s.value,checked:o,indeterminate:u}]),style:"dot"!==c.value?{fontSize:gO(d)}:{width:gO(d),height:gO(d),borderColor:null==(t=l.value)?void 0:t.borderColor}},[r.icon?r.icon({checked:o,disabled:s.value}):"dot"!==c.value?P(YO,{name:u?"minus":"success",style:l.value},null):P("div",{class:i("icon--dot__icon"),style:{backgroundColor:null==(A=l.value)?void 0:A.backgroundColor}},null)])},h=()=>{const{checked:t}=e;if(r.default)return P("span",{class:e.bem("label",[e.labelPosition,{disabled:s.value}])},[r.default({checked:t,disabled:s.value})])};return()=>{const t="left"===e.labelPosition?[h(),d()]:[d(),h()];return P("div",{role:e.role,class:e.bem([{disabled:s.value,"label-disabled":e.labelDisabled},o.value]),tabindex:s.value?void 0:0,"aria-checked":e.checked,onClick:u},[t])}}});const BP=EH({},yP,{shape:String}),[bP,CP]=SO("radio");const QP=HO(o({name:bP,props:BP,emits:["update:modelValue"],setup(e,{emit:t,slots:A}){const{parent:r}=qH(pP),a=()=>{r?r.updateValue(e.name):t("update:modelValue",e.name)};return()=>P(wP,I({bem:CP,role:"radio",parent:r,checked:(r?r.props.modelValue:e.modelValue)===e.name,onToggle:a},e),LH(A,["default","icon"]))}})),[FP,EP]=SO("image");var xP=o({name:FP,props:{src:String,alt:String,fit:String,position:String,round:Boolean,block:Boolean,width:TH,height:TH,radius:TH,lazyLoad:Boolean,iconSize:TH,showError:PH,errorIcon:RH("photo-fail"),iconPrefix:String,showLoading:PH,loadingIcon:RH("photo"),crossorigin:String,referrerpolicy:String,decoding:String},emits:["load","error"],setup(e,{emit:A,slots:r}){const a=t(!1),n=t(!0),o=t(),{$Lazyload:c}=m().proxy,u=i(()=>{const t={width:gO(e.width),height:gO(e.height)};return MH(e.radius)&&(t.overflow="hidden",t.borderRadius=gO(e.radius)),t});s(()=>e.src,()=>{a.value=!1,n.value=!0});const d=e=>{n.value&&(n.value=!1,A("load",e))},h=()=>{const e=new Event("load");Object.defineProperty(e,"target",{value:o.value,enumerable:!0}),d(e)},p=e=>{a.value=!0,n.value=!1,A("error",e)},f=(t,A,r)=>r?r():P(YO,{name:t,size:e.iconSize,class:A,classPrefix:e.iconPrefix},null),g=()=>{if(a.value||!e.src)return;const t={alt:e.alt,class:EP("img"),decoding:e.decoding,style:{objectFit:e.fit,objectPosition:e.position},crossorigin:e.crossorigin,referrerpolicy:e.referrerpolicy};return e.lazyLoad?H(P("img",I({ref:o},t),null),[[re("lazy"),e.src]]):P("img",I({ref:o,src:e.src,onLoad:d,onError:p},t),null)},v=({el:e})=>{const t=()=>{e===o.value&&n.value&&h()};o.value?t():F(t)},y=({el:e})=>{e!==o.value||a.value||p()};return c&&xH&&(c.$on("loaded",v),c.$on("error",y),E(()=>{c.$off("loaded",v),c.$off("error",y)})),l(()=>{F(()=>{var t;(null==(t=o.value)?void 0:t.complete)&&!e.lazyLoad&&h()})}),()=>{var t;return P("div",{class:EP({round:e.round,block:e.block}),style:u.value},[g(),n.value&&e.showLoading?P("div",{class:EP("loading")},[f(e.loadingIcon,EP("loading-icon"),r.loading)]):a.value&&e.showError?P("div",{class:EP("error")},[f(e.errorIcon,EP("error-icon"),r.error)]):void 0,null==(t=r.default)?void 0:t.call(r)])}}});const UP=HO(xP),[MP,SP]=SO("empty");const kP=HO(o({name:MP,props:{image:RH("default"),imageSize:[Number,String,Array],description:String},setup(e,{slots:t}){const A=()=>{const A=t.description?t.description():e.description;if(A)return P("p",{class:SP("description")},[A])},r=()=>{if(t.default)return P("div",{class:SP("bottom")},[t.default()])},a=bT(),n=e=>`${a}-${e}`,s=e=>`url(#${n(e)})`,i=(e,t,A)=>P("stop",{"stop-color":e,offset:`${t}%`,"stop-opacity":A},null),o=(e,t)=>[i(e,0),i(t,100)],l=e=>[P("defs",null,[P("radialGradient",{id:n(e),cx:"50%",cy:"54%",fx:"50%",fy:"54%",r:"297%",gradientTransform:"matrix(-.16 0 0 -.33 .58 .72)","data-allow-mismatch":"attribute"},[i("#EBEDF0",0),i("#F2F3F5",100,.3)])]),P("ellipse",{fill:s(e),opacity:".8",cx:"80",cy:"140",rx:"46",ry:"8","data-allow-mismatch":"attribute"},null)],c=()=>[P("defs",null,[P("linearGradient",{id:n("a"),x1:"64%",y1:"100%",x2:"64%","data-allow-mismatch":"attribute"},[i("#FFF",0,.5),i("#F2F3F5",100)])]),P("g",{opacity:".8","data-allow-mismatch":"children"},[P("path",{d:"M36 131V53H16v20H2v58h34z",fill:s("a")},null),P("path",{d:"M123 15h22v14h9v77h-31V15z",fill:s("a")},null)])],u=()=>[P("defs",null,[P("linearGradient",{id:n("b"),x1:"64%",y1:"97%",x2:"64%",y2:"0%","data-allow-mismatch":"attribute"},[i("#F2F3F5",0,.3),i("#F2F3F5",100)])]),P("g",{opacity:".8","data-allow-mismatch":"children"},[P("path",{d:"M87 6c3 0 7 3 8 6a8 8 0 1 1-1 16H80a7 7 0 0 1-8-6c0-4 3-7 6-7 0-5 4-9 9-9Z",fill:s("b")},null),P("path",{d:"M19 23c2 0 3 1 4 3 2 0 4 2 4 4a4 4 0 0 1-4 3v1h-7v-1l-1 1c-2 0-3-2-3-4 0-1 1-3 3-3 0-2 2-4 4-4Z",fill:s("b")},null)])],d=()=>P("svg",{viewBox:"0 0 160 160"},[P("defs",{"data-allow-mismatch":"children"},[P("linearGradient",{id:n(1),x1:"64%",y1:"100%",x2:"64%"},[i("#FFF",0,.5),i("#F2F3F5",100)]),P("linearGradient",{id:n(2),x1:"50%",x2:"50%",y2:"84%"},[i("#EBEDF0",0),i("#DCDEE0",100,0)]),P("linearGradient",{id:n(3),x1:"100%",x2:"100%",y2:"100%"},[o("#EAEDF0","#DCDEE0")]),P("radialGradient",{id:n(4),cx:"50%",cy:"0%",fx:"50%",fy:"0%",r:"100%",gradientTransform:"matrix(0 1 -.54 0 .5 -.5)"},[i("#EBEDF0",0),i("#FFF",100,0)])]),P("g",{fill:"none"},[c(),P("path",{fill:s(4),d:"M0 139h160v21H0z","data-allow-mismatch":"attribute"},null),P("path",{d:"M80 54a7 7 0 0 1 3 13v27l-2 2h-2a2 2 0 0 1-2-2V67a7 7 0 0 1 3-13z",fill:s(2),"data-allow-mismatch":"attribute"},null),P("g",{opacity:".6","stroke-linecap":"round","stroke-width":"7","data-allow-mismatch":"children"},[P("path",{d:"M64 47a19 19 0 0 0-5 13c0 5 2 10 5 13",stroke:s(3)},null),P("path",{d:"M53 36a34 34 0 0 0 0 48",stroke:s(3)},null),P("path",{d:"M95 73a19 19 0 0 0 6-13c0-5-2-9-6-13",stroke:s(3)},null),P("path",{d:"M106 84a34 34 0 0 0 0-48",stroke:s(3)},null)]),P("g",{transform:"translate(31 105)"},[P("rect",{fill:"#EBEDF0",width:"98",height:"34",rx:"2"},null),P("rect",{fill:"#FFF",x:"9",y:"8",width:"80",height:"18",rx:"1.1"},null),P("rect",{fill:"#EBEDF0",x:"15",y:"12",width:"18",height:"6",rx:"1.1"},null)])])]),h=()=>P("svg",{viewBox:"0 0 160 160"},[P("defs",{"data-allow-mismatch":"children"},[P("linearGradient",{x1:"50%",x2:"50%",y2:"100%",id:n(5)},[o("#F2F3F5","#DCDEE0")]),P("linearGradient",{x1:"95%",y1:"48%",x2:"5.5%",y2:"51%",id:n(6)},[o("#EAEDF1","#DCDEE0")]),P("linearGradient",{y1:"45%",x2:"100%",y2:"54%",id:n(7)},[o("#EAEDF1","#DCDEE0")])]),c(),u(),P("g",{transform:"translate(36 50)",fill:"none"},[P("g",{transform:"translate(8)"},[P("rect",{fill:"#EBEDF0",opacity:".6",x:"38",y:"13",width:"36",height:"53",rx:"2"},null),P("rect",{fill:s(5),width:"64",height:"66",rx:"2","data-allow-mismatch":"attribute"},null),P("rect",{fill:"#FFF",x:"6",y:"6",width:"52",height:"55",rx:"1"},null),P("g",{transform:"translate(15 17)",fill:s(6),"data-allow-mismatch":"attribute"},[P("rect",{width:"34",height:"6",rx:"1"},null),P("path",{d:"M0 14h34v6H0z"},null),P("rect",{y:"28",width:"34",height:"6",rx:"1"},null)])]),P("rect",{fill:s(7),y:"61",width:"88",height:"28",rx:"1","data-allow-mismatch":"attribute"},null),P("rect",{fill:"#F7F8FA",x:"29",y:"72",width:"30",height:"6",rx:"1"},null)])]),p=()=>P("svg",{viewBox:"0 0 160 160"},[P("defs",null,[P("linearGradient",{x1:"50%",x2:"50%",y2:"100%",id:n(8),"data-allow-mismatch":"attribute"},[o("#EAEDF1","#DCDEE0")])]),c(),u(),l("c"),P("path",{d:"m59 60 21 21 21-21h3l9 9v3L92 93l21 21v3l-9 9h-3l-21-21-21 21h-3l-9-9v-3l21-21-21-21v-3l9-9h3Z",fill:s(8),"data-allow-mismatch":"attribute"},null)]),f=()=>P("svg",{viewBox:"0 0 160 160"},[P("defs",{"data-allow-mismatch":"children"},[P("linearGradient",{x1:"50%",y1:"100%",x2:"50%",id:n(9)},[o("#EEE","#D8D8D8")]),P("linearGradient",{x1:"100%",y1:"50%",y2:"50%",id:n(10)},[o("#F2F3F5","#DCDEE0")]),P("linearGradient",{x1:"50%",x2:"50%",y2:"100%",id:n(11)},[o("#F2F3F5","#DCDEE0")]),P("linearGradient",{x1:"50%",x2:"50%",y2:"100%",id:n(12)},[o("#FFF","#F7F8FA")])]),c(),u(),l("d"),P("g",{transform:"rotate(-45 113 -4)",fill:"none","data-allow-mismatch":"children"},[P("rect",{fill:s(9),x:"24",y:"52.8",width:"5.8",height:"19",rx:"1"},null),P("rect",{fill:s(10),x:"22.1",y:"67.3",width:"9.9",height:"28",rx:"1"},null),P("circle",{stroke:s(11),"stroke-width":"8",cx:"27",cy:"27",r:"27"},null),P("circle",{fill:s(12),cx:"27",cy:"27",r:"16"},null),P("path",{d:"M37 7c-8 0-15 5-16 12",stroke:s(11),"stroke-width":"3",opacity:".5","stroke-linecap":"round",transform:"rotate(45 29 13)"},null)])]),g=()=>{var A;if(t.image)return t.image();const r={error:p,search:f,network:d,default:h};return(null==(A=r[e.image])?void 0:A.call(r))||P("img",{src:e.image},null)};return()=>P("div",{class:SP()},[P("div",{class:SP("image"),style:mO(e.imageSize)},[g()]),A(),r()])}})),_P={height:KH(0),anchors:NH(),duration:KH(.3),magnetic:PH,contentDraggable:PH,lockScroll:Boolean,safeAreaInsetBottom:PH},[IP,LP]=SO("floating-panel");const HP=HO(o({name:IP,props:_P,emits:["heightChange","update:height"],setup(e,{emit:A,slots:r}){const a=t(),n=t(),o=((e,A)=>{const r=t(e());return s(e,e=>{e!==r.value&&(r.value=e)}),s(r,t=>{t!==e()&&A(t)}),r})(()=>+e.height,e=>A("update:height",e)),l=i(()=>{var t,A;return{min:null!=(t=e.anchors[0])?t:100,max:null!=(A=e.anchors[e.anchors.length-1])?A:Math.round(.6*fO.value)}}),c=i(()=>e.anchors.length>=2?e.anchors:[l.value.min,l.value.max]),u=t(!1),d=i(()=>({height:gO(l.value.max),transform:`translateY(calc(100% + ${gO(-o.value)}))`,transition:u.value?"none":`transform ${e.duration}s cubic-bezier(0.18, 0.89, 0.32, 1.28)`}));let h,p=-1;const f=oT(),g=e=>{f.start(e),u.value=!0,h=-o.value,p=-1},m=()=>{if(p=-1,u.value=!1,e.magnetic)o.value=OO(c.value,o.value);else{const{min:e,max:t}=l.value;o.value=Math.max(e,Math.min(t,o.value))}o.value!==-h&&A("heightChange",{height:o.value})};s(l,()=>{o.value=OO(c.value,o.value)},{immediate:!0}),uT(a,()=>e.lockScroll||u.value),tO("touchmove",t=>{var A;f.move(t);const r=t.target;if(n.value===r||(null==(A=n.value)?void 0:A.contains(r))){const{scrollTop:A}=n.value;if(p=Math.max(p,A),!e.contentDraggable)return;if(-h<l.value.max)dO(t,!0);else if(!(A<=0&&f.deltaY.value>0)||p>0)return}const a=f.deltaY.value+h;o.value=-(e=>{const t=Math.abs(e),{min:A,max:r}=l.value;return t>r?-(r+.2*(t-r)):t<A?-(A-.2*(A-t)):e})(a)},{target:a});return()=>{var t;return P("div",{class:[LP(),{"van-safe-area-bottom":e.safeAreaInsetBottom}],ref:a,style:d.value,onTouchstartPassive:g,onTouchend:m,onTouchcancel:m},[r.header?r.header():P("div",{class:LP("header")},[P("div",{class:LP("header-bar")},null)]),P("div",{class:LP("content"),ref:n,style:{paddingBottom:gO(l.value.max-o.value)}},[null==(t=r.default)?void 0:t.call(r)])])}}})),OP=e=>Math.sqrt((e[0].clientX-e[1].clientX)**2+(e[0].clientY-e[1].clientY)**2),TP=SO("image-preview")[1];var PP=o({props:{src:String,show:Boolean,active:Number,minZoom:DH(TH),maxZoom:DH(TH),rootWidth:DH(Number),rootHeight:DH(Number),disableZoom:Boolean,doubleScale:Boolean,closeOnClickImage:Boolean,closeOnClickOverlay:Boolean,vertical:Boolean},emits:["scale","close","longPress"],setup(e,{emit:A,slots:r}){const a=Q({scale:1,moveX:0,moveY:0,moving:!1,zooming:!1,initializing:!1,imageRatio:0}),n=oT(),o=t(),l=t(),c=t(!1),u=t(!1);let d=0;const h=i(()=>{const{scale:e,moveX:t,moveY:A,moving:r,zooming:n,initializing:s}=a,i={transitionDuration:n||r||s?"0s":".3s"};return(1!==e||u.value)&&(i.transform=`matrix(${e}, 0, 0, ${e}, ${t}, ${A})`),i}),p=i(()=>{if(a.imageRatio){const{rootWidth:t,rootHeight:A}=e,r=c.value?A/a.imageRatio:t;return Math.max(0,(a.scale*r-t)/2)}return 0}),f=i(()=>{if(a.imageRatio){const{rootWidth:t,rootHeight:A}=e,r=c.value?A:t*a.imageRatio;return Math.max(0,(a.scale*r-A)/2)}return 0}),g=(t,r)=>{var n;if((t=wO(t,+e.minZoom,+e.maxZoom+1))!==a.scale){const s=t/a.scale;if(a.scale=t,r){const e=$H(null==(n=o.value)?void 0:n.$el),t={x:.5*e.width,y:.5*e.height},A=a.moveX-(r.x-e.left-t.x)*(s-1),i=a.moveY-(r.y-e.top-t.y)*(s-1);a.moveX=wO(A,-p.value,p.value),a.moveY=wO(i,-f.value,f.value)}else a.moveX=0,a.moveY=u.value?d:0;A("scale",{scale:t,index:e.active})}},m=()=>{g(1)};let v,y,w,B,b,C,F,E,x=!1;const U=t=>{const{touches:A}=t;if(v=A.length,2===v&&e.disableZoom)return;const{offsetX:r}=n;n.start(t),y=a.moveX,w=a.moveY,E=Date.now(),x=!1,a.moving=1===v&&(1!==a.scale||u.value),a.zooming=2===v&&!r.value,a.zooming&&(B=a.scale,b=OP(A))},M=t=>{var r;const a=null==(r=l.value)?void 0:r.$el;if(!a)return;const n=a.firstElementChild,s=t.target===a,i=null==n?void 0:n.contains(t.target);!e.closeOnClickImage&&i||!e.closeOnClickOverlay&&s||A("close")},S=t=>{if(v>1)return;const r=Date.now()-E;n.isTap.value&&(r<250?e.doubleScale?F?(clearTimeout(F),F=null,(()=>{const e=a.scale>1?1:2;g(e,2===e||u.value?{x:n.startX.value,y:n.startY.value}:void 0)})()):F=setTimeout(()=>{M(t),F=null},250):M(t):r>500&&A("longPress"))},k=t=>{let A=!1;if((a.moving||a.zooming)&&(A=!0,a.moving&&y===a.moveX&&w===a.moveY&&(A=!1),!t.touches.length)){a.zooming&&(a.moveX=wO(a.moveX,-p.value,p.value),a.moveY=wO(a.moveY,-f.value,f.value),a.zooming=!1),a.moving=!1,y=0,w=0,B=1,a.scale<1&&m();const t=+e.maxZoom;a.scale>t&&g(t,C)}dO(t,A),S(t),n.reset()},_=()=>{const{rootWidth:t,rootHeight:A}=e,r=A/t,{imageRatio:n}=a;c.value=a.imageRatio>r&&n<2.6,u.value=a.imageRatio>r&&n>=2.6,u.value&&(d=(n*t-A)/2,a.moveY=d,a.initializing=!0,VH(()=>{a.initializing=!1})),m()},I=e=>{const{naturalWidth:t,naturalHeight:A}=e.target;a.imageRatio=A/t,_()};return s(()=>e.active,m),s(()=>e.show,e=>{e||m()}),s(()=>[e.rootWidth,e.rootHeight],_),tO("touchmove",t=>{const{touches:A}=t;if(n.move(t),a.moving){const{deltaX:A,deltaY:r}=n,s=A.value+y,i=r.value+w;if((e.vertical?n.isVertical()&&Math.abs(i)>f.value:n.isHorizontal()&&Math.abs(s)>p.value)&&!x)return void(a.moving=!1);x=!0,dO(t,!0),a.moveX=wO(s,-p.value,p.value),a.moveY=wO(i,-f.value,f.value)}if(a.zooming&&(dO(t,!0),2===A.length)){const e=OP(A),t=B*e/b;C=(e=>({x:(e[0].clientX+e[1].clientX)/2,y:(e[0].clientY+e[1].clientY)/2}))(A),g(t,C)}},{target:i(()=>{var e;return null==(e=l.value)?void 0:e.$el})}),PO({resetScale:m}),()=>{const t={loading:()=>P(rT,{type:"spinner"},null)};return P(_T,{ref:l,class:TP("swipe-item"),onTouchstartPassive:U,onTouchend:k,onTouchcancel:k},{default:()=>[r.image?P("div",{class:TP("image-wrap")},[r.image({src:e.src,onLoad:I,style:h.value})]):P(UP,{ref:o,src:e.src,fit:"contain",class:TP("image",{vertical:c.value}),style:h.value,onLoad:I},t)]})}}});const[DP,NP]=SO("image-preview"),KP=["show","teleport","transition","overlayStyle","closeOnPopstate"];var RP=o({name:DP,props:{show:Boolean,loop:PH,images:NH(),minZoom:KH(1/3),maxZoom:KH(3),overlay:PH,vertical:Boolean,closeable:Boolean,showIndex:PH,className:OH,closeIcon:RH("clear"),transition:String,beforeClose:Function,doubleScale:PH,overlayClass:OH,overlayStyle:Object,swipeDuration:KH(300),startPosition:KH(0),showIndicators:Boolean,closeOnPopstate:PH,closeOnClickImage:PH,closeOnClickOverlay:PH,closeIconPosition:RH("top-right"),teleport:[String,Object]},emits:["scale","close","closed","change","longPress","update:show"],setup(e,{emit:A,slots:r}){const a=t(),n=t(),i=Q({active:0,rootWidth:0,rootHeight:0,disableZoom:!1}),o=()=>{if(a.value){const e=$H(a.value.$el);i.rootWidth=e.width,i.rootHeight=e.height,a.value.resize()}},c=e=>A("scale",e),u=e=>A("update:show",e),d=()=>{LO(e.beforeClose,{args:[i.active],done:()=>u(!1)})},h=e=>{e!==i.active&&(i.active=e,A("change",e))},p=()=>{if(e.showIndex)return P("div",{class:NP("index")},[r.index?r.index({index:i.active}):`${i.active+1} / ${e.images.length}`])},f=()=>{if(r.cover)return P("div",{class:NP("cover")},[r.cover()])},g=()=>{i.disableZoom=!0},m=()=>{i.disableZoom=!1},v=()=>{if(e.closeable)return P(YO,{role:"button",name:e.closeIcon,class:[NP("close-icon",e.closeIconPosition),_O],onClick:d},null)},y=()=>A("closed"),w=(e,t)=>{var A;return null==(A=a.value)?void 0:A.swipeTo(e,t)};return PO({resetScale:()=>{var e;null==(e=n.value)||e.resetScale()},swipeTo:w}),l(o),s([pO,fO],o),s(()=>e.startPosition,e=>h(+e)),s(()=>e.show,t=>{const{images:r,startPosition:a}=e;t?(h(+a),F(()=>{o(),w(+a,{immediate:!0})})):A("close",{index:i.active,url:r[i.active]})}),()=>P(wT,I({class:[NP(),e.className],overlayClass:[NP("overlay"),e.overlayClass],onClosed:y,"onUpdate:show":u},LH(e,KP)),{default:()=>[v(),P(UT,{ref:a,lazyRender:!0,loop:e.loop,class:NP("swipe"),vertical:e.vertical,duration:e.swipeDuration,initialSwipe:e.startPosition,showIndicators:e.showIndicators,indicatorColor:"white",onChange:h,onDragEnd:m,onDragStart:g},{default:()=>[e.images.map((t,a)=>P(PP,{ref:e=>{a===i.active&&(n.value=e)},src:t,show:e.show,active:i.active,maxZoom:e.maxZoom,minZoom:e.minZoom,rootWidth:i.rootWidth,rootHeight:i.rootHeight,disableZoom:i.disableZoom,doubleScale:e.doubleScale,closeOnClickImage:e.closeOnClickImage,closeOnClickOverlay:e.closeOnClickOverlay,vertical:e.vertical,onScale:c,onClose:d,onLongPress:()=>A("longPress",{index:a})},{image:r.image}))]}),p(),f()]})}});let GP;const VP={loop:!0,images:[],maxZoom:3,minZoom:1/3,onScale:void 0,onClose:void 0,onChange:void 0,vertical:!1,teleport:"body",className:"",showIndex:!0,closeable:!1,closeIcon:"clear",transition:void 0,beforeClose:void 0,doubleScale:!0,overlayStyle:void 0,overlayClass:void 0,startPosition:0,swipeDuration:300,showIndicators:!1,closeOnPopstate:!0,closeOnClickOverlay:!0,closeIconPosition:"top-right"};const zP=(e,t=0)=>{if(xH)return GP||({instance:GP}=AP({setup(){const{state:e,toggle:t}=tP(),A=()=>{e.images=[]};return()=>P(RP,I(e,{onClosed:A,"onUpdate:show":t}),null)}})),e=Array.isArray(e)?{images:e,startPosition:t}:e,GP.open(EH({},VP,e)),GP};HO(RP);const[jP,$P,qP]=SO("search");const WP=HO(o({name:jP,props:EH({},jT,{label:String,shape:RH("square"),leftIcon:RH("search"),clearable:PH,actionText:String,background:String,showAction:Boolean}),emits:["blur","focus","clear","search","cancel","clickInput","clickLeftIcon","clickRightIcon","update:modelValue"],setup(e,{emit:A,slots:r,attrs:a}){const n=bT(),s=t(),i=()=>{r.action||(A("update:modelValue",""),A("cancel"))},o=t=>{13===t.keyCode&&(dO(t),A("search",e.modelValue))},l=()=>e.id||`${n}-input`,c=()=>{if(r.label||e.label)return P("label",{class:$P("label"),for:l(),"data-allow-mismatch":"attribute"},[r.label?r.label():e.label])},u=()=>{if(e.showAction){const t=e.actionText||qP("cancel");return P("div",{class:$P("action"),role:"button",tabindex:0,onClick:i},[r.action?r.action():t])}},d=e=>A("blur",e),h=e=>A("focus",e),p=e=>A("clear",e),f=e=>A("clickInput",e),g=e=>A("clickLeftIcon",e),m=e=>A("clickRightIcon",e),v=Object.keys(jT),y=()=>{const t=EH({},a,LH(e,v),{id:l()});return P(qT,I({ref:s,type:"search",class:$P("field",{"with-message":t.errorMessage}),border:!1,labelAlign:"left",onBlur:d,onFocus:h,onClear:p,onKeypress:o,onClickInput:f,onClickLeftIcon:g,onClickRightIcon:m,"onUpdate:modelValue":e=>A("update:modelValue",e)},t),LH(r,["left-icon","right-icon"]))};return PO({focus:()=>{var e;return null==(e=s.value)?void 0:e.focus()},blur:()=>{var e;return null==(e=s.value)?void 0:e.blur()}}),()=>{var t;return P("div",{class:$P({"show-action":e.showAction}),style:{background:e.background}},[null==(t=r.left)?void 0:t.call(r),P("div",{class:$P("content",e.shape)},[c(),y()]),u()])}}})),XP={class:"mobile-image-list"},JP=/* @__PURE__ */vC(/* @__PURE__ */o({name:"MobileImageList",props:{data:{type:Array,default:()=>[]}},setup(e){const t=e;return(A,r)=>{const a=rT,n=UP;return c(),u("div",XP,[(c(!0),u(S,null,ne(e.data,e=>(c(),k(n,{key:e,width:"80",height:"80",src:e,onClick:A=>(e=>{zP({images:t.data,startPosition:t.data.indexOf(e)})})(e)},{loading:D(()=>[P(a,{type:"spinner",size:"20"})]),_:1},8,["src","onClick"]))),128))])}}}),[["__scopeId","data-v-56e3881b"]]),YP={class:"gismap-query-result-header"},ZP={class:"gismap-query-result-title"},eD={style:{margin:"1px 5px 0"}},tD=["innerHTML"],AD={class:"gismap-query-result-actions"},rD={class:"gismap-query-result-body gismap-table"},aD={class:"gismap-query-result-value"},nD=/* @__PURE__ */o({__name:"index",props:{downloadUrl:{type:Function||void 0,default:void 0}},setup(e){const A=e,r=t(!1),a=t({}),s=Gt(),i=t(),o=t(800),d=()=>{let e=i.value?.header||"查询结果";return e=e.replace(/{p\.(\w+)}/g,(e,t)=>a.value[t]||""),e},f=e=>Pv(a.value[e.fieldName],e),g=e=>{if(!A?.downloadUrl)return[];const t=JSON.parse(a.value[e.fieldName]||"[]"),r=[];return t.forEach(e=>{const t=A?.downloadUrl?.(e)||"";r.push(t)}),r};return l(()=>{s.value?.events.on("layer:morePopupClick",e=>{let t=e?.feature?.properties||{};a.value=t,e.templateId&&s.value?.templateManager&&s.value?.templateManager.hasTemplate(e.templateId)&&(i.value=s.value.templateManager.getTemplate(e.templateId),r.value=!0)})}),n(()=>{s.value?.events.off("layer:morePopupClick")}),(e,t)=>{const A=cc,a=JP;return c(),k(w(kf),{modelValue:r.value,"onUpdate:modelValue":t[0]||(t[0]=e=>r.value=e),draggable:"",width:o.value,"append-to-body":!0,class:"gismap-query-result","close-on-click-modal":!1,"align-center":"","modal-penetrable":""},{header:D(()=>[h("div",YP,[h("div",ZP,[h("span",eD,[P(A,{color:"#409EFF",size:20},{default:D(()=>[P(w(Vl))]),_:1})]),h("span",{innerHTML:d()},null,8,tD)]),h("div",AD,[p(e.$slots,"actions")])])]),default:D(()=>[h("div",rD,[P(w(Np),null,{default:D(()=>[(c(!0),u(S,null,ne(i.value?.body?.filter(e=>e.isShowMore)||[],e=>(c(),k(w(Kp),{span:e?.style?.span||12,class:"gismap-query-result-item"},{default:D(()=>[h("div",{class:"gismap-query-result-label",style:L({width:i.value?.labelWidth+"px"||"100px"})},j(e.fieldLabel),5),h("div",aD,["image"===e.fieldType?(c(),k(a,{key:0,data:g(e)},null,8,["data"])):(c(),u(S,{key:1},[z(j(f(e))+" "+j(e.unit),1)],64))])]),_:2},1032,["span"]))),256))]),_:1})])]),_:3},8,["modelValue","width"])}}}),sD=["innerHTML"],iD={class:"gismap-query-result-header"},oD={class:"gismap-query-result-title"},lD={style:{"margin-right":"5px"}},cD=["innerHTML"],uD={class:"gismap-query-result-body"},dD={class:"gismap-query-result-value"},hD={key:0,class:"gismap-query-result-footer"},pD=/* @__PURE__ */o({name:"MapQueryPopup",props:{downloadUrl:{type:Function||void 0,default:void 0}},setup(A){const r=A,a=t(void 0),s=t({}),i=Gt(),o=t(),p=t(o.value?.width||"400px"),g=t(o.value?.isSmallPopup||!1),m=t(void 0),v=new e.Popup({closeOnClick:!1,closeOnMove:!1,className:"gismap-popup",anchor:"bottom"}),y=()=>{let e=o.value?.header||"查询结果";return e=e.replace(/{p\.(\w+)}/g,(e,t)=>s.value[t]||""),e},B=e=>Pv(s.value[e.fieldName],e),b=e=>{if(!r?.downloadUrl)return[];const t=JSON.parse(s.value[e.fieldName]||"[]"),A=[];return t.forEach(e=>{const t=r?.downloadUrl?.(e)||"";A.push(t)}),A};return l(()=>{a.value&&(v.setDOMContent(a?.value),i.value?.events.on("layer:smallPopupClick",e=>{if(!e.center)return;m.value=e;let t=e?.properties||e?.feature?.properties||{};if(s.value=t,e.templateId&&i.value?.templateManager&&i.value?.templateManager.hasTemplate(e.templateId)){o.value=i.value.templateManager.getTemplate(e.templateId),p.value=o.value?.width||"400px",g.value=o.value?.isSmallPopup??!1,v.setLngLat(e.center);["LineString","MultiLineString","Polygon","MultiPolygon"].includes(e?.feature?.type||"")?v.setOffset([0,0]):v.setOffset(e.offset||[0,-10]),v.addTo(i.value?.adapter.getMap())}}),i.value?.events.on("layer:removePopup",()=>{v.remove()}))}),n(()=>{i.value?.events.off("layer:smallPopupClick"),i.value?.events.off("layer:removePopup")}),(e,t)=>{const A=cc,r=JP,n=fh;return c(),u("div",{class:d(["gismap-query-result-popup",{"gismap-query-result-small-popup":g.value}]),ref_key:"popupRef",ref:a},[g.value?(c(),u("span",{key:0,innerHTML:((o.value?.header||"").match(/\{[^}]+\}/g)||[]).map(e=>{const t=e.replace(/[{}]/g,"").split(".").pop()||"";return s.value[t]||""}).join(" ")},null,8,sD)):(c(),u("div",{key:1,style:L({width:p.value+"px"})},[h("div",iD,[h("div",oD,[h("span",lD,[P(A,{color:"#409EFF",size:20},{default:D(()=>[P(w(Vl))]),_:1})]),h("span",{innerHTML:y()},null,8,cD)])]),h("div",uD,[P(w(Np),{class:"gismap-table"},{default:D(()=>[(c(!0),u(S,null,ne(o.value?.body?.filter(e=>e.isShowInfo)||[],e=>(c(),k(w(Kp),{span:24,class:"gismap-query-result-item"},{default:D(()=>[h("div",{class:"gismap-query-result-label",style:L({width:o.value?.labelWidth+"px"||"90px"})},j(e.fieldLabel)+":",5),h("div",dD,["image"===e.fieldType?(c(),k(r,{key:0,data:b(e)},null,8,["data"])):(c(),u(S,{key:1},[z(j(B(e))+" "+j(e.unit),1)],64))])]),_:2},1024))),256))]),_:1})]),o.value?.footer&&o.value?.footer?.length>0?(c(),u("div",hD,[(c(!0),u(S,null,ne(o.value?.footer||[],e=>(c(),k(n,{type:"default",size:"small",dashed:"",onClick:t=>(e=>{"more"===e.type&&i.value?.events.emit("layer:morePopupClick",m.value)})(e)},{default:D(()=>[z(j(e.label),1)]),_:2},1032,["onClick"]))),256))])):f("",!0)],4))],2)}}});const fD={class:"gismap-mapmeasure"},gD={class:"measure-toolbar"},mD={class:"measure-group"},vD={class:"measure-type-group"},yD={class:"measure-group"},wD={class:"measure-action-group"},BD={key:0,class:"measure-group"},bD={class:"config-options"},CD={key:0,class:"config-item"},QD={class:"config-select"},FD={key:1,class:"config-item"},ED={class:"config-select"},xD={key:2,class:"config-item"},UD={class:"config-select"},MD=/* @__PURE__ */o({name:"GisMapMeasure",setup(e){const r=t("lnglat"),a=t(6),n=t(2),i=t("meter"),o=t("squareMeter"),{isMeasuring:l,measureType:p,startMeasure:g,stopMeasure:m,clear:v,updateOptions:y}=function(e={}){const r=Gt(),a=t(!1),n=t("none"),s=t(0),i=()=>{const e=r.value;if(!e)return null;return e.measureManager||null},o=()=>{const e=i();e&&(a.value=e.getIsMeasuring(),s.value=e.getResultCount(),n.value=e.getMeasureType())},l=e=>{const t=i();t&&t.onMeasure(t=>{e(t),o()})};return e.onMeasure&&setTimeout(()=>l(e.onMeasure),0),{isMeasuring:A(a),measureType:A(n),count:A(s),startMeasure:t=>{const A=i();A&&(A.startMeasure(t,t=>{e.onMeasure&&e.onMeasure(t),o()}),o())},stopMeasure:()=>{const e=i();e&&(e.stopMeasure(),o())},clearMeasuring:()=>{const e=i();e&&(e.clearMeasuring(),o())},getAll:()=>{const e=i();return e?e.getAllResults():[]},get:e=>{const t=i();if(t)return t.getResult(e)},delete:e=>{const t=i();if(!t)return!1;const A=t.deleteResult(e);return o(),A},clear:()=>{const e=i();e&&(e.clearAllResults(),o())},updateOptions:t=>{const A=i();A&&(e={...e,...t},A.updateOptions({coordinateType:e.coordinateType,lnglatDecimal:e.lnglatDecimal,mercatorDecimal:e.mercatorDecimal,distanceUnit:e.distanceUnit,areaUnit:e.areaUnit}))},onMeasure:l}}({coordinateType:r.value,lnglatDecimal:a.value,mercatorDecimal:n.value,distanceUnit:i.value,areaUnit:o.value});return s(r,e=>{y({coordinateType:e})}),s(a,e=>{y({lnglatDecimal:e})}),s(n,e=>{y({mercatorDecimal:e})}),s(i,e=>{y({distanceUnit:e})}),s(o,e=>{y({areaUnit:e})}),(e,t)=>(c(),u("div",fD,[h("div",gD,[h("div",mD,[t[15]||(t[15]=h("div",{class:"group-title"},"测量类型",-1)),h("div",vD,[h("button",{class:d(["measure-btn",{active:"point"===w(p),measuring:w(l)&&"point"===w(p)}]),onClick:t[0]||(t[0]=e=>w(g)("point")),title:"测量点坐标"},[...t[12]||(t[12]=[h("span",{class:"btn-icon"},"📍",-1),h("span",{class:"btn-label"},"点",-1)])],2),h("button",{class:d(["measure-btn",{active:"line"===w(p),measuring:w(l)&&"line"===w(p)}]),onClick:t[1]||(t[1]=e=>w(g)("line")),title:"测量线段距离"},[...t[13]||(t[13]=[h("span",{class:"btn-icon"},"📏",-1),h("span",{class:"btn-label"},"线",-1)])],2),h("button",{class:d(["measure-btn",{active:"polygon"===w(p),measuring:w(l)&&"polygon"===w(p)}]),onClick:t[2]||(t[2]=e=>w(g)("polygon")),title:"测量多边形面积"},[...t[14]||(t[14]=[h("span",{class:"btn-icon"},"⬡",-1),h("span",{class:"btn-label"},"面",-1)])],2)])]),h("div",yD,[t[18]||(t[18]=h("div",{class:"group-title"},"测量操作",-1)),h("div",wD,[h("button",{class:d(["measure-btn stop",{active:w(l)}]),onClick:t[3]||(t[3]=(...e)=>w(m)&&w(m)(...e)),title:"停止测量"},[...t[16]||(t[16]=[h("span",{class:"btn-icon"},"⏹",-1),h("span",{class:"btn-label"},"停止",-1)])],2),h("button",{class:"measure-btn clear",onClick:t[4]||(t[4]=(...e)=>w(v)&&w(v)(...e)),title:"清除所有测量结果"},[...t[17]||(t[17]=[h("span",{class:"btn-icon"},"🗑",-1),h("span",{class:"btn-label"},"清除",-1)])])])]),w(l)?(c(),u("div",BD,[t[22]||(t[22]=h("div",{class:"group-title"},"配置选项",-1)),h("div",bD,["point"===w(p)?(c(),u("div",CD,[t[19]||(t[19]=h("label",{class:"config-label"},"坐标类型",-1)),h("div",QD,[h("button",{class:d({active:"lnglat"===r.value}),onClick:t[5]||(t[5]=e=>r.value="lnglat")}," 经纬度坐标 ",2),h("button",{class:d({active:"mercator"===r.value}),onClick:t[6]||(t[6]=e=>r.value="mercator")}," 平面坐标 ",2)])])):f("",!0),"line"===w(p)?(c(),u("div",FD,[t[20]||(t[20]=h("label",{class:"config-label"},"距离单位",-1)),h("div",ED,[h("button",{class:d({active:"meter"===i.value}),onClick:t[7]||(t[7]=e=>i.value="meter")}," 米 ",2),h("button",{class:d({active:"kilometer"===i.value}),onClick:t[8]||(t[8]=e=>i.value="kilometer")}," 千米 ",2)])])):f("",!0),"polygon"===w(p)?(c(),u("div",xD,[t[21]||(t[21]=h("label",{class:"config-label"},"面积单位",-1)),h("div",UD,[h("button",{class:d({active:"squareMeter"===o.value}),onClick:t[9]||(t[9]=e=>o.value="squareMeter")}," 平方米 ",2),h("button",{class:d({active:"squareKilometer"===o.value}),onClick:t[10]||(t[10]=e=>o.value="squareKilometer")}," 平方千米 ",2),h("button",{class:d({active:"mu"===o.value}),onClick:t[11]||(t[11]=e=>o.value="mu")}," 亩 ",2)])])):f("",!0)])])):f("",!0)])]))}}),SD=/* @__PURE__ */o({name:"GisMapMobilePopupBarGroup",props:{float:{type:String,default:"top"}},setup(e){const A=t(null);return a("popupBarContext",{activeIndex:A,setActiveIndex:e=>{A.value=e}}),(t,A)=>(c(),u("div",{class:d(["gismap-mobile-popupbar",e.float])},[p(t.$slots,"default")],2))}}),kD={class:"gismap-mobile-popupbar-item-wrapper"},_D={class:"icon-wrapper"},ID={class:"text"},LD={class:"gismap-mobile-popupbar-content"},HD=/* @__PURE__ */o({name:"GisMapMobileBarPopupItem",props:{text:{type:String,default:""},iconName:{type:String,default:""},position:{type:String,default:"right"},visible:{type:Boolean,default:!1},trigger:{type:String||void 0,default:void 0},width:{type:String||void 0,default:"100%"},height:{type:String||void 0,default:"100%"},overlay:{type:Boolean,default:!0}},setup(e){const A=Gk,r=e,a=t(r.visible),n=()=>{a.value=!a.value};return(t,s)=>{const i=cc,o=wT;return c(),u("div",kD,[H((c(),u("div",{class:d(["gismap-mobile-popupbar-item",{active:a.value}]),onClick:n},[h("div",_D,[P(i,{size:20},{default:D(()=>[(c(),k(V(w(aQ)(r.iconName))))]),_:1})]),h("div",ID,j(e.text),1)],2)),[[w(A)]]),s[1]||(s[1]=h("div",{class:"divider"},null,-1)),P(o,{show:a.value,"onUpdate:show":s[0]||(s[0]=e=>a.value=e),position:e.position,round:"",overlay:e.overlay,"safe-area-inset-bottom":!0,"lazy-render":!1,class:"mobile-map-layer-popup",style:L({width:e.width,height:e.height}),"get-container":"#app","close-on-popstate":!0,onClose:n},{default:D(()=>[h("div",LD,[p(t.$slots,"default")])]),_:3},8,["show","position","overlay","style"])])}}}),OD={class:"gismap-mobile-floatpanelbar-item-wrapper"},TD={class:"icon-wrapper"},PD={class:"text"},DD={class:"gismap-mobile-floatpanelbar-content"},ND=/* @__PURE__ */o({name:"GisMapMobileBarFloatPanelItem",props:{text:{type:String,default:""},iconName:{type:String,default:""},height:{type:[Number,String],default:150},anchors:{type:Array,default:()=>[150,Math.round(.4*window.innerHeight),Math.round(.8*window.innerHeight)]},visible:{type:Boolean,default:!1},contentDraggable:{type:Boolean,default:!1}},setup(e){const A=Gk,r=e,a=t(r.height);s(()=>r.height,e=>{a.value=e});const n=t(r.visible),i=()=>{n.value=!n.value};return(t,s)=>{const o=cc,l=HP;return c(),u("div",OD,[H((c(),u("div",{class:d(["gismap-mobile-floatpanelbar-item",{active:n.value}]),onClick:i},[h("div",TD,[P(o,{size:20},{default:D(()=>[(c(),k(V(w(aQ)(r.iconName))))]),_:1})]),h("div",PD,j(e.text),1)],2)),[[w(A)]]),s[1]||(s[1]=h("div",{class:"divider"},null,-1)),n.value?(c(),k(l,{key:0,height:a.value,"onUpdate:height":s[0]||(s[0]=e=>a.value=e),anchors:e.anchors,"safe-area-inset-bottom":!0,"content-draggable":e.contentDraggable,class:"gismap-mobile-floatpanelbar"},{default:D(()=>[h("div",DD,[p(t.$slots,"default")])]),_:3},8,["height","anchors","content-draggable"])):f("",!0)])}}}),KD={class:"gismap-mobile-layer-panel"},RD={class:"gismap-mobile-layer-panel-title"},GD={class:"gismap-mobile-layer-panel-content"},VD=/* @__PURE__ */o({name:"GisMapMobileLayerPanel",props:{title:{type:String,default:"资源"}},setup:e=>(t,A)=>(c(),u("div",KD,[h("div",RD,j(e.title),1),h("div",GD,[p(t.$slots,"default")])]))}),zD={class:"gismap-mobile-layer-box"},jD={key:0,class:"gismap-mobile-layer-box-title"},$D={class:"gismap-mobile-layer-box-content"},qD=/* @__PURE__ */vC(/* @__PURE__ */o({name:"GisMapMobileLayerBox",props:{title:{type:String||void 0,default:void 0}},setup:e=>(t,A)=>(c(),u("div",zD,[e.title?(c(),u("div",jD,j(e.title),1)):f("",!0),h("div",$D,[p(t.$slots,"default",{},void 0,!0)])]))}),[["__scopeId","data-v-b2e97b4f"]]),WD={class:"gismap-mobile-switch"},XD={class:"gismap-switch-layers"},JD=["onClick"],YD={class:"gismap-switch-item-text"},ZD={class:"style-list"},eN={class:"style-list-container"},tN={class:"gismap-switch-layers"},AN=["onClick"],rN={class:"gismap-switch-item-text"},aN=/* @__PURE__ */o({name:"GisMapMobileLayerSwitch",props:{data:{type:Object,default:()=>({layers:[],extensions:[]})},extensionsPosition:{type:String,default:"left"},gray:{type:Boolean,default:!1}},setup(e){const A=e,r=Gt(),{tdt:a,terrain:n,style:s}=Sv(),o=i(()=>r.value?.events),p=t([]),g=t(""),m=t(0),v=i(()=>{const e=p.value.findIndex(e=>e.checked),t=100/(p.value.length||1);return-1===e?{transform:"translateX(0px)",width:`${t}%`}:{transform:`translateX(${100*e}%)`,width:`${t}%`}}),y=e=>{if(g.value!==e.name){switch((e=>{switch(e){case"tdt-vec":a.value?.removeVecLayer();break;case"tdt-img":a.value?.removeImgLayer()}})(g.value),g.value=e.name,e.name){case"tdt-vec":a.value?.addVecLayer(e?.source||void 0,Qe.layerPolygonId);break;case"tdt-img":a.value?.addImgLayer(e?.source||void 0,Qe.layerPolygonId);break;default:o.value?.emit("switch:layer",e)}e.styles&&e.styles.length>0&&w(e),o.value?.emit("switch:widgets",e)}},w=e=>{p.value=e.styles||[],y(e),p.value.length>0&&(p.value[0].checked=!0,m.value=0)},B=(e,t)=>{"click"===e&&(t.checked=!t.checked);const A={checked:!!t.checked,data:t};switch(t.name){case"tdt-cia":t.checked?a.value?.addCiaLayer(t?.source||null,Qe.layerPointId):a.value?.removeCiaLayer();break;case"terrain":t.checked?n.value?.add(t?.config||{}):n.value?.remove();break;default:o.value?.emit("switch:click",A)}o.value?.emit("switch:click",A)};return l(()=>{A.data.layers.forEach(e=>{e.checked&&(y(e),g.value=e.name)}),A.data.extensions.forEach(e=>{e.checked&&B("check",e)})}),(t,A)=>{const r=sT;return c(),u("div",WD,[P(qD,null,{default:D(()=>[h("div",XD,[(c(!0),u(S,null,ne(e.data.layers,e=>(c(),u("div",{class:d(["gismap-switch-item",{active:g.value===e.name}]),key:e.name,onClick:t=>w(e)},[h("div",{class:d(["gismap-switch-item-image",e.iconName])},null,2),h("span",YD,j(e.label),1)],10,JD))),128))])]),_:1}),p.value&&p.value.length>0?(c(),k(qD,{key:0,title:"外观模式",class:"style-settings"},{default:D(()=>[h("div",ZD,[h("div",eN,[h("div",{class:"style-indicator",style:L(v.value)},null,4),(c(!0),u(S,null,ne(p.value,e=>(c(),u("div",{key:e.name,class:d(["style-item",{active:e.checked}])},[P(r,{type:"primary",round:"",plain:!e.checked,style:{width:"100%"},size:"small",class:d({default:!e.checked}),onClick:t=>((e,t)=>{e.forEach(e=>{e.checked=!1}),t.checked=!t.checked,m.value=e.findIndex(e=>e.name===t.name),s.value?.applyStyle(g.value,t?.name)})(p.value,e)},{default:D(()=>[z(j(e.label),1)]),_:2},1032,["plain","class","onClick"])],2))),128))])])]),_:1})):f("",!0),e.data.extensions&&e.data.extensions.length>0?(c(),k(qD,{key:1,title:"扩展地图"},{default:D(()=>[h("div",tN,[(c(!0),u(S,null,ne(e.data.extensions,e=>(c(),u("div",{class:d(["gismap-switch-item",{active:e.checked}]),key:e.name,onClick:t=>B("click",e)},[h("div",{class:d(["gismap-switch-item-image",e.iconName])},null,2),h("span",rN,j(e.label),1)],10,AN))),128))])]),_:1})):f("",!0)])}}}),nN={class:"gismap-mobile-search"},sN={class:"query-header"},iN={class:"query-search-wrapper"},oN={class:"query-tabs"},lN={key:0,class:"query-history"},cN=["onClick"],uN={class:"history-text"},dN={class:"query-result"},hN={key:0,class:"result-list"},pN=["onClick"],fN={class:"result-item-title"},gN={class:"result-marker"},mN=["innerHTML"],vN={class:"result-item-content"},yN={key:0,class:"result-item-content-row-label"},wN={class:"result-item-content-row-value"},BN=/* @__PURE__ */o({name:"GisMapMobileSearch",props:{data:{type:Array,default:()=>[]},tianditu:{type:Object,default:()=>({})}},setup(e,{expose:A}){const r=e,a=Gt(),n=t(/* @__PURE__ */new Map),i=t(""),o=t(""),p=t(""),g=t("请输入搜索内容"),m=t(""),v=t(),y=t([]),w=t(!1),B=t(""),b=t(!1),C=t(""),Q=t(!1),F=t([]),E=e=>{C.value=e;const t=n.value.get(e);t&&(g.value=t.placeholder||"请输入搜索内容",i.value=t.defaultValue||"",o.value=t.id||"",p.value=t.serviceUrl||"",m.value=t.templateId||"")},x=()=>{if(!i.value)return void(b.value=!1);if(v.value=a.value?.templateManager?.getTemplate(m.value),!v.value)return void iP("模板不存在");b.value=!0,w.value=!0,Q.value=!1,T(i.value);const e=n.value.get(C.value);if("tainditu"===e?.name)return void U();if(!p.value)return void(w.value=!1);const t=DL.getQuickSearchResult,A=JSON.stringify({key:`%${i.value}%`});t(p.value,A).then(e=>{const t=e.data?.features||[];y.value=t.map((e,t)=>({...e,index:t+1,uuid:Tv(),templateId:m.value||""})),w.value=!1})},U=()=>{const e={type:"query",tk:a.value?.tdtToken||"",postStr:JSON.stringify(Object.assign({},{specify:"156321000",queryType:"12",start:"0",count:"10",dataTypes:"",show:"2"},r.tianditu,{keyWord:`%${i.value}%`}))};DL.getTiandituSearch(p.value,e).then(e=>{if(w.value=!1,1e3===e?.status?.infocode){const t=e?.pois||[];y.value=t.map((e,t)=>({...e,index:t+1,uuid:Tv()}));const A=y.value.map(e=>({id:e.uuid,index:e.index,lngLat:e.lonlat.split(",").map(Number),properties:e,templateId:m.value||""}));M(A)}else iP(e?.status?.cndesc||"搜索失败")})},M=e=>{a.value?.markerManager?.clear(),a.value?.markerManager?.addMarkers(e),a.value?.markerManager?.setOnMarkerClick(e=>{B.value=e.id,a.value?.markerManager?.flyTo(e.id,15,!0)}),e.length>0&&setTimeout(()=>{const t=e[0].id;B.value=t,a.value?.markerManager?.flyTo(t,15,!1)},1e3)},_=()=>{b.value=!1,y.value=[],i.value="",a.value?.markerManager?.clear(),a.value?.events.emit("layer:removePopup",{})},I=(e,t)=>Pv(e[t.fieldName]||"",t),L=()=>{if(0===r.data.length)return;n.value.clear(),r.data.forEach(e=>{n.value.set(e.name,e)});const e=r.data[0];e&&(C.value=e.name,g.value=e.placeholder||"请输入搜索内容",i.value=e.defaultValue||"",o.value=e.id||"",p.value=e.serviceUrl||"",m.value=e.templateId||"")},O=()=>{const e=localStorage.getItem("gismap_search_history");if(e)try{F.value=JSON.parse(e)}catch(t){F.value=[]}},T=e=>{if(!e.trim())return;const t=F.value.indexOf(e);t>-1&&F.value.splice(t,1),F.value.unshift(e),F.value.length>10&&(F.value=F.value.slice(0,10)),localStorage.setItem("gismap_search_history",JSON.stringify(F.value))};return l(()=>{Ft.templates.forEach(e=>{a.value?.templateManager?.addTemplate(e.id,e)}),L(),O()}),s(()=>r.data,()=>{L()}),A({searchText:i,activeTab:C,showResults:b,resultList:y,selectUUID:B,showHistory:Q,historyList:F,loadHistory:O,saveHistory:T,clearHistory:()=>{F.value=[],localStorage.removeItem("gismap_search_history"),Q.value=!1}}),(e,t)=>{const A=WP,n=QP,s=fP,o=YO,l=vP,p=kP,m=rT;return c(),u("div",nN,[h("div",sN,[h("div",iN,[P(A,{modelValue:i.value,"onUpdate:modelValue":t[0]||(t[0]=e=>i.value=e),placeholder:g.value,shape:"round",background:"transparent",onSearch:x,onCancel:_},null,8,["modelValue","placeholder"])]),h("div",oN,[P(s,{modelValue:C.value,"onUpdate:modelValue":t[1]||(t[1]=e=>C.value=e),direction:"horizontal",onChange:E},{default:D(()=>[(c(!0),u(S,null,ne(r.data,e=>(c(),k(n,{key:e.id,name:e.name,value:e.name},{default:D(()=>[z(j(e.label),1)]),_:2},1032,["name","value"]))),128))]),_:1},8,["modelValue"])]),F.value.length>0?(c(),u("div",lN,[(c(!0),u(S,null,ne(F.value,(e,t)=>(c(),u("span",{key:t,class:"history-item",onClick:t=>{return A=e,i.value=A,Q.value=!1,void x();var A}},[P(o,{name:"clock-o",size:"16"}),h("span",uN,j(e),1)],8,cN))),128))])):f("",!0)]),H(h("div",dN,[y.value.length>0?(c(),u("div",hN,[(c(!0),u(S,null,ne(y.value,e=>{return c(),u("div",{key:e.uuid,class:d(["result-item",{active:e.uuid===B.value}]),onClick:t=>(e=>{e.uuid&&(B.value=e.uuid,a.value?.markerManager?.flyTo(e.uuid,15,!0))})(e)},[h("div",fN,[h("span",gN,j(e.index),1),h("span",{class:"result-value",innerHTML:(t=e,((v.value?.header||"").match(/\{[^}]+\}/g)||[]).map(e=>{const A=e.replace(/[{}]/g,"").split(".").pop()||"";return t[A]||""}).join(" "))},null,8,mN)]),h("div",vN,[(c(!0),u(S,null,ne(v.value?.body||[],t=>(c(),u("div",{class:"result-item-content-row",key:t.fieldName},[t.fieldLabel?(c(),u("div",yN,j(t.fieldLabel)+": ",1)):f("",!0),h("div",wN,["tag"===t.fieldType?(c(!0),u(S,{key:0},ne(I(e,t),e=>(c(),k(l,{type:"primary",key:e},{default:D(()=>[z(j(e),1)]),_:2},1024))),128)):(c(),u(S,{key:1},[z(j(I(e,t)),1)],64))])]))),128))])],10,pN);var t}),128))])):!w.value&&b.value?(c(),k(p,{key:1,description:"未找到相关结果"})):f("",!0),w.value?(c(),k(m,{key:2,class:"loading-wrapper",size:"24px"},{default:D(()=>[...t[2]||(t[2]=[z("搜索中...",-1)])]),_:1})):f("",!0)],512),[[W,b.value]])])}}}),bN=["innerHTML"],CN={class:"gismap-mobile-query-header"},QN={class:"gismap-mobile-header-left",style:{"margin-right":"5px"}},FN=["innerHTML"],EN={class:"gismap-mobile-query-body"},xN={class:"gismap-mobile-query-value"},UN=/* @__PURE__ */o({name:"GisMapMobileQueryPopup",props:{downloadUrl:{type:Function||void 0,default:void 0},height:{type:[Number,String],default:200},anchors:{type:Array,default:()=>[200,Math.round(.4*window.innerHeight),Math.round(.8*window.innerHeight)]}},setup(A){const r=A,a=t(r.height),s=t(!1),i=t(void 0),o=t({}),d=Gt(),p=t(),f=t(""),g=t(void 0),m=new e.Popup({closeOnClick:!1,closeOnMove:!1,className:"gismap-mobile-popup",anchor:"bottom"}),v=()=>{let e=p.value?.header||"查询结果";return e=e.replace(/{p\.(\w+)}/g,(e,t)=>o.value[t]||""),e},y=e=>Pv(o.value[e.fieldName],e),B=e=>{if(!r?.downloadUrl)return[];const t=JSON.parse(o.value[e.fieldName]||"[]"),A=[];return t.forEach(e=>{const t=r?.downloadUrl?.(e)||"";A.push(t)}),A},b=()=>{s.value=!1};return l(()=>{i.value&&(m.setDOMContent(i?.value),d.value?.events.on("layer:smallPopupClick",e=>{if(!e.center)return;g.value=e;let t=e?.properties||e?.feature?.properties||{};o.value=t,e.templateId?(m.remove(),d.value?.templateManager&&d.value?.templateManager.hasTemplate(e.templateId)&&(p.value=d.value.templateManager.getTemplate(e.templateId),s.value=(p?.value?.body?.filter(e=>e.isShowMore)?.length||0)>0)):e.data?.tooltipContent&&(s.value=!1,f.value=e.data.tooltipContent,m.setLngLat(e.center),m.setOffset(e.offset||[0,0]),m.addTo(d.value?.adapter.getMap()))}),d.value?.events.on("layer:removePopup",()=>{m.remove()}),d.value?.events.on("clear",()=>{s.value=!1,m.remove()}))}),n(()=>{d.value?.events.off("layer:smallPopupClick"),d.value?.events.off("layer:removePopup"),d.value?.events.off("layer:showPopup")}),(e,t)=>{const r=cc,n=YO,o=vP,l=HP;return c(),u(S,null,[h("div",{class:"gismap-mobile-query-popup",ref_key:"popupRef",ref:i},[h("span",{innerHTML:f.value},null,8,bN)],512),H(P(l,{height:a.value,"onUpdate:height":t[0]||(t[0]=e=>a.value=e),anchors:A.anchors,"safe-area-inset-bottom":!0,"content-draggable":!1,class:"gismap-mobile-query"},{header:D(()=>[h("div",CN,[h("span",QN,[P(r,{color:"#409EFF",size:20},{default:D(()=>[P(w(Vl))]),_:1})]),h("span",{class:"gismap-mobile-header-left",innerHTML:v()},null,8,FN),h("span",{class:"gismap-mobile-close",onClick:b},[P(n,{name:"cross"})])])]),default:D(()=>[h("div",EN,[P(w(Np),null,{default:D(()=>[(c(!0),u(S,null,ne(p.value?.body?.filter(e=>e.isShowMore)||[],e=>(c(),k(w(Kp),{span:24,class:"gismap-mobile-query-item"},{default:D(()=>[h("div",{class:"gismap-mobile-query-label",style:L({width:p.value?.labelWidth+"px"||"90px"})},j(e.fieldLabel)+":",5),h("div",xN,["image"===e.fieldType?(c(),k(JP,{key:0,data:B(e)},null,8,["data"])):"tag"===e.fieldType?(c(!0),u(S,{key:1},ne(y(e),e=>(c(),k(o,{type:"primary",key:e,size:"medium"},{default:D(()=>[z(j(e),1)]),_:2},1024))),128)):(c(),u(S,{key:2},[z(j(y(e))+" "+j(e.unit),1)],64))])]),_:2},1024))),256))]),_:1})])]),_:1},8,["height","anchors"]),[[W,s.value]])],64)}}}),MN={class:"gismap-mobile-layer"},SN={key:0,class:"layer-search"},kN={class:"layer-tree"},_N={key:0,class:"layer-group"},IN=["onClick"],LN={class:"layer-group-info"},HN=["src"],ON={class:"layer-label"},TN={key:0,class:"layer-group-children"},PN={class:"layer-child-info"},DN=["src"],NN={class:"layer-label"},KN={key:1,class:"layer-single-item"},RN={class:"layer-single-info"},GN=["src"],VN={class:"layer-label"},zN=/* @__PURE__ */o({name:"GisMapMobileLayer",props:{title:{type:String,default:"未命名"},data:{type:Array,default:()=>[]},showSearch:{type:Boolean,default:!0}},emits:["close","layer-toggle"],setup(e,{emit:A}){const r=e,a=A,{layer:n}=Sv(),o=t(""),p=t([]),g=t([]),m=i(()=>{if(!o.value)return g.value;const e=[],t=/* @__PURE__ */new Set,A=r=>{for(const a of r){if(a.title.includes(o.value))if(a.children&&a.children.length>0)e.includes(a)||e.push(a);else{const A=v(g.value,a);A?t.has(A)||(t.add(A),e.push(A)):e.includes(a)||e.push(a)}a.children&&a.children.length>0&&A(a.children)}};return A(g.value),e}),v=(e,t,A=null)=>{for(const r of e){if(r===t)return A;if(r.children&&r.children.length>0){const e=v(r.children,t,r);if(null!==e)return e}}return null},y=e=>{e.checked?e.layers&&e.layers.length>0?n.value?.addGroupLayer(e):n.value?.addLayer(e):e.layers&&e.layers.length>0?n.value?.removeGroupLayer(e):n.value?.removeLayer(e.id),a("layer-toggle",e)},w=e=>e?.icon?`assets/icons/${e.icon}`:e?.children&&e?.children.length>0?"assets/icons/layer_group.png":e?.query||e?.isQuery?"assets/icons/layer_query.png":"assets/icons/layer_default.png",B=()=>{(e=>{g.value=JSON.parse(JSON.stringify(e));const t=[];Ov(g.value,e=>{e.sourceInit&&e.source&&n.value?.addSource(e.source),e.expand&&t.push(e.id),e.checked&&(e.layers&&e.layers.length>0?n.value?.addGroupLayer(e):n.value?.addLayer(e))}),p.value=t})(r.data)};return s(()=>r.data,()=>{B()},{deep:!0}),l(()=>{B()}),(t,A)=>{const r=WP,a=YO,n=cP,s=kP;return c(),u("div",MN,[e.showSearch?(c(),u("div",SN,[P(r,{modelValue:o.value,"onUpdate:modelValue":A[0]||(A[0]=e=>o.value=e),placeholder:"搜索图层",shape:"round"},null,8,["modelValue"])])):f("",!0),h("div",kN,[(c(!0),u(S,null,ne(m.value,e=>(c(),u("div",{key:e.id,class:"layer-item"},[e.children&&e.children.length>0?(c(),u("div",_N,[h("div",{class:"layer-group-header",onClick:t=>(e=>{const t=p.value.indexOf(e);t>-1?p.value.splice(t,1):p.value.push(e)})(e.id)},[h("div",LN,[h("img",{src:w(e),class:"layer-icon"},null,8,HN),h("span",ON,j(e.title)+"("+j(e.children.length)+")",1)]),h("div",{class:d(["arrow-icon",{rotated:p.value.includes(e.id)}])},[P(a,{name:"arrow-down",size:"14"})],2)],8,IN),p.value.includes(e.id)?(c(),u("div",TN,[(c(!0),u(S,null,ne(e.children,e=>(c(),u("div",{key:e.id,class:"layer-child-item"},[h("div",PN,[h("img",{src:w(e),class:"layer-icon"},null,8,DN),h("span",NN,j(e.title),1)]),P(n,{modelValue:e.checked,"onUpdate:modelValue":t=>e.checked=t,onChange:t=>y(e),size:"14"},null,8,["modelValue","onUpdate:modelValue","onChange"])]))),128))])):f("",!0)])):(c(),u("div",KN,[h("div",RN,[h("img",{src:w(e),class:"layer-icon"},null,8,GN),h("span",VN,j(e.title),1)]),P(n,{modelValue:e.checked,"onUpdate:modelValue":t=>e.checked=t,onChange:t=>y(e),size:"14"},null,8,["modelValue","onUpdate:modelValue","onChange"])]))]))),128)),0===m.value.length?(c(),k(s,{key:0,description:"未找到图层"})):f("",!0)])])}}});export{yt as API_CONFIG,pt as BasePlugin,mt as EventBus,mH as GisMapCompareFrame,lH as GisMapCompareSplit,vH as GisMapCompass,tA as GisMapContainer,xC as GisMapLayer,HC as GisMapLegend,MD as GisMapMeasure,ND as GisMapMobileBarFloatPanelItem,SD as GisMapMobileBarGroup,HD as GisMapMobileBarPopupItem,qD as GisMapMobileLayerBox,VD as GisMapMobileLayerPanel,aN as GisMapMobileLayerSwitch,zN as GisMapMobileMapLayer,UN as GisMapMobileMapQuery,BN as GisMapMobileMapSearch,yH as GisMapPopupBar,QH as GisMapPopupBarItem,pD as GisMapQueryPopup,nD as GisMapQueryResult,AH as GisMapSearch,h_ as GisMapSwitch,Wk as GisMapTools,ze as IconManager,xe as LayerManager,dt as ManagerRegistry,rt as MapContext,Nt as MapContextKey,Kt as MapStateKey,vt as MarkerLayer,At as MarkerManager,gt as PluginManager,ht as PluginRegistry,Ue as QueryLayerManager,Ve as RadarManager,it as StateStore,qe as StyleManager,ot as TimeTravelStateStore,at as TypedEventEmitter,Et as configManager,nt as createEventEmitter,ft as createPluginRegistry,lt as createStateStore,ct as createTimeTravelStore,Qt as getConfig,wt as getEndpoint,Bt as getFullUrl,Wt as installMapPlugin,qt as provideMap,bt as setBaseURL,Ct as setEndpoint,xt as useConfig,Sv as useControl,kv as useDraw,gv as useLayer,vv as useLayerGroup,yv as useLayerManager,mv as useLayers,Gt as useMap,jt as useMapEvent,$t as useMapReady,Vt as useMapState,wv as useMarker,bv as useMarkerManager,Bv as useMarkers,zt as useViewState};
|