PageSourceSearch

https://towntrek.web.app/static/js/350.3c998f1e.chunk.js

js towntrek.web.app collected 2026-10-03 12:38:38 UTC 54,545 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunkeventzee=self.webpackChunkeventzee||[]).push([[350],{10284:(t,e,n)=>{n.d(e,{l:()=>D});const i=11102230246251565e-32,r=134217729,s=(3+8*i)*i;function o(t,e,n,i,r){let s,o,l,u,h=e[0],a=i[0],c=0,f=0;a>h===a>-h?(s=h,h=e[++c]):(s=a,a=i[++f]);let p=0;if(c<t&&f<n)for(a>h===a>-h?(o=h+s,l=s-(o-h),h=e[++c]):(o=a+s,l=s-(o-a),a=i[++f]),s=o,0!==l&&(r[p++]=l);c<t&&f<n;)a>h===a>-h?(o=s+h,u=o-s,l=s-(o-u)+(h-u),h=e[++c]):(o=s+a,u=o-s,l=s-(o-u)+(a-u),a=i[++f]),s=o,0!==l&&(r[p++]=l);for(;c<t;)o=s+h,u=o-s,l=s-(o-u)+(h-u),h=e[++c],s=o,0!==l&&(r[p++]=l);for(;f<n;)o=s+a,u=o-s,l=s-(o-u)+(a-u),a=i[++f],s=o,0!==l&&(r[p++]=l);return 0===s&&0!==p||(r[p++]=s),p}function l(t){return new Float64Array(t)}const u=33306690738754716e-32,h=22204460492503146e-32,a=11093356479670487e-47,c=l(4),f=l(8),p=l(12),g=l(16),y=l(4);function d(t,e,n,i,l,d){const m=(e-d)*(n-l),x=(t-l)*(i-d),w=m-x,v=Math.abs(m+x);return Math.abs(w)>=u*v?w:-function(t,e,n,i,l,u,d){let m,x,w,v,b,E,S,T,R,L,P,I,N,_,O,k,C,A;const M=t-l,B=n-l,G=e-u,q=i-u;_=M*q,E=r*M,S=E-(E-M),T=M-S,E=r*q,R=E-(E-q),L=q-R,O=T*L-(_-S*R-T*R-S*L),k=G*B,E=r*G,S=E-(E-G),T=G-S,E=r*B,R=E-(E-B),L=B-R,C=T*L-(k-S*R-T*R-S*L),P=O-C,b=O-P,c[0]=O-(P+b)+(b-C),I=_+P,b=I-_,N=_-(I-b)+(P-b),P=N-k,b=N-P,c[1]=N-(P+b)+(b-k),A=I+P,b=A-I,c[2]=I-(A-b)+(P-b),c[3]=A;let F=function(t,e){let n=e[0];for(let i=1;i<t;i++)n+=e[i];return n}(4,c),z=h*d;if(F>=z||-F>=z)return F;if(b=t-M,m=t-(M+b)+(b-l),b=n-B,w=n-(B+b)+(b-l),b=e-G,x=e-(G+b)+(b-u),b=i-q,v=i-(q+b)+(b-u),0===m&&0===x&&0===w&&0===v)return F;if(z=a*d+s*Math.abs(F),F+=M*v+q*m-(G*w+B*x),F>=z||-F>=z)return F;_=m*q,E=r*m,S=E-(E-m),T=m-S,E=r*q,R=E-(E-q),L=q-R,O=T*L-(_-S*R-T*R-S*L),k=x*B,E=r*x,S=E-(E-x),T=x-S,E=r*B,R=E-(E-B),L=B-R,C=T*L-(k-S*R-T*R-S*L),P=O-C,b=O-P,y[0]=O-(P+b)+(b-C),I=_+P,b=I-_,N=_-(I-b)+(P-b),P=N-k,b=N-P,y[1]=N-(P+b)+(b-k),A=I+P,b=A-I,y[2]=I-(A-b)+(P-b),y[3]=A;const D=o(4,c,4,y,f);_=M*v,E=r*M,S=E-(E-M),T=M-S,E=r*v,R=E-(E-v),L=v-R,O=T*L-(_-S*R-T*R-S*L),k=G*w,E=r*G,S=E-(E-G),T=G-S,E=r*w,R=E-(E-w),L=w-R,C=T*L-(k-S*R-T*R-S*L),P=O-C,b=O-P,y[0]=O-(P+b)+(b-C),I=_+P,b=I-_,N=_-(I-b)+(P-b),P=N-k,b=N-P,y[1]=N-(P+b)+(b-k),A=I+P,b=A-I,y[2]=I-(A-b)+(P-b),y[3]=A;const U=o(D,f,4,y,p);_=m*v,E=r*m,S=E-(E-m),T=m-S,E=r*v,R=E-(E-v),L=v-R,O=T*L-(_-S*R-T*R-S*L),k=x*w,E=r*x,S=E-(E-x),T=x-S,E=r*w,R=E-(E-w),L=w-R,C=T*L-(k-S*R-T*R-S*L),P=O-C,b=O-P,y[0]=O-(P+b)+(b-C),I=_+P,b=I-_,N=_-(I-b)+(P-b),P=N-k,b=N-P,y[1]=N-(P+b)+(b-k),A=I+P,b=A-I,y[2]=I-(A-b)+(P-b),y[3]=A;const V=o(U,p,4,y,g);return g[V-1]}(t,e,n,i,l,d,v)}l(4),l(4),l(4),l(4),l(4),l(4),l(4),l(4),l(4),l(8),l(8),l(8),l(4),l(8),l(8),l(8),l(12);l(192),l(192);l(4),l(4),l(4),l(4),l(4),l(4),l(4),l(4),l(8),l(8),l(8),l(8),l(8),l(8),l(8),l(8),l(8),l(4),l(4),l(4),l(8),l(16),l(16),l(16),l(32),l(32),l(48),l(64);l(1152),l(1152);l(4),l(4),l(4),l(4),l(4),l(4),l(4),l(4),l(4),l(4),l(24),l(24),l(24),l(24),l(24),l(24),l(24),l(24),l(24),l(24),l(1152),l(1152),l(1152),l(1152),l(1152),l(2304),l(2304),l(3456),l(5760),l(8),l(8),l(8),l(16),l(24),l(48),l(48),l(96),l(192),l(384),l(384),l(384),l(768);l(96),l(96),l(96),l(1152);function m(t,e){var n,i,r,s,o,l,u,h,a,c=0,f=t[0],p=t[1],g=e.length;for(n=0;n<g;n++){i=0;var y=e[n],m=y.length-1;if((h=y[0])[0]!==y[m][0]&&h[1]!==y[m][1])throw new Error("First and last coordinates in a ring must be the same");for(s=h[0]-f,o=h[1]-p;i<m;i++){if(l=(a=y[i+1])[0]-f,u=a[1]-p,0===o&&0===u){if(l<=0&&s>=0||s<=0&&l>=0)return 0}else if(u>=0&&o<=0||u<=0&&o>=0){if(0===(r=d(s,l,o,u,0,0)))return 0;(r>0&&u>0&&o<=0||r<0&&u<=0&&o>0)&&c++}h=a,o=u,s=l}}return c%2!==0}var x=n(37644);function w(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!t)throw new Error("point is required");if(!e)throw new Error("polygon is required");const i=(0,x.uG)(t),r=(0,x.bg)(e),s=r.type,o=e.bbox;let l=r.coordinates;if(o&&!1===function(t,e){return e[0]<=t[0]&&e[1]<=t[1]&&e[2]>=t[0]&&e[3]>=t[1]}(i,o))return!1;"Polygon"===s&&(l=[l]);let u=!1;for(var h=0;h<l.length;++h){const t=m(i,l[h]);if(0===t)return!n.ignoreBoundary;t&&(u=!0)}return u}var v=n(74023);class b{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:E;if(this.data=t,this.length=this.data.length,this.compare=e,this.length>0)for(let n=(this.length>>1)-1;n>=0;n--)this._down(n)}push(t){this.data.push(t),this.length++,this._up(this.length-1)}pop(){if(0===this.length)return;const t=this.data[0],e=this.data.pop();return this.length--,this.length>0&&(this.data[0]=e,this._down(0)),t}peek(){return this.data[0]}_up(t){const{data:e,compare:n}=this,i=e[t];for(;t>0;){const r=t-1>>1,s=e[r];if(n(i,s)>=0)break;e[t]=s,t=r}e[t]=i}_down(t){const{data:e,compare:n}=this,i=this.length>>1,r=e[t];for(;t<i;){let i=1+(t<<1),s=e[i];const o=i+1;if(o<this.length&&n(e[o],s)<0&&(i=o,s=e[o]),n(s,r)>=0)break;e[t]=s,t=i}e[t]=r}}function E(t,e){return t<e?-1:t>e?1:0}function S(t,e){return t.p.x>e.p.x?1:t.p.x<e.p.x?-1:t.p.y!==e.p.y?t.p.y>e.p.y?1:-1:1}function T(t,e){return t.rightSweepEvent.p.x>e.rightSweepEvent.p.x?1:t.rightSweepEvent.p.x<e.rightSweepEvent.p.x?-1:t.rightSweepEvent.p.y!==e.rightSweepEvent.p.y?t.rightSweepEvent.p.y<e.rightSweepEvent.p.y?1:-1:1}class R{constructor(t,e,n,i){this.p={x:t[0],y:t[1]},this.featureId=e,this.ringId=n,this.eventId=i,this.otherEvent=null,this.isLeftEndpoint=null}isSamePoint(t){return this.p.x===t.p.x&&this.p.y===t.p.y}}let L=0,P=0,I=0;function N(t,e){const n="Feature"===t.type?t.geometry:t;let i=n.coordinates;"Polygon"!==n.type&&"MultiLineString"!==n.type||(i=[i]),"LineString"===n.type&&(i=[[i]]);for(let r=0;r<i.length;r++)for(let t=0;t<i[r].length;t++){let n=i[r][t][0],s=null;P+=1;for(let o=0;o<i[r][t].length-1;o++){s=i[r][t][o+1];const l=new R(n,L,P,I),u=new R(s,L,P,I+1);l.otherEvent=u,u.otherEvent=l,S(l,u)>
10?(u.isLeftEndpoint=!0,l.isLeftEndpoint=!1):(l.isLeftEndpoint=!0,u.isLeftEndpoint=!1),e.push(l),e.push(u),n=s,I+=1}}L+=1}class _{constructor(t){this.leftSweepEvent=t,this.rightSweepEvent=t.otherEvent}}function O(t,e){if(null===t||null===e)return!1;if(t.leftSweepEvent.ringId===e.leftSweepEvent.ringId&&(t.rightSweepEvent.isSamePoint(e.leftSweepEvent)||t.rightSweepEvent.isSamePoint(e.leftSweepEvent)||t.rightSweepEvent.isSamePoint(e.rightSweepEvent)||t.leftSweepEvent.isSamePoint(e.leftSweepEvent)||t.leftSweepEvent.isSamePoint(e.rightSweepEvent)))return!1;const n=t.leftSweepEvent.p.x,i=t.leftSweepEvent.p.y,r=t.rightSweepEvent.p.x,s=t.rightSweepEvent.p.y,o=e.leftSweepEvent.p.x,l=e.leftSweepEvent.p.y,u=e.rightSweepEvent.p.x,h=e.rightSweepEvent.p.y,a=(h-l)*(r-n)-(u-o)*(s-i),c=(u-o)*(i-l)-(h-l)*(n-o),f=(r-n)*(i-l)-(s-i)*(n-o);if(0===a)return!1;const p=c/a,g=f/a;if(p>=0&&p<=1&&g>=0&&g<=1){return[n+p*(r-n),i+p*(s-i)]}return!1}var k=function(t,e){const n=new b([],S);return function(t,e){if("FeatureCollection"===t.type){const n=t.features;for(let t=0;t<n.length;t++)N(n[t],e)}else N(t,e)}(t,n),function(t,e){e=e||!1;const n=[],i=new b([],T);for(;t.length;){const r=t.pop();if(r.isLeftEndpoint){const t=new _(r);for(let s=0;s<i.data.length;s++){const o=i.data[s];if(e&&o.leftSweepEvent.featureId===r.featureId)continue;const l=O(t,o);!1!==l&&n.push(l)}i.push(t)}else!1===r.isLeftEndpoint&&i.pop()}return n}(n,e)};function C(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{removeDuplicates:i=!0,ignoreSelfIntersections:r=!0}=n;let s=[];"FeatureCollection"===t.type?s=s.concat(t.features):"Feature"===t.type?s.push(t):"LineString"!==t.type&&"Polygon"!==t.type&&"MultiLineString"!==t.type&&"MultiPolygon"!==t.type||s.push((0,v.N4)(t)),"FeatureCollection"===e.type?s=s.concat(e.features):"Feature"===e.type?s.push(e):"LineString"!==e.type&&"Polygon"!==e.type&&"MultiLineString"!==e.type&&"MultiPolygon"!==e.type||s.push((0,v.N4)(e));const o=k((0,v.Lr)(s),r);let l=[];if(i){const t={};o.forEach((e=>{const n=e.join(",");t[n]||(t[n]=!0,l.push(e))}))}else l=o;return(0,v.Lr)(l.map((t=>(0,v.zx)(t))))}var A=n(85781);function M(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=(0,x.bg)(t);switch(e.properties||"Feature"!==t.type||(e.properties=t.properties),n.type){case"Polygon":return function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=(0,x.bg)(t),i=n.coordinates,r=e.properties?e.properties:"Feature"===t.type?t.properties:{};return B(i,r)}(n,e);case"MultiPolygon":return function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=(0,x.bg)(t),i=n.coordinates,r=e.properties?e.properties:"Feature"===t.type?t.properties:{},s=[];return i.forEach((t=>{s.push(B(t,r))})),(0,v.Lr)(s)}(n,e);default:throw new Error("invalid poly")}}function B(t,e){return t.length>1?(0,v.NU)(t,e):(0,v.wi)(t[0],e)}function G(t,e){let{ignoreSelfIntersections:n=!0}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{ignoreSelfIntersections:!0},i=!0;return(0,A.iw)(t,(t=>{(0,A.iw)(e,(e=>{if(!1===i)return!1;i=function(t,e,n){switch(t.type){case"Point":switch(e.type){case"Point":return i=t.coordinates,r=e.coordinates,!(i[0]===r[0]&&i[1]===r[1]);case"LineString":return!q(e,t);case"Polygon":return!w(t,e)}break;case"LineString":switch(e.type){case"Point":return!q(t,e);case"LineString":return!function(t,e,n){const i=C(t,e,{ignoreSelfIntersections:n});if(i.features.length>0)return!0;return!1}(t,e,n);case"Polygon":return!F(e,t,n)}break;case"Polygon":switch(e.type){case"Point":return!w(e,t);case"LineString":return!F(t,e,n);case"Polygon":return!function(t,e,n){for(const r of t.coordinates[0])if(w(r,e))return!0;for(const r of e.coordinates[0])if(w(r,t))return!0;const i=C(M(t),M(e),{ignoreSelfIntersections:n});if(i.features.length>0)return!0;return!1}(e,t,n)}}var i,r;return!1}(t.geometry,e.geometry,n)}))})),i}function q(t,e){for(let n=0;n<t.coordinates.length-1;n++)if(z(t.coordinates[n],t.coordinates[n+1],e.coordinates))return!0;return!1}function F(t,e,n){for(const i of e.coordinates)if(w(i,t))return!0;return C(e,M(t),{ignoreSelfIntersections:n}).features.length>0}function z(t,e,n){const i=n[0]-t[0],r=n[1]-t[1],s=e[0]-t[0],o=e[1]-t[1];return 0===i*o-r*s&&(Math.abs(s)>=Math.abs(o)?s>0?t[0]<=n[0]&&n[0]<=e[0]:e[0]<=n[0]&&n[0]<=t[0]:o>0?t[1]<=n[1]&&n[1]<=e[1]:e[1]<=n[1]&&n[1]<=t[1])}function D(t,e){let{ignoreSelfIntersections:n=!0}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=!1;return(0,A.iw)(t,(t=>{(0,A.iw)(e,(e=>{if(!0===i)return!0;
vendor: 5,238 bytes, line 1
1i=!G(t.geometry,e.geometry,{ignoreSelfIntersections:n})}))})),i}},33109:(t,e,n)=>{n.d(e,{y:()=>at});var i=n(74023),r=n(85781),s=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,o=Math.ceil,l=Math.floor,u="[BigNumber Error] ",h=u+"Number primitive has more than 15 significant digits: ",a=1e14,c=14,f=9007199254740991,p=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],g=1e7,y=1e9;function d(t){var e=0|t;return t>0||t===e?e:e-1}function m(t){for(var e,n,i=1,r=t.length,s=t[0]+"";i<r;){for(e=t[i++]+"",n=c-e.length;n--;e="0"+e);s+=e}for(r=s.length;48===s.charCodeAt(--r););return s.slice(0,r+1||1)}function x(t,e){var n,i,r=t.c,s=e.c,o=t.s,l=e.s,u=t.e,h=e.e;if(!o||!l)return null;if(n=r&&!r[0],i=s&&!s[0],n||i)return n?i?0:-l:o;if(o!=l)return o;if(n=o<0,i=u==h,!r||!s)return i?0:!r^n?1:-1;if(!i)return u>h^n?1:-1;for(l=(u=r.length)<(h=s.length)?u:h,o=0;o<l;o++)if(r[o]!=s[o])return r[o]>s[o]^n?1:-1;return u==h?0:u>h^n?1:-1}function w(t,e,n,i){if(t<e||t>n||t!==l(t))throw Error(u+(i||"Argument")+("number"==typeof t?t<e||t>n?" out of range: ":" not an integer: ":" not a primitive number: ")+String(t))}function v(t){var e=t.c.length-1;return d(t.e/c)==e&&t.c[e]%2!=0}function b(t,e){return(t.length>1?t.charAt(0)+"."+t.slice(1):t)+(e<0?"e":"e+")+e}function E(t,e,n){var i,r;if(e<0){for(r=n+".";++e;r+=n);t=r+t}else if(++e>(i=t.length)){for(r=n,e-=i;--e;r+=n);t+=r}else e<i&&(t=t.slice(0,e)+"."+t.slice(e));return t}var S=function t(e){var n,i,r,S=G.prototype={constructor:G,toString:null,valueOf:null},T=new G(1),R=20,L=4,P=-7,I=21,N=-1e7,_=1e7,O=!1,k=1,C=0,A={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:"\xa0",suffix:""},M="0123456789abcdefghijklmnopqrstuvwxyz",B=!0;function G(t,e){var n,o,u,a,p,g,y,d,m=this;if(!(m instanceof G))return new G(t,e);if(null==e){if(t&&!0===t._isBigNumber)return m.s=t.s,void(!t.c||t.e>_?m.c=m.e=null:t.e<N?m.c=[m.e=0]:(m.e=t.e,m.c=t.c.slice()));if((g="number"==typeof t)&&0*t==0){if(m.s=1/t<0?(t=-t,-1):1,t===~~t){for(a=0,p=t;p>=10;p/=10,a++);return void(a>_?m.c=m.e=null:(m.e=a,m.c=[t]))}d=String(t)}else{if(!s.test(d=String(t)))return r(m,d,g);m.s=45==d.charCodeAt(0)?(d=d.slice(1),-1):1}(a=d.indexOf("."))>-1&&(d=d.replace(".","")),(p=d.search(/e/i))>0?(a<0&&(a=p),a+=+d.slice(p+1),d=d.substring(0,p)):a<0&&(a=d.length)}else{if(w(e,2,M.length,"Base"),10==e&&B)return D(m=new G(t),R+m.e+1,L);if(d=String(t),g="number"==typeof t){if(0*t!=0)return r(m,d,g,e);if(m.s=1/t<0?(d=d.slice(1),-1):1,G.DEBUG&&d.replace(/^0\.0*|\./,"").length>15)throw Error(h+t)}else m.s=45===d.charCodeAt(0)?(d=d.slice(1),-1):1;for(n=M.slice(0,e),a=p=0,y=d.length;p<y;p++)if(n.indexOf(o=d.charAt(p))<0){if("."==o){if(p>a){a=y;continue}}else if(!u&&(d==d.toUpperCase()&&(d=d.toLowerCase())||d==d.toLowerCase()&&(d=d.toUpperCase()))){u=!0,p=-1,a=0;continue}return r(m,String(t),g,e)}g=!1,(a=(d=i(d,e,10,m.s)).indexOf("."))>-1?d=d.replace(".",""):a=d.length}for(p=0;48===d.charCodeAt(p);p++);for(y=d.length;48===d.charCodeAt(--y););if(d=d.slice(p,++y)){if(y-=p,g&&G.DEBUG&&y>15&&(t>f||t!==l(t)))throw Error(h+m.s*t);if((a=a-p-1)>_)m.c=m.e=null;else if(a<N)m.c=[m.e=0];else{if(m.e=a,m.c=[],p=(a+1)%c,a<0&&(p+=c),p<y){for(p&&m.c.push(+d.slice(0,p)),y-=c;p<y;)m.c.push(+d.slice(p,p+=c));p=c-(d=d.slice(p)).length}else p-=y;for(;p--;d+="0");m.c.push(+d)}}else m.c=[m.e=0]}function q(t,e,n,i){var r,s,o,l,u;if(null==n?n=L:w(n,0,8),!t.c)return t.toString();if(r=t.c[0],o=t.e,null==e)u=m(t.c),u=1==i||2==i&&(o<=P||o>=I)?b(u,o):E(u,o,"0");else if(s=(t=D(new G(t),e,n)).e,l=(u=m(t.c)).length,1==i||2==i&&(e<=s||s<=P)){for(;l<e;u+="0",l++);u=b(u,s)}else if(e-=o,u=E(u,s,"0"),s+1>l){if(--e>0)for(u+=".";e--;u+="0");}else if((e+=s-l)>0)for(s+1==l&&(u+=".");e--;u+="0");return t.s<0&&r?"-"+u:u}function F(t,e){for(var n,i,r=1,s=new G(t[0]);r<t.length;r++)(!(i=new G(t[r])).s||(n=x(s,i))===e||0===n&&s.s===e)&&(s=i);return s}function z(t,e,n){for(var i=1,r=e.length;!e[--r];e.pop());for(r=e[0];r>=10;r/=10,i++);return(n=i+n*c-1)>_?t.c=t.e=null:n<N?t.c=[t.e=0]:(t.e=n,t.c=e),t}function D(t,e,n,i){var r,s,u,h,f,g,y,d=t.c,m=p;if(d){t:{for(r=1,h=d[0];h>=10;h/=10,r++);if((s=e-r)<0)s+=c,u=e,f=d[g=0],y=l(f/m[r-u-1]%10);else if((g=o((s+1)/c))>=d.length){if(!i)break t;for(;d.length<=g;d.push(0));f=y=0,r=1,u=(s%=c)-c+1}else{for(f=h=d[g],r=1;h>=10;h/=10,r++);y=(u=(s%=c)-c+r)<0?0:l(f/m[r-u-1]%10)}if(i=i||e<0||null!=d[g+1]||(u<0?f:f%m[r-u-1]),i=n<4?(y||i)&&(0==n||n==(t.s<0?3:2)):y>5||5==y&&(4==n||i||6==n&&(s>0?u>0?f/m[r-u]:0:d[g-1])%10&1||n==(t.s<0?8:7)),e<1||!d[0])return d.length=0,i?(e-=t.e+1,d[0]=m[(c-e%c)%c],t.e=-e||0):d[0]=t.e=0,t;if(0==s?(d.length=g,h=1,g--):(d.length=g+1,h=m[c-s],d[g]=u>0?l(f/m[r-u]%m[u])*h:0),i)for(;;){if(0==g){for(s=1,u=d[0];u>=10;u/=10,s++);for(u=d[0]+=h,h=1;u>=10;u/=10,h++);s!=h&&(t.e++,d[0]==a&&(d[0]=1));break}if(d[g]+=h,d[g]!=a)break;d[g--]=0,h=1}for(s=d.length;0===d[--s];d.pop());}t.e>_?t.c=t.e=null:t.e<N&&(t.c=[t.e=0])}return t}function U(t){var e,n=t.e;return null===n?t.toString():(e=m(t.c),e=n<=P||n>=I?b(e,n):E(e,n,"0"),t.s<0?"-"+e:e)}return G.clone=t,G.ROUND_UP=0,G.ROUND_DOWN=1,G.ROUND_CEIL=2,G.ROUND_FLOOR=3,G.ROUND_HALF_UP=4,G.ROUND_HALF_DOWN=5,G.ROUND_HALF_EVEN=6,G.ROUND_HALF_CEIL=7,G.ROUND_HALF_FLOOR=8,G.EUCLI
vendor: 4,878 bytes, line 1
1D=9,G.config=G.set=function(t){var e,n;if(null!=t){if("object"!=typeof t)throw Error(u+"Object expected: "+t);if(t.hasOwnProperty(e="DECIMAL_PLACES")&&(w(n=t[e],0,y,e),R=n),t.hasOwnProperty(e="ROUNDING_MODE")&&(w(n=t[e],0,8,e),L=n),t.hasOwnProperty(e="EXPONENTIAL_AT")&&((n=t[e])&&n.pop?(w(n[0],-y,0,e),w(n[1],0,y,e),P=n[0],I=n[1]):(w(n,-y,y,e),P=-(I=n<0?-n:n))),t.hasOwnProperty(e="RANGE"))if((n=t[e])&&n.pop)w(n[0],-y,-1,e),w(n[1],1,y,e),N=n[0],_=n[1];else{if(w(n,-y,y,e),!n)throw Error(u+e+" cannot be zero: "+n);N=-(_=n<0?-n:n)}if(t.hasOwnProperty(e="CRYPTO")){if((n=t[e])!==!!n)throw Error(u+e+" not true or false: "+n);if(n){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw O=!n,Error(u+"crypto unavailable");O=n}else O=n}if(t.hasOwnProperty(e="MODULO_MODE")&&(w(n=t[e],0,9,e),k=n),t.hasOwnProperty(e="POW_PRECISION")&&(w(n=t[e],0,y,e),C=n),t.hasOwnProperty(e="FORMAT")){if("object"!=typeof(n=t[e]))throw Error(u+e+" not an object: "+n);A=n}if(t.hasOwnProperty(e="ALPHABET")){if("string"!=typeof(n=t[e])||/^.?$|[+\-.\s]|(.).*\1/.test(n))throw Error(u+e+" invalid: "+n);B="0123456789"==n.slice(0,10),M=n}}return{DECIMAL_PLACES:R,ROUNDING_MODE:L,EXPONENTIAL_AT:[P,I],RANGE:[N,_],CRYPTO:O,MODULO_MODE:k,POW_PRECISION:C,FORMAT:A,ALPHABET:M}},G.isBigNumber=function(t){if(!t||!0!==t._isBigNumber)return!1;if(!G.DEBUG)return!0;var e,n,i=t.c,r=t.e,s=t.s;t:if("[object Array]"=={}.toString.call(i)){if((1===s||-1===s)&&r>=-y&&r<=y&&r===l(r)){if(0===i[0]){if(0===r&&1===i.length)return!0;break t}if((e=(r+1)%c)<1&&(e+=c),String(i[0]).length==e){for(e=0;e<i.length;e++)if((n=i[e])<0||n>=a||n!==l(n))break t;if(0!==n)return!0}}}else if(null===i&&null===r&&(null===s||1===s||-1===s))return!0;throw Error(u+"Invalid BigNumber: "+t)},G.maximum=G.max=function(){return F(arguments,-1)},G.minimum=G.min=function(){return F(arguments,1)},G.random=function(){var t=9007199254740992,e=Math.random()*t&2097151?function(){return l(Math.random()*t)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)};return function(t){var n,i,r,s,h,a=0,f=[],g=new G(T);if(null==t?t=R:w(t,0,y),s=o(t/c),O)if(crypto.getRandomValues){for(n=crypto.getRandomValues(new Uint32Array(s*=2));a<s;)(h=131072*n[a]+(n[a+1]>>>11))>=9e15?(i=crypto.getRandomValues(new Uint32Array(2)),n[a]=i[0],n[a+1]=i[1]):(f.push(h%1e14),a+=2);a=s/2}else{if(!crypto.randomBytes)throw O=!1,Error(u+"crypto unavailable");for(n=crypto.randomBytes(s*=7);a<s;)(h=281474976710656*(31&n[a])+1099511627776*n[a+1]+4294967296*n[a+2]+16777216*n[a+3]+(n[a+4]<<16)+(n[a+5]<<8)+n[a+6])>=9e15?crypto.randomBytes(7).copy(n,a):(f.push(h%1e14),a+=7);a=s/7}if(!O)for(;a<s;)(h=e())<9e15&&(f[a++]=h%1e14);for(s=f[--a],t%=c,s&&t&&(h=p[c-t],f[a]=l(s/h)*h);0===f[a];f.pop(),a--);if(a<0)f=[r=0];else{for(r=-1;0===f[0];f.splice(0,1),r-=c);for(a=1,h=f[0];h>=10;h/=10,a++);a<c&&(r-=c-a)}return g.e=r,g.c=f,g}}(),G.sum=function(){for(var t=1,e=arguments,n=new G(e[0]);t<e.length;)n=n.plus(e[t++]);return n},i=function(){var t="0123456789";function e(t,e,n,i){for(var r,s,o=[0],l=0,u=t.length;l<u;){for(s=o.length;s--;o[s]*=e);for(o[0]+=i.indexOf(t.charAt(l++)),r=0;r<o.length;r++)o[r]>n-1&&(null==o[r+1]&&(o[r+1]=0),o[r+1]+=o[r]/n|0,o[r]%=n)}return o.reverse()}return function(i,r,s,o,l){var u,h,a,c,f,p,g,y,d=i.indexOf("."),x=R,w=L;for(d>=0&&(c=C,C=0,i=i.replace(".",""),p=(y=new G(r)).pow(i.length-d),C=c,y.c=e(E(m(p.c),p.e,"0"),10,s,t),y.e=y.c.length),a=c=(g=e(i,r,s,l?(u=M,t):(u=t,M))).length;0==g[--c];g.pop());if(!g[0])return u.charAt(0);if(d<0?--a:(p.c=g,p.e=a,p.s=o,g=(p=n(p,y,x,w,s)).c,f=p.r,a=p.e),d=g[h=a+x+1],c=s/2,f=f||h<0||null!=g[h+1],f=w<4?(null!=d||f)&&(0==w||w==(p.s<0?3:2)):d>c||d==c&&(4==w||f||6==w&&1&g[h-1]||w==(p.s<0?8:7)),h<1||!g[0])i=f?E(u.charAt(1),-x,u.charAt(0)):u.charAt(0);else{if(g.length=h,f)for(--s;++g[--h]>s;)g[h]=0,h||(++a,g=[1].concat(g));for(c=g.length;!g[--c];);for(d=0,i="";d<=c;i+=u.charAt(g[d++]));i=E(i,a,u.charAt(0))}return i}}(),n=function(){function t(t,e,n){var i,r,s,o,l=0,u=t.length,h=e%g,a=e/g|0;for(t=t.slice();u--;)l=((r=h*(s=t[u]%g)+(i=a*s+(o=t[u]/g|0)*h)%g*g+l)/n|0)+(i/g|0)+a*o,t[u]=r%n;return l&&(t=[l].concat(t)),t}function e(t,e,n,i){var r,s;if(n!=i)s=n>i?1:-1;else for(r=s=0;r<n;r++)if(t[r]!=e[r]){s=t[r]>e[r]?1:-1;break}return s}function n(t,e,n,i){for(var r=0;n--;)t[n]-=r,r=t[n]<e[n]?1:0,t[n]=r*i+t[n]-e[n];for(;!t[0]&&t.length>1;t.splice(0,1));}return function(i,r,s,o,u){var h,f,p,g,y,m,x,w,v,b,E,S,T,R,L,P,I,N=i.s==r.s?1:-1,_=i.c,O=r.c;if(!_||!_[0]||!O||!O[0])return new G(i.s&&r.s&&(_?!O||_[0]!=O[0]:O)?_&&0==_[0]||!O?0*N:N/0:NaN);for(v=(w=new G(N)).c=[],N=s+(f=i.e-r.e)+1,u||(u=a,f=d(i.e/c)-d(r.e/c),N=N/c|0),p=0;O[p]==(_[p]||0);p++);if(O[p]>(_[p]||0)&&f--,N<0)v.push(1),g=!0;else{for(R=_.length,P=O.length,p=0,N+=2,(y=l(u/(O[0]+1)))>1&&(O=t(O,y,u),_=t(_,y,u),P=O.length,R=_.length),T=P,E=(b=_.slice(0,P)).length;E<P;b[E++]=0);
vendor: 3,465 bytes, line 1
1I=O.slice(),I=[0].concat(I),L=O[0],O[1]>=u/2&&L++;do{if(y=0,(h=e(O,b,P,E))<0){if(S=b[0],P!=E&&(S=S*u+(b[1]||0)),(y=l(S/L))>1)for(y>=u&&(y=u-1),x=(m=t(O,y,u)).length,E=b.length;1==e(m,b,x,E);)y--,n(m,P<x?I:O,x,u),x=m.length,h=1;else 0==y&&(h=y=1),x=(m=O.slice()).length;if(x<E&&(m=[0].concat(m)),n(b,m,E,u),E=b.length,-1==h)for(;e(O,b,P,E)<1;)y++,n(b,P<E?I:O,E,u),E=b.length}else 0===h&&(y++,b=[0]);v[p++]=y,b[0]?b[E++]=_[T]||0:(b=[_[T]],E=1)}while((T++<R||null!=b[0])&&N--);g=null!=b[0],v[0]||v.splice(0,1)}if(u==a){for(p=1,N=v[0];N>=10;N/=10,p++);D(w,s+(w.e=p+f*c-1)+1,o,g)}else w.e=f,w.r=+g;return w}}(),r=function(){var t=/^(-?)0([xbo])(?=\w[\w.]*$)/i,e=/^([^.]+)\.$/,n=/^\.([^.]+)$/,i=/^-?(Infinity|NaN)$/,r=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(s,o,l,h){var a,c=l?o:o.replace(r,"");if(i.test(c))s.s=isNaN(c)?null:c<0?-1:1;else{if(!l&&(c=c.replace(t,(function(t,e,n){return a="x"==(n=n.toLowerCase())?16:"b"==n?2:8,h&&h!=a?t:e})),h&&(a=h,c=c.replace(e,"$1").replace(n,"0.$1")),o!=c))return new G(c,a);if(G.DEBUG)throw Error(u+"Not a"+(h?" base "+h:"")+" number: "+o);s.s=null}s.c=s.e=null}}(),S.absoluteValue=S.abs=function(){var t=new G(this);return t.s<0&&(t.s=1),t},S.comparedTo=function(t,e){return x(this,new G(t,e))},S.decimalPlaces=S.dp=function(t,e){var n,i,r,s=this;if(null!=t)return w(t,0,y),null==e?e=L:w(e,0,8),D(new G(s),t+s.e+1,e);if(!(n=s.c))return null;if(i=((r=n.length-1)-d(this.e/c))*c,r=n[r])for(;r%10==0;r/=10,i--);return i<0&&(i=0),i},S.dividedBy=S.div=function(t,e){return n(this,new G(t,e),R,L)},S.dividedToIntegerBy=S.idiv=function(t,e){return n(this,new G(t,e),0,1)},S.exponentiatedBy=S.pow=function(t,e){var n,i,r,s,h,a,f,p,g=this;if((t=new G(t)).c&&!t.isInteger())throw Error(u+"Exponent not an integer: "+U(t));if(null!=e&&(e=new G(e)),h=t.e>14,!g.c||!g.c[0]||1==g.c[0]&&!g.e&&1==g.c.length||!t.c||!t.c[0])return p=new G(Math.pow(+U(g),h?t.s*(2-v(t)):+U(t))),e?p.mod(e):p;if(a=t.s<0,e){if(e.c?!e.c[0]:!e.s)return new G(NaN);(i=!a&&g.isInteger()&&e.isInteger())&&(g=g.mod(e))}else{if(t.e>9&&(g.e>0||g.e<-1||(0==g.e?g.c[0]>1||h&&g.c[1]>=24e7:g.c[0]<8e13||h&&g.c[0]<=9999975e7)))return s=g.s<0&&v(t)?-0:0,g.e>-1&&(s=1/s),new G(a?1/s:s);C&&(s=o(C/c+2))}for(h?(n=new G(.5),a&&(t.s=1),f=v(t)):f=(r=Math.abs(+U(t)))%2,p=new G(T);;){if(f){if(!(p=p.times(g)).c)break;s?p.c.length>s&&(p.c.length=s):i&&(p=p.mod(e))}if(r){if(0===(r=l(r/2)))break;f=r%2}else if(D(t=t.times(n),t.e+1,1),t.e>14)f=v(t);else{if(0===(r=+U(t)))break;f=r%2}g=g.times(g),s?g.c&&g.c.length>s&&(g.c.length=s):i&&(g=g.mod(e))}return i?p:(a&&(p=T.div(p)),e?p.mod(e):s?D(p,C,L,undefined):p)},S.integerValue=function(t){var e=new G(this);return null==t?t=L:w(t,0,8),D(e,e.e+1,t)},S.isEqualTo=S.eq=function(t,e){return 0===x(this,new G(t,e))},S.isFinite=function(){return!!this.c},S.isGreaterThan=S.gt=function(t,e){return x(this,new G(t,e))>0},S.isGreaterThanOrEqualTo=S.gte=function(t,e){return 1===(e=x(this,new G(t,e)))||0===e},S.isInteger=function(){return!!this.c&&d(this.e/c)>this.c.length-2},S.isLessThan=S.lt=function(t,e){return x(this,new G(t,e))<0},S.isLessThanOrEqualTo=S.lte=function(t,e){return-1===(e=x(this,new G(t,e)))||0===e},S.isNaN=function(){return!this.s},S.isNegative=function(){return this.s<0},S.isPositive=function(){return this.s>0},S.isZero=function(){return!!this.c&&0==this.c[0]},S.minus=function(t,e){var n,i,r,s,o=this,l=o.s;if(e=(t=new G(t,e)).s,!l||!e)return new G(NaN);if(l!=e)return t.s=-e,o.plus(t);var u=o.e/c,h=t.e/c,f=o.c,p=t.c;
vendor: 3,430 bytes, line 1
1if(!u||!h){if(!f||!p)return f?(t.s=-e,t):new G(p?o:NaN);if(!f[0]||!p[0])return p[0]?(t.s=-e,t):new G(f[0]?o:3==L?-0:0)}if(u=d(u),h=d(h),f=f.slice(),l=u-h){for((s=l<0)?(l=-l,r=f):(h=u,r=p),r.reverse(),e=l;e--;r.push(0));r.reverse()}else for(i=(s=(l=f.length)<(e=p.length))?l:e,l=e=0;e<i;e++)if(f[e]!=p[e]){s=f[e]<p[e];break}if(s&&(r=f,f=p,p=r,t.s=-t.s),(e=(i=p.length)-(n=f.length))>0)for(;e--;f[n++]=0);for(e=a-1;i>l;){if(f[--i]<p[i]){for(n=i;n&&!f[--n];f[n]=e);--f[n],f[i]+=a}f[i]-=p[i]}for(;0==f[0];f.splice(0,1),--h);return f[0]?z(t,f,h):(t.s=3==L?-1:1,t.c=[t.e=0],t)},S.modulo=S.mod=function(t,e){var i,r,s=this;return t=new G(t,e),!s.c||!t.s||t.c&&!t.c[0]?new G(NaN):!t.c||s.c&&!s.c[0]?new G(s):(9==k?(r=t.s,t.s=1,i=n(s,t,0,3),t.s=r,i.s*=r):i=n(s,t,0,k),(t=s.minus(i.times(t))).c[0]||1!=k||(t.s=s.s),t)},S.multipliedBy=S.times=function(t,e){var n,i,r,s,o,l,u,h,f,p,y,m,x,w,v,b=this,E=b.c,S=(t=new G(t,e)).c;if(!E||!S||!E[0]||!S[0])return!b.s||!t.s||E&&!E[0]&&!S||S&&!S[0]&&!E?t.c=t.e=t.s=null:(t.s*=b.s,E&&S?(t.c=[0],t.e=0):t.c=t.e=null),t;for(i=d(b.e/c)+d(t.e/c),t.s*=b.s,(u=E.length)<(p=S.length)&&(x=E,E=S,S=x,r=u,u=p,p=r),r=u+p,x=[];r--;x.push(0));for(w=a,v=g,r=p;--r>=0;){for(n=0,y=S[r]%v,m=S[r]/v|0,s=r+(o=u);s>r;)n=((h=y*(h=E[--o]%v)+(l=m*h+(f=E[o]/v|0)*y)%v*v+x[s]+n)/w|0)+(l/v|0)+m*f,x[s--]=h%w;x[s]=n}return n?++i:x.splice(0,1),z(t,x,i)},S.negated=function(){var t=new G(this);return t.s=-t.s||null,t},S.plus=function(t,e){var n,i=this,r=i.s;if(e=(t=new G(t,e)).s,!r||!e)return new G(NaN);if(r!=e)return t.s=-e,i.minus(t);var s=i.e/c,o=t.e/c,l=i.c,u=t.c;if(!s||!o){if(!l||!u)return new G(r/0);if(!l[0]||!u[0])return u[0]?t:new G(l[0]?i:0*r)}if(s=d(s),o=d(o),l=l.slice(),r=s-o){for(r>0?(o=s,n=u):(r=-r,n=l),n.reverse();r--;n.push(0));n.reverse()}for((r=l.length)-(e=u.length)<0&&(n=u,u=l,l=n,e=r),r=0;e;)r=(l[--e]=l[e]+u[e]+r)/a|0,l[e]=a===l[e]?0:l[e]%a;return r&&(l=[r].concat(l),++o),z(t,l,o)},S.precision=S.sd=function(t,e){var n,i,r,s=this;if(null!=t&&t!==!!t)return w(t,1,y),null==e?e=L:w(e,0,8),D(new G(s),t,e);if(!(n=s.c))return null;if(i=(r=n.length-1)*c+1,r=n[r]){for(;r%10==0;r/=10,i--);for(r=n[0];r>=10;r/=10,i++);}return t&&s.e+1>i&&(i=s.e+1),i},S.shiftedBy=function(t){return w(t,-9007199254740991,f),this.times("1e"+t)},S.squareRoot=S.sqrt=function(){var t,e,i,r,s,o=this,l=o.c,u=o.s,h=o.e,a=R+4,c=new G("0.5");if(1!==u||!l||!l[0])return new G(!u||u<0&&(!l||l[0])?NaN:l?o:1/0);if(0==(u=Math.sqrt(+U(o)))||u==1/0?(((e=m(l)).length+h)%2==0&&(e+="0"),u=Math.sqrt(+e),h=d((h+1)/2)-(h<0||h%2),i=new G(e=u==1/0?"5e"+h:(e=u.toExponential()).slice(0,e.indexOf("e")+1)+h)):i=new G(u+""),i.c[0])for((u=(h=i.e)+a)<3&&(u=0);;)if(s=i,i=c.times(s.plus(n(o,s,a,1))),m(s.c).slice(0,u)===(e=m(i.c)).slice(0,u)){if(i.e<h&&--u,"9999"!=(e=e.slice(u-3,u+1))&&(r||"4999"!=e)){+e&&(+e.slice(1)||"5"!=e.charAt(0))||(D(i,i.e+R+2,1),t=!i.times(i).eq(o));break}if(!r&&(D(s,s.e+R+2,0),s.times(s).eq(o))){i=s;break}a+=4,u+=4,r=1}return D(i,i.e+R+1,L,t)},S.toExponential=function(t,e){return null!=t&&(w(t,0,y),t++),q(this,t,e,1)},S.toFixed=function(t,e){return null!=t&&(w(t,0,y),t=t+this.e+1),q(this,t,e)},S.toFormat=function(t,e,n){var i,r=this;if(null==n)null!=t&&e&&"object"==typeof e?(n=e,e=null):t&&"object"==typeof t?(n=t,t=e=null):n=A;else if("object"!=typeof n)throw Error(u+"Argument not an object: "+n);if(i=r.toFixed(t,e),r.c){var s,o=i.split("."),l=+n.groupSize,h=+n.secondaryGroupSize,a=n.groupSeparator||"",c=o[0],f=
vendor: 4,630 bytes, line 1
1o[1],p=r.s<0,g=p?c.slice(1):c,y=g.length;if(h&&(s=l,l=h,h=s,y-=s),l>0&&y>0){for(s=y%l||l,c=g.substr(0,s);s<y;s+=l)c+=a+g.substr(s,l);h>0&&(c+=a+g.slice(s)),p&&(c="-"+c)}i=f?c+(n.decimalSeparator||"")+((h=+n.fractionGroupSize)?f.replace(new RegExp("\\d{"+h+"}\\B","g"),"$&"+(n.fractionGroupSeparator||"")):f):c}return(n.prefix||"")+i+(n.suffix||"")},S.toFraction=function(t){var e,i,r,s,o,l,h,a,f,g,y,d,x=this,w=x.c;if(null!=t&&(!(h=new G(t)).isInteger()&&(h.c||1!==h.s)||h.lt(T)))throw Error(u+"Argument "+(h.isInteger()?"out of range: ":"not an integer: ")+U(h));if(!w)return new G(x);for(e=new G(T),f=i=new G(T),r=a=new G(T),d=m(w),o=e.e=d.length-x.e-1,e.c[0]=p[(l=o%c)<0?c+l:l],t=!t||h.comparedTo(e)>0?o>0?e:f:h,l=_,_=1/0,h=new G(d),a.c[0]=0;g=n(h,e,0,1),1!=(s=i.plus(g.times(r))).comparedTo(t);)i=r,r=s,f=a.plus(g.times(s=f)),a=s,e=h.minus(g.times(s=e)),h=s;return s=n(t.minus(i),r,0,1),a=a.plus(s.times(f)),i=i.plus(s.times(r)),a.s=f.s=x.s,y=n(f,r,o*=2,L).minus(x).abs().comparedTo(n(a,i,o,L).minus(x).abs())<1?[f,r]:[a,i],_=l,y},S.toNumber=function(){return+U(this)},S.toPrecision=function(t,e){return null!=t&&w(t,1,y),q(this,t,e,2)},S.toString=function(t){var e,n=this,r=n.s,s=n.e;return null===s?r?(e="Infinity",r<0&&(e="-"+e)):e="NaN":(null==t?e=s<=P||s>=I?b(m(n.c),s):E(m(n.c),s,"0"):10===t&&B?e=E(m((n=D(new G(n),R+s+1,L)).c),n.e,"0"):(w(t,2,M.length,"Base"),e=i(E(m(n.c),s,"0"),10,t,r,!0)),r<0&&n.c[0]&&(e="-"+e)),e},S.valueOf=S.toJSON=function(){return U(this)},S._isBigNumber=!0,S[Symbol.toStringTag]="BigNumber",S[Symbol.for("nodejs.util.inspect.custom")]=S.valueOf,null!=e&&G.set(e),G}();const T=S;var R=class{key;left=null;right=null;constructor(t){this.key=t}},L=class extends R{constructor(t){super(t)}},P=class t extends R{value;constructor(t,e){super(t),this.value=e}replaceValue(e){const n=new t(this.key,e);return n.left=this.left,n.right=this.right,n}},I=class{size=0;modificationCount=0;splayCount=0;splay(t){const e=this.root;if(null==e)return this.compare(t,t),-1;let n=null,i=null,r=null,s=null,o=e;const l=this.compare;let u;for(;;)if(u=l(o.key,t),u>0){let e=o.left;if(null==e)break;if(u=l(e.key,t),u>0&&(o.left=e.right,e.right=o,o=e,e=o.left,null==e))break;null==n?i=o:n.left=o,n=o,o=e}else{if(!(u<0))break;{let e=o.right;if(null==e)break;if(u=l(e.key,t),u<0&&(o.right=e.left,e.left=o,o=e,e=o.right,null==e))break;null==r?s=o:r.right=o,r=o,o=e}}return null!=r&&(r.right=o.left,o.left=s),null!=n&&(n.left=o.right,o.right=i),this.root!==o&&(this.root=o,this.splayCount++),u}splayMin(t){let e=t,n=e.left;for(;null!=n;){const t=n;e.left=t.right,t.right=e,e=t,n=e.left}return e}splayMax(t){let e=t,n=e.right;for(;null!=n;){const t=n;e.right=t.left,t.left=e,e=t,n=e.right}return e}_delete(t){if(null==this.root)return null;if(0!=this.splay(t))return null;let e=this.root;const n=e,i=e.left;if(this.size--,null==i)this.root=e.right;else{const t=e.right;e=this.splayMax(i),e.right=t,this.root=e}return this.modificationCount++,n}addNewRoot(t,e){this.size++,this.modificationCount++;const n=this.root;null!=n?(e<0?(t.left=n,t.right=n.right,n.right=null):(t.right=n,t.left=n.left,n.left=null),this.root=t):this.root=t}_first(){const t=this.root;return null==t?null:(this.root=this.splayMin(t),this.root)}_last(){const t=this.root;return null==t?null:(this.root=this.splayMax(t),this.root)}clear(){this.root=null,this.size=0,this.modificationCount++}has(t){return this.validKey(t)&&0==this.splay(t)}defaultCompare(){return(t,e)=>t<e?-1:t>e?1:0}wrap(){return{getRoot:()=>this.root,setRoot:t=>{this.root=t},getSize:()=>this.size,getModificationCount:()=>this.modificationCount,getSplayCount:()=>this.splayCount,setSplayCount:t=>{this.splayCount=t},splay:t=>this.splay(t),has:t=>this.has(t)}}},N=(Symbol.iterator,Symbol.toStringTag,class t extends I{root=null;compare;validKey;constructor(t,e){super(),this.compare=t??this.defaultCompare(),this.validKey=e??(t=>null!=t&&void 0!=t)}delete(t){return!!this.validKey(t)&&null!=this._delete(t)}deleteAll(t){for(const e of t)this.delete(e)}forEach(t){const e=this[Symbol.iterator]();let n;for(;n=e.next(),!n.done;)t(n.value,n.value,this)}add(t){const e=this.splay(t);return 0!=e&&this.addNewRoot(new L(t),e),this}addAndReturn(t){const e=this.splay(t);return 0!=e&&this.addNewRoot(new L(t),e),this.root.key}addAll(t){for(const e of t)this.add(e)}isEmpty(){return null==this.root}isNotEmpty(){return null!=this.root}single(){if(0==this.size)throw"Bad state: No element";if(this.size>1)throw"Bad state: Too many element";return this.root.key}first(){if(0==this.size)throw"Bad state: No element";return this._first().key}last(){if(0==this.size)throw"Bad state: No element";
1return this._last().key}lastBefore(t){if(null==t)throw"Invalid arguments(s)";if(null==this.root)return null;if(this.splay(t)<0)return this.root.key;let e=this.root.left;if(null==e)return null;let n=e.right;for(;null!=n;)e=n,n=e.right;return e.key}firstAfter(t){if(null==t)throw"Invalid arguments(s)";if(null==this.root)return null;if(this.splay(t)>0)return this.root.key;let e=this.root.right;if(null==e)return null;let n=e.left;for(;null!=n;)e=n,n=e.left;return e.key}retainAll(e){const n=new t(this.compare,this.validKey),i=this.modificationCount;for(const t of e){if(i!=this.modificationCount)throw"Concurrent modification during iteration.";this.validKey(t)&&0==this.splay(t)&&n.add(this.root.key)}n.size!=this.size&&(this.root=n.root,this.size=n.size,this.modificationCount++)}lookup(t){if(!this.validKey(t))return null;return 0!=this.splay(t)?null:this.root.key}intersection(e){const n=new t(this.compare,this.validKey);for(const t of this)e.has(t)&&n.add(t);return n}difference(e){const n=new t(this.compare,this.validKey);for(const t of this)e.has(t)||n.add(t);return n}union(t){const e=this.clone();return e.addAll(t),e}clone(){const e=new t(this.compare,this.validKey);return e.size=this.size,e.root=this.copyNode(this.root),e}copyNode(t){if(null==t)return null;const e=new L(t.key);return function t(e,n){let i,r;do{if(i=e.left,r=e.right,null!=i){const e=new L(i.key);n.left=e,t(i,e)}if(null!=r){const t=new L(r.key);n.right=t,e=r,n=t}}while(null!=r)}(t,e),e}toSet(){return this.clone()}entries(){return new k(this.wrap())}keys(){return this[Symbol.iterator]()}values(){return this[Symbol.iterator]()}[Symbol.iterator](){return new O(this.wrap())}[Symbol.toStringTag]="[object Set]"}),_=class{tree;path=(()=>new Array)();modificationCount=null;splayCount;constructor(t){this.tree=t,this.splayCount=t.getSplayCount()}[Symbol.iterator](){return this}next(){return this.moveNext()?{done:!1,value:this.current()}:{done:!0,value:null}}current(){if(!this.path.length)return null;const t=this.path[this.path.length-1];return this.getValue(t)}rebuildPath(t){this.path.splice(0,this.path.length),this.tree.splay(t),this.path.push(this.tree.getRoot()),this.splayCount=this.tree.getSplayCount()}findLeftMostDescendent(t){for(;null!=t;)this.path.push(t),t=t.left}moveNext(){if(this.modificationCount!=this.tree.getModificationCount()){if(null==this.modificationCount){this.modificationCount=this.tree.getModificationCount();let t=this.tree.getRoot();for(;null!=t;)this.path.push(t),t=t.left;return this.path.length>0}throw"Concurrent modification during iteration."}if(!this.path.length)return!1;this.splayCount!=this.tree.getSplayCount()&&this.rebuildPath(this.path[this.path.length-1].key);let t=this.path[this.path.length-1],e=t.right;if(null!=e){for(;null!=e;)this.path.push(e),e=e.left;return!0}for(this.path.pop();this.path.length&&this.path[this.path.length-1].right===t;)t=this.path.pop();return this.path.length>0}},O=class extends _{getValue(t){return t.key}},k=class extends _{getValue(t){return[t.key,t.key]}},C=class extends _{constructor(t){super(t)}getValue(t){return t.value}},A=class extends _{constructor(t){super(t)}getValue(t){return[t.key,t.value]}replaceValue(t){if(this.modificationCount!=this.tree.getModificationCount())throw"Concurrent modification during iteration.";this.splayCount!=this.tree.getSplayCount()&&this.rebuildPath(this.path[this.path.length-1].key);const e=this.path.pop(),n=e.replaceValue(t);if(this.path.length){const t=this.path[this.path.length-1];e===t.left?t.left=n:t.right=n}else this.tree.setRoot(n);this.path.push(n);const i=this.tree.getSplayCount()+1;this.tree.setSplayCount(i),this.splayCount=i}},M=t=>()=>t,B=t=>{const e=t?(e,n)=>n.minus(e).abs().isLessThanOrEqualTo(t):M(!1);return(t,n)=>e(t,n)?0:t.comparedTo(n)};function G(t){const e=t?(e,n,i,r,s)=>e.exponentiatedBy(2).isLessThanOrEqualTo(r.minus(n).exponentiatedBy(2).plus(s.minus(i).exponentiatedBy(2)).times(t)):M(!1);return(t,n,i)=>{const r=t.x,s=t.y,o=i.x,l=i.y,u=s.minus(l).times(n.x.minus(o)).minus(r.minus(o).times(n.y.minus(l)));return e(u,r,s,o,l)?0:u.comparedTo(0)}}var q=t=>t,F=t=>{if(t){const e=new N(B(t)),n=new N(B(t)),i=(t,e)=>e.addAndReturn(t),r=t=>({x:i(t.x,e),y:i(t.y,n)});return r({x:new T(0),y:new T(0)}),r}return q},z=t=>({set:t=>{D=z(t)},reset:()=>z(t),compare:B(t),snap:F(t),orient:G(t)}),D=z(),U=(t,e)=>t.ll.x.isLessThanOrEqualTo(e.x)&&e.x.isLessThanOrEqualTo(t.ur.x)&&t.ll.y.isLessThanOrEqualTo(e.y)&&e.y.isLessThanOrEqualTo(t.ur.y),V=(t,e)=>{if(e.ur.x.isLessThan(t.ll.x)||t.ur.x.isLessThan(e.ll.x)||e.ur.y.isLessThan(t.ll.y)||t.ur.y.isLessThan(e.ll.y))return null;const n=t.ll.x.isLessThan(e.ll.x)?e.ll.x:t.ll.x,i=t.ur.x.isLessThan(e.ur.x)?t.ur.x:e.ur.x;return{ll:{x:n,y:t.ll.y.isLessThan(e.ll.y)?e.ll.y:t.ll.y}
vendor: 13,018 bytes, line 1
1,ur:{x:i,y:t.ur.y.isLessThan(e.ur.y)?t.ur.y:e.ur.y}}},j=(t,e)=>t.x.times(e.y).minus(t.y.times(e.x)),$=(t,e)=>t.x.times(e.x).plus(t.y.times(e.y)),K=t=>$(t,t).sqrt(),Z=(t,e,n)=>{const i={x:e.x.minus(t.x),y:e.y.minus(t.y)},r={x:n.x.minus(t.x),y:n.y.minus(t.y)};return j(r,i).div(K(r)).div(K(i))},H=(t,e,n)=>{const i={x:e.x.minus(t.x),y:e.y.minus(t.y)},r={x:n.x.minus(t.x),y:n.y.minus(t.y)};return $(r,i).div(K(r)).div(K(i))},Y=(t,e,n)=>e.y.isZero()?null:{x:t.x.plus(e.x.div(e.y).times(n.minus(t.y))),y:n},W=(t,e,n)=>e.x.isZero()?null:{x:n,y:t.y.plus(e.y.div(e.x).times(n.minus(t.x)))},X=class t{point;isLeft;segment;otherSE;consumedBy;static compare(e,n){const i=t.comparePoints(e.point,n.point);return 0!==i?i:(e.point!==n.point&&e.link(n),e.isLeft!==n.isLeft?e.isLeft?1:-1:st.compare(e.segment,n.segment))}static comparePoints(t,e){return t.x.isLessThan(e.x)?-1:t.x.isGreaterThan(e.x)?1:t.y.isLessThan(e.y)?-1:t.y.isGreaterThan(e.y)?1:0}constructor(t,e){void 0===t.events?t.events=[this]:t.events.push(this),this.point=t,this.isLeft=e}link(t){if(t.point===this.point)throw new Error("Tried to link already linked events");const e=t.point.events;for(let n=0,i=e.length;n<i;n++){const t=e[n];this.point.events.push(t),t.point=this.point}this.checkForConsuming()}checkForConsuming(){const t=this.point.events.length;for(let e=0;e<t;e++){const n=this.point.events[e];if(void 0===n.segment.consumedBy)for(let i=e+1;i<t;i++){const t=this.point.events[i];void 0===t.consumedBy&&(n.otherSE.point.events===t.otherSE.point.events&&n.segment.consume(t.segment))}}}getAvailableLinkedEvents(){const t=[];for(let e=0,n=this.point.events.length;e<n;e++){const n=this.point.events[e];n!==this&&!n.segment.ringOut&&n.segment.isInResult()&&t.push(n)}return t}getLeftmostComparator(t){const e=new Map,n=n=>{const i=n.otherSE;e.set(n,{sine:Z(this.point,t.point,i.point),cosine:H(this.point,t.point,i.point)})};return(t,i)=>{e.has(t)||n(t),e.has(i)||n(i);const{sine:r,cosine:s}=e.get(t),{sine:o,cosine:l}=e.get(i);return r.isGreaterThanOrEqualTo(0)&&o.isGreaterThanOrEqualTo(0)?s.isLessThan(l)?1:s.isGreaterThan(l)?-1:0:r.isLessThan(0)&&o.isLessThan(0)?s.isLessThan(l)?-1:s.isGreaterThan(l)?1:0:o.isLessThan(r)?-1:o.isGreaterThan(r)?1:0}}},J=class t{events;poly;_isExteriorRing;_enclosingRing;static factory(e){const n=[];for(let i=0,r=e.length;i<r;i++){const r=e[i];if(!r.isInResult()||r.ringOut)continue;let s=null,o=r.leftSE,l=r.rightSE;const u=[o],h=o.point,a=[];for(;s=o,o=l,u.push(o),o.point!==h;)for(;;){const e=o.getAvailableLinkedEvents();if(0===e.length){const t=u[0].point,e=u[u.length-1].point;throw new Error(`Unable to complete output ring starting at [${t.x}, ${t.y}]. Last matching segment found ends at [${e.x}, ${e.y}].`)}if(1===e.length){l=e[0].otherSE;break}let i=null;for(let t=0,n=a.length;t<n;t++)if(a[t].point===o.point){i=t;break}if(null!==i){const e=a.splice(i)[0],r=u.splice(e.index);r.unshift(r[0].otherSE),n.push(new t(r.reverse()));continue}a.push({index:u.length,point:o.point});const r=o.getLeftmostComparator(s);l=e.sort(r)[0].otherSE;break}n.push(new t(u))}return n}constructor(t){this.events=t;for(let e=0,n=t.length;e<n;e++)t[e].segment.ringOut=this;this.poly=null}getGeom(){let t=this.events[0].point;const e=[t];for(let u=1,h=this.events.length-1;u<h;u++){const n=this.events[u].point,i=this.events[u+1].point;0!==D.orient(n,t,i)&&(e.push(n),t=n)}if(1===e.length)return null;const n=e[0],i=e[1];0===D.orient(n,t,i)&&e.shift(),e.push(e[0]);const r=this.isExteriorRing()?1:-1,s=this.isExteriorRing()?0:e.length-1,o=this.isExteriorRing()?e.length:-1,l=[];for(let u=s;u!=o;u+=r)l.push([e[u].x.toNumber(),e[u].y.toNumber()]);return l}isExteriorRing(){if(void 0===this._isExteriorRing){const t=this.enclosingRing();this._isExteriorRing=!t||!t.isExteriorRing()}return this._isExteriorRing}enclosingRing(){return void 0===this._enclosingRing&&(this._enclosingRing=this._calcEnclosingRing()),this._enclosingRing}_calcEnclosingRing(){let t=this.events[0];for(let i=1,r=this.events.length;i<r;i++){const e=this.events[i];X.compare(t,e)>0&&(t=e)}let e=t.segment.prevInResult(),n=e?e.prevInResult():null;for(;;){if(!e)return null;if(!n)return e.ringOut;if(n.ringOut!==e.ringOut)return n.ringOut?.enclosingRing()!==e.ringOut?e.ringOut:e.ringOut?.enclosingRing();e=n.prevInResult(),n=e?e.prevInResult():null}}},Q=class{exteriorRing;interiorRings;constructor(t){this.exteriorRing=t,t.poly=this,this.interiorRings=[]}addInterior(t){this.interiorRings.push(t),t.poly=this}getGeom(){const t=this.exteriorRing.getGeom();if(null===t)return null;const e=[t];for(let n=0,i=this.interiorRings.length;n<i;n++){const t=this.interiorRings[n].getGeom();null!==t&&e.push(t)}return e}},tt=class{rings;polys;constructor(t){this.rings=t,this.polys=this._composePolys(t)}getGeom(){const t=[];for(let e=0,n=this.polys.length;e<n;e++){const n=this.polys[e].getGeom();null!==n&&t.push(n)}return t}_composePolys(t){const e=[];for(let n=0,i=t.length;n<i;n++){const i=t[n];if(!i.poly)if(i.isExteriorRing())e.push(new Q(i));else{const t=i.enclosingRing();t?.poly||e.push(new Q(t)),t?.poly?.addInterior(i)}}return e}},et=class{queue;tree;segments;constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:st.compare;this.queue=t,this.tree=new N(e),this.segments=[]}process(t){const e=t.segment,n=[];if(t.consumedBy)return t.isLeft?this.queue.delete(t.otherSE):this.tree.delete(e),n;t.isLeft&&this.tree.add(e);let i=e,r=e;do{i=this.tree.lastBefore(i)}while(null!=i&&void 0!=i.consumedBy);do{r=this.tree.firstAfter(r)}while(null!=r&&void 0!=r.consumedBy);if(t.isLeft){let s=null;if(i){const t=i.getIntersection(e);if(null!==t&&(e.isAnEndpoint(t)||(s=t),!i.isAnEndpoint(t))){const e=this._splitSafely(i,t);for(let t=0,i=e.length;t<i;t++)n.push(e[t])}}let o=null;if(r){const t=r.getIntersection(e);if(null!==t&&(e.isAnEndpoint(t)||(o=t),!r.isAnEndpoint(t))){const e=this._splitSafely(r,t);for(let t=0,i=e.length;t<i;t++)n.push(e[t])}}if(null!==s||null!==o){let t=null;if(null===s)t=o;else if(null===o)t=s;else{t=X.comparePoints(s,o)<=0?s:o}this.queue.delete(e.rightSE),n.push(e.rightSE);const i=e.split(t);for(let e=0,r=i.length;e<r;e++)n.push(i[e])}n.length>0?(this.tree.delete(e),n.push(t)):(this.segments.push(e),e.prev=i)}else{if(i&&r){const t=i.getIntersection(r);if(null!==t){if(!i.isAnEndpoint(t)){const e=this._splitSafely(i,t);for(let t=0,i=e.length;t<i;t++)n.push(e[t])}if(!r.isAnEndpoint(t)){const e=this._splitSafely(r,t);for(let t=0,i=e.length;t<i;t++)n.push(e[t])}}}this.tree.delete(e)}return n}_splitSafely(t,e){this.tree.delete(t);const n=t.rightSE;this.queue.delete(n);const i=t.split(e);return i.push(n),void 0===t.consumedBy&&this.tree.add(t),i}},nt=new class{type;numMultiPolys;run(t,e,n){nt.type=t;const i=[new ut(e,!0)];for(let u=0,h=n.length;u<h;u++)i.push(new ut(n[u],!1));if(nt.numMultiPolys=i.length,"difference"===nt.type){const t=i[0];let e=1;for(;e<i.length;)null!==V(i[e].bbox,t.bbox)?e++:i.splice(e,1)}if("intersection"===nt.type)for(let u=0,h=i.length;u<h;u++){const t=i[u];for(let e=u+1,n=i.length;e<n;e++)if(null===V(t.bbox,i[e].bbox))return[]}const r=new N(X.compare);for(let u=0,h=i.length;u<h;u++){const t=i[u].getSweepEvents();for(let e=0,n=t.length;e<n;e++)r.add(t[e])}const s=new et(r);let o=null;for(0!=r.size&&(o=r.first(),r.delete(o));o;){const t=s.process(o);for(let e=0,n=t.length;e<n;e++){const n=t[e];void 0===n.consumedBy&&r.add(n)}0!=r.size?(o=r.first(),r.delete(o)):o=null}D.reset();const l=J.factory(s.segments);return new tt(l).getGeom()}},it=nt,rt=0,st=class t{id;leftSE;rightSE;rings;windings;ringOut;consumedBy;prev;_prevInResult;_beforeState;_afterState;_isInResult;static compare(t,e){const n=t.leftSE.point.x,i=e.leftSE.point.x,r=t.rightSE.point.x,s=e.rightSE.point.x;if(s.isLessThan(n))return 1;if(r.isLessThan(i))return-1;const o=t.leftSE.point.y,l=e.leftSE.point.y,u=t.rightSE.point.y,h=e.rightSE.point.y;if(n.isLessThan(i)){if(l.isLessThan(o)&&l.isLessThan(u))return 1;if(l.isGreaterThan(o)&&l.isGreaterThan(u))return-1;const n=t.comparePoint(e.leftSE.point);if(n<0)return 1;if(n>0)return-1;const i=e.comparePoint(t.rightSE.point);return 0!==i?i:-1}if(n.isGreaterThan(i)){if(o.isLessThan(l)&&o.isLessThan(h))return-1;if(o.isGreaterThan(l)&&o.isGreaterThan(h))return 1;const n=e.comparePoint(t.leftSE.point);if(0!==n)return n;const i=t.comparePoint(e.rightSE.point);return i<0?1:i>0?-1:1}if(o.isLessThan(l))return-1;if(o.isGreaterThan(l))return 1;if(r.isLessThan(s)){const n=e.comparePoint(t.rightSE.point);if(0!==n)return n}if(r.isGreaterThan(s)){const n=t.comparePoint(e.rightSE.point);if(n<0)return 1;if(n>0)return-1}if(!r.eq(s)){const t=u.minus(o),e=r.minus(n),a=h.minus(l),c=s.minus(i);if(t.isGreaterThan(e)&&a.isLessThan(c))return 1;if(t.isLessThan(e)&&a.isGreaterThan(c))return-1}return r.isGreaterThan(s)?1:r.isLessThan(s)||u.isLessThan(h)?-1:u.isGreaterThan(h)?1:t.id<e.id?-1:t.id>e.id?1:0}constructor(t,e,n,i){this.id=++rt,this.leftSE=t,t.segment=this,t.otherSE=e,this.rightSE=e,e.segment=this,e.otherSE=t,this.rings=n,this.windings=i}static fromRing(e,n,i){let r,s,o;const l=X.comparePoints(e,n);if(l<0)r=e,s=n,o=1;else{if(!(l>0))throw new Error(`Tried to create degenerate segment at [${e.x}, ${e.y}]`);r=n,s=e,o=-1}const u=new X(r,!0),h=new X(s,!1);return new t(u,h,[i],[o])}replaceRightSE(t){this.rightSE=t,this.rightSE.segment=this,this.rightSE.otherSE=this.leftSE,this.leftSE.otherSE=this.rightSE}bbox(){const t=this.leftSE.point.y,e=this.rightSE.point.y;return{ll:{x:this.leftSE.point.x,y:t.isLessThan(e)?t:e},ur:{x:this.rightSE.point.x,y:t.isGreaterThan(e)?t:e}}}vector(){return{x:this.rightSE.point.x.minus(this.leftSE.point.x),y:this.rightSE.point.y.minus(this.leftSE.point.y)}}isAnEndpoint(t){return t.x.eq(this.leftSE.point.x)&&t.y.eq(this.leftSE.point.y)||t.x.eq(this.rightSE.point.x)&&t.y.eq(this.rightSE.point.y)}comparePoint(t){return D.orient(this.leftSE.point,t,this.rightSE.point)}getIntersection(t){const e=this.bbox(),n=t.bbox(),i=V(e,n);if(null===i)return null;const r=this.leftSE.point,s=this.rightSE.point,o=t.leftSE.point,l=t.rightSE.point,u=U(e,o)&&0===this.comparePoint(o),h=U(n,r)&&0===t.comparePoint(r),a=U(e,l)&&0===this.comparePoint(l),c=U(n,s)&&0===t.comparePoint(s);if(h&&u)return c&&!a?s:!c&&a?l:null;if(h)return a&&r.x.eq(l.x)&&r.y.eq(l.y)?null:r;if(u)return c&&s.x.eq(o.x)&&s.y.eq(o.y)?null:o;if(c&&a)return null;if(c)return s;if(a)return l;const f=((t,e,n,i)=>{if(e.x.isZero())return W(n,i,t.x);if(i.x.isZero())return W(t,e,n.x);if(e.y.isZero())return Y(n,i,t.y);if(i.y.isZero())return Y(t,e,n.y);const r=j(e,i);if(r.isZero())return null;const s={x:n.x.minus(t.x),y:n.y.minus(t.y)},o=j(s,e).div(r),l=j(s,i).div(r),u=t.x.plus(l.times(e.x)),h=n.x.plus(o.times(i.x)),a=t.y.plus(l.times(e.y)),c=n.y.plus(o.times(i.y));return{x:u.plus(h).div(2),y:a.plus(c).div(2)}})(r,this.vector(),o,t.vector());return null===f?null:U(i,f)?D.snap(f):null}split(e){const n=[],i=void 0!==e.events,r=new X(e,!0),s=new X(e,!1),o=this.rightSE;this.replaceRightSE(s),n.push(s),n.push(r);const l=new t(r,o,this.rings.slice(),this.windings.slice());return X.comparePoints(l.leftSE.point,l.rightSE.point)>0&&l.swapEvents(),X.comparePoints(this.leftSE.point,this.rightSE.point)>0&&this.swapEvents(),i&&(r.checkForConsuming(),s.checkForConsuming()),n}swapEvents(){const t=this.rightSE;this.rightSE=this.leftSE,this.leftSE=t,this.leftSE.isLeft=!0,this.rightSE.isLeft=!1;for(let e=0,n=this.windings.length;e<n;e++)this.windings[e]*=-1}consume(e){let n=this,i=e;for(;n.consumedBy;)n=n.consumedBy;for(;i.consumedBy;)i=i.consumedBy;const r=t.compare(n,i);if(0!==r){if(r>0){const t=n;n=i,i=t}if(n.prev===i){const t=n;n=i,i=t}for(let t=0,e=i.rings.length;t<e;t++){const e=i.rings[t],r=i.windings[t],s=n.rings.indexOf(e);-1===s?(n.rings.push(e),n.windings.push(r)):n.windings[s]+=r}i.rings=null,i.windings=null,i.consumedBy=n,i.leftSE.consumedBy=n.leftSE,i.rightSE.consumedBy=n.rightSE}}prevInResult(){return void 0!==this._prevInResult||(this.prev?this.prev.isInResult()?this._prevInResult=this.prev:this._prevInResult=this.prev.prevInResult():this._prevInResult=null),this._prevInResult}beforeState(){if(void 0!==this._beforeState)return this._beforeState;if(this.prev){const t=this.prev.consumedBy||this.prev;this._beforeState=t.afterState()}else this._beforeState={rings:[],windings:[],multiPolys:[]};return this._beforeState}afterState(){if(void 0!==this._afterState)return this._afterState;const t=this.beforeState();this._afterState={rings:t.rings.slice(0),windings:t.windings.slice(0),multiPolys:[]};const e=this._afterState.rings,n=this._afterState.windings,i=this._afterState.multiPolys;for(let o=0,l=this.rings.length;o<l;o++){const t=this.rings[o],i=this.windings[o],r=e.indexOf(t);-1===r?(e.push(t),n.push(i)):n[r]+=i}const r=[],s=[];for(let o=0,l=e.length;o<l;o++){if(0===n[o])continue;const t=e[o],i=t.poly;if(-1===s.indexOf(i))if(t.isExterior)r.push(i);else{-1===s.indexOf(i)&&s.push(i);const e=r.indexOf(t.poly);-1!==e&&r.splice(e,1)}}for(let o=0,l=r.length;o<l;o++){const t=r[o].multiPoly;-1===i.indexOf(t)&&i.push(t)}return this._afterState}
1isInResult(){if(this.consumedBy)return!1;if(void 0!==this._isInResult)return this._isInResult;const t=this.beforeState().multiPolys,e=this.afterState().multiPolys;switch(it.type){case"union":{const n=0===t.length,i=0===e.length;this._isInResult=n!==i;break}case"intersection":{let n,i;t.length<e.length?(n=t.length,i=e.length):(n=e.length,i=t.length),this._isInResult=i===it.numMultiPolys&&n<i;break}case"xor":{const n=Math.abs(t.length-e.length);this._isInResult=n%2===1;break}case"difference":{const n=t=>1===t.length&&t[0].isSubject;this._isInResult=n(t)!==n(e);break}}return this._isInResult}},ot=class{poly;isExterior;segments;bbox;constructor(t,e,n){if(!Array.isArray(t)||0===t.length)throw new Error("Input geometry is not a valid Polygon or MultiPolygon");if(this.poly=e,this.isExterior=n,this.segments=[],"number"!==typeof t[0][0]||"number"!==typeof t[0][1])throw new Error("Input geometry is not a valid Polygon or MultiPolygon");const i=D.snap({x:new T(t[0][0]),y:new T(t[0][1])});this.bbox={ll:{x:i.x,y:i.y},ur:{x:i.x,y:i.y}};let r=i;for(let s=1,o=t.length;s<o;s++){if("number"!==typeof t[s][0]||"number"!==typeof t[s][1])throw new Error("Input geometry is not a valid Polygon or MultiPolygon");const e=D.snap({x:new T(t[s][0]),y:new T(t[s][1])});e.x.eq(r.x)&&e.y.eq(r.y)||(this.segments.push(st.fromRing(r,e,this)),e.x.isLessThan(this.bbox.ll.x)&&(this.bbox.ll.x=e.x),e.y.isLessThan(this.bbox.ll.y)&&(this.bbox.ll.y=e.y),e.x.isGreaterThan(this.bbox.ur.x)&&(this.bbox.ur.x=e.x),e.y.isGreaterThan(this.bbox.ur.y)&&(this.bbox.ur.y=e.y),r=e)}i.x.eq(r.x)&&i.y.eq(r.y)||this.segments.push(st.fromRing(r,i,this))}getSweepEvents(){const t=[];for(let e=0,n=this.segments.length;e<n;e++){const n=this.segments[e];t.push(n.leftSE),t.push(n.rightSE)}return t}},lt=class{multiPoly;exteriorRing;interiorRings;bbox;constructor(t,e){if(!Array.isArray(t))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");this.exteriorRing=new ot(t[0],this,!0),this.bbox={ll:{x:this.exteriorRing.bbox.ll.x,y:this.exteriorRing.bbox.ll.y},ur:{x:this.exteriorRing.bbox.ur.x,y:this.exteriorRing.bbox.ur.y}},this.interiorRings=[];for(let n=1,i=t.length;n<i;n++){const e=new ot(t[n],this,!1);e.bbox.ll.x.isLessThan(this.bbox.ll.x)&&(this.bbox.ll.x=e.bbox.ll.x),e.bbox.ll.y.isLessThan(this.bbox.ll.y)&&(this.bbox.ll.y=e.bbox.ll.y),e.bbox.ur.x.isGreaterThan(this.bbox.ur.x)&&(this.bbox.ur.x=e.bbox.ur.x),e.bbox.ur.y.isGreaterThan(this.bbox.ur.y)&&(this.bbox.ur.y=e.bbox.ur.y),this.interiorRings.push(e)}this.multiPoly=e}getSweepEvents(){const t=this.exteriorRing.getSweepEvents();for(let e=0,n=this.interiorRings.length;e<n;e++){const n=this.interiorRings[e].getSweepEvents();for(let e=0,i=n.length;e<i;e++)t.push(n[e])}return t}},ut=class{isSubject;polys;bbox;constructor(t,e){if(!Array.isArray(t))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");try{"number"===typeof t[0][0][0]&&(t=[t])}catch(n){}this.polys=[],this.bbox={ll:{x:new T(Number.POSITIVE_INFINITY),y:new T(Number.POSITIVE_INFINITY)},ur:{x:new T(Number.NEGATIVE_INFINITY),y:new T(Number.NEGATIVE_INFINITY)}};for(let i=0,r=t.length;i<r;i++){const e=new lt(t[i],this);e.bbox.ll.x.isLessThan(this.bbox.ll.x)&&(this.bbox.ll.x=e.bbox.ll.x),e.bbox.ll.y.isLessThan(this.bbox.ll.y)&&(this.bbox.ll.y=e.bbox.ll.y),e.bbox.ur.x.isGreaterThan(this.bbox.ur.x)&&(this.bbox.ur.x=e.bbox.ur.x),e.bbox.ur.y.isGreaterThan(this.bbox.ur.y)&&(this.bbox.ur.y=e.bbox.ur.y),this.polys.push(e)}this.isSubject=e}getSweepEvents(){const t=[];for(let e=0,n=this.polys.length;e<n;e++){const n=this.polys[e].getSweepEvents();for(let e=0,i=n.length;e<i;e++)t.push(n[e])}return t}},ht=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];return it.run("intersection",t,n)};D.set;function at(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=[];if((0,r.kX)(t,(t=>{n.push(t.coordinates)}
1)),n.length<2)throw new Error("Must specify at least 2 geometries");const s=ht(n[0],...n.slice(1));return 0===s.length?null:1===s.length?(0,i.n1)(s[0],e.properties):(0,i.g5)(s,e.properties)}},93985:(t,e,n)=>{n.d(e,{W:()=>s});var i=n(74023),r=n(85781);function s(t){return(0,r.jE)(t,((t,e)=>t+function(t){let e,n=0;switch(t.type){case"Polygon":return o(t.coordinates);case"MultiPolygon":for(e=0;e<t.coordinates.length;e++)n+=o(t.coordinates[e]);return n;case"Point":case"MultiPoint":case"LineString":case"MultiLineString":return 0}return 0}(e)),0)}function o(t){let e=0;if(t&&t.length>0){e+=Math.abs(h(t[0]));for(let n=1;n<t.length;n++)e-=Math.abs(h(t[n]))}return e}var l=i.zX*i.zX/2,u=Math.PI/180;function h(t){const e=t.length-1;if(e<=2)return 0;let n=0,i=0;for(;i<e;){const r=t[i],s=t[i+1===e?0:i+1],o=t[i+2>=e?(i+2)%e:i+2],l=r[0]*u,h=s[1]*u;n+=(o[0]*u-l)*Math.sin(h),i++}return n*l}}}]);
2//# sourceMappingURL=350.3c998f1e.chunk.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.