@esri/solutions-components 5.1.0-next.163 → 5.1.0-next.165
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdn/22BT2PBE.js +338 -0
- package/dist/cdn/{CYEFGPUM.js → 25HVM373.js} +1 -1
- package/dist/cdn/{CFJ4FEY3.js → 26LDC3OX.js} +1 -1
- package/dist/cdn/275IZ5I6.js +5 -0
- package/dist/cdn/{FA5CJT2S.js → 2D6HFQD5.js} +1 -1
- package/dist/cdn/{QTFTJ4DQ.js → 2EXGHOIM.js} +1 -1
- package/dist/cdn/{F3A22NPP.js → 2NSMAAXL.js} +1 -1
- package/dist/cdn/{A2VP46QZ.js → 2R7Y2ZVX.js} +1 -1
- package/dist/cdn/{3KRXI2TQ.js → 2RL6H5TB.js} +1 -1
- package/dist/cdn/{A6VVARNG.js → 2TEBTKD4.js} +1 -1
- package/dist/cdn/354D2K6F.js +2 -0
- package/dist/cdn/{D4TEADUS.js → 37P3IMFV.js} +1 -1
- package/dist/cdn/{C5BQAX2M.js → 3A3CPQX4.js} +1 -1
- package/dist/cdn/{V74POSPP.js → 3J5ZSELO.js} +1 -1
- package/dist/cdn/{Q4X6GXRI.js → 3JCHYXHA.js} +1 -1
- package/dist/cdn/3SMHMC4L.js +2 -0
- package/dist/cdn/{S4ZMJ42A.js → 3UCDO65S.js} +1 -1
- package/dist/cdn/{CPOZIWVH.js → 463CZQF6.js} +1 -1
- package/dist/cdn/{BQ7O62CG.js → 47FRMYZ4.js} +1 -1
- package/dist/cdn/4A77MNRM.js +2 -0
- package/dist/cdn/{UXN2MYLX.js → 4HRGPGDM.js} +1 -1
- package/dist/cdn/{U6DXEFHP.js → 4RCC4KA2.js} +1 -1
- package/dist/cdn/{WXM3KMEV.js → 4SORDX5Z.js} +1 -1
- package/dist/cdn/{EHSIODIO.js → 54A4C4RG.js} +1 -1
- package/dist/cdn/54TJQLYJ.js +69 -0
- package/dist/cdn/{D5JF7XQN.js → 56DNSWXG.js} +1 -1
- package/dist/cdn/{OMRM5EXN.js → 5FWKODDH.js} +1 -1
- package/dist/cdn/{G63OYQ7G.js → 5IDPOFIN.js} +1 -1
- package/dist/cdn/{TLRBE2TZ.js → 5LSNDSHW.js} +1 -1
- package/dist/cdn/{I4EEOB6Y.js → 5N4KGIIY.js} +1 -1
- package/dist/cdn/{QLX3XORL.js → 5W7G3TSG.js} +6 -4
- package/dist/cdn/{MDKHW7NM.js → 62GTPPV5.js} +1 -1
- package/dist/cdn/{MLNGJEKI.js → 67CEWYTY.js} +1 -1
- package/dist/cdn/6FY64JKN.js +2 -0
- package/dist/cdn/{EYJQEBDF.js → 6HZBPFHA.js} +1 -1
- package/dist/cdn/{YCIKY6QN.js → 6PZSOVYB.js} +1 -1
- package/dist/cdn/{FZNRD2XJ.js → 6WNKGSHD.js} +1 -1
- package/dist/cdn/{KMKZEHDS.js → 6WVYNWVR.js} +1 -1
- package/dist/cdn/{MBVY6OPY.js → 743J2ZUC.js} +1 -1
- package/dist/cdn/{7YJMTZFC.js → 77753TPX.js} +1 -1
- package/dist/cdn/{W7VD3QDN.js → 7VY3RI7C.js} +1 -1
- package/dist/cdn/A2A3RFJ6.js +2 -0
- package/dist/cdn/{GABDTUB7.js → A6ZTIX3P.js} +1 -1
- package/dist/cdn/{6LHIJG7J.js → AAUM57XI.js} +1 -1
- package/dist/cdn/{MTEVQC6W.js → ADURBGIK.js} +1 -1
- package/dist/cdn/{IGQJLEEJ.js → APNDTPBA.js} +1 -1
- package/dist/cdn/{S47SVZPE.js → ARFBMFQW.js} +1 -1
- package/dist/cdn/ATEW4U4A.js +2 -0
- package/dist/cdn/{3SDEIO24.js → AYHTQTVS.js} +1 -1
- package/dist/cdn/{KU2LYW6K.js → BIX5DRQP.js} +1 -1
- package/dist/cdn/{G2RMWJ7R.js → BOFA5RH7.js} +1 -1
- package/dist/cdn/{P7LSYADG.js → BWWX52HV.js} +1 -1
- package/dist/cdn/{QPX33Y62.js → BXSBR2GT.js} +1 -1
- package/dist/cdn/{QBARJMJE.js → CMCEF65U.js} +1 -1
- package/dist/cdn/CRDFUDM4.js +45 -0
- package/dist/cdn/{4AFANEZZ.js → CS5N3DOL.js} +1 -1
- package/dist/cdn/{3D5OFNW5.js → CU2JLCTZ.js} +1 -1
- package/dist/cdn/{F6J3OLVZ.js → CV4B2O7J.js} +1 -1
- package/dist/cdn/{TTCTODAR.js → CVXDL2AT.js} +1 -1
- package/dist/cdn/{XHFFDKEQ.js → D22STVK5.js} +1 -1
- package/dist/cdn/{XF5N3NI5.js → DIBK4RSG.js} +1 -1
- package/dist/cdn/{JCQQIAIE.js → DQ47P6ES.js} +1 -1
- package/dist/cdn/{X52T6DJT.js → DVPYGOBV.js} +1 -1
- package/dist/cdn/E3F63VW4.js +2 -0
- package/dist/cdn/EL3OIP52.js +31 -0
- package/dist/cdn/{WQHJMFGP.js → ENXQ33P7.js} +1 -1
- package/dist/cdn/{SGU3KCZB.js → ERLDQUNI.js} +1 -1
- package/dist/cdn/EUI6UDCN.js +43 -0
- package/dist/cdn/{RQIGAX6O.js → EWS72RFR.js} +1 -1
- package/dist/cdn/{4PNNKMNH.js → F4MS4NQL.js} +1 -1
- package/dist/cdn/{UA6XD7SQ.js → FFZ2XVRE.js} +1 -1
- package/dist/cdn/{7FZDDT7D.js → FMPY32BG.js} +1 -1
- package/dist/cdn/{XKEKXTL2.js → FSF3T3OT.js} +1 -1
- package/dist/cdn/{3A5WS2II.js → FUW3T6S6.js} +1 -1
- package/dist/cdn/{JFLG3EKT.js → FYJMHXWV.js} +1 -1
- package/dist/cdn/{57SZHKM5.js → G4V4JPFI.js} +1 -1
- package/dist/cdn/GSCHQNQD.js +56 -0
- package/dist/cdn/{SHI2ULEO.js → GSR2GEY7.js} +1 -1
- package/dist/cdn/{2OCRSUSE.js → GUSPFJUQ.js} +1 -1
- package/dist/cdn/{LY3WRG7K.js → GVMTSUDH.js} +1 -1
- package/dist/cdn/{A62EWI7L.js → H4LZV33O.js} +1 -1
- package/dist/cdn/{SC4UAHYZ.js → HAMYUUYZ.js} +1 -1
- package/dist/cdn/{4ALVWOG7.js → HDMAFAEM.js} +1 -1
- package/dist/cdn/{X65HFYH4.js → HIB4BVGK.js} +1 -1
- package/dist/cdn/{2I5LGZNX.js → HIPZRG2Q.js} +1 -1
- package/dist/cdn/{LXGY2E55.js → HKFXHTYU.js} +1 -1
- package/dist/cdn/{EKK5FR2V.js → HM2QALUN.js} +1 -1
- package/dist/cdn/{MISU75DC.js → HQCHD3FH.js} +1 -1
- package/dist/cdn/HRQVJBRJ.js +2 -0
- package/dist/cdn/HXNARVYH.js +3 -0
- package/dist/cdn/{H3NPAQ3U.js → I4PBOBUM.js} +1 -1
- package/dist/cdn/{V7WSQCQY.js → IAEFPE3L.js} +1 -1
- package/dist/cdn/INLWMPGE.js +2 -0
- package/dist/cdn/ITCC5G26.js +136 -0
- package/dist/cdn/IXPNZCW6.js +2 -0
- package/dist/cdn/{SMN3CVM5.js → IXRFWVBT.js} +1 -1
- package/dist/cdn/JFMNVOWH.js +2 -0
- package/dist/cdn/{WCD4U7UJ.js → JFPR5QIQ.js} +1 -1
- package/dist/cdn/{DF7TCZUS.js → KDDHPA54.js} +1 -1
- package/dist/cdn/{3IO2JXVB.js → KR2PPIBX.js} +1 -1
- package/dist/cdn/LGBRHJBY.js +109 -0
- package/dist/cdn/{5K5GHKON.js → LV5KMTCD.js} +1 -1
- package/dist/cdn/LVYAW6XF.js +2 -0
- package/dist/cdn/LWJF6EXD.js +85 -0
- package/dist/cdn/{55QBAVPE.js → M6AOD7GG.js} +1 -1
- package/dist/cdn/{MJ6JD7WX.js → MFFM74RG.js} +1 -1
- package/dist/cdn/{XM3SRZWV.js → MIV34H66.js} +1 -1
- package/dist/cdn/{EF2TTWG5.js → MKSUYITL.js} +1 -1
- package/dist/cdn/{HGOYPWOK.js → MOSQBUUZ.js} +1 -1
- package/dist/cdn/MV7GEGP5.js +98 -0
- package/dist/cdn/{26QXT6ZT.js → O4DB2EXV.js} +1 -1
- package/dist/cdn/OAUHQK3Y.js +54 -0
- package/dist/cdn/{CZVHNBQN.js → OBCXHY24.js} +1 -1
- package/dist/cdn/{UUIKE2AH.js → ON4EBR25.js} +1 -1
- package/dist/cdn/{R2JOPHL5.js → OUMIC7G7.js} +1 -1
- package/dist/cdn/{F5SUVMAE.js → OZ4IYASP.js} +1 -1
- package/dist/cdn/{FBSKACM2.js → P666D4WT.js} +1 -1
- package/dist/cdn/PGTLLFW6.js +3 -0
- package/dist/cdn/{WCXR46D4.js → PLQEDCUG.js} +1 -1
- package/dist/cdn/PLXHBQBF.js +146 -0
- package/dist/cdn/{22BJ76LD.js → PM4EFNB2.js} +1 -1
- package/dist/cdn/PPFEO3UH.js +2 -0
- package/dist/cdn/{IE5TTSUW.js → QH6PUU3Q.js} +15 -16
- package/dist/cdn/{UBPOT5V3.js → QMAV4UTN.js} +1 -1
- package/dist/cdn/{CAXDDYGL.js → QYCERRRZ.js} +1 -1
- package/dist/cdn/{7JC52SFZ.js → QZ2ZMWIH.js} +1 -1
- package/dist/cdn/{CAYWD56D.js → R27S3IDW.js} +1 -1
- package/dist/cdn/RDJIKSXN.js +439 -0
- package/dist/cdn/{ACTJS4TX.js → RDRCAA3H.js} +1 -1
- package/dist/cdn/{I2NTSKBD.js → RLSY4VUQ.js} +1 -1
- package/dist/cdn/{HVT2WBVC.js → S4GBMN37.js} +1 -1
- package/dist/cdn/{KTRKTBPS.js → SGFSVWTY.js} +1 -1
- package/dist/cdn/{UNBGBQPR.js → SHEDDVHQ.js} +1 -1
- package/dist/cdn/{5F6KCXYP.js → SJLSYFK3.js} +1 -1
- package/dist/cdn/T3EPRHTT.js +4 -0
- package/dist/cdn/TLIIJ2QC.js +122 -0
- package/dist/cdn/{BM4VSEDV.js → TWJ6DAY5.js} +1 -1
- package/dist/cdn/{KKEERGX7.js → TZHRYPII.js} +1 -1
- package/dist/cdn/U27263JW.js +2 -0
- package/dist/cdn/{DKXVDY6L.js → U2FC3BET.js} +1 -1
- package/dist/cdn/{FBGCV6YJ.js → UCYR537P.js} +1 -1
- package/dist/cdn/{LM46YQCN.js → UDPMO6YN.js} +1 -1
- package/dist/cdn/{DJYT367X.js → V5BIPD5T.js} +1 -1
- package/dist/cdn/{IOFIC3IG.js → VBJJQPZT.js} +1 -1
- package/dist/cdn/VDI7SDRK.js +5 -0
- package/dist/cdn/VDZT4UXB.js +36 -0
- package/dist/cdn/{24DOFCUH.js → VKHBBAXO.js} +1 -1
- package/dist/cdn/{O7VRD3Z3.js → VL2NVCIB.js} +1 -1
- package/dist/cdn/{RLYLBYMX.js → VN3AKGAY.js} +1 -1
- package/dist/cdn/{VTAQ6NBB.js → VUXNHQGR.js} +1 -1
- package/dist/cdn/{KIKSO3OQ.js → W5TNQMAJ.js} +1 -1
- package/dist/cdn/{PYPVVSIX.js → WDASGI72.js} +1 -1
- package/dist/cdn/{BATEZR3T.js → WNVC3PSY.js} +1 -1
- package/dist/cdn/WXDMML76.js +2 -0
- package/dist/cdn/{JEIP7CJK.js → XKFX43FE.js} +1 -1
- package/dist/cdn/{GLC7JVKG.js → XQ7SXIHI.js} +1 -1
- package/dist/cdn/{ISFTCFSJ.js → Y2AUIXNK.js} +1 -1
- package/dist/cdn/{L4BYLII5.js → Y3GFBLXF.js} +1 -1
- package/dist/cdn/{T6FQ2A4O.js → YEDC2OLI.js} +1 -1
- package/dist/cdn/{PEQUHMTU.js → YLIWN2J2.js} +1 -1
- package/dist/cdn/{LSBUPU7F.js → YOBHTTO5.js} +1 -1
- package/dist/cdn/YPDXQEUA.js +77 -0
- package/dist/cdn/{BVG2SE55.js → YSQDSGSF.js} +1 -1
- package/dist/cdn/{BEKMMPB7.js → YUI2MSOK.js} +1 -1
- package/dist/cdn/{ONARC6AZ.js → YUWXPLTE.js} +1 -1
- package/dist/cdn/{D2EVPZ5K.js → YW2WMW6B.js} +1 -1
- package/dist/cdn/{QWNRGCQS.js → ZWASNOIQ.js} +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/assessBuildRequest.js +15 -16
- package/dist/chunks/assessUpdateRequest.js +6 -4
- package/dist/chunks/classifyIntent.js +31 -44
- package/dist/chunks/interfaces.js +47 -47
- package/dist/chunks/solution-builder-assistant.js +24 -13
- package/dist/chunks/updateDesign.js +1 -1
- package/dist/chunks/validators.js +4 -3
- package/dist/components/arcgis-solutions-assistant/customElement.js +1031 -792
- package/dist/components/solutions-all-panel/customElement.js +1 -1
- package/dist/components/solutions-all-shell/customElement.js +22 -32
- package/dist/components/solutions-deploy-app/customElement.js +9 -9
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/solutions-components_commit.txt +5 -5
- package/package.json +1 -1
- package/dist/cdn/26EKIZQ3.js +0 -2
- package/dist/cdn/3Z7EYDFO.js +0 -434
- package/dist/cdn/5EXKQXLZ.js +0 -2
- package/dist/cdn/7VD3Y4IF.js +0 -2
- package/dist/cdn/DKQRECGR.js +0 -2
- package/dist/cdn/FE7HMUSZ.js +0 -2
- package/dist/cdn/FFF5HUPM.js +0 -4
- package/dist/cdn/J6OVONBB.js +0 -2
- package/dist/cdn/JDI57IEI.js +0 -98
- package/dist/cdn/JJDAJ7CL.js +0 -2
- package/dist/cdn/LHLLMC6K.js +0 -2
- package/dist/cdn/NRQI7YO3.js +0 -90
- package/dist/cdn/O4VFFJLQ.js +0 -2
- package/dist/cdn/R4PQI4LJ.js +0 -2
- package/dist/cdn/TLY6ZEKN.js +0 -2
- package/dist/cdn/UBPCOTIY.js +0 -2
- package/dist/cdn/VHYS3SP3.js +0 -2
- package/dist/cdn/XA3SV62A.js +0 -2
- package/dist/cdn/YGWYD3LU.js +0 -3
- package/dist/cdn/ZI7OWB5M.js +0 -2
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
+
var p=(s,t,...e)=>{try{return s?.call(t,...e)}catch(o){console.error(o,s)}},M=async(s,t,...e)=>{try{return await s?.call(t,...e)}catch(o){console.error(o,s)}};var j=Symbol.for("controller"),_e=s=>typeof s=="object"&&s!==null&&(j in s||"hostConnected"in s||"hostDisconnected"in s||"hostUpdate"in s||"hostUpdated"in s),as=s=>typeof s?.then=="function";var k,O=s=>{k!==s&&(k=s,queueMicrotask(()=>k===s?k=void 0:0))},H=s=>k,w=[],It=s=>{if(s===void 0){w=[];return}let t=w.indexOf(s);w=t===-1?[...w,s]:w.slice(0,t+1),queueMicrotask(()=>w=[])},Mt=()=>w,L,cs=s=>{L!==s&&(L=s,queueMicrotask(()=>L===s?L=void 0:0))},Ae=()=>{let s=L;return L=void 0,s},kt=async(s,t)=>{let e=Y(s);if(e===void 0)return s;if(await e.ready,typeof t=="function"){let o=e.watchExports(n=>t(n,o))}return e.exports},jt=async s=>{let t=Y(s);return await t.ready,t},Y=s=>{let e=H().manager.X(s);if(e!==void 0)return e;if(_e(s))return s;let o=Ae();if(o!==void 0)return o},J=!1,ls=s=>{J=!0;try{return s()}finally{J=!1}};var Z=globalThis,X=Z.ShadowRoot&&(Z.ShadyCSS===void 0||Z.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,yt=Symbol(),Ht=new WeakMap,z=class{constructor(t,e,o){if(this._$cssResult$=!0,o!==yt)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o,e=this.t;if(X&&t===void 0){let o=e!==void 0&&e.length===1;o&&(t=Ht.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),o&&Ht.set(e,t))}return t}toString(){return this.cssText}},zt=s=>new z(typeof s=="string"?s:s+"",void 0,yt),Ce=(s,...t)=>{let e=s.length===1?s[0]:t.reduce((o,n,r)=>o+(i=>{if(i._$cssResult$===!0)return i.cssText;if(typeof i=="number")return i;throw Error("Value passed to 'css' function must be a 'css' function result: "+i+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(n)+s[r+1],s[0]);return new z(e,s,yt)},Vt=(s,t)=>{if(X)s.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(let e of t){let o=document.createElement("style"),n=Z.litNonce;n!==void 0&&o.setAttribute("nonce",n),o.textContent=e.cssText,s.appendChild(o)}},gt=X?s=>s:s=>s instanceof CSSStyleSheet?(t=>{let e="";for(let o of t.cssRules)e+=o.cssText;return zt(e)})(s):s;var{is:we,defineProperty:Oe,getOwnPropertyDescriptor:Te,getOwnPropertyNames:Se,getOwnPropertySymbols:Pe,getPrototypeOf:Ne}=Object,et=globalThis,Bt=et.trustedTypes,De=Bt?Bt.emptyScript:"",xe=et.reactiveElementPolyfillSupport,V=(s,t)=>s,tt={toAttribute(s,t){switch(t){case Boolean:s=s?De:null;break;case Object:case Array:s=s==null?s:JSON.stringify(s)}return s},fromAttribute(s,t){let e=s;switch(t){case Boolean:e=s!==null;break;case Number:e=s===null?null:Number(s);break;case Object:case Array:try{e=JSON.parse(s)}catch{e=null}}return e}},B=(s,t)=>!we(s,t),Wt={attribute:!0,type:String,converter:tt,reflect:!1,useDefault:!1,hasChanged:B};Symbol.metadata??=Symbol("metadata"),et.litPropertyMetadata??=new WeakMap;var _=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=Wt){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){let o=Symbol(),n=this.getPropertyDescriptor(t,o,e);n!==void 0&&Oe(this.prototype,t,n)}}static getPropertyDescriptor(t,e,o){let{get:n,set:r}=Te(this.prototype,t)??{get(){return this[e]},set(i){this[e]=i}};return{get:n,set(i){let a=n?.call(this);r?.call(this,i),this.requestUpdate(t,a,o)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??Wt}static _$Ei(){if(this.hasOwnProperty(V("elementProperties")))return;let t=Ne(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(V("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(V("properties"))){let e=this.properties,o=[...Se(e),...Pe(e)];for(let n of o)this.createProperty(n,e[n])}let t=this[Symbol.metadata];if(t!==null){let e=litPropertyMetadata.get(t);if(e!==void 0)for(let[o,n]of e)this.elementProperties.set(o,n)}this._$Eh=new Map;for(let[e,o]of this.elementProperties){let n=this._$Eu(e,o);n!==void 0&&this._$Eh.set(n,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){let e=[];if(Array.isArray(t)){let o=new Set(t.flat(1/0).reverse());for(let n of o)e.unshift(gt(n))}else t!==void 0&&e.push(gt(t));return e}static _$Eu(t,e){let o=e.attribute;return o===!1?void 0:typeof o=="string"?o:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this))}addController(t){(this._$EO??=new Set).add(t),this.renderRoot!==void 0&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){let t=new Map,e=this.constructor.elementProperties;for(let o of e.keys())this.hasOwnProperty(o)&&(t.set(o,this[o]),delete this[o]);t.size>0&&(this._$Ep=t)}createRenderRoot(){let t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Vt(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,e,o){this._$AK(t,o)}_$ET(t,e){let o=this.constructor.elementProperties.get(t),n=this.constructor._$Eu(t,o);if(n!==void 0&&o.reflect===!0){let r=(o.converter?.toAttribute!==void 0?o.converter:tt).toAttribute(e,o.type);this._$Em=t,r==null?this.removeAttribute(n):this.setAttribute(n,r),this._$Em=null}}_$AK(t,e){let o=this.constructor,n=o._$Eh.get(t);if(n!==void 0&&this._$Em!==n){let r=o.getPropertyOptions(n),i=typeof r.converter=="function"?{fromAttribute:r.converter}:r.converter?.fromAttribute!==void 0?r.converter:tt;this._$Em=n;let a=i.fromAttribute(e,r.type);this[n]=a??this._$Ej?.get(n)??a,this._$Em=null}}requestUpdate(t,e,o,n=!1,r){if(t!==void 0){let i=this.constructor;if(n===!1&&(r=this[t]),o??=i.getPropertyOptions(t),!((o.hasChanged??B)(r,e)||o.useDefault&&o.reflect&&r===this._$Ej?.get(t)&&!this.hasAttribute(i._$Eu(t,o))))return;this.C(t,e,o)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,e,{useDefault:o,reflect:n,wrapped:r},i){o&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,i??e??this[t]),r!==!0||i!==void 0)||(this._$AL.has(t)||(this.hasUpdated||o||(e=void 0),this._$AL.set(t,e)),n===!0&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}let t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[n,r]of this._$Ep)this[n]=r;this._$Ep=void 0}let o=this.constructor.elementProperties;if(o.size>0)for(let[n,r]of o){let{wrapped:i}=r,a=this[n];i!==!0||this._$AL.has(n)||a===void 0||this.C(n,void 0,r,a)}}let t=!1,e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach(o=>o.hostUpdate?.()),this.update(e)):this._$EM()}catch(o){throw t=!1,this._$EM(),o}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach(e=>e.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach(e=>this._$ET(e,this[e])),this._$EM()}updated(t){}firstUpdated(t){}};_.elementStyles=[],_.shadowRootOptions={mode:"open"},_[V("elementProperties")]=new Map,_[V("finalized")]=new Map,xe?.({ReactiveElement:_}),(et.reactiveElementVersions??=[]).push("2.1.2");var Et=globalThis,Ft=s=>s,st=Et.trustedTypes,qt=st?st.createPolicy("lit-html",{createHTML:s=>s}):void 0,$t="$lit$",A=`lit$${Math.random().toFixed(9).slice(2)}$`,bt="?"+A,Le=`<${bt}>`,P=document,F=()=>P.createComment(""),q=s=>s===null||typeof s!="object"&&typeof s!="function",_t=Array.isArray,Zt=s=>_t(s)||typeof s?.[Symbol.iterator]=="function",vt=`[
|
|
3
|
+
\f\r]`,W=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Gt=/-->/g,Kt=/>/g,T=RegExp(`>|${vt}(?:([^\\s"'>=/]+)(${vt}*=${vt}*(?:[^
|
|
4
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),Qt=/'/g,Jt=/"/g,Xt=/^(?:script|style|textarea|title)$/i,At=s=>(t,...e)=>({_$litType$:s,strings:t,values:e}),ms=At(1),ys=At(2),gs=At(3),f=Symbol.for("lit-noChange"),d=Symbol.for("lit-nothing"),Yt=new WeakMap,S=P.createTreeWalker(P,129);function te(s,t){if(!_t(s)||!s.hasOwnProperty("raw"))throw Error("invalid template strings array");return qt!==void 0?qt.createHTML(t):t}var ee=(s,t)=>{let e=s.length-1,o=[],n,r=t===2?"<svg>":t===3?"<math>":"",i=W;for(let a=0;a<e;a++){let c=s[a],l,u,h=-1,m=0;for(;m<c.length&&(i.lastIndex=m,u=i.exec(c),u!==null);)m=i.lastIndex,i===W?u[1]==="!--"?i=Gt:u[1]!==void 0?i=Kt:u[2]!==void 0?(Xt.test(u[2])&&(n=RegExp("</"+u[2],"g")),i=T):u[3]!==void 0&&(i=T):i===T?u[0]===">"?(i=n??W,h=-1):u[1]===void 0?h=-2:(h=i.lastIndex-u[2].length,l=u[1],i=u[3]===void 0?T:u[3]==='"'?Jt:Qt):i===Jt||i===Qt?i=T:i===Gt||i===Kt?i=W:(i=T,n=void 0);let v=i===T&&s[a+1].startsWith("/>")?" ":"";r+=i===W?c+Le:h>=0?(o.push(l),c.slice(0,h)+$t+c.slice(h)+A+v):c+A+(h===-2?a:v)}return[te(s,r+(s[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),o]},G=class s{constructor({strings:t,_$litType$:e},o){let n;this.parts=[];let r=0,i=0,a=t.length-1,c=this.parts,[l,u]=ee(t,e);if(this.el=s.createElement(l,o),S.currentNode=this.el.content,e===2||e===3){let h=this.el.content.firstChild;h.replaceWith(...h.childNodes)}for(;(n=S.nextNode())!==null&&c.length<a;){if(n.nodeType===1){if(n.hasAttributes())for(let h of n.getAttributeNames())if(h.endsWith($t)){let m=u[i++],v=n.getAttribute(h).split(A),C=/([.?@])?(.*)/.exec(m);c.push({type:1,index:r,name:C[2],strings:v,ctor:C[1]==="."?nt:C[1]==="?"?rt:C[1]==="@"?it:D}),n.removeAttribute(h)}else h.startsWith(A)&&(c.push({type:6,index:r}),n.removeAttribute(h));if(Xt.test(n.tagName)){let h=n.textContent.split(A),m=h.length-1;if(m>0){n.textContent=st?st.emptyScript:"";for(let v=0;v<m;v++)n.append(h[v],F()),S.nextNode(),c.push({type:2,index:++r});n.append(h[m],F())}}}else if(n.nodeType===8)if(n.data===bt)c.push({type:2,index:r});else{let h=-1;for(;(h=n.data.indexOf(A,h+1))!==-1;)c.push({type:7,index:r}),h+=A.length-1}r++}}static createElement(t,e){let o=P.createElement("template");return o.innerHTML=t,o}};function N(s,t,e=s,o){if(t===f)return t;let n=o!==void 0?e._$Co?.[o]:e._$Cl,r=q(t)?void 0:t._$litDirective$;return n?.constructor!==r&&(n?._$AO?.(!1),r===void 0?n=void 0:(n=new r(s),n._$AT(s,e,o)),o!==void 0?(e._$Co??=[])[o]=n:e._$Cl=n),n!==void 0&&(t=N(s,n._$AS(s,t.values),n,o)),t}var ot=class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){let{el:{content:e},parts:o}=this._$AD,n=(t?.creationScope??P).importNode(e,!0);S.currentNode=n;let r=S.nextNode(),i=0,a=0,c=o[0];for(;c!==void 0;){if(i===c.index){let l;c.type===2?l=new U(r,r.nextSibling,this,t):c.type===1?l=new c.ctor(r,c.name,c.strings,this,t):c.type===6&&(l=new at(r,this,t)),this._$AV.push(l),c=o[++a]}i!==c?.index&&(r=S.nextNode(),i++)}return S.currentNode=P,n}p(t){let e=0;for(let o of this._$AV)o!==void 0&&(o.strings!==void 0?(o._$AI(t,o,e),e+=o.strings.length-2):o._$AI(t[e])),e++}},U=class s{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,o,n){this.type=2,this._$AH=d,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=o,this.options=n,this._$Cv=n?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode,e=this._$AM;return e!==void 0&&t?.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=N(this,t,e),q(t)?t===d||t==null||t===""?(this._$AH!==d&&this._$AR(),this._$AH=d):t!==this._$AH&&t!==f&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):Zt(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==d&&q(this._$AH)?this._$AA.nextSibling.data=t:this.T(P.createTextNode(t)),this._$AH=t}$(t){let{values:e,_$litType$:o}=t,n=typeof o=="number"?this._$AC(t):(o.el===void 0&&(o.el=G.createElement(te(o.h,o.h[0]),this.options)),o);if(this._$AH?._$AD===n)this._$AH.p(e);else{let r=new ot(n,this),i=r.u(this.options);r.p(e),this.T(i),this._$AH=r}}_$AC(t){let e=Yt.get(t.strings);return e===void 0&&Yt.set(t.strings,e=new G(t)),e}k(t){_t(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,o,n=0;for(let r of t)n===e.length?e.push(o=new s(this.O(F()),this.O(F()),this,this.options)):o=e[n],o._$AI(r),n++;n<e.length&&(this._$AR(o&&o._$AB.nextSibling,n),e.length=n)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){let o=Ft(t).nextSibling;Ft(t).remove(),t=o}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},D=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,o,n,r){this.type=1,this._$AH=d,this._$AN=void 0,this.element=t,this.name=e,this._$AM=n,this.options=r,o.length>2||o[0]!==""||o[1]!==""?(this._$AH=Array(o.length-1).fill(new String),this.strings=o):this._$AH=d}_$AI(t,e=this,o,n){let r=this.strings,i=!1;if(r===void 0)t=N(this,t,e,0),i=!q(t)||t!==this._$AH&&t!==f,i&&(this._$AH=t);else{let a=t,c,l;for(t=r[0],c=0;c<r.length-1;c++)l=N(this,a[o+c],e,c),l===f&&(l=this._$AH[c]),i||=!q(l)||l!==this._$AH[c],l===d?t=d:t!==d&&(t+=(l??"")+r[c+1]),this._$AH[c]=l}i&&!n&&this.j(t)}j(t){t===d?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},nt=class extends D{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===d?void 0:t}},rt=class extends D{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==d)}},it=class extends D{constructor(t,e,o,n,r){super(t,e,o,n,r),this.type=5}_$AI(t,e=this){if((t=N(this,t,e,0)??d)===f)return;let o=this._$AH,n=t===d&&o!==d||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,r=t!==d&&(o===d||n);n&&this.element.removeEventListener(this.name,this,o),r&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}},at=class{constructor(t,e,o){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=o}get _$AU(){return this._$AM._$AU}_$AI(t){N(this,t)}},se={M:$t,P:A,A:bt,C:1,L:ee,R:ot,D:Zt,V:N,I:U,H:D,N:rt,U:it,B:nt,F:at},Ue=Et.litHtmlPolyfillSupport;Ue?.(G,U),(Et.litHtmlVersions??=[]).push("3.3.3");var Ct=(s,t,e)=>{let o=e?.renderBefore??t,n=o._$litPart$;if(n===void 0){let r=e?.renderBefore??null;o._$litPart$=n=new U(t.insertBefore(F(),r),r,void 0,e??{})}return n._$AI(s),n};var wt=globalThis,E=class extends _{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){let e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Ct(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return f}};E._$litElement$=!0,E.finalized=!0,wt.litElementHydrateSupport?.({LitElement:E});var Re=wt.litElementPolyfillSupport;Re?.({LitElement:E});(wt.litElementVersions??=[]).push("4.2.2");var b=class{constructor(){this.promise=new Promise((t,e)=>{this.resolve=t,this.reject=e})}};var oe=(s,t)=>{let e=t>Ie?Me:t/ke,o=0,n=setInterval(()=>{o+=e,o>=t&&(clearInterval(n),s())},e);return n},Ie=4e3,Me=2e3,ke=4;var ne=new Set,re;var ie=s=>typeof s=="string"?s:"el"in s?s.el.localName:"localName"in s?s.localName:s.declaredClass,Ds=(s,t,e,o)=>{let n=ie(t);if(o?.once){let i=`${s}${n}${e}`;if(ne.has(i))return;ne.add(i)}let r;if(o?.detail){r={};for(let[i,a]of Object.entries(o.detail))if((typeof a=="object"||typeof a=="function")&&a!==null){let c=new WeakRef(a);Object.defineProperty(r,i,{enumerable:!0,get(){return c.deref()}})}else r[i]=a;re?.log.interceptors?.forEach(i=>i(s,n,e,r)),console[s](`[${n}]: ${e}`,r)}else re?.log.interceptors?.forEach(i=>i(s,n,e)),console[s](`[${n}]: ${e}`)},ae=s=>{let t=`[${ie(s)}] `;return e=>{let o=e instanceof Error&&e.message?e:new Error(String(e));o.message=`${t}${o.message}`,setTimeout(()=>{throw e})}};var je=(s,t,e)=>{let o=Object.keys(s),n=o.length;R===void 0&&queueMicrotask(I),R??=new Map;let r=R.get(s);return r===void 0&&(r={callbacks:[],keyCount:n},R.set(s,r)),r.keyCount!==n&&(r.callbacks.forEach(i=>i(o)),r.callbacks=[],r.keyCount=n),r.callbacks.push(i=>{let a=l=>p(t,null,l),c=i[n];c===void 0?a(void 0):s[c]===e?a(c):a(void 0)}),e},R,I=()=>{R?.forEach(({callbacks:s},t)=>{let e=Object.keys(t);s.forEach(o=>o(e))}),R=void 0},He=(s,t,e)=>{let o=s.manager;return o.V!==d&&o.V!==e&&o.S(void 0,void 0),o.T.length===0&&queueMicrotask(()=>o.S(void 0,void 0)),o.V=e,o.T.push((n,r)=>p(t,void 0,e===r?n:void 0)),e},ze=(s=[H(),...Mt()],t,e)=>{let o=Array.isArray(s)?s:[s],n=o.length+1,r=i=>{n-=1,i!==void 0&&(n=Math.min(n,0)),n===0&&t(i)};o.forEach(i=>je(i,a=>r(a===void 0?void 0:{key:a,host:i,isReactive:!1}),e));for(let i of o)if("manager"in i&&i.manager.component===i){He(i,a=>r(a===void 0?void 0:{key:a,host:i,isReactive:!0}),e);break}return e},Ve=(s="",t={},e=H())=>{let o={emit:n=>{s===""&&I();let r=new CustomEvent(s,{detail:n,cancelable:!0,bubbles:!0,composed:!0,...t});return e.el.dispatchEvent(r),r}};return s===""&&ze(void 0,n=>s=n.key,o),o},Be=Ve.bind(null,""),he;he=j;var Ot=class{constructor(t){this.#t=[],this.#e=[],this.#s=[],this.#n=[],this.#r=[],this.#c=[],this.#l=[],this.#d=[],this.#i=[],this.#p=!1,this.P=new b,this.connectedCalled=!1,this.loadedCalled=!1,this[he]=!0,this.#h=[];let e=this,o=t??H(new.target.name);e.#o=o,e.ready=e.P.promise,e.#a=le(e),e.component=o,e.#o.addController(e),e.#o.manager===void 0||(It(e),queueMicrotask(()=>e.catchUpLifecycle()))}#t;#e;#s;#n;#r;#c;#l;#d;#i;#p;#o;catchUpLifecycle(){let{manager:t}=this.#o;t.connectedCalled&&!this.connectedCalled&&this.triggerConnected(),t.#p&&this.triggerLoad().then(()=>t.loadedCalled&&this.triggerLoaded()).catch(ae(this.#o))}#a;get exports(){return this.#a}set exports(t){let e=this.#a;e!==t&&(this.#a=t,this.#h.forEach(p),this.connectedCalled&&this.O!==!1&&this.#o.requestUpdate(this.O,e)),this.P.resolve(t)}setProvisionalExports(t,e=!0){this.#a=e?le(t):t,this.#h.forEach(p)}#h;watchExports(t){let e=()=>t(this.#a);return this.#h.push(e),()=>{this.#h.splice(this.#h.indexOf(e),1)}}get use(){return O(this.#o),kt}get useRef(){return O(this.#o),jt}get useRefSync(){return O(this.#o),Y}controllerRemoved(){this.#o.el.isConnected&&this.triggerDisconnected(),this.triggerDestroy()}onConnected(t){this.#t.push(t)}onDisconnected(t){this.#e.push(t)}onLoad(t){this.#s.push(t)}onLoaded(t){this.#n.push(t)}onUpdate(t){this.#r.push(t)}onUpdated(t){this.#c.push(t)}onDestroy(t){this.#l.push(t)}onLifecycle(t){this.#d.push(t),this.connectedCalled&&this.#o.el.isConnected&&this.#u(t)}triggerConnected(){let t=this;t.hostConnected&&p(t.hostConnected,t),t.#t.forEach(p),t.triggerLifecycle(),t.connectedCalled=!0}triggerDisconnected(){let t=this;t.hostDisconnected&&p(t.hostDisconnected,t),t.#e.forEach(p),t.#i.forEach(p),t.#i=[]}async triggerLoad(){if(this.#p)return;this.#p=!0;let t=this;t.hostLoad&&await M(t.hostLoad,t),this.#s.length>0&&await Promise.allSettled(this.#s.map(M)),this.P.resolve(this.#a)}triggerLoaded(){this.loadedCalled||(this.hostLoaded&&p(this.hostLoaded,this),this.#n.forEach(p),this.loadedCalled=!0)}triggerUpdate(t){this.hostUpdate&&p(this.hostUpdate,this,t),this.#r.forEach(ce,t)}triggerUpdated(t){this.hostUpdated&&p(this.hostUpdated,this,t),this.#c.forEach(ce,t)}triggerDestroy(){this.hostDestroy&&p(this.hostDestroy,this),this.#l.forEach(p)}triggerLifecycle(){this.hostLifecycle&&this.#u(()=>this.hostLifecycle()),this.#d.forEach(this.#u,this)}#u(t){O(this.#o);let e=p(t);(Array.isArray(e)?e:[e]).forEach(n=>{typeof n=="function"?this.#i.push(n):typeof n=="object"&&typeof n.remove=="function"&&this.#i.push(n.remove)})}};function ce(s){p(s,void 0,this)}var de=Ot,le=s=>{if(typeof s!="object"&&typeof s!="function"||s===null)return s;let t={get(o,n,r){if(!((n==="exports"||n==="_exports")&&n in o&&o[n]===e)&&(n in o||n in Promise.prototype||typeof n=="symbol"))return typeof o=="function"?o[n]:Reflect.get(o,n,r)}},e=new Proxy(s,t);return e};var ct=s=>s.replace(We,(t,e)=>`${e===0?"":"-"}${t.toLowerCase()}`),We=/[A-Z]+(?![a-z])|[A-Z]/gu;var Fe="randomUUID"in crypto,Hs=()=>{if(Fe)return crypto.randomUUID();let s=crypto.getRandomValues(new Uint16Array(8));s[3]=s[3]&4095|16384,s[4]=s[4]&16383|32768;let t=e=>s[e].toString(16).padStart(4,"0");return`${t(0)+t(1)}-${t(2)}-${t(3)}-${t(4)}-${t(5)}${t(6)}${t(7)}`};var St=s=>{let t=s;for(;t=t.parentNode??t.host;)if(t?.constructor?.lumina){let e=t;return e.manager?.loadedCalled||(e.J??e._offspring).push(s),(e.I??e._postLoad).promise}return!1},Pt={};function Nt(){}function Dt(s){for(let t of["Associated","Disabled","Reset","StateRestore"]){let e=`orm${t}Callback`;s.prototype["f"+e]=async function(...o){await this.componentOnReady(),(this.el??this).dispatchEvent(new CustomEvent(`luminaF${e}`,{detail:o}))}}}var qe=(s,t)=>function(o,n){if(!globalThis.customElements)return;let i=(n??o??{}).resourcesUrl;i&&s.setAssetPath(i);for(let[a,[c,l="",u=0]]of Object.entries(t)){if(customElements.get(a))continue;let[h,m,v]=l.split(";"),C=h?h?.split(",").map(Ge):void 0,mt=C?.map(([x])=>x),Q=class extends Tt{static{this.formAssociated=u===1}static{this.observedAttributes=C?.map(([,x])=>x).filter(x=>x!=="")}static{this.C=mt}static{this.E=m?m?.split(","):void 0}static{this.D=v?.split(",")}static{this.L=a}static{this.K=s}constructor(){!Q.B&&(Q.B=c(),Q.F()),super()}};customElements.define(a,Q)}},lt=Object.defineProperty,Ge=s=>{let t=s.split(":");return t.length===1?[t[0],ct(t[0])]:t},Ke=globalThis.HTMLElement??Nt,Tt=class extends Ke{constructor(){super(),this.#e={},this.#s=[],this.I=new b,this.H=new b,this.J=[];let t=this,e=t.constructor;t._offspring=t.J,t._postLoad=t.I,e.C?.forEach(o=>{Object.hasOwn(t,o)&&(t.#e[o]=t[o],delete t[o])}),e.A?t.#n({a:e.A}):e.B.then(async o=>{await e.K.p,t.#n(await(o.default?.then(n=>typeof n=="function"?{a:n}:n)??o))}).catch(o=>{t.H.reject(o),setTimeout(()=>{throw o})})}static{this.lumina=!0}static F(){for(let t of this.C??[])lt(this.prototype,t,{configurable:!0,enumerable:!0,get(){return this.#e[t]},set(e){this.#e[t]=e}});for(let t of this.E??[])lt(this.prototype,t,{async value(...e){return this.#t||await this.H.promise,await this.#t[t](...e)},configurable:!0});for(let t of this.D??[])lt(this.prototype,t,{value(...e){return this.#t[t](...e)},configurable:!0})}static{Dt(this)}#t;#e;#s;get manager(){return this.#t?.manager}attributeChangedCallback(t,e,o){this.#t?.attributeChangedCallback(t,e,o),this.#t||this.#s.push(t)}connectedCallback(){this.#t?this.#t.connectedCallback?.():queueMicrotask(()=>this.G=St(this))}disconnectedCallback(){this.#t?.disconnectedCallback?.()}async componentOnReady(){return await this.H.promise,this}#n(t){let e=this.constructor,o=e.L,n=this.#e,r=Object.values(t).find(h=>h.L===o),i=`${o}--lazy`,a=r;for(;a&&!Object.hasOwn(a,"lumina");)a=Object.getPrototypeOf(a);Je(a),!e.A&&(e.A=r,customElements.define(i,r)),r.N=this;let l=document.createElement(i);r.N=void 0,this.#t=l,this.#e=l,this.#s.forEach(h=>l.attributeChangedCallback(h,null,this.getAttribute(h))),Object.entries(n).forEach(Qe,l);let u=this.isConnected;(u||this.G)&&(l.connectedCallback?.(),u||l.disconnectedCallback())}addController(){}requestUpdate(){this.#t?.requestUpdate()}};function Qe([s,t]){this[s]=t}var Je=s=>{let t=s.prototype,e=Element.prototype;Object.hasOwn(t,"isConnected")||(t.setAttribute=function(n,r){e.setAttribute.call(this.el,n,r)},t.removeAttribute=function(n){e.removeAttribute.call(this.el,n)},t.hasAttribute=function(n){return e.hasAttribute.call(this.el,n)},lt(t,"isConnected",{get(){return Reflect.get(e,"isConnected",this.el)}}))};var y={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},$=s=>(...t)=>({_$litDirective$:s,values:t}),g=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,o){this._$Ct=t,this._$AM=e,this._$Ci=o}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}};var{I:Ye}=se,ue=s=>s;var ht=s=>s.strings===void 0,fe=()=>document.createComment(""),Js=(s,t,e)=>{let o=s._$AA.parentNode,n=t===void 0?s._$AB:t._$AA;if(e===void 0){let r=o.insertBefore(fe(),n),i=o.insertBefore(fe(),n);e=new Ye(r,i,s,s.options)}else{let r=e._$AB.nextSibling,i=e._$AM,a=i!==s;if(a){let c;e._$AQ?.(s),e._$AM=s,e._$AP!==void 0&&(c=s._$AU)!==i._$AU&&e._$AP(c)}if(r!==n||a){let c=e._$AA;for(;c!==r;){let l=ue(c).nextSibling;ue(o).insertBefore(c,n),c=l}}}return e},Ys=(s,t,e=s)=>(s._$AI(t,e),s),Ze={},me=(s,t=Ze)=>s._$AH=t,Zs=s=>s._$AH,Xs=s=>{s._$AR(),s._$AA.remove()};var Xe=$(class extends g{constructor(s){if(super(s),s.type!==y.PROPERTY&&s.type!==y.ATTRIBUTE&&s.type!==y.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!ht(s))throw Error("`live` bindings can only contain a single expression")}render(s){return s}update(s,[t]){if(t===f||t===d)return t;let e=s.element,o=s.name;if(s.type===y.PROPERTY){if(t===e[o])return f}else if(s.type===y.BOOLEAN_ATTRIBUTE){if(!!t===e.hasAttribute(o))return f}else if(s.type===y.ATTRIBUTE&&e.getAttribute(o)===t+"")return f;return me(s),t}});var K=(s,t)=>{let e=s._$AN;if(e===void 0)return!1;for(let o of e)o._$AO?.(t,!1),K(o,t);return!0},dt=s=>{let t,e;do{if((t=s._$AM)===void 0)break;e=t._$AN,e.delete(s),s=t}while(e?.size===0)},ye=s=>{for(let t;t=s._$AM;s=t){let e=t._$AN;if(e===void 0)t._$AN=e=new Set;else if(e.has(s))break;e.add(s),ss(t)}};function ts(s){this._$AN!==void 0?(dt(this),this._$AM=s,ye(this)):this._$AM=s}function es(s,t=!1,e=0){let o=this._$AH,n=this._$AN;if(n!==void 0&&n.size!==0)if(t)if(Array.isArray(o))for(let r=e;r<o.length;r++)K(o[r],!1),dt(o[r]);else o!=null&&(K(o,!1),dt(o));else K(this,s)}var ss=s=>{s.type==y.CHILD&&(s._$AP??=es,s._$AQ??=ts)},pt=class extends g{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,o){super._$AT(t,e,o),ye(this),this.isConnected=t._$AU}_$AO(t,e=!0){t!==this.isConnected&&(this.isConnected=t,t?this.reconnected?.():this.disconnected?.()),e&&(K(this,t),dt(this))}setValue(t){if(ht(this._$Ct))this._$Ct._$AI(t,this);else{let e=[...this._$Ct._$AH];e[this._$Ci]=t,this._$Ct._$AI(e,this,0)}}disconnected(){}reconnected(){}};var yo=()=>new Lt,Lt=class{},xt=new WeakMap,Ut=$(class extends pt{render(s){return d}update(s,[t]){let e=t!==this.G;return e&&this.rt(void 0),(e||this.lt!==this.ct)&&(this.G=t,this.ht=s.options?.host,this.rt(this.ct=s.element)),d}rt(s){if(this.G!==void 0)if(this.isConnected||(s=void 0),typeof this.G=="function"){let t=this.ht??globalThis,e=xt.get(t);e===void 0&&(e=new WeakMap,xt.set(t,e)),e.get(this.G)!==void 0&&this.G.call(this.ht,void 0),e.set(this.G,s),s!==void 0&&this.G.call(this.ht,s)}else this.G.value=s}get lt(){return typeof this.G=="function"?xt.get(this.ht??globalThis)?.get(this.G):this.G?.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});var ut=class extends de{constructor(t){super(t),this.destroyed=!1,this.R=!1,this.V=d,this.T=[],this.#s=new WeakMap,this.#e=t,this.exports=void 0,this.hasDestroy=ft in t&&typeof t.destroy=="function",E.prototype.addController.call(t,{hostConnected:()=>{if(this.destroyed){let e=t.el.localName;throw t.el.remove(),new Error(`The ${e} component has already been destroyed. It cannot be used again. If you meant to disconnect and reconnect a component without automatic destroy, set the ${ft} prop.`)}this.#t!==void 0&&clearTimeout(this.#t),I();for(let e of t.M)"triggerConnected"in e?e.triggerConnected():p(e.hostConnected,e)},hostDisconnected:()=>{for(let e of t.M)"triggerDisconnected"in e?e.triggerDisconnected():p(e.hostDisconnected,e);this.hasDestroy&&!this.destroyed&&this.U()},hostUpdate:()=>{for(let e of t.M)"triggerUpdate"in e?e.triggerUpdate(this.Q):p(e.hostUpdate,e,this.Q)},hostUpdated:()=>{for(let e of t.M)"triggerUpdated"in e?e.triggerUpdated(this.Q):p(e.hostUpdated,e,this.Q);this.Q=void 0}}),queueMicrotask(()=>this.R=!0),O(t)}#t;#e;async destroy(){if(!this.destroyed){this.#e.el.isConnected&&(this.hasDestroy=!1,this.#e.el.remove()),this.#t=void 0,this.destroyed=!0;for(let t of this.#e.M)"triggerDestroy"in t?t.triggerDestroy():p(t.hostDestroy,t);this.#e.M.splice(0)}}U(){if(this.#t!==void 0&&clearTimeout(this.#t),!this.#e.el.isConnected&&!this.#e.autoDestroyDisabled){let t=()=>{this.#e.destroy()};this.#t=oe(t,ns)}}S(t,e){let o=this.T;this.V=d,this.T=[],o.forEach(n=>n(t,e))}#s;W(t,e){(typeof e=="object"&&e!==null||typeof e=="function")&&this.#s.set(e,t)}X(t){if(typeof t=="object"&&t!==null||typeof t=="function")return this.#s.get(t)}},ns=1e3,ft="autoDestroyDisabled";var ge=$(class extends g{constructor(s){if(super(s),s.type!==y.ATTRIBUTE||s.name!=="class"||s.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(s){return" "+Object.keys(s).filter(t=>s[t]).join(" ")+" "}update(s,[t]){if(this.st===void 0){this.st=new Set,s.strings!==void 0&&(this.nt=new Set(s.strings.join(" ").split(/\s/).filter(o=>o!=="")));for(let o in t)t[o]&&!this.nt?.has(o)&&this.st.add(o);return this.render(t)}let e=s.element.classList;for(let o of this.st)o in t||(e.remove(o),this.st.delete(o));for(let o in t){let n=!!t[o];n===this.st.has(o)||this.nt?.has(o)||(n?(e.add(o),this.st.add(o)):(e.remove(o),this.st.delete(o)))}return f}});var ve="important",rs=" !"+ve,Ee=$(class extends g{constructor(s){if(super(s),s.type!==y.ATTRIBUTE||s.name!=="style"||s.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(s){return Object.keys(s).reduce((t,e)=>{let o=s[e];return o==null?t:t+`${e=e.includes("-")?e:e.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${o};`},"")}update(s,[t]){let{style:e}=s.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(t)),this.render(t);for(let o of this.ft)t[o]==null&&(this.ft.delete(o),o.includes("-")?e.removeProperty(o):e[o]=null);for(let o in t){let n=t[o];if(n!=null){this.ft.add(o);let r=typeof n=="string"&&n.endsWith(rs);o.includes("-")||r?e.setProperty(o,r?n.slice(0,-11):n,r?ve:""):e[o]=n}}return f}});var $e=class s extends E{constructor(){super(),this.M=[],this.manager=new ut(this);let t=this,e=t.constructor,o=e.N,n=e.K.o,r=s.prototype.shouldUpdate;t.#n=o?.H??new b,t.I=o?.I??new b,t.J=o?.J??[],t._offspring=t.J,t._postLoad=t.I,t.el=o??t,t.#s=t.enableUpdating,t.enableUpdating=Nt,t.shouldUpdate!==r&&(t.#e=t.shouldUpdate,t.shouldUpdate=r),n&&(t.#t=new Map,e.elementProperties.forEach((i,a)=>t.#t.set(a,n()))),!1}static finalizeStyles(t){let e=super.finalizeStyles(t),o=this.shadowRootOptions===Pt;return this.K?.commonStyles===void 0||o?e:[this.K.commonStyles,...e]}static createProperty(t,e){let o=typeof e=="number"?e:Array.isArray(e)?e[0]:0,n=Array.isArray(e)?e[1]:void 0,r=n?.hasChanged??B,i={attribute:o&1&&typeof t=="string"?ct(t):!1,reflect:!!(o&2),type:o&4?Boolean:o&8?Number:void 0,state:!!(o&16),readOnly:!!(o&32),noAccessor:!!(o&64),useDefault:!!(o&128),c:!1,...n,hasChanged(a,c){let l=r(a,c);return i.c=l,l}};super.createProperty(t,i)}static getPropertyDescriptor(t,e,o){let n=this.K,r=super.getPropertyDescriptor(t,e,o);return o.d=r,{...r,get(){return n.t?.(this.#t.get(t)),r.get?.call(this)},set(i){let a=this.manager;if(o.readOnly&&!J&&(a.R||a.connectedCalled))throw Error(`Cannot assign to read-only property "${t}" of ${this.el.localName}. Trying to assign "${i}"`);r.set.call(this,i??void 0),o.c&&this.#t?.get(t)?.notify(),a.T.length>0&&(I(),a?.S(t,i))}}}static{this.lumina=!0}static{Dt(this)}#t;#e;#s;#n;#r;#c;get elementInternals(){return this.#c??=this.el.attachInternals(),this.#c}connectedCallback(){this.hasAttribute("defer-hydration")||this.#l(!0)}#l(t){let e=this.constructor.K.c?.(()=>this.requestUpdate());this.#r=e;let o=!this.manager.connectedCalled;t&&super.connectedCallback(),o?queueMicrotask(()=>this.#i().catch(n=>{this.#n.reject(n),setTimeout(()=>{throw n})})):e&&this.requestUpdate()}#d(t){try{this.#r.clear(),this.constructor.K.r(this.#r,()=>super.update(t))}catch(e){throw this.#r.clear(),e}}disconnectedCallback(){super.disconnectedCallback(),this.#r?.destroy(),this.#r=void 0}createRenderRoot(){let t=this.el.shadowRoot,e=this.constructor,o=e.shadowRootOptions,r=t??(o===Pt?this.el:this.el.attachShadow(o));if(t)return this.manager.connectedCalled||this.#l(!1),E.prototype.createRenderRoot.call(this),t;if(this.isConnected){let i=r.getRootNode();i.adoptedStyleSheets=[...i.adoptedStyleSheets,...e.elementStyles.map(a=>"styleSheet"in a?a.styleSheet:a)]}return r}async#i(){let t=this.el.G??St(this.el);t&&await t;let e=[];for(let n of this.M)"triggerLoad"in n?e.push(n.triggerLoad()):e.push(M(n.hostLoad,n));await Promise.all(e),await this.load?.(),this.manager.hasDestroy&&this.manager.onUpdate(n=>n.has(ft)&&this.manager.U()),this.#s(!0),this.performUpdate(),this.I.resolve(),await 0;let o=this.J.filter(n=>!n.manager?.loadedCalled);o.length&&await Promise.allSettled(o.map(async n=>await n.componentOnReady())),this.J.length=0,this.el.setAttribute(this.constructor.K.hydratedAttribute,"");for(let n of this.M)"triggerLoaded"in n?n.triggerLoaded():p(n.hostLoaded,n);this.loaded?.(),this.#n.resolve()}shouldUpdate(t){return this.manager.Q=t,this.#e?.(t)??!0}update(t){this.#r?this.#d(t):super.update(t)}listen(t,e,o){let n=e?.bind(this)??e;this.manager.onLifecycle(()=>(this.el.addEventListener(t,n,o),()=>this.el.removeEventListener(t,n,o)))}listenOn(t,e,o,n){let r=o?.bind(this)??o;this.manager.onLifecycle(()=>(t.addEventListener(e,r,n),()=>t.removeEventListener(e,r,n)))}async componentOnReady(){return await this.#n.promise,this}addController(t){this.M.push(t),!(j in t)&&this.renderRoot&&this.el.isConnected&&t.hostConnected?.()}removeController(t){this.M.splice(this.M.indexOf(t),1),t.controllerRemoved?.()}};var wn=s=>{let t,e=n=>{t=new URL(n,globalThis.location?.href||void 0).href},o={...s,getAssetPath(n){let r=new URL(n,t);return r.origin!==globalThis.location?.origin?r.href:r.pathname},setAssetPath:e,customElement(n,r){r.K=o,r.L=n,customElements.get(n)||customElements.define(n,r)}};return e(s.defaultAssetPath),o};var On=s=>typeof s=="object"&&s!=null?ge(s):s,Tn=s=>typeof s=="object"&&s!=null?Ee(s):s;var Rt=class extends g{#t;#e;constructor(t){super(t);let e=this;this.#e=function(n){return e.#t.call(this,n)}}render(t){return typeof t=="function"?(this.#t=t,Ut(this.#e)):Ut(t)}},Sn=$(Rt);var Pn=d;export{as as a,O as b,H as c,It as d,Mt as e,cs as f,ls as g,Ce as h,ms as i,ys as j,f as k,d as l,Ds as m,He as n,ze as o,Ve as p,Be as q,Ot as r,de as s,Hs as t,Pt as u,qe as v,y as w,$ as x,g as y,Js as z,Ys as A,me as B,Zs as C,Xs as D,Xe as E,yo as F,Ut as G,$e as H,wn as I,On as J,Tn as K,Pn as L};
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
+
import"./EXBEKVP5.js";var e=`# ArcGIS Online Map Viewer \u2014 Layer Filter Tool Calling Assistant
|
|
3
|
+
|
|
4
|
+
You are an assistant that helps manage layer filters and visual effects for **ArcGIS Online Map Viewer** by selecting and calling the appropriate tool.
|
|
5
|
+
|
|
6
|
+
You may make **zero or one** tool call based on the assigned task.
|
|
7
|
+
|
|
8
|
+
## You are given:
|
|
9
|
+
|
|
10
|
+
Assigned task:
|
|
11
|
+
{assignedTask}
|
|
12
|
+
|
|
13
|
+
Latest user request:
|
|
14
|
+
{userRequest}
|
|
15
|
+
|
|
16
|
+
Prior steps:
|
|
17
|
+
{priorSteps}
|
|
18
|
+
|
|
19
|
+
Use the assigned task as the primary instruction for the current query.
|
|
20
|
+
Use the latest user request as supporting context when needed.
|
|
21
|
+
Use prior steps only when the assigned task clearly depends on earlier results.
|
|
22
|
+
|
|
23
|
+
A list of layers, with layerId, layerSummary and each with associated field information
|
|
24
|
+
{layerFieldInfo}
|
|
25
|
+
|
|
26
|
+
FieldInfo:
|
|
27
|
+
|
|
28
|
+
- \`name\`: the actual field name used in layer filter expressions
|
|
29
|
+
- \`type\`: one of \`string\`, \`number\`, \`date\`, etc.
|
|
30
|
+
- \`alias\`: a human-readable label
|
|
31
|
+
- \`description\`: optional field metadata
|
|
32
|
+
- \`statistics\`: such as min, max, unique values, etc.
|
|
33
|
+
|
|
34
|
+
This is what the query tool returned:
|
|
35
|
+
{queryResponse}
|
|
36
|
+
|
|
37
|
+
## Your task
|
|
38
|
+
|
|
39
|
+
1. Decide whether a tool call is needed (see "When to call a tool" below).
|
|
40
|
+
2. If needed, determine \`targetLayer\` using the priority rules below.
|
|
41
|
+
3. Select the most appropriate tool.
|
|
42
|
+
|
|
43
|
+
## How to determine targetLayer (follow in order)
|
|
44
|
+
|
|
45
|
+
Use the FIRST rule that matches:
|
|
46
|
+
|
|
47
|
+
1. **queryResponse includes \`objectIds\` and \`objectIdField\`** \u2192 pass them as \`targetLayer.objectIds\` array and set \`where\` to \`"1=1"\`. Do NOT construct a WHERE clause with IN(...).
|
|
48
|
+
|
|
49
|
+
2. **queryResponse includes a \`where\` clause** \u2192 copy that exact \`where\` string and the \`layerId\` into \`targetLayer\`. Do NOT regenerate, rephrase, or simplify it.
|
|
50
|
+
|
|
51
|
+
3. **Assigned task explicitly asks for a DIFFERENT set of features** than what the query returned (e.g., query found declined apps but assigned task says "now highlight the approved ones"), OR the assigned task asks to clear/reset filters \u2192 generate a new WHERE clause using the rules in "Generating new WHERE clauses" below.
|
|
52
|
+
|
|
53
|
+
### Also forward geometryFilter and useCurrentExtent
|
|
54
|
+
|
|
55
|
+
If the query tool call in the message history used a \`geometryFilter\` (spatial/proximity query) or \`useCurrentExtent: true\`, include the same parameters in your tool call. Without them, the filter would apply to the entire layer instead of just the spatially scoped features.
|
|
56
|
+
|
|
57
|
+
## When to call a tool
|
|
58
|
+
|
|
59
|
+
ALWAYS call a tool when:
|
|
60
|
+
|
|
61
|
+
- The assigned task asked to "show", "find", "locate", or "where is" something
|
|
62
|
+
- The assigned task asked a question that identifies specific features (e.g., "which has the highest...?", "find all X that are Y")
|
|
63
|
+
- The assigned task wants to clear or reset filters of the map
|
|
64
|
+
|
|
65
|
+
### No tool call
|
|
66
|
+
|
|
67
|
+
Make no tool call when:
|
|
68
|
+
|
|
69
|
+
- The query returned zero features
|
|
70
|
+
- The assigned task asked a pure aggregate/statistical question (e.g., "what is the average?", "how many total?")
|
|
71
|
+
- No meaningful filter can be generated
|
|
72
|
+
- The assigned task was fully answered by the query step with no need for map interaction
|
|
73
|
+
- Even if objectIds are available in the query response, do not highlight features unless the assigned task explicitly asked to see, show, highlight or emphasize them
|
|
74
|
+
|
|
75
|
+
## Generating new WHERE clauses (exception case only)
|
|
76
|
+
|
|
77
|
+
Only use these rules when rule 3 above applies \u2014 i.e., the assigned task explicitly asked for a different feature set.
|
|
78
|
+
|
|
79
|
+
- Use only the field's **\`name\`** in the expression \u2014 not the alias.
|
|
80
|
+
- Use field \`type\` to choose operators:
|
|
81
|
+
- **String** \u2192 \`LIKE '%value%'\`, \`=\`, \`IN (...)\`
|
|
82
|
+
- **Number/Date** \u2192 \`=\`, \`<\`, \`>\`, \`BETWEEN\`, etc.
|
|
83
|
+
- **Coded-value domain fields** \u2192 use the numeric/string **code**, never the domain name.
|
|
84
|
+
- **Range domain fields** \u2192 use the listed min/max as valid bounds.
|
|
85
|
+
- DO NOT use subqueries or \`SELECT\`.
|
|
86
|
+
- Combine conditions with \`AND\`, \`OR\`, or \`NOT\` as appropriate.
|
|
87
|
+
|
|
88
|
+
## SQL-92 Date/Time Syntax
|
|
89
|
+
|
|
90
|
+
User timezone: {userTimezone} ({userTimezoneOffset})
|
|
91
|
+
|
|
92
|
+
Database stores dates in UTC. Convert user's local time to UTC.
|
|
93
|
+
|
|
94
|
+
To convert: if offset is \`-08:00\`, add 8 hours. If \`-05:00\`, add 5 hours.
|
|
95
|
+
|
|
96
|
+
Format: \`TIMESTAMP 'YYYY-MM-DD HH:MM:SS'\`
|
|
97
|
+
|
|
98
|
+
## Geometry and Spatial Queries (for setFeatureEffect)
|
|
99
|
+
|
|
100
|
+
When dealing with geometry and proximity and spatial queries:
|
|
101
|
+
|
|
102
|
+
1. TARGET LAYER = What you want to FIND/RETURN in results
|
|
103
|
+
2. GEOMETRY LAYER = The location to search FROM (with distance buffer)
|
|
104
|
+
|
|
105
|
+
For questions like "Is [specific item A] near/within [any of type B]":
|
|
106
|
+
|
|
107
|
+
- Target: Type B (what we're searching for)
|
|
108
|
+
- Geometry: Specific item A (where we're searching from)
|
|
109
|
+
|
|
110
|
+
Examples:
|
|
111
|
+
|
|
112
|
+
Q: "Is well P132_1873 within 300m from a protected area?"
|
|
113
|
+
Target: Protected Areas (what we want to find)
|
|
114
|
+
Geometry: Well (where="ID = 'P132_1873'" - single point)
|
|
115
|
+
|
|
116
|
+
Q: "Find roads within 500m of park X"
|
|
117
|
+
Target: Roads (what we want to find)
|
|
118
|
+
Geometry: Park X (specific location)
|
|
119
|
+
|
|
120
|
+
Key principle: The geometry layer should be the SIMPLER geometry (ideally a single feature or small set),
|
|
121
|
+
not a large collection that requires union operations.
|
|
122
|
+
`;export{e as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{c as r}from"./
|
|
2
|
+
import{c as r}from"./S4GBMN37.js";import{c as o}from"./QMAV4UTN.js";var s=o(r);export{s as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{a as p}from"./IADXB53D.js";import{b as l}from"./
|
|
2
|
+
import{a as p}from"./IADXB53D.js";import{b as l}from"./S4GBMN37.js";import{F as i,G as n,H as r,J as o,K as d,h as s,i as a}from"./T3EPRHTT.js";import"./EXBEKVP5.js";var c=s`:host{display:block}:host .esri-legend__service{margin:0;padding:0}:host .hide{display:none}`,e={service:"esri-legend__service",groupLayer:"esri-legend__group-layer",groupContent:"esri-legend__group-content"},t=class extends r{constructor(){super(),this.layerCaption=i(),this.expanded=!0,this.isChild=!1,this.listenOn(window,"layerCaptionElementExpandUpdated",this.layerCaptionElementExpandUpdatedEmitted)}static{this.properties={expanded:16,legendvm:0,featureCount:5,activeLayerInfo:0,isChild:5}}static{this.styles=c}load(){new MutationObserver(()=>{this.requestUpdate()}).observe(this.el,{attributes:!0})}layerCaptionElementExpandUpdatedEmitted(){this.expanded=!!this.layerCaption.value?.expanded}render(){return a`<div style=${d({borderLeft:"1px solid var(--calcite-color-border-3)"})} class=${`${e.service} ${e.groupLayer}`}><instant-apps-interactive-legend-layer-element-caption class=${o(p(this.el))} .legendvm=${this.legendvm} .featureCount=${this.featureCount} .activeLayerInfo=${this.activeLayerInfo} .isChild=${this.isChild} ${n(this.layerCaption)}></instant-apps-interactive-legend-layer-element-caption><div class=${`${e.groupContent} ${this.expanded?"show":"hide"}`}><slot name=content></slot></div></div>`}};l("instant-apps-interactive-legend-group-legend-element",t);export{t as InstantAppsInteractiveLegendGroupLegendElement};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
+
import a from"./WDASGI72.js";import{a as O,b as k}from"./2B4SGB3I.js";import{b as w}from"./RLSY4VUQ.js";import{pa as C,ra as $,ta as R}from"./RDRCAA3H.js";import{a as I}from"./DIBK4RSG.js";import{b as S}from"./HIPZRG2Q.js";import{F as b,G as f,H as A,J as D,L as p,h as v,i as r,j as _,q as T}from"./T3EPRHTT.js";export default $arcgis.t(([,,,,,,,,{a:x,h:N,m:g,s:h}])=>{var H=v`calcite-card{height:100%;padding-bottom:var(--calcite-spacing-base)}@media(max-width:400px){calcite-card{width:100%}}calcite-card:hover img{-webkit-filter:brightness(30%);filter:brightness(30%);-webkit-transition:all .1s ease;-moz-transition:all .1s ease;-o-transition:all .1s ease;-ms-transition:all .1s ease;transition:all .1s ease}calcite-card:hover .hover-text{opacity:1;color:#fff}calcite-card:hover{outline:var(--calcite-spacing-base) solid var(--calcite-color-brand);box-sizing:content-box;cursor:pointer}.hover-text{transition:.1s ease;opacity:0;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);text-align:center;display:flex;flex-direction:row;align-items:center;height:100%;font-size:var(--calcite-spacing-xl)}.card-image-wrap{flex:0 0 auto}.card-image-wrap{width:100%;position:relative;margin-bottom:0;-webkit-box-flex:0 0 auto;-ms-flex:0 0 auto;flex:0 0 auto}.card-image{width:100%;display:block;background-color:var(--calcite-color-surface-2)}video,img{max-width:100%;height:auto}img{overflow-clip-margin:content-box;overflow:clip}.width-full{width:100%}.deployed-label-override{--calcite-label-text-color: var(--calcite-color-text-3);--calcite-label-margin-bottom: var(--calcite-spacing-none)}.svg-color{fill:var(--calcite-color-text-3)}.padding-end-1-2{padding-inline-end:var(--calcite-spacing-sm)}.padding-bottom-1-2{padding-bottom:var(--calcite-spacing-sm)}.display-flex{display:flex}.display-none{display:none}.flex-direction-column{flex-direction:column}.align-items-center{align-items:center}.font-weight-400,.font-weight-normal{font-weight:400}.font-color-text-2{--calcite-label-text-color: var(--calcite-color-text-2)}.font-line-height{line-height:1.4}.font-size-size--1{font-size:var(--calcite-font-size--1)}.icon-brand-color{--calcite-icon-color: var(--calcite-color-brand)}.header-line-height{--calcite-label-margin-bottom: 0;margin-top:var(--calcite-spacing-sm);margin-bottom:.7rem}.header-content{width:100%;min-width:0}.description-wrap{white-space:normal;overflow-wrap:break-word;word-break:break-word;overflow:visible;padding-inline-end:var(--calcite-spacing-lg)}.header-title-label{display:block;flex:1 1 auto;min-width:0;max-width:100%}.header-title-ellipsis{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding-inline-end:var(--calcite-spacing-lg)}.dialog-y-size{--calcite-dialog-size-y: 90% }.dialog-x-size{--calcite-dialog-size-x: 90% }.justify-content-space-between{justify-content:space-between}.panel-bg-color{--calcite-panel-header-background-color: var(--calcite-color-surface-2);--calcite-panel-background-color: var(--calcite-color-surface-2)}.cursor-default{cursor:default}.chipClass{padding-bottom:var(--calcite-spacing-sm)!important}`;async function V(i,e){let t=await R(i,e);if(!t)throw new Error(`Solution ${i} was not found`);let a=e?.portal.replace("/sharing/rest","")??"https://www.arcgis.com",s=[];if(t.templates[0].item)s=t.templates.map(l=>({id:l.itemId,title:l.item.title,type:l.item.type,typeKeywords:l.item.typeKeywords,dependencies:l.dependencies,snippet:l.item.snippet,owner:l.item.owner}));else{let l=t.templates.map(o=>o.type==="Group"?C(o.itemId,e):$(o.itemId,e));s=(await Promise.allSettled(l)).filter(o=>o.status==="fulfilled").map(o=>o.value).map((o,d)=>{let n=typeof o.type>"u"?"group":"item";return{id:o.id,title:o.title,type:o.type??"Group",typeKeywords:o.typeKeywords,dependencies:t.templates[d].dependencies,snippet:o.snippet,url:`${a}/home/${n}.html?id=${o.id}`,owner:o.owner}})}return s}function Se(i,e,t){let a=i.templates.map(u=>u.type),s=[];s.push(X),a.indexOf("Group")>=0&&(s.push(M),s.push(L)),a.indexOf("Feature Service")>=0&&s.push(P);let l=a.indexOf("Feed")>-1;l&&s.push(Z);let o=a.indexOf("Big Data Analytic")>-1;o&&s.push(Q);let d=a.indexOf("Real Time Analytic")>-1;d&&s.push(te),(l||o||d)&&s.push(le),a.indexOf("Workflow")>-1&&(s.push(M),s.push(P),s.push(L),s.push(re)),a.indexOf("Geoprocessing Service")>-1&&(s.push(ee),t.IsEnterprisePortal&&s.push(ae));let n=i.templates.reduce((u,K)=>u.concat(K.item.typeKeywords||[]),[]);return W(s,n,t),z(s,e),F(s,i),s}function F(i,e){e.templates.some(t=>t.type==="Group"&&t.item?.membershipAccess==="collaboration")&&i.push(J)}function W(i,e,t){let a=G(t),s=Y(t);["Location Tracking View"].some(l=>e.indexOf(l)>-1)&&(!a&&!s?i.push(se):a&&!s?i.push(oe):!a&&s&&i.push(ne))}function z(i,e){["HubPremium"].some(t=>e.indexOf(t)>-1)&&i.push(ie)}function G(i){let e=i?.PortalUserSubset?.privileges;return e?["portal:admin:create","portal:admin:delete","portal:admin:update","portal:admin:reassign"].every(a=>e.some(s=>s.startsWith(a))):!1}function Y(i){return i.PortalSubset?.locationTrackingEnabled||!1}function Ie(i,e){let t={leadingMessages:[],bulletedMessages:[],trailingMessages:[]},a=[c.NOTEBOOK,c.VELOCITY,c.HUBPREMIUM,c.WORKFLOW,c.TRACKINGBASE],s=m(i,e,c.VELOCITY);s&&t.leadingMessages.push(s);let l=m(i,e,c.NOTEBOOK);l&&t.leadingMessages.push(l);let o=m(i,e,c.HUBPREMIUM);o&&t.leadingMessages.push(o);let d=m(i,e,c.WORKFLOW);d&&t.leadingMessages.push(d),e=e.filter(u=>a.indexOf(u)<0),e.forEach(u=>{t.bulletedMessages.push(U(i,u))});let n=m(i,e,c.TRACKINGBASE);return n&&t.trailingMessages.push(n),(t.leadingMessages.length>0||t.trailingMessages.length>0||t.bulletedMessages.length>0)&&t.trailingMessages.push(i.missingPrivilegesPopup.suggestedProblemRemedyMessage),t}function m(i,e,t){return e.filter(a=>a.includes(t)).length>0?U(i,t):""}function U(i,e){let t=i.missingPrivilegesPopup.requiredPrivilegesList,a="";switch(e){case"portal:user:createItem":a=t.createItem;break;case"portal:publisher:publishFeatures":a=t.publishFeatures;break;case"portal:user:createGroup":a=t.createGroup;break;case"portal:user:shareToGroup":a=t.shareToGroup;break;case"portal:user:addExternalMembersToGroup":a=t.addMembers;break;case"portal:publisher:publishFeeds":a=t.publishFeeds;break;case"portal:publisher:publishBigDataAnalytics":a=t.publishBigDataAnalytics;break;case"portal:publisher:publishRealTimeAnalytics":a=t.publishRealTimeAnalytics;break;case"solutions:locationtracking:admin:tracking":a=t.requiresLocationTrackingAndAdmin;break;case"solutions:locationtracking:tracking":a=t.requiresLocationTracking;break;case"solutions:locationtracking:admin":a=t.requiresAdmin;break;case"solutions:hubPremium":a=t.hubPremium;break;case"solutions:workflowManager":a=t.workflowManager;break;case"solutions:velocity":a=t.velocity;break;case"solutions:notebook":a=t.requiresNotebookServer;break;case"portal:publisher:publishServerGPServices":a=t.publishGPServices;break}return a}function Oe(i,e){let t=B(e),a=x([{k:"id",v:i}])||"";return t?`${t}/home/item.html${a}`:""}function ke(i,e,t,a){let s=a||B(t);return s?`${s}/sharing/rest/content/items/${i}/resources/${e}`:""}function B(i){return i?.PortalSubset?.orgUrl||i?.PortalUrl||""}function q(i,e){let t=new URL(i);return t.searchParams.set("token",e),t.toString()}var E=class extends A{constructor(){super(),this.deployedDate="",this.description="",this.diagramKey="",this.heading="",this.itemId="",this.owner="",this.thumbnail="",this.updateAvailable=!1,this.templateInfos=[],this._isDeleteOpen=!1,this._isDiagramOpen=!1,this.isMobile=!1,this.templateInfoGraph=[],this._configureTitlesOpen=!1,this._thumbnailUrl="",this._translations=I({name:"solution-deployed-card",blocking:!0}),this._configContextConsumer=w({context:k,subscribe:!0,callback:async e=>{e&&(this._isOrgAdmin=G(e.authentication),this._thumbnailUrl=`${this.thumbnail}&token=${e.userSession?.token}`)}}),this._deleteDialogRef=b(),this._diagramDialogRef=b(),this._isOrgAdmin=!1,this._isMobileContextConsumer=w({context:O,subscribe:!0,callback:e=>this.isMobile=e}),this.deployedCardSelected=T(),this.listenOn(window,"sessionRefreshed",e=>{this._updateThumbnailToken(e.detail)})}static{this.properties={card:0,deployedDate:1,description:1,diagramKey:1,heading:1,itemId:1,owner:1,thumbnail:1,updateAvailable:5,templateInfos:0,_isDeleteOpen:16,_isDiagramOpen:16,isMobile:16,templateInfoGraph:16,_configureTitlesOpen:16,_thumbnailUrl:16,_translations:16}}static{this.styles=H}get _telemetry(){return this._configContextConsumer.value?.telemetrySession}async renderDeleteDialog(){return this._isDeleteOpen=!0,this._renderDeleteDialog(),this._deleteDialogRef.value}async renderDiagramDialog(e){return await this._viewDiagram(e),await this._renderDiagramDialog(),this._diagramDialogRef.value}async getTemplates(){return this._processTemplates(this.card)}async load(){this._isMobileContextConsumer.value&&(this.isMobile=this._isMobileContextConsumer.value)}render(){let e=this.card&&this.card.typeKeywords?.includes("AIAssistant");return r`<calcite-card .label=${this.description} @click=${this._cardSelected} @keydown=${t=>h(t,()=>this._cardSelected())}>${this._getImage()}${this._getHeader()}<p class="font-color-text-2 font-line-height font-size-size--1 description-wrap" slot=description>${this.description}</p><div class="width-full display-flex flex-direction-column" slot=footer-start><div class="padding-bottom-1-2">${e&&this._getChips()||""}${this.owner!==""&&this._getOwnerLabel()||""}${this._getDeployedDate()}</div>${this._getConfigureButton()}</div></calcite-card>${this._renderDeleteDialog()}${this._renderDiagramDialog()}${this._renderConfigureTitlesDialog()}`}_getImage(){return r`<div class="card-image-wrap" slot=thumbnail><img alt=${this.heading??p} class="thumbnail card-image" src=${this._thumbnailUrl??p}><div class="hover-text">${this._translations.openSolution}</div></div>`}_getHeader(){return r`<div class="display-flex justify-content-space-between header-line-height header-content" slot=heading><calcite-label class="header-title-label" layout=inline-space-between scale=l><span class="header-title-ellipsis" title=${this.heading??p}>${this.heading}</span></calcite-label></div>`}_getOwnerLabel(){return r`<calcite-label class="font-weight-400 padding-end-1-2" layout=inline scale=s>${`${this._translations.owner}:`}<calcite-link class="font-weight-normal" @click=${this._openUserProfile} @keydown=${e=>h(e,()=>this._openUserProfile(e))}>${this.owner}</calcite-link></calcite-label>`}_getDeployedDate(){return r`<div class="display-flex align-items-center"><div class="padding-end-1-2"><svg aria-hidden=true height=16px viewBox="0 0 32 32" width=16px xmlns=http://www.w3.org/2000/svg>${_`<path class="svg-color" d="M29.963 7.672a1.586 1.586 0 0 0-1.584-1.585h-5.274a.187.187 0 0 1-.188-.187V3.977A2 2 0 0 0 20.825 2h-9.672A2.095 2.095 0 0 0 9.06 4.093V5.9a.187.187 0 0 1-.187.187H3.598a1.586 1.586 0 0 0-1.584 1.585v4.016a.281.281 0 0 0 .281.28H4.9l.014-.013V9.153a.177.177 0 0 1 .177-.177h21.46a.456.456 0 0 1 .449.45v13.742A1.832 1.832 0 0 1 25.168 25h-8.892a.568.568 0 0 1-.534-.373 3.98 3.98 0 0 0-7.6.373H5.657a.757.757 0 0 1-.757-.757v-3.055A.188.188 0 0 0 4.714 21H2.028l-.014.014v4.58a2.35 2.35 0 0 0 2.347 2.346h4.161a3.963 3.963 0 0 0 6.8.256.569.569 0 0 1 .475-.256h12.065a2.102 2.102 0 0 0 2.101-2.101zM21 5.625a.375.375 0 0 1-.375.375h-9.25A.375.375 0 0 1 11 5.625V4.45a.456.456 0 0 1 .45-.45h9.1a.456.456 0 0 1 .45.45zM12 28a2 2 0 1 1 2-2 2 2 0 0 1-2 2z" /><path class="svg-color" d="M13.273 17.994a.57.57 0 0 1 .479.262A3.73 3.73 0 0 0 17 20a3.74 3.74 0 0 0 3.403-2.006h3.41a.188.188 0 0 0 .187-.188v-2.589a.187.187 0 0 0-.188-.188H20.8A3.8 3.8 0 0 0 17 12a4.058 4.058 0 0 0-3.69 2.647.568.568 0 0 1-.537.383H1.093a.094.094 0 0 0-.093.093V17.9a.094.094 0 0 0 .094.094zM17 13.9a2.1 2.1 0 1 1-2.1 2.1 2.1 2.1 0 0 1 2.1-2.1z" />`}</svg></div><calcite-label class="deployed-label-override" scale=s>${this._translations.deployedDate.replace("{{date}}",this.deployedDate)}</calcite-label></div>`}_getChips(){return r`<calcite-chip class="chipClass" icon=effects .label=${this._translations.builtWithAI} scale=s>${this._translations.builtWithAI}</calcite-chip>`}_getConfigureButton(){let e=this._configContextConsumer.value?.userSession?.username,t=this._configContextConsumer.value?.authentication?.CanUpdateSolution,a=this._configContextConsumer.value?.authentication?.CanDeleteSolution&&this._configContextConsumer.value?.authentication?.CanUpdateSolution,s=N(this._configContextConsumer.value),l=this.card?.owner===e||this._isOrgAdmin||t,o=this.card?.owner===e||this._isOrgAdmin||a,d=l?"display-none":"";return r`<calcite-split-button appearance=outline aria-label=${this._translations.openSolution??p} dropdown-label=${this._translations.moreActions??p} kind=neutral @calciteSplitButtonPrimaryClick=${this._cardSelected} @click=${n=>n.stopPropagation()} @keydown=${n=>n.stopPropagation()} overlay-positioning=fixed primary-text=${this._translations.openSolution??p} width=full><calcite-dropdown-group selection-mode=none>${!this.isMobile&&r`<calcite-dropdown-item icon-start=model @click=${this._viewDiagram} @keydown=${n=>h(n,()=>this._viewDiagram(n))}>${this._translations.viewDiagram}</calcite-dropdown-item>`||""}<calcite-dropdown-item icon-start=file-text @click=${this._viewDocumentation} @keydown=${n=>h(n,()=>this._viewDocumentation(n))}>${this._translations.documentation}</calcite-dropdown-item><calcite-dropdown-item icon-start=information @click=${this._viewItemDetails} @keydown=${n=>h(n,()=>this._viewItemDetails(n))}>${this._translations.viewItemDetails}</calcite-dropdown-item>${!this.isMobile&&l&&r`<calcite-dropdown-item .disabled=${s} icon-start=edit-attributes id=solution-configure-titles-dropdown @click=${async()=>{this.templateInfos=await this._processTemplates(this.card),this._configureTitlesOpen=!0}} @keydown=${n=>h(n,async()=>{this.templateInfos=await this._processTemplates(this.card),this._configureTitlesOpen=!0})}>${this._translations.renameItems}</calcite-dropdown-item>`||""}${!this.isMobile&&o&&r`<calcite-dropdown-item .disabled=${s} icon-start=trash @click=${this._deleteSolution} @keydown=${n=>h(n,()=>this._deleteSolution(n))}>${this._translations.deleteSolution}</calcite-dropdown-item>`||""}</calcite-dropdown-group><calcite-tooltip class=${D(d)} overlay-positioning=fixed reference-element=solution-configure-titles-dropdown><span>${this._translations.mustOwnSolution}</span></calcite-tooltip></calcite-split-button>`}_renderDeleteDialog(){return this._isDeleteOpen?r`<solution-delete-dialog .card=${this.card} @solutionDeleteDialogOpen=${e=>{this._isDeleteOpen=e.detail}} .open=${this._isDeleteOpen} source="Card Dropdown" ${f(this._deleteDialogRef)}></solution-delete-dialog>`:""}_renderDiagramDialog(){return this._isDiagramOpen?r`<calcite-dialog class="dialog-y-size dialog-x-size panel-bg-color" .heading=${this._translations.diagramTitle.replace("{{solution}}",this.card?.title??"")} id=${this._translations.diagramTitle.replace("{{solution}}",this.card?.title??"")??p} modal .open=${this._isDiagramOpen} @calciteDialogClose=${()=>{this._isDiagramOpen=!1}} outside-close-disabled scale=m width=l ${f(this._diagramDialogRef)}><solution-item-diagram .diagramKey=${this.diagramKey} .templateInfoGraph=${this.templateInfoGraph} .typeKeywords=${this.card?.typeKeywords}></solution-item-diagram></calcite-dialog>`:""}_renderConfigureTitlesDialog(){return this._configureTitlesOpen?r`<solution-configure-titles .card=${this.card} @solutionConfigureTitlesBeforeClose=${async()=>{this._processTemplates(this.card).then(e=>{this.templateInfos=e}),this._configureTitlesOpen=!1}} @solutionItemsTitlesChanged=${async()=>{this._processTemplates(this.card).then(e=>{this.templateInfos=e})}} .open=${this._configureTitlesOpen} source="Card Dropdown" .templateInfos=${this.templateInfos}></solution-configure-titles>`:""}_cardSelected(){this.deployedCardSelected.emit({card:this.card,cardRef:this.el})}async _viewDiagram(e){e.stopPropagation(),this.card&&(this._telemetry?.logEvent({category:y.DEPLOYMENTS,action:"View Diagram",dimensions:[this.card.title||"",this.card.deployCommonId||"",this.card.deployVersion||"","Dropdown",g(this.card?.typeKeywords)]}),this.templateInfoGraph=await this._processTemplates(this.card),this._isDiagramOpen=!0)}_viewDocumentation(e){e.stopPropagation(),this._telemetry?.logEvent({category:y.DEPLOYMENTS,action:"Open Help",dimensions:[this.card?.title||"",this.card?.deployCommonId||"",this.card?.deployVersion||"","Card Dropdown",g(this.card?.typeKeywords)]}),window.open(this.card.learnMoreUrl,"_blank")}_viewItemDetails(e){e.stopPropagation(),this._telemetry?.logEvent({category:y.DEPLOYMENTS,action:"Open Item Details",dimensions:[this.card?.title||"",this.card?.deployCommonId||"",this.card?.deployVersion||"","Card Dropdown",g(this.card?.typeKeywords)]}),window.open(this.card.itemUrl,"_blank")}_deleteSolution(e){e.stopPropagation(),this._isDeleteOpen=!0}_openUserProfile(e){e.stopPropagation();let t=this._configContextConsumer.value?.authentication?.PortalSubset?.orgUrl;t&&window.open(`${t}/home/user.html?user=${this.owner}`,"_blank")}async _processTemplates(e){return await V(e.id,this._configContextConsumer.value.userSession)}_updateThumbnailToken(e){this._thumbnailUrl!==""&&(this._thumbnailUrl=q(this._thumbnailUrl,e))}};S("solution-deployed-card",E);var Ce=500,$e={AEC:"Architecture, Engineering, and Construction (AEC)",AIRPORTPORTRAIL:"Airports, Ports, and Rails",BUSINESS:"Business",CONSERVATION:"Conservation",DEFENSE:"Defense",FACILITIES:"Facilities",HEALTHANDHUMANSERVICES:"Health and Human Services",PIPELINE:"Pipeline",PUBLICSAFETY:"Public Safety",RENEWABLES:"Renewables",STATEANDLOCALGOVERNMENT:"State and Local Government",TELECOMMUNICATIONS:"Telecommunications",UTILITIES:"Utilities"},Re={AIRPORT:"Airports",AGRICULTURE:"Agriculture",ASSESSMENTANDTAXATION:"Assessment and Taxation",DISTRICTENERGY:"District Energy",ELECTIONS:"Elections",ELECTRIC:"Electric",EMERGENCYMANAGEMENT:"Emergency Management",ENVIRONMENTANDNATURALRESOURCES:"Environment and Natural Resources",FIRESERVICE:"Fire Service",FISHANDWILDLIFE:"Fish and Wildlife",GAS:"Gas",HEALTHANDHUMANSERVICES:"Health and Human Services",LAWENFORCEMENT:"Law Enforcement",NATURALRESOURCES:"Natural Resources",PARKS:"Parks",PLANNINGANDDEVELOPMENT:"Planning and Development",PROTECTEDAREAS:"Protected Areas",PUBLICWORKS:"Public Works",SEWER:"Sewer",STORMWATER:"Stormwater",TELECOMMUNICATIONS:"Telecommunications",TRANSPORTATION:"Transportation",WATER:"Water Distribution"},c=(i=>(i.HUBPREMIUM="solutions:hubPremium",i.NOTEBOOK="solutions:notebook",i.TRACKINGBASE="solutions:locationtracking",i.TRACKING="solutions:locationtracking:tracking",i.TRACKINGADMIN="solutions:locationtracking:admin",i.TRACKINGADMINANDTRACKING="solutions:locationtracking:admin:tracking",i.VELOCITY="solutions:velocity",i.WORKFLOW="solutions:workflowManager",i))(c||{}),j=(i=>(i.VELOCITYBIGDATA="portal:publisher:publishBigDataAnalytics",i.VELOCITYFEEDS="portal:publisher:publishFeeds",i.VELOCITYREALTIME="portal:publisher:publishRealTimeAnalytics",i))(j||{}),xe='((typekeywords:Deployed,"ArcGIS Solution") OR (typekeywords:Deployed,AIAssistant) OR ((typekeywords:Deployed) AND (created:[1577862000000 TO 1622576880000])))',Ne="(typekeywords:Solution,Template)",J="portal:user:addExternalMembersToGroup",X="portal:user:createItem",M="portal:user:createGroup",Q="portal:publisher:publishBigDataAnalytics",P="portal:publisher:publishFeatures",Z="portal:publisher:publishFeeds",ee="portal:publisher:publishServerGPServices",te="portal:publisher:publishRealTimeAnalytics",L="portal:user:shareToGroup",ie="solutions:hubPremium",ae="solutions:notebook",se="solutions:locationtracking:admin:tracking",oe="solutions:locationtracking:tracking",ne="solutions:locationtracking:admin",le="solutions:velocity",re="solutions:workflowManager",Me=250,Pe=256,y={SOLUTION_DETAILS:"Solution Details",GLOBAL_NAVIGATION:"Global Nav",ALL_SOLUTIONS:"Solutions",DEPLOYMENTS:"Deployments",ASSISTANT:"Assistant",RESOURCES:"Resources",BUILDER:"Solution Builder"},Le={MINE:"My deployments",ORG:"Organization"};return{a:V,b:Se,c:G,d:Ie,e:Oe,f:ke,g:q,h:E,i:Ce,j:$e,k:Re,l:c,m:j,n:xe,o:Ne,p:Me,q:Pe,r:y,s:Le}},"identity/IdentityManager","identity/OAuthInfo","portal/Portal","intl","geometry/Extent","geometry/SpatialReference","geometry/operators/projectOperator","geometry/operators/support/geographicTransformationUtils",a)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import e from"./KGUELU4O.js";import{a as xe,b as Ge,c as ue}from"./TCUNTTNI.js";import d from"./C4F2OOUL.js";import c from"./SIODWUWX.js";import b from"./7JC52SFZ.js";import a from"./4AFANEZZ.js";import{a as je}from"./CJ3EZE7U.js";import{d as Ne}from"./C5KDPY7R.js";import{a as Ke,b as de,c as Ee,d as me,e as Qe,f as Xe,g as ye,h as Re,i as Ye,j as Ze,k as Oe}from"./YM4U4HSN.js";import{a as j}from"./IADXB53D.js";import{a as Q}from"./ONARC6AZ.js";import{b as We}from"./HVT2WBVC.js";import"./ISFTCFSJ.js";import{E as Ue,F as Le,G as qe,I as x,J as k,h as Be,i as L,j as _e,l as ge,t as De}from"./FFF5HUPM.js";import"./EXBEKVP5.js";export default $arcgis.t(([ct,vt,gt,q,fe,Ct,,{a:N,b:J,c:Je,d:he},{a:be,b:Ve,d:et,f:tt,g:Ae,h:it,i:nt,j:at},{a:rt,b:Ce,c:st,g:lt},oe])=>{(function(d,e){typeof exports=="object"&&typeof module<"u"?e(exports):typeof define=="function"&&define.amd?define(["exports"],e):(d=typeof globalThis<"u"?globalThis:d||self,e(d.maquette={}))})(void 0,(function(d){"use strict";var e=function(){var t,i;return{invalidate:function(){i=void 0,t=void 0},result:function(a,c){if(t)for(var g=0;g<a.length;g++)t[g]!==a[g]&&(i=void 0);return i||(i=c(),t=a),i}}},n="http://www.w3.org/",l="".concat(n,"2000/svg"),r="".concat(n,"1999/xlink"),s=[],u=function(t,i){var a={};return Object.keys(t).forEach(function(c){a[c]=t[c]}),i&&Object.keys(i).forEach(function(c){a[c]=i[c]}),a},h=function(t,i){return t.vnodeSelector!==i.vnodeSelector?!1:t.properties&&i.properties?t.properties.key!==i.properties.key?!1:t.properties.bind===i.properties.bind:!t.properties&&!i.properties},$=function(t){if(typeof t!="string")throw new Error("Style values must be strings")},w=function(t,i,a){if(i.vnodeSelector!==""){for(var c=a;c<t.length;c++)if(h(t[c],i))return c}return-1},S=function(t,i,a,c){var g=t[i];if(g.vnodeSelector!==""){var o=g.properties,E=o?o.key===void 0?o.bind:o.key:void 0;if(!E){for(var p=0;p<t.length;p++)if(p!==i){var f=t[p];if(h(f,g))throw Object.assign(new Error("".concat(a.vnodeSelector," had a ").concat(g.vnodeSelector," child ").concat(c==="added"?c:"removed",", but there is now more than one. You must add unique key properties to make them distinguishable.")),{parentNode:a,childNode:g})}}}},R=function(t){if(t.properties){var i=t.properties.enterAnimation;i&&i(t.domNode,t.properties)}},_=[],T=!1,M=function(t){(t.children||[]).forEach(M),t.properties&&t.properties.afterRemoved&&t.properties.afterRemoved.apply(t.properties.bind||t.properties,[t.domNode])},I=function(){T=!1,_.forEach(M),_.length=0},P=function(t){_.push(t),T||(T=!0,typeof window<"u"&&"requestIdleCallback"in window?window.requestIdleCallback(I,{timeout:16}):setTimeout(I,16))},C=function(t){var i=t.domNode;if(t.properties){var a=t.properties.exitAnimation;if(a){i.style.pointerEvents="none";var c=function(){i.parentNode&&(i.parentNode.removeChild(i),P(t))};a(i,c,t.properties);return}}i.parentNode&&(i.parentNode.removeChild(i),P(t))},B=["on","afterCreate","afterUpdate","afterRemoved","enterAnimation","exitAnimation","updateAnimation"];function U(t){return!B.includes(t)}var K=function(t,i,a){if(i){for(var c=a.eventHandlerInterceptor,g=Object.keys(i).filter(U),o=g.length,E=0;E<o;E++){var p=g[E],f=i[p];if(p==="className")throw new Error('Property "className" is not supported, use "class".');if(p==="class")se(t,f,!0);else if(p==="classes")for(var v=Object.keys(f),A=v.length,b=0;b<A;b++){var y=v[b];f[y]&&t.classList.add(y)}else if(p==="styles")for(var z=Object.keys(f),F=z.length,b=0;b<F;b++){var G=z[b],te=f[G];te&&($(te),a.styleApplyer(t,G,te))}else if(p!=="key"&&f!==null&&f!==void 0){var ve=typeof f;ve==="function"?(p.lastIndexOf("on",0)===0&&c&&(f=c(p,f,t,i)),t[p]=f):a.namespace===l?p==="href"?t.setAttributeNS(r,p,f):t.setAttribute(p,f):ve==="string"&&p!=="value"&&p!=="innerHTML"?t.setAttribute(p,f):t[p]=f}}if(i.on)for(var ie=0,pe=Object.entries(i.on);ie<pe.length;ie++){var Y=pe[ie],Z=Y[0],O=Y[1],ne=typeof O=="function"?O:O.listener;c&&(ne=c(Z,ne,t,i)),ne&&t.addEventListener(Z,ne,typeof O=="function"?void 0:O.options)}}},H=function(t,i,a){if(i)for(var c=0,g=i;c<g.length;c++){var o=g[c];W(o,t,void 0,a)}},D=function(t,i,a){H(t,i.children,a),i.text&&(t.textContent=i.text),K(t,i.properties,a),i.properties&&i.properties.afterCreate&&i.properties.afterCreate.apply(i.properties.bind||i.properties,[t,a,i.vnodeSelector,i.properties,i.children])},W=function(t,i,a,c){var g,o,E=0,p=t.vnodeSelector,f=i.ownerDocument;if(p==="")t.domNode?t.domNode.nodeValue=t.text:(o=t.domNode=f.createTextNode(t.text),a!==void 0?i.insertBefore(o,a):i.appendChild(o));else{for(var v=0;v<=p.length;++v){var A=p.charAt(v);if(v===p.length||A==="."||A==="#"){var b=p.charAt(E-1),y=p.slice(E,v);b==="."?o.classList.add(y):b==="#"?o.id=y:(y==="svg"&&(c=u(c,{namespace:l})),c.namespace!==void 0?o=t.domNode=f.createElementNS(c.namespace,y):(o=t.domNode=t.domNode||(!((g=t.properties)===null||g===void 0)&&g.is?f.createElement(y,{is:t.properties.is}):f.createElement(y)),y==="input"&&t.properties&&t.properties.type!==void 0&&o.setAttribute("type",t.properties.type)),a!==void 0?i.insertBefore(o,a):o.parentNode!==i&&i.appendChild(o)),E=v+1}}D(o,t,c)}},V,se=function(t,i,a){i&&i.split(" ").forEach(function(c){c&&t.classList.toggle(c,a)})},we=function(t,i,a,c){if(a){for(var g=!1,o=Object.keys(a).filter(U),E=o.length,p=0;p<E;p++){var f=o[p],v=a[f],A=i[f];if(f==="class")A!==v&&(se(t,A,!1),se(t,v,!0));else if(f==="classes")for(var b=t.classList,y=Object.keys(v),z=y.length,F=0;F<z;F++){var G=y[F],te=!!v[G],ve=!!A[G];te!==ve&&(g=!0,te?b.add(G):b.remove(G))}else if(f==="styles")for(var ie=Object.keys(v),pe=ie.length,F=0;F<pe;F++){var Y=ie[F],Z=v[Y],O=A[Y];Z!==O&&(g=!0,Z?($(Z),c.styleApplyer(t,Y,Z)):c.styleApplyer(t,Y,""))}else if(!v&&typeof A=="string"&&(v=""),f==="value"){var ne=t[f];ne!==v&&v!==A&&(t[f]=v),v!==A&&(g=!0)}else if(v!==A){var He=typeof v;(He!=="function"||!c.eventHandlerInterceptor)&&(c.namespace===l?f==="href"?t.setAttributeNS(r,f,v):t.setAttribute(f,v):He==="string"&&f!=="innerHTML"?f==="role"&&v===""?t.removeAttribute(f):t.setAttribute(f,v):t[f]!==v&&(t[f]=v),g=!0)}}return g}},bt=function(t,i,a,c,g){if(a===c)return!1;a=a||s,c=c||s;for(var o=a.length,E=c.length,p=0,f=0,v,A=!1;f<E;){var b=p<o?a[p]:void 0,y=c[f];if(b!==void 0&&h(b,y))A=V(b,y,g,i,a)||A,p++;else{var z=w(a,y,p+1);if(z>=0){for(v=p;v<z;v++)C(a[v]),S(a,v,t,"removed");A=V(a[z],y,g,i,a)||A,p=z+1}else W(y,i,p<o?a[p].domNode:void 0,g),R(y),S(c,f,t,"added")}f++}if(o>p)for(v=p;v<o;v++)C(a[v]),S(a,v,t,"removed");return A};V=function(t,i,a,c,g){var o=t.domNode,E=!1;if(t===i)return!1;var p=!1;if(i.vnodeSelector===""){if(i.text!==t.text){var f=o.ownerDocument.createTextNode(i.text);try{c.replaceChild(f,o)}catch{c.replaceChild(f,c.childNodes[g.indexOf(t)])}return i.domNode=f,E=!0,E}i.domNode=o}else i.vnodeSelector.lastIndexOf("svg",0)===0&&(a=u(a,{namespace:l})),t.text!==i.text&&(p=!0,i.text===void 0?o.removeChild(o.firstChild):o.textContent=i.text),i.domNode=o,p=bt(i,o,t.children,i.children,a)||p,p=we(o,t.properties,i.properties,a)||p,i.properties&&i.properties.afterUpdate&&i.properties.afterUpdate.apply(i.properties.bind||i.properties,[o,a,i.vnodeSelector,i.properties,i.children]);return p&&i.properties&&i.properties.updateAnimation&&i.properties.updateAnimation(o,i.properties,t.properties),E};var le=function(t,i){return{getLastRender:function(){return t},update:function(a){if(t.vnodeSelector!==a.vnodeSelector)throw new Error("The selector for the root VNode may not be changed. (consider using dom.merge and add one extra level to the virtual DOM)");var c=t;t=a,V(c,a,i,c.domNode.parentNode,[c])},domNode:t.domNode}},$t={namespace:void 0,performanceLogger:function(){},eventHandlerInterceptor:void 0,styleApplyer:function(t,i,a){i.charAt(0)==="-"?t.style.setProperty(i,a):t.style[i]=a}},ee=function(t){return u($t,t)},ce={create:function(t,i){return i=ee(i),W(t,document.createElement("div"),void 0,i),le(t,i)},append:function(t,i,a){return a=ee(a),W(i,t,void 0,a),le(i,a)},insertBefore:function(t,i,a){return a=ee(a),W(i,t.parentNode,t,a),le(i,a)},merge:function(t,i,a){return a=ee(a),i.domNode=t,D(t,i,a),le(i,a)},replace:function(t,i,a){return a=ee(a),W(i,t.parentNode,t,a),t.parentNode.removeChild(t),le(i,a)}},wt=function(t){return{vnodeSelector:"",properties:void 0,children:void 0,text:t.toString(),domNode:null}},Me=function(t,i,a){for(var c=0,g=i.length;c<g;c++){var o=i[c];Array.isArray(o)?Me(t,o,a):o!=null&&o!==!1&&(typeof o=="string"&&(o=wt(o)),a.push(o))}};function _t(t,i,a){if(Array.isArray(i))a=i,i=void 0;else if(i&&(typeof i=="string"||i.vnodeSelector)||a&&(typeof a=="string"||a.vnodeSelector))throw new Error("h called with invalid arguments");var c,g;return a&&a.length===1&&typeof a[0]=="string"?c=a[0]:a&&(g=[],Me(t,a,g),g.length===0&&(g=void 0)),{vnodeSelector:t,properties:i,children:g,text:c===""?void 0:c,domNode:null}}var Lt=function(t,i,a){var c=[],g=[];return{results:g,map:function(o){for(var E=o.map(t),p=g.slice(),f=0,v=0;v<o.length;v++){var A=o[v],b=E[v];if(b===c[f])g[v]=p[f],a(A,p[f],v),f++;else{for(var y=!1,z=1;z<c.length+1;z++){var F=(f+z)%c.length;if(c[F]===b){g[v]=p[F],a(o[v],p[F],v),f=F+1,y=!0;break}}y||(g[v]=i(A,v))}}g.length=o.length,c=E}}},xt=function(t,i){for(var a=[];t&&t!==i;)a.push(t),t=t.parentNode;return a},Et=function(t,i){var a=t;return i.forEach(function(c){a=a&&a.children?a.children.find(function(g){return g.domNode===c}):void 0}),a},Rt=function(t,i,a){return function(g,o,E,p){return c};function c(g){var o,E;a("domEvent",g);var p=i(),f=xt(g.currentTarget,p.domNode);f.reverse();var v=Et(p.getLastRender(),f);t.scheduleRender();var A;if(v){var b=(E=(o=v.properties["on".concat(g.type)])!==null&&o!==void 0?o:v.properties.on[g.type].listener)!==null&&E!==void 0?E:v.properties.on[g.type];A=b.apply(v.properties.bind||this,arguments)}return a("domEventProcessed",g),A}},At=function(t){var i,a=ee(t),c=a.performanceLogger,g=!0,o,E=!1,p=[],f=[],v=function(b,y,z){var F,G=function(){return F};a.eventHandlerInterceptor=Rt(i,G,c),F=b(y,z(),a),p.push(F),f.push(z)},A=function(){if(o=void 0,!!g){g=!1,c("renderStart",void 0);for(var b=0;b<p.length;b++){var y=f[b]();c("rendered",void 0),p[b].update(y),c("patched",void 0)}c("renderDone",void 0),g=!0}};return i={renderNow:A,scheduleRender:function(){!o&&!E&&(o=requestAnimationFrame(A))},stop:function(){o&&(cancelAnimationFrame(o),o=void 0),E=!0},resume:function(){E=!1,g=!0,i.scheduleRender()},append:function(b,y){v(ce.append,b,y)},insertBefore:function(b,y){v(ce.insertBefore,b,y)},merge:function(b,y){v(ce.merge,b,y)},replace:function(b,y){v(ce.replace,b,y)},detach:function(b){for(var y=0;y<f.length;y++)if(f[y]===b)return f.splice(y,1),p.splice(y,1)[0];throw new Error("renderFunction was not found")}},i};d.createCache=e,d.createMapping=Lt,d.createProjector=At,d.dom=ce,d.h=_t}));function kt(d,e,n,l){let r=st(d,e,n,l),s=St(r);return r.join(s)}function St(d){return d.every(e=>e&&e.includes(rt.NOT_EQUAL))?Ce.AND:Ce.OR}async function dt(d,e,n,l,r){let{fLayerView:s}=d,u=kt(d,e,n,r),h=s?.filter?.timeExtent??s?.featureEffect?.filter?.timeExtent??null,{type:$}=l;if(ue($))s.filter=new ct({where:u,timeExtent:h});else if(l.effect){let{includedEffect:w,excludedEffect:S}=l.effect,R=await oe(S,s,"excludedEffect"),_=await oe(w,s,"includedEffect");s.featureEffect=new vt({filter:new ct({where:u,timeExtent:h}),includedEffect:_,excludedEffect:R})}return await Promise.resolve()}function It(d,e){let{type:n}=d;ue(n)?Tt(e):Ge(n)&&Ft(d,e)}function Tt(d){d?.allLayerViews?.filter(e=>be(e?.layer?.type))?.forEach(e=>{let n=e,l=ut(n);n.filter=l,n.set("featureEffect",null)})}function Ft(d,e){e?.allLayerViews?.filter(n=>be(n?.layer?.type)).forEach(async n=>{let l=n;if(d?.effect&&l){let{includedEffect:r,excludedEffect:s}=d.effect,u=await oe(s,l,"excludedEffect"),h=await oe(r,l,"includedEffect"),$=ut(l);l.featureEffect=new vt({filter:$,includedEffect:h,excludedEffect:u}),l.set(xe.FILTER,null)}})}function ut(d){return d?.filter||d?.featureEffect?.filter}var Pt=80,zt=.2,Mt=6;function X(d){let e=typeof d=="number"?d:Number(d);return Number.isFinite(e)?e:0}function ht(d){if("infos"in d)return Math.max(...d.infos.map(e=>ht(e)),0);if("preview"in d&&d.preview){let e=d.preview,n=e.querySelector("svg"),l=X(n?.getAttribute("width")),r=X(n?.getAttribute("height")),s=X(e.style.width?.replace("px","")),u=X(e.style.height?.replace("px","")),h=X(e.clientWidth),$=X(e.clientHeight);return Math.max(l,r,s,u,h,$)}return"src"in d?Math.max(X(d.width),X(d.height)):0}function Ht(d,e){let n=ht(d);return n>=Pt?!0:typeof e!="number"||e<=0?!1:n+Mt>=e}function Bt(d){if(!(d<=0))return d*zt}var Dt=(void 0)(),mt=10,Fe=20,$e=10,Pe=20,ze={univariateAboveAndBelowSymbol:"esri-univariate-above-and-below-ramp__symbol",colorRamp:"esri-legend__color-ramp"};function Ut(d="vertical"){let e={stroke:"rgb(200, 200, 200)",strokeWidth:"1"};return d==="vertical"?L`<svg height=4 width=10>${_e`<line x1=0 y1=2 x2=10 y2=2 style=${k(e)} />`}</svg>`:L`<svg height=10 width=10>${_e`<line x1=5 y1=0 x2=5 y2=10 style=${k(e)} />`}</svg>`}function qt(d,e="vertical"){let n=document.createElement("div");return n.style.height=`${Fe}px`,n.className=ze.univariateAboveAndBelowSymbol,d!=null&&(n.style.opacity=d.toString()),Dt.append(n,Ut.bind(null,e)),n}function yt(d,e,n="vertical",l){d.infos.forEach((r,s)=>{if(l&&s===2)r.preview=qt(e,n);else{let{size:u}=r,h=re(u)+(n==="horizontal"?Pe:$e),$=r.preview.tagName.toLowerCase()==="div",w=$?r.preview:document.createElement("div");w&&(w.className=ze.univariateAboveAndBelowSymbol),n==="horizontal"?w&&(w.style.width=`${h}px`):w&&(w.style.height=`${h}px`),$||w&&w.appendChild(r.preview),r.preview=w}})}var Wt=96;function re(d){return d?d/72*Wt:0}function ot(d,e="classic"){let n=d.infos,l=n[0].size,r=n[n.length-1].size;return e==="classic"?(re(l)+$e)/2:(re(l)-re(r))/2}function ke(d,e){if(!d)return null;let n=d.infos.map(r=>r.color),l=gt.renderColorRampPreviewHTML(e.type==="full"?n:e.type==="above"?n.slice(0,3):n.slice(2,5),{width:e.width,height:e.height,align:e.rampAlignment,effectList:e.effectList});return l.className=ze.colorRamp,e.opacity!=null&&(l.style.opacity=e.opacity.toString()),l}function Gt(d,e,n,l="vertical"){let r=0,s=d.infos,u=Math.floor(s.length/2),h=e==="full"||e==="above"?0:u,$=e==="full"||e==="below"?s.length-1:u;for(let w=h;w<=$;w++)if(n&&w===u)r+=l==="horizontal"?mt:Fe;else{let S=s[w].size,R=re(S)+(l==="horizontal"?Pe:$e);r+=R}return Math.round(r)}function Se(d,e,n,l="vertical"){let r=Gt(d,e,n,l),s=d.infos,u=Math.floor(s.length/2),h=e==="full"||e==="above"?0:u,$=e==="full"||e==="below"?s.length-1:u,w=e==="full"?s[h].size+s[$].size:e==="above"?s[h].size:s[$].size,S=n?l==="vertical"?Fe:mt:0,R=l==="vertical"?$e*(e==="full"?2:1):Pe*(e==="full"?2:1);return Math.round(r-(re(w)/2+S/2+R/2))}function Jt(d,e,n="vertical"){let l=d.infos,r=l.find(u=>ye(u)),s=l.find(u=>de(u));return r&&(r={...r},r.infos=[...r.infos],yt(r,e,n,!0)),s&&(s={...s},s.infos=[...s.infos]),n==="horizontal"&&(r?.infos.reverse(),s?.infos.reverse()),{sizeRampElement:r,colorRampElement:s}}function Kt(d,e="vertical"){let n=d.infos,l=n.find(s=>ye(s)),r=n.find(s=>de(s));return l&&(l={...l},l.infos=[...l.infos],yt(l,null,e,!1)),r&&(r={...r},r.infos=[...r.infos]),e==="horizontal"&&(l?.infos.reverse(),r?.infos.reverse()),{sizeRampElement:l,colorRampElement:r}}var Qt=Be`@layer{instant-apps-interactive-legend-classic{display:block;--instant-apps-interactive-legend-heading-font-size: 1rem;--instant-apps-interactive-legend-heading-font-weight: normal;--instant-apps-interactive-legend-caption-font-weight: normal;--instant-apps-interactive-legend-secondary-color: var( --calcite-color-text-1 );--instant-apps-interactive-legend-field-name-font-size: 1rem;--instant-apps-interactive-legend-total-feature-count-font-size: .875rem;--instant-apps-interactive-legend-info-font-size: .875rem;--instant-apps-interactive-legend-info-item-background--selected: #c7ebff;--instant-apps-interactive-legend-info-item-background--selected--dark: #009af2;--instant-apps-interactive-legend-info-item-background--hover: #e9e9e9;--instant-apps-interactive-legend-info-item-background--hover--dark: #4a4a4a;--instant-apps-interactive-legend-info-item-color--selected: var( --calcite-color-text-2 );--instant-apps-interactive-legend-secondary-background-color: var( --calcite-color-background );--instant-apps-interactive-legend-ui-margin: 20px 15px;--instant-apps-interactive-legend-ui-padding: 20px 15px}instant-apps-interactive-legend-classic .esri-legend__service{padding:0}instant-apps-interactive-legend-classic .esri-legend__layer-body,instant-apps-interactive-legend-classic .esri-legend__layer,instant-apps-interactive-legend-classic .esri-legend__layer-table,instant-apps-interactive-legend-classic .esri-legend__group-layer-child,instant-apps-interactive-legend-classic .esri-legend__layer-child-table{margin:0;overflow:hidden}instant-apps-interactive-legend-classic .esri-legend__layer-caption calcite-action{margin-right:5px}instant-apps-interactive-legend-classic .esri-legend__layer-caption{display:flex;align-items:center;font-size:var(--instant-apps-interactive-legend-field-name-font-size);background-color:var(--instant-apps-interactive-legend-secondary-background-color);color:var(--instant-apps-interactive-legend-secondary-color)}instant-apps-interactive-legend-classic .instant-apps-interactive-legend__layer-caption-btn-container{white-space:nowrap}instant-apps-interactive-legend-classic .instant-apps-interactive-legend__layer-caption-btn-container calcite-button{margin:2px}instant-apps-interactive-legend-classic .esri-legend__layer-caption{font-weight:var(--instant-apps-interactive-legend-caption-font-weight)}instant-apps-interactive-legend-classic .esri-legend__layer-cell.esri-legend__layer-cell--info{font-size:var(--instant-apps-interactive-legend-info-font-size);text-align:left}instant-apps-interactive-legend-classic .esri-legend__layer-cell,instant-apps-interactive-legend-classic .esri-legend__layer-row{display:flex;align-items:center}instant-apps-interactive-legend-classic .instant-apps-interactive-legend__non-interactive .esri-legend__layer-body{display:block;margin:var(--instant-apps-interactive-legend-ui-margin)}instant-apps-interactive-legend-classic .instant-apps-interactive-legend__non-interactive.instant-apps-interactive-legend__nested-unique-symbol>.esri-legend__layer-body{margin:0}instant-apps-interactive-legend-classic .instant-apps-interactive-legend__non-interactive .esri-legend__layer-row{display:table-row}instant-apps-interactive-legend-classic .instant-apps-interactive-legend__non-interactive .esri-legend__layer-cell{display:table-cell}instant-apps-interactive-legend-classic .esri-legend__layer-cell--symbols{justify-content:center;width:20%}instant-apps-interactive-legend-classic .esri-legend__layer-cell--info{width:65%}instant-apps-interactive-legend-classic .instant-apps-interactive-legend__layer-row--interactive{margin:1px;background:transparent;border:none;width:100%}instant-apps-interactive-legend-classic .esri-legend__layer-body.instant-apps-interactive-legend__layer-body--large-symbol>.esri-legend__layer-row{display:grid;grid-template-columns:minmax(35%,max-content) minmax(0,1fr);column-gap:clamp(.125rem,.3vw,.25rem);align-items:center;width:100%}instant-apps-interactive-legend-classic .esri-legend__layer-body.instant-apps-interactive-legend__layer-body--large-symbol>.esri-legend__layer-row>.esri-legend__layer-cell--symbols{width:35%;box-sizing:border-box;padding-inline:clamp(.125rem,.3vw,.25rem);display:flex;align-items:center;justify-content:center}instant-apps-interactive-legend-classic .esri-legend__layer-body.instant-apps-interactive-legend__layer-body--large-symbol>.esri-legend__layer-row>.esri-legend__layer-cell--info{display:block;width:auto;min-width:0}instant-apps-interactive-legend-classic .esri-legend__layer-cell--info{color:var(--instant-apps-interactive-legend-secondary-color)}instant-apps-interactive-legend-classic .esri-legend__layer-row,instant-apps-interactive-legend-classic .esri-legend__layer-caption{padding:var(--instant-apps-interactive-legend-ui-padding)}instant-apps-interactive-legend-classic .instant-apps-interactive-legend__layer-row--interactive{position:relative}instant-apps-interactive-legend-classic .instant-apps-interactive-legend-element-info--selected{background-color:var(--instant-apps-interactive-legend-info-item-background--selected)}instant-apps-interactive-legend-classic .calcite-mode-dark .instant-apps-interactive-legend-element-info--selected{cursor:pointer;background-color:var(--instant-apps-interactive-legend-info-item-background--selected--dark)}instant-apps-interactive-legend-classic .calcite-mode-dark .instant-apps-interactive-legend-element-info--selected .esri-legend__layer-cell--info{color:var(--calcite-color-text-inverse)}instant-apps-interactive-legend-classic .hide{display:none}.instant-apps-interactive-legend__compact .esri-legend__layer-row{--instant-apps-interactive-legend-ui-padding: 10px 5px}.instant-apps-interactive-legend__compact .esri-legend__layer-row .esri-legend__layer-cell--info:not(:has(.esri-legend__ramp-labels)){display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;text-overflow:ellipsis;line-clamp:2;line-height:1.3125rem;max-height:2.625rem}@media(min-width:992px){instant-apps-interactive-legend-classic .instant-apps-interactive-legend__layer-row--interactive{cursor:pointer}instant-apps-interactive-legend-classic .instant-apps-interactive-legend__layer-row--interactive:hover{background-color:var(--instant-apps-interactive-legend-info-item-background--hover)}instant-apps-interactive-legend-classic .instant-apps-interactive-legend__layer-row--interactive:hover.instant-apps-interactive-legend-element-info--selected{background-color:#e2f2fe}instant-apps-interactive-legend-classic .calcite-mode-dark .instant-apps-interactive-legend__layer-row--interactive:hover{background-color:var(--instant-apps-interactive-legend-info-item-background--hover--dark)}instant-apps-interactive-legend-classic .calcite-mode-dark .instant-apps-interactive-legend__layer-row--interactive:hover.instant-apps-interactive-legend-element-info--selected{background-color:#26a9f4}}}`,m={layer:"esri-legend__layer",layerBody:"esri-legend__layer-body",layerRow:"esri-legend__layer-row",layerInfo:"esri-legend__layer-cell esri-legend__layer-cell--info",imageryLayerStretchedImage:"esri-legend__imagery-layer-image--stretched",imageryLayerInfoStretched:"esri-legend__imagery-layer-info--stretched",symbolContainer:"esri-legend__layer-cell esri-legend__layer-cell--symbols",symbol:"esri-legend__symbol",rampContainer:"esri-legend__ramps",sizeRamp:"esri-legend__size-ramp",colorRamp:"esri-legend__color-ramp",opacityRamp:"esri-legend__opacity-ramp",rampLabelsContainer:"esri-legend__ramp-labels",rampLabel:"esri-legend__ramp-label",univariateAboveAndBelowLabel:"esri-univariate-above-and-below-ramp__label",message:"esri-legend__message",layerBodyLargeSymbol:"instant-apps-interactive-legend__layer-body--large-symbol",interactiveLayerRow:"instant-apps-interactive-legend__layer-row--interactive",infoSelected:"instant-apps-interactive-legend-element-info--selected",compact:"instant-apps-interactive-legend__compact"},Xt=24,ft={display:"flex",alignItems:"flex-start"},Ie={marginLeft:"3px"},ae={display:"table-cell",verticalAlign:"middle"},Te=class extends qe{constructor(){super(...arguments),this.featureCountRequestId=0,this._legendContainerRef=Ue(),this._hiddenLegendState={},this._pendingRestore={},this._restoreTimeouts={},this.isLoading=!0,this.zoomTo=!1,this.featureCount=!1,this.filterMode={type:xe.FILTER}}static{this.properties={isLoading:16,legendvm:0,zoomTo:5,featureCount:5,filterMode:0,messages:0}}static{this.styles=Qt}static{this.shadowRootOptions=De}connectedCallback(){super.connectedCallback(),!this.handles&&(this.handles=new Ct)}async load(){new MutationObserver(()=>{this.requestUpdate()}).observe(this.el,{attributes:!0}),J.onChange("data",()=>this.requestUpdate())}willUpdate(e){e.has("filterMode")&&this.legendvm?.view&&(this.hasUpdated||!ue(this.filterMode.type))&&It(this.filterMode,this.legendvm.view)}async loaded(){await this.initLegend()}disconnectedCallback(){super.disconnectedCallback(),this.handles?.removeAll(),this.handles?.destroy(),this.handles=null}async initLegend(){try{await q.whenOnce(()=>this.legendvm?.view);let e=async()=>{try{let n=this.legendvm?.view?.map;await n?.load(),await n?.basemap?.load();let l=n?.allLayers?.map(async h=>await h.load()),r=(await Promise.allSettled(l)).map(h=>h?.status==="fulfilled"&&h?.value?h.value:null).filter(h=>!!h),s=[];r.forEach(h=>{this.legendvm?.view&&s.push(this.legendvm.view.whenLayerView(h))}),await Promise.allSettled(s);let u=await Ae(this.legendvm);J.set("data",{...N.data,...u}),await this.refreshFeatureCount(),this.isLoading=!1,await this.setupWatchersAndListeners()}catch(n){console.error(n),this.isLoading=!1}};this.legendvm?.view?.when(e),this.legendvm?.view?.map?.layers?.on("after-changes",e)}catch{this.isLoading=!1}}getStretchStopLabel(e){let n=this.messages[e.label];return e.label?`${n}: ${typeof e.value=="string"?e.value:fe.formatNumber(e.value,{style:"decimal",notation:e.value.toString().includes("e")?"scientific":"standard"})}`:""}getTitle(e,n){if(!e)return;if(typeof e=="string"||typeof e=="number")return e;if("value"in e||"unit"in e){let s=typeof this.messages?.dotValue=="string"?this.messages.dotValue:"";return fe.substitute(s,e)}if("colorName"in e||"bandName"in e){let{colorName:s,bandName:u}=e,h=this.messages[s],$=typeof this.messages[u]=="string"?this.messages[u]:u;return`${h}: ${$}`}if("showCount"in e)return e.showCount?this.messages.clusterCountTitle:null;let l=null;if(n){let s=e;l=s.ratioPercentTotal?"showRatioPercentTotal":s.ratioPercent?"showRatioPercent":s.ratio?"showRatio":e.normField?"showNormField":e.field?"showField":null}else if(this.isRendererTitle(n)){let s=e;l=s.normField?"showNormField":s.normByPct?"showNormPct":s.field?"showField":null}let r=l==="showField"?"{field}":typeof l=="string"?this.messages[l]:"";return l?fe.substitute(r,{field:e.field,normField:e.normField}):""}isRendererTitle(e){return!e}async setupWatchersAndListeners(){let e=this.legendvm?.view?.map?.allLayers?.filter(r=>be(r?.type)),n=[];for(let r of e)this.legendvm?.view&&n.push(this.legendvm?.view?.whenLayerView(r));let l=[];try{l=await Promise.all(n)}catch(r){console.error(r)}for(let r of l){let s=`fLayerViewScale-${r.layer.id}`;!this.handles?.has(s)&&r&&this.handles?.add(r.watch("visibleAtCurrentScale",()=>{this.createDataForLayer(r.layer).catch(u=>{console.error(u)})}),s)}e?.forEach(r=>{let s=`fLayer-${r?.id}`;this.handles?.has(s)||this.handles?.add(q?.watch(()=>r?.visible,()=>this.handleFeatureLayerVisibilityChange(r)),s)}),this.handles?.add(q.when(()=>this.legendvm,()=>{q.watch(()=>this.legendvm?.view?.updating,()=>{this.legendvm?.view?.updating&&q.when(()=>!this.legendvm?.view?.updating,()=>{this.refreshFeatureCount().catch(r=>{console.error(r)})},{once:!0,initial:!0})},{initial:!0})},{initial:!0,once:!0})),this.handles?.add(q.on(()=>this.legendvm?.activeLayerInfos,"change",r=>{this.regenerateData().then(()=>{this.handles?.add(q.on(()=>r.children,"change",()=>{this.regenerateData().catch(s=>{console.error(s)})}))}).catch(s=>{console.error(s)})})),this.handles?.add(q.on(()=>this.legendvm?.view?.map?.layers,"after-changes",()=>{this.refreshFeatureCount().catch(r=>{console.error(r)})}))}async createDataForLayer(e){let n=e?.id;if(nt(n,this._pendingRestore,this._hiddenLegendState))return;let l=J.get("data")?.[n],r=it(this.legendvm?.activeLayerInfos)?.find(s=>s?.layer?.id===n);if(!l&&r){let s=await Ve(this.legendvm,r);he({intLegendLayerData:s,layerId:n}),await this.refreshFeatureCount()}}applyFilter(e,n,l,r){return async()=>{let s={...N.data?.[n?.id]};r?await dt(s,e,l,this.filterMode,r):await dt(s,e,l,this.filterMode),he({intLegendLayerData:s,layerId:n?.id})}}async regenerateData(){let e=await Ae(this.legendvm),n=at(e,N.data,this._pendingRestore,this._hiddenLegendState);J.set("data",n),await this.refreshFeatureCount(),this.requestUpdate()}async refreshFeatureCount(){if(!this.featureCount)return;let e=++this.featureCountRequestId;try{let n=await lt(this.legendvm,N.data);if(e!==this.featureCountRequestId)return;J.set("data",{...N.data,...n})}catch{}}handleFeatureLayerVisibilityChange(e){let n=e.id,l=J.get("data")?.[n];if(e.visible){this.handleFeatureLayerVisible(n,e);return}this.handleFeatureLayerHidden(n,l)}handleFeatureLayerVisible(e,n){if(this._hiddenLegendState[e]){let l=this._hiddenLegendState[e];this._pendingRestore[e]=l,he({intLegendLayerData:l,layerId:e}),delete this._hiddenLegendState[e],this.clearRestoreGuard(e),this._restoreTimeouts[e]=window.setTimeout(()=>{delete this._pendingRestore[e],delete this._restoreTimeouts[e]},250);return}this.createDataForLayer(n).catch(l=>{console.error(l)})}handleFeatureLayerHidden(e,n){this.clearRestoreGuard(e),n&&(this._hiddenLegendState[e]=n)}clearRestoreGuard(e){this._restoreTimeouts[e]&&(clearTimeout(this._restoreTimeouts[e]),delete this._restoreTimeouts[e]),delete this._pendingRestore[e]}isImageryStretchedLegend(e,n){return!0}render(){let e=this.renderFilteredLayers(),n=J.get("compact")?` ${m.compact}`:"";return this.isLoading?Q("interactive-legend-loader",L`<calcite-loader scale=m .label=${this.messages?.loading} .text=${this.messages?.loading}></calcite-loader>`):Q("interactive-legend-classic-container",L`<div class=${`${j(this.el)}${n}`} ${Le(this._legendContainerRef)}>${e?.length>0?e:L`<div class=${x(m.message)}>${this.messages?.noLegend}</div>`}</div>`)}renderFilteredLayers(){return(this.legendvm?.activeLayerInfos?.toArray()).map(e=>this.renderLegendForLayer(e)).filter(e=>!!e)}renderLegendForLayer(e,n){if(!e.ready)return null;if(e.children.length){let s=e.children.map(u=>this.renderLegendForLayer(u,!0)).toArray();return L`<instant-apps-interactive-legend-group-legend-element class=${x(j(this.el))} .legendvm=${this.legendvm} .featureCount=${this.featureCount} .activeLayerInfo=${e} .isChild=${n}><div style=${k({paddingLeft:"20px"})} .id=${`${e?.layer?.id}-legend-layer`} slot=content>${s}</div></instant-apps-interactive-legend-group-legend-element>`}let l=e.legendElements;if(l&&!l.length)return null;let r=l.map((s,u)=>this.renderLegendForElement(s,e.layer,e.effectList,e,u)).filter(s=>!!s);return r.length?L`<instant-apps-interactive-legend-layer-element class=${x(j(this.el))} .legendvm=${this.legendvm} .featureCount=${this.featureCount} .activeLayerInfo=${e} .isChild=${!!n}><div slot=content .id=${`${e?.layer?.id}-legend-layer`} class=${x(m.layer)}>${r}</div></instant-apps-interactive-legend-layer-element>`:null}renderLegendForElement(e,n,l,r,s,u,h){let $=de(e),w=me(e),S=ye(e),R=null,_=je(r,e,s),T=Xe(e),M=Bt(this._legendContainerRef?.value?.clientWidth||this.el?.clientWidth);if(Ye(e)||S){let C=e.infos.some(U=>Ht(U,M)),B=e.infos.map((U,K)=>this.renderLegendForElementInfo(U,n,l,S,e,r,s,K,_,h)).filter(U=>!!U);B.length&&(R=L`<div class=${`${m.layerBody}${C?` ${m.layerBodyLargeSymbol}`:""}`}>${B}</div>`)}else if(de(e)||me(e)||Ee(e)||Re(e)){let C=e;R=this.renderLegendForRamp(C,n.opacity)}else if(T){let C=e;R=Q(Ke.RELATIONSHIP_RAMP,L`<instant-apps-interactive-legend-relationship class=${x(j(this.el))} .filterMode=${this.filterMode} .activeLayerInfo=${r} .legendElement=${C}></instant-apps-interactive-legend-relationship>`)}else if(Qe(e)){let C=e;R=this.renderPieChartRamp(C)}else if(Ze(e)){let C=e;R=this.renderUnivariateAboveAndBelowRamp(C,n.opacity,l)}else if(Oe(e)){let C=e;R=this.renderUnivariateColorSizeRamp(C,n.opacity,l)}if(!R)return null;let I=e.title,P=null;if(typeof I=="string")P=I;else if(I){let C=I,B=this.getTitle(C,$||w);this.isRendererTitle($||w)?"title"in I&&(P=`${I.title} (${B})`):P=B}return L`<instant-apps-interactive-legend-legend-element class=${x(j(this.el))} .activeLayerInfo=${r} .isSizeRamp=${S} .isChild=${!!u} .isColorRamp=${$} .isRelationshipRamp=${T} .isInteractive=${_} .zoomTo=${this.zoomTo} .legendElement=${e} .titleText=${P} .legendvm=${this.legendvm} .legendElementIndex=${s}><div slot=content>${R}</div></instant-apps-interactive-legend-legend-element>`}renderPieChartRamp(e){return L`<div .innerHTML=${`${e.preview?.outerHTML}`}></div>`}renderUnivariateAboveAndBelowRamp(e,n,l){let{sizeRampElement:r,colorRampElement:s}=Jt(e,n);if(!r)return null;let u=Se(r,"above",!0),h=Se(r,"below",!0),$=12,w=ke(s,{width:$,height:u,rampAlignment:"vertical",opacity:n,type:"above",effectList:l}),S=ke(s,{width:$,height:h,rampAlignment:"vertical",opacity:n,type:"below",effectList:l}),R=ot(r),_=r.infos.map(H=>H.label),T=_.map((H,D)=>D===0?L`<div class=${x(H?w?m.univariateAboveAndBelowLabel:m.rampLabel:"")}>${H}</div>`:D===2?L`<div></div>`:null),M=_.length-1,I=Math.floor(_.length/2),P=_.map((H,D)=>D===I||D===M?L`<div class=${x(H?w?m.univariateAboveAndBelowLabel:m.rampLabel:"")}>${H}</div>`:null),C={display:"table-cell",verticalAlign:"middle"},B={marginTop:`${R}px`},U={height:`${u}px`},K={height:`${h}px`};return Q("univariate-above-and-below-ramp-preview",L`<div style=${k(ft)}><div class=${x(m.layerBody)}>${r.infos.map((H,D)=>L`<div class=${`${m.layerRow} ${m.sizeRamp}`}><div class=${x(m.symbol)} style=${k(C)} .innerHTML=${H?.preview?.outerHTML??""??""}></div>${!w&&D%2===0?L`<div class=${x(m.layerInfo)}>${_[D]}</div>`:null}</div>`)}</div>${w?Q("color-ramp-preview",L`<div style=${k(B)}><div style=${k(Ie)}><div style=${k(ae)}><div class=${x(m.rampContainer)}>${w}</div></div><div style=${k(ae)}><div class=${x(m.rampLabelsContainer)} style=${k(U)}>${T}</div></div></div><div style=${k(Ie)}><div style=${k(ae)}><div class=${x(m.rampContainer)}>${S}</div></div><div style=${k(ae)}><div class=${x(m.rampLabelsContainer)} style=${k(K)}>${P}</div></div></div></div>`):null}</div>`)}renderUnivariateColorSizeRamp(e,n,l){let{sizeRampElement:r,colorRampElement:s}=Kt(e);if(!r)return null;let u=ot(r),h=12,$=Se(r,"full",!1),w=ke(s,{width:h,height:$,rampAlignment:"vertical",opacity:n,type:"full",effectList:l}),S=r.infos.length-1,R=r.infos.map((I,P)=>P===0||P===S?L`<div class=${x(I.label?s?m.univariateAboveAndBelowLabel:m.rampLabel:"")}>${I.label}</div>`:null),_={display:"table-cell",verticalAlign:"middle"},T={marginTop:`${u}px`},M={height:`${$}px`};return Q("univariate-above-and-below-ramp-preview",L`<div style=${k(ft)}><div class=${x(m.layerBody)}>${r.infos.map(I=>L`<div class=${`${m.layerRow} ${m.sizeRamp}`}><div class=${x(m.symbol)} style=${k(_)} .innerHTML=${I?.preview?.outerHTML??""??""}></div></div>`)}</div>${Q("color-ramp-preview",L`<div style=${k(T)}><div style=${k(Ie)}><div style=${k(ae)}><div class=${x(m.rampContainer)}>${w}</div></div><div style=${k(ae)}><div class=${x(m.rampLabelsContainer)} style=${k(M)}>${R}</div></div></div></div>`)}</div>`)}renderLegendForRamp(e,n){let l=e.infos,r=me(e),s=Ee(e),u=Re(e),h=e.preview,$=r?m.opacityRamp:"";h&&(h.classList.add(m.colorRamp),$&&h.classList.add($)),n!=null&&h&&(h.style.opacity=n.toString());let w=l.map(_=>{let T;if(s){let M=this.messages[_.label];T=typeof M=="string"?M:_.label}else u?T="value"in _?this.getStretchStopLabel(_):_.label:T=_.label;return L`<div class=${x(_.label?m.rampLabel:"")}>${T}</div>`}),S={width:`${Xt}px`},R={height:h?.style?.height};return L`<div class=${x(m.layerRow)}><div class=${x(m.symbolContainer)} style=${k({...S})}><div class=${x(m.rampContainer)} ${Le(_=>{_?.firstChild&&_?.firstChild?.remove(),_?.appendChild(h)})}></div></div><div class=${x(m.layerInfo)}><div class=${x(m.rampLabelsContainer)} style=${k({...R})}>${w}</div></div></div>`}renderLegendForElementInfo(e,n,l,r,s,u,h,$,w,S){if("infos"in e)return this.renderLegendForElement(e,n,l,u,h,!0,e);let R=null,_=!this.isImageryStretchedLegend(n,s.type);if("preview"in e){let{outerHTML:W}=e.preview;R=L`<div class=${x(m.symbol)} .innerHTML=${W??""}></div>`}else"src"in e&&(R=this.renderImage(e,n,_));if(!R)return null;let T=_?` ${m.imageryLayerInfoStretched}`:"",M=!_&&r?` ${m.sizeRamp}`:"",I,P=Je(n),C=tt(P,S);if(N.data){let W=et(P,n,e,C,$),V=C?C?.nestedInfos:P,se=Ne(V),we=!!u?.children?.length||!!C;I=P?.categories?.size===1&&!we?!W?.selected:se||W?.selected}let B="label"in e?e.label:null,U=C&&!("value"in e)?!1:w,K=J.get("compact"),H=this.getTitle(B,!1)||"",D=C?s.title:B??n?.id;return U?L`<button @click=${this.applyFilter(e,n,$,S)} class=${`${m.layerRow} ${m.interactiveLayerRow}${I?` ${m.infoSelected}`:""}`} title=${(K?`${H}`:void 0)??ge} .ariaPressed=${I?"true":"false"}><div class=${`${m.symbolContainer}${T}${M}`}>${R}</div><div class=${`${m.layerInfo}${T}`}>${this.getTitle(B,!1)||""}</div>${this.featureCount&&!K?L`<instant-apps-interactive-legend-count class=${x(j(this.el))} .categoryId=${D} .activeLayerInfo=${u} .legendvm=${this.legendvm} .selected=${!!I} .legendElement=${s} .infoIndex=${$}></instant-apps-interactive-legend-count>`:null}</button>`:L`<div class=${x(m.layerRow)}><div class=${`${m.symbolContainer}${T}${M}`}>${R}</div><div class=${`${m.layerInfo}${T}`}>${H}</div></div>`}renderImage(e,n,l){let{label:r,src:s,opacity:u}=e,h=l?` ${m.imageryLayerStretchedImage}`:"",$=l?"":` ${m.symbol}`,w={opacity:`${u??n.opacity}`};return L`<img alt=${this.getTitle(r,!1)??ge} src=${s??ge} width=${e.width} height=${e.height} class=${`$${h}${$}`} style=${k(w)}>`}};We("instant-apps-interactive-legend-classic",Te);return Te},"layers/support/FeatureFilter","layers/support/FeatureEffect","symbols/support/symbolUtils","core/reactiveUtils","intl","core/Handles",a,b,c,d,e)
|
|
2
|
+
import e from"./KGUELU4O.js";import{a as xe,b as Ge,c as ue}from"./TCUNTTNI.js";import d from"./C4F2OOUL.js";import c from"./SIODWUWX.js";import b from"./QZ2ZMWIH.js";import a from"./CS5N3DOL.js";import{a as je}from"./CJ3EZE7U.js";import{d as Ne}from"./C5KDPY7R.js";import{a as Ke,b as de,c as Ee,d as me,e as Qe,f as Xe,g as ye,h as Re,i as Ye,j as Ze,k as Oe}from"./YM4U4HSN.js";import{a as j}from"./IADXB53D.js";import{a as Q}from"./YUWXPLTE.js";import{b as We}from"./S4GBMN37.js";import"./Y2AUIXNK.js";import{F as Ue,G as Le,H as qe,J as x,K as k,h as Be,i as L,j as _e,l as ge,u as De}from"./T3EPRHTT.js";import"./EXBEKVP5.js";export default $arcgis.t(([ct,vt,gt,q,fe,Ct,,{a:N,b:J,c:Je,d:he},{a:be,b:Ve,d:et,f:tt,g:Ae,h:it,i:nt,j:at},{a:rt,b:Ce,c:st,g:lt},oe])=>{(function(d,e){typeof exports=="object"&&typeof module<"u"?e(exports):typeof define=="function"&&define.amd?define(["exports"],e):(d=typeof globalThis<"u"?globalThis:d||self,e(d.maquette={}))})(void 0,(function(d){"use strict";var e=function(){var t,i;return{invalidate:function(){i=void 0,t=void 0},result:function(a,c){if(t)for(var g=0;g<a.length;g++)t[g]!==a[g]&&(i=void 0);return i||(i=c(),t=a),i}}},n="http://www.w3.org/",l="".concat(n,"2000/svg"),r="".concat(n,"1999/xlink"),s=[],u=function(t,i){var a={};return Object.keys(t).forEach(function(c){a[c]=t[c]}),i&&Object.keys(i).forEach(function(c){a[c]=i[c]}),a},h=function(t,i){return t.vnodeSelector!==i.vnodeSelector?!1:t.properties&&i.properties?t.properties.key!==i.properties.key?!1:t.properties.bind===i.properties.bind:!t.properties&&!i.properties},$=function(t){if(typeof t!="string")throw new Error("Style values must be strings")},w=function(t,i,a){if(i.vnodeSelector!==""){for(var c=a;c<t.length;c++)if(h(t[c],i))return c}return-1},S=function(t,i,a,c){var g=t[i];if(g.vnodeSelector!==""){var o=g.properties,E=o?o.key===void 0?o.bind:o.key:void 0;if(!E){for(var p=0;p<t.length;p++)if(p!==i){var f=t[p];if(h(f,g))throw Object.assign(new Error("".concat(a.vnodeSelector," had a ").concat(g.vnodeSelector," child ").concat(c==="added"?c:"removed",", but there is now more than one. You must add unique key properties to make them distinguishable.")),{parentNode:a,childNode:g})}}}},R=function(t){if(t.properties){var i=t.properties.enterAnimation;i&&i(t.domNode,t.properties)}},_=[],T=!1,M=function(t){(t.children||[]).forEach(M),t.properties&&t.properties.afterRemoved&&t.properties.afterRemoved.apply(t.properties.bind||t.properties,[t.domNode])},I=function(){T=!1,_.forEach(M),_.length=0},P=function(t){_.push(t),T||(T=!0,typeof window<"u"&&"requestIdleCallback"in window?window.requestIdleCallback(I,{timeout:16}):setTimeout(I,16))},C=function(t){var i=t.domNode;if(t.properties){var a=t.properties.exitAnimation;if(a){i.style.pointerEvents="none";var c=function(){i.parentNode&&(i.parentNode.removeChild(i),P(t))};a(i,c,t.properties);return}}i.parentNode&&(i.parentNode.removeChild(i),P(t))},B=["on","afterCreate","afterUpdate","afterRemoved","enterAnimation","exitAnimation","updateAnimation"];function U(t){return!B.includes(t)}var K=function(t,i,a){if(i){for(var c=a.eventHandlerInterceptor,g=Object.keys(i).filter(U),o=g.length,E=0;E<o;E++){var p=g[E],f=i[p];if(p==="className")throw new Error('Property "className" is not supported, use "class".');if(p==="class")se(t,f,!0);else if(p==="classes")for(var v=Object.keys(f),A=v.length,b=0;b<A;b++){var y=v[b];f[y]&&t.classList.add(y)}else if(p==="styles")for(var z=Object.keys(f),F=z.length,b=0;b<F;b++){var G=z[b],te=f[G];te&&($(te),a.styleApplyer(t,G,te))}else if(p!=="key"&&f!==null&&f!==void 0){var ve=typeof f;ve==="function"?(p.lastIndexOf("on",0)===0&&c&&(f=c(p,f,t,i)),t[p]=f):a.namespace===l?p==="href"?t.setAttributeNS(r,p,f):t.setAttribute(p,f):ve==="string"&&p!=="value"&&p!=="innerHTML"?t.setAttribute(p,f):t[p]=f}}if(i.on)for(var ie=0,pe=Object.entries(i.on);ie<pe.length;ie++){var Y=pe[ie],Z=Y[0],O=Y[1],ne=typeof O=="function"?O:O.listener;c&&(ne=c(Z,ne,t,i)),ne&&t.addEventListener(Z,ne,typeof O=="function"?void 0:O.options)}}},H=function(t,i,a){if(i)for(var c=0,g=i;c<g.length;c++){var o=g[c];W(o,t,void 0,a)}},D=function(t,i,a){H(t,i.children,a),i.text&&(t.textContent=i.text),K(t,i.properties,a),i.properties&&i.properties.afterCreate&&i.properties.afterCreate.apply(i.properties.bind||i.properties,[t,a,i.vnodeSelector,i.properties,i.children])},W=function(t,i,a,c){var g,o,E=0,p=t.vnodeSelector,f=i.ownerDocument;if(p==="")t.domNode?t.domNode.nodeValue=t.text:(o=t.domNode=f.createTextNode(t.text),a!==void 0?i.insertBefore(o,a):i.appendChild(o));else{for(var v=0;v<=p.length;++v){var A=p.charAt(v);if(v===p.length||A==="."||A==="#"){var b=p.charAt(E-1),y=p.slice(E,v);b==="."?o.classList.add(y):b==="#"?o.id=y:(y==="svg"&&(c=u(c,{namespace:l})),c.namespace!==void 0?o=t.domNode=f.createElementNS(c.namespace,y):(o=t.domNode=t.domNode||(!((g=t.properties)===null||g===void 0)&&g.is?f.createElement(y,{is:t.properties.is}):f.createElement(y)),y==="input"&&t.properties&&t.properties.type!==void 0&&o.setAttribute("type",t.properties.type)),a!==void 0?i.insertBefore(o,a):o.parentNode!==i&&i.appendChild(o)),E=v+1}}D(o,t,c)}},V,se=function(t,i,a){i&&i.split(" ").forEach(function(c){c&&t.classList.toggle(c,a)})},we=function(t,i,a,c){if(a){for(var g=!1,o=Object.keys(a).filter(U),E=o.length,p=0;p<E;p++){var f=o[p],v=a[f],A=i[f];if(f==="class")A!==v&&(se(t,A,!1),se(t,v,!0));else if(f==="classes")for(var b=t.classList,y=Object.keys(v),z=y.length,F=0;F<z;F++){var G=y[F],te=!!v[G],ve=!!A[G];te!==ve&&(g=!0,te?b.add(G):b.remove(G))}else if(f==="styles")for(var ie=Object.keys(v),pe=ie.length,F=0;F<pe;F++){var Y=ie[F],Z=v[Y],O=A[Y];Z!==O&&(g=!0,Z?($(Z),c.styleApplyer(t,Y,Z)):c.styleApplyer(t,Y,""))}else if(!v&&typeof A=="string"&&(v=""),f==="value"){var ne=t[f];ne!==v&&v!==A&&(t[f]=v),v!==A&&(g=!0)}else if(v!==A){var He=typeof v;(He!=="function"||!c.eventHandlerInterceptor)&&(c.namespace===l?f==="href"?t.setAttributeNS(r,f,v):t.setAttribute(f,v):He==="string"&&f!=="innerHTML"?f==="role"&&v===""?t.removeAttribute(f):t.setAttribute(f,v):t[f]!==v&&(t[f]=v),g=!0)}}return g}},bt=function(t,i,a,c,g){if(a===c)return!1;a=a||s,c=c||s;for(var o=a.length,E=c.length,p=0,f=0,v,A=!1;f<E;){var b=p<o?a[p]:void 0,y=c[f];if(b!==void 0&&h(b,y))A=V(b,y,g,i,a)||A,p++;else{var z=w(a,y,p+1);if(z>=0){for(v=p;v<z;v++)C(a[v]),S(a,v,t,"removed");A=V(a[z],y,g,i,a)||A,p=z+1}else W(y,i,p<o?a[p].domNode:void 0,g),R(y),S(c,f,t,"added")}f++}if(o>p)for(v=p;v<o;v++)C(a[v]),S(a,v,t,"removed");return A};V=function(t,i,a,c,g){var o=t.domNode,E=!1;if(t===i)return!1;var p=!1;if(i.vnodeSelector===""){if(i.text!==t.text){var f=o.ownerDocument.createTextNode(i.text);try{c.replaceChild(f,o)}catch{c.replaceChild(f,c.childNodes[g.indexOf(t)])}return i.domNode=f,E=!0,E}i.domNode=o}else i.vnodeSelector.lastIndexOf("svg",0)===0&&(a=u(a,{namespace:l})),t.text!==i.text&&(p=!0,i.text===void 0?o.removeChild(o.firstChild):o.textContent=i.text),i.domNode=o,p=bt(i,o,t.children,i.children,a)||p,p=we(o,t.properties,i.properties,a)||p,i.properties&&i.properties.afterUpdate&&i.properties.afterUpdate.apply(i.properties.bind||i.properties,[o,a,i.vnodeSelector,i.properties,i.children]);return p&&i.properties&&i.properties.updateAnimation&&i.properties.updateAnimation(o,i.properties,t.properties),E};var le=function(t,i){return{getLastRender:function(){return t},update:function(a){if(t.vnodeSelector!==a.vnodeSelector)throw new Error("The selector for the root VNode may not be changed. (consider using dom.merge and add one extra level to the virtual DOM)");var c=t;t=a,V(c,a,i,c.domNode.parentNode,[c])},domNode:t.domNode}},$t={namespace:void 0,performanceLogger:function(){},eventHandlerInterceptor:void 0,styleApplyer:function(t,i,a){i.charAt(0)==="-"?t.style.setProperty(i,a):t.style[i]=a}},ee=function(t){return u($t,t)},ce={create:function(t,i){return i=ee(i),W(t,document.createElement("div"),void 0,i),le(t,i)},append:function(t,i,a){return a=ee(a),W(i,t,void 0,a),le(i,a)},insertBefore:function(t,i,a){return a=ee(a),W(i,t.parentNode,t,a),le(i,a)},merge:function(t,i,a){return a=ee(a),i.domNode=t,D(t,i,a),le(i,a)},replace:function(t,i,a){return a=ee(a),W(i,t.parentNode,t,a),t.parentNode.removeChild(t),le(i,a)}},wt=function(t){return{vnodeSelector:"",properties:void 0,children:void 0,text:t.toString(),domNode:null}},Me=function(t,i,a){for(var c=0,g=i.length;c<g;c++){var o=i[c];Array.isArray(o)?Me(t,o,a):o!=null&&o!==!1&&(typeof o=="string"&&(o=wt(o)),a.push(o))}};function _t(t,i,a){if(Array.isArray(i))a=i,i=void 0;else if(i&&(typeof i=="string"||i.vnodeSelector)||a&&(typeof a=="string"||a.vnodeSelector))throw new Error("h called with invalid arguments");var c,g;return a&&a.length===1&&typeof a[0]=="string"?c=a[0]:a&&(g=[],Me(t,a,g),g.length===0&&(g=void 0)),{vnodeSelector:t,properties:i,children:g,text:c===""?void 0:c,domNode:null}}var Lt=function(t,i,a){var c=[],g=[];return{results:g,map:function(o){for(var E=o.map(t),p=g.slice(),f=0,v=0;v<o.length;v++){var A=o[v],b=E[v];if(b===c[f])g[v]=p[f],a(A,p[f],v),f++;else{for(var y=!1,z=1;z<c.length+1;z++){var F=(f+z)%c.length;if(c[F]===b){g[v]=p[F],a(o[v],p[F],v),f=F+1,y=!0;break}}y||(g[v]=i(A,v))}}g.length=o.length,c=E}}},xt=function(t,i){for(var a=[];t&&t!==i;)a.push(t),t=t.parentNode;return a},Et=function(t,i){var a=t;return i.forEach(function(c){a=a&&a.children?a.children.find(function(g){return g.domNode===c}):void 0}),a},Rt=function(t,i,a){return function(g,o,E,p){return c};function c(g){var o,E;a("domEvent",g);var p=i(),f=xt(g.currentTarget,p.domNode);f.reverse();var v=Et(p.getLastRender(),f);t.scheduleRender();var A;if(v){var b=(E=(o=v.properties["on".concat(g.type)])!==null&&o!==void 0?o:v.properties.on[g.type].listener)!==null&&E!==void 0?E:v.properties.on[g.type];A=b.apply(v.properties.bind||this,arguments)}return a("domEventProcessed",g),A}},At=function(t){var i,a=ee(t),c=a.performanceLogger,g=!0,o,E=!1,p=[],f=[],v=function(b,y,z){var F,G=function(){return F};a.eventHandlerInterceptor=Rt(i,G,c),F=b(y,z(),a),p.push(F),f.push(z)},A=function(){if(o=void 0,!!g){g=!1,c("renderStart",void 0);for(var b=0;b<p.length;b++){var y=f[b]();c("rendered",void 0),p[b].update(y),c("patched",void 0)}c("renderDone",void 0),g=!0}};return i={renderNow:A,scheduleRender:function(){!o&&!E&&(o=requestAnimationFrame(A))},stop:function(){o&&(cancelAnimationFrame(o),o=void 0),E=!0},resume:function(){E=!1,g=!0,i.scheduleRender()},append:function(b,y){v(ce.append,b,y)},insertBefore:function(b,y){v(ce.insertBefore,b,y)},merge:function(b,y){v(ce.merge,b,y)},replace:function(b,y){v(ce.replace,b,y)},detach:function(b){for(var y=0;y<f.length;y++)if(f[y]===b)return f.splice(y,1),p.splice(y,1)[0];throw new Error("renderFunction was not found")}},i};d.createCache=e,d.createMapping=Lt,d.createProjector=At,d.dom=ce,d.h=_t}));function kt(d,e,n,l){let r=st(d,e,n,l),s=St(r);return r.join(s)}function St(d){return d.every(e=>e&&e.includes(rt.NOT_EQUAL))?Ce.AND:Ce.OR}async function dt(d,e,n,l,r){let{fLayerView:s}=d,u=kt(d,e,n,r),h=s?.filter?.timeExtent??s?.featureEffect?.filter?.timeExtent??null,{type:$}=l;if(ue($))s.filter=new ct({where:u,timeExtent:h});else if(l.effect){let{includedEffect:w,excludedEffect:S}=l.effect,R=await oe(S,s,"excludedEffect"),_=await oe(w,s,"includedEffect");s.featureEffect=new vt({filter:new ct({where:u,timeExtent:h}),includedEffect:_,excludedEffect:R})}return await Promise.resolve()}function It(d,e){let{type:n}=d;ue(n)?Tt(e):Ge(n)&&Ft(d,e)}function Tt(d){d?.allLayerViews?.filter(e=>be(e?.layer?.type))?.forEach(e=>{let n=e,l=ut(n);n.filter=l,n.set("featureEffect",null)})}function Ft(d,e){e?.allLayerViews?.filter(n=>be(n?.layer?.type)).forEach(async n=>{let l=n;if(d?.effect&&l){let{includedEffect:r,excludedEffect:s}=d.effect,u=await oe(s,l,"excludedEffect"),h=await oe(r,l,"includedEffect"),$=ut(l);l.featureEffect=new vt({filter:$,includedEffect:h,excludedEffect:u}),l.set(xe.FILTER,null)}})}function ut(d){return d?.filter||d?.featureEffect?.filter}var Pt=80,zt=.2,Mt=6;function X(d){let e=typeof d=="number"?d:Number(d);return Number.isFinite(e)?e:0}function ht(d){if("infos"in d)return Math.max(...d.infos.map(e=>ht(e)),0);if("preview"in d&&d.preview){let e=d.preview,n=e.querySelector("svg"),l=X(n?.getAttribute("width")),r=X(n?.getAttribute("height")),s=X(e.style.width?.replace("px","")),u=X(e.style.height?.replace("px","")),h=X(e.clientWidth),$=X(e.clientHeight);return Math.max(l,r,s,u,h,$)}return"src"in d?Math.max(X(d.width),X(d.height)):0}function Ht(d,e){let n=ht(d);return n>=Pt?!0:typeof e!="number"||e<=0?!1:n+Mt>=e}function Bt(d){if(!(d<=0))return d*zt}var Dt=(void 0)(),mt=10,Fe=20,$e=10,Pe=20,ze={univariateAboveAndBelowSymbol:"esri-univariate-above-and-below-ramp__symbol",colorRamp:"esri-legend__color-ramp"};function Ut(d="vertical"){let e={stroke:"rgb(200, 200, 200)",strokeWidth:"1"};return d==="vertical"?L`<svg height=4 width=10>${_e`<line x1=0 y1=2 x2=10 y2=2 style=${k(e)} />`}</svg>`:L`<svg height=10 width=10>${_e`<line x1=5 y1=0 x2=5 y2=10 style=${k(e)} />`}</svg>`}function qt(d,e="vertical"){let n=document.createElement("div");return n.style.height=`${Fe}px`,n.className=ze.univariateAboveAndBelowSymbol,d!=null&&(n.style.opacity=d.toString()),Dt.append(n,Ut.bind(null,e)),n}function yt(d,e,n="vertical",l){d.infos.forEach((r,s)=>{if(l&&s===2)r.preview=qt(e,n);else{let{size:u}=r,h=re(u)+(n==="horizontal"?Pe:$e),$=r.preview.tagName.toLowerCase()==="div",w=$?r.preview:document.createElement("div");w&&(w.className=ze.univariateAboveAndBelowSymbol),n==="horizontal"?w&&(w.style.width=`${h}px`):w&&(w.style.height=`${h}px`),$||w&&w.appendChild(r.preview),r.preview=w}})}var Wt=96;function re(d){return d?d/72*Wt:0}function ot(d,e="classic"){let n=d.infos,l=n[0].size,r=n[n.length-1].size;return e==="classic"?(re(l)+$e)/2:(re(l)-re(r))/2}function ke(d,e){if(!d)return null;let n=d.infos.map(r=>r.color),l=gt.renderColorRampPreviewHTML(e.type==="full"?n:e.type==="above"?n.slice(0,3):n.slice(2,5),{width:e.width,height:e.height,align:e.rampAlignment,effectList:e.effectList});return l.className=ze.colorRamp,e.opacity!=null&&(l.style.opacity=e.opacity.toString()),l}function Gt(d,e,n,l="vertical"){let r=0,s=d.infos,u=Math.floor(s.length/2),h=e==="full"||e==="above"?0:u,$=e==="full"||e==="below"?s.length-1:u;for(let w=h;w<=$;w++)if(n&&w===u)r+=l==="horizontal"?mt:Fe;else{let S=s[w].size,R=re(S)+(l==="horizontal"?Pe:$e);r+=R}return Math.round(r)}function Se(d,e,n,l="vertical"){let r=Gt(d,e,n,l),s=d.infos,u=Math.floor(s.length/2),h=e==="full"||e==="above"?0:u,$=e==="full"||e==="below"?s.length-1:u,w=e==="full"?s[h].size+s[$].size:e==="above"?s[h].size:s[$].size,S=n?l==="vertical"?Fe:mt:0,R=l==="vertical"?$e*(e==="full"?2:1):Pe*(e==="full"?2:1);return Math.round(r-(re(w)/2+S/2+R/2))}function Jt(d,e,n="vertical"){let l=d.infos,r=l.find(u=>ye(u)),s=l.find(u=>de(u));return r&&(r={...r},r.infos=[...r.infos],yt(r,e,n,!0)),s&&(s={...s},s.infos=[...s.infos]),n==="horizontal"&&(r?.infos.reverse(),s?.infos.reverse()),{sizeRampElement:r,colorRampElement:s}}function Kt(d,e="vertical"){let n=d.infos,l=n.find(s=>ye(s)),r=n.find(s=>de(s));return l&&(l={...l},l.infos=[...l.infos],yt(l,null,e,!1)),r&&(r={...r},r.infos=[...r.infos]),e==="horizontal"&&(l?.infos.reverse(),r?.infos.reverse()),{sizeRampElement:l,colorRampElement:r}}var Qt=Be`@layer{instant-apps-interactive-legend-classic{display:block;--instant-apps-interactive-legend-heading-font-size: 1rem;--instant-apps-interactive-legend-heading-font-weight: normal;--instant-apps-interactive-legend-caption-font-weight: normal;--instant-apps-interactive-legend-secondary-color: var( --calcite-color-text-1 );--instant-apps-interactive-legend-field-name-font-size: 1rem;--instant-apps-interactive-legend-total-feature-count-font-size: .875rem;--instant-apps-interactive-legend-info-font-size: .875rem;--instant-apps-interactive-legend-info-item-background--selected: #c7ebff;--instant-apps-interactive-legend-info-item-background--selected--dark: #009af2;--instant-apps-interactive-legend-info-item-background--hover: #e9e9e9;--instant-apps-interactive-legend-info-item-background--hover--dark: #4a4a4a;--instant-apps-interactive-legend-info-item-color--selected: var( --calcite-color-text-2 );--instant-apps-interactive-legend-secondary-background-color: var( --calcite-color-background );--instant-apps-interactive-legend-ui-margin: 20px 15px;--instant-apps-interactive-legend-ui-padding: 20px 15px}instant-apps-interactive-legend-classic .esri-legend__service{padding:0}instant-apps-interactive-legend-classic .esri-legend__layer-body,instant-apps-interactive-legend-classic .esri-legend__layer,instant-apps-interactive-legend-classic .esri-legend__layer-table,instant-apps-interactive-legend-classic .esri-legend__group-layer-child,instant-apps-interactive-legend-classic .esri-legend__layer-child-table{margin:0;overflow:hidden}instant-apps-interactive-legend-classic .esri-legend__layer-caption calcite-action{margin-right:5px}instant-apps-interactive-legend-classic .esri-legend__layer-caption{display:flex;align-items:center;font-size:var(--instant-apps-interactive-legend-field-name-font-size);background-color:var(--instant-apps-interactive-legend-secondary-background-color);color:var(--instant-apps-interactive-legend-secondary-color)}instant-apps-interactive-legend-classic .instant-apps-interactive-legend__layer-caption-btn-container{white-space:nowrap}instant-apps-interactive-legend-classic .instant-apps-interactive-legend__layer-caption-btn-container calcite-button{margin:2px}instant-apps-interactive-legend-classic .esri-legend__layer-caption{font-weight:var(--instant-apps-interactive-legend-caption-font-weight)}instant-apps-interactive-legend-classic .esri-legend__layer-cell.esri-legend__layer-cell--info{font-size:var(--instant-apps-interactive-legend-info-font-size);text-align:left}instant-apps-interactive-legend-classic .esri-legend__layer-cell,instant-apps-interactive-legend-classic .esri-legend__layer-row{display:flex;align-items:center}instant-apps-interactive-legend-classic .instant-apps-interactive-legend__non-interactive .esri-legend__layer-body{display:block;margin:var(--instant-apps-interactive-legend-ui-margin)}instant-apps-interactive-legend-classic .instant-apps-interactive-legend__non-interactive.instant-apps-interactive-legend__nested-unique-symbol>.esri-legend__layer-body{margin:0}instant-apps-interactive-legend-classic .instant-apps-interactive-legend__non-interactive .esri-legend__layer-row{display:table-row}instant-apps-interactive-legend-classic .instant-apps-interactive-legend__non-interactive .esri-legend__layer-cell{display:table-cell}instant-apps-interactive-legend-classic .esri-legend__layer-cell--symbols{justify-content:center;width:20%}instant-apps-interactive-legend-classic .esri-legend__layer-cell--info{width:65%}instant-apps-interactive-legend-classic .instant-apps-interactive-legend__layer-row--interactive{margin:1px;background:transparent;border:none;width:100%}instant-apps-interactive-legend-classic .esri-legend__layer-body.instant-apps-interactive-legend__layer-body--large-symbol>.esri-legend__layer-row{display:grid;grid-template-columns:minmax(35%,max-content) minmax(0,1fr);column-gap:clamp(.125rem,.3vw,.25rem);align-items:center;width:100%}instant-apps-interactive-legend-classic .esri-legend__layer-body.instant-apps-interactive-legend__layer-body--large-symbol>.esri-legend__layer-row>.esri-legend__layer-cell--symbols{width:35%;box-sizing:border-box;padding-inline:clamp(.125rem,.3vw,.25rem);display:flex;align-items:center;justify-content:center}instant-apps-interactive-legend-classic .esri-legend__layer-body.instant-apps-interactive-legend__layer-body--large-symbol>.esri-legend__layer-row>.esri-legend__layer-cell--info{display:block;width:auto;min-width:0}instant-apps-interactive-legend-classic .esri-legend__layer-cell--info{color:var(--instant-apps-interactive-legend-secondary-color)}instant-apps-interactive-legend-classic .esri-legend__layer-row,instant-apps-interactive-legend-classic .esri-legend__layer-caption{padding:var(--instant-apps-interactive-legend-ui-padding)}instant-apps-interactive-legend-classic .instant-apps-interactive-legend__layer-row--interactive{position:relative}instant-apps-interactive-legend-classic .instant-apps-interactive-legend-element-info--selected{background-color:var(--instant-apps-interactive-legend-info-item-background--selected)}instant-apps-interactive-legend-classic .calcite-mode-dark .instant-apps-interactive-legend-element-info--selected{cursor:pointer;background-color:var(--instant-apps-interactive-legend-info-item-background--selected--dark)}instant-apps-interactive-legend-classic .calcite-mode-dark .instant-apps-interactive-legend-element-info--selected .esri-legend__layer-cell--info{color:var(--calcite-color-text-inverse)}instant-apps-interactive-legend-classic .hide{display:none}.instant-apps-interactive-legend__compact .esri-legend__layer-row{--instant-apps-interactive-legend-ui-padding: 10px 5px}.instant-apps-interactive-legend__compact .esri-legend__layer-row .esri-legend__layer-cell--info:not(:has(.esri-legend__ramp-labels)){display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;text-overflow:ellipsis;line-clamp:2;line-height:1.3125rem;max-height:2.625rem}@media(min-width:992px){instant-apps-interactive-legend-classic .instant-apps-interactive-legend__layer-row--interactive{cursor:pointer}instant-apps-interactive-legend-classic .instant-apps-interactive-legend__layer-row--interactive:hover{background-color:var(--instant-apps-interactive-legend-info-item-background--hover)}instant-apps-interactive-legend-classic .instant-apps-interactive-legend__layer-row--interactive:hover.instant-apps-interactive-legend-element-info--selected{background-color:#e2f2fe}instant-apps-interactive-legend-classic .calcite-mode-dark .instant-apps-interactive-legend__layer-row--interactive:hover{background-color:var(--instant-apps-interactive-legend-info-item-background--hover--dark)}instant-apps-interactive-legend-classic .calcite-mode-dark .instant-apps-interactive-legend__layer-row--interactive:hover.instant-apps-interactive-legend-element-info--selected{background-color:#26a9f4}}}`,m={layer:"esri-legend__layer",layerBody:"esri-legend__layer-body",layerRow:"esri-legend__layer-row",layerInfo:"esri-legend__layer-cell esri-legend__layer-cell--info",imageryLayerStretchedImage:"esri-legend__imagery-layer-image--stretched",imageryLayerInfoStretched:"esri-legend__imagery-layer-info--stretched",symbolContainer:"esri-legend__layer-cell esri-legend__layer-cell--symbols",symbol:"esri-legend__symbol",rampContainer:"esri-legend__ramps",sizeRamp:"esri-legend__size-ramp",colorRamp:"esri-legend__color-ramp",opacityRamp:"esri-legend__opacity-ramp",rampLabelsContainer:"esri-legend__ramp-labels",rampLabel:"esri-legend__ramp-label",univariateAboveAndBelowLabel:"esri-univariate-above-and-below-ramp__label",message:"esri-legend__message",layerBodyLargeSymbol:"instant-apps-interactive-legend__layer-body--large-symbol",interactiveLayerRow:"instant-apps-interactive-legend__layer-row--interactive",infoSelected:"instant-apps-interactive-legend-element-info--selected",compact:"instant-apps-interactive-legend__compact"},Xt=24,ft={display:"flex",alignItems:"flex-start"},Ie={marginLeft:"3px"},ae={display:"table-cell",verticalAlign:"middle"},Te=class extends qe{constructor(){super(...arguments),this.featureCountRequestId=0,this._legendContainerRef=Ue(),this._hiddenLegendState={},this._pendingRestore={},this._restoreTimeouts={},this.isLoading=!0,this.zoomTo=!1,this.featureCount=!1,this.filterMode={type:xe.FILTER}}static{this.properties={isLoading:16,legendvm:0,zoomTo:5,featureCount:5,filterMode:0,messages:0}}static{this.styles=Qt}static{this.shadowRootOptions=De}connectedCallback(){super.connectedCallback(),!this.handles&&(this.handles=new Ct)}async load(){new MutationObserver(()=>{this.requestUpdate()}).observe(this.el,{attributes:!0}),J.onChange("data",()=>this.requestUpdate())}willUpdate(e){e.has("filterMode")&&this.legendvm?.view&&(this.hasUpdated||!ue(this.filterMode.type))&&It(this.filterMode,this.legendvm.view)}async loaded(){await this.initLegend()}disconnectedCallback(){super.disconnectedCallback(),this.handles?.removeAll(),this.handles?.destroy(),this.handles=null}async initLegend(){try{await q.whenOnce(()=>this.legendvm?.view);let e=async()=>{try{let n=this.legendvm?.view?.map;await n?.load(),await n?.basemap?.load();let l=n?.allLayers?.map(async h=>await h.load()),r=(await Promise.allSettled(l)).map(h=>h?.status==="fulfilled"&&h?.value?h.value:null).filter(h=>!!h),s=[];r.forEach(h=>{this.legendvm?.view&&s.push(this.legendvm.view.whenLayerView(h))}),await Promise.allSettled(s);let u=await Ae(this.legendvm);J.set("data",{...N.data,...u}),await this.refreshFeatureCount(),this.isLoading=!1,await this.setupWatchersAndListeners()}catch(n){console.error(n),this.isLoading=!1}};this.legendvm?.view?.when(e),this.legendvm?.view?.map?.layers?.on("after-changes",e)}catch{this.isLoading=!1}}getStretchStopLabel(e){let n=this.messages[e.label];return e.label?`${n}: ${typeof e.value=="string"?e.value:fe.formatNumber(e.value,{style:"decimal",notation:e.value.toString().includes("e")?"scientific":"standard"})}`:""}getTitle(e,n){if(!e)return;if(typeof e=="string"||typeof e=="number")return e;if("value"in e||"unit"in e){let s=typeof this.messages?.dotValue=="string"?this.messages.dotValue:"";return fe.substitute(s,e)}if("colorName"in e||"bandName"in e){let{colorName:s,bandName:u}=e,h=this.messages[s],$=typeof this.messages[u]=="string"?this.messages[u]:u;return`${h}: ${$}`}if("showCount"in e)return e.showCount?this.messages.clusterCountTitle:null;let l=null;if(n){let s=e;l=s.ratioPercentTotal?"showRatioPercentTotal":s.ratioPercent?"showRatioPercent":s.ratio?"showRatio":e.normField?"showNormField":e.field?"showField":null}else if(this.isRendererTitle(n)){let s=e;l=s.normField?"showNormField":s.normByPct?"showNormPct":s.field?"showField":null}let r=l==="showField"?"{field}":typeof l=="string"?this.messages[l]:"";return l?fe.substitute(r,{field:e.field,normField:e.normField}):""}isRendererTitle(e){return!e}async setupWatchersAndListeners(){let e=this.legendvm?.view?.map?.allLayers?.filter(r=>be(r?.type)),n=[];for(let r of e)this.legendvm?.view&&n.push(this.legendvm?.view?.whenLayerView(r));let l=[];try{l=await Promise.all(n)}catch(r){console.error(r)}for(let r of l){let s=`fLayerViewScale-${r.layer.id}`;!this.handles?.has(s)&&r&&this.handles?.add(r.watch("visibleAtCurrentScale",()=>{this.createDataForLayer(r.layer).catch(u=>{console.error(u)})}),s)}e?.forEach(r=>{let s=`fLayer-${r?.id}`;this.handles?.has(s)||this.handles?.add(q?.watch(()=>r?.visible,()=>this.handleFeatureLayerVisibilityChange(r)),s)}),this.handles?.add(q.when(()=>this.legendvm,()=>{q.watch(()=>this.legendvm?.view?.updating,()=>{this.legendvm?.view?.updating&&q.when(()=>!this.legendvm?.view?.updating,()=>{this.refreshFeatureCount().catch(r=>{console.error(r)})},{once:!0,initial:!0})},{initial:!0})},{initial:!0,once:!0})),this.handles?.add(q.on(()=>this.legendvm?.activeLayerInfos,"change",r=>{this.regenerateData().then(()=>{this.handles?.add(q.on(()=>r.children,"change",()=>{this.regenerateData().catch(s=>{console.error(s)})}))}).catch(s=>{console.error(s)})})),this.handles?.add(q.on(()=>this.legendvm?.view?.map?.layers,"after-changes",()=>{this.refreshFeatureCount().catch(r=>{console.error(r)})}))}async createDataForLayer(e){let n=e?.id;if(nt(n,this._pendingRestore,this._hiddenLegendState))return;let l=J.get("data")?.[n],r=it(this.legendvm?.activeLayerInfos)?.find(s=>s?.layer?.id===n);if(!l&&r){let s=await Ve(this.legendvm,r);he({intLegendLayerData:s,layerId:n}),await this.refreshFeatureCount()}}applyFilter(e,n,l,r){return async()=>{let s={...N.data?.[n?.id]};r?await dt(s,e,l,this.filterMode,r):await dt(s,e,l,this.filterMode),he({intLegendLayerData:s,layerId:n?.id})}}async regenerateData(){let e=await Ae(this.legendvm),n=at(e,N.data,this._pendingRestore,this._hiddenLegendState);J.set("data",n),await this.refreshFeatureCount(),this.requestUpdate()}async refreshFeatureCount(){if(!this.featureCount)return;let e=++this.featureCountRequestId;try{let n=await lt(this.legendvm,N.data);if(e!==this.featureCountRequestId)return;J.set("data",{...N.data,...n})}catch{}}handleFeatureLayerVisibilityChange(e){let n=e.id,l=J.get("data")?.[n];if(e.visible){this.handleFeatureLayerVisible(n,e);return}this.handleFeatureLayerHidden(n,l)}handleFeatureLayerVisible(e,n){if(this._hiddenLegendState[e]){let l=this._hiddenLegendState[e];this._pendingRestore[e]=l,he({intLegendLayerData:l,layerId:e}),delete this._hiddenLegendState[e],this.clearRestoreGuard(e),this._restoreTimeouts[e]=window.setTimeout(()=>{delete this._pendingRestore[e],delete this._restoreTimeouts[e]},250);return}this.createDataForLayer(n).catch(l=>{console.error(l)})}handleFeatureLayerHidden(e,n){this.clearRestoreGuard(e),n&&(this._hiddenLegendState[e]=n)}clearRestoreGuard(e){this._restoreTimeouts[e]&&(clearTimeout(this._restoreTimeouts[e]),delete this._restoreTimeouts[e]),delete this._pendingRestore[e]}isImageryStretchedLegend(e,n){return!0}render(){let e=this.renderFilteredLayers(),n=J.get("compact")?` ${m.compact}`:"";return this.isLoading?Q("interactive-legend-loader",L`<calcite-loader scale=m .label=${this.messages?.loading} .text=${this.messages?.loading}></calcite-loader>`):Q("interactive-legend-classic-container",L`<div class=${`${j(this.el)}${n}`} ${Le(this._legendContainerRef)}>${e?.length>0?e:L`<div class=${x(m.message)}>${this.messages?.noLegend}</div>`}</div>`)}renderFilteredLayers(){return(this.legendvm?.activeLayerInfos?.toArray()).map(e=>this.renderLegendForLayer(e)).filter(e=>!!e)}renderLegendForLayer(e,n){if(!e.ready)return null;if(e.children.length){let s=e.children.map(u=>this.renderLegendForLayer(u,!0)).toArray();return L`<instant-apps-interactive-legend-group-legend-element class=${x(j(this.el))} .legendvm=${this.legendvm} .featureCount=${this.featureCount} .activeLayerInfo=${e} .isChild=${n}><div style=${k({paddingLeft:"20px"})} .id=${`${e?.layer?.id}-legend-layer`} slot=content>${s}</div></instant-apps-interactive-legend-group-legend-element>`}let l=e.legendElements;if(l&&!l.length)return null;let r=l.map((s,u)=>this.renderLegendForElement(s,e.layer,e.effectList,e,u)).filter(s=>!!s);return r.length?L`<instant-apps-interactive-legend-layer-element class=${x(j(this.el))} .legendvm=${this.legendvm} .featureCount=${this.featureCount} .activeLayerInfo=${e} .isChild=${!!n}><div slot=content .id=${`${e?.layer?.id}-legend-layer`} class=${x(m.layer)}>${r}</div></instant-apps-interactive-legend-layer-element>`:null}renderLegendForElement(e,n,l,r,s,u,h){let $=de(e),w=me(e),S=ye(e),R=null,_=je(r,e,s),T=Xe(e),M=Bt(this._legendContainerRef?.value?.clientWidth||this.el?.clientWidth);if(Ye(e)||S){let C=e.infos.some(U=>Ht(U,M)),B=e.infos.map((U,K)=>this.renderLegendForElementInfo(U,n,l,S,e,r,s,K,_,h)).filter(U=>!!U);B.length&&(R=L`<div class=${`${m.layerBody}${C?` ${m.layerBodyLargeSymbol}`:""}`}>${B}</div>`)}else if(de(e)||me(e)||Ee(e)||Re(e)){let C=e;R=this.renderLegendForRamp(C,n.opacity)}else if(T){let C=e;R=Q(Ke.RELATIONSHIP_RAMP,L`<instant-apps-interactive-legend-relationship class=${x(j(this.el))} .filterMode=${this.filterMode} .activeLayerInfo=${r} .legendElement=${C}></instant-apps-interactive-legend-relationship>`)}else if(Qe(e)){let C=e;R=this.renderPieChartRamp(C)}else if(Ze(e)){let C=e;R=this.renderUnivariateAboveAndBelowRamp(C,n.opacity,l)}else if(Oe(e)){let C=e;R=this.renderUnivariateColorSizeRamp(C,n.opacity,l)}if(!R)return null;let I=e.title,P=null;if(typeof I=="string")P=I;else if(I){let C=I,B=this.getTitle(C,$||w);this.isRendererTitle($||w)?"title"in I&&(P=`${I.title} (${B})`):P=B}return L`<instant-apps-interactive-legend-legend-element class=${x(j(this.el))} .activeLayerInfo=${r} .isSizeRamp=${S} .isChild=${!!u} .isColorRamp=${$} .isRelationshipRamp=${T} .isInteractive=${_} .zoomTo=${this.zoomTo} .legendElement=${e} .titleText=${P} .legendvm=${this.legendvm} .legendElementIndex=${s}><div slot=content>${R}</div></instant-apps-interactive-legend-legend-element>`}renderPieChartRamp(e){return L`<div .innerHTML=${`${e.preview?.outerHTML}`}></div>`}renderUnivariateAboveAndBelowRamp(e,n,l){let{sizeRampElement:r,colorRampElement:s}=Jt(e,n);if(!r)return null;let u=Se(r,"above",!0),h=Se(r,"below",!0),$=12,w=ke(s,{width:$,height:u,rampAlignment:"vertical",opacity:n,type:"above",effectList:l}),S=ke(s,{width:$,height:h,rampAlignment:"vertical",opacity:n,type:"below",effectList:l}),R=ot(r),_=r.infos.map(H=>H.label),T=_.map((H,D)=>D===0?L`<div class=${x(H?w?m.univariateAboveAndBelowLabel:m.rampLabel:"")}>${H}</div>`:D===2?L`<div></div>`:null),M=_.length-1,I=Math.floor(_.length/2),P=_.map((H,D)=>D===I||D===M?L`<div class=${x(H?w?m.univariateAboveAndBelowLabel:m.rampLabel:"")}>${H}</div>`:null),C={display:"table-cell",verticalAlign:"middle"},B={marginTop:`${R}px`},U={height:`${u}px`},K={height:`${h}px`};return Q("univariate-above-and-below-ramp-preview",L`<div style=${k(ft)}><div class=${x(m.layerBody)}>${r.infos.map((H,D)=>L`<div class=${`${m.layerRow} ${m.sizeRamp}`}><div class=${x(m.symbol)} style=${k(C)} .innerHTML=${H?.preview?.outerHTML??""??""}></div>${!w&&D%2===0?L`<div class=${x(m.layerInfo)}>${_[D]}</div>`:null}</div>`)}</div>${w?Q("color-ramp-preview",L`<div style=${k(B)}><div style=${k(Ie)}><div style=${k(ae)}><div class=${x(m.rampContainer)}>${w}</div></div><div style=${k(ae)}><div class=${x(m.rampLabelsContainer)} style=${k(U)}>${T}</div></div></div><div style=${k(Ie)}><div style=${k(ae)}><div class=${x(m.rampContainer)}>${S}</div></div><div style=${k(ae)}><div class=${x(m.rampLabelsContainer)} style=${k(K)}>${P}</div></div></div></div>`):null}</div>`)}renderUnivariateColorSizeRamp(e,n,l){let{sizeRampElement:r,colorRampElement:s}=Kt(e);if(!r)return null;let u=ot(r),h=12,$=Se(r,"full",!1),w=ke(s,{width:h,height:$,rampAlignment:"vertical",opacity:n,type:"full",effectList:l}),S=r.infos.length-1,R=r.infos.map((I,P)=>P===0||P===S?L`<div class=${x(I.label?s?m.univariateAboveAndBelowLabel:m.rampLabel:"")}>${I.label}</div>`:null),_={display:"table-cell",verticalAlign:"middle"},T={marginTop:`${u}px`},M={height:`${$}px`};return Q("univariate-above-and-below-ramp-preview",L`<div style=${k(ft)}><div class=${x(m.layerBody)}>${r.infos.map(I=>L`<div class=${`${m.layerRow} ${m.sizeRamp}`}><div class=${x(m.symbol)} style=${k(_)} .innerHTML=${I?.preview?.outerHTML??""??""}></div></div>`)}</div>${Q("color-ramp-preview",L`<div style=${k(T)}><div style=${k(Ie)}><div style=${k(ae)}><div class=${x(m.rampContainer)}>${w}</div></div><div style=${k(ae)}><div class=${x(m.rampLabelsContainer)} style=${k(M)}>${R}</div></div></div></div>`)}</div>`)}renderLegendForRamp(e,n){let l=e.infos,r=me(e),s=Ee(e),u=Re(e),h=e.preview,$=r?m.opacityRamp:"";h&&(h.classList.add(m.colorRamp),$&&h.classList.add($)),n!=null&&h&&(h.style.opacity=n.toString());let w=l.map(_=>{let T;if(s){let M=this.messages[_.label];T=typeof M=="string"?M:_.label}else u?T="value"in _?this.getStretchStopLabel(_):_.label:T=_.label;return L`<div class=${x(_.label?m.rampLabel:"")}>${T}</div>`}),S={width:`${Xt}px`},R={height:h?.style?.height};return L`<div class=${x(m.layerRow)}><div class=${x(m.symbolContainer)} style=${k({...S})}><div class=${x(m.rampContainer)} ${Le(_=>{_?.firstChild&&_?.firstChild?.remove(),_?.appendChild(h)})}></div></div><div class=${x(m.layerInfo)}><div class=${x(m.rampLabelsContainer)} style=${k({...R})}>${w}</div></div></div>`}renderLegendForElementInfo(e,n,l,r,s,u,h,$,w,S){if("infos"in e)return this.renderLegendForElement(e,n,l,u,h,!0,e);let R=null,_=!this.isImageryStretchedLegend(n,s.type);if("preview"in e){let{outerHTML:W}=e.preview;R=L`<div class=${x(m.symbol)} .innerHTML=${W??""}></div>`}else"src"in e&&(R=this.renderImage(e,n,_));if(!R)return null;let T=_?` ${m.imageryLayerInfoStretched}`:"",M=!_&&r?` ${m.sizeRamp}`:"",I,P=Je(n),C=tt(P,S);if(N.data){let W=et(P,n,e,C,$),V=C?C?.nestedInfos:P,se=Ne(V),we=!!u?.children?.length||!!C;I=P?.categories?.size===1&&!we?!W?.selected:se||W?.selected}let B="label"in e?e.label:null,U=C&&!("value"in e)?!1:w,K=J.get("compact"),H=this.getTitle(B,!1)||"",D=C?s.title:B??n?.id;return U?L`<button @click=${this.applyFilter(e,n,$,S)} class=${`${m.layerRow} ${m.interactiveLayerRow}${I?` ${m.infoSelected}`:""}`} title=${(K?`${H}`:void 0)??ge} .ariaPressed=${I?"true":"false"}><div class=${`${m.symbolContainer}${T}${M}`}>${R}</div><div class=${`${m.layerInfo}${T}`}>${this.getTitle(B,!1)||""}</div>${this.featureCount&&!K?L`<instant-apps-interactive-legend-count class=${x(j(this.el))} .categoryId=${D} .activeLayerInfo=${u} .legendvm=${this.legendvm} .selected=${!!I} .legendElement=${s} .infoIndex=${$}></instant-apps-interactive-legend-count>`:null}</button>`:L`<div class=${x(m.layerRow)}><div class=${`${m.symbolContainer}${T}${M}`}>${R}</div><div class=${`${m.layerInfo}${T}`}>${H}</div></div>`}renderImage(e,n,l){let{label:r,src:s,opacity:u}=e,h=l?` ${m.imageryLayerStretchedImage}`:"",$=l?"":` ${m.symbol}`,w={opacity:`${u??n.opacity}`};return L`<img alt=${this.getTitle(r,!1)??ge} src=${s??ge} width=${e.width} height=${e.height} class=${`$${h}${$}`} style=${k(w)}>`}};We("instant-apps-interactive-legend-classic",Te);return Te},"layers/support/FeatureFilter","layers/support/FeatureEffect","symbols/support/symbolUtils","core/reactiveUtils","intl","core/Handles",a,b,c,d,e)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{a as u}from"./VVZAS55G.js";import{a as m}from"./
|
|
2
|
+
import{a as u}from"./VVZAS55G.js";import{a as m}from"./TWJ6DAY5.js";import{b as d}from"./S4GBMN37.js";import"./QMAV4UTN.js";import"./Y2AUIXNK.js";import{H as p,J as a,g as c,h as r,i as e,q as h}from"./T3EPRHTT.js";import"./EXBEKVP5.js";function f(){return new u({whiteList:{h1:["style"],h2:["style"],h3:["style"],h4:["style"],h5:["style"],h6:["style"],img:["style","src","width","height"],pre:["style"],p:["id","class","style"],div:["id","class","style","role"],span:["id","class","style","role"],figure:["class","style"]}},!0)}function g(i){window?.localStorage.setItem(i,"false")}function b(i){return!!window?.localStorage?.getItem(i)}function _(i){window?.localStorage?.removeItem(i)}var x=r`:host{--instant-apps-splash-content-max-height: 100%;--instant-apps-splash-back-content-display: flex;display:block}:host .image.image_resized img{width:100%}:host .instant-apps-splash__back-content{display:var(--instant-apps-splash-back-content-display);align-items:center}:host .instant-apps-splash__back-content calcite-label{--calcite-label-margin-bottom: 0}:host .instant-apps-splash__content{max-height:var(--instant-apps-splash-content-max-height)}:host .instant-apps-splash__confirmation-tooltip{display:inline-block;max-width:200px;word-wrap:break-word}:host .instant-apps-splash__required{display:inline-block;margin-inline-start:var(--calcite-spacing-xxs);color:var(--calcite-color-status-danger)}:host .instant-apps-splash__footer{width:100%;display:flex;justify-content:space-between}:host .instant-apps-splash__button-container{display:flex}:host .instant-apps-splash__button-container calcite-button:not(:last-child){margin-inline-end:var(--calcite-spacing-sm)}@media(max-width:816px){:host .instant-apps-splash__footer{justify-content:flex-start;flex-direction:column}:host .instant-apps-splash__back-content{margin-bottom:var(--calcite-spacing-sm)}:host .instant-apps-splash__back-content span{display:flex;align-items:center}:host .instant-apps-splash__button-container{width:100%;gap:var(--calcite-spacing-sm);justify-content:space-between}:host .instant-apps-splash__button-container calcite-button:not(:last-child){margin-inline-end:0}:host .instant-apps-splash__button-container>*{flex:1 1 0;min-width:0}}`,n={back:"instant-apps-splash__back-content",confirmationTooltip:"instant-apps-splash__confirmation-tooltip",requiredText:"instant-apps-splash__required",footer:"instant-apps-splash__footer",buttonContainer:"instant-apps-splash__button-container"},l=class extends p{constructor(){super(...arguments),this._messages=m({name:"instant-apps-splash"}),this._sanitizer=f(),this.titleText="",this.content="",this.primaryButtonText="",this.open=!0,this.closeButtonDisabled=!1,this.outsideCloseDisabled=!1,this.secondaryButton=!1,this.closeBehavior="permanent-dismissal",this.confirmationText="",this.isConfirmed=!1,this.splashClose=h()}static{this.properties={localStorageKey:1,titleText:1,content:1,primaryButtonText:1,open:5,closeButtonDisabled:5,outsideCloseDisabled:5,secondaryButton:5,secondaryButtonText:1,secondaryButtonIcon:1,secondaryButtonCallback:0,closeBehavior:1,confirmationText:1,isConfirmed:32}}static{this.styles=x}load(){let t;if(this.closeBehavior==="confirmation"||this.closeBehavior==="dismissal")t=!0;else{let{localStorageKey:s}=this;s?t=this.open&&!b(s):t=this.open}this.el.open=t,this.content&&this._sanitizer&&this.sanitizeContent()}willUpdate(t){t.has("content")&&this.sanitizeContent()}sanitizeContent(){this.content=this._sanitizer.sanitize(this.content)}close(){this.open=!1,this.splashClose.emit()}getCheckboxText(){return this.closeBehavior==="confirmation"?this.confirmationText?this.confirmationText:`${this._messages.confirmationText}`:this._messages?.dontShowThisAgain}handleDontShowThisAgain(t){if(this.closeBehavior==="confirmation"){let s=t.target,{checked:o}=s;c(()=>{this.isConfirmed=o})}else if(this.closeBehavior==="permanent-dismissal"){let{localStorageKey:s}=this;if(!s)return;let o=t.target,{checked:y}=o;y?g(s):_(s)}}render(){return e`<calcite-dialog .open=${this.open} .focusTrapOptions=${{allowOutsideClick:!0}} modal .heading=${this.titleText} aria-describedby=description @calciteDialogClose=${this.close} top-layer-disabled .closeDisabled=${this.closeBehavior==="confirmation"||this.closeButtonDisabled} .outsideCloseDisabled=${this.closeBehavior==="confirmation"||this.outsideCloseDisabled} .escapeDisabled=${this.closeBehavior==="confirmation"}><div id=description .innerHTML=${this.content??""}></div><slot name=custom-action></slot><div class=${a(n.footer)} slot=footer>${this.localStorageKey&&this.closeBehavior==="permanent-dismissal"||this.closeBehavior==="confirmation"?this.renderCheckbox():null}<div class=${a(n.buttonContainer)}>${this.secondaryButton?this.renderSecondaryButton():null}${this.renderPrimaryButton()}</div>${this.closeBehavior==="confirmation"&&!this.isConfirmed&&e`<calcite-tooltip reference-element=primary-button overlay-positioning=fixed placement=top><span class=${a(n.confirmationTooltip)}>${this._messages?.confirmationTooltip}</span></calcite-tooltip>`||""}</div></calcite-dialog>`}renderCheckbox(){let{localStorageKey:t}=this,s=this.closeBehavior!=="confirmation"&&t&&b(t)?!0:null;return e`<div class=${a(n.back)}><calcite-label layout=inline><calcite-checkbox @calciteCheckboxChange=${this.handleDontShowThisAgain} .checked=${s??void 0}></calcite-checkbox><span>${this.getCheckboxText()}<span class=${a(n.requiredText)}>${this.closeBehavior==="confirmation"&&`(${this._messages?.required})`||""}</span></span></calcite-label></div>`}renderPrimaryButton(){let{primaryButtonText:t}=this;return e`<calcite-button id=primary-button @click=${this.close} slot=footer-end .disabled=${this.closeBehavior==="confirmation"?!this.isConfirmed:!1}>${t||this._messages?.enter}</calcite-button>`}renderSecondaryButton(){return e`<calcite-button @click=${this.secondaryButtonCallback} slot=footer-end .iconStart=${this.secondaryButtonIcon} appearance=outline .disabled=${this.closeBehavior==="confirmation"?!this.isConfirmed:!1}>${this.secondaryButtonText}</calcite-button>`}};d("instant-apps-splash",l);export{l as InstantAppsSplash};
|