2024-11-08 16:13:47 +08:00
|
|
|
import{_ as el,D as il,a as nl,c as sl,e as rl}from"./index-BPNEscAR.js";class fe{constructor(t){this.propagationStopped,this.defaultPrevented,this.type=t,this.target=null}preventDefault(){this.defaultPrevented=!0}stopPropagation(){this.propagationStopped=!0}}const di={PROPERTYCHANGE:"propertychange"};class Wn{constructor(){this.disposed=!1}dispose(){this.disposed||(this.disposed=!0,this.disposeInternal())}disposeInternal(){}}function ol(n,t,e){let i,s;e=e||ae;let r=0,o=n.length,a=!1;for(;r<o;)i=r+(o-r>>1),s=+e(n[i],t),s<0?r=i+1:(o=i,a=!s);return a?r:~r}function ae(n,t){return n>t?1:n<t?-1:0}function Bs(n,t,e){if(n[0]<=t)return 0;const i=n.length;if(t<=n[i-1])return i-1;if(typeof e=="function"){for(let s=1;s<i;++s){const r=n[s];if(r===t)return s;if(r<t)return e(t,n[s-1],r)>0?s-1:s}return i-1}if(e>0){for(let s=1;s<i;++s)if(n[s]<t)return s-1;return i-1}if(e<0){for(let s=1;s<i;++s)if(n[s]<=t)return s;return i-1}for(let s=1;s<i;++s){if(n[s]==t)return s;if(n[s]<t)return n[s-1]-t<t-n[s]?s-1:s}return i-1}function al(n,t,e){for(;t<e;){const i=n[t];n[t]=n[e],n[e]=i,++t,--e}}function Yn(n,t){const e=Array.isArray(t)?t:[t],i=e.length;for(let s=0;s<i;s++)n[n.length]=e[s]}function Ae(n,t){const e=n.length;if(e!==t.length)return!1;for(let i=0;i<e;i++)if(n[i]!==t[i])return!1;return!0}function ll(n,t,e){const i=t||ae;return n.every(function(s,r){if(r===0)return!0;const o=i(n[r-1],s);return!(o>0||o===0)})}function Wi(){return!0}function Zn(){return!1}function fi(){}function No(n){let t,e,i;return function(){const s=Array.prototype.slice.call(arguments);return(!e||this!==i||!Ae(s,e))&&(i=this,e=s,t=n.apply(this,arguments)),t}}function hl(n){function t(){let e;try{e=n()}catch(i){return Promise.reject(i)}return e instanceof Promise?e:Promise.resolve(e)}return t()}function nn(n){for(const t in n)delete n[t]}function gi(n){let t;for(t in n)return!1;return!t}class Kn extends Wn{constructor(t){super(),this.eventTarget_=t,this.pendingRemovals_=null,this.dispatching_=null,this.listeners_=null}addEventListener(t,e){if(!t||!e)return;const i=this.listeners_||(this.listeners_={}),s=i[t]||(i[t]=[]);s.includes(e)||s.push(e)}dispatchEvent(t){const e=typeof t=="string",i=e?t:t.type,s=this.listeners_&&this.listeners_[i];if(!s)return;const r=e?new fe(t):t;r.target||(r.target=this.eventTarget_||this);const o=this.dispatching_||(this.dispatching_={}),a=this.pendingRemovals_||(this.pendingRemovals_={});i in o||(o[i]=0,a[i]=0),++o[i];let l;for(let c=0,h=s.length;c<h;++c)if("handleEvent"in s[c]?l=s[c].handleEvent(r):l=s[c].call(this,r),l===!1||r.propagationStopped){l=!1;break}if(--o[i]===0){let c=a[i];for(delete a[i];c--;)this.removeEventListener(i,fi);delete o[i]}return l}disposeInternal(){this.listeners_&&nn(this.listeners_)}getListeners(t){return this.listeners_&&this.listeners_[t]||void 0}hasListener(t){return this.listeners_?t?t in this.listeners_:Object.keys(this.listeners_).length>0:!1}removeEventListener(t,e){if(!this.listeners_)return;const i=this.listeners_[t];if(!i)return;const s=i.indexOf(e);s!==-1&&(this.pendingRemovals_&&t in this.pendingRemovals_?(i[s]=fi,++this.pendingRemovals_[t]):(i.splice(s,1),i.length===0&&delete this.listeners_[t]))}}const z={CHANGE:"change",ERROR:"error",BLUR:"blur",CLEAR:"clear",CONTEXTMENU:"contextmenu",CLICK:"click",DBLCLICK:"dblclick",DRAGENTER:"dragenter",DRAGOVER:"dragover",DROP:"drop",FOCUS:"focus",KEYDOWN:"keydown",KEYPRESS:"keypress",LOAD:"load",RESIZE:"resize",TOUCHMOVE:"touchmove",WHEEL:"wheel"};function V(n,t,e,i,s){if(s){const o=e;e=function(){n.removeEventListener(t,e),o.apply(i??this,arguments)}}else i&&i!==n&&(e=e.bind(i));const r={target:n,type:t,listener:e};return n.addEventListener(t,e),r}function vn(n,t,e,i){return V(n,t,e,i,!0)}function tt(n){n&&n.target&&(n.target.removeEventListener(n.type,n.listener),nn(n))}class sn extends Kn{constructor(){super(),this.on=this.onInternal,this.once=this.onceInternal,this.un=this.unInternal,this.revision_=0}changed(){++this.revision_,this.dispatchEvent(z.CHANGE)}getRevision(){return this.revision_}onInternal(t,e){if(Array.isArray(t)){const i=t.length,s=new Array(i);
|
2024-11-03 18:35:21 +08:00
|
|
|
`);a(g,_,m)?(nn(Ns),ni=null,ks=void 0,re.set(f,100)):(re.set(f,re.get(f)+1,!0),c=!1)}}c&&(clearInterval(r),r=void 0)}return function(c){const h=_a(c);if(!h)return;const u=h.families;for(let d=0,f=u.length;d<f;++d){const g=u[d],_=h.style+`
|
|
|
|
`+h.weight+`
|
|
|
|
`+g;re.get(_)===void 0&&(re.set(_,100,!0),a(h.style,h.weight,g)||(re.set(_,0,!0),r===void 0&&(r=setInterval(l,32))))}}}(),Yh=function(){let n;return function(t){let e=Ns[t];if(e==null){if(da){const i=_a(t),s=pa(t,"Žg");e=(isNaN(Number(i.lineHeight))?1.2:Number(i.lineHeight))*(s.actualBoundingBoxAscent+s.actualBoundingBoxDescent)}else n||(n=document.createElement("div"),n.innerHTML="M",n.style.minHeight="0",n.style.maxHeight="none",n.style.height="auto",n.style.padding="0",n.style.border="none",n.style.position="absolute",n.style.display="block",n.style.left="-99999px"),n.style.font=t,document.body.appendChild(n),e=n.offsetHeight,document.body.removeChild(n);Ns[t]=e}return e}}();function pa(n,t){return ni||(ni=rt(1,1)),n!=ks&&(ni.font=n,ks=ni.font),ni.measureText(t)}function Pn(n,t){return pa(n,t).width}function ho(n,t,e){if(t in e)return e[t];const i=t.split(`
|
|
|
|
`).reduce((s,r)=>Math.max(s,Pn(n,r)),0);return e[t]=i,i}function Zh(n,t){const e=[],i=[],s=[];let r=0,o=0,a=0,l=0;for(let c=0,h=t.length;c<=h;c+=2){const u=t[c];if(u===`
|
|
|
|
`||c===h){r=Math.max(r,o),s.push(o),o=0,a+=l,l=0;continue}const d=t[c+1]||n.font,f=Pn(d,u);e.push(f),o+=f;const g=Yh(d);i.push(g),l=Math.max(l,g)}return{width:r,height:a,widths:e,heights:i,lineWidths:s}}function Kh(n,t,e,i,s,r,o,a,l,c,h){n.save(),e!==1&&(n.globalAlpha===void 0?n.globalAlpha=u=>u.globalAlpha*=e:n.globalAlpha*=e),t&&n.transform.apply(n,t),i.contextInstructions?(n.translate(l,c),n.scale(h[0],h[1]),Bh(i,n)):h[0]<0||h[1]<0?(n.translate(l,c),n.scale(h[0],h[1]),n.drawImage(i,s,r,o,a,0,0,o,a)):n.drawImage(i,s,r,o,a,l,c,o*h[0],a*h[1]),n.restore()}function Bh(n,t){const e=n.contextInstructions;for(let i=0,s=e.length;i<s;i+=2)Array.isArray(e[i+1])?t[e[i]].apply(t,e[i+1]):t[e[i]]=e[i+1]}class es extends Qn{constructor(t){super({opacity:1,rotateWithView:t.rotateWithView!==void 0?t.rotateWithView:!1,rotation:t.rotation!==void 0?t.rotation:0,scale:t.scale!==void 0?t.scale:1,displacement:t.displacement!==void 0?t.displacement:[0,0],declutterMode:t.declutterMode}),this.canvases_,this.hitDetectionCanvas_=null,this.fill_=t.fill!==void 0?t.fill:null,this.origin_=[0,0],this.points_=t.points,this.radius=t.radius,this.radius2_=t.radius2,this.angle_=t.angle!==void 0?t.angle:0,this.stroke_=t.stroke!==void 0?t.stroke:null,this.size_,this.renderOptions_,this.imageState_=this.fill_&&this.fill_.loading()?Y.LOADING:Y.LOADED,this.imageState_===Y.LOADING&&this.ready().then(()=>this.imageState_=Y.LOADED),this.render()}clone(){const t=this.getScale(),e=new es({fill:this.getFill()?this.getFill().clone():void 0,points:this.getPoints(),radius:this.getRadius(),radius2:this.getRadius2(),angle:this.getAngle(),stroke:this.getStroke()?this.getStroke().clone():void 0,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(t)?t.slice():t,displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()});return e.setOpacity(this.getOpacity()),e}getAnchor(){const t=this.size_,e=this.getDisplacement(),i=this.getScaleArray();return[t[0]/2-e[0]/i[0],t[1]/2+e[1]/i[1]]}getAngle(){return this.angle_}getFill(){return this.fill_}setFill(t){this.fill_=t,this.render()}getHitDetectionImage(){return this.hitDetectionCanvas_||(this.hitDetectionCanvas_=this.createHitDetectionCanvas_(this.renderOptions_)),this.hitDetectionCanvas_}getImage(t){let e=this.canvases_[t];if(!e){const i=this.renderOptions_,s=rt(i.size*t,i.size*t);this.draw_(i,s,t),e=s.canvas,this.canvases_[t]=e}return e}getPixelRatio(t){return t}getImageSize(){return this.size_}getImageState(){return this.imageState_}getOrigin(){return this.origin_}getPoints(){return this.points_}getRadius(){return this.radius}getRadius2(){return this.radius2_}getSize(){return this.size_}getStroke(){return this.stroke_}setStroke(t){this.stroke_=t,this.render()}listenImageChange(t){}load(){}unlistenImageChange(t){}calculateLineJoinSize_(t,e,i){if(e===0||this.points_===1/0||t!=="bevel"&&t!=="miter")return e;let s=this.radius,r=this.radius2_===void 0?s:this.radius2_;if(s<r){const v=s;s=r,r=v}const o=this.radius2_===void 0?this.points_:this.points_*2,a=2*Math.PI/o,l=r*Math.sin(a),c=Math.sqrt(r*r-l*l),h=s-c,u=Math.sqrt(l*l+h*h),d=u/l;if(t==="miter"&&d<=i)return d*e;const f=e/2/d,g=e/2*(h/u),m=Math.sqrt((s+f)*(s+f)+g*g)-s;if(this.radius2_===void 0||t==="bevel")return m*2;const p=s*Math.sin(a),y=Math.sqrt(s*s-p*p),x=r-y,w=Math.sqrt(p*p+x*x)/p;if(w<=i){const v=w*e/2-r-s;return 2*Math.max(m,v)}return m*2}createRenderOptions(){let t=pi,e=yi,i=0,s=null,r=0,o,a=0;this.stroke_&&(o=qt(this.stroke_.getColor()??qi),a=this.stroke_.getWidth()??Ji,s=this.stroke_.getLineDash(),r=this.stroke_.getLineDashOffset()??0,e=this.stroke_.getLineJoin()??yi,t=this.stroke_.getLineCap()??pi,i=this.stroke_.getMiterLimit()??Hi);const l=this.calculateLineJoinSize_(e,a,i),c=Math.max(this.radius,this.radius2_||0),h=Math.ceil(2*c+l);return{strokeStyle:o,strokeWidth:a,size:h,lineCap:t,lineDash:s,lineDashOffset:r,lineJoin:e,miterLimit:i}}render(){this.renderOptions_=this.createRenderOptions();const t=this.renderOptions_.size;this.canvases_={},this.hitDetectionCanvas_=null,this.size_=[t,t]}draw_(t,e,i){if(e.scale
|
|
|
|
`);this.generateTileUrlFunction_?this.setTileUrlFunction(Du(t,this.tileGrid),e):this.setKey(e)}tileUrlFunction(t,e,i){}}class Ou extends Lr{constructor(t){super({attributions:t.attributions,cacheSize:t.cacheSize,projection:t.projection,state:t.state,tileGrid:t.tileGrid,tileLoadFunction:t.tileLoadFunction?t.tileLoadFunction:Fu,tilePixelRatio:t.tilePixelRatio,tileUrlFunction:t.tileUrlFunction,url:t.url,urls:t.urls,wrapX:t.wrapX,transition:t.transition,interpolate:t.interpolate!==void 0?t.interpolate:!0,key:t.key,attributionsCollapsible:t.attributionsCollapsible,zDirection:t.zDirection}),this.crossOrigin=t.crossOrigin!==void 0?t.crossOrigin:null,this.tileClass=t.tileClass!==void 0?t.tileClass:Oa,this.tileGridForProjection={},this.reprojectionErrorThreshold_=t.reprojectionErrorThreshold,this.renderReprojectionEdges_=!1}getGutterForProjection(t){return this.getProjection()&&t&&!ds(this.getProjection(),t)?0:this.getGutter()}getGutter(){return 0}getKey(){let t=super.getKey();return this.getInterpolate()||(t+=":disable-interpolation"),t}getTileGridForProjection(t){const e=this.getProjection();if(this.tileGrid&&(!e||ds(e,t)))return this.tileGrid;const i=$(t);return i in this.tileGridForProjection||(this.tileGridForProjection[i]=Wa(t)),this.tileGridForProjection[i]}createTile_(t,e,i,s,r,o){const a=[t,e,i],l=this.getTileCoordForTileUrlFunction(a,r),c=l?this.tileUrlFunction(l,s,r):void 0,h=new this.tileClass(a,c!==void 0?M.IDLE:M.EMPTY,c!==void 0?c:"",this.crossOrigin,this.tileLoadFunction,this.tileOptions);return h.key=o,h.addEventListener(z.CHANGE,this.handleTileChange.bind(this)),h}getTile(t,e,i,s,r){const o=this.getProjection();if(!o||!r||ds(o,r))return this.getTileInternal(t,e,i,s,o||r);const a=[t,e,i],l=this.getKey(),c=this.getTileGridForProjection(o),h=this.getTileGridForProjection(r),u=this.getTileCoordForTileUrlFunction(a,r),d=new Ys(o,c,r,h,a,u,this.getTilePixelRatio(s),this.getGutter(),(f,g,_,m)=>this.getTileInternal(f,g,_,m,o),this.reprojectionErrorThreshold_,this.renderReprojectionEdges_,this.tileOptions);return d.key=l,d}getTileInternal(t,e,i,s,r){const o=this.getKey();return this.createTile_(t,e,i,s,r,o)}setRenderReprojectionEdges(t){this.renderReprojectionEdges_!=t&&(this.renderReprojectionEdges_=t,this.changed())}setTileGridForProjection(t,e){const i=kt(t);if(i){const s=$(i);s in this.tileGridForProjection||(this.tileGridForProjection[s]=e)}}}function Fu(n,t){n.getImage().src=t}class ku extends Ou{constructor(t){t=t||{};const e=t.projection!==void 0?t.projection:"EPSG:3857",i=t.tileGrid!==void 0?t.tileGrid:wu({extent:Sr(e),maxResolution:t.maxResolution,maxZoom:t.maxZoom,minZoom:t.minZoom,tileSize:t.tileSize});super({attributions:t.attributions,cacheSize:t.cacheSize,crossOrigin:t.crossOrigin,interpolate:t.interpolate,projection:e,reprojectionErrorThreshold:t.reprojectionErrorThreshold,tileGrid:i,tileLoadFunction:t.tileLoadFunction,tilePixelRatio:t.tilePixelRatio,tileUrlFunction:t.tileUrlFunction,url:t.url,urls:t.urls,wrapX:t.wrapX!==void 0?t.wrapX:!0,transition:t.transition,attributionsCollapsible:t.attributionsCollapsible,zDirection:t.zDirection}),this.gutter_=t.gutter!==void 0?t.gutter:0}getGutter(){return this.gutter_}}const Nu='© <a href="https://www.openstreetmap.org/copyright" target="_blank">OpenStreetMap</a> contributors.';class Gu extends ku{constructor(t){t=t||{};let e;t.attributions!==void 0?e=t.attributions:e=[Nu];const i=t.crossOrigin!==void 0?t.crossOrigin:"anonymous",s=t.url!==void 0?t.url:"https://tile.openstreetmap.org/{z}/{x}/{y}.png";super({attributions:e,attributionsCollapsible:!1,cacheSize:t.cacheSize,crossOrigin:i,interpolate:t.interpolate,maxZoom:t.maxZoom!==void 0?t.maxZoom:19,reprojectionErrorThreshold:t.reprojectionErrorThreshold,tileLoadFunction:t.tileLoadFunction,transition:t.transition,url:s,wrapX:t.wrapX,zDirection:t.zDirection})}}const Rn={PRELOAD:"preload",USE_INTERIM_TILES_ON_ERROR:"useInterimTilesOnError"};class zu extends Jn{constructor(t){t=t||{};const e=Object.assign({},t),i=t.cacheSize;delete t.cacheSize,delete e.preload,delete e.useInterimTilesOnError,super(e),this.on,this
|
|
|
|
`,""),n.push(t,""),n}class hd{constructor(t,e,i,s,r){this.overlaps=i,this.pixelRatio=e,this.resolution=t,this.alignAndScaleFill_,this.instructions=s.instructions,this.coordinates=s.coordinates,this.coordinateCache_={},this.renderedTransform_=Wt(),this.hitDetectionInstructions=s.hitDetectionInstructions,this.pixelCoordinates_=null,this.viewRotation_=0,this.fillStates=s.fillStates||{},this.strokeStates=s.strokeStates||{},this.textStates=s.textStates||{},this.widths_={},this.labels_={},this.zIndexContext_=r?new Za:null}getZIndexContext(){return this.zIndexContext_}createLabel(t,e,i,s){const r=t+e+i+s;if(this.labels_[r])return this.labels_[r];const o=s?this.strokeStates[s]:null,a=i?this.fillStates[i]:null,l=this.textStates[e],c=this.pixelRatio,h=[l.scale[0]*c,l.scale[1]*c],u=l.justify?Xn[l.justify]:As(Array.isArray(t)?t[0]:t,l.textAlign||$i),d=s&&o.lineWidth?o.lineWidth:0,f=Array.isArray(t)?t:String(t).split(`
|
|
|
|
`).reduce(ld,[]),{width:g,height:_,widths:m,heights:p,lineWidths:y}=Zh(l,f),x=g+d,E=[],w=(x+2)*h[0],v=(_+d)*h[1],T={width:w<0?Math.floor(w):Math.ceil(w),height:v<0?Math.floor(v):Math.ceil(v),contextInstructions:E};(h[0]!=1||h[1]!=1)&&E.push("scale",h),s&&(E.push("strokeStyle",o.strokeStyle),E.push("lineWidth",d),E.push("lineCap",o.lineCap),E.push("lineJoin",o.lineJoin),E.push("miterLimit",o.miterLimit),E.push("setLineDash",[o.lineDash]),E.push("lineDashOffset",o.lineDashOffset)),i&&E.push("fillStyle",a.fillStyle),E.push("textBaseline","middle"),E.push("textAlign","center");const R=.5-u;let I=u*x+R*d;const G=[],D=[];let b=0,O=0,A=0,F=0,L;for(let Z=0,K=f.length;Z<K;Z+=2){const et=f[Z];if(et===`
|
|
|
|
`){O+=b,b=0,I=u*x+R*d,++F;continue}const k=f[Z+1]||l.font;k!==L&&(s&&G.push("font",k),i&&D.push("font",k),L=k),b=Math.max(b,p[A]);const X=[et,I+R*m[A]+u*(m[A]-y[F]),.5*(d+b)+O];I+=m[A],s&&G.push("strokeText",X),i&&D.push("fillText",X),++A}return Array.prototype.push.apply(E,G),Array.prototype.push.apply(E,D),this.labels_[r]=T,T}replayTextBackground_(t,e,i,s,r,o,a){t.beginPath(),t.moveTo.apply(t,e),t.lineTo.apply(t,i),t.lineTo.apply(t,s),t.lineTo.apply(t,r),t.lineTo.apply(t,e),o&&(this.alignAndScaleFill_=o[2],this.fill_(t)),a&&(this.setStrokeStyle_(t,a),t.stroke())}calculateImageOrLabelDimensions_(t,e,i,s,r,o,a,l,c,h,u,d,f,g,_,m){a*=d[0],l*=d[1];let p=i-a,y=s-l;const x=r+c>t?t-c:r,E=o+h>e?e-h:o,w=g[3]+x*d[0]+g[1],v=g[0]+E*d[1]+g[2],T=p-g[3],R=y-g[0];(_||u!==0)&&(ye[0]=T,Ee[0]=T,ye[1]=R,ie[1]=R,ie[0]=T+w,ne[0]=ie[0],ne[1]=R+v,Ee[1]=ne[1]);let I;return u!==0?(I=de(Wt(),i,s,1,1,u,-i,-s),dt(I,ye),dt(I,ie),dt(I,ne),dt(I,Ee),Se(Math.min(ye[0],ie[0],ne[0],Ee[0]),Math.min(ye[1],ie[1],ne[1],Ee[1]),Math.max(ye[0],ie[0],ne[0],Ee[0]),Math.max(ye[1],ie[1],ne[1],Ee[1]),ei)):Se(Math.min(T,T+w),Math.min(R,R+v),Math.max(T,T+w),Math.max(R,R+v),ei),f&&(p=Math.round(p),y=Math.round(y)),{drawImageX:p,drawImageY:y,drawImageW:x,drawImageH:E,originX:c,originY:h,declutterBox:{minX:ei[0],minY:ei[1],maxX:ei[2],maxY:ei[3],value:m},canvasTransform:I,scale:d}}replayImageOrLabel_(t,e,i,s,r,o,a){const l=!!(o||a),c=s.declutterBox,h=a?a[2]*s.scale[0]/2:0;return c.minX-h<=e[0]&&c.maxX+h>=0&&c.minY-h<=e[1]&&c.maxY+h>=0&&(l&&this.replayTextBackground_(t,ye,ie,ne,Ee,o,a),Kh(t,s.canvasTransform,r,i,s.originX,s.originY,s.drawImageW,s.drawImageH,s.drawImageX,s.drawImageY,s.scale)),!0}fill_(t){const e=this.alignAndScaleFill_;if(e){const i=dt(this.renderedTransform_,[0,0]),s=512*this.pixelRatio;t.save(),t.translate(i[0]%s,i[1]%s),e!==1&&t.scale(e,e),t.rotate(this.viewRotation_)}t.fill(),e&&t.restore()}setStrokeStyle_(t,e){t.strokeStyle=e[1],t.lineWidth=e[2],t.lineCap=e[3],t.lineJoin=e[4],t.miterLimit=e[5],t.lineDashOffset=e[7],t.setLineDash(e[6])}drawLabelWithPointPlacement_(t,e,i,s){const r=this.textStates[e],o=this.createLabel(t,e,s,i),a=this.strokeStates[i],l=this.pixelRatio,c=As(Array.isArray(t)?t[0]:t,r.textAlign||$i),h=Xn[r.textBaseline||Dn],u=a&&a.lineWidth?a.lineWidth:0,d=o.width/l-2*r.scale[0],f=c*d+2*(.5-c)*u,g=h*o.height/l+2*(.5-h)*u;return{label:o,anchorX:f,anchorY:g}}execute_(t,e,i,s,r,o,a,l){const c=this.zIndexContext_;let h;this.pixelCoordinates_&&Ae(i,this.renderedTransform_)?h=this.pixelCoordinates_:(this.pixelCoordinates_||(this.pixelCoordinates_=[]),h=ve(this.coordinates,0,this.coordinates.length,2,i,this.pixelCoordinates_),Bl(this.renderedTransform_,i));let u=0;const d=s.length;let f=0,g,_,m,p,y,x,E,w,v,T,R,I,G,D=0,b=0,O=null,A=null;const F=this.coordinateCache_,L=this.viewRotation_,Z=Math.round(Math.atan2(-i[1],i[0])*1e12)/1e12,K={context:t,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:L},et=this.instructions!=s||this.overlaps?0:200;let k,X,Q,ct;for(;u<d;){const S=s[u];switch(S[0]){case P.BEGIN_GEOMETRY:k=S[1],ct=S[3],k.getGeometry()?a!==void 0&&!Tt(a,ct.getExtent())?u=S[2]+1:++u:u=S[2],c&&(c.zIndex=S[4]);break;case P.BEGIN_PATH:D>et&&(this.fill_(t),D=0),b>et&&(t.stroke(),b=0),!D&&!b&&(t.beginPath(),y=NaN,x=NaN),++u;break;case P.CIRCLE:f=S[1];const ut=h[f],at=h[f+1],Zt=h[f+2],Jt=h[f+3],Lt=Zt-ut,_e=Jt-at,Ri=Math.sqrt(Lt*Lt+_e*_e);t.moveTo(ut+Ri,at),t.arc(ut,at,Ri,0,2*Math.PI,!0),++u;break;case P.CLOSE_PATH:t.closePath(),++u;break;case P.CUSTOM:f=S[1],g=S[2];const un=S[3],rs=S[4],Ti=S[5];K.geometry=un,K.feature=k,u in F||(F[u]=[]);const Me=F[u];Ti?Ti(h,f,g,2,Me):(Me[0]=h[f],Me[1]=h[f+1],Me.length=2),c&&(c.zIndex=S[6]),rs(Me,K),++u;break;case P.DRAW_IMAGE:f=S[1],g=S[2],v=S[3],_=S[4],m=S[5];let At=S[6];const Kt=S[7],Ke=S[8],Be=S[9],Ii=S[10];let be=S[11];const Ve=S[12];let Ue=S[13];p=S[14]||"declutter";const lt=S[15];if(!v&&S.length>=20){T=S[19],R=S[20],I=S[21],G=S[22];const Mt=this.drawLabelWithPointPlacement_(T,R,I,G);v=Mt.label,S[3]=v;const De=S[23];_=(Mt.anchorX-De)*this.pixelRatio,S[4]=_;const bt=S[24];m=(Mt.anchorY-bt)*this.
|