@esri/solutions-components 0.6.9 → 0.6.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (71) hide show
  1. package/dist/assets/t9n/crowdsource-manager/resources.json +2 -1
  2. package/dist/assets/t9n/crowdsource-manager/resources_en.json +2 -1
  3. package/dist/assets/t9n/info-card/resources.json +4 -1
  4. package/dist/assets/t9n/info-card/resources_en.json +4 -1
  5. package/dist/assets/t9n/layer-table/resources.json +2 -1
  6. package/dist/assets/t9n/layer-table/resources_en.json +2 -1
  7. package/dist/assets/t9n/map-tools/resources.json +0 -3
  8. package/dist/assets/t9n/map-tools/resources_en.json +0 -3
  9. package/dist/cjs/basemap-gallery_5.cjs.entry.js +6 -61
  10. package/dist/cjs/card-manager_3.cjs.entry.js +22 -12
  11. package/dist/cjs/crowdsource-manager.cjs.entry.js +27 -5
  12. package/dist/cjs/{downloadUtils-1f057ec0.js → downloadUtils-471a6a2d.js} +16 -10
  13. package/dist/cjs/edit-card_2.cjs.entry.js +34 -2
  14. package/dist/cjs/{index.es-a1507f1c.js → index.es-33154f03.js} +1 -1
  15. package/dist/cjs/loader.cjs.js +1 -1
  16. package/dist/cjs/map-select-tools_3.cjs.entry.js +1 -1
  17. package/dist/cjs/public-notification.cjs.entry.js +1 -1
  18. package/dist/cjs/solutions-components.cjs.js +1 -1
  19. package/dist/collection/components/card-manager/card-manager.js +1 -1
  20. package/dist/collection/components/crowdsource-manager/crowdsource-manager.css +23 -2
  21. package/dist/collection/components/crowdsource-manager/crowdsource-manager.js +27 -4
  22. package/dist/collection/components/info-card/info-card.css +15 -2
  23. package/dist/collection/components/info-card/info-card.js +34 -1
  24. package/dist/collection/components/layer-table/layer-table.css +20 -0
  25. package/dist/collection/components/layer-table/layer-table.js +5 -1
  26. package/dist/collection/components/map-card/map-card.css +0 -7
  27. package/dist/collection/components/map-card/map-card.js +13 -7
  28. package/dist/collection/components/map-picker/map-picker.css +5 -1
  29. package/dist/collection/components/map-picker/map-picker.js +2 -2
  30. package/dist/collection/components/map-tools/map-tools.css +14 -0
  31. package/dist/collection/components/map-tools/map-tools.js +2 -59
  32. package/dist/collection/utils/downloadUtils.js +15 -9
  33. package/dist/collection/utils/downloadUtils.ts +21 -10
  34. package/dist/components/card-manager2.js +6 -6
  35. package/dist/components/crowdsource-manager.js +28 -5
  36. package/dist/components/downloadUtils.js +15 -9
  37. package/dist/components/info-card2.js +40 -7
  38. package/dist/components/layer-table2.js +6 -2
  39. package/dist/components/map-card2.js +14 -8
  40. package/dist/components/map-picker2.js +3 -3
  41. package/dist/components/map-tools2.js +3 -58
  42. package/dist/esm/basemap-gallery_5.entry.js +6 -61
  43. package/dist/esm/card-manager_3.entry.js +22 -12
  44. package/dist/esm/crowdsource-manager.entry.js +27 -5
  45. package/dist/esm/{downloadUtils-64c27514.js → downloadUtils-8d4c13bb.js} +16 -10
  46. package/dist/esm/edit-card_2.entry.js +34 -2
  47. package/dist/esm/{index.es-b7bc2db1.js → index.es-065c3035.js} +1 -1
  48. package/dist/esm/loader.js +1 -1
  49. package/dist/esm/map-select-tools_3.entry.js +1 -1
  50. package/dist/esm/public-notification.entry.js +1 -1
  51. package/dist/esm/solutions-components.js +1 -1
  52. package/dist/solutions-components/{p-12f06497.entry.js → p-0dd8368d.entry.js} +1 -1
  53. package/dist/solutions-components/p-46352a57.entry.js +6 -0
  54. package/dist/solutions-components/{p-22d06238.js → p-6eb4ba8f.js} +1 -1
  55. package/dist/solutions-components/{p-a26dc184.js → p-95c11620.js} +2 -2
  56. package/dist/solutions-components/p-9eba78eb.entry.js +6 -0
  57. package/dist/solutions-components/{p-b2a52acb.entry.js → p-c26cd409.entry.js} +1 -1
  58. package/dist/solutions-components/p-d4cb29ed.entry.js +6 -0
  59. package/dist/solutions-components/p-fb7ca639.entry.js +6 -0
  60. package/dist/solutions-components/solutions-components.esm.js +1 -1
  61. package/dist/solutions-components/utils/downloadUtils.ts +21 -10
  62. package/dist/types/components/crowdsource-manager/crowdsource-manager.d.ts +17 -0
  63. package/dist/types/components/info-card/info-card.d.ts +23 -0
  64. package/dist/types/components/map-card/map-card.d.ts +4 -0
  65. package/dist/types/components/map-tools/map-tools.d.ts +0 -42
  66. package/dist/types/utils/downloadUtils.d.ts +7 -3
  67. package/package.json +1 -1
  68. package/dist/solutions-components/p-0dce2c3b.entry.js +0 -6
  69. package/dist/solutions-components/p-476eb52c.entry.js +0 -6
  70. package/dist/solutions-components/p-8b8a6c1f.entry.js +0 -6
  71. package/dist/solutions-components/p-97a4001d.entry.js +0 -6
@@ -3,7 +3,7 @@
3
3
  * Licensed under the Apache License, Version 2.0
4
4
  * http://www.apache.org/licenses/LICENSE-2.0
5
5
  */
6
- import{a as t,c as r,g as i}from"./p-e1a4994d.js";import{_ as e}from"./p-a26dc184.js";import"./p-9310b882.js";import"./p-0266ca81.js";import"./p-7f9642d5.js";import"./p-f8dd2784.js";import"./p-868df4a0.js";var n,s,a=function(t){return t&&t.Math==Math&&t},o=a("object"==typeof globalThis&&globalThis)||a("object"==typeof window&&window)||a("object"==typeof self&&self)||a("object"==typeof t&&t)||function(){return this}()||Function("return this")(),h=function(t){try{return!!t()}catch(t){return!0}},u=!h((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),c=!h((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})),f=Function.prototype.call,l=c?f.bind(f):function(){return f.apply(f,arguments)},v={}.propertyIsEnumerable,d=Object.getOwnPropertyDescriptor,p=d&&!v.call({1:2},1)?function(t){var r=d(this,t);return!!r&&r.enumerable}:v,y={f:p},g=function(t,r){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:r}},m=Function.prototype,b=m.call,w=c&&m.bind.bind(b,b),x=c?w:function(t){return function(){return b.apply(t,arguments)}},M=x({}.toString),k=x("".slice),S=function(t){return k(M(t),8,-1)},N=Object,P=x("".split),j=h((function(){return!N("z").propertyIsEnumerable(0)}))?function(t){return"String"==S(t)?P(t,""):N(t)}:N,O=function(t){return null==t},E=TypeError,T=function(t){if(O(t))throw E("Can't call method on "+t);return t},C=function(t){return j(T(t))},A="object"==typeof document&&document.all,R={all:A,IS_HTMLDDA:void 0===A&&void 0!==A},B=R.all,L=R.IS_HTMLDDA?function(t){return"function"==typeof t||t===B}:function(t){return"function"==typeof t},$=R.all,I=R.IS_HTMLDDA?function(t){return"object"==typeof t?null!==t:L(t)||t===$}:function(t){return"object"==typeof t?null!==t:L(t)},D=function(t,r){return arguments.length<2?L(i=o[t])?i:void 0:o[t]&&o[t][r];var i},F=x({}.isPrototypeOf),z="undefined"!=typeof navigator&&String(navigator.userAgent)||"",_=o.process,Y=o.Deno,X=_&&_.versions||Y&&Y.version,q=X&&X.v8;q&&(s=(n=q.split("."))[0]>0&&n[0]<4?1:+(n[0]+n[1])),!s&&z&&(!(n=z.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=z.match(/Chrome\/(\d+)/))&&(s=+n[1]);var G=s,U=!!Object.getOwnPropertySymbols&&!h((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&G&&G<41})),V=U&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,H=Object,W=V?function(t){return"symbol"==typeof t}:function(t){var r=D("Symbol");return L(r)&&F(r.prototype,H(t))},Q=String,Z=function(t){try{return Q(t)}catch(t){return"Object"}},K=TypeError,J=function(t){if(L(t))return t;throw K(Z(t)+" is not a function")},tt=function(t,r){var i=t[r];return O(i)?void 0:J(i)},rt=TypeError,it=Object.defineProperty,et=function(t,r){try{it(o,t,{value:r,configurable:!0,writable:!0})}catch(i){o[t]=r}return r},nt="__core-js_shared__",st=o[nt]||et(nt,{}),at=r((function(t){(t.exports=function(t,r){return st[t]||(st[t]=void 0!==r?r:{})})("versions",[]).push({version:"3.27.2",mode:"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.27.2/LICENSE",source:"https://github.com/zloirock/core-js"})})),ot=Object,ht=function(t){return ot(T(t))},ut=x({}.hasOwnProperty),ct=Object.hasOwn||function(t,r){return ut(ht(t),r)},ft=0,lt=Math.random(),vt=x(1..toString),dt=function(t){return"Symbol("+(void 0===t?"":t)+")_"+vt(++ft+lt,36)},pt=o.Symbol,yt=at("wks"),gt=V?pt.for||pt:pt&&pt.withoutSetter||dt,mt=function(t){return ct(yt,t)||(yt[t]=U&&ct(pt,t)?pt[t]:gt("Symbol."+t)),yt[t]},bt=TypeError,wt=mt("toPrimitive"),xt=function(t){var r=function(t,r){if(!I(t)||W(t))return t;var i,e=tt(t,wt);if(e){if(void 0===r&&(r="default"),i=l(e,t,r),!I(i)||W(i))return i;throw bt("Can't convert object to primitive value")}return void 0===r&&(r="number"),function(t,r){var i,e;if("string"===r&&L(i=t.toString)&&!I(e=l(i,t)))return e;if(L(i=t.valueOf)&&!I(e=l(i,t)))return e;if("string"!==r&&L(i=t.toString)&&!I(e=l(i,t)))return e;throw rt("Can't convert object to primitive value")}(t,r)}(t,"string");return W(r)?r:r+""},Mt=o.document,kt=I(Mt)&&I(Mt.createElement),St=function(t){return kt?Mt.createElement(t):{}},Nt=!u&&!h((function(){return 7!=Object.defineProperty(St("div"),"a",{get:function(){return 7}}).a})),Pt=Object.getOwnPropertyDescriptor,jt=u?Pt:function(t,r){if(t=C(t),r=xt(r),Nt)try{return Pt(t,r)}catch(t){}if(ct(t,r))return g(!l(y.f,t,r),t[r])},Ot={f:jt},Et=u&&h((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Tt=String,Ct=TypeError,At=function(t){if(I(t))return t;throw Ct(Tt(t)+" is not an object")},Rt=TypeError,Bt=Object.defineProperty,Lt=Object.getOwnPropertyDescriptor,$t="enumerable",It="configurable",Dt="writable",Ft=u?Et?function(t,r,i){if(At(t),r=xt(r),At(i),"function"==typeof t&&"prototype"===r&&"value"in i&&Dt in i&&!i[Dt]){var e=Lt(t,r);e&&e[Dt]&&(t[r]=i.value,i={configurable:It in i?i[It]:e[It],enumerable:$t in i?i[$t]:e[$t],writable:!1})}return Bt(t,r,i)}:Bt:function(t,r,i){if(At(t),r=xt(r),At(i),Nt)try{return Bt(t,r,i)}catch(t){}if("get"in i||"set"in i)throw Rt("Accessors not supported");return"value"in i&&(t[r]=i.value),t},zt={f:Ft},_t=u?function(t,r,i){return zt.f(t,r,g(1,i))}:function(t,r,i){return t[r]=i,t},Yt=Function.prototype,Xt=u&&Object.getOwnPropertyDescriptor,qt=ct(Yt,"name"),Gt={EXISTS:qt,PROPER:qt&&"something"===function(){}.name,CONFIGURABLE:qt&&(!u||u&&Xt(Yt,"name").configurable)},Ut=x(Function.toString);L(st.inspectSource)||(st.inspectSource=function(t){return Ut(t)});var Vt,Ht,Wt,Qt=st.inspectSource,Zt=o.WeakMap,Kt=L(Zt)&&/native code/.test(String(Zt)),Jt=at("keys"),tr=function(t){return Jt[t]||(Jt[t]=dt(t))},rr={},ir="Object already initialized",er=o.TypeError;if(Kt||st.state){var nr=st.state||(st.state=new(0,o.WeakMap));nr.get=nr.get,nr.has=nr.has,nr.set=nr.set,Vt=function(t,r){if(nr.has(t))throw er(ir);return r.facade=t,nr.set(t,r),r},Ht=function(t){return nr.get(t)||{}},Wt=function(t){return nr.has(t)}}else{var sr=tr("state");rr[sr]=!0,Vt=function(t,r){if(ct(t,sr))throw er(ir);return r.facade=t,_t(t,sr,r),r},Ht=function(t){return ct(t,sr)?t[sr]:{}},Wt=function(t){return ct(t,sr)}}var ar={set:Vt,get:Ht,has:Wt,enforce:function(t){return Wt(t)?Ht(t):Vt(t,{})},getterFor:function(t){return function(r){var i;if(!I(r)||(i=Ht(r)).type!==t)throw er("Incompatible receiver, "+t+" required");return i}}},or=r((function(t){var r=Gt.CONFIGURABLE,i=ar.enforce,e=ar.get,n=String,s=Object.defineProperty,a=x("".slice),o=x("".replace),c=x([].join),f=u&&!h((function(){return 8!==s((function(){}),"length",{value:8}).length})),l=String(String).split("String"),v=t.exports=function(t,e,h){"Symbol("===a(n(e),0,7)&&(e="["+o(n(e),/^Symbol\(([^)]*)\)/,"$1")+"]"),h&&h.getter&&(e="get "+e),h&&h.setter&&(e="set "+e),(!ct(t,"name")||r&&t.name!==e)&&(u?s(t,"name",{value:e,configurable:!0}):t.name=e),f&&h&&ct(h,"arity")&&t.length!==h.arity&&s(t,"length",{value:h.arity});try{h&&ct(h,"constructor")&&h.constructor?u&&s(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var v=i(t);return ct(v,"source")||(v.source=c(l,"string"==typeof e?e:"")),t};Function.prototype.toString=v((function(){return L(this)&&e(this).source||Qt(this)}),"toString")})),hr=function(t,r,i,e){e||(e={});var n=e.enumerable,s=void 0!==e.name?e.name:r;if(L(i)&&or(i,s,e),e.global)n?t[r]=i:et(r,i);else{try{e.unsafe?t[r]&&(n=!0):delete t[r]}catch(t){}n?t[r]=i:zt.f(t,r,{value:i,enumerable:!1,configurable:!e.nonConfigurable,writable:!e.nonWritable})}return t},ur=Math.ceil,cr=Math.floor,fr=Math.trunc||function(t){var r=+t;return(r>0?cr:ur)(r)},lr=function(t){var r=+t;return r!=r||0===r?0:fr(r)},vr=Math.max,dr=Math.min,pr=function(t,r){var i=lr(t);return i<0?vr(i+r,0):dr(i,r)},yr=Math.min,gr=function(t){return t>0?yr(lr(t),9007199254740991):0},mr=function(t){return gr(t.length)},br=function(t){return function(r,i,e){var n,s=C(r),a=mr(s),o=pr(e,a);if(t&&i!=i){for(;a>o;)if((n=s[o++])!=n)return!0}else for(;a>o;o++)if((t||o in s)&&s[o]===i)return t||o||0;return!t&&-1}},wr={includes:br(!0),indexOf:br(!1)},xr=wr.indexOf,Mr=x([].push),kr=function(t,r){var i,e=C(t),n=0,s=[];for(i in e)!ct(rr,i)&&ct(e,i)&&Mr(s,i);for(;r.length>n;)ct(e,i=r[n++])&&(~xr(s,i)||Mr(s,i));return s},Sr=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Nr=Sr.concat("length","prototype"),Pr=Object.getOwnPropertyNames||function(t){return kr(t,Nr)},jr={f:Pr},Or={f:Object.getOwnPropertySymbols},Er=x([].concat),Tr=D("Reflect","ownKeys")||function(t){var r=jr.f(At(t)),i=Or.f;return i?Er(r,i(t)):r},Cr=function(t,r,i){for(var e=Tr(r),n=zt.f,s=Ot.f,a=0;a<e.length;a++){var o=e[a];ct(t,o)||i&&ct(i,o)||n(t,o,s(r,o))}},Ar=/#|\.prototype\./,Rr=function(t,r){var i=Lr[Br(t)];return i==Ir||i!=$r&&(L(r)?h(r):!!r)},Br=Rr.normalize=function(t){return String(t).replace(Ar,".").toLowerCase()},Lr=Rr.data={},$r=Rr.NATIVE="N",Ir=Rr.POLYFILL="P",Dr=Rr,Fr=Ot.f,zr=function(t,r){var i,e,n,s,a,h=t.target,u=t.global,c=t.stat;if(i=u?o:c?o[h]||et(h,{}):(o[h]||{}).prototype)for(e in r){if(s=r[e],n=t.dontCallGetSet?(a=Fr(i,e))&&a.value:i[e],!Dr(u?e:h+(c?".":"#")+e,t.forced)&&void 0!==n){if(typeof s==typeof n)continue;Cr(s,n)}(t.sham||n&&n.sham)&&_t(s,"sham",!0),hr(i,e,s,t)}},_r="undefined"!=typeof process&&"process"==S(process),Yr=String,Xr=TypeError,qr=Object.setPrototypeOf||("__proto__"in{}?function(){var t,r=!1,i={};try{(t=x(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(i,[]),r=i instanceof Array}catch(t){}return function(i,e){return At(i),function(t){if("object"==typeof t||L(t))return t;throw Xr("Can't set "+Yr(t)+" as a prototype")}(e),r?t(i,e):i.__proto__=e,i}}():void 0),Gr=zt.f,Ur=mt("toStringTag"),Vr=function(t,r,i){t&&!i&&(t=t.prototype),t&&!ct(t,Ur)&&Gr(t,Ur,{configurable:!0,value:r})},Hr=mt("species"),Wr=TypeError,Qr={};Qr[mt("toStringTag")]="z";var Zr="[object z]"===String(Qr),Kr=mt("toStringTag"),Jr=Object,ti="Arguments"==S(function(){return arguments}()),ri=Zr?S:function(t){var r,i,e;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(i=function(t,r){try{return t[r]}catch(t){}}(r=Jr(t),Kr))?i:ti?S(r):"Object"==(e=S(r))&&L(r.callee)?"Arguments":e},ii=function(){},ei=[],ni=D("Reflect","construct"),si=/^\s*(?:class|function)\b/,ai=x(si.exec),oi=!si.exec(ii),hi=function(t){if(!L(t))return!1;try{return ni(ii,ei,t),!0}catch(t){return!1}},ui=function(t){if(!L(t))return!1;switch(ri(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return oi||!!ai(si,Qt(t))}catch(t){return!0}};ui.sham=!0;var ci,fi,li,vi,di=!ni||h((function(){var t;return hi(hi.call)||!hi(Object)||!hi((function(){t=!0}))||t}))?ui:hi,pi=TypeError,yi=mt("species"),gi=function(t,r){var i,e=At(t).constructor;return void 0===e||O(i=At(e)[yi])?r:function(t){if(di(t))return t;throw pi(Z(t)+" is not a constructor")}(i)},mi=Function.prototype,bi=mi.apply,wi=mi.call,xi="object"==typeof Reflect&&Reflect.apply||(c?wi.bind(bi):function(){return wi.apply(bi,arguments)}),Mi=function(t){if("Function"===S(t))return x(t)},ki=Mi(Mi.bind),Si=function(t,r){return J(t),void 0===r?t:c?ki(t,r):function(){return t.apply(r,arguments)}},Ni=D("document","documentElement"),Pi=x([].slice),ji=TypeError,Oi=/(?:ipad|iphone|ipod).*applewebkit/i.test(z),Ei=o.setImmediate,Ti=o.clearImmediate,Ci=o.process,Ai=o.Dispatch,Ri=o.Function,Bi=o.MessageChannel,Li=o.String,$i=0,Ii={},Di="onreadystatechange";h((function(){ci=o.location}));var Fi=function(t){if(ct(Ii,t)){var r=Ii[t];delete Ii[t],r()}},zi=function(t){return function(){Fi(t)}},_i=function(t){Fi(t.data)},Yi=function(t){o.postMessage(Li(t),ci.protocol+"//"+ci.host)};Ei&&Ti||(Ei=function(t){!function(t){if(t<1)throw ji("Not enough arguments")}(arguments.length);var r=L(t)?t:Ri(t),i=Pi(arguments,1);return Ii[++$i]=function(){xi(r,void 0,i)},fi($i),$i},Ti=function(t){delete Ii[t]},_r?fi=function(t){Ci.nextTick(zi(t))}:Ai&&Ai.now?fi=function(t){Ai.now(zi(t))}:Bi&&!Oi?(vi=(li=new Bi).port2,li.port1.onmessage=_i,fi=Si(vi.postMessage,vi)):o.addEventListener&&L(o.postMessage)&&!o.importScripts&&ci&&"file:"!==ci.protocol&&!h(Yi)?(fi=Yi,o.addEventListener("message",_i,!1)):fi=Di in St("script")?function(t){Ni.appendChild(St("script"))[Di]=function(){Ni.removeChild(this),Fi(t)}}:function(t){setTimeout(zi(t),0)});var Xi={set:Ei,clear:Ti},qi=function(){this.head=null,this.tail=null};qi.prototype={add:function(t){var r={item:t,next:null},i=this.tail;i?i.next=r:this.head=r,this.tail=r},get:function(){var t=this.head;if(t)return null===(this.head=t.next)&&(this.tail=null),t.item}};var Gi,Ui,Vi,Hi,Wi,Qi=qi,Zi=/ipad|iphone|ipod/i.test(z)&&"undefined"!=typeof Pebble,Ki=/web0s(?!.*chrome)/i.test(z),Ji=Xi.set,te=o.MutationObserver||o.WebKitMutationObserver,re=o.document,ie=o.process,ee=o.Promise,ne=(0,Ot.f)(o,"queueMicrotask"),se=ne&&ne.value;if(!se){var ae=new Qi,oe=function(){var t,r;for(_r&&(t=ie.domain)&&t.exit();r=ae.get();)try{r()}catch(t){throw ae.head&&Gi(),t}t&&t.enter()};Oi||_r||Ki||!te||!re?!Zi&&ee&&ee.resolve?((Hi=ee.resolve(void 0)).constructor=ee,Wi=Si(Hi.then,Hi),Gi=function(){Wi(oe)}):_r?Gi=function(){ie.nextTick(oe)}:(Ji=Si(Ji,o),Gi=function(){Ji(oe)}):(Ui=!0,Vi=re.createTextNode(""),new te(oe).observe(Vi,{characterData:!0}),Gi=function(){Vi.data=Ui=!Ui}),se=function(t){ae.head||Gi(),ae.add(t)}}var he,ue,ce,fe,le=se,ve=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}},de=o.Promise,pe="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,ye=!pe&&!_r&&"object"==typeof window&&"object"==typeof document,ge=mt("species"),me=!1,be=L(o.PromiseRejectionEvent),we=Dr("Promise",(function(){var t=Qt(de),r=t!==String(de);if(!r&&66===G)return!0;if(!G||G<51||!/native code/.test(t)){var i=new de((function(t){t(1)})),e=function(t){t((function(){}),(function(){}))};if((i.constructor={})[ge]=e,!(me=i.then((function(){}))instanceof e))return!0}return!r&&(ye||pe)&&!be})),xe={CONSTRUCTOR:we,REJECTION_EVENT:be,SUBCLASSING:me},Me=TypeError,ke=function(t){var r,i;this.promise=new t((function(t,e){if(void 0!==r||void 0!==i)throw Me("Bad Promise constructor");r=t,i=e})),this.resolve=J(r),this.reject=J(i)},Se={f:function(t){return new ke(t)}},Ne=Xi.set,Pe="Promise",je=xe.CONSTRUCTOR,Oe=xe.REJECTION_EVENT,Ee=xe.SUBCLASSING,Te=ar.getterFor(Pe),Ce=ar.set,Ae=de&&de.prototype,Re=de,Be=Ae,Le=o.TypeError,$e=o.document,Ie=o.process,De=Se.f,Fe=De,ze=!!($e&&$e.createEvent&&o.dispatchEvent),_e="unhandledrejection",Ye=function(t){var r;return!(!I(t)||!L(r=t.then))&&r},Xe=function(t,r){var i,e,n,s=r.value,a=1==r.state,o=a?t.ok:t.fail,h=t.resolve,u=t.reject,c=t.domain;try{o?(a||(2===r.rejection&&He(r),r.rejection=1),!0===o?i=s:(c&&c.enter(),i=o(s),c&&(c.exit(),n=!0)),i===t.promise?u(Le("Promise-chain cycle")):(e=Ye(i))?l(e,i,h,u):h(i)):u(s)}catch(t){c&&!n&&c.exit(),u(t)}},qe=function(t,r){t.notified||(t.notified=!0,le((function(){for(var i,e=t.reactions;i=e.get();)Xe(i,t);t.notified=!1,r&&!t.rejection&&Ue(t)})))},Ge=function(t,r,i){var e,n;ze?((e=$e.createEvent("Event")).promise=r,e.reason=i,e.initEvent(t,!1,!0),o.dispatchEvent(e)):e={promise:r,reason:i},!Oe&&(n=o["on"+t])?n(e):t===_e&&function(t,r){try{1==arguments.length?console.error(t):console.error(t,r)}catch(t){}}("Unhandled promise rejection",i)},Ue=function(t){l(Ne,o,(function(){var r,i=t.facade,e=t.value;if(Ve(t)&&(r=ve((function(){_r?Ie.emit("unhandledRejection",e,i):Ge(_e,i,e)})),t.rejection=_r||Ve(t)?2:1,r.error))throw r.value}))},Ve=function(t){return 1!==t.rejection&&!t.parent},He=function(t){l(Ne,o,(function(){var r=t.facade;_r?Ie.emit("rejectionHandled",r):Ge("rejectionhandled",r,t.value)}))},We=function(t,r,i){return function(e){t(r,e,i)}},Qe=function(t,r,i){t.done||(t.done=!0,i&&(t=i),t.value=r,t.state=2,qe(t,!0))},Ze=function(t,r,i){if(!t.done){t.done=!0,i&&(t=i);try{if(t.facade===r)throw Le("Promise can't be resolved itself");var e=Ye(r);e?le((function(){var i={done:!1};try{l(e,r,We(Ze,i,t),We(Qe,i,t))}catch(r){Qe(i,r,t)}})):(t.value=r,t.state=1,qe(t,!1))}catch(r){Qe({done:!1},r,t)}}};if(je&&(Re=function(t){!function(t){if(F(Be,t))return t;throw Wr("Incorrect invocation")}(this),J(t),l(he,this);var r=Te(this);try{t(We(Ze,r),We(Qe,r))}catch(t){Qe(r,t)}},(he=function(){Ce(this,{type:Pe,done:!1,notified:!1,parent:!1,reactions:new Qi,rejection:!1,state:0,value:void 0})}).prototype=hr(Be=Re.prototype,"then",(function(t,r){var i=Te(this),e=De(gi(this,Re));return i.parent=!0,e.ok=!L(t)||t,e.fail=L(r)&&r,e.domain=_r?Ie.domain:void 0,0==i.state?i.reactions.add(e):le((function(){Xe(e,i)})),e.promise})),ue=function(){var t=new he,r=Te(t);this.promise=t,this.resolve=We(Ze,r),this.reject=We(Qe,r)},Se.f=De=function(t){return t===Re||void 0===t?new ue(t):Fe(t)},L(de)&&Ae!==Object.prototype)){ce=Ae.then,Ee||hr(Ae,"then",(function(t,r){var i=this;return new Re((function(t,r){l(ce,i,t,r)})).then(t,r)}),{unsafe:!0});try{delete Ae.constructor}catch(t){}qr&&qr(Ae,Be)}zr({global:!0,constructor:!0,wrap:!0,forced:je},{Promise:Re}),Vr(Re,Pe,!1),fe=D(Pe),u&&fe&&!fe[Hr]&&(0,zt.f)(fe,Hr,{configurable:!0,get:function(){return this}});var Ke={},Je=mt("iterator"),tn=Array.prototype,rn=mt("iterator"),en=function(t){if(!O(t))return tt(t,rn)||tt(t,"@@iterator")||Ke[ri(t)]},nn=TypeError,sn=function(t,r,i){var e,n;At(t);try{if(!(e=tt(t,"return"))){if("throw"===r)throw i;return i}e=l(e,t)}catch(t){n=!0,e=t}if("throw"===r)throw i;if(n)throw e;return At(e),i},an=TypeError,on=function(t,r){this.stopped=t,this.result=r},hn=on.prototype,un=function(t,r,i){var e,n,s,a,o,h,u,c,f=!(!i||!i.AS_ENTRIES),v=!(!i||!i.IS_RECORD),d=!(!i||!i.IS_ITERATOR),p=!(!i||!i.INTERRUPTED),y=Si(r,i&&i.that),g=function(t){return e&&sn(e,"normal",t),new on(!0,t)},m=function(t){return f?(At(t),p?y(t[0],t[1],g):y(t[0],t[1])):p?y(t,g):y(t)};if(v)e=t.iterator;else if(d)e=t;else{if(!(n=en(t)))throw an(Z(t)+" is not iterable");if(void 0!==(c=n)&&(Ke.Array===c||tn[Je]===c)){for(s=0,a=mr(t);a>s;s++)if((o=m(t[s]))&&F(hn,o))return o;return new on(!1)}e=function(t,r){var i=arguments.length<2?en(t):r;if(J(i))return At(l(i,t));throw nn(Z(t)+" is not iterable")}(t,n)}for(h=v?t.next:e.next;!(u=l(h,e)).done;){try{o=m(u.value)}catch(t){sn(e,"throw",t)}if("object"==typeof o&&o&&F(hn,o))return o}return new on(!1)},cn=mt("iterator"),fn=!1;try{var ln=0,vn={next:function(){return{done:!!ln++}},return:function(){fn=!0}};vn[cn]=function(){return this},Array.from(vn,(function(){throw 2}))}catch(t){}var dn=xe.CONSTRUCTOR||!function(){if(!fn)return!1;var t=!1;try{var r={};r[cn]=function(){return{next:function(){return{done:t=!0}}}},de.all(r).then(void 0,(function(){}))}catch(t){}return t}();zr({target:"Promise",stat:!0,forced:dn},{all:function(t){var r=this,i=Se.f(r),e=i.resolve,n=i.reject,s=ve((function(){var i=J(r.resolve),s=[],a=0,o=1;un(t,(function(t){var h=a++,u=!1;o++,l(i,r,t).then((function(t){u||(u=!0,s[h]=t,--o||e(s))}),n)})),--o||e(s)}));return s.error&&n(s.value),i.promise}});var pn=de&&de.prototype;if(zr({target:"Promise",proto:!0,forced:xe.CONSTRUCTOR,real:!0},{catch:function(t){return this.then(void 0,t)}}),L(de)){var yn=D("Promise").prototype.catch;pn.catch!==yn&&hr(pn,"catch",yn,{unsafe:!0})}zr({target:"Promise",stat:!0,forced:dn},{race:function(t){var r=this,i=Se.f(r),e=i.reject,n=ve((function(){var n=J(r.resolve);un(t,(function(t){l(n,r,t).then(i.resolve,e)}))}));return n.error&&e(n.value),i.promise}}),zr({target:"Promise",stat:!0,forced:xe.CONSTRUCTOR},{reject:function(t){var r=Se.f(this);return l(r.reject,void 0,t),r.promise}}),zr({target:"Promise",stat:!0,forced:xe.CONSTRUCTOR},{resolve:function(t){return function(t,r){if(At(t),I(r)&&r.constructor===t)return r;var i=Se.f(t);return(0,i.resolve)(r),i.promise}(this,t)}});const gn=i(r((function(t){function r(t,r,i,e,n,s,a){try{var o=t[s](a),h=o.value}catch(t){return void i(t)}o.done?r(h):Promise.resolve(h).then(e,n)}t.exports=function(t){return function(){var i=this,e=arguments;return new Promise((function(n,s){var a=t.apply(i,e);function o(t){r(a,n,s,o,h,"next",t)}function h(t){r(a,n,s,o,h,"throw",t)}o(void 0)}))}},t.exports.__esModule=!0,t.exports.default=t.exports})));var mn,bn=String,wn=function(t){if("Symbol"===ri(t))throw TypeError("Cannot convert a Symbol value to a string");return bn(t)},xn=function(){var t=At(this),r="";return t.hasIndices&&(r+="d"),t.global&&(r+="g"),t.ignoreCase&&(r+="i"),t.multiline&&(r+="m"),t.dotAll&&(r+="s"),t.unicode&&(r+="u"),t.unicodeSets&&(r+="v"),t.sticky&&(r+="y"),r},Mn=o.RegExp,kn=h((function(){var t=Mn("a","y");return t.lastIndex=2,null!=t.exec("abcd")})),Sn=kn||h((function(){return!Mn("a","y").sticky})),Nn={BROKEN_CARET:kn||h((function(){var t=Mn("^r","gy");return t.lastIndex=2,null!=t.exec("str")})),MISSED_STICKY:Sn,UNSUPPORTED_Y:kn},Pn=Object.keys||function(t){return kr(t,Sr)},jn=u&&!Et?Object.defineProperties:function(t,r){At(t);for(var i,e=C(r),n=Pn(r),s=n.length,a=0;s>a;)zt.f(t,i=n[a++],e[i]);return t},On={f:jn},En="prototype",Tn="script",Cn=tr("IE_PROTO"),An=function(){},Rn=function(t){return"<"+Tn+">"+t+"</"+Tn+">"},Bn=function(t){t.write(Rn("")),t.close();var r=t.parentWindow.Object;return t=null,r},Ln=function(){try{mn=new ActiveXObject("htmlfile")}catch(t){}var t,r,i;Ln="undefined"!=typeof document?document.domain&&mn?Bn(mn):(r=St("iframe"),i="java"+Tn+":",r.style.display="none",Ni.appendChild(r),r.src=String(i),(t=r.contentWindow.document).open(),t.write(Rn("document.F=Object")),t.close(),t.F):Bn(mn);for(var e=Sr.length;e--;)delete Ln[En][Sr[e]];return Ln()};rr[Cn]=!0;var $n,In,Dn=Object.create||function(t,r){var i;return null!==t?(An[En]=At(t),i=new An,An[En]=null,i[Cn]=t):i=Ln(),void 0===r?i:On.f(i,r)},Fn=o.RegExp,zn=h((function(){var t=Fn(".","s");return!(t.dotAll&&t.exec("\n")&&"s"===t.flags)})),_n=o.RegExp,Yn=h((function(){var t=_n("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")})),Xn=ar.get,qn=at("native-string-replace",String.prototype.replace),Gn=RegExp.prototype.exec,Un=Gn,Vn=x("".charAt),Hn=x("".indexOf),Wn=x("".replace),Qn=x("".slice),Zn=(In=/b*/g,l(Gn,$n=/a/,"a"),l(Gn,In,"a"),0!==$n.lastIndex||0!==In.lastIndex),Kn=Nn.BROKEN_CARET,Jn=void 0!==/()??/.exec("")[1];(Zn||Jn||Kn||zn||Yn)&&(Un=function(t){var r,i,e,n,s,a,o,h=this,u=Xn(h),c=wn(t),f=u.raw;if(f)return f.lastIndex=h.lastIndex,r=l(Un,f,c),h.lastIndex=f.lastIndex,r;var v=u.groups,d=Kn&&h.sticky,p=l(xn,h),y=h.source,g=0,m=c;if(d&&(p=Wn(p,"y",""),-1===Hn(p,"g")&&(p+="g"),m=Qn(c,h.lastIndex),h.lastIndex>0&&(!h.multiline||h.multiline&&"\n"!==Vn(c,h.lastIndex-1))&&(y="(?: "+y+")",m=" "+m,g++),i=new RegExp("^(?:"+y+")",p)),Jn&&(i=new RegExp("^"+y+"$(?!\\s)",p)),Zn&&(e=h.lastIndex),n=l(Gn,d?i:h,m),d?n?(n.input=Qn(n.input,g),n[0]=Qn(n[0],g),n.index=h.lastIndex,h.lastIndex+=n[0].length):h.lastIndex=0:Zn&&n&&(h.lastIndex=h.global?n.index+n[0].length:e),Jn&&n&&n.length>1&&l(qn,n[0],i,(function(){for(s=1;s<arguments.length-2;s++)void 0===arguments[s]&&(n[s]=void 0)})),n&&v)for(n.groups=a=Dn(null),s=0;s<v.length;s++)a[(o=v[s])[0]]=n[o[1]];return n});var ts=Un;zr({target:"RegExp",proto:!0,forced:/./.exec!==ts},{exec:ts});var rs=mt("species"),is=RegExp.prototype,es=function(t,r,i,e){var n=mt(t),s=!h((function(){var r={};return r[n]=function(){return 7},7!=""[t](r)})),a=s&&!h((function(){var r=!1,i=/a/;return"split"===t&&((i={}).constructor={},i.constructor[rs]=function(){return i},i.flags="",i[n]=/./[n]),i.exec=function(){return r=!0,null},i[n](""),!r}));if(!s||!a||i){var o=Mi(/./[n]),u=r(n,""[t],(function(t,r,i,e,n){var a=Mi(t),h=r.exec;return h===ts||h===is.exec?s&&!n?{done:!0,value:o(r,i,e)}:{done:!0,value:a(i,r,e)}:{done:!1}}));hr(String.prototype,t,u[0]),hr(is,n,u[1])}e&&_t(is[n],"sham",!0)},ns=x("".charAt),ss=x("".charCodeAt),as=x("".slice),os=function(t){return function(r,i){var e,n,s=wn(T(r)),a=lr(i),o=s.length;return a<0||a>=o?t?"":void 0:(e=ss(s,a))<55296||e>56319||a+1===o||(n=ss(s,a+1))<56320||n>57343?t?ns(s,a):e:t?as(s,a,a+2):n-56320+(e-55296<<10)+65536}},hs=(os(!1),os(!0)),us=function(t,r,i){return r+(i?hs(t,r).length:1)},cs=TypeError,fs=function(t,r){var i=t.exec;if(L(i)){var e=l(i,t,r);return null!==e&&At(e),e}if("RegExp"===S(t))return l(ts,t,r);throw cs("RegExp#exec called on incompatible receiver")};es("match",(function(t,r,i){return[function(r){var i=T(this),e=O(r)?void 0:tt(r,t);return e?l(e,r,i):new RegExp(r)[t](wn(i))},function(t){var e=At(this),n=wn(t),s=i(r,e,n);if(s.done)return s.value;if(!e.global)return fs(e,n);var a=e.unicode;e.lastIndex=0;for(var o,h=[],u=0;null!==(o=fs(e,n));){var c=wn(o[0]);h[u]=c,""===c&&(e.lastIndex=us(n,gr(e.lastIndex),a)),u++}return 0===u?null:h}]}));var ls=Math.floor,vs=x("".charAt),ds=x("".replace),ps=x("".slice),ys=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,gs=/\$([$&'`]|\d{1,2})/g,ms=function(t,r,i,e,n,s){var a=i+t.length,o=e.length,h=gs;return void 0!==n&&(n=ht(n),h=ys),ds(s,h,(function(s,h){var u;switch(vs(h,0)){case"$":return"$";case"&":return t;case"`":return ps(r,0,i);case"'":return ps(r,a);case"<":u=n[ps(h,1,-1)];break;default:var c=+h;if(0===c)return s;if(c>o){var f=ls(c/10);return 0===f?s:f<=o?void 0===e[f-1]?vs(h,1):e[f-1]+vs(h,1):s}u=e[c-1]}return void 0===u?"":u}))},bs=mt("replace"),ws=Math.max,xs=Math.min,Ms=x([].concat),ks=x([].push),Ss=x("".indexOf),Ns=x("".slice),Ps="$0"==="a".replace(/./,"$0"),js=!!/./[bs]&&""===/./[bs]("a","$0");es("replace",(function(t,r,i){var e=js?"$":"$0";return[function(t,i){var e=T(this),n=O(t)?void 0:tt(t,bs);return n?l(n,t,e,i):l(r,wn(e),t,i)},function(t,n){var s=At(this),a=wn(t);if("string"==typeof n&&-1===Ss(n,e)&&-1===Ss(n,"$<")){var o=i(r,s,a,n);if(o.done)return o.value}var h=L(n);h||(n=wn(n));var u=s.global;if(u){var c=s.unicode;s.lastIndex=0}for(var f=[];;){var l=fs(s,a);if(null===l)break;if(ks(f,l),!u)break;""===wn(l[0])&&(s.lastIndex=us(a,gr(s.lastIndex),c))}for(var v,d="",p=0,y=0;y<f.length;y++){for(var g=wn((l=f[y])[0]),m=ws(xs(lr(l.index),a.length),0),b=[],w=1;w<l.length;w++)ks(b,void 0===(v=l[w])?v:String(v));var x=l.groups;if(h){var M=Ms([g],b,m,a);void 0!==x&&ks(M,x);var k=wn(xi(n,void 0,M))}else k=ms(g,a,m,b,x,n);m>=p&&(d+=Ns(a,p,m)+k,p=m+g.length)}return d+Ns(a,p)}]}),!!h((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")}))||!Ps||js);var Os,Es=mt("match"),Ts=function(t){var r;return I(t)&&(void 0!==(r=t[Es])?!!r:"RegExp"==S(t))},Cs=TypeError,As=function(t){if(Ts(t))throw Cs("The method doesn't accept regular expressions");return t},Rs=mt("match"),Bs=function(t){var r=/./;try{"/./"[t](r)}catch(i){try{return r[Rs]=!1,"/./"[t](r)}catch(t){}}return!1},Ls=Ot.f,$s=Mi("".startsWith),Is=Mi("".slice),Ds=Math.min,Fs=Bs("startsWith"),zs=!(Fs||(Os=Ls(String.prototype,"startsWith"),!Os||Os.writable));zr({target:"String",proto:!0,forced:!zs&&!Fs},{startsWith:function(t){var r=wn(T(this));As(t);var i=gr(Ds(arguments.length>1?arguments[1]:void 0,r.length)),e=wn(t);return $s?$s(r,e,i):Is(r,i,i+e.length)===e}});var _s=zt.f,Ys=mt("unscopables"),Xs=Array.prototype;null==Xs[Ys]&&_s(Xs,Ys,{configurable:!0,value:Dn(null)});var qs,Gs,Us,Vs=function(t){Xs[Ys][t]=!0},Hs=!h((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})),Ws=tr("IE_PROTO"),Qs=Object,Zs=Qs.prototype,Ks=Hs?Qs.getPrototypeOf:function(t){var r=ht(t);if(ct(r,Ws))return r[Ws];var i=r.constructor;return L(i)&&r instanceof i?i.prototype:r instanceof Qs?Zs:null},Js=mt("iterator"),ta=!1;[].keys&&("next"in(Us=[].keys())?(Gs=Ks(Ks(Us)))!==Object.prototype&&(qs=Gs):ta=!0);var ra=!I(qs)||h((function(){var t={};return qs[Js].call(t)!==t}));ra&&(qs={}),L(qs[Js])||hr(qs,Js,(function(){return this}));var ia={IteratorPrototype:qs,BUGGY_SAFARI_ITERATORS:ta},ea=ia.IteratorPrototype,na=function(){return this},sa=Gt.PROPER,aa=Gt.CONFIGURABLE,oa=ia.IteratorPrototype,ha=ia.BUGGY_SAFARI_ITERATORS,ua=mt("iterator"),ca="keys",fa="values",la="entries",va=function(){return this},da=function(t,r){return{value:t,done:r}},pa=zt.f,ya="Array Iterator",ga=ar.set,ma=ar.getterFor(ya),ba=function(t,r,i,e,n){!function(t,r,i){var e=r+" Iterator";t.prototype=Dn(ea,{next:g(1,i)}),Vr(t,e,!1),Ke[e]=na}(i,r,(function(){var t=ma(this),r=t.target,i=t.kind,e=t.index++;return!r||e>=r.length?(t.target=void 0,da(void 0,!0)):da("keys"==i?e:"values"==i?r[e]:[e,r[e]],!1)}));var s,a,o,h=function(t){if(t===n&&d)return d;if(!ha&&t in f)return f[t];switch(t){case ca:case fa:case la:return function(){return new i(this,t)}}return function(){return new i(this)}},u=r+" Iterator",c=!1,f=t.prototype,v=f[ua]||f["@@iterator"]||n&&f[n],d=!ha&&v||h(n),p=f.entries||v;if(p&&(s=Ks(p.call(new t)))!==Object.prototype&&s.next&&(Ks(s)!==oa&&(qr?qr(s,oa):L(s[ua])||hr(s,ua,va)),Vr(s,u,!0)),sa&&v&&v.name!==fa&&(aa?_t(f,"name",fa):(c=!0,d=function(){return l(v,this)})),n)if(void(a={values:h(fa),keys:h(ca),entries:h(la)}))for(o in a)(ha||c||!(o in f))&&hr(f,o,a[o]);else zr({target:r,proto:!0,forced:ha||c},a);return f[ua]!==d&&hr(f,ua,d,{name:n}),Ke[r]=d,a}(Array,"Array",(function(t,r){ga(this,{type:ya,target:C(t),index:0,kind:r})}),0,"values"),wa=Ke.Arguments=Ke.Array;if(Vs("keys"),Vs("values"),Vs("entries"),u&&"values"!==wa.name)try{pa(wa,"name",{value:"values"})}catch(t){}var xa={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},Ma=St("span").classList,ka=Ma&&Ma.constructor&&Ma.constructor.prototype,Sa=ka===Object.prototype?void 0:ka,Na=mt("iterator"),Pa=mt("toStringTag"),ja=ba.values,Oa=function(t,r){if(t){if(t[Na]!==ja)try{_t(t,Na,ja)}catch(r){t[Na]=ja}if(t[Pa]||_t(t,Pa,r),xa[r])for(var i in ba)if(t[i]!==ba[i])try{_t(t,i,ba[i])}catch(r){t[i]=ba[i]}}};for(var Ea in xa)Oa(o[Ea]&&o[Ea].prototype,Ea);Oa(Sa,"DOMTokenList");var Ta=r((function(t){var r=e.default;t.exports=function(t,i){if("object"!==r(t)||null===t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,i||"default");if("object"!==r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===i?String:Number)(t)},t.exports.__esModule=!0,t.exports.default=t.exports})),Ca=r((function(t){var r=e.default;t.exports=function(t){var i=Ta(t,"string");return"symbol"===r(i)?i:String(i)},t.exports.__esModule=!0,t.exports.default=t.exports}));const Aa=i(r((function(t){t.exports=function(t,r,i){return(r=Ca(r))in t?Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[r]=i,t},t.exports.__esModule=!0,t.exports.default=t.exports})));var Ra=TypeError,Ba=function(t){return function(r,i,e,n){J(i);var s=ht(r),a=j(s),o=mr(s),h=t?o-1:0,u=t?-1:1;if(e<2)for(;;){if(h in a){n=a[h],h+=u;break}if(h+=u,t?h<0:o<=h)throw Ra("Reduce of empty array with no initial value")}for(;t?h>=0:o>h;h+=u)h in a&&(n=i(n,a[h],h,s));return n}},La=function(t,r){var i=[][t];return!!i&&h((function(){i.call(null,r||function(){return 1},1)}))},$a=[Ba(!1),Ba(!0)][0],Ia=!_r&&G>79&&G<83||!La("reduce");zr({target:"Array",proto:!0,forced:Ia},{reduce:function(t){var r=arguments.length;return $a(this,t,r,r>1?arguments[1]:void 0)}});var Da=Ot.f,Fa=Mi("".endsWith),za=Mi("".slice),_a=Math.min,Ya=Bs("endsWith"),Xa=!Ya&&!!function(){var t=Da(String.prototype,"endsWith");return t&&!t.writable}();zr({target:"String",proto:!0,forced:!Xa&&!Ya},{endsWith:function(t){var r=wn(T(this));As(t);var i=arguments.length>1?arguments[1]:void 0,e=r.length,n=void 0===i?e:_a(gr(i),e),s=wn(t);return Fa?Fa(r,s,n):za(r,n-s.length,n)===s}});var qa=Array,Ga=Math.max,Ua=function(t,r,i){for(var e,n,s,a=mr(t),o=pr(r,a),h=pr(void 0===i?a:i,a),u=qa(Ga(h-o,0)),c=0;o<h;o++,c++)e=u,n=t[o],void 0,(s=xt(c))in e?zt.f(e,s,g(0,n)):e[s]=n;return u.length=c,u},Va=Nn.UNSUPPORTED_Y,Ha=4294967295,Wa=Math.min,Qa=[].push,Za=x(/./.exec),Ka=x(Qa),Ja=x("".slice);es("split",(function(t,r,i){var e;return e="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(t,i){var e=wn(T(this)),n=void 0===i?Ha:i>>>0;if(0===n)return[];if(void 0===t)return[e];if(!Ts(t))return l(r,e,t,n);for(var s,a,o,h=[],u=0,c=new RegExp(t.source,(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":"")+"g");(s=l(ts,c,e))&&!((a=c.lastIndex)>u&&(Ka(h,Ja(e,u,s.index)),s.length>1&&s.index<e.length&&xi(Qa,h,Ua(s,1)),o=s[0].length,u=a,h.length>=n));)c.lastIndex===s.index&&c.lastIndex++;return u===e.length?!o&&Za(c,"")||Ka(h,""):Ka(h,Ja(e,u)),h.length>n?Ua(h,0,n):h}:"0".split(void 0,0).length?function(t,i){return void 0===t&&0===i?[]:l(r,this,t,i)}:r,[function(r,i){var n=T(this),s=O(r)?void 0:tt(r,t);return s?l(s,r,n,i):l(e,wn(n),r,i)},function(t,n){var s=At(this),a=wn(t),o=i(e,s,a,n,e!==r);if(o.done)return o.value;var h=gi(s,RegExp),u=s.unicode,c=new h(Va?"^(?:"+s.source+")":s,(s.ignoreCase?"i":"")+(s.multiline?"m":"")+(s.unicode?"u":"")+(Va?"g":"y")),f=void 0===n?Ha:n>>>0;if(0===f)return[];if(0===a.length)return null===fs(c,a)?[a]:[];for(var l=0,v=0,d=[];v<a.length;){c.lastIndex=Va?0:v;var p,y=fs(c,Va?Ja(a,v):a);if(null===y||(p=Wa(gr(c.lastIndex+(Va?v:0)),a.length))===l)v=us(a,v,u);else{if(Ka(d,Ja(a,l,v)),d.length===f)return d;for(var g=1;g<=y.length-1;g++)if(Ka(d,y[g]),d.length===f)return d;v=l=p}}return Ka(d,Ja(a,l)),d}]}),!!h((function(){var t=/(?:)/,r=t.exec;t.exec=function(){return r.apply(this,arguments)};var i="ab".split(t);return 2!==i.length||"a"!==i[0]||"b"!==i[1]})),Va);for(var to=r((function(r){(function(){var t,i,e,n,s,a;"undefined"!=typeof performance&&null!==performance&&performance.now?r.exports=function(){return performance.now()}:"undefined"!=typeof process&&null!==process&&process.hrtime?(r.exports=function(){return(t()-s)/1e6},i=process.hrtime,n=(t=function(){var t;return 1e9*(t=i())[0]+t[1]})(),a=1e9*process.uptime(),s=n-a):Date.now?(r.exports=function(){return Date.now()-e},e=Date.now()):(r.exports=function(){return(new Date).getTime()-e},e=(new Date).getTime())}).call(t)})),ro="undefined"==typeof window?t:window,io=["moz","webkit"],eo="AnimationFrame",no=ro["request"+eo],so=ro["cancel"+eo]||ro["cancelRequest"+eo],ao=0;!no&&ao<io.length;ao++)no=ro[io[ao]+"Request"+eo],so=ro[io[ao]+"Cancel"+eo]||ro[io[ao]+"CancelRequest"+eo];if(!no||!so){var oo=0,ho=0,uo=[];no=function(t){if(0===uo.length){var r=to(),i=Math.max(0,16.666666666666668-(r-oo));oo=i+r,setTimeout((function(){var t=uo.slice(0);uo.length=0;for(var r=0;r<t.length;r++)if(!t[r].cancelled)try{t[r].callback(oo)}catch(t){setTimeout((function(){throw t}),0)}}),Math.round(i))}return uo.push({handle:++ho,callback:t,cancelled:!1}),ho},so=function(t){for(var r=0;r<uo.length;r++)uo[r].handle===t&&(uo[r].cancelled=!0)}}var co=function(t){return no.call(ro,t)};co.cancel=function(){so.apply(ro,arguments)},co.polyfill=function(t){t||(t=ro),t.requestAnimationFrame=no,t.cancelAnimationFrame=so};var fo,lo="\t\n\v\f\r                 \u2028\u2029\ufeff",vo=x("".replace),po="["+lo+"]",yo=RegExp("^"+po+po+"*"),go=RegExp(po+po+"*$"),mo=function(t){return function(r){var i=wn(T(r));return 1&t&&(i=vo(i,yo,"")),2&t&&(i=vo(i,go,"")),i}},bo={start:mo(1),end:mo(2),trim:mo(3)},wo=Gt.PROPER,xo=bo.trim;zr({target:"String",proto:!0,forced:(fo="trim",h((function(){return!!lo[fo]()||"​…᠎"!=="​…᠎"[fo]()||wo&&lo[fo].name!==fo})))},{trim:function(){return xo(this)}});var Mo=function(t){this.ok=!1,this.alpha=1,"#"==t.charAt(0)&&(t=t.substr(1,6)),t=(t=t.replace(/ /g,"")).toLowerCase();var r={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"};t=r[t]||t;for(var i=[{re:/^rgba\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3}),\s*((?:\d?\.)?\d)\)$/,example:["rgba(123, 234, 45, 0.8)","rgba(255,234,245,1.0)"],process:function(t){return[parseInt(t[1]),parseInt(t[2]),parseInt(t[3]),parseFloat(t[4])]}},{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(t){return[parseInt(t[1]),parseInt(t[2]),parseInt(t[3])]}},{re:/^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,example:["#00ff00","336699"],process:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/^([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,example:["#fb0","f0f"],process:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}}],e=0;e<i.length;e++){var n=i[e].process,s=i[e].re.exec(t);if(s){var a=n(s);this.r=a[0],this.g=a[1],this.b=a[2],a.length>3&&(this.alpha=a[3]),this.ok=!0}}this.r=this.r<0||isNaN(this.r)?0:this.r>255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.alpha=this.alpha<0?0:this.alpha>1||isNaN(this.alpha)?1:this.alpha,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toRGBA=function(){return"rgba("+this.r+", "+this.g+", "+this.b+", "+this.alpha+")"},this.toHex=function(){var t=this.r.toString(16),r=this.g.toString(16),i=this.b.toString(16);return 1==t.length&&(t="0"+t),1==r.length&&(r="0"+r),1==i.length&&(i="0"+i),"#"+t+r+i},this.getHelpXML=function(){for(var t=new Array,e=0;e<i.length;e++)for(var n=i[e].example,s=0;s<n.length;s++)t[t.length]=n[s];for(var a in r)t[t.length]=a;var o=document.createElement("ul");for(o.setAttribute("id","rgbcolor-examples"),e=0;e<t.length;e++)try{var h=document.createElement("li"),u=new RGBColor(t[e]),c=document.createElement("div");c.style.cssText="margin: 3px; border: 1px solid black; background:"+u.toHex()+"; color:"+u.toHex(),c.appendChild(document.createTextNode("test"));var f=document.createTextNode(" "+t[e]+" -> "+u.toRGB()+" -> "+u.toHex());h.appendChild(c),h.appendChild(f),o.appendChild(h)}catch(t){}return o}},ko=wr.indexOf,So=Mi([].indexOf),No=!!So&&1/So([1],1,-0)<0,Po=No||!La("indexOf");zr({target:"Array",proto:!0,forced:Po},{indexOf:function(t){var r=arguments.length>1?arguments[1]:void 0;return No?So(this,t,r)||0:ko(this,t,r)}});var jo=x("".indexOf);zr({target:"String",proto:!0,forced:!Bs("includes")},{includes:function(t){return!!~jo(wn(T(this)),wn(As(t)),arguments.length>1?arguments[1]:void 0)}});var Oo=Array.isArray||function(t){return"Array"==S(t)},Eo=x([].reverse),To=[1,2];zr({target:"Array",proto:!0,forced:String(To)===String(To.reverse())},{reverse:function(){return Oo(this)&&(this.length=this.length),Eo(this)}});
6
+ import{a as t,c as r,g as i}from"./p-e1a4994d.js";import{_ as e}from"./p-95c11620.js";import"./p-9310b882.js";import"./p-0266ca81.js";import"./p-7f9642d5.js";import"./p-f8dd2784.js";import"./p-868df4a0.js";var n,s,a=function(t){return t&&t.Math==Math&&t},o=a("object"==typeof globalThis&&globalThis)||a("object"==typeof window&&window)||a("object"==typeof self&&self)||a("object"==typeof t&&t)||function(){return this}()||Function("return this")(),h=function(t){try{return!!t()}catch(t){return!0}},u=!h((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),c=!h((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})),f=Function.prototype.call,l=c?f.bind(f):function(){return f.apply(f,arguments)},v={}.propertyIsEnumerable,d=Object.getOwnPropertyDescriptor,p=d&&!v.call({1:2},1)?function(t){var r=d(this,t);return!!r&&r.enumerable}:v,y={f:p},g=function(t,r){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:r}},m=Function.prototype,b=m.call,w=c&&m.bind.bind(b,b),x=c?w:function(t){return function(){return b.apply(t,arguments)}},M=x({}.toString),k=x("".slice),S=function(t){return k(M(t),8,-1)},N=Object,P=x("".split),j=h((function(){return!N("z").propertyIsEnumerable(0)}))?function(t){return"String"==S(t)?P(t,""):N(t)}:N,O=function(t){return null==t},E=TypeError,T=function(t){if(O(t))throw E("Can't call method on "+t);return t},C=function(t){return j(T(t))},A="object"==typeof document&&document.all,R={all:A,IS_HTMLDDA:void 0===A&&void 0!==A},B=R.all,L=R.IS_HTMLDDA?function(t){return"function"==typeof t||t===B}:function(t){return"function"==typeof t},$=R.all,I=R.IS_HTMLDDA?function(t){return"object"==typeof t?null!==t:L(t)||t===$}:function(t){return"object"==typeof t?null!==t:L(t)},D=function(t,r){return arguments.length<2?L(i=o[t])?i:void 0:o[t]&&o[t][r];var i},F=x({}.isPrototypeOf),z="undefined"!=typeof navigator&&String(navigator.userAgent)||"",_=o.process,Y=o.Deno,X=_&&_.versions||Y&&Y.version,q=X&&X.v8;q&&(s=(n=q.split("."))[0]>0&&n[0]<4?1:+(n[0]+n[1])),!s&&z&&(!(n=z.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=z.match(/Chrome\/(\d+)/))&&(s=+n[1]);var G=s,U=!!Object.getOwnPropertySymbols&&!h((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&G&&G<41})),V=U&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,H=Object,W=V?function(t){return"symbol"==typeof t}:function(t){var r=D("Symbol");return L(r)&&F(r.prototype,H(t))},Q=String,Z=function(t){try{return Q(t)}catch(t){return"Object"}},K=TypeError,J=function(t){if(L(t))return t;throw K(Z(t)+" is not a function")},tt=function(t,r){var i=t[r];return O(i)?void 0:J(i)},rt=TypeError,it=Object.defineProperty,et=function(t,r){try{it(o,t,{value:r,configurable:!0,writable:!0})}catch(i){o[t]=r}return r},nt="__core-js_shared__",st=o[nt]||et(nt,{}),at=r((function(t){(t.exports=function(t,r){return st[t]||(st[t]=void 0!==r?r:{})})("versions",[]).push({version:"3.27.2",mode:"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.27.2/LICENSE",source:"https://github.com/zloirock/core-js"})})),ot=Object,ht=function(t){return ot(T(t))},ut=x({}.hasOwnProperty),ct=Object.hasOwn||function(t,r){return ut(ht(t),r)},ft=0,lt=Math.random(),vt=x(1..toString),dt=function(t){return"Symbol("+(void 0===t?"":t)+")_"+vt(++ft+lt,36)},pt=o.Symbol,yt=at("wks"),gt=V?pt.for||pt:pt&&pt.withoutSetter||dt,mt=function(t){return ct(yt,t)||(yt[t]=U&&ct(pt,t)?pt[t]:gt("Symbol."+t)),yt[t]},bt=TypeError,wt=mt("toPrimitive"),xt=function(t){var r=function(t,r){if(!I(t)||W(t))return t;var i,e=tt(t,wt);if(e){if(void 0===r&&(r="default"),i=l(e,t,r),!I(i)||W(i))return i;throw bt("Can't convert object to primitive value")}return void 0===r&&(r="number"),function(t,r){var i,e;if("string"===r&&L(i=t.toString)&&!I(e=l(i,t)))return e;if(L(i=t.valueOf)&&!I(e=l(i,t)))return e;if("string"!==r&&L(i=t.toString)&&!I(e=l(i,t)))return e;throw rt("Can't convert object to primitive value")}(t,r)}(t,"string");return W(r)?r:r+""},Mt=o.document,kt=I(Mt)&&I(Mt.createElement),St=function(t){return kt?Mt.createElement(t):{}},Nt=!u&&!h((function(){return 7!=Object.defineProperty(St("div"),"a",{get:function(){return 7}}).a})),Pt=Object.getOwnPropertyDescriptor,jt=u?Pt:function(t,r){if(t=C(t),r=xt(r),Nt)try{return Pt(t,r)}catch(t){}if(ct(t,r))return g(!l(y.f,t,r),t[r])},Ot={f:jt},Et=u&&h((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Tt=String,Ct=TypeError,At=function(t){if(I(t))return t;throw Ct(Tt(t)+" is not an object")},Rt=TypeError,Bt=Object.defineProperty,Lt=Object.getOwnPropertyDescriptor,$t="enumerable",It="configurable",Dt="writable",Ft=u?Et?function(t,r,i){if(At(t),r=xt(r),At(i),"function"==typeof t&&"prototype"===r&&"value"in i&&Dt in i&&!i[Dt]){var e=Lt(t,r);e&&e[Dt]&&(t[r]=i.value,i={configurable:It in i?i[It]:e[It],enumerable:$t in i?i[$t]:e[$t],writable:!1})}return Bt(t,r,i)}:Bt:function(t,r,i){if(At(t),r=xt(r),At(i),Nt)try{return Bt(t,r,i)}catch(t){}if("get"in i||"set"in i)throw Rt("Accessors not supported");return"value"in i&&(t[r]=i.value),t},zt={f:Ft},_t=u?function(t,r,i){return zt.f(t,r,g(1,i))}:function(t,r,i){return t[r]=i,t},Yt=Function.prototype,Xt=u&&Object.getOwnPropertyDescriptor,qt=ct(Yt,"name"),Gt={EXISTS:qt,PROPER:qt&&"something"===function(){}.name,CONFIGURABLE:qt&&(!u||u&&Xt(Yt,"name").configurable)},Ut=x(Function.toString);L(st.inspectSource)||(st.inspectSource=function(t){return Ut(t)});var Vt,Ht,Wt,Qt=st.inspectSource,Zt=o.WeakMap,Kt=L(Zt)&&/native code/.test(String(Zt)),Jt=at("keys"),tr=function(t){return Jt[t]||(Jt[t]=dt(t))},rr={},ir="Object already initialized",er=o.TypeError;if(Kt||st.state){var nr=st.state||(st.state=new(0,o.WeakMap));nr.get=nr.get,nr.has=nr.has,nr.set=nr.set,Vt=function(t,r){if(nr.has(t))throw er(ir);return r.facade=t,nr.set(t,r),r},Ht=function(t){return nr.get(t)||{}},Wt=function(t){return nr.has(t)}}else{var sr=tr("state");rr[sr]=!0,Vt=function(t,r){if(ct(t,sr))throw er(ir);return r.facade=t,_t(t,sr,r),r},Ht=function(t){return ct(t,sr)?t[sr]:{}},Wt=function(t){return ct(t,sr)}}var ar={set:Vt,get:Ht,has:Wt,enforce:function(t){return Wt(t)?Ht(t):Vt(t,{})},getterFor:function(t){return function(r){var i;if(!I(r)||(i=Ht(r)).type!==t)throw er("Incompatible receiver, "+t+" required");return i}}},or=r((function(t){var r=Gt.CONFIGURABLE,i=ar.enforce,e=ar.get,n=String,s=Object.defineProperty,a=x("".slice),o=x("".replace),c=x([].join),f=u&&!h((function(){return 8!==s((function(){}),"length",{value:8}).length})),l=String(String).split("String"),v=t.exports=function(t,e,h){"Symbol("===a(n(e),0,7)&&(e="["+o(n(e),/^Symbol\(([^)]*)\)/,"$1")+"]"),h&&h.getter&&(e="get "+e),h&&h.setter&&(e="set "+e),(!ct(t,"name")||r&&t.name!==e)&&(u?s(t,"name",{value:e,configurable:!0}):t.name=e),f&&h&&ct(h,"arity")&&t.length!==h.arity&&s(t,"length",{value:h.arity});try{h&&ct(h,"constructor")&&h.constructor?u&&s(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var v=i(t);return ct(v,"source")||(v.source=c(l,"string"==typeof e?e:"")),t};Function.prototype.toString=v((function(){return L(this)&&e(this).source||Qt(this)}),"toString")})),hr=function(t,r,i,e){e||(e={});var n=e.enumerable,s=void 0!==e.name?e.name:r;if(L(i)&&or(i,s,e),e.global)n?t[r]=i:et(r,i);else{try{e.unsafe?t[r]&&(n=!0):delete t[r]}catch(t){}n?t[r]=i:zt.f(t,r,{value:i,enumerable:!1,configurable:!e.nonConfigurable,writable:!e.nonWritable})}return t},ur=Math.ceil,cr=Math.floor,fr=Math.trunc||function(t){var r=+t;return(r>0?cr:ur)(r)},lr=function(t){var r=+t;return r!=r||0===r?0:fr(r)},vr=Math.max,dr=Math.min,pr=function(t,r){var i=lr(t);return i<0?vr(i+r,0):dr(i,r)},yr=Math.min,gr=function(t){return t>0?yr(lr(t),9007199254740991):0},mr=function(t){return gr(t.length)},br=function(t){return function(r,i,e){var n,s=C(r),a=mr(s),o=pr(e,a);if(t&&i!=i){for(;a>o;)if((n=s[o++])!=n)return!0}else for(;a>o;o++)if((t||o in s)&&s[o]===i)return t||o||0;return!t&&-1}},wr={includes:br(!0),indexOf:br(!1)},xr=wr.indexOf,Mr=x([].push),kr=function(t,r){var i,e=C(t),n=0,s=[];for(i in e)!ct(rr,i)&&ct(e,i)&&Mr(s,i);for(;r.length>n;)ct(e,i=r[n++])&&(~xr(s,i)||Mr(s,i));return s},Sr=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Nr=Sr.concat("length","prototype"),Pr=Object.getOwnPropertyNames||function(t){return kr(t,Nr)},jr={f:Pr},Or={f:Object.getOwnPropertySymbols},Er=x([].concat),Tr=D("Reflect","ownKeys")||function(t){var r=jr.f(At(t)),i=Or.f;return i?Er(r,i(t)):r},Cr=function(t,r,i){for(var e=Tr(r),n=zt.f,s=Ot.f,a=0;a<e.length;a++){var o=e[a];ct(t,o)||i&&ct(i,o)||n(t,o,s(r,o))}},Ar=/#|\.prototype\./,Rr=function(t,r){var i=Lr[Br(t)];return i==Ir||i!=$r&&(L(r)?h(r):!!r)},Br=Rr.normalize=function(t){return String(t).replace(Ar,".").toLowerCase()},Lr=Rr.data={},$r=Rr.NATIVE="N",Ir=Rr.POLYFILL="P",Dr=Rr,Fr=Ot.f,zr=function(t,r){var i,e,n,s,a,h=t.target,u=t.global,c=t.stat;if(i=u?o:c?o[h]||et(h,{}):(o[h]||{}).prototype)for(e in r){if(s=r[e],n=t.dontCallGetSet?(a=Fr(i,e))&&a.value:i[e],!Dr(u?e:h+(c?".":"#")+e,t.forced)&&void 0!==n){if(typeof s==typeof n)continue;Cr(s,n)}(t.sham||n&&n.sham)&&_t(s,"sham",!0),hr(i,e,s,t)}},_r="undefined"!=typeof process&&"process"==S(process),Yr=String,Xr=TypeError,qr=Object.setPrototypeOf||("__proto__"in{}?function(){var t,r=!1,i={};try{(t=x(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(i,[]),r=i instanceof Array}catch(t){}return function(i,e){return At(i),function(t){if("object"==typeof t||L(t))return t;throw Xr("Can't set "+Yr(t)+" as a prototype")}(e),r?t(i,e):i.__proto__=e,i}}():void 0),Gr=zt.f,Ur=mt("toStringTag"),Vr=function(t,r,i){t&&!i&&(t=t.prototype),t&&!ct(t,Ur)&&Gr(t,Ur,{configurable:!0,value:r})},Hr=mt("species"),Wr=TypeError,Qr={};Qr[mt("toStringTag")]="z";var Zr="[object z]"===String(Qr),Kr=mt("toStringTag"),Jr=Object,ti="Arguments"==S(function(){return arguments}()),ri=Zr?S:function(t){var r,i,e;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(i=function(t,r){try{return t[r]}catch(t){}}(r=Jr(t),Kr))?i:ti?S(r):"Object"==(e=S(r))&&L(r.callee)?"Arguments":e},ii=function(){},ei=[],ni=D("Reflect","construct"),si=/^\s*(?:class|function)\b/,ai=x(si.exec),oi=!si.exec(ii),hi=function(t){if(!L(t))return!1;try{return ni(ii,ei,t),!0}catch(t){return!1}},ui=function(t){if(!L(t))return!1;switch(ri(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return oi||!!ai(si,Qt(t))}catch(t){return!0}};ui.sham=!0;var ci,fi,li,vi,di=!ni||h((function(){var t;return hi(hi.call)||!hi(Object)||!hi((function(){t=!0}))||t}))?ui:hi,pi=TypeError,yi=mt("species"),gi=function(t,r){var i,e=At(t).constructor;return void 0===e||O(i=At(e)[yi])?r:function(t){if(di(t))return t;throw pi(Z(t)+" is not a constructor")}(i)},mi=Function.prototype,bi=mi.apply,wi=mi.call,xi="object"==typeof Reflect&&Reflect.apply||(c?wi.bind(bi):function(){return wi.apply(bi,arguments)}),Mi=function(t){if("Function"===S(t))return x(t)},ki=Mi(Mi.bind),Si=function(t,r){return J(t),void 0===r?t:c?ki(t,r):function(){return t.apply(r,arguments)}},Ni=D("document","documentElement"),Pi=x([].slice),ji=TypeError,Oi=/(?:ipad|iphone|ipod).*applewebkit/i.test(z),Ei=o.setImmediate,Ti=o.clearImmediate,Ci=o.process,Ai=o.Dispatch,Ri=o.Function,Bi=o.MessageChannel,Li=o.String,$i=0,Ii={},Di="onreadystatechange";h((function(){ci=o.location}));var Fi=function(t){if(ct(Ii,t)){var r=Ii[t];delete Ii[t],r()}},zi=function(t){return function(){Fi(t)}},_i=function(t){Fi(t.data)},Yi=function(t){o.postMessage(Li(t),ci.protocol+"//"+ci.host)};Ei&&Ti||(Ei=function(t){!function(t){if(t<1)throw ji("Not enough arguments")}(arguments.length);var r=L(t)?t:Ri(t),i=Pi(arguments,1);return Ii[++$i]=function(){xi(r,void 0,i)},fi($i),$i},Ti=function(t){delete Ii[t]},_r?fi=function(t){Ci.nextTick(zi(t))}:Ai&&Ai.now?fi=function(t){Ai.now(zi(t))}:Bi&&!Oi?(vi=(li=new Bi).port2,li.port1.onmessage=_i,fi=Si(vi.postMessage,vi)):o.addEventListener&&L(o.postMessage)&&!o.importScripts&&ci&&"file:"!==ci.protocol&&!h(Yi)?(fi=Yi,o.addEventListener("message",_i,!1)):fi=Di in St("script")?function(t){Ni.appendChild(St("script"))[Di]=function(){Ni.removeChild(this),Fi(t)}}:function(t){setTimeout(zi(t),0)});var Xi={set:Ei,clear:Ti},qi=function(){this.head=null,this.tail=null};qi.prototype={add:function(t){var r={item:t,next:null},i=this.tail;i?i.next=r:this.head=r,this.tail=r},get:function(){var t=this.head;if(t)return null===(this.head=t.next)&&(this.tail=null),t.item}};var Gi,Ui,Vi,Hi,Wi,Qi=qi,Zi=/ipad|iphone|ipod/i.test(z)&&"undefined"!=typeof Pebble,Ki=/web0s(?!.*chrome)/i.test(z),Ji=Xi.set,te=o.MutationObserver||o.WebKitMutationObserver,re=o.document,ie=o.process,ee=o.Promise,ne=(0,Ot.f)(o,"queueMicrotask"),se=ne&&ne.value;if(!se){var ae=new Qi,oe=function(){var t,r;for(_r&&(t=ie.domain)&&t.exit();r=ae.get();)try{r()}catch(t){throw ae.head&&Gi(),t}t&&t.enter()};Oi||_r||Ki||!te||!re?!Zi&&ee&&ee.resolve?((Hi=ee.resolve(void 0)).constructor=ee,Wi=Si(Hi.then,Hi),Gi=function(){Wi(oe)}):_r?Gi=function(){ie.nextTick(oe)}:(Ji=Si(Ji,o),Gi=function(){Ji(oe)}):(Ui=!0,Vi=re.createTextNode(""),new te(oe).observe(Vi,{characterData:!0}),Gi=function(){Vi.data=Ui=!Ui}),se=function(t){ae.head||Gi(),ae.add(t)}}var he,ue,ce,fe,le=se,ve=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}},de=o.Promise,pe="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,ye=!pe&&!_r&&"object"==typeof window&&"object"==typeof document,ge=mt("species"),me=!1,be=L(o.PromiseRejectionEvent),we=Dr("Promise",(function(){var t=Qt(de),r=t!==String(de);if(!r&&66===G)return!0;if(!G||G<51||!/native code/.test(t)){var i=new de((function(t){t(1)})),e=function(t){t((function(){}),(function(){}))};if((i.constructor={})[ge]=e,!(me=i.then((function(){}))instanceof e))return!0}return!r&&(ye||pe)&&!be})),xe={CONSTRUCTOR:we,REJECTION_EVENT:be,SUBCLASSING:me},Me=TypeError,ke=function(t){var r,i;this.promise=new t((function(t,e){if(void 0!==r||void 0!==i)throw Me("Bad Promise constructor");r=t,i=e})),this.resolve=J(r),this.reject=J(i)},Se={f:function(t){return new ke(t)}},Ne=Xi.set,Pe="Promise",je=xe.CONSTRUCTOR,Oe=xe.REJECTION_EVENT,Ee=xe.SUBCLASSING,Te=ar.getterFor(Pe),Ce=ar.set,Ae=de&&de.prototype,Re=de,Be=Ae,Le=o.TypeError,$e=o.document,Ie=o.process,De=Se.f,Fe=De,ze=!!($e&&$e.createEvent&&o.dispatchEvent),_e="unhandledrejection",Ye=function(t){var r;return!(!I(t)||!L(r=t.then))&&r},Xe=function(t,r){var i,e,n,s=r.value,a=1==r.state,o=a?t.ok:t.fail,h=t.resolve,u=t.reject,c=t.domain;try{o?(a||(2===r.rejection&&He(r),r.rejection=1),!0===o?i=s:(c&&c.enter(),i=o(s),c&&(c.exit(),n=!0)),i===t.promise?u(Le("Promise-chain cycle")):(e=Ye(i))?l(e,i,h,u):h(i)):u(s)}catch(t){c&&!n&&c.exit(),u(t)}},qe=function(t,r){t.notified||(t.notified=!0,le((function(){for(var i,e=t.reactions;i=e.get();)Xe(i,t);t.notified=!1,r&&!t.rejection&&Ue(t)})))},Ge=function(t,r,i){var e,n;ze?((e=$e.createEvent("Event")).promise=r,e.reason=i,e.initEvent(t,!1,!0),o.dispatchEvent(e)):e={promise:r,reason:i},!Oe&&(n=o["on"+t])?n(e):t===_e&&function(t,r){try{1==arguments.length?console.error(t):console.error(t,r)}catch(t){}}("Unhandled promise rejection",i)},Ue=function(t){l(Ne,o,(function(){var r,i=t.facade,e=t.value;if(Ve(t)&&(r=ve((function(){_r?Ie.emit("unhandledRejection",e,i):Ge(_e,i,e)})),t.rejection=_r||Ve(t)?2:1,r.error))throw r.value}))},Ve=function(t){return 1!==t.rejection&&!t.parent},He=function(t){l(Ne,o,(function(){var r=t.facade;_r?Ie.emit("rejectionHandled",r):Ge("rejectionhandled",r,t.value)}))},We=function(t,r,i){return function(e){t(r,e,i)}},Qe=function(t,r,i){t.done||(t.done=!0,i&&(t=i),t.value=r,t.state=2,qe(t,!0))},Ze=function(t,r,i){if(!t.done){t.done=!0,i&&(t=i);try{if(t.facade===r)throw Le("Promise can't be resolved itself");var e=Ye(r);e?le((function(){var i={done:!1};try{l(e,r,We(Ze,i,t),We(Qe,i,t))}catch(r){Qe(i,r,t)}})):(t.value=r,t.state=1,qe(t,!1))}catch(r){Qe({done:!1},r,t)}}};if(je&&(Re=function(t){!function(t){if(F(Be,t))return t;throw Wr("Incorrect invocation")}(this),J(t),l(he,this);var r=Te(this);try{t(We(Ze,r),We(Qe,r))}catch(t){Qe(r,t)}},(he=function(){Ce(this,{type:Pe,done:!1,notified:!1,parent:!1,reactions:new Qi,rejection:!1,state:0,value:void 0})}).prototype=hr(Be=Re.prototype,"then",(function(t,r){var i=Te(this),e=De(gi(this,Re));return i.parent=!0,e.ok=!L(t)||t,e.fail=L(r)&&r,e.domain=_r?Ie.domain:void 0,0==i.state?i.reactions.add(e):le((function(){Xe(e,i)})),e.promise})),ue=function(){var t=new he,r=Te(t);this.promise=t,this.resolve=We(Ze,r),this.reject=We(Qe,r)},Se.f=De=function(t){return t===Re||void 0===t?new ue(t):Fe(t)},L(de)&&Ae!==Object.prototype)){ce=Ae.then,Ee||hr(Ae,"then",(function(t,r){var i=this;return new Re((function(t,r){l(ce,i,t,r)})).then(t,r)}),{unsafe:!0});try{delete Ae.constructor}catch(t){}qr&&qr(Ae,Be)}zr({global:!0,constructor:!0,wrap:!0,forced:je},{Promise:Re}),Vr(Re,Pe,!1),fe=D(Pe),u&&fe&&!fe[Hr]&&(0,zt.f)(fe,Hr,{configurable:!0,get:function(){return this}});var Ke={},Je=mt("iterator"),tn=Array.prototype,rn=mt("iterator"),en=function(t){if(!O(t))return tt(t,rn)||tt(t,"@@iterator")||Ke[ri(t)]},nn=TypeError,sn=function(t,r,i){var e,n;At(t);try{if(!(e=tt(t,"return"))){if("throw"===r)throw i;return i}e=l(e,t)}catch(t){n=!0,e=t}if("throw"===r)throw i;if(n)throw e;return At(e),i},an=TypeError,on=function(t,r){this.stopped=t,this.result=r},hn=on.prototype,un=function(t,r,i){var e,n,s,a,o,h,u,c,f=!(!i||!i.AS_ENTRIES),v=!(!i||!i.IS_RECORD),d=!(!i||!i.IS_ITERATOR),p=!(!i||!i.INTERRUPTED),y=Si(r,i&&i.that),g=function(t){return e&&sn(e,"normal",t),new on(!0,t)},m=function(t){return f?(At(t),p?y(t[0],t[1],g):y(t[0],t[1])):p?y(t,g):y(t)};if(v)e=t.iterator;else if(d)e=t;else{if(!(n=en(t)))throw an(Z(t)+" is not iterable");if(void 0!==(c=n)&&(Ke.Array===c||tn[Je]===c)){for(s=0,a=mr(t);a>s;s++)if((o=m(t[s]))&&F(hn,o))return o;return new on(!1)}e=function(t,r){var i=arguments.length<2?en(t):r;if(J(i))return At(l(i,t));throw nn(Z(t)+" is not iterable")}(t,n)}for(h=v?t.next:e.next;!(u=l(h,e)).done;){try{o=m(u.value)}catch(t){sn(e,"throw",t)}if("object"==typeof o&&o&&F(hn,o))return o}return new on(!1)},cn=mt("iterator"),fn=!1;try{var ln=0,vn={next:function(){return{done:!!ln++}},return:function(){fn=!0}};vn[cn]=function(){return this},Array.from(vn,(function(){throw 2}))}catch(t){}var dn=xe.CONSTRUCTOR||!function(){if(!fn)return!1;var t=!1;try{var r={};r[cn]=function(){return{next:function(){return{done:t=!0}}}},de.all(r).then(void 0,(function(){}))}catch(t){}return t}();zr({target:"Promise",stat:!0,forced:dn},{all:function(t){var r=this,i=Se.f(r),e=i.resolve,n=i.reject,s=ve((function(){var i=J(r.resolve),s=[],a=0,o=1;un(t,(function(t){var h=a++,u=!1;o++,l(i,r,t).then((function(t){u||(u=!0,s[h]=t,--o||e(s))}),n)})),--o||e(s)}));return s.error&&n(s.value),i.promise}});var pn=de&&de.prototype;if(zr({target:"Promise",proto:!0,forced:xe.CONSTRUCTOR,real:!0},{catch:function(t){return this.then(void 0,t)}}),L(de)){var yn=D("Promise").prototype.catch;pn.catch!==yn&&hr(pn,"catch",yn,{unsafe:!0})}zr({target:"Promise",stat:!0,forced:dn},{race:function(t){var r=this,i=Se.f(r),e=i.reject,n=ve((function(){var n=J(r.resolve);un(t,(function(t){l(n,r,t).then(i.resolve,e)}))}));return n.error&&e(n.value),i.promise}}),zr({target:"Promise",stat:!0,forced:xe.CONSTRUCTOR},{reject:function(t){var r=Se.f(this);return l(r.reject,void 0,t),r.promise}}),zr({target:"Promise",stat:!0,forced:xe.CONSTRUCTOR},{resolve:function(t){return function(t,r){if(At(t),I(r)&&r.constructor===t)return r;var i=Se.f(t);return(0,i.resolve)(r),i.promise}(this,t)}});const gn=i(r((function(t){function r(t,r,i,e,n,s,a){try{var o=t[s](a),h=o.value}catch(t){return void i(t)}o.done?r(h):Promise.resolve(h).then(e,n)}t.exports=function(t){return function(){var i=this,e=arguments;return new Promise((function(n,s){var a=t.apply(i,e);function o(t){r(a,n,s,o,h,"next",t)}function h(t){r(a,n,s,o,h,"throw",t)}o(void 0)}))}},t.exports.__esModule=!0,t.exports.default=t.exports})));var mn,bn=String,wn=function(t){if("Symbol"===ri(t))throw TypeError("Cannot convert a Symbol value to a string");return bn(t)},xn=function(){var t=At(this),r="";return t.hasIndices&&(r+="d"),t.global&&(r+="g"),t.ignoreCase&&(r+="i"),t.multiline&&(r+="m"),t.dotAll&&(r+="s"),t.unicode&&(r+="u"),t.unicodeSets&&(r+="v"),t.sticky&&(r+="y"),r},Mn=o.RegExp,kn=h((function(){var t=Mn("a","y");return t.lastIndex=2,null!=t.exec("abcd")})),Sn=kn||h((function(){return!Mn("a","y").sticky})),Nn={BROKEN_CARET:kn||h((function(){var t=Mn("^r","gy");return t.lastIndex=2,null!=t.exec("str")})),MISSED_STICKY:Sn,UNSUPPORTED_Y:kn},Pn=Object.keys||function(t){return kr(t,Sr)},jn=u&&!Et?Object.defineProperties:function(t,r){At(t);for(var i,e=C(r),n=Pn(r),s=n.length,a=0;s>a;)zt.f(t,i=n[a++],e[i]);return t},On={f:jn},En="prototype",Tn="script",Cn=tr("IE_PROTO"),An=function(){},Rn=function(t){return"<"+Tn+">"+t+"</"+Tn+">"},Bn=function(t){t.write(Rn("")),t.close();var r=t.parentWindow.Object;return t=null,r},Ln=function(){try{mn=new ActiveXObject("htmlfile")}catch(t){}var t,r,i;Ln="undefined"!=typeof document?document.domain&&mn?Bn(mn):(r=St("iframe"),i="java"+Tn+":",r.style.display="none",Ni.appendChild(r),r.src=String(i),(t=r.contentWindow.document).open(),t.write(Rn("document.F=Object")),t.close(),t.F):Bn(mn);for(var e=Sr.length;e--;)delete Ln[En][Sr[e]];return Ln()};rr[Cn]=!0;var $n,In,Dn=Object.create||function(t,r){var i;return null!==t?(An[En]=At(t),i=new An,An[En]=null,i[Cn]=t):i=Ln(),void 0===r?i:On.f(i,r)},Fn=o.RegExp,zn=h((function(){var t=Fn(".","s");return!(t.dotAll&&t.exec("\n")&&"s"===t.flags)})),_n=o.RegExp,Yn=h((function(){var t=_n("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")})),Xn=ar.get,qn=at("native-string-replace",String.prototype.replace),Gn=RegExp.prototype.exec,Un=Gn,Vn=x("".charAt),Hn=x("".indexOf),Wn=x("".replace),Qn=x("".slice),Zn=(In=/b*/g,l(Gn,$n=/a/,"a"),l(Gn,In,"a"),0!==$n.lastIndex||0!==In.lastIndex),Kn=Nn.BROKEN_CARET,Jn=void 0!==/()??/.exec("")[1];(Zn||Jn||Kn||zn||Yn)&&(Un=function(t){var r,i,e,n,s,a,o,h=this,u=Xn(h),c=wn(t),f=u.raw;if(f)return f.lastIndex=h.lastIndex,r=l(Un,f,c),h.lastIndex=f.lastIndex,r;var v=u.groups,d=Kn&&h.sticky,p=l(xn,h),y=h.source,g=0,m=c;if(d&&(p=Wn(p,"y",""),-1===Hn(p,"g")&&(p+="g"),m=Qn(c,h.lastIndex),h.lastIndex>0&&(!h.multiline||h.multiline&&"\n"!==Vn(c,h.lastIndex-1))&&(y="(?: "+y+")",m=" "+m,g++),i=new RegExp("^(?:"+y+")",p)),Jn&&(i=new RegExp("^"+y+"$(?!\\s)",p)),Zn&&(e=h.lastIndex),n=l(Gn,d?i:h,m),d?n?(n.input=Qn(n.input,g),n[0]=Qn(n[0],g),n.index=h.lastIndex,h.lastIndex+=n[0].length):h.lastIndex=0:Zn&&n&&(h.lastIndex=h.global?n.index+n[0].length:e),Jn&&n&&n.length>1&&l(qn,n[0],i,(function(){for(s=1;s<arguments.length-2;s++)void 0===arguments[s]&&(n[s]=void 0)})),n&&v)for(n.groups=a=Dn(null),s=0;s<v.length;s++)a[(o=v[s])[0]]=n[o[1]];return n});var ts=Un;zr({target:"RegExp",proto:!0,forced:/./.exec!==ts},{exec:ts});var rs=mt("species"),is=RegExp.prototype,es=function(t,r,i,e){var n=mt(t),s=!h((function(){var r={};return r[n]=function(){return 7},7!=""[t](r)})),a=s&&!h((function(){var r=!1,i=/a/;return"split"===t&&((i={}).constructor={},i.constructor[rs]=function(){return i},i.flags="",i[n]=/./[n]),i.exec=function(){return r=!0,null},i[n](""),!r}));if(!s||!a||i){var o=Mi(/./[n]),u=r(n,""[t],(function(t,r,i,e,n){var a=Mi(t),h=r.exec;return h===ts||h===is.exec?s&&!n?{done:!0,value:o(r,i,e)}:{done:!0,value:a(i,r,e)}:{done:!1}}));hr(String.prototype,t,u[0]),hr(is,n,u[1])}e&&_t(is[n],"sham",!0)},ns=x("".charAt),ss=x("".charCodeAt),as=x("".slice),os=function(t){return function(r,i){var e,n,s=wn(T(r)),a=lr(i),o=s.length;return a<0||a>=o?t?"":void 0:(e=ss(s,a))<55296||e>56319||a+1===o||(n=ss(s,a+1))<56320||n>57343?t?ns(s,a):e:t?as(s,a,a+2):n-56320+(e-55296<<10)+65536}},hs=(os(!1),os(!0)),us=function(t,r,i){return r+(i?hs(t,r).length:1)},cs=TypeError,fs=function(t,r){var i=t.exec;if(L(i)){var e=l(i,t,r);return null!==e&&At(e),e}if("RegExp"===S(t))return l(ts,t,r);throw cs("RegExp#exec called on incompatible receiver")};es("match",(function(t,r,i){return[function(r){var i=T(this),e=O(r)?void 0:tt(r,t);return e?l(e,r,i):new RegExp(r)[t](wn(i))},function(t){var e=At(this),n=wn(t),s=i(r,e,n);if(s.done)return s.value;if(!e.global)return fs(e,n);var a=e.unicode;e.lastIndex=0;for(var o,h=[],u=0;null!==(o=fs(e,n));){var c=wn(o[0]);h[u]=c,""===c&&(e.lastIndex=us(n,gr(e.lastIndex),a)),u++}return 0===u?null:h}]}));var ls=Math.floor,vs=x("".charAt),ds=x("".replace),ps=x("".slice),ys=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,gs=/\$([$&'`]|\d{1,2})/g,ms=function(t,r,i,e,n,s){var a=i+t.length,o=e.length,h=gs;return void 0!==n&&(n=ht(n),h=ys),ds(s,h,(function(s,h){var u;switch(vs(h,0)){case"$":return"$";case"&":return t;case"`":return ps(r,0,i);case"'":return ps(r,a);case"<":u=n[ps(h,1,-1)];break;default:var c=+h;if(0===c)return s;if(c>o){var f=ls(c/10);return 0===f?s:f<=o?void 0===e[f-1]?vs(h,1):e[f-1]+vs(h,1):s}u=e[c-1]}return void 0===u?"":u}))},bs=mt("replace"),ws=Math.max,xs=Math.min,Ms=x([].concat),ks=x([].push),Ss=x("".indexOf),Ns=x("".slice),Ps="$0"==="a".replace(/./,"$0"),js=!!/./[bs]&&""===/./[bs]("a","$0");es("replace",(function(t,r,i){var e=js?"$":"$0";return[function(t,i){var e=T(this),n=O(t)?void 0:tt(t,bs);return n?l(n,t,e,i):l(r,wn(e),t,i)},function(t,n){var s=At(this),a=wn(t);if("string"==typeof n&&-1===Ss(n,e)&&-1===Ss(n,"$<")){var o=i(r,s,a,n);if(o.done)return o.value}var h=L(n);h||(n=wn(n));var u=s.global;if(u){var c=s.unicode;s.lastIndex=0}for(var f=[];;){var l=fs(s,a);if(null===l)break;if(ks(f,l),!u)break;""===wn(l[0])&&(s.lastIndex=us(a,gr(s.lastIndex),c))}for(var v,d="",p=0,y=0;y<f.length;y++){for(var g=wn((l=f[y])[0]),m=ws(xs(lr(l.index),a.length),0),b=[],w=1;w<l.length;w++)ks(b,void 0===(v=l[w])?v:String(v));var x=l.groups;if(h){var M=Ms([g],b,m,a);void 0!==x&&ks(M,x);var k=wn(xi(n,void 0,M))}else k=ms(g,a,m,b,x,n);m>=p&&(d+=Ns(a,p,m)+k,p=m+g.length)}return d+Ns(a,p)}]}),!!h((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")}))||!Ps||js);var Os,Es=mt("match"),Ts=function(t){var r;return I(t)&&(void 0!==(r=t[Es])?!!r:"RegExp"==S(t))},Cs=TypeError,As=function(t){if(Ts(t))throw Cs("The method doesn't accept regular expressions");return t},Rs=mt("match"),Bs=function(t){var r=/./;try{"/./"[t](r)}catch(i){try{return r[Rs]=!1,"/./"[t](r)}catch(t){}}return!1},Ls=Ot.f,$s=Mi("".startsWith),Is=Mi("".slice),Ds=Math.min,Fs=Bs("startsWith"),zs=!(Fs||(Os=Ls(String.prototype,"startsWith"),!Os||Os.writable));zr({target:"String",proto:!0,forced:!zs&&!Fs},{startsWith:function(t){var r=wn(T(this));As(t);var i=gr(Ds(arguments.length>1?arguments[1]:void 0,r.length)),e=wn(t);return $s?$s(r,e,i):Is(r,i,i+e.length)===e}});var _s=zt.f,Ys=mt("unscopables"),Xs=Array.prototype;null==Xs[Ys]&&_s(Xs,Ys,{configurable:!0,value:Dn(null)});var qs,Gs,Us,Vs=function(t){Xs[Ys][t]=!0},Hs=!h((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})),Ws=tr("IE_PROTO"),Qs=Object,Zs=Qs.prototype,Ks=Hs?Qs.getPrototypeOf:function(t){var r=ht(t);if(ct(r,Ws))return r[Ws];var i=r.constructor;return L(i)&&r instanceof i?i.prototype:r instanceof Qs?Zs:null},Js=mt("iterator"),ta=!1;[].keys&&("next"in(Us=[].keys())?(Gs=Ks(Ks(Us)))!==Object.prototype&&(qs=Gs):ta=!0);var ra=!I(qs)||h((function(){var t={};return qs[Js].call(t)!==t}));ra&&(qs={}),L(qs[Js])||hr(qs,Js,(function(){return this}));var ia={IteratorPrototype:qs,BUGGY_SAFARI_ITERATORS:ta},ea=ia.IteratorPrototype,na=function(){return this},sa=Gt.PROPER,aa=Gt.CONFIGURABLE,oa=ia.IteratorPrototype,ha=ia.BUGGY_SAFARI_ITERATORS,ua=mt("iterator"),ca="keys",fa="values",la="entries",va=function(){return this},da=function(t,r){return{value:t,done:r}},pa=zt.f,ya="Array Iterator",ga=ar.set,ma=ar.getterFor(ya),ba=function(t,r,i,e,n){!function(t,r,i){var e=r+" Iterator";t.prototype=Dn(ea,{next:g(1,i)}),Vr(t,e,!1),Ke[e]=na}(i,r,(function(){var t=ma(this),r=t.target,i=t.kind,e=t.index++;return!r||e>=r.length?(t.target=void 0,da(void 0,!0)):da("keys"==i?e:"values"==i?r[e]:[e,r[e]],!1)}));var s,a,o,h=function(t){if(t===n&&d)return d;if(!ha&&t in f)return f[t];switch(t){case ca:case fa:case la:return function(){return new i(this,t)}}return function(){return new i(this)}},u=r+" Iterator",c=!1,f=t.prototype,v=f[ua]||f["@@iterator"]||n&&f[n],d=!ha&&v||h(n),p=f.entries||v;if(p&&(s=Ks(p.call(new t)))!==Object.prototype&&s.next&&(Ks(s)!==oa&&(qr?qr(s,oa):L(s[ua])||hr(s,ua,va)),Vr(s,u,!0)),sa&&v&&v.name!==fa&&(aa?_t(f,"name",fa):(c=!0,d=function(){return l(v,this)})),n)if(void(a={values:h(fa),keys:h(ca),entries:h(la)}))for(o in a)(ha||c||!(o in f))&&hr(f,o,a[o]);else zr({target:r,proto:!0,forced:ha||c},a);return f[ua]!==d&&hr(f,ua,d,{name:n}),Ke[r]=d,a}(Array,"Array",(function(t,r){ga(this,{type:ya,target:C(t),index:0,kind:r})}),0,"values"),wa=Ke.Arguments=Ke.Array;if(Vs("keys"),Vs("values"),Vs("entries"),u&&"values"!==wa.name)try{pa(wa,"name",{value:"values"})}catch(t){}var xa={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},Ma=St("span").classList,ka=Ma&&Ma.constructor&&Ma.constructor.prototype,Sa=ka===Object.prototype?void 0:ka,Na=mt("iterator"),Pa=mt("toStringTag"),ja=ba.values,Oa=function(t,r){if(t){if(t[Na]!==ja)try{_t(t,Na,ja)}catch(r){t[Na]=ja}if(t[Pa]||_t(t,Pa,r),xa[r])for(var i in ba)if(t[i]!==ba[i])try{_t(t,i,ba[i])}catch(r){t[i]=ba[i]}}};for(var Ea in xa)Oa(o[Ea]&&o[Ea].prototype,Ea);Oa(Sa,"DOMTokenList");var Ta=r((function(t){var r=e.default;t.exports=function(t,i){if("object"!==r(t)||null===t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,i||"default");if("object"!==r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===i?String:Number)(t)},t.exports.__esModule=!0,t.exports.default=t.exports})),Ca=r((function(t){var r=e.default;t.exports=function(t){var i=Ta(t,"string");return"symbol"===r(i)?i:String(i)},t.exports.__esModule=!0,t.exports.default=t.exports}));const Aa=i(r((function(t){t.exports=function(t,r,i){return(r=Ca(r))in t?Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[r]=i,t},t.exports.__esModule=!0,t.exports.default=t.exports})));var Ra=TypeError,Ba=function(t){return function(r,i,e,n){J(i);var s=ht(r),a=j(s),o=mr(s),h=t?o-1:0,u=t?-1:1;if(e<2)for(;;){if(h in a){n=a[h],h+=u;break}if(h+=u,t?h<0:o<=h)throw Ra("Reduce of empty array with no initial value")}for(;t?h>=0:o>h;h+=u)h in a&&(n=i(n,a[h],h,s));return n}},La=function(t,r){var i=[][t];return!!i&&h((function(){i.call(null,r||function(){return 1},1)}))},$a=[Ba(!1),Ba(!0)][0],Ia=!_r&&G>79&&G<83||!La("reduce");zr({target:"Array",proto:!0,forced:Ia},{reduce:function(t){var r=arguments.length;return $a(this,t,r,r>1?arguments[1]:void 0)}});var Da=Ot.f,Fa=Mi("".endsWith),za=Mi("".slice),_a=Math.min,Ya=Bs("endsWith"),Xa=!Ya&&!!function(){var t=Da(String.prototype,"endsWith");return t&&!t.writable}();zr({target:"String",proto:!0,forced:!Xa&&!Ya},{endsWith:function(t){var r=wn(T(this));As(t);var i=arguments.length>1?arguments[1]:void 0,e=r.length,n=void 0===i?e:_a(gr(i),e),s=wn(t);return Fa?Fa(r,s,n):za(r,n-s.length,n)===s}});var qa=Array,Ga=Math.max,Ua=function(t,r,i){for(var e,n,s,a=mr(t),o=pr(r,a),h=pr(void 0===i?a:i,a),u=qa(Ga(h-o,0)),c=0;o<h;o++,c++)e=u,n=t[o],void 0,(s=xt(c))in e?zt.f(e,s,g(0,n)):e[s]=n;return u.length=c,u},Va=Nn.UNSUPPORTED_Y,Ha=4294967295,Wa=Math.min,Qa=[].push,Za=x(/./.exec),Ka=x(Qa),Ja=x("".slice);es("split",(function(t,r,i){var e;return e="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(t,i){var e=wn(T(this)),n=void 0===i?Ha:i>>>0;if(0===n)return[];if(void 0===t)return[e];if(!Ts(t))return l(r,e,t,n);for(var s,a,o,h=[],u=0,c=new RegExp(t.source,(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":"")+"g");(s=l(ts,c,e))&&!((a=c.lastIndex)>u&&(Ka(h,Ja(e,u,s.index)),s.length>1&&s.index<e.length&&xi(Qa,h,Ua(s,1)),o=s[0].length,u=a,h.length>=n));)c.lastIndex===s.index&&c.lastIndex++;return u===e.length?!o&&Za(c,"")||Ka(h,""):Ka(h,Ja(e,u)),h.length>n?Ua(h,0,n):h}:"0".split(void 0,0).length?function(t,i){return void 0===t&&0===i?[]:l(r,this,t,i)}:r,[function(r,i){var n=T(this),s=O(r)?void 0:tt(r,t);return s?l(s,r,n,i):l(e,wn(n),r,i)},function(t,n){var s=At(this),a=wn(t),o=i(e,s,a,n,e!==r);if(o.done)return o.value;var h=gi(s,RegExp),u=s.unicode,c=new h(Va?"^(?:"+s.source+")":s,(s.ignoreCase?"i":"")+(s.multiline?"m":"")+(s.unicode?"u":"")+(Va?"g":"y")),f=void 0===n?Ha:n>>>0;if(0===f)return[];if(0===a.length)return null===fs(c,a)?[a]:[];for(var l=0,v=0,d=[];v<a.length;){c.lastIndex=Va?0:v;var p,y=fs(c,Va?Ja(a,v):a);if(null===y||(p=Wa(gr(c.lastIndex+(Va?v:0)),a.length))===l)v=us(a,v,u);else{if(Ka(d,Ja(a,l,v)),d.length===f)return d;for(var g=1;g<=y.length-1;g++)if(Ka(d,y[g]),d.length===f)return d;v=l=p}}return Ka(d,Ja(a,l)),d}]}),!!h((function(){var t=/(?:)/,r=t.exec;t.exec=function(){return r.apply(this,arguments)};var i="ab".split(t);return 2!==i.length||"a"!==i[0]||"b"!==i[1]})),Va);for(var to=r((function(r){(function(){var t,i,e,n,s,a;"undefined"!=typeof performance&&null!==performance&&performance.now?r.exports=function(){return performance.now()}:"undefined"!=typeof process&&null!==process&&process.hrtime?(r.exports=function(){return(t()-s)/1e6},i=process.hrtime,n=(t=function(){var t;return 1e9*(t=i())[0]+t[1]})(),a=1e9*process.uptime(),s=n-a):Date.now?(r.exports=function(){return Date.now()-e},e=Date.now()):(r.exports=function(){return(new Date).getTime()-e},e=(new Date).getTime())}).call(t)})),ro="undefined"==typeof window?t:window,io=["moz","webkit"],eo="AnimationFrame",no=ro["request"+eo],so=ro["cancel"+eo]||ro["cancelRequest"+eo],ao=0;!no&&ao<io.length;ao++)no=ro[io[ao]+"Request"+eo],so=ro[io[ao]+"Cancel"+eo]||ro[io[ao]+"CancelRequest"+eo];if(!no||!so){var oo=0,ho=0,uo=[];no=function(t){if(0===uo.length){var r=to(),i=Math.max(0,16.666666666666668-(r-oo));oo=i+r,setTimeout((function(){var t=uo.slice(0);uo.length=0;for(var r=0;r<t.length;r++)if(!t[r].cancelled)try{t[r].callback(oo)}catch(t){setTimeout((function(){throw t}),0)}}),Math.round(i))}return uo.push({handle:++ho,callback:t,cancelled:!1}),ho},so=function(t){for(var r=0;r<uo.length;r++)uo[r].handle===t&&(uo[r].cancelled=!0)}}var co=function(t){return no.call(ro,t)};co.cancel=function(){so.apply(ro,arguments)},co.polyfill=function(t){t||(t=ro),t.requestAnimationFrame=no,t.cancelAnimationFrame=so};var fo,lo="\t\n\v\f\r                 \u2028\u2029\ufeff",vo=x("".replace),po="["+lo+"]",yo=RegExp("^"+po+po+"*"),go=RegExp(po+po+"*$"),mo=function(t){return function(r){var i=wn(T(r));return 1&t&&(i=vo(i,yo,"")),2&t&&(i=vo(i,go,"")),i}},bo={start:mo(1),end:mo(2),trim:mo(3)},wo=Gt.PROPER,xo=bo.trim;zr({target:"String",proto:!0,forced:(fo="trim",h((function(){return!!lo[fo]()||"​…᠎"!=="​…᠎"[fo]()||wo&&lo[fo].name!==fo})))},{trim:function(){return xo(this)}});var Mo=function(t){this.ok=!1,this.alpha=1,"#"==t.charAt(0)&&(t=t.substr(1,6)),t=(t=t.replace(/ /g,"")).toLowerCase();var r={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"};t=r[t]||t;for(var i=[{re:/^rgba\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3}),\s*((?:\d?\.)?\d)\)$/,example:["rgba(123, 234, 45, 0.8)","rgba(255,234,245,1.0)"],process:function(t){return[parseInt(t[1]),parseInt(t[2]),parseInt(t[3]),parseFloat(t[4])]}},{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(t){return[parseInt(t[1]),parseInt(t[2]),parseInt(t[3])]}},{re:/^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,example:["#00ff00","336699"],process:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/^([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,example:["#fb0","f0f"],process:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}}],e=0;e<i.length;e++){var n=i[e].process,s=i[e].re.exec(t);if(s){var a=n(s);this.r=a[0],this.g=a[1],this.b=a[2],a.length>3&&(this.alpha=a[3]),this.ok=!0}}this.r=this.r<0||isNaN(this.r)?0:this.r>255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.alpha=this.alpha<0?0:this.alpha>1||isNaN(this.alpha)?1:this.alpha,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toRGBA=function(){return"rgba("+this.r+", "+this.g+", "+this.b+", "+this.alpha+")"},this.toHex=function(){var t=this.r.toString(16),r=this.g.toString(16),i=this.b.toString(16);return 1==t.length&&(t="0"+t),1==r.length&&(r="0"+r),1==i.length&&(i="0"+i),"#"+t+r+i},this.getHelpXML=function(){for(var t=new Array,e=0;e<i.length;e++)for(var n=i[e].example,s=0;s<n.length;s++)t[t.length]=n[s];for(var a in r)t[t.length]=a;var o=document.createElement("ul");for(o.setAttribute("id","rgbcolor-examples"),e=0;e<t.length;e++)try{var h=document.createElement("li"),u=new RGBColor(t[e]),c=document.createElement("div");c.style.cssText="margin: 3px; border: 1px solid black; background:"+u.toHex()+"; color:"+u.toHex(),c.appendChild(document.createTextNode("test"));var f=document.createTextNode(" "+t[e]+" -> "+u.toRGB()+" -> "+u.toHex());h.appendChild(c),h.appendChild(f),o.appendChild(h)}catch(t){}return o}},ko=wr.indexOf,So=Mi([].indexOf),No=!!So&&1/So([1],1,-0)<0,Po=No||!La("indexOf");zr({target:"Array",proto:!0,forced:Po},{indexOf:function(t){var r=arguments.length>1?arguments[1]:void 0;return No?So(this,t,r)||0:ko(this,t,r)}});var jo=x("".indexOf);zr({target:"String",proto:!0,forced:!Bs("includes")},{includes:function(t){return!!~jo(wn(T(this)),wn(As(t)),arguments.length>1?arguments[1]:void 0)}});var Oo=Array.isArray||function(t){return"Array"==S(t)},Eo=x([].reverse),To=[1,2];zr({target:"Array",proto:!0,forced:String(To)===String(To.reverse())},{reverse:function(){return Oo(this)&&(this.length=this.length),Eo(this)}});
7
7
  /*! *****************************************************************************
8
8
  Copyright (c) Microsoft Corporation.
9
9
 
@@ -310,7 +310,7 @@ function(t){var n=function(t){for(var n=t.length,i=new Uint8Array(n),r=0;r<n;r++
310
310
  * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
311
311
  * ====================================================================
312
312
  */
313
- function(){function t(){return(Y.canvg?Promise.resolve(Y.canvg):import("./p-22d06238.js")).catch((function(t){return Promise.reject(new Error("Could not load canvg: "+t))})).then((function(t){return t.default?t.default:t}))}qt.API.addSvgAsImage=function(n,i,r,e,s,o,a,u){if(isNaN(i)||isNaN(r))throw X.error("jsPDF.addSvgAsImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");if(isNaN(e)||isNaN(s))throw X.error("jsPDF.addSvgAsImage: Invalid measurements",arguments),new Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage");var f=document.createElement("canvas");f.width=e,f.height=s;var c=f.getContext("2d");c.fillStyle="#fff",c.fillRect(0,0,f.width,f.height);var h={ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0},l=this;return t().then((function(t){return t.fromString(c,n,h)}),(function(){return Promise.reject(new Error("Could not load canvg."))})).then((function(t){return t.render(h)})).then((function(){l.addImage(f.toDataURL("image/jpeg",1),i,r,e,s,a,u)}))}}(),qt.API.putTotalPages=function(t){var n,i=0;parseInt(this.internal.getFont().id.substr(1),10)<15?(n=new RegExp(t,"g"),i=this.internal.getNumberOfPages()):(n=new RegExp(this.pdfEscape16(t,this.internal.getFont()),"g"),i=this.pdfEscape16(this.internal.getNumberOfPages()+"",this.internal.getFont()));for(var r=1;r<=this.internal.getNumberOfPages();r++)for(var e=0;e<this.internal.pages[r].length;e++)this.internal.pages[r][e]=this.internal.pages[r][e].replace(n,i);return this},qt.API.viewerPreferences=function(t,n){var i;t=t||{},n=n||!1;var r,e,s,o={HideToolbar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideMenubar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideWindowUI:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},FitWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},CenterWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},DisplayDocTitle:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.4},NonFullScreenPageMode:{defaultValue:"UseNone",value:"UseNone",type:"name",explicitSet:!1,valueSet:["UseNone","UseOutlines","UseThumbs","UseOC"],pdfVersion:1.3},Direction:{defaultValue:"L2R",value:"L2R",type:"name",explicitSet:!1,valueSet:["L2R","R2L"],pdfVersion:1.3},ViewArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},ViewClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintScaling:{defaultValue:"AppDefault",value:"AppDefault",type:"name",explicitSet:!1,valueSet:["AppDefault","None"],pdfVersion:1.6},Duplex:{defaultValue:"",value:"none",type:"name",explicitSet:!1,valueSet:["Simplex","DuplexFlipShortEdge","DuplexFlipLongEdge","none"],pdfVersion:1.7},PickTrayByPDFSize:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.7},PrintPageRange:{defaultValue:"",value:"",type:"array",explicitSet:!1,valueSet:null,pdfVersion:1.7},NumCopies:{defaultValue:1,value:1,type:"integer",explicitSet:!1,valueSet:null,pdfVersion:1.7}},a=Object.keys(o),f=[],c=0,h=0,l=0;function v(t,n){var i,r=!1;for(i=0;i<t.length;i+=1)t[i]===n&&(r=!0);return r}if(void 0===this.internal.viewerpreferences&&(this.internal.viewerpreferences={},this.internal.viewerpreferences.configuration=JSON.parse(JSON.stringify(o)),this.internal.viewerpreferences.isSubscribed=!1),i=this.internal.viewerpreferences.configuration,"reset"===t||!0===n){var d=a.length;for(l=0;l<d;l+=1)i[a[l]].value=i[a[l]].defaultValue,i[a[l]].explicitSet=!1}if("object"===u(t))for(e in t)if(s=t[e],v(a,e)&&void 0!==s){if("boolean"===i[e].type&&"boolean"==typeof s)i[e].value=s;else if("name"===i[e].type&&v(i[e].valueSet,s))i[e].value=s;else if("integer"===i[e].type&&Number.isInteger(s))i[e].value=s;else if("array"===i[e].type){for(c=0;c<s.length;c+=1)if(r=!0,1===s[c].length&&"number"==typeof s[c][0])f.push(String(s[c]-1));else if(s[c].length>1){for(h=0;h<s[c].length;h+=1)"number"!=typeof s[c][h]&&(r=!1);!0===r&&f.push([s[c][0]-1,s[c][1]-1].join(" "))}i[e].value="["+f.join(" ")+"]"}else i[e].value=i[e].defaultValue;i[e].explicitSet=!0}return!1===this.internal.viewerpreferences.isSubscribed&&(this.internal.events.subscribe("putCatalog",(function(){var t,n=[];for(t in i)!0===i[t].explicitSet&&n.push("name"===i[t].type?"/"+t+" /"+i[t].value:"/"+t+" "+i[t].value);0!==n.length&&this.internal.write("/ViewerPreferences\n<<\n"+n.join("\n")+"\n>>")})),this.internal.viewerpreferences.isSubscribed=!0),this.internal.viewerpreferences.configuration=i,this
313
+ function(){function t(){return(Y.canvg?Promise.resolve(Y.canvg):import("./p-6eb4ba8f.js")).catch((function(t){return Promise.reject(new Error("Could not load canvg: "+t))})).then((function(t){return t.default?t.default:t}))}qt.API.addSvgAsImage=function(n,i,r,e,s,o,a,u){if(isNaN(i)||isNaN(r))throw X.error("jsPDF.addSvgAsImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");if(isNaN(e)||isNaN(s))throw X.error("jsPDF.addSvgAsImage: Invalid measurements",arguments),new Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage");var f=document.createElement("canvas");f.width=e,f.height=s;var c=f.getContext("2d");c.fillStyle="#fff",c.fillRect(0,0,f.width,f.height);var h={ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0},l=this;return t().then((function(t){return t.fromString(c,n,h)}),(function(){return Promise.reject(new Error("Could not load canvg."))})).then((function(t){return t.render(h)})).then((function(){l.addImage(f.toDataURL("image/jpeg",1),i,r,e,s,a,u)}))}}(),qt.API.putTotalPages=function(t){var n,i=0;parseInt(this.internal.getFont().id.substr(1),10)<15?(n=new RegExp(t,"g"),i=this.internal.getNumberOfPages()):(n=new RegExp(this.pdfEscape16(t,this.internal.getFont()),"g"),i=this.pdfEscape16(this.internal.getNumberOfPages()+"",this.internal.getFont()));for(var r=1;r<=this.internal.getNumberOfPages();r++)for(var e=0;e<this.internal.pages[r].length;e++)this.internal.pages[r][e]=this.internal.pages[r][e].replace(n,i);return this},qt.API.viewerPreferences=function(t,n){var i;t=t||{},n=n||!1;var r,e,s,o={HideToolbar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideMenubar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideWindowUI:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},FitWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},CenterWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},DisplayDocTitle:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.4},NonFullScreenPageMode:{defaultValue:"UseNone",value:"UseNone",type:"name",explicitSet:!1,valueSet:["UseNone","UseOutlines","UseThumbs","UseOC"],pdfVersion:1.3},Direction:{defaultValue:"L2R",value:"L2R",type:"name",explicitSet:!1,valueSet:["L2R","R2L"],pdfVersion:1.3},ViewArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},ViewClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintScaling:{defaultValue:"AppDefault",value:"AppDefault",type:"name",explicitSet:!1,valueSet:["AppDefault","None"],pdfVersion:1.6},Duplex:{defaultValue:"",value:"none",type:"name",explicitSet:!1,valueSet:["Simplex","DuplexFlipShortEdge","DuplexFlipLongEdge","none"],pdfVersion:1.7},PickTrayByPDFSize:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.7},PrintPageRange:{defaultValue:"",value:"",type:"array",explicitSet:!1,valueSet:null,pdfVersion:1.7},NumCopies:{defaultValue:1,value:1,type:"integer",explicitSet:!1,valueSet:null,pdfVersion:1.7}},a=Object.keys(o),f=[],c=0,h=0,l=0;function v(t,n){var i,r=!1;for(i=0;i<t.length;i+=1)t[i]===n&&(r=!0);return r}if(void 0===this.internal.viewerpreferences&&(this.internal.viewerpreferences={},this.internal.viewerpreferences.configuration=JSON.parse(JSON.stringify(o)),this.internal.viewerpreferences.isSubscribed=!1),i=this.internal.viewerpreferences.configuration,"reset"===t||!0===n){var d=a.length;for(l=0;l<d;l+=1)i[a[l]].value=i[a[l]].defaultValue,i[a[l]].explicitSet=!1}if("object"===u(t))for(e in t)if(s=t[e],v(a,e)&&void 0!==s){if("boolean"===i[e].type&&"boolean"==typeof s)i[e].value=s;else if("name"===i[e].type&&v(i[e].valueSet,s))i[e].value=s;else if("integer"===i[e].type&&Number.isInteger(s))i[e].value=s;else if("array"===i[e].type){for(c=0;c<s.length;c+=1)if(r=!0,1===s[c].length&&"number"==typeof s[c][0])f.push(String(s[c]-1));else if(s[c].length>1){for(h=0;h<s[c].length;h+=1)"number"!=typeof s[c][h]&&(r=!1);!0===r&&f.push([s[c][0]-1,s[c][1]-1].join(" "))}i[e].value="["+f.join(" ")+"]"}else i[e].value=i[e].defaultValue;i[e].explicitSet=!0}return!1===this.internal.viewerpreferences.isSubscribed&&(this.internal.events.subscribe("putCatalog",(function(){var t,n=[];for(t in i)!0===i[t].explicitSet&&n.push("name"===i[t].type?"/"+t+" /"+i[t].value:"/"+t+" "+i[t].value);0!==n.length&&this.internal.write("/ViewerPreferences\n<<\n"+n.join("\n")+"\n>>")})),this.internal.viewerpreferences.isSubscribed=!0),this.internal.viewerpreferences.configuration=i,this
314
314
  /** ====================================================================
315
315
  * @license
316
316
  * jsPDF XMP metadata plugin
@@ -439,7 +439,7 @@ class di{PDFCreator;labelFormats;addLabelsToDoc(t,n,i,r,e){return new Promise((s
439
439
  * See the License for the specific language governing permissions and
440
440
  * limitations under the License.
441
441
  */
442
- const wi="|";async function mi(t,n=!0,i=!1,s=!1){const o=[];return Object.keys(t).forEach((a=>{var u;const f=t[a];o.push(async function(t,n,i=!0,s=!1){const o=await e(n,t,[],!1),a={},u={};t.fields.forEach((t=>{a[t.name]=t.type,u[t.name]=t.domain}));const f={},c=await async function(t,n,i){var e,s,o,a,u,f;let c={type:"unsupported",format:void 0};return t.popupEnabled&&(t.popupTemplate.fieldInfos.forEach((t=>{t.format&&(i[t.fieldName]=t.format)})),n&&"fields"===(null===(s=null===(e=t.popupTemplate)||void 0===e?void 0:e.content[0])||void 0===s?void 0:s.type)?(c=gi(t.popupTemplate.fieldInfos),0===c.format.length&&(c=t.popupTemplate.title&&"string"==typeof t.popupTemplate.title?{type:"pattern",format:t.popupTemplate.title}:gi(t.popupTemplate.fieldInfos,!0))):n&&"text"===(null===(a=null===(o=t.popupTemplate)||void 0===o?void 0:o.content[0])||void 0===a?void 0:a.type)?c={type:"pattern",format:Li(t.popupTemplate.content[0].text)}:n&&"expression"===(null===(f=null===(u=t.popupTemplate)||void 0===u?void 0:u.content[0])||void 0===f?void 0:f.type)&&(c=await async function(t){const[n]=await r(["esri/arcade"]),i=await n.createArcadeExecutor(t.expression,{variables:[{name:"$feature",type:"feature"},{name:"$layer",type:"featureSet"},{name:"$datastore",type:"featureSetCollection"},{name:"$map",type:"featureSetCollection"}]});return Promise.resolve({type:"executor",format:i})}(t.popupTemplate.content[0].expressionInfo))),Promise.resolve(c)}(t,i,f),h="unsupported"===c.type?await async function(t,n,i,e=!1){const[s]=await r(["esri/intl"]),o=t.map((t=>Object.keys(t.attributes).map((r=>ki(t.attributes[r],n[r],i[r],null,s)))));if(e){const n=[];Object.keys(t[0].attributes).forEach((t=>{n.push(t)})),o.unshift(n)}return Promise.resolve(o)}(o,a,u,s):"pattern"==c.type?await async function(t,n,i,e,s,o=!1){const[a]=await r(["esri/intl"]),u=function(t){const n=[];let i=0;for(;i<t.length;){const r=t.indexOf("{",i);if(r<0)break;const e=t.indexOf("}",r);if(e<0)break;const s=t.substring(r,e+1);n.push(s),i=e+1}const r=function(t){var n;return null!==(n=t.match(/\{expression\/\w+\}/g))&&void 0!==n?n:[]}(t);return n.filter((t=>r.indexOf(t)<0))}(s),f=u.map((t=>t.substring(1,t.length-1))),c=await Promise.all(t.map((async t=>{let r=s;f.forEach(((s,o)=>{const f=ki(t.attributes[s],n[s],i[s],e[s],a);r=r.replace(u[o],f)}));let o=r.split(wi);return o=o.map((t=>Li(t))),o})));return o&&c.unshift(f),Promise.resolve(c)}(o,a,u,f,c.format,s):await async function(t,n){const i=(await Promise.all(t.map((async t=>n.executeAsync({$feature:t}))))).map((t=>Li(t.text).split(wi)));return Promise.resolve(i)}(o,c.format);return Promise.resolve(h)}((null===(u=f.layerView)||void 0===u?void 0:u.layer)||f.layer,f.ids,n,i)),s&&o.push(Promise.resolve([[a]]))})),(await Promise.all(o)).reduce(((t,n)=>t.concat(n)),[])}async function bi(t,n,i=!1,r=!1){let e=await mi(t,n,r,!0);e=i?Ni(e):e;const s=Object.keys(t);let o=[];return e.forEach((n=>{const i=n[0];s.indexOf(i)<0?o.push(n):(
442
+ const wi="|";async function mi(t,n=!0,i=!1,s=!1){const o=[];return Object.keys(t).forEach((a=>{var u;const f=t[a];o.push(async function(t,n,i=!0,s=!1){const o=await e(n,t,[],!1),a={},u={},f={};t.fields.forEach((t=>{const n=t.name.toLowerCase();a[n]=t.name,f[n]=t.domain,u[n]=t.type}));const c={},h=await async function(t,n,i){var e,s,o,a,u,f;let c={type:"unsupported",format:void 0};return t.popupEnabled&&(t.popupTemplate.fieldInfos.forEach((t=>{t.format&&(i[t.fieldName.toLowerCase()]=t.format)})),n&&"fields"===(null===(s=null===(e=t.popupTemplate)||void 0===e?void 0:e.content[0])||void 0===s?void 0:s.type)?(c=gi(t.popupTemplate.fieldInfos),0===c.format.length&&(c=t.popupTemplate.title&&"string"==typeof t.popupTemplate.title?{type:"pattern",format:t.popupTemplate.title}:gi(t.popupTemplate.fieldInfos,!0))):n&&"text"===(null===(a=null===(o=t.popupTemplate)||void 0===o?void 0:o.content[0])||void 0===a?void 0:a.type)?c={type:"pattern",format:Li(t.popupTemplate.content[0].text)}:n&&"expression"===(null===(f=null===(u=t.popupTemplate)||void 0===u?void 0:u.content[0])||void 0===f?void 0:f.type)&&(c=await async function(t){const[n]=await r(["esri/arcade"]),i=await n.createArcadeExecutor(t.expression,{variables:[{name:"$feature",type:"feature"},{name:"$layer",type:"featureSet"},{name:"$datastore",type:"featureSetCollection"},{name:"$map",type:"featureSetCollection"}]});return Promise.resolve({type:"executor",format:i})}(t.popupTemplate.content[0].expressionInfo))),Promise.resolve(c)}(t,i,c),l="unsupported"===h.type?await async function(t,n,i,e=!1){const[s]=await r(["esri/intl"]),o=t.map((t=>Object.keys(t.attributes).map((r=>{const e=r.toLowerCase();return ki(t.attributes[r],n[e],i[e],null,s)}))));if(e){const n=[];Object.keys(t[0].attributes).forEach((t=>{n.push(t)})),o.unshift(n)}return Promise.resolve(o)}(o,u,f,s):"pattern"==h.type?await async function(t,n,i,e,s,o,a=!1){const[u]=await r(["esri/intl"]),f=function(t){const n=[];let i=0;for(;i<t.length;){const r=t.indexOf("{",i);if(r<0)break;const e=t.indexOf("}",r);if(e<0)break;const s=t.substring(r,e+1);n.push(s),i=e+1}const r=function(t){var n;return null!==(n=t.match(/\{expression\/\w+\}/g))&&void 0!==n?n:[]}(t);return n.filter((t=>r.indexOf(t)<0))}(o),c=f.map((t=>t.substring(1,t.length-1))),h=await Promise.all(t.map((async t=>{let r=o;c.forEach(((o,a)=>{const c=o.toLowerCase(),h=ki(t.attributes[n[c]],i[c],e[c],s[c],u);r=r.replace(f[a],h)}));let a=r.split(wi);return a=a.map((t=>Li(t))),a})));return a&&h.unshift(c),Promise.resolve(h)}(o,a,u,f,c,h.format,s):await async function(t,n){const i=(await Promise.all(t.map((async t=>n.executeAsync({$feature:t}))))).map((t=>Li(t.text).split(wi)));return Promise.resolve(i)}(o,h.format);return Promise.resolve(l)}((null===(u=f.layerView)||void 0===u?void 0:u.layer)||f.layer,f.ids,n,i)),s&&o.push(Promise.resolve([[a]]))})),(await Promise.all(o)).reduce(((t,n)=>t.concat(n)),[])}async function bi(t,n,i=!1,r=!1){let e=await mi(t,n,r,!0);e=i?Ni(e):e;const s=Object.keys(t);let o=[];return e.forEach((n=>{const i=n[0];s.indexOf(i)<0?o.push(n):(
443
443
  /** @license
444
444
  * Copyright 2022 Esri
445
445
  *
@@ -0,0 +1,6 @@
1
+ /*!
2
+ * Copyright 2022 Esri
3
+ * Licensed under the Apache License, Version 2.0
4
+ * http://www.apache.org/licenses/LICENSE-2.0
5
+ */
6
+ import{r as t,c as i,h as s,H as e,g as o}from"./p-9310b882.js";import{l as a}from"./p-0266ca81.js";import{g as n}from"./p-7f9642d5.js";import"./p-e1a4994d.js";const l=class{constructor(s){t(this,s),this.closeEdit=i(this,"closeEdit",7),this._shouldClose=!1,this.graphics=void 0,this.mapView=void 0,this.open=!1,this.graphicIndex=0,this._translations=void 0}graphicIndexWatchHandler(){this._initEditorWidget()}graphicsWatchHandler(){this._initEditorWidget()}mapViewWatchHandler(){this._initEditorWidget()}async componentWillLoad(){await this._initModules(),await this._getTranslations()}async componentWillRender(){var t,i;const s=document.getElementsByTagName("layer-table");if(1===s.length){const t=s[0];this.graphics=await t.getSelectedGraphics()}(null===(t=this.graphics)||void 0===t?void 0:t.length)>0&&(null===(i=this.graphics[0])||void 0===i?void 0:i.layer)&&(this._layer=this.graphics[0].layer)}render(){var t;const i=!((null===(t=this.graphics)||void 0===t?void 0:t.length)>0&&this.graphics[0]&&this.graphics[0].layer.editingEnabled);return s(e,null,s("div",{class:"position-relative"},i?s("calcite-notice",{kind:"warning",open:!0,slot:"content-top",width:"full"},s("div",{slot:"message"},this._translations.enableEditing)):void 0,s("div",{slot:"content"},s("div",{id:"feature-form",ref:t=>this._editContainer=t}))))}async _initModules(){const[t,i]=await a(["esri/widgets/Editor","esri/core/reactiveUtils"]);this.Editor=t,this.reactiveUtils=i}_initEditorWidget(){if(this.mapView&&this.graphics&&this.graphics.length>0&&this.graphics[0]){this._editor&&this._editor.destroy();const t=document.createElement("div");this._editor=new this.Editor({allowedWorkflows:"update",view:this.mapView,visibleElements:{snappingControls:!1,sketchTooltipControls:!1},container:t}),this._editHandle&&this._attachmentHandle&&this._activeWorkflowHandle&&(this._editHandle.remove(),this._attachmentHandle.remove(),this._activeWorkflowHandle.remove()),this._attachmentHandle=this.reactiveUtils.when((()=>"adding-attachment"===this._editor.viewModel.state||"editing-attachment"===this._editor.viewModel.state),(()=>{this._shouldClose=!1})),this._editHandle=this.reactiveUtils.when((()=>"ready"===this._editor.viewModel.state),(()=>{this._shouldClose&&(this.closeEdit.emit(),this._shouldClose=!1),this.graphicIndex>-1&&this.graphics.length>0&&this.open&&!this._shouldClose&&(this._editor.startUpdateWorkflowAtFeatureEdit(this.graphics[this.graphicIndex]),this._shouldClose=!0)})),this._activeWorkflowHandle=this.reactiveUtils.watch((()=>{var t;return null===(t=this._editor.viewModel.activeWorkflow)||void 0===t?void 0:t.activeWorkflow}),(t=>{"update-table-record"!==(null==t?void 0:t.type)&&"create-features"!==(null==t?void 0:t.type)||(this._shouldClose=!1)})),this._editContainer.appendChild(t)}}async _getTranslations(){const t=await n(this.el);this._translations=t[0]}get el(){return o(this)}static get watchers(){return{graphicIndex:["graphicIndexWatchHandler"],graphics:["graphicsWatchHandler"],mapView:["mapViewWatchHandler"]}}};l.style=":host{display:block}.padding-bottom-1{padding-bottom:1rem}.font-bold{font-weight:var(--calcite-font-weight-bold)}.font-500{font-weight:var(--calcite-font-weight-medium)}.font-italic{font-style:italic}#feature-form{--calcite-ui-background:none;padding-top:0px}.padding-sides-bottom-1{padding:0 1rem 1rem 1rem}.position-relative{position:relative}.esri-editor__prompt--danger{position:relative !important;width:100% !important;background-color:var(--calcite-ui-foreground-1) !important}";const h=class{constructor(s){t(this,s),this.selectionChanged=i(this,"selectionChanged",7),this.graphics=void 0,this.isLoading=!1,this.mapView=void 0,this.zoomAndScrollToSelected=void 0,this._alertOpen=!1,this._count="",this._editRecordOpen=!1,this._translations=void 0}async graphicsWatchHandler(){var t;if(this.graphics.length>0){const i=null===(t=this.graphics[0])||void 0===t?void 0:t.layer;this._editEnabled=i.editingEnabled&&i.capabilities.operations.supportsUpdate,this._features.open({features:this.graphics})}else this._features.clear(),this._features.close()}async mapViewWatchHandler(){await this.mapView.when((async()=>{await this._initFeaturesWidget()}))}async getSelectedFeature(){return this._features.selectedFeature}async closeEdit(){this._editRecordOpen=!1}async componentWillLoad(){await this._initModules(),await this._getTranslations()}render(){var t;const i=this.isLoading||this._editRecordOpen?"display-none":"position-absolute",o=!this.isLoading&&this._editRecordOpen?"position-absolute":"display-none",a=!this.isLoading&&this._editRecordOpen?"display-none":"";return s(e,null,s("calcite-shell",null,s("calcite-loader",{class:this.isLoading?"":"display-none",label:this._translations.fetchingData}),s("div",{class:"esri-widget "+i,id:"features-node"}),s("div",{class:`${a} display-flex padding-1-2 button-container`,slot:"footer"},s("div",{class:"min-width-100"},s("calcite-button",{appearance:"outline",id:"solutions-back",onClick:()=>this._back(),width:"full"},this._translations.back),s("calcite-tooltip",{label:"",placement:"top","reference-element":"solutions-back"},s("span",null,this._translations.back))),s("div",null,this._getCount()),s("div",{class:"min-width-100"},s("calcite-button",{appearance:"outline",id:"solutions-next",onClick:()=>this._next(),width:"full"},this._translations.next),s("calcite-tooltip",{label:"",placement:"top","reference-element":"solutions-next"},s("span",null,this._translations.next)))),s("div",{class:`${a} edit-btn edit-btn-position`},s("calcite-button",{appearance:"outline","icon-start":"pencil",id:"solutions-edit",onClick:()=>this._openEditRecord()},this._translations.edit),s("calcite-tooltip",{label:"",placement:"bottom","reference-element":"solutions-edit"},s("span",null,this._translations.edit))),s("edit-card",{class:o,graphicIndex:null===(t=this._features)||void 0===t?void 0:t.selectedFeatureIndex,graphics:this.graphics,mapView:this.mapView,open:this._editRecordOpen}),s("calcite-alert",{icon:"layer-broken",kind:"warning",label:"",onCalciteAlertClose:()=>this._alertClosed(),open:this._alertOpen,placement:"top"},s("div",{slot:"title"},this._translations.editDisabled),s("div",{slot:"message"},this._translations.enableEditing))))}async _initModules(){const[t,i]=await a(["esri/widgets/Features","esri/core/reactiveUtils"]);this.Features=t,this.reactiveUtils=i}async _initFeaturesWidget(){this._features?this._features.view=this.mapView:(this._features=new this.Features({view:this.mapView,container:"features-node",visibleElements:{actionBar:!1,closeButton:!1,heading:!0}}),this.zoomAndScrollToSelected&&this.reactiveUtils.watch((()=>this._features.selectedFeatureIndex),(t=>{t>-1&&this.selectionChanged.emit(this._features.selectedFeature)})))}_alertClosed(){this._alertOpen=!1}_editRecordClosed(){this._editRecordOpen=!1}_openEditRecord(){this._editEnabled?this._editRecordOpen=!0:this._alertOpen=!0}_back(){this._features.previous(),this._count=this._getCount()}_next(){this._features.next(),this._count=this._getCount()}_getCount(){var t,i,s;const e=((null===(t=this._features)||void 0===t?void 0:t.viewModel.selectedFeatureIndex)+1).toString(),o=null===(s=null===(i=this._features)||void 0===i?void 0:i.features)||void 0===s?void 0:s.length.toString();return this._translations.indexOfTotal.replace("{{index}}",e).replace("{{total}}",o)}async _getTranslations(){const t=await n(this.el);this._translations=t[0]}get el(){return o(this)}static get watchers(){return{graphics:["graphicsWatchHandler"],mapView:["mapViewWatchHandler"]}}};h.style=':host{display:block;--calcite-label-margin-bottom:0}table{border-collapse:collapse;width:100%}th,td{text-align:left;padding:8px}tr:nth-child(odd){background:var(--calcite-ui-foreground-2)}.bottom-border{padding-bottom:0.5rem;border-bottom:1px solid var(--calcite-ui-border-1)}.padding-1-2{padding:0.5rem}.padding-top-1-2{padding-top:0.5rem}.font-color-3{color:var(--calcite-ui-text-3)}.display-none{display:none}.display-flex{display:flex}.position-absolute{position:absolute;top:0;right:0;bottom:0;left:0;overflow:auto}.edit-btn{z-index:999;position:absolute}.edit-btn-position{right:0.5rem;top:0.5rem}html[dir="rtl"] .edit-btn-position{left:0}.esri-features__footer{display:none !important}.button-container{justify-content:space-between;align-items:center}.min-width-100{min-width:100px}';export{l as edit_card,h as info_card}
@@ -3,4 +3,4 @@
3
3
  * Licensed under the Apache License, Version 2.0
4
4
  * http://www.apache.org/licenses/LICENSE-2.0
5
5
  */
6
- import{r as i,c as t,h as s,H as e,g as a}from"./p-9310b882.js";import{l}from"./p-0266ca81.js";import{g as h,h as n,d as o,e as r,f as d,i as c,j as p,k as g}from"./p-f8dd2784.js";import{c as b,e as u,f as v}from"./p-868df4a0.js";import{s as y}from"./p-3445a8c6.js";import{a as m,g as f}from"./p-7f9642d5.js";import{d as w,a as S}from"./p-a26dc184.js";import"./p-2c0dc7b1.js";import"./p-e1a4994d.js";const _=class{constructor(s){i(this,s),this.selectionSetChange=t(this,"selectionSetChange",7),this._selectedIds=[],this._selectionLabel="",this._graphics=[],this._featuresCollection={},this.bufferColor=[227,139,79,.8],this.bufferOutlineColor=[255,255,255],this.customLabelEnabled=void 0,this.enabledLayerIds=[],this.defaultBufferDistance=void 0,this.defaultBufferUnit=void 0,this.geometries=[],this.isUpdate=!1,this.layerViews=[],this.mapView=void 0,this.noResultText=void 0,this.searchConfiguration=void 0,this.selectionSet=void 0,this.selectionLayerIds=[],this.selectLayerView=void 0,this.sketchLineSymbol=void 0,this.sketchPointSymbol=void 0,this.sketchPolygonSymbol=void 0,this._numSelected=0,this._searchDistanceEnabled=!1,this._searchTerm=void 0,this._selectionLoading=!1,this._translations=void 0,this._useLayerFeaturesEnabled=!1}async watchGeometriesHandler(i,t){if(i!==t){const t=0===i.length;if(await this._clearResults(t,t),i.length>0)return this._highlightWithOIDsOrGeoms()}}async watchSearchConfigurationHandler(i,t){JSON.stringify(i)!==JSON.stringify(t)&&this._initSearchWidget()}async clearSelection(){return this._clearResults(!0,!0)}async getSelection(){return/\S+/gm.test(this._selectionLabel)||this._updateLabel(),{id:this.isUpdate?this.selectionSet.id:Date.now(),searchResult:this._searchResult,buffer:this._bufferGeometry,distance:this._bufferTools.distance,download:!0,unit:this._bufferTools.unit,label:this._selectionLabel,selectedIds:this._selectedIds,layerView:this.selectLayerView,geometries:this.geometries,graphics:this._graphics,selectLayers:this.layerViews,skipGeomOIDs:this._skipGeomOIDs,searchDistanceEnabled:this._searchDistanceEnabled,workflowType:this._workflowType,useLayerFeaturesEnabled:this._useLayerFeaturesEnabled,sketchGraphic:this._sketchGraphic}}searchConfigurationChangeChanged(i){this.searchConfiguration=i.detail}distanceChanged(i){this._distanceChanged(i.detail)}unitChanged(i){i.detail.newValue!==i.detail.oldValue&&(this._unit=i.detail.newValue,this._updateLabel())}async componentWillLoad(){await this._getTranslations(),await this._initModules()}async componentDidLoad(){return this._init()}render(){return s(e,null,this._getMapLayerPicker(),s("div",{class:"border-bottom"}),s("div",{class:"padding-top-sides-1"},s("div",{class:"search-widget",ref:i=>{this._searchElement=i}}),s("div",{class:"padding-top-1"},s("map-draw-tools",{active:!0,editGraphicsEnabled:!this._useLayerFeaturesEnabled,graphics:this._graphics,mapView:this.mapView,onSketchGraphicsChange:i=>this._sketchGraphicsChanged(i),pointSymbol:this.sketchPointSymbol,polygonSymbol:this.sketchPolygonSymbol,polylineSymbol:this.sketchLineSymbol,ref:i=>{this._drawTools=i}})),this._getBufferOptions(),this._getUseLayerFeaturesOptions(),this._getNumSelected()),s("div",{class:"border-bottom"}),this._getNameInput())}_getBufferOptions(){var i,t;const e=this._searchDistanceEnabled?"search-distance":"div-not-visible",a="number"==typeof(null===(i=this.selectionSet)||void 0===i?void 0:i.distance)?this.selectionSet.distance:this.defaultBufferDistance;return s("div",null,s("div",{class:"padding-top-1 display-flex"},s("calcite-label",{class:"label-margin-0 w-100",layout:"inline-space-between"},s("div",{class:"tooltip-container"},this._translations.searchDistance,s("calcite-icon",{class:"padding-start-1-2 icon",icon:"question",id:"search-distance-icon",scale:"s"}))),s("calcite-popover",{closable:!0,label:"",referenceElement:"search-distance-icon"},s("span",{class:"tooltip-message"},this._translations.useSearchDistanceTootip)),s("calcite-switch",{checked:this._searchDistanceEnabled,onCalciteSwitchChange:()=>this._searchDistanceEnabled=!this._searchDistanceEnabled})),s("div",{class:e},s("buffer-tools",{disabled:!this._searchDistanceEnabled,distance:a,geometries:this.geometries,onBufferComplete:i=>this._bufferComplete(i),ref:i=>this._bufferTools=i,unit:(null===(t=this.selectionSet)||void 0===t?void 0:t.unit)||this.defaultBufferUnit})))}_getUseLayerFeaturesOptions(){const i=this._useLayerFeaturesEnabled?"div-visible":"div-not-visible";return s("div",null,s("div",{class:"padding-top-1 display-flex"},s("calcite-label",{class:"label-margin-0 w-100",layout:"inline-space-between"},s("div",{class:"tooltip-container"},this._translations.useLayerFeatures,s("calcite-icon",{class:"padding-start-1-2 icon",icon:"question",id:"use-layer-features-icon",scale:"s"}))),s("calcite-popover",{closable:!0,label:"",referenceElement:"use-layer-features-icon"},s("span",{class:"tooltip-message"},this._translations.useLayerFeaturesTooltip)),s("calcite-switch",{checked:this._useLayerFeaturesEnabled,onCalciteSwitchChange:()=>{this._useLayerFeaturesEnabledChanged()}})),s("div",{class:i+" padding-top-1"},s("map-layer-picker",{enabledLayerIds:this.selectionLayerIds,mapView:this.mapView,onLayerSelectionChange:i=>{this._layerSelectionChange(i)},selectedIds:this.layerViews.map((i=>i.layer.id))})))}_getNumSelected(){const i=m(this.el),t=i&&"en"===i?`${this._translations.selectionLoading}...`:this._translations.selectionLoading;return s("div",{class:"padding-top-1 padding-bottom-1",style:{"align-items":"end",display:"flex"}},this._selectionLoading?s("div",null,s("calcite-loader",{class:"info-blue",inline:!0,label:t,scale:"m",type:"indeterminate"})):s("calcite-icon",{class:"info-blue padding-end-1-2",icon:"feature-layer",scale:"s"}),s("calcite-input-message",{class:"info-blue",scale:"m"},this._selectionLoading?t:this.noResultText&&0===this._numSelected?this.noResultText:this._translations.selectedFeatures.replace("{{n}}",this._numSelected.toString())))}_getNameInput(){return s("div",{class:"padding-sides-1 padding-top-1 "+(this.customLabelEnabled?"":"display-none")},s("calcite-label",{class:"font-bold"},this._translations.listName,s("calcite-input",{onInput:()=>{this._selectionLabel=this._labelName.value},placeholder:this._translations.listNamePlaceholder,ref:i=>{this._labelName=i},value:this._selectionLabel||""})))}_getMapLayerPicker(){return s("div",{class:"display-flex padding-sides-1 padding-bottom-1"},s("calcite-label",{class:"font-bold width-full label-margin-0"},this._translations.inputLayer,s("map-layer-picker",{enabledLayerIds:this.enabledLayerIds,mapView:this.mapView,onLayerSelectionChange:i=>this._inputLayerSelectionChange(i),selectedIds:this.selectLayerView?[this.selectLayerView.layer.id]:this.selectionSet?[this.selectionSet.layerView.layer.id]:[]})))}async _initModules(){const[i,t,s,e,a]=await l(["esri/layers/GraphicsLayer","esri/Graphic","esri/widgets/Search","esri/geometry/geometryEngine","esri/layers/FeatureLayer"]);this.GraphicsLayer=i,this.Graphic=t,this.Search=s,this._geometryEngine=e,this.FeatureLayer=a}async _init(){this._initGraphicsLayer(),await this._initSelectionSet(),this._initSearchWidget()}async _initSelectionSet(){var i,t,s,e;this.selectionSet&&(this._searchTerm=null===(i=this.selectionSet.searchResult)||void 0===i?void 0:i.name,this._searchResult=this.selectionSet.searchResult,this._selectLayers=this.selectionSet.selectLayers,this._selectedIds=this.selectionSet.selectedIds,this._skipGeomOIDs=this.selectionSet.skipGeomOIDs,this._searchDistanceEnabled=this.selectionSet.searchDistanceEnabled,this._useLayerFeaturesEnabled=this.selectionSet.useLayerFeaturesEnabled,this._distance=this.selectionSet.searchDistanceEnabled?this.selectionSet.distance:0,this._unit=this.selectionSet.unit,this._workflowType=this.selectionSet.workflowType,this.selectLayerView=this.selectionSet.layerView,this._sketchGraphic=this.selectionSet.sketchGraphic,this.geometries=[...(null===(t=this.selectionSet)||void 0===t?void 0:t.geometries)||[]],this._graphics=this.geometries.map((i=>new this.Graphic({geometry:i,symbol:"point"===i.type?this.sketchPointSymbol:"polyline"===i.type?this.sketchLineSymbol:this.sketchPolygonSymbol}))),this._selectionLabel=null===(s=this.selectionSet)||void 0===s?void 0:s.label,this._useLayerFeaturesEnabled||null===(e=this._drawTools)||void 0===e||e.updateGraphics(),await h(this.selectionSet.selectedIds,this.selectionSet.layerView,this.mapView,!1))}_initSearchWidget(){if(this.mapView&&this._searchElement){const i=this._getSearchConfig(this.searchConfiguration,this.mapView),t=Object.assign({view:this.mapView,container:this._searchElement,searchTerm:this._searchTerm},i);this._searchWidget=new this.Search(t),this._searchWidget.popupEnabled=!1,this._searchWidget.resultGraphicEnabled=!1,this._searchWidget.on("search-clear",(()=>{const i=this._searchClearLabel();this._clearResults(!1,i)})),this._searchWidget.on("select-result",(i=>{var t,s;if(i.result){this._searchResult=i.result;const e=(null===(s=null===(t=i.source)||void 0===t?void 0:t.layer)||void 0===s?void 0:s.id)&&i.source.layer.id===this.selectLayerView.layer.id,a=e?[i.result.feature.getObjectId()]:void 0;this._workflowType=b.SEARCH,this._updateLabel();const l=[i.result.feature];this._updateSelection(l,e,a),this._drawTools.graphics=l,this._searchWidget.resultGraphic.visible=!1}else{const i=this._searchClearLabel();this._clearResults(!1,i)}}))}}_searchClearLabel(){var i;return(null===(i=this._searchResult)||void 0===i?void 0:i.name)&&this._labelName.value.indexOf(this._searchResult.name)>-1}_getSearchConfig(i,t){const s=null==i?void 0:i.sources;return(null==s?void 0:s.length)>0?(i.includeDefaultSources=!1,s.forEach((i=>{var s,e;if(i.hasOwnProperty("layer")){const a=i,l=null===(s=a.layer)||void 0===s?void 0:s.id,h=l?t.map.findLayerById(l):null,n=null===(e=null==a?void 0:a.layer)||void 0===e?void 0:e.url;h?a.layer=h:n&&(a.layer=new this.FeatureLayer(n))}})),null==s||s.forEach((i=>{if(i.hasOwnProperty("locator")){const t=i;"ArcGIS World Geocoding Service"===(null==t?void 0:t.name)&&(t.outFields=t.outFields||["Addr_type","Match_addr","StAddr","City"],t.singleLineFieldName="SingleLine"),t.url=t.url,delete t.url}}))):i=Object.assign(Object.assign({},i),{includeDefaultSources:!0}),i}_initGraphicsLayer(){const i=this._translations.bufferLayer,t=this.mapView.map.layers.findIndex((t=>t.title===i));if(t>-1)this._bufferGraphicsLayer=this.mapView.map.layers.getItemAt(t);else{this._bufferGraphicsLayer=new this.GraphicsLayer({title:i,listMode:"hide"}),y.managedLayers.push(i);const t=this.mapView.map.layers.findIndex((i=>i.title===this._translations.sketchLayer));t>-1?this.mapView.map.layers.add(this._bufferGraphicsLayer,t):this.mapView.map.layers.add(this._bufferGraphicsLayer)}}async _sketchGraphicsChanged(i,t=!1){const s=i.detail.graphics;if(s.length>0&&s[0])if(t||(this._sketchGraphic=s[0]),this._workflowType=this._useLayerFeaturesEnabled?b.SELECT:b.SKETCH,this._workflowType===b.SKETCH&&this._drawTools.updateGraphics(),this._updateLabel(),this._clearSearchWidget(),this._useLayerFeaturesEnabled&&!t){const i=Array.isArray(s)?s.map((i=>i.geometry)):this.geometries;await this._selectLayerFeatures(i[0])}else{const t=s.reduce(((i,t)=>{var s;return(null===(s=null==t?void 0:t.layer)||void 0===s?void 0:s.objectIdField)?i.push(t.attributes[t.layer.objectIdField]):t.getObjectId&&i.push(t.getObjectId()),i}),[]),e=i.detail.useOIDs&&t.length>0;this._updateSelection(s,e,t),e&&await this._highlightFeatures(t)}else await this._clearResults(!0,!0)}async _highlightWithOIDsOrGeoms(){var i;return(null===(i=this._skipGeomOIDs)||void 0===i?void 0:i.length)>0?(this._selectedIds=this._skipGeomOIDs,this._highlightFeatures(this._selectedIds)):this._geomQuery(this.geometries)}async _highlightFeatures(i){y.removeHandles(),i.length>0&&y.highlightHandles.push(await n(i,this.selectLayerView,this.mapView)),this._numSelected=i.length,this.selectionSetChange.emit(i.length)}async _selectFeatures(i){this._selectionLoading=!0,this._selectedIds=await o(i,this.selectLayerView.layer),this._selectionLoading=!1,this._drawTools.graphics=this._graphics,await this._highlightFeatures(this._selectedIds)}async _bufferComplete(i){this._bufferGeometry=Array.isArray(i.detail)?i.detail[0]:i.detail;let t=this._bufferTools.distance,s=0;if(this._bufferGeometry){const i=new this.Graphic({geometry:this._bufferGeometry,symbol:{type:"simple-fill",color:this.bufferColor,outline:{color:this.bufferOutlineColor,width:1}}});this._bufferGraphicsLayer.removeAll(),this._bufferGraphicsLayer.add(i),await this._selectFeatures([this._bufferGeometry]),await this.mapView.goTo(i.geometry.extent),s=t,t=0}else this._bufferGraphicsLayer&&this._bufferGraphicsLayer.removeAll(),await this._highlightWithOIDsOrGeoms();this._distanceChanged({oldValue:t,newValue:s})}_geomQuery(i){const t=r(i,this._geometryEngine);return this._selectFeatures(t)}async _clearResults(i=!0,t=!1){var s;this._selectedIds=[],this._distance=void 0,this._unit=void 0,t&&(this._selectionLabel="",this._labelName.value=""),this._bufferGraphicsLayer&&this._bufferGraphicsLayer.removeAll(),i&&this._searchWidget&&this._clearSearchWidget(),y.removeHandles(),(null===(s=this._drawTools)||void 0===s?void 0:s.clear)&&(this._graphics=[],await this._drawTools.clear()),this.selectionSetChange.emit(this._selectedIds.length)}_clearSearchWidget(){this._searchWidget.clear(),this._searchResult=void 0}_updateSelection(i,t,s){this._selectedIds=t&&s?s:this._selectedIds,this._skipGeomOIDs=t?s:void 0,this.geometries=Array.isArray(i)?i.map((i=>i.geometry)):this.geometries,this._graphics=i}_updateLabel(){var i,t;const s=this._selectionLabel.indexOf(this._translations.sketch)>-1,e=this._selectionLabel.indexOf(this._translations.select)>-1,a=this._selectionLabel.indexOf(null===(i=this._searchResult)||void 0===i?void 0:i.name)>-1,l=this._workflowType===b.SEARCH?null===(t=this._searchResult)||void 0===t?void 0:t.name:this._workflowType===b.SELECT?this._translations.select:this._translations.sketch,h=this._unit?this._unit:this._bufferTools.unit,n=isNaN(this._distance)?this._bufferTools.distance:this._distance;this._selectionLabel=s||e||a||!this._selectionLabel?`${l} ${n} ${h}`:this._selectionLabel,this._labelName.value=this._selectionLabel}async _layerSelectionChange(i){if(Array.isArray(i.detail)&&i.detail.length>0){const t=i.detail.map((i=>d(this.mapView,i)));return Promise.all(t).then((i=>{this.layerViews=i,this._featuresCollection={},this._sketchGraphic&&this._sketchGraphicsChanged({detail:{graphics:[this._sketchGraphic],useOIDs:!1}})}))}}async _inputLayerSelectionChange(i){var t;const s=(null===(t=null==i?void 0:i.detail)||void 0===t?void 0:t.length)>0?i.detail[0]:"";this.selectLayerView&&s===this.selectLayerView.layer.id||(this.selectLayerView=await d(this.mapView,s),this._updateLabel(),this._bufferGeometry?await this._selectFeatures([this._bufferGeometry]):await this._highlightWithOIDsOrGeoms())}_distanceChanged(i){i.newValue!==i.oldValue&&(this._distance=i.newValue,this._updateLabel())}async _selectLayerFeatures(i){this._selectionLoading=!0;const t=this.layerViews.map((t=>(this._featuresCollection[t.layer.id]=[],c(0,t.layer,i,this._featuresCollection))));return Promise.all(t).then((async i=>{this._selectionLoading=!1;let t=[];i.forEach((i=>{Object.keys(i).forEach((s=>{t=t.concat(i[s])}))}));let s=!1;t.forEach((i=>{var t;const e=i.geometry;i.symbol="point"===e.type?this.sketchPointSymbol:"polyline"===e.type?this.sketchLineSymbol:"polygon"===e.type?this.sketchPolygonSymbol:void 0,s=(null===(t=null==i?void 0:i.layer)||void 0===t?void 0:t.hasOwnProperty("objectIdField"))||i.hasOwnProperty("getObjectId")}));const e=this.layerViews[0].layer.title===this.selectLayerView.layer.title&&s;await this._sketchGraphicsChanged({detail:{graphics:t,useOIDs:e}},!0)}))}_useLayerFeaturesEnabledChanged(){this._useLayerFeaturesEnabled=!this._useLayerFeaturesEnabled,this._sketchGraphic&&this._sketchGraphicsChanged({detail:{graphics:[this._sketchGraphic],useOIDs:!1}})}async _getTranslations(){const i=await f(this.el);this._translations=i[0]}get el(){return a(this)}static get watchers(){return{geometries:["watchGeometriesHandler"],searchConfiguration:["watchSearchConfigurationHandler"]}}};_.style=':host{display:block}.div-visible{display:inherit}.div-visible-search{display:flex;height:44px;align-items:center;padding-bottom:0}.div-not-visible{display:none}.padding-bottom-1{padding-bottom:1rem}.padding-top-1{padding-top:1rem}.search-widget{width:100% !important;border:1px solid var(--calcite-ui-border-input)}.w-100{width:100%}.w-50{width:50%}.search-distance-container{padding-top:"1rem" !important}.end-border{border-inline-end:1px solid var(--calcite-ui-border-2)}.search-distance{display:flex;padding-top:1rem}.font-bold{font:bold}.border-bottom{border-bottom:1px solid var(--calcite-ui-border-2)}.tooltip-container{display:flex}.padding-start-1-2{padding-inline-start:0.5rem}.icon{--calcite-ui-icon-color:var(--calcite-ui-brand)}.tooltip-message{padding:5px 8px;font-weight:var(--calcite-font-weight-normal);color:var(--calcite-ui-text-2)}';const L=Object.freeze({__proto__:null,default:[{descriptionPDF:{labelWidthDisplay:"2-5/8",labelHeightDisplay:"1",labelsPerPageDisplay:"30",averyPartNumber:"*60"},labelSpec:{type:"AVERY",pageProperties:{pageType:"ANSI A",leftMargin:.1875,rightMargin:.1875,topMargin:.5,bottomMargin:.5},numLabelsAcross:3,numLabelsDown:10,labelWidth:2.625,labelHeight:1,horizGapIn:.125,vertGapIn:0,labelPadding:.1,fontSizePx:11,maxNumLabelLines:4}},{descriptionPDF:{labelWidthDisplay:"4",labelHeightDisplay:"1",labelsPerPageDisplay:"20",averyPartNumber:"*61"},labelSpec:{type:"AVERY",pageProperties:{pageType:"ANSI A",leftMargin:.15625,rightMargin:.15625,topMargin:.47637821,bottomMargin:.5},numLabelsAcross:2,numLabelsDown:10,labelWidth:4,labelHeight:1.0025,horizGapIn:.1875,vertGapIn:0,labelPadding:.1,fontSizePx:11,maxNumLabelLines:4}},{descriptionPDF:{labelWidthDisplay:"4",labelHeightDisplay:"1-1/3",labelsPerPageDisplay:"14",averyPartNumber:"*62"},labelSpec:{type:"AVERY",pageProperties:{pageType:"ANSI A",leftMargin:.15625,rightMargin:.15625,topMargin:.81889808,bottomMargin:.83464612},numLabelsAcross:2,numLabelsDown:7,labelWidth:4,labelHeight:1.3352,horizGapIn:.1875,vertGapIn:0,labelPadding:.1,fontSizePx:11,maxNumLabelLines:6}},{descriptionPDF:{labelWidthDisplay:"4",labelHeightDisplay:"2",labelsPerPageDisplay:"10",averyPartNumber:"*63"},labelSpec:{type:"AVERY",pageProperties:{pageType:"ANSI A",leftMargin:.15625,rightMargin:.15625,topMargin:.5,bottomMargin:.5},numLabelsAcross:2,numLabelsDown:5,labelWidth:4,labelHeight:2,horizGapIn:.1875,vertGapIn:0,labelPadding:.1,fontSizePx:12,maxNumLabelLines:10}},{descriptionPDF:{labelWidthDisplay:"4",labelHeightDisplay:"3-1/3",labelsPerPageDisplay:"6",averyPartNumber:"*64"},labelSpec:{type:"AVERY",pageProperties:{pageType:"ANSI A",leftMargin:.15625,rightMargin:.15625,topMargin:.4724412,bottomMargin:.50000027},numLabelsAcross:2,numLabelsDown:3,labelWidth:4,labelHeight:3.342,horizGapIn:.1875,vertGapIn:0,labelPadding:.1,fontSizePx:14,maxNumLabelLines:12}},{descriptionPDF:{labelWidthDisplay:"1-3/4",labelHeightDisplay:"1/2",labelsPerPageDisplay:"80",averyPartNumber:"*67"},labelSpec:{type:"AVERY",pageProperties:{pageType:"ANSI A",leftMargin:.307086375,rightMargin:.307086375,topMargin:.4724412,bottomMargin:.49606326},numLabelsAcross:4,numLabelsDown:20,labelWidth:1.75,labelHeight:.50155,horizGapIn:.29527575,vertGapIn:0,labelPadding:.1,fontSizePx:8,maxNumLabelLines:3}},{descriptionPDF:{labelWidthDisplay:"1-3/4",labelHeightDisplay:"2/3",labelsPerPageDisplay:"60",averyPartNumber:"*95"},labelSpec:{type:"AVERY",pageProperties:{pageType:"ANSI A",leftMargin:.28936983,rightMargin:.28936983,topMargin:.53937037,bottomMargin:.5511814},numLabelsAcross:4,numLabelsDown:15,labelWidth:1.75,labelHeight:.6605,horizGapIn:.30708678,vertGapIn:0,labelPadding:.1,fontSizePx:8,maxNumLabelLines:4}}]}),P=class{constructor(t){i(this,t),this.defaultNumLabelsPerPage=void 0,this.disabled=!1,this._translations=void 0}async downloadCSV(i,t,s=!0){return w(i,!0,t,s)}async downloadPDF(i,t=!1,s="",e=""){var a;return S(i,null===(a=this._labelInfoElement.selectedOption)||void 0===a?void 0:a.value,t,s,e)}async componentWillLoad(){await this._getTranslations(),await this._initModules()}render(){return s(e,null,s("calcite-select",{disabled:this.disabled,label:"",ref:i=>{this._labelInfoElement=i}}))}componentDidRender(){this._renderOptions()}async _initModules(){const[i]=await l(["esri/intl"]);this._intl=i}_getLabelSizeText(i){const t="&lrm;"+i.descriptionPDF.labelWidthDisplay+" x "+i.descriptionPDF.labelHeightDisplay+"&rlm;";return this._translations.pdfLabel.replace("{{n}}",i.descriptionPDF.labelsPerPageDisplay).replace("{{labelSize}}",t)}async _getTranslations(){const i=await f(this.el);this._translations=i[0]}_renderOptions(){(L.default||L).sort(((i,t)=>{const s=parseInt(i.descriptionPDF.labelsPerPageDisplay,10),e=parseInt(t.descriptionPDF.labelsPerPageDisplay,10);return s<e?-1:s>e?1:0})).forEach(((i,t)=>{const s=document.createElement("calcite-option");s.value=i,s.innerHTML=this._getLabelSizeText(i),this._labelInfoElement.appendChild(s),(this.defaultNumLabelsPerPage?parseInt(i.descriptionPDF.labelsPerPageDisplay,10)===this.defaultNumLabelsPerPage:0===t)&&(s.selected=!0,this._labelInfoElement.selectedOption=s)}))}get el(){return a(this)}};P.style=":host{display:block}";const x=class{constructor(s){i(this,s),this.selectionLoadingChange=t(this,"selectionLoadingChange",7),this.selectionSetsChanged=t(this,"selectionSetsChanged",7),this._addEnabled=!0,this._refineSets=[],this._enabledLayerIds=[],this._featuresCollection={},this.addresseeLayer=void 0,this.enabledLayerIds=[],this.mapView=void 0,this.selectionSets=[],this.sketchLineSymbol=void 0,this.sketchPointSymbol=void 0,this.sketchPolygonSymbol=void 0,this._translations=void 0,this._selectionMode=u.ADD,this._refineLayer=void 0}async componentWillLoad(){await this._getTranslations(),this._enabledLayerIds=this._getEnabledLayerIds(),await this._setRefineSet(this._enabledLayerIds[0])}render(){var i,t;return s(e,null,s("div",{class:(this._enabledLayerIds.length>1?"display-block":"display-none")+" padding-top-sides-1"},s("div",{class:"display-flex"},s("calcite-label",{class:"font-bold width-full label-margin-0"},s("div",{class:"display-flex"},this._translations.inputLayer,s("calcite-icon",{class:"padding-start-1-2 icon",icon:"question",id:"refine-input-layer",scale:"s"})),s("map-layer-picker",{enabledLayerIds:this._enabledLayerIds,mapView:this.mapView,onLayerSelectionChange:i=>{this._layerSelectionChange(i)},ref:i=>{this._layerPicker=i},selectedIds:[this._refineLayer.layer.id]})),s("calcite-popover",{closable:!0,label:"",referenceElement:"refine-input-layer"},s("span",{class:"tooltip-message"},this._translations.inputLayerTip)))),s("div",{class:"padding-1"},s("div",{class:"padding-bottom-1"},s("calcite-segmented-control",{class:"w-100"},s("calcite-segmented-control-item",{checked:this._addEnabled,class:"w-50 word-wrap-anywhere",onClick:()=>this._setSelectionMode(u.ADD),value:u.ADD},s("span",{class:"font-weight-500"},this._translations.add)),s("calcite-segmented-control-item",{checked:!this._addEnabled,class:"w-50 word-wrap-anywhere",onClick:()=>this._setSelectionMode(u.REMOVE),value:u.REMOVE},s("span",{class:"font-weight-500"},this._translations.remove)))),s("div",null,s("map-draw-tools",{active:!0,drawMode:v.REFINE,mapView:this.mapView,onDrawRedo:()=>this._redo(),onDrawUndo:()=>this._undo(),onSketchGraphicsChange:i=>this._sketchGraphicsChanged(i),pointSymbol:this.sketchPointSymbol,polygonSymbol:this.sketchPolygonSymbol,polylineSymbol:this.sketchLineSymbol,redoEnabled:(null===(i=this._refineSelectionSet)||void 0===i?void 0:i.redoStack.length)>0,ref:i=>{this._drawTools=i},undoEnabled:(null===(t=this._refineSelectionSet)||void 0===t?void 0:t.undoStack.length)>0})),s("br",null),s("calcite-list",{class:"list-border"},this._getRefineSelectionSetList())))}_layerSelectionChange(i){this._setRefineSet(i.detail[0])}_setSelectionMode(i){this._selectionMode=i}_sketchGraphicsChanged(i){var t;const s=null===(t=i.detail)||void 0===t?void 0:t.graphics[0].geometry;this._selectFeatures(s)}_getEnabledLayerIds(){return this.selectionSets.reduce(((i,t)=>{var s;const e=null===(s=null==t?void 0:t.layerView)||void 0===s?void 0:s.layer.id;return e&&i.indexOf(e)<0?i.push(e):t.workflowType===b.REFINE&&Object.keys(t.refineInfos).forEach((t=>{i.indexOf(t)<0&&i.push(t)})),i}),[])}async _setRefineSet(i){this.selectionSets.some((t=>{if(t.workflowType===b.REFINE)return this._refineSelectionSet=t,Object.keys(t.refineInfos).indexOf(i)>-1}))||await this._initRefineSet(i,this._refineSelectionSet),this._refineLayer=this._refineSelectionSet.refineInfos[i].layerView}async _initRefineSet(i,t){const s={};s[i]={addIds:[],removeIds:[],layerView:await d(this.mapView,i)},t?t.refineInfos=Object.assign(Object.assign({},t.refineInfos),s):(this._refineSelectionSet={id:Date.now(),searchResult:void 0,buffer:void 0,distance:0,download:!0,unit:"feet",label:"Refine",selectedIds:[],layerView:void 0,geometries:[],graphics:[],selectLayers:[],workflowType:b.REFINE,searchDistanceEnabled:!1,useLayerFeaturesEnabled:!1,refineInfos:s,redoStack:[],undoStack:[],sketchGraphic:void 0},this.selectionSets.push(this._refineSelectionSet))}_undo(){const i=this._refineSelectionSet.undoStack.pop();this._updateIds(i.ids,i.mode===u.ADD?u.REMOVE:u.ADD,this._refineSelectionSet.redoStack,i.layerView)}_redo(){const i=this._refineSelectionSet.redoStack.pop();this._updateIds(i.ids,i.mode===u.ADD?u.REMOVE:u.ADD,this._refineSelectionSet.undoStack,i.layerView)}_getRefineSelectionSetList(){const i=this._getTotal(this.selectionSets);let t;this.selectionSets.some((i=>{if(i.workflowType===b.REFINE)return t=i,!0}));let e=0,a=0;return Object.keys(t.refineInfos).forEach((i=>{e+=t.refineInfos[i].addIds.length,a+=t.refineInfos[i].removeIds.length})),[s("calcite-list-item",{label:this._translations.featuresAdded.replace("{{n}}",e.toString()),"non-interactive":!0}),s("calcite-list-item",{label:this._translations.featuresRemoved.replace("{{n}}",a.toString()),"non-interactive":!0}),s("calcite-list-item",{label:this._translations.totalSelected.replace("{{n}}",i.toString()),"non-interactive":!0})]}_getTotal(i){const t=p(i);return Object.keys(t).reduce(((i,s)=>i+t[s].ids.length),0)}async _getTranslations(){const i=await f(this.el);this._translations=i[0]}async _selectFeatures(i){var t,s;this.selectionLoadingChange.emit(!0),this._featuresCollection[null===(t=this._refineLayer)||void 0===t?void 0:t.layer.id]=[];const e=await c(0,null===(s=this._refineLayer)||void 0===s?void 0:s.layer,i,this._featuresCollection);this.selectionLoadingChange.emit(!1);let a=[];Object.keys(e).forEach((i=>{var t;i===(null===(t=this._refineLayer)||void 0===t?void 0:t.layer.id)&&(a=a.concat(e[i]))}));const l=Array.isArray(a)?a.map((i=>{var t;return i.attributes[null===(t=null==i?void 0:i.layer)||void 0===t?void 0:t.objectIdField]})):[];await this._updateIds(l,this._selectionMode,this._refineSelectionSet.undoStack,this._refineLayer),this._drawTools.clear()}async _highlightFeatures(){this._clearHighlight(),y.highlightHandles=await g(this.selectionSets)}_clearHighlight(){y.removeHandles()}async _updateIds(i,t,s,e){let a=!1;const l=this._refineSelectionSet.refineInfos,h=e.layer.id,n={};n[h]={addIds:[],removeIds:[],layerView:e};const o=Object.keys(l).indexOf(h)>-1?l[h]:n[h];if(t===u.ADD)o.addIds=[...new Set([...i,...o.addIds])],o.addIds.length>0&&s.push({ids:i,mode:t,layerView:e}),o.removeIds.length>0&&(o.removeIds=o.removeIds.filter((t=>i.indexOf(t)<0)));else{const l=this.selectionSets.reduce(((t,s)=>(i.forEach((i=>{s.workflowType!==b.REFINE?s.selectedIds.indexOf(i)>-1&&t.push(i):Object.keys(s.refineInfos).some((a=>{const l=s.refineInfos[a];if(l.layerView.layer.id===e.layer.id&&l.addIds.indexOf(i)>-1)return t.push(i),!0}))})),t)),[]);o.removeIds=[...new Set([...l,...o.removeIds])],o.addIds=o.addIds.filter((i=>l.indexOf(i)<0)),o.removeIds.length>0&&s.push({ids:l,mode:t,layerView:e}),this.selectionSets=this.selectionSets.reduce(((i,t)=>(t.workflowType!==b.REFINE&&t.layerView.layer.id===e.layer.id?(t.selectedIds=t.selectedIds.filter((i=>o.removeIds.indexOf(i)<0)),t.selectedIds.length>0?i.push(t):a=!0):i.push(t),i)),[])}this._refineSelectionSet.refineInfos[h]=o,this.selectionSets=[...this.selectionSets],a&&this.selectionSetsChanged.emit(this.selectionSets),await this._highlightFeatures()}get el(){return a(this)}};x.style=':host{display:block}.div-visible{display:inherit}.div-not-visible{display:none !important}.padding-top-1-2{padding-top:.5rem}.main-label{display:flex;float:left}html[dir="rtl"] .main-label{display:flex;float:right}.border{outline:1px solid var(--calcite-ui-border-input)}.margin-top-1{margin-top:1rem}.esri-sketch{display:flex;flex-flow:column wrap}.esri-widget{box-sizing:border-box;color:#323232;font-size:14px;font-family:"Avenir Next","Helvetica Neue",Helvetica,Arial,sans-serif;line-height:1.3em;background-color:var(--calcite-ui-foreground-1)}.esri-sketch__panel{align-items:center;display:flex;flex-flow:row nowrap;padding:0}*/ .esri-sketch__tool-section{border-right:1px solid rgba(110,110,110,.3)}.esri-sketch__section{align-items:center;display:flex;flex-flow:row nowrap;padding:0 7px;margin:6px 0;border-right:1px solid rgba(110,110,110,.3)}.display-flex{display:flex}.font-bold{font-weight:bold}.width-full{width:100%}.label-margin-0{--calcite-label-margin-bottom:0}.padding-start-1-2{padding-inline-start:0.5rem}.font-weight-500{font-weight:500}.word-wrap-anywhere{word-wrap:anywhere}';export{_ as map_select_tools,P as pdf_download,x as refine_selection}
6
+ import{r as i,c as t,h as s,H as e,g as a}from"./p-9310b882.js";import{l}from"./p-0266ca81.js";import{g as h,h as n,d as o,e as r,f as d,i as c,j as p,k as g}from"./p-f8dd2784.js";import{c as b,e as u,f as v}from"./p-868df4a0.js";import{s as y}from"./p-3445a8c6.js";import{a as m,g as f}from"./p-7f9642d5.js";import{d as w,a as S}from"./p-95c11620.js";import"./p-2c0dc7b1.js";import"./p-e1a4994d.js";const _=class{constructor(s){i(this,s),this.selectionSetChange=t(this,"selectionSetChange",7),this._selectedIds=[],this._selectionLabel="",this._graphics=[],this._featuresCollection={},this.bufferColor=[227,139,79,.8],this.bufferOutlineColor=[255,255,255],this.customLabelEnabled=void 0,this.enabledLayerIds=[],this.defaultBufferDistance=void 0,this.defaultBufferUnit=void 0,this.geometries=[],this.isUpdate=!1,this.layerViews=[],this.mapView=void 0,this.noResultText=void 0,this.searchConfiguration=void 0,this.selectionSet=void 0,this.selectionLayerIds=[],this.selectLayerView=void 0,this.sketchLineSymbol=void 0,this.sketchPointSymbol=void 0,this.sketchPolygonSymbol=void 0,this._numSelected=0,this._searchDistanceEnabled=!1,this._searchTerm=void 0,this._selectionLoading=!1,this._translations=void 0,this._useLayerFeaturesEnabled=!1}async watchGeometriesHandler(i,t){if(i!==t){const t=0===i.length;if(await this._clearResults(t,t),i.length>0)return this._highlightWithOIDsOrGeoms()}}async watchSearchConfigurationHandler(i,t){JSON.stringify(i)!==JSON.stringify(t)&&this._initSearchWidget()}async clearSelection(){return this._clearResults(!0,!0)}async getSelection(){return/\S+/gm.test(this._selectionLabel)||this._updateLabel(),{id:this.isUpdate?this.selectionSet.id:Date.now(),searchResult:this._searchResult,buffer:this._bufferGeometry,distance:this._bufferTools.distance,download:!0,unit:this._bufferTools.unit,label:this._selectionLabel,selectedIds:this._selectedIds,layerView:this.selectLayerView,geometries:this.geometries,graphics:this._graphics,selectLayers:this.layerViews,skipGeomOIDs:this._skipGeomOIDs,searchDistanceEnabled:this._searchDistanceEnabled,workflowType:this._workflowType,useLayerFeaturesEnabled:this._useLayerFeaturesEnabled,sketchGraphic:this._sketchGraphic}}searchConfigurationChangeChanged(i){this.searchConfiguration=i.detail}distanceChanged(i){this._distanceChanged(i.detail)}unitChanged(i){i.detail.newValue!==i.detail.oldValue&&(this._unit=i.detail.newValue,this._updateLabel())}async componentWillLoad(){await this._getTranslations(),await this._initModules()}async componentDidLoad(){return this._init()}render(){return s(e,null,this._getMapLayerPicker(),s("div",{class:"border-bottom"}),s("div",{class:"padding-top-sides-1"},s("div",{class:"search-widget",ref:i=>{this._searchElement=i}}),s("div",{class:"padding-top-1"},s("map-draw-tools",{active:!0,editGraphicsEnabled:!this._useLayerFeaturesEnabled,graphics:this._graphics,mapView:this.mapView,onSketchGraphicsChange:i=>this._sketchGraphicsChanged(i),pointSymbol:this.sketchPointSymbol,polygonSymbol:this.sketchPolygonSymbol,polylineSymbol:this.sketchLineSymbol,ref:i=>{this._drawTools=i}})),this._getBufferOptions(),this._getUseLayerFeaturesOptions(),this._getNumSelected()),s("div",{class:"border-bottom"}),this._getNameInput())}_getBufferOptions(){var i,t;const e=this._searchDistanceEnabled?"search-distance":"div-not-visible",a="number"==typeof(null===(i=this.selectionSet)||void 0===i?void 0:i.distance)?this.selectionSet.distance:this.defaultBufferDistance;return s("div",null,s("div",{class:"padding-top-1 display-flex"},s("calcite-label",{class:"label-margin-0 w-100",layout:"inline-space-between"},s("div",{class:"tooltip-container"},this._translations.searchDistance,s("calcite-icon",{class:"padding-start-1-2 icon",icon:"question",id:"search-distance-icon",scale:"s"}))),s("calcite-popover",{closable:!0,label:"",referenceElement:"search-distance-icon"},s("span",{class:"tooltip-message"},this._translations.useSearchDistanceTootip)),s("calcite-switch",{checked:this._searchDistanceEnabled,onCalciteSwitchChange:()=>this._searchDistanceEnabled=!this._searchDistanceEnabled})),s("div",{class:e},s("buffer-tools",{disabled:!this._searchDistanceEnabled,distance:a,geometries:this.geometries,onBufferComplete:i=>this._bufferComplete(i),ref:i=>this._bufferTools=i,unit:(null===(t=this.selectionSet)||void 0===t?void 0:t.unit)||this.defaultBufferUnit})))}_getUseLayerFeaturesOptions(){const i=this._useLayerFeaturesEnabled?"div-visible":"div-not-visible";return s("div",null,s("div",{class:"padding-top-1 display-flex"},s("calcite-label",{class:"label-margin-0 w-100",layout:"inline-space-between"},s("div",{class:"tooltip-container"},this._translations.useLayerFeatures,s("calcite-icon",{class:"padding-start-1-2 icon",icon:"question",id:"use-layer-features-icon",scale:"s"}))),s("calcite-popover",{closable:!0,label:"",referenceElement:"use-layer-features-icon"},s("span",{class:"tooltip-message"},this._translations.useLayerFeaturesTooltip)),s("calcite-switch",{checked:this._useLayerFeaturesEnabled,onCalciteSwitchChange:()=>{this._useLayerFeaturesEnabledChanged()}})),s("div",{class:i+" padding-top-1"},s("map-layer-picker",{enabledLayerIds:this.selectionLayerIds,mapView:this.mapView,onLayerSelectionChange:i=>{this._layerSelectionChange(i)},selectedIds:this.layerViews.map((i=>i.layer.id))})))}_getNumSelected(){const i=m(this.el),t=i&&"en"===i?`${this._translations.selectionLoading}...`:this._translations.selectionLoading;return s("div",{class:"padding-top-1 padding-bottom-1",style:{"align-items":"end",display:"flex"}},this._selectionLoading?s("div",null,s("calcite-loader",{class:"info-blue",inline:!0,label:t,scale:"m",type:"indeterminate"})):s("calcite-icon",{class:"info-blue padding-end-1-2",icon:"feature-layer",scale:"s"}),s("calcite-input-message",{class:"info-blue",scale:"m"},this._selectionLoading?t:this.noResultText&&0===this._numSelected?this.noResultText:this._translations.selectedFeatures.replace("{{n}}",this._numSelected.toString())))}_getNameInput(){return s("div",{class:"padding-sides-1 padding-top-1 "+(this.customLabelEnabled?"":"display-none")},s("calcite-label",{class:"font-bold"},this._translations.listName,s("calcite-input",{onInput:()=>{this._selectionLabel=this._labelName.value},placeholder:this._translations.listNamePlaceholder,ref:i=>{this._labelName=i},value:this._selectionLabel||""})))}_getMapLayerPicker(){return s("div",{class:"display-flex padding-sides-1 padding-bottom-1"},s("calcite-label",{class:"font-bold width-full label-margin-0"},this._translations.inputLayer,s("map-layer-picker",{enabledLayerIds:this.enabledLayerIds,mapView:this.mapView,onLayerSelectionChange:i=>this._inputLayerSelectionChange(i),selectedIds:this.selectLayerView?[this.selectLayerView.layer.id]:this.selectionSet?[this.selectionSet.layerView.layer.id]:[]})))}async _initModules(){const[i,t,s,e,a]=await l(["esri/layers/GraphicsLayer","esri/Graphic","esri/widgets/Search","esri/geometry/geometryEngine","esri/layers/FeatureLayer"]);this.GraphicsLayer=i,this.Graphic=t,this.Search=s,this._geometryEngine=e,this.FeatureLayer=a}async _init(){this._initGraphicsLayer(),await this._initSelectionSet(),this._initSearchWidget()}async _initSelectionSet(){var i,t,s,e;this.selectionSet&&(this._searchTerm=null===(i=this.selectionSet.searchResult)||void 0===i?void 0:i.name,this._searchResult=this.selectionSet.searchResult,this._selectLayers=this.selectionSet.selectLayers,this._selectedIds=this.selectionSet.selectedIds,this._skipGeomOIDs=this.selectionSet.skipGeomOIDs,this._searchDistanceEnabled=this.selectionSet.searchDistanceEnabled,this._useLayerFeaturesEnabled=this.selectionSet.useLayerFeaturesEnabled,this._distance=this.selectionSet.searchDistanceEnabled?this.selectionSet.distance:0,this._unit=this.selectionSet.unit,this._workflowType=this.selectionSet.workflowType,this.selectLayerView=this.selectionSet.layerView,this._sketchGraphic=this.selectionSet.sketchGraphic,this.geometries=[...(null===(t=this.selectionSet)||void 0===t?void 0:t.geometries)||[]],this._graphics=this.geometries.map((i=>new this.Graphic({geometry:i,symbol:"point"===i.type?this.sketchPointSymbol:"polyline"===i.type?this.sketchLineSymbol:this.sketchPolygonSymbol}))),this._selectionLabel=null===(s=this.selectionSet)||void 0===s?void 0:s.label,this._useLayerFeaturesEnabled||null===(e=this._drawTools)||void 0===e||e.updateGraphics(),await h(this.selectionSet.selectedIds,this.selectionSet.layerView,this.mapView,!1))}_initSearchWidget(){if(this.mapView&&this._searchElement){const i=this._getSearchConfig(this.searchConfiguration,this.mapView),t=Object.assign({view:this.mapView,container:this._searchElement,searchTerm:this._searchTerm},i);this._searchWidget=new this.Search(t),this._searchWidget.popupEnabled=!1,this._searchWidget.resultGraphicEnabled=!1,this._searchWidget.on("search-clear",(()=>{const i=this._searchClearLabel();this._clearResults(!1,i)})),this._searchWidget.on("select-result",(i=>{var t,s;if(i.result){this._searchResult=i.result;const e=(null===(s=null===(t=i.source)||void 0===t?void 0:t.layer)||void 0===s?void 0:s.id)&&i.source.layer.id===this.selectLayerView.layer.id,a=e?[i.result.feature.getObjectId()]:void 0;this._workflowType=b.SEARCH,this._updateLabel();const l=[i.result.feature];this._updateSelection(l,e,a),this._drawTools.graphics=l,this._searchWidget.resultGraphic.visible=!1}else{const i=this._searchClearLabel();this._clearResults(!1,i)}}))}}_searchClearLabel(){var i;return(null===(i=this._searchResult)||void 0===i?void 0:i.name)&&this._labelName.value.indexOf(this._searchResult.name)>-1}_getSearchConfig(i,t){const s=null==i?void 0:i.sources;return(null==s?void 0:s.length)>0?(i.includeDefaultSources=!1,s.forEach((i=>{var s,e;if(i.hasOwnProperty("layer")){const a=i,l=null===(s=a.layer)||void 0===s?void 0:s.id,h=l?t.map.findLayerById(l):null,n=null===(e=null==a?void 0:a.layer)||void 0===e?void 0:e.url;h?a.layer=h:n&&(a.layer=new this.FeatureLayer(n))}})),null==s||s.forEach((i=>{if(i.hasOwnProperty("locator")){const t=i;"ArcGIS World Geocoding Service"===(null==t?void 0:t.name)&&(t.outFields=t.outFields||["Addr_type","Match_addr","StAddr","City"],t.singleLineFieldName="SingleLine"),t.url=t.url,delete t.url}}))):i=Object.assign(Object.assign({},i),{includeDefaultSources:!0}),i}_initGraphicsLayer(){const i=this._translations.bufferLayer,t=this.mapView.map.layers.findIndex((t=>t.title===i));if(t>-1)this._bufferGraphicsLayer=this.mapView.map.layers.getItemAt(t);else{this._bufferGraphicsLayer=new this.GraphicsLayer({title:i,listMode:"hide"}),y.managedLayers.push(i);const t=this.mapView.map.layers.findIndex((i=>i.title===this._translations.sketchLayer));t>-1?this.mapView.map.layers.add(this._bufferGraphicsLayer,t):this.mapView.map.layers.add(this._bufferGraphicsLayer)}}async _sketchGraphicsChanged(i,t=!1){const s=i.detail.graphics;if(s.length>0&&s[0])if(t||(this._sketchGraphic=s[0]),this._workflowType=this._useLayerFeaturesEnabled?b.SELECT:b.SKETCH,this._workflowType===b.SKETCH&&this._drawTools.updateGraphics(),this._updateLabel(),this._clearSearchWidget(),this._useLayerFeaturesEnabled&&!t){const i=Array.isArray(s)?s.map((i=>i.geometry)):this.geometries;await this._selectLayerFeatures(i[0])}else{const t=s.reduce(((i,t)=>{var s;return(null===(s=null==t?void 0:t.layer)||void 0===s?void 0:s.objectIdField)?i.push(t.attributes[t.layer.objectIdField]):t.getObjectId&&i.push(t.getObjectId()),i}),[]),e=i.detail.useOIDs&&t.length>0;this._updateSelection(s,e,t),e&&await this._highlightFeatures(t)}else await this._clearResults(!0,!0)}async _highlightWithOIDsOrGeoms(){var i;return(null===(i=this._skipGeomOIDs)||void 0===i?void 0:i.length)>0?(this._selectedIds=this._skipGeomOIDs,this._highlightFeatures(this._selectedIds)):this._geomQuery(this.geometries)}async _highlightFeatures(i){y.removeHandles(),i.length>0&&y.highlightHandles.push(await n(i,this.selectLayerView,this.mapView)),this._numSelected=i.length,this.selectionSetChange.emit(i.length)}async _selectFeatures(i){this._selectionLoading=!0,this._selectedIds=await o(i,this.selectLayerView.layer),this._selectionLoading=!1,this._drawTools.graphics=this._graphics,await this._highlightFeatures(this._selectedIds)}async _bufferComplete(i){this._bufferGeometry=Array.isArray(i.detail)?i.detail[0]:i.detail;let t=this._bufferTools.distance,s=0;if(this._bufferGeometry){const i=new this.Graphic({geometry:this._bufferGeometry,symbol:{type:"simple-fill",color:this.bufferColor,outline:{color:this.bufferOutlineColor,width:1}}});this._bufferGraphicsLayer.removeAll(),this._bufferGraphicsLayer.add(i),await this._selectFeatures([this._bufferGeometry]),await this.mapView.goTo(i.geometry.extent),s=t,t=0}else this._bufferGraphicsLayer&&this._bufferGraphicsLayer.removeAll(),await this._highlightWithOIDsOrGeoms();this._distanceChanged({oldValue:t,newValue:s})}_geomQuery(i){const t=r(i,this._geometryEngine);return this._selectFeatures(t)}async _clearResults(i=!0,t=!1){var s;this._selectedIds=[],this._distance=void 0,this._unit=void 0,t&&(this._selectionLabel="",this._labelName.value=""),this._bufferGraphicsLayer&&this._bufferGraphicsLayer.removeAll(),i&&this._searchWidget&&this._clearSearchWidget(),y.removeHandles(),(null===(s=this._drawTools)||void 0===s?void 0:s.clear)&&(this._graphics=[],await this._drawTools.clear()),this.selectionSetChange.emit(this._selectedIds.length)}_clearSearchWidget(){this._searchWidget.clear(),this._searchResult=void 0}_updateSelection(i,t,s){this._selectedIds=t&&s?s:this._selectedIds,this._skipGeomOIDs=t?s:void 0,this.geometries=Array.isArray(i)?i.map((i=>i.geometry)):this.geometries,this._graphics=i}_updateLabel(){var i,t;const s=this._selectionLabel.indexOf(this._translations.sketch)>-1,e=this._selectionLabel.indexOf(this._translations.select)>-1,a=this._selectionLabel.indexOf(null===(i=this._searchResult)||void 0===i?void 0:i.name)>-1,l=this._workflowType===b.SEARCH?null===(t=this._searchResult)||void 0===t?void 0:t.name:this._workflowType===b.SELECT?this._translations.select:this._translations.sketch,h=this._unit?this._unit:this._bufferTools.unit,n=isNaN(this._distance)?this._bufferTools.distance:this._distance;this._selectionLabel=s||e||a||!this._selectionLabel?`${l} ${n} ${h}`:this._selectionLabel,this._labelName.value=this._selectionLabel}async _layerSelectionChange(i){if(Array.isArray(i.detail)&&i.detail.length>0){const t=i.detail.map((i=>d(this.mapView,i)));return Promise.all(t).then((i=>{this.layerViews=i,this._featuresCollection={},this._sketchGraphic&&this._sketchGraphicsChanged({detail:{graphics:[this._sketchGraphic],useOIDs:!1}})}))}}async _inputLayerSelectionChange(i){var t;const s=(null===(t=null==i?void 0:i.detail)||void 0===t?void 0:t.length)>0?i.detail[0]:"";this.selectLayerView&&s===this.selectLayerView.layer.id||(this.selectLayerView=await d(this.mapView,s),this._updateLabel(),this._bufferGeometry?await this._selectFeatures([this._bufferGeometry]):await this._highlightWithOIDsOrGeoms())}_distanceChanged(i){i.newValue!==i.oldValue&&(this._distance=i.newValue,this._updateLabel())}async _selectLayerFeatures(i){this._selectionLoading=!0;const t=this.layerViews.map((t=>(this._featuresCollection[t.layer.id]=[],c(0,t.layer,i,this._featuresCollection))));return Promise.all(t).then((async i=>{this._selectionLoading=!1;let t=[];i.forEach((i=>{Object.keys(i).forEach((s=>{t=t.concat(i[s])}))}));let s=!1;t.forEach((i=>{var t;const e=i.geometry;i.symbol="point"===e.type?this.sketchPointSymbol:"polyline"===e.type?this.sketchLineSymbol:"polygon"===e.type?this.sketchPolygonSymbol:void 0,s=(null===(t=null==i?void 0:i.layer)||void 0===t?void 0:t.hasOwnProperty("objectIdField"))||i.hasOwnProperty("getObjectId")}));const e=this.layerViews[0].layer.title===this.selectLayerView.layer.title&&s;await this._sketchGraphicsChanged({detail:{graphics:t,useOIDs:e}},!0)}))}_useLayerFeaturesEnabledChanged(){this._useLayerFeaturesEnabled=!this._useLayerFeaturesEnabled,this._sketchGraphic&&this._sketchGraphicsChanged({detail:{graphics:[this._sketchGraphic],useOIDs:!1}})}async _getTranslations(){const i=await f(this.el);this._translations=i[0]}get el(){return a(this)}static get watchers(){return{geometries:["watchGeometriesHandler"],searchConfiguration:["watchSearchConfigurationHandler"]}}};_.style=':host{display:block}.div-visible{display:inherit}.div-visible-search{display:flex;height:44px;align-items:center;padding-bottom:0}.div-not-visible{display:none}.padding-bottom-1{padding-bottom:1rem}.padding-top-1{padding-top:1rem}.search-widget{width:100% !important;border:1px solid var(--calcite-ui-border-input)}.w-100{width:100%}.w-50{width:50%}.search-distance-container{padding-top:"1rem" !important}.end-border{border-inline-end:1px solid var(--calcite-ui-border-2)}.search-distance{display:flex;padding-top:1rem}.font-bold{font:bold}.border-bottom{border-bottom:1px solid var(--calcite-ui-border-2)}.tooltip-container{display:flex}.padding-start-1-2{padding-inline-start:0.5rem}.icon{--calcite-ui-icon-color:var(--calcite-ui-brand)}.tooltip-message{padding:5px 8px;font-weight:var(--calcite-font-weight-normal);color:var(--calcite-ui-text-2)}';const L=Object.freeze({__proto__:null,default:[{descriptionPDF:{labelWidthDisplay:"2-5/8",labelHeightDisplay:"1",labelsPerPageDisplay:"30",averyPartNumber:"*60"},labelSpec:{type:"AVERY",pageProperties:{pageType:"ANSI A",leftMargin:.1875,rightMargin:.1875,topMargin:.5,bottomMargin:.5},numLabelsAcross:3,numLabelsDown:10,labelWidth:2.625,labelHeight:1,horizGapIn:.125,vertGapIn:0,labelPadding:.1,fontSizePx:11,maxNumLabelLines:4}},{descriptionPDF:{labelWidthDisplay:"4",labelHeightDisplay:"1",labelsPerPageDisplay:"20",averyPartNumber:"*61"},labelSpec:{type:"AVERY",pageProperties:{pageType:"ANSI A",leftMargin:.15625,rightMargin:.15625,topMargin:.47637821,bottomMargin:.5},numLabelsAcross:2,numLabelsDown:10,labelWidth:4,labelHeight:1.0025,horizGapIn:.1875,vertGapIn:0,labelPadding:.1,fontSizePx:11,maxNumLabelLines:4}},{descriptionPDF:{labelWidthDisplay:"4",labelHeightDisplay:"1-1/3",labelsPerPageDisplay:"14",averyPartNumber:"*62"},labelSpec:{type:"AVERY",pageProperties:{pageType:"ANSI A",leftMargin:.15625,rightMargin:.15625,topMargin:.81889808,bottomMargin:.83464612},numLabelsAcross:2,numLabelsDown:7,labelWidth:4,labelHeight:1.3352,horizGapIn:.1875,vertGapIn:0,labelPadding:.1,fontSizePx:11,maxNumLabelLines:6}},{descriptionPDF:{labelWidthDisplay:"4",labelHeightDisplay:"2",labelsPerPageDisplay:"10",averyPartNumber:"*63"},labelSpec:{type:"AVERY",pageProperties:{pageType:"ANSI A",leftMargin:.15625,rightMargin:.15625,topMargin:.5,bottomMargin:.5},numLabelsAcross:2,numLabelsDown:5,labelWidth:4,labelHeight:2,horizGapIn:.1875,vertGapIn:0,labelPadding:.1,fontSizePx:12,maxNumLabelLines:10}},{descriptionPDF:{labelWidthDisplay:"4",labelHeightDisplay:"3-1/3",labelsPerPageDisplay:"6",averyPartNumber:"*64"},labelSpec:{type:"AVERY",pageProperties:{pageType:"ANSI A",leftMargin:.15625,rightMargin:.15625,topMargin:.4724412,bottomMargin:.50000027},numLabelsAcross:2,numLabelsDown:3,labelWidth:4,labelHeight:3.342,horizGapIn:.1875,vertGapIn:0,labelPadding:.1,fontSizePx:14,maxNumLabelLines:12}},{descriptionPDF:{labelWidthDisplay:"1-3/4",labelHeightDisplay:"1/2",labelsPerPageDisplay:"80",averyPartNumber:"*67"},labelSpec:{type:"AVERY",pageProperties:{pageType:"ANSI A",leftMargin:.307086375,rightMargin:.307086375,topMargin:.4724412,bottomMargin:.49606326},numLabelsAcross:4,numLabelsDown:20,labelWidth:1.75,labelHeight:.50155,horizGapIn:.29527575,vertGapIn:0,labelPadding:.1,fontSizePx:8,maxNumLabelLines:3}},{descriptionPDF:{labelWidthDisplay:"1-3/4",labelHeightDisplay:"2/3",labelsPerPageDisplay:"60",averyPartNumber:"*95"},labelSpec:{type:"AVERY",pageProperties:{pageType:"ANSI A",leftMargin:.28936983,rightMargin:.28936983,topMargin:.53937037,bottomMargin:.5511814},numLabelsAcross:4,numLabelsDown:15,labelWidth:1.75,labelHeight:.6605,horizGapIn:.30708678,vertGapIn:0,labelPadding:.1,fontSizePx:8,maxNumLabelLines:4}}]}),P=class{constructor(t){i(this,t),this.defaultNumLabelsPerPage=void 0,this.disabled=!1,this._translations=void 0}async downloadCSV(i,t,s=!0){return w(i,!0,t,s)}async downloadPDF(i,t=!1,s="",e=""){var a;return S(i,null===(a=this._labelInfoElement.selectedOption)||void 0===a?void 0:a.value,t,s,e)}async componentWillLoad(){await this._getTranslations(),await this._initModules()}render(){return s(e,null,s("calcite-select",{disabled:this.disabled,label:"",ref:i=>{this._labelInfoElement=i}}))}componentDidRender(){this._renderOptions()}async _initModules(){const[i]=await l(["esri/intl"]);this._intl=i}_getLabelSizeText(i){const t="&lrm;"+i.descriptionPDF.labelWidthDisplay+" x "+i.descriptionPDF.labelHeightDisplay+"&rlm;";return this._translations.pdfLabel.replace("{{n}}",i.descriptionPDF.labelsPerPageDisplay).replace("{{labelSize}}",t)}async _getTranslations(){const i=await f(this.el);this._translations=i[0]}_renderOptions(){(L.default||L).sort(((i,t)=>{const s=parseInt(i.descriptionPDF.labelsPerPageDisplay,10),e=parseInt(t.descriptionPDF.labelsPerPageDisplay,10);return s<e?-1:s>e?1:0})).forEach(((i,t)=>{const s=document.createElement("calcite-option");s.value=i,s.innerHTML=this._getLabelSizeText(i),this._labelInfoElement.appendChild(s),(this.defaultNumLabelsPerPage?parseInt(i.descriptionPDF.labelsPerPageDisplay,10)===this.defaultNumLabelsPerPage:0===t)&&(s.selected=!0,this._labelInfoElement.selectedOption=s)}))}get el(){return a(this)}};P.style=":host{display:block}";const x=class{constructor(s){i(this,s),this.selectionLoadingChange=t(this,"selectionLoadingChange",7),this.selectionSetsChanged=t(this,"selectionSetsChanged",7),this._addEnabled=!0,this._refineSets=[],this._enabledLayerIds=[],this._featuresCollection={},this.addresseeLayer=void 0,this.enabledLayerIds=[],this.mapView=void 0,this.selectionSets=[],this.sketchLineSymbol=void 0,this.sketchPointSymbol=void 0,this.sketchPolygonSymbol=void 0,this._translations=void 0,this._selectionMode=u.ADD,this._refineLayer=void 0}async componentWillLoad(){await this._getTranslations(),this._enabledLayerIds=this._getEnabledLayerIds(),await this._setRefineSet(this._enabledLayerIds[0])}render(){var i,t;return s(e,null,s("div",{class:(this._enabledLayerIds.length>1?"display-block":"display-none")+" padding-top-sides-1"},s("div",{class:"display-flex"},s("calcite-label",{class:"font-bold width-full label-margin-0"},s("div",{class:"display-flex"},this._translations.inputLayer,s("calcite-icon",{class:"padding-start-1-2 icon",icon:"question",id:"refine-input-layer",scale:"s"})),s("map-layer-picker",{enabledLayerIds:this._enabledLayerIds,mapView:this.mapView,onLayerSelectionChange:i=>{this._layerSelectionChange(i)},ref:i=>{this._layerPicker=i},selectedIds:[this._refineLayer.layer.id]})),s("calcite-popover",{closable:!0,label:"",referenceElement:"refine-input-layer"},s("span",{class:"tooltip-message"},this._translations.inputLayerTip)))),s("div",{class:"padding-1"},s("div",{class:"padding-bottom-1"},s("calcite-segmented-control",{class:"w-100"},s("calcite-segmented-control-item",{checked:this._addEnabled,class:"w-50 word-wrap-anywhere",onClick:()=>this._setSelectionMode(u.ADD),value:u.ADD},s("span",{class:"font-weight-500"},this._translations.add)),s("calcite-segmented-control-item",{checked:!this._addEnabled,class:"w-50 word-wrap-anywhere",onClick:()=>this._setSelectionMode(u.REMOVE),value:u.REMOVE},s("span",{class:"font-weight-500"},this._translations.remove)))),s("div",null,s("map-draw-tools",{active:!0,drawMode:v.REFINE,mapView:this.mapView,onDrawRedo:()=>this._redo(),onDrawUndo:()=>this._undo(),onSketchGraphicsChange:i=>this._sketchGraphicsChanged(i),pointSymbol:this.sketchPointSymbol,polygonSymbol:this.sketchPolygonSymbol,polylineSymbol:this.sketchLineSymbol,redoEnabled:(null===(i=this._refineSelectionSet)||void 0===i?void 0:i.redoStack.length)>0,ref:i=>{this._drawTools=i},undoEnabled:(null===(t=this._refineSelectionSet)||void 0===t?void 0:t.undoStack.length)>0})),s("br",null),s("calcite-list",{class:"list-border"},this._getRefineSelectionSetList())))}_layerSelectionChange(i){this._setRefineSet(i.detail[0])}_setSelectionMode(i){this._selectionMode=i}_sketchGraphicsChanged(i){var t;const s=null===(t=i.detail)||void 0===t?void 0:t.graphics[0].geometry;this._selectFeatures(s)}_getEnabledLayerIds(){return this.selectionSets.reduce(((i,t)=>{var s;const e=null===(s=null==t?void 0:t.layerView)||void 0===s?void 0:s.layer.id;return e&&i.indexOf(e)<0?i.push(e):t.workflowType===b.REFINE&&Object.keys(t.refineInfos).forEach((t=>{i.indexOf(t)<0&&i.push(t)})),i}),[])}async _setRefineSet(i){this.selectionSets.some((t=>{if(t.workflowType===b.REFINE)return this._refineSelectionSet=t,Object.keys(t.refineInfos).indexOf(i)>-1}))||await this._initRefineSet(i,this._refineSelectionSet),this._refineLayer=this._refineSelectionSet.refineInfos[i].layerView}async _initRefineSet(i,t){const s={};s[i]={addIds:[],removeIds:[],layerView:await d(this.mapView,i)},t?t.refineInfos=Object.assign(Object.assign({},t.refineInfos),s):(this._refineSelectionSet={id:Date.now(),searchResult:void 0,buffer:void 0,distance:0,download:!0,unit:"feet",label:"Refine",selectedIds:[],layerView:void 0,geometries:[],graphics:[],selectLayers:[],workflowType:b.REFINE,searchDistanceEnabled:!1,useLayerFeaturesEnabled:!1,refineInfos:s,redoStack:[],undoStack:[],sketchGraphic:void 0},this.selectionSets.push(this._refineSelectionSet))}_undo(){const i=this._refineSelectionSet.undoStack.pop();this._updateIds(i.ids,i.mode===u.ADD?u.REMOVE:u.ADD,this._refineSelectionSet.redoStack,i.layerView)}_redo(){const i=this._refineSelectionSet.redoStack.pop();this._updateIds(i.ids,i.mode===u.ADD?u.REMOVE:u.ADD,this._refineSelectionSet.undoStack,i.layerView)}_getRefineSelectionSetList(){const i=this._getTotal(this.selectionSets);let t;this.selectionSets.some((i=>{if(i.workflowType===b.REFINE)return t=i,!0}));let e=0,a=0;return Object.keys(t.refineInfos).forEach((i=>{e+=t.refineInfos[i].addIds.length,a+=t.refineInfos[i].removeIds.length})),[s("calcite-list-item",{label:this._translations.featuresAdded.replace("{{n}}",e.toString()),"non-interactive":!0}),s("calcite-list-item",{label:this._translations.featuresRemoved.replace("{{n}}",a.toString()),"non-interactive":!0}),s("calcite-list-item",{label:this._translations.totalSelected.replace("{{n}}",i.toString()),"non-interactive":!0})]}_getTotal(i){const t=p(i);return Object.keys(t).reduce(((i,s)=>i+t[s].ids.length),0)}async _getTranslations(){const i=await f(this.el);this._translations=i[0]}async _selectFeatures(i){var t,s;this.selectionLoadingChange.emit(!0),this._featuresCollection[null===(t=this._refineLayer)||void 0===t?void 0:t.layer.id]=[];const e=await c(0,null===(s=this._refineLayer)||void 0===s?void 0:s.layer,i,this._featuresCollection);this.selectionLoadingChange.emit(!1);let a=[];Object.keys(e).forEach((i=>{var t;i===(null===(t=this._refineLayer)||void 0===t?void 0:t.layer.id)&&(a=a.concat(e[i]))}));const l=Array.isArray(a)?a.map((i=>{var t;return i.attributes[null===(t=null==i?void 0:i.layer)||void 0===t?void 0:t.objectIdField]})):[];await this._updateIds(l,this._selectionMode,this._refineSelectionSet.undoStack,this._refineLayer),this._drawTools.clear()}async _highlightFeatures(){this._clearHighlight(),y.highlightHandles=await g(this.selectionSets)}_clearHighlight(){y.removeHandles()}async _updateIds(i,t,s,e){let a=!1;const l=this._refineSelectionSet.refineInfos,h=e.layer.id,n={};n[h]={addIds:[],removeIds:[],layerView:e};const o=Object.keys(l).indexOf(h)>-1?l[h]:n[h];if(t===u.ADD)o.addIds=[...new Set([...i,...o.addIds])],o.addIds.length>0&&s.push({ids:i,mode:t,layerView:e}),o.removeIds.length>0&&(o.removeIds=o.removeIds.filter((t=>i.indexOf(t)<0)));else{const l=this.selectionSets.reduce(((t,s)=>(i.forEach((i=>{s.workflowType!==b.REFINE?s.selectedIds.indexOf(i)>-1&&t.push(i):Object.keys(s.refineInfos).some((a=>{const l=s.refineInfos[a];if(l.layerView.layer.id===e.layer.id&&l.addIds.indexOf(i)>-1)return t.push(i),!0}))})),t)),[]);o.removeIds=[...new Set([...l,...o.removeIds])],o.addIds=o.addIds.filter((i=>l.indexOf(i)<0)),o.removeIds.length>0&&s.push({ids:l,mode:t,layerView:e}),this.selectionSets=this.selectionSets.reduce(((i,t)=>(t.workflowType!==b.REFINE&&t.layerView.layer.id===e.layer.id?(t.selectedIds=t.selectedIds.filter((i=>o.removeIds.indexOf(i)<0)),t.selectedIds.length>0?i.push(t):a=!0):i.push(t),i)),[])}this._refineSelectionSet.refineInfos[h]=o,this.selectionSets=[...this.selectionSets],a&&this.selectionSetsChanged.emit(this.selectionSets),await this._highlightFeatures()}get el(){return a(this)}};x.style=':host{display:block}.div-visible{display:inherit}.div-not-visible{display:none !important}.padding-top-1-2{padding-top:.5rem}.main-label{display:flex;float:left}html[dir="rtl"] .main-label{display:flex;float:right}.border{outline:1px solid var(--calcite-ui-border-input)}.margin-top-1{margin-top:1rem}.esri-sketch{display:flex;flex-flow:column wrap}.esri-widget{box-sizing:border-box;color:#323232;font-size:14px;font-family:"Avenir Next","Helvetica Neue",Helvetica,Arial,sans-serif;line-height:1.3em;background-color:var(--calcite-ui-foreground-1)}.esri-sketch__panel{align-items:center;display:flex;flex-flow:row nowrap;padding:0}*/ .esri-sketch__tool-section{border-right:1px solid rgba(110,110,110,.3)}.esri-sketch__section{align-items:center;display:flex;flex-flow:row nowrap;padding:0 7px;margin:6px 0;border-right:1px solid rgba(110,110,110,.3)}.display-flex{display:flex}.font-bold{font-weight:bold}.width-full{width:100%}.label-margin-0{--calcite-label-margin-bottom:0}.padding-start-1-2{padding-inline-start:0.5rem}.font-weight-500{font-weight:500}.word-wrap-anywhere{word-wrap:anywhere}';export{_ as map_select_tools,P as pdf_download,x as refine_selection}
@@ -0,0 +1,6 @@
1
+ /*!
2
+ * Copyright 2022 Esri
3
+ * Licensed under the Apache License, Version 2.0
4
+ * http://www.apache.org/licenses/LICENSE-2.0
5
+ */
6
+ import{r as t,h as i,H as e,g as h}from"./p-9310b882.js";import{g as s}from"./p-7f9642d5.js";import{E as l}from"./p-868df4a0.js";import"./p-e1a4994d.js";const a=class{constructor(i){t(this,i),this.classicGrid=!1,this.showNewestFirst=!0,this.hideMap=!1,this.mapInfos=[],this.searchConfiguration=void 0,this.zoomAndScrollToSelected=!1,this._expandPopup=!1,this._translations=void 0,this._layoutMode=l.GRID,this._mapView=void 0,this._panelOpen=!0}async layoutChanged(t){this._layoutMode=t.detail}async mapChanged(t){const i=t.detail;this._expandPopup=!1,this._mapInfo=this._getMapInfo(i.id),this._mapView=i.mapView,this._mapView.popupEnabled=!1}async componentWillLoad(){await this._getTranslations()}render(){return i(e,null,i("calcite-shell",{class:"position-relative"},i("calcite-panel",{class:"width-full height-full"},this._getBody(this._layoutMode,this._panelOpen,this.hideMap))))}_getDividerIcon(t,i){let e="";switch(t){case l.HORIZONTAL:e=this.classicGrid?i?"chevrons-down":"chevrons-up":i?"chevrons-up":"chevrons-down";break;case l.VERTICAL:e=this.classicGrid?i?"chevrons-right":"chevrons-left":i?"chevrons-left":"chevrons-right";break;case l.GRID:e=this.classicGrid?i?"chevrons-up":"chevrons-down":i?"chevrons-left":"chevrons-right"}return e}_getMapSizeClass(t,i){let e="";switch(t){case l.HORIZONTAL:e=(i?"height-1-2":"height-0")+" width-full position-relative";break;case l.GRID:e=this.classicGrid?(i?"position-relative":"position-absolute-53")+" height-full width-full display-flex":"height-full position-relative "+(i?"width-1-3":"width-0");break;case l.VERTICAL:e="height-full position-relative "+(i?"width-1-2":"width-0")}return e}_getTableSizeClass(t,i){let e="";switch(t){case l.HORIZONTAL:e=(i?"height-1-2":"height-full")+" width-full display-flex flex-column";break;case l.GRID:e=this.classicGrid?(i?"height-full":"height-53")+" position-relative width-full display-flex":(i?"width-2-3":"width-full")+" height-full display-flex";break;case l.VERTICAL:e=(i?"width-1-2":"width-full")+" height-full display-flex"}return e}_getBody(t,e,h){const s=this.classicGrid&&t===l.GRID&&e?"display-grid":t===l.HORIZONTAL?"":"display-flex";return i("calcite-panel",{class:"width-full height-full"},this.classicGrid?i("div",{class:`width-full height-full ${s}`},this._getTable(t,e),this._getMapAndCard(t,e,h)):i("div",{class:`width-full height-full ${s}`},this._getMapAndCard(t,e,h),this._getTable(t,e)))}_getMapAndCard(t,e,h){const s=this._getMapSizeClass(t,e);return this.classicGrid?i("div",{class:`${s} overflow-hidden`},this._getCardNode(t,h),this._getMapNode(t,h)):i("div",{class:`${s} overflow-hidden`},this._getMapNode(t,h),this._getPopupExpandNode(),this._getCardNode(t,h))}_getMapNode(t,e){return i("div",{class:`${this.classicGrid&&t===l.GRID?"width-full":this._expandPopup?"height-50-px":"adjusted-height-50"} overflow-hidden ${this.classicGrid&&t===l.GRID?"display-flex height-full width-1-2":t!==l.GRID||e?"display-none":""}`},i("map-card",{class:"width-full",mapInfos:this.mapInfos}))}_getPopupExpandNode(){const t=this._expandPopup?"chevrons-down":"chevrons-up";return i("div",{class:"height-49-px calcite-mode-dark"},i("calcite-panel",null,i("div",{class:"display-flex align-items-center",slot:"header-content"},i("calcite-icon",{class:"padding-inline-end-75",icon:"information",scale:"s"}),i("div",null,this._translations.information)),i("calcite-action",{class:"height-49-px",icon:t,onClick:()=>this._togglePopup(),slot:"header-actions-end"})))}_togglePopup(){this._expandPopup=!this._expandPopup}_getCardNode(t,e){return i("div",{class:"padding-1-2 "+(this.classicGrid&&t===l.GRID?"width-full adjusted-height-100":this._expandPopup?"width-50 adjusted-height-100-50":"width-50 height-full")},i("card-manager",{class:(this.classicGrid&&t===l.GRID?"":t!==l.GRID||this._expandPopup||e?"adjusted-height-100":"adjusted-height-50")+" width-full",mapView:null==this?void 0:this._mapView,zoomAndScrollToSelected:this.zoomAndScrollToSelected}))}_getTable(t,e){const h=this._getTableSizeClass(t,e),s=this._getDividerIcon(t,e),a=e?this._translations.close:this._translations.open,o="toggle-layout";return i("calcite-shell",{class:h+" border-bottom"},i("calcite-action-bar",{class:"border",expandDisabled:!0,layout:t===l.HORIZONTAL||this.classicGrid?"horizontal":"vertical",slot:this.classicGrid&&t!==l.VERTICAL?"footer":this.classicGrid&&t===l.VERTICAL?"panel-end":t===l.HORIZONTAL?"header":"panel-start"},i("calcite-action",{class:"toggle-node",icon:s,id:o,onClick:()=>this._toggleLayout(),text:""}),i("calcite-tooltip",{label:a,placement:"bottom","reference-element":o},i("span",null,a))),i("div",{class:"width-full height-full position-relative"},i("layer-table",{mapInfo:this._mapInfo,mapView:null==this?void 0:this._mapView,showNewestFirst:this.showNewestFirst,zoomAndScrollToSelected:this.zoomAndScrollToSelected})))}_toggleLayout(){this._panelOpen=!this._panelOpen}_getMapInfo(t){let i;return this.mapInfos.some((e=>{if(e.id===t)return i=e,!0})),i}async _getTranslations(){const t=await s(this.el);this._translations=t[0]}get el(){return h(this)}};a.style=":host{display:block;--calcite-label-margin-bottom:0px}.padding-1-2{padding:0.5rem}.display-flex{display:flex}.width-full{width:100%}.width-1-2{position:relative;width:50%}.width-1-3{position:relative;width:33.33%}.width-2-3{position:relative;width:66.66%}.width-0{width:0}.height-full{height:100%}.height-1-2{position:relative;height:50%}.height-0{height:0}.toggle-node{width:51px;height:51px}.overflow-hidden{overflow:hidden}.flex-column{flex-direction:column}.border{border:1px solid var(--calcite-ui-border-3)}.border-bottom{border-bottom:1px solid var(--calcite-ui-border-3)}.position-relative{position:relative}.height-50{height:50%}.adjusted-height-50{height:calc(50% - 0.5rem - 25px)}.adjusted-height-100{height:calc(100% - 1rem - 50px)}.adjusted-height-100-50{height:calc(100% - 50px)}.display-none{display:none}.height-53{height:53px}.position-absolute-53{position:absolute;top:53px}.display-grid{display:grid}.height-49-px{height:49px}.height-50-px{height:50px}.padding-inline-end-75{padding-inline-end:0.75rem}.align-items-center{align-items:center}";export{a as crowdsource_manager}
@@ -0,0 +1,6 @@
1
+ /*!
2
+ * Copyright 2022 Esri
3
+ * Licensed under the Apache License, Version 2.0
4
+ * http://www.apache.org/licenses/LICENSE-2.0
5
+ */
6
+ import{r as t,h as i,H as s,g as e,c as a}from"./p-9310b882.js";import{l as n}from"./p-0266ca81.js";import{g as h}from"./p-7f9642d5.js";import{g as o}from"./p-868df4a0.js";import"./p-e1a4994d.js";const r=class{constructor(i){t(this,i),this.mapView=void 0,this.basemapWidget=void 0}async mapViewWatchHandler(){await this.mapView.when((()=>{this._initBaseMapGallery(this.mapView)}))}async componentWillLoad(){return this._initModules()}render(){return i(s,null,i("div",{ref:t=>{this._basemapElement=t}}))}async _initModules(){const[t]=await n(["esri/widgets/BasemapGallery"]);this.BasemapGallery=t}_initBaseMapGallery(t){t&&this.BasemapGallery&&(this.basemapWidget?this.basemapWidget.view=t:this.basemapWidget=new this.BasemapGallery({container:this._basemapElement,view:t}))}get el(){return e(this)}static get watchers(){return{mapView:["mapViewWatchHandler"]}}};r.style=":host{display:block}";const c=class{constructor(i){t(this,i),this.mapView=void 0,this.legendWidget=void 0}async mapViewWatchHandler(){await this.mapView.when((()=>{this._initLegend(this.mapView)}))}async componentWillLoad(){return this._initModules()}render(){return i(s,null,i("div",{ref:t=>{this._legendElement=t}}))}async _initModules(){const[t]=await n(["esri/widgets/Legend"]);this.Legend=t}_initLegend(t){t&&this.Legend&&(this.legendWidget?this.legendWidget.view=t:this.legendWidget=new this.Legend({container:this._legendElement,view:t}))}get el(){return e(this)}static get watchers(){return{mapView:["mapViewWatchHandler"]}}};c.style=":host{display:block}";const l=class{constructor(i){t(this,i),this.mapInfoChange=a(this,"mapInfoChange",7),this._loadedId="",this.mapInfos=[],this._mapListExpanded=!1,this._webMapInfo=void 0}_webMapInfoWatchHandler(t,i){t&&JSON.stringify(t)!==JSON.stringify(i)&&(this._loadedId=null==t?void 0:t.id,this.mapInfoChange.emit(t))}mapInfosWatchHandler(t,i){t&&JSON.stringify(t)!==JSON.stringify(i)&&this.mapInfoChange.emit(t[0])}render(){return i(s,null,this._getToolbar(),this._getMapNameList(this._mapListExpanded))}async componentDidRender(){this._mapListExpanded&&await this._list.setFocus()}componentDidLoad(){const t=this.mapInfos&&this.mapInfos.length>0?this.mapInfos[0]:void 0;t&&this._webMapSelected(t)}_getMapPicker(){var t;return i("calcite-button",{alignment:"icon-end-space-between",appearance:"transparent",class:"width-full height-full",iconEnd:this._mapListExpanded?"chevron-up":"chevron-down",kind:"neutral",onClick:()=>this._chooseMap(),width:"full"},null===(t=this._webMapInfo)||void 0===t?void 0:t.name)}_getToolbar(){return i("div",{class:"display-flex"},i("calcite-action-bar",{class:"action-bar-color border-bottom-1 action-bar-size","expand-disabled":!0,layout:"horizontal",slot:"header"},this._getMapPicker()))}_getMapNameList(t){return i("div",{class:t?"map-list":"display-none"},i("calcite-list",{id:"mapList",ref:t=>this._list=t,selectionAppearance:"border"},this.mapInfos.map((t=>i("calcite-list-item",{label:t.name,onClick:()=>this._webMapSelected(t),selected:t.id===this._loadedId,value:t.id})))))}_webMapSelected(t){this._mapListExpanded=!1,this._webMapInfo=t}_chooseMap(){this._mapListExpanded=!this._mapListExpanded}get el(){return e(this)}static get watchers(){return{_webMapInfo:["_webMapInfoWatchHandler"],mapInfos:["mapInfosWatchHandler"]}}};l.style=":host{display:block}.width-full{width:100%}.height-full{height:100%}.display-flex{display:flex}.border-bottom-1{border-width:0px;border-bottom-width:1px;border-style:solid;border-color:var(--calcite-ui-border-3)}.action-bar-size{height:51px;width:100%}.map-list{position:absolute;display:flex;flex-direction:column;overflow:hidden;animation:calcite-scrim-fade-in var(--calcite-internal-animation-timing-medium) ease-in-out;background-color:var(--calcite-scrim-background);z-index:1000;width:100%;height:-moz-fit-content;height:fit-content}.display-none{display:none}.action-bar-color{background-color:var(--calcite-ui-border-3) !important}";const d=class{constructor(i){t(this,i),this.mapView=void 0,this.popupEnabled=!1,this.resultGraphicEnabled=!1,this.searchConfiguration=void 0,this.searchTerm=void 0,this.searchWidget=void 0}async watchSearchConfigurationHandler(){this._initSearchWidget()}async mapViewWatchHandler(){await this.mapView.when((()=>{this._initSearchWidget()}))}async componentWillLoad(){await this._initModules()}async componentDidLoad(){return this._initSearchWidget()}render(){return i(s,null,i("div",{class:"search-widget",ref:t=>{this._searchElement=t}}))}async _initModules(){const[t,i]=await n(["esri/widgets/Search","esri/layers/FeatureLayer"]);this.Search=t,this.FeatureLayer=i}_initSearchWidget(){if(this.mapView&&this._searchElement&&!this.searchWidget){let t={view:this.mapView,container:this._searchElement,searchTerm:this.searchTerm};if(this.searchConfiguration){const i=this._getSearchConfig(this.searchConfiguration,this.mapView);t=Object.assign({},i)}this.searchWidget=new this.Search(t),this.searchWidget.popupEnabled=this.popupEnabled,this.searchWidget.resultGraphicEnabled=this.resultGraphicEnabled}else this.searchWidget&&(this.searchWidget.view=this.mapView)}_getSearchConfig(t,i){const s=t.sources;return(null==s?void 0:s.length)>0?(t.includeDefaultSources=!1,s.forEach((t=>{var s,e;if(t.hasOwnProperty("layer")){const a=t,n=null===(s=a.layer)||void 0===s?void 0:s.id,h=n?i.map.findLayerById(n):null,o=null===(e=null==a?void 0:a.layer)||void 0===e?void 0:e.url;h?a.layer=h:o&&(a.layer=new this.FeatureLayer(o))}})),null==s||s.forEach((t=>{if(t.hasOwnProperty("locator")){const i=t;"ArcGIS World Geocoding Service"===(null==i?void 0:i.name)&&(i.outFields=i.outFields||["Addr_type","Match_addr","StAddr","City"],i.singleLineFieldName="SingleLine"),i.url=i.url,delete i.url}}))):t=Object.assign(Object.assign({},t),{includeDefaultSources:!0}),t}static get watchers(){return{searchConfiguration:["watchSearchConfigurationHandler"],mapView:["mapViewWatchHandler"]}}};d.style=":host{display:block}.search-widget{width:100% !important;border:1px solid var(--calcite-ui-border-input)}";const p=class{constructor(i){t(this,i),this.expandMap=a(this,"expandMap",7),this.layout="vertical",this.mapView=void 0,this.searchConfiguration=void 0,this._translations=void 0,this._showTools=!0,this._showBasemapWidget=!1,this._showLegendWidget=!1,this._showSearchWidget=!1}async _showBasemapWidgetWatchHandler(t){t?this.mapView.ui.add(this._basemapElement.basemapWidget,{position:"top-right",index:1}):this.mapView.ui.remove(this._basemapElement.basemapWidget)}async _showLegendWidgetWatchHandler(t){t?this.mapView.ui.add(this._legendElement.legendWidget,{position:"top-right",index:1}):this.mapView.ui.remove(this._legendElement.legendWidget)}async _showSearchWidgetWatchHandler(t){t?this.mapView.ui.add(this._searchElement.searchWidget,{position:"top-right",index:1}):this.mapView.ui.remove(this._searchElement.searchWidget)}async componentWillLoad(){await this._getTranslations()}render(){const t=this._showTools?"":"display-none",e=this._showSearchWidget?"":"display-none",a=this._showBasemapWidget?"":"display-none",n=this._showLegendWidget?"":"display-none";return i(s,null,i("div",null,i("calcite-action",{alignment:"center",class:"border square-40",compact:!1,icon:this._showTools?"chevrons-up":"chevrons-down",onClick:()=>{this._toggleTools()},scale:"s",text:""}),i("calcite-action-bar",{class:`width-40 border margin-top-1-2 ${t}`,"expand-disabled":!0,layout:this.layout},this._getActionGroup("legend",!1,this._translations.legend,(()=>this._showLegend())),this._getActionGroup("magnifying-glass",!1,this._translations.search,(()=>this._search())),this._getActionGroup("expand",!1,this._translations.expand,(()=>this._expand())),this._getActionGroup("basemap",!1,this._translations.basemap,(()=>this._toggleBasemapPicker())))),i("basemap-gallery",{class:a,mapView:this.mapView,ref:t=>{this._basemapElement=t}}),i("map-search",{class:e,mapView:this.mapView,ref:t=>{this._searchElement=t},searchConfiguration:this.searchConfiguration}),i("map-legend",{class:n,mapView:this.mapView,ref:t=>{this._legendElement=t}}))}_getActionGroup(t,s,e,a){return i("calcite-action-group",{class:"square-40-41"},i("calcite-action",{alignment:"center",class:"square-40",compact:!1,disabled:s,icon:t,id:t,onClick:a,scale:"s",text:""},i("calcite-icon",{icon:"cheveron-up",scale:"s",slot:"icon"})),i("calcite-tooltip",{label:"",placement:"trailing","reference-element":t},i("span",null,e)))}_showLegend(){this._showLegendWidget=!this._showLegendWidget,this._showTools=!1}_search(){this._showSearchWidget=!this._showSearchWidget,this._showTools=!1}_toggleBasemapPicker(){this._showBasemapWidget=!this._showBasemapWidget,this._showTools=!1}_expand(){this.expandMap.emit(o.EXPAND)}_toggleTools(){this._showTools||(this._showBasemapWidget=!1,this._showSearchWidget=!1,this._showLegendWidget=!1),this._showTools=!this._showTools}async _getTranslations(){const t=await h(this.el);this._translations=t[0]}get el(){return e(this)}static get watchers(){return{_showBasemapWidget:["_showBasemapWidgetWatchHandler"],_showLegendWidget:["_showLegendWidgetWatchHandler"],_showSearchWidget:["_showSearchWidgetWatchHandler"]}}};p.style=":host{display:block}.display-none{display:none}.border{border:1px solid var(--calcite-ui-border-3)}.margin-top-1-2{margin-top:0.5rem}.square-40{width:40px;height:40px}.width-40{width:40px}.square-40-41{width:40px;height:41px}";export{r as basemap_gallery,c as map_legend,l as map_picker,d as map_search,p as map_tools}