@esri/solutions-components 5.1.5 → 5.1.6
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/{MFAEDW75.js → 2EAVGPQQ.js} +1 -1
- package/dist/cdn/{R4DDGIC2.js → 2I5UY6RD.js} +1 -1
- package/dist/cdn/{GCDVJH5S.js → 3HGR6VXB.js} +1 -1
- package/dist/cdn/{K2EL2UZ6.js → 4CEQFURO.js} +1 -1
- package/dist/cdn/{NG3F6PTV.js → 4CMB2JIF.js} +1 -1
- package/dist/cdn/{S2WAKXLP.js → 4WGHP4H5.js} +1 -1
- package/dist/cdn/{4FT4GFHD.js → 537YPVAM.js} +1 -1
- package/dist/cdn/{57K3VUDO.js → 55UXOGN6.js} +1 -1
- package/dist/cdn/{C7NYB4E3.js → 573G4DTV.js} +1 -1
- package/dist/cdn/{VO5GTLFZ.js → 5Y6BC5WH.js} +1 -1
- package/dist/cdn/{CQO3LS4F.js → 6DPRWKJW.js} +1 -1
- package/dist/cdn/{Z25PSY3U.js → 6HMLPLLU.js} +1 -1
- package/dist/cdn/{SVSOXKWN.js → 6OWR4WDF.js} +1 -1
- package/dist/cdn/{UVVHDNLG.js → 73WHDMBB.js} +1 -1
- package/dist/cdn/{PS3JQUTJ.js → 74ZQDJYN.js} +1 -1
- package/dist/cdn/{LJSV3N24.js → 7BFE3VVJ.js} +1 -1
- package/dist/cdn/{BRO7CVUL.js → 7ERUNOYN.js} +1 -1
- package/dist/cdn/{66G3UOA2.js → 7P5SMQEP.js} +1 -1
- package/dist/cdn/{PSEXPNM3.js → 7QFRUIR3.js} +1 -1
- package/dist/cdn/{YYX3TPSP.js → 7RDUGCTS.js} +1 -1
- package/dist/cdn/{D5KRZ7AK.js → A6JQTHN7.js} +1 -1
- package/dist/cdn/{J7DVVXDE.js → ABRY4E4C.js} +1 -1
- package/dist/cdn/{JIQTQNV2.js → ACS56O66.js} +1 -1
- package/dist/cdn/{JUYUL4XS.js → AGBRB3QN.js} +1 -1
- package/dist/cdn/{72W4TG3N.js → AZOG6L3Y.js} +1 -1
- package/dist/cdn/{GLMXH46Y.js → BDTAVWLX.js} +1 -1
- package/dist/cdn/{D4HLNASK.js → BQQVJ6KB.js} +1 -1
- package/dist/cdn/{PS72QAM2.js → BWKTLBKM.js} +1 -1
- package/dist/cdn/{R4HQIY3D.js → C2GDUVT5.js} +1 -1
- package/dist/cdn/{HW2PNVBR.js → CJUVMFRG.js} +1 -1
- package/dist/cdn/{C7PGMJUI.js → CLJLD5PX.js} +1 -1
- package/dist/cdn/{LC3EY5AV.js → CNMS4F5Q.js} +1 -1
- package/dist/cdn/{WV6SP7G6.js → COQ7K4OA.js} +1 -1
- package/dist/cdn/{IVNAWTJU.js → DCFZQJRO.js} +1 -1
- package/dist/cdn/{EP5UH274.js → DQBV3WFN.js} +1 -1
- package/dist/cdn/{SSCZIVLF.js → DTR7YAZI.js} +1 -1
- package/dist/cdn/{WUIPWLKY.js → EH3BNB4R.js} +1 -1
- package/dist/cdn/{IUNQVV4E.js → FCLUG3NJ.js} +1 -1
- package/dist/cdn/{BFWIGZO7.js → FFI7CZZE.js} +1 -1
- package/dist/cdn/{DHCQHZGS.js → FJNJ7VV3.js} +1 -1
- package/dist/cdn/{ZO6UNZTG.js → FO27KNLW.js} +1 -1
- package/dist/cdn/{3TC2XGQ5.js → FSXHE5BN.js} +1 -1
- package/dist/cdn/{HPJTDALL.js → FSZQUSYT.js} +1 -1
- package/dist/cdn/{IUDZCTI5.js → FUDBT5SO.js} +1 -1
- package/dist/cdn/{47DJRQSO.js → GA4HPDIK.js} +1 -1
- package/dist/cdn/{TIYKWS6T.js → GTEFHPHV.js} +1 -1
- package/dist/cdn/{GJVOUQQH.js → HKQKXCKL.js} +1 -1
- package/dist/cdn/{4VBJISFZ.js → HN45AZDW.js} +1 -1
- package/dist/cdn/{LYGGTOTA.js → HQB33AR6.js} +1 -1
- package/dist/cdn/{XVC34MKM.js → HSYNLCS6.js} +1 -1
- package/dist/cdn/{XZMAMFEG.js → HU4SFLVQ.js} +1 -1
- package/dist/cdn/{TN3H35H5.js → HZEKMQOQ.js} +1 -1
- package/dist/cdn/{IXEH43JO.js → IFPPYYO5.js} +1 -1
- package/dist/cdn/{FXGBFLFM.js → IHZ3FODO.js} +1 -1
- package/dist/cdn/{PTTNVFTG.js → IN7KX2VO.js} +1 -1
- package/dist/cdn/{BM2YLVYU.js → INHF3PRS.js} +1 -1
- package/dist/cdn/{U4HGOXNJ.js → IPOPM3LM.js} +1 -1
- package/dist/cdn/{VCGIHOOS.js → IV3XLBK2.js} +1 -1
- package/dist/cdn/{2K2JHJHI.js → IVG423RV.js} +1 -1
- package/dist/cdn/{52UQZUF4.js → IVT5EH7V.js} +1 -1
- package/dist/cdn/{4ADGXO3L.js → IWLWX75G.js} +1 -1
- package/dist/cdn/{FAUIMAPE.js → J3R23IV3.js} +1 -1
- package/dist/cdn/{W75AYE63.js → JBTMA635.js} +1 -1
- package/dist/cdn/{IXSXSPVY.js → JGIUIMX6.js} +1 -1
- package/dist/cdn/{4T4PIFVM.js → JJQALSZS.js} +1 -1
- package/dist/cdn/{BQTGHHZB.js → K7E7L4OR.js} +1 -1
- package/dist/cdn/KLIO37YK.js +64 -0
- package/dist/cdn/{DFCRABYS.js → KLZILSM2.js} +1 -1
- package/dist/cdn/{X5OAASE3.js → KXHGNIZI.js} +1 -1
- package/dist/cdn/{EX3OQDJQ.js → KXV767EZ.js} +1 -1
- package/dist/cdn/{OIKSXWIN.js → L64ATDYJ.js} +1 -1
- package/dist/cdn/{6VBM5CYH.js → LOBQXN5U.js} +1 -1
- package/dist/cdn/LWJ74OVE.js +2 -0
- package/dist/cdn/{POGUZ34D.js → M7ADRTOD.js} +1 -1
- package/dist/cdn/{CGWXSQMR.js → MED4PP57.js} +1 -1
- package/dist/cdn/{KXMDUV5P.js → MKZEX7DE.js} +1 -1
- package/dist/cdn/{CPE5LQ77.js → ML7ONETQ.js} +1 -1
- package/dist/cdn/{FRTR7R27.js → MN7YVS4C.js} +1 -1
- package/dist/cdn/{DQVYSRKV.js → MUTMVCJH.js} +1 -1
- package/dist/cdn/{6M63XHZE.js → MWMHCOM7.js} +1 -1
- package/dist/cdn/{6SJAVXVB.js → N7JMNT7U.js} +1 -1
- package/dist/cdn/{7SROO3BB.js → NEEE2XFP.js} +1 -1
- package/dist/cdn/{J2R6S5NB.js → NFSBYFAN.js} +1 -1
- package/dist/cdn/{SHDZVK22.js → NGDIFB6C.js} +1 -1
- package/dist/cdn/{743CCX7N.js → NPRV26AN.js} +1 -1
- package/dist/cdn/{JUS454AQ.js → NSIWYZXA.js} +1 -1
- package/dist/cdn/{JP3PBXBQ.js → O3JLHPWX.js} +1 -1
- package/dist/cdn/{ZS54T3U7.js → O4PNLONH.js} +1 -1
- package/dist/cdn/{R4SSUAM5.js → O65GM2OS.js} +1 -1
- package/dist/cdn/{6GPU4R2K.js → OE2AIEJR.js} +1 -1
- package/dist/cdn/{2ANPUNLB.js → OKMR3RTG.js} +1 -1
- package/dist/cdn/{36A4OXYY.js → PCMKVOJE.js} +1 -1
- package/dist/cdn/{DW7BVW5R.js → PMRMQHSG.js} +1 -1
- package/dist/cdn/{FGRROW6V.js → PNS2HOLX.js} +1 -1
- package/dist/cdn/{XFQFC2MM.js → POPNTKTN.js} +1 -1
- package/dist/cdn/{PM6MGL6S.js → PSXWMNIM.js} +3 -3
- package/dist/cdn/{FCFYBIFG.js → PWV6AWEK.js} +1 -1
- package/dist/cdn/{GT3APK5P.js → Q3JLQFIR.js} +1 -1
- package/dist/cdn/{KJEGIFW3.js → QI7CGBRO.js} +1 -1
- package/dist/cdn/{MRYP6TKM.js → QJRZSXE3.js} +1 -1
- package/dist/cdn/{VQR63FZS.js → QKL3OUJN.js} +1 -1
- package/dist/cdn/{OKJQRXDF.js → RB6WXO2B.js} +1 -1
- package/dist/cdn/{LJ4YWFDV.js → RDDKOZ3K.js} +1 -1
- package/dist/cdn/{YY2HNKAV.js → RIUUYA2I.js} +1 -1
- package/dist/cdn/{HE4XVC7T.js → RK6QNHNL.js} +1 -1
- package/dist/cdn/{H6NFDCMH.js → RKAS46EN.js} +1 -1
- package/dist/cdn/{A6FQF2BM.js → RTGQJBPP.js} +1 -1
- package/dist/cdn/{LNEAPSZB.js → SGKOGGQZ.js} +1 -1
- package/dist/cdn/{KWKPWZBG.js → STFLL5DN.js} +1 -1
- package/dist/cdn/{42ZGLRJV.js → T4FTLA6B.js} +1 -1
- package/dist/cdn/{DBUXZOL2.js → TQWJ7RSO.js} +1 -1
- package/dist/cdn/{AVTCXUIQ.js → TVEHBAEM.js} +1 -1
- package/dist/cdn/{BEX2VQAI.js → U252BRLA.js} +1 -1
- package/dist/cdn/{2J5XFLVO.js → U2YCH7KY.js} +1 -1
- package/dist/cdn/{HZDK3K4L.js → UDF6XJC3.js} +1 -1
- package/dist/cdn/{IJ3HJGCR.js → UFQD5LVR.js} +1 -1
- package/dist/cdn/{WFZAADG6.js → UHEB6KZP.js} +1 -1
- package/dist/cdn/{QFIGUV2M.js → UIGM4I3S.js} +1 -1
- package/dist/cdn/{5BJ6II4F.js → UWTMQLSU.js} +1 -1
- package/dist/cdn/{3LOSUHD7.js → W2IZON5N.js} +1 -1
- package/dist/cdn/{DPGJWY5W.js → W552UHUR.js} +1 -1
- package/dist/cdn/{HK7AVDFS.js → WD54XDPZ.js} +1 -1
- package/dist/cdn/{7RAJU536.js → WWUOFMRE.js} +1 -1
- package/dist/cdn/{TV64L24Q.js → XR4LGSBC.js} +1 -1
- package/dist/cdn/{ATEM3GJU.js → XUVXLS2M.js} +113 -113
- package/dist/cdn/XW7WPRON.js +2 -0
- package/dist/cdn/{QTKE7MA4.js → YCHKFNP6.js} +1 -1
- package/dist/cdn/{FZY7OS66.js → YKY6I4I6.js} +1 -1
- package/dist/cdn/{QTVE3UQ6.js → Z5HWNFRD.js} +1 -1
- package/dist/cdn/{VMJ4RMTW.js → ZE2QFJQE.js} +1 -1
- package/dist/cdn/{AMCU6DVH.js → ZL3RLLE7.js} +1 -1
- package/dist/cdn/{QX4VD677.js → ZME6RLE5.js} +1 -1
- package/dist/cdn/{GGW5J7IJ.js → ZOGFJJWC.js} +1 -1
- package/dist/cdn/{7MGKE5QL.js → ZRNM2GI7.js} +1 -1
- package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.ar.json +1 -1
- package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.bg.json +1 -1
- package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.bs.json +1 -1
- package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.ca.json +1 -1
- package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.cs.json +1 -1
- package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.da.json +1 -1
- package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.de.json +1 -1
- package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.el.json +1 -1
- package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.es.json +1 -1
- package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.et.json +1 -1
- package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.fi.json +1 -1
- package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.fr.json +1 -1
- package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.he.json +1 -1
- package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.hr.json +1 -1
- package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.hu.json +1 -1
- package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.id.json +1 -1
- package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.it.json +1 -1
- package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.ja.json +1 -1
- package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.ko.json +1 -1
- package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.lt.json +1 -1
- package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.lv.json +1 -1
- package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.nl.json +1 -1
- package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.no.json +1 -1
- package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.pl.json +1 -1
- package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.pt-BR.json +1 -1
- package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.pt-PT.json +1 -1
- package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.ro.json +1 -1
- package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.ru.json +1 -1
- package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.sk.json +1 -1
- package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.sl.json +1 -1
- package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.sr.json +1 -1
- package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.sv.json +1 -1
- package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.th.json +1 -1
- package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.tr.json +1 -1
- package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.uk.json +1 -1
- package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.vi.json +1 -1
- package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.zh-CN.json +1 -1
- package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.zh-HK.json +1 -1
- package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.zh-TW.json +1 -1
- package/dist/cdn/assets/solutions-deploy-app/t9n/messages.ar.json +1 -1
- package/dist/cdn/assets/solutions-deploy-app/t9n/messages.bg.json +1 -1
- package/dist/cdn/assets/solutions-deploy-app/t9n/messages.bs.json +1 -1
- package/dist/cdn/assets/solutions-deploy-app/t9n/messages.ca.json +1 -1
- package/dist/cdn/assets/solutions-deploy-app/t9n/messages.cs.json +1 -1
- package/dist/cdn/assets/solutions-deploy-app/t9n/messages.da.json +1 -1
- package/dist/cdn/assets/solutions-deploy-app/t9n/messages.de.json +1 -1
- package/dist/cdn/assets/solutions-deploy-app/t9n/messages.el.json +1 -1
- package/dist/cdn/assets/solutions-deploy-app/t9n/messages.es.json +1 -1
- package/dist/cdn/assets/solutions-deploy-app/t9n/messages.et.json +1 -1
- package/dist/cdn/assets/solutions-deploy-app/t9n/messages.fi.json +1 -1
- package/dist/cdn/assets/solutions-deploy-app/t9n/messages.fr.json +1 -1
- package/dist/cdn/assets/solutions-deploy-app/t9n/messages.he.json +1 -1
- package/dist/cdn/assets/solutions-deploy-app/t9n/messages.hr.json +1 -1
- package/dist/cdn/assets/solutions-deploy-app/t9n/messages.hu.json +1 -1
- package/dist/cdn/assets/solutions-deploy-app/t9n/messages.id.json +1 -1
- package/dist/cdn/assets/solutions-deploy-app/t9n/messages.it.json +1 -1
- package/dist/cdn/assets/solutions-deploy-app/t9n/messages.ja.json +1 -1
- package/dist/cdn/assets/solutions-deploy-app/t9n/messages.ko.json +1 -1
- package/dist/cdn/assets/solutions-deploy-app/t9n/messages.lt.json +1 -1
- package/dist/cdn/assets/solutions-deploy-app/t9n/messages.lv.json +1 -1
- package/dist/cdn/assets/solutions-deploy-app/t9n/messages.nl.json +1 -1
- package/dist/cdn/assets/solutions-deploy-app/t9n/messages.no.json +1 -1
- package/dist/cdn/assets/solutions-deploy-app/t9n/messages.pl.json +1 -1
- package/dist/cdn/assets/solutions-deploy-app/t9n/messages.pt-BR.json +1 -1
- package/dist/cdn/assets/solutions-deploy-app/t9n/messages.pt-PT.json +1 -1
- package/dist/cdn/assets/solutions-deploy-app/t9n/messages.ro.json +1 -1
- package/dist/cdn/assets/solutions-deploy-app/t9n/messages.ru.json +1 -1
- package/dist/cdn/assets/solutions-deploy-app/t9n/messages.sk.json +1 -1
- package/dist/cdn/assets/solutions-deploy-app/t9n/messages.sl.json +1 -1
- package/dist/cdn/assets/solutions-deploy-app/t9n/messages.sr.json +1 -1
- package/dist/cdn/assets/solutions-deploy-app/t9n/messages.sv.json +1 -1
- package/dist/cdn/assets/solutions-deploy-app/t9n/messages.th.json +1 -1
- package/dist/cdn/assets/solutions-deploy-app/t9n/messages.tr.json +1 -1
- package/dist/cdn/assets/solutions-deploy-app/t9n/messages.uk.json +1 -1
- package/dist/cdn/assets/solutions-deploy-app/t9n/messages.vi.json +1 -1
- package/dist/cdn/assets/solutions-deploy-app/t9n/messages.zh-CN.json +1 -1
- package/dist/cdn/assets/solutions-deploy-app/t9n/messages.zh-HK.json +1 -1
- package/dist/cdn/assets/solutions-deploy-app/t9n/messages.zh-TW.json +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/runtime.js +1 -1
- package/dist/chunks/transformQuery.js +56 -38
- package/dist/components/arcgis-solutions-assistant/customElement.js +7 -3
- 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 +4 -4
- package/package.json +1 -1
- package/dist/cdn/4ER7R6OS.js +0 -2
- package/dist/cdn/MFVXFKKM.js +0 -46
- package/dist/cdn/MHBADLXW.js +0 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import d from"./
|
|
2
|
+
import d from"./JBTMA635.js";import b from"./XOPNEAS5.js";import{a as y,b as _}from"./2B4SGB3I.js";import{b as h}from"./RLSY4VUQ.js";import"./AO7XKW2U.js";import{a as S}from"./573G4DTV.js";import"./QMAV4UTN.js";import"./Y2AUIXNK.js";import"./TEHBW75B.js";import"./RSPNBIIE.js";import"./ZCU2WWVN.js";import"./WGO4EVOV.js";import"./YKB6256M.js";import"./36LRAUE4.js";import"./JMY4B4WQ.js";import"./VQ5ZAQUF.js";import"./Z4F2NZOT.js";import"./KOIDWEP3.js";import"./3KXMYZCU.js";import"./6ERMTA3J.js";import"./GF4QELNV.js";import"./3TAQSXLA.js";import"./PY6RTQDR.js";import"./DKD2EGQP.js";import"./5O53T3SW.js";import"./AJZDBHB6.js";import"./FES7B3SJ.js";import{b as m}from"./IPOPM3LM.js";import{H as u,L as c,h as g,i as a,q as n}from"./T3EPRHTT.js";import"./EXBEKVP5.js";export default $arcgis.t(([{s:l},{s:p}])=>{var w=g`.toolbar-sizing{display:flex;align-items:center;padding-right:0;padding-left:0;margin-left:auto;margin-right:auto;box-sizing:border-box;height:66px}.flex-row{display:flex;flex-direction:row}.flex-grow-1{flex-grow:1}calcite-input-text{--calcite-color-focus: transparent;--calcite-input-text-border-color: transparent;--calcite-color-border-input: transparent;--calcite-color-brand: transparent;display:grid;block-size:65px;box-sizing:border-box;border-bottom:2px solid transparent}@media(prefers-color-scheme:dark){calcite-input-text:focus{border-bottom:2px solid #009AF2}}@media(prefers-color-scheme:light){calcite-input-text:focus{border-bottom:2px solid #007AC2}}.padding-end-1-2{padding-inline-end:.5rem}`,d=class extends u{constructor(){super(),this.defaultSortType="relevance",this.isOrgSolutions=!1,this._activeSearchSortSettings=[{scope:"all-solutions",settings:{enabled:!0,isOrgSolutions:!1,searchTerm:"",sortType:"relevance"}},{scope:"deployments",settings:{enabled:!0,isOrgSolutions:!1,searchTerm:"",sortType:"created"}}],this._isMobile=!1,this._canViewOrg=!1,this._translations=S({name:"solutions-searchsort-toolbar",blocking:!0}),this._configContextConsumer=h({context:_,subscribe:!0,callback:async t=>{t&&t.authentication&&(this._canViewOrg=t.authentication.CanViewOrg)}}),this._isMobileContextConsumer=h({context:y,subscribe:!0,callback:t=>this._isMobile=t}),this.searchChanged=n(),this.sortTypeChanged=n(),this.toggleFilter=n(),this.updateUrlParams=n(),this.listenOn(window,"detailsCardSelected",()=>{this.scope=void 0}),this.listenOn(window,"deployedCardSelected",()=>{this.scope=void 0}),this.listenOn(window,"searchTermSet",t=>{let e=t.detail;this.scope=e.scope,this.changeSearchFilter(e.searchTerm,!1)}),this.listenOn(window,"sortTypeSet",t=>{let e=t.detail;this.scope=e.scope,this.sortChanged(e.sortType,!1)}),this.listenOn(window,"tabChanged",t=>{this.scope=t.detail;let e=this._getCurrentScopeSetting();(this.scope==="all-solutions"||this.scope==="deployments")&&(this.changeSearchFilter(e?.searchTerm||"",!1),this.sortChanged(e?.sortType||this.defaultSortType,!1),this._updateUrlParams(t))})}static{this.properties={defaultSortType:[0,{type:String,attribute:"default-sort-type"}],isOrgSolutions:5,scope:1,_activeSearchSortSettings:16,_isMobile:16,_canViewOrg:16,_translations:16}}static{this.styles=w}changeOwnerFilter(t){this.isOrgSolutions=!t,this._activeSearchSortSettings=this._activeSearchSortSettings.map(s=>s.scope===this.scope?{...s,settings:{...s.settings,isOrgSolutions:this.isOrgSolutions}}:s);let e={displayValue:this.isOrgSolutions?p.ORG:p.MINE,type:"owner",value:this.isOrgSolutions?"My organization's solutions":"My solutions"};this.searchChanged.emit({option:e,scope:this.scope})}changeSearchFilter(t,e,s){let i=this._activeSearchSortSettings.map(o=>o.scope===this.scope?{...o,settings:{...o.settings,searchTerm:t}}:o),r=JSON.stringify(this._activeSearchSortSettings)!==JSON.stringify(i);this._activeSearchSortSettings=i,e&&r&&this.searchChanged.emit({option:{searchTerm:t},scope:this.scope}),s&&(this._searchTelemetryTimer&&window.clearTimeout(this._searchTelemetryTimer),this._searchTelemetryTimer=window.setTimeout(()=>{this.searchChanged.emit({option:{searchTerm:t},scope:this.scope,logSearchTelemetry:!0})},1e3))}sortChanged(t,e){this._activeSearchSortSettings=this._activeSearchSortSettings.map(s=>s.scope===this.scope?{...s,settings:{...s.settings,sortType:t}}:s),e&&this.sortTypeChanged.emit({sortType:t,scope:this.scope})}async load(){this._isMobileContextConsumer.value&&(this._isMobile=this._isMobileContextConsumer.value)}render(){let t=this.scope==="all-solutions"||this.scope==="deployments"&&this._configContextConsumer.value?.authentication?.IsSignedIn,e=t?this._getCurrentScopeSetting():void 0,s=this.scope==="deployments"?this._translations.search.deployments:this._translations.search.solutions,i=this._isMobile?"padding-end-1-2":"";return t?a`<div class="flex-row toolbar-sizing"><calcite-input-text class="flex-grow-1" clearable icon=search .label=${s} @calciteInputTextChange=${r=>{let o=r.target;this.changeSearchFilter(o.value,!0,!1)}} @keyup=${r=>{let o=r.target;["Tab","Shift","Alt","Control","Meta","ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Escape"].includes(r.key)||(r.key==="Enter"?this.changeSearchFilter(o.value,!0,!1):(o.value.length>=3||o.value.length===0)&&this.changeSearchFilter(o.value,o.value.length>=3||o.value.length===0,!0))}} .placeholder=${s} scale=l slot=content-top .value=${e?.searchTerm}></calcite-input-text>${this._isMobile&&this.scope==="all-solutions"?a`<calcite-button appearance=transparent class=${`focus-color ${i}`} icon-start=filter kind=neutral .label=${this._translations.showFilters} @click=${this._toggleFilter}></calcite-button>`:""}${this.scope==="deployments"&&this._canViewOrg&&this._renderOwnerBlock()||""}${this._renderDropdown()}</div>`:""}_renderOwnerBlock(){return a`<calcite-dropdown width=m overlay-positioning=fixed><calcite-button appearance=transparent class="header-button-padding" .iconStart=${this.isOrgSolutions?"organization":"user"} kind=neutral .label=${this.isOrgSolutions?this._translations.myOrgSolutions:this._translations.mySolutions} slot=trigger>${this._isMobile?"":this.isOrgSolutions?this._translations.myOrgSolutions:this._translations.mySolutions}</calcite-button><calcite-dropdown-group group-title=${this._translations.filterBy??c}><calcite-dropdown-item icon-start=user @click=${t=>{t.detail!==0&&this.changeOwnerFilter(!0)}} @keydown=${t=>l(t,()=>this.changeOwnerFilter(!0))} .selected=${!this.isOrgSolutions}>${this._translations.mySolutions}</calcite-dropdown-item><calcite-dropdown-item icon-start=organization @click=${t=>{t.detail!==0&&this.changeOwnerFilter(!1)}} @keydown=${t=>l(t,()=>this.changeOwnerFilter(!1))} .selected=${this.isOrgSolutions}>${this._translations.myOrgSolutions}</calcite-dropdown-item></calcite-dropdown-group></calcite-dropdown>`}_renderDropdown(){let t=[];t=[{displayValue:this._translations.sortByRelevance,sortType:"relevance"},{displayValue:this._translations.sortByTitle,sortType:"title"}],this.scope==="deployments"?t.push({displayValue:this._translations.sortByDateDeployed,sortType:"created"}):(t.push({displayValue:this._translations.sortByNew,sortType:"new"}),t.push({displayValue:this._translations.sortByUpdated,sortType:"updated"}),this._configContextConsumer.value?.authentication?.IsSignedIn&&t.push({displayValue:this._translations.sortBySuggestedForYou,sortType:"suggested"}));let e=this._getCurrentScopeSetting();return a`<calcite-dropdown placement=bottom-end width=m><calcite-button appearance=transparent class="header-button-padding" icon-start=sort-descending kind=neutral .label=${e?.sortType?this._getString(e.sortType):this._translations.chooseSortType} slot=trigger>${this._isMobile?"":e?.sortType?this._getString(e.sortType):""}</calcite-button><calcite-dropdown-group group-title=${this._translations.chooseSortType??c}>${t.map(s=>this._getDropdownItem(s.displayValue,s.sortType))}</calcite-dropdown-group></calcite-dropdown>`}_getDropdownItem(t,e){let s=this._getCurrentScopeSetting();return s?.sortType&&s.sortType!==e?a`<calcite-dropdown-item @click=${i=>{i.detail!==0&&this.sortChanged(e,!0)}} @keydown=${i=>l(i,()=>this.sortChanged(e,!0))}>${t}</calcite-dropdown-item>`:a`<calcite-dropdown-item @click=${i=>{i.detail!==0&&this.sortChanged(e,!0)}} @keydown=${i=>l(i,()=>this.sortChanged(e,!0))} selected>${t}</calcite-dropdown-item>`}_getString(t){let e="";switch(t){case"new":e=this._translations.sortByNew;break;case"relevance":e=this._translations.sortByRelevance;break;case"suggested":e=this._translations.sortBySuggestedForYou;break;case"title":e=this._translations.sortByTitle;break;case"updated":e=this._translations.sortByUpdated;break;case"created":e=this._translations.sortByDateDeployed;break}return e}_getCurrentScopeSetting(){return this._activeSearchSortSettings?.filter(t=>t.scope===this.scope)?.[0]?.settings}_toggleFilter(){this.toggleFilter.emit()}_updateUrlParams(t){let e=t.detail,s;this._activeSearchSortSettings.some(i=>i.scope===e?(s=i,!0):!1),s&&this.updateUrlParams.emit(s)}};m("solutions-searchsort-toolbar",d);return d},b,d)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{a as m}from"./ONLHK7DM.js";import{a as h}from"./VVZAS55G.js";import{b as _}from"./57K3VUDO.js";import{b as d}from"./QMAV4UTN.js";import"./Y2AUIXNK.js";import{H as c,J as e,K as r,h as o,i as a,l as p,q as g}from"./T3EPRHTT.js";import"./EXBEKVP5.js";var u={CENTER:"center"},f=o`:host{--instant-apps-landing-page-background-color: var(--calcite-color-brand);--instant-apps-landing-page-text-color: var(--calcite-color-text-inverse);--instant-apps-landing-page-entry-button-color: var(--calcite-color-brand);--instant-apps-landing-page-title-text-font-size: var(--calcite-font-size-6);--instant-apps-landing-page-subtitle-text-font-size: var( --calcite-font-size-3 );--instant-apps-landing-page-description-text-font-size: var( --calcite-font-size-0 );--instant-apps-landing-page-icon-image-scale--s: 100px;--instant-apps-landing-page-icon-image-scale--m: 250px;--instant-apps-landing-page-icon-image-scale--l: 500px;--instant-apps-landing-page-entry-button-margin: 0}:host .instant-apps-landing-page,:host calcite-dialog{box-sizing:border-box;display:flex;flex-direction:column;flex:1;transition:top .5s ease-in-out;position:absolute;top:0;left:0;width:100%;height:100%;padding:60px;--calcite-dialog-background-color: var( --instant-apps-landing-page-background-color );--calcite-dialog-text-color: var(--instant-apps-landing-page-text-color);--calcite-color-text-2: var(--instant-apps-landing-page-text-color)}:host .instant-apps-landing-page__title-text,:host calcite-dialog__title-text{color:var(--instant-apps-landing-page-text-color);font-size:var(--instant-apps-landing-page-title-text-font-size);margin:10px 0}:host .instant-apps-landing-page__subtitle-text,:host calcite-dialog__subtitle-text{font-weight:var(--calcite-font-weight-medium);font-size:var(--instant-apps-landing-page-subtitle-text-font-size);margin:10px 0}:host .instant-apps-landing-page__description-text,:host calcite-dialog__description-text{font-size:var(--instant-apps-landing-page-description-text-font-size);width:50%;min-width:250px;margin-top:10px;color:var(--instant-apps-landing-page-text-color)}:host .instant-apps-landing-page__title-text,:host .instant-apps-landing-page__subtitle-text,:host calcite-dialog__title-text,:host calcite-dialog__subtitle-text{text-shadow:0px 4px 3px rgba(0,0,0,.4),0px 8px 13px rgba(0,0,0,.1),0px 18px 23px rgba(0,0,0,.1)}:host .instant-apps-landing-page__icon-image,:host calcite-dialog__icon-image{margin-bottom:10px}:host .instant-apps-landing-page__icon-image-scale--s,:host calcite-dialog__icon-image-scale--s{width:100px}:host .instant-apps-landing-page__icon-image-scale--m,:host calcite-dialog__icon-image-scale--m{width:250px}:host .instant-apps-landing-page__icon-image-scale--l,:host calcite-dialog__icon-image-scale--l{width:500px}:host .instant-apps-landing-page__button-container,:host calcite-dialog__button-container{display:flex;padding:20px 0}:host .instant-apps-landing-page__button-container .instant-apps-landing-page__entry-button,:host calcite-dialog__button-container .instant-apps-landing-page__entry-button{margin:var(--instant-apps-landing-page-entry-button-margin)}:host .instant-apps-landing-page__entry-button,:host calcite-dialog__entry-button{--calcite-color-brand: var( --instant-apps-landing-page-entry-button-color );--calcite-color-brand-hover: var( --instant-apps-landing-page-entry-button-color );--calcite-color-brand-press: var( --instant-apps-landing-page-entry-button-color )}:host .instant-apps-landing-page__background-action,:host calcite-dialog__background-action{position:absolute;top:1%;right:.5%;max-width:300px}:host .instant-apps-landing-page--rtl.instant-apps-landing-page__alignment--top-right .instant-apps-landing-page__content-container .instant-apps-landing-page__description-text,:host .instant-apps-landing-page--rtl.instant-apps-landing-page__alignment--center-right .instant-apps-landing-page__content-container .instant-apps-landing-page__description-text,:host .instant-apps-landing-page--rtl.instant-apps-landing-page__alignment--bottom-right .instant-apps-landing-page__content-container .instant-apps-landing-page__description-text{text-align:left}:host .instant-apps-landing-page--rtl.instant-apps-landing-page__alignment--top-left .instant-apps-landing-page__content-container .instant-apps-landing-page__description-text,:host .instant-apps-landing-page--rtl.instant-apps-landing-page__alignment--center-left .instant-apps-landing-page__content-container .instant-apps-landing-page__description-text,:host .instant-apps-landing-page--rtl.instant-apps-landing-page__alignment--bottom-left .instant-apps-landing-page__content-container .instant-apps-landing-page__description-text{text-align:right}:host .instant-apps-landing-page__remove-transition{transition:none}:host .instant-apps-landing-page__remove-padding{padding:0}:host .instant-apps-landing-page--closed-no-transition{display:none}:host .instant-apps-landing-page--closed{top:-100%}:host .instant-apps-landing-page__alignment--top-center{justify-content:flex-start;align-items:center}:host .instant-apps-landing-page__alignment--top-center .instant-apps-landing-page__content-container{display:flex;flex-direction:column;align-items:center;justify-content:center;overflow-y:auto}:host .instant-apps-landing-page__alignment--center{justify-content:center;align-items:center}:host .instant-apps-landing-page__alignment--center .instant-apps-landing-page__content-container{display:flex;flex-direction:column;align-items:center;overflow-y:auto}:host .instant-apps-landing-page__alignment--bottom-center{justify-content:flex-end;align-items:center}:host .instant-apps-landing-page__alignment--bottom-center .instant-apps-landing-page__content-container{display:flex;flex-direction:column;align-items:center;overflow-y:auto}:host .instant-apps-landing-page__alignment--top-left{justify-content:flex-start;align-items:flex-start}:host .instant-apps-landing-page__alignment--top-left .instant-apps-landing-page__content-container{display:flex;flex-direction:column;align-items:flex-start;overflow-y:auto}:host .instant-apps-landing-page__alignment--center-left{justify-content:center;align-items:flex-start}:host .instant-apps-landing-page__alignment--center-left .instant-apps-landing-page__content-container{display:flex;flex-direction:column;align-items:flex-start;overflow-y:auto}:host .instant-apps-landing-page__alignment--bottom-left{justify-content:flex-end;align-items:flex-start}:host .instant-apps-landing-page__alignment--bottom-left .instant-apps-landing-page__content-container{display:flex;flex-direction:column;align-items:flex-start;overflow-y:auto}:host .instant-apps-landing-page__alignment--top-right{justify-content:flex-start;align-items:flex-end}:host .instant-apps-landing-page__alignment--top-right .instant-apps-landing-page__content-container{display:flex;flex-direction:column;align-items:flex-end;overflow-y:auto}:host .instant-apps-landing-page__alignment--center-right{justify-content:center;align-items:flex-end}:host .instant-apps-landing-page__alignment--center-right .instant-apps-landing-page__content-container{display:flex;flex-direction:column;align-items:flex-end;overflow-y:auto}:host .instant-apps-landing-page__alignment--bottom-right{justify-content:flex-end;align-items:flex-end}:host .instant-apps-landing-page__alignment--bottom-right .instant-apps-landing-page__content-container{display:flex;flex-direction:column;align-items:flex-end;overflow-y:auto}:host .instant-apps-landing-page__alignment--top-left .instant-apps-landing-page__content-container .instant-apps-landing-page__title-text,:host .instant-apps-landing-page__alignment--top-left .instant-apps-landing-page__content-container .instant-apps-landing-page__subtitle-text,:host .instant-apps-landing-page__alignment--top-left .instant-apps-landing-page__content-container .instant-apps-landing-page__description-text{text-align:left}:host .instant-apps-landing-page__alignment--center-left .instant-apps-landing-page__content-container .instant-apps-landing-page__title-text,:host .instant-apps-landing-page__alignment--center-left .instant-apps-landing-page__content-container .instant-apps-landing-page__subtitle-text,:host .instant-apps-landing-page__alignment--center-left .instant-apps-landing-page__content-container .instant-apps-landing-page__description-text{text-align:left}:host .instant-apps-landing-page__alignment--bottom-left .instant-apps-landing-page__content-container .instant-apps-landing-page__title-text,:host .instant-apps-landing-page__alignment--bottom-left .instant-apps-landing-page__content-container .instant-apps-landing-page__subtitle-text,:host .instant-apps-landing-page__alignment--bottom-left .instant-apps-landing-page__content-container .instant-apps-landing-page__description-text{text-align:left}:host .instant-apps-landing-page__alignment--top-center .instant-apps-landing-page__content-container .instant-apps-landing-page__title-text,:host .instant-apps-landing-page__alignment--top-center .instant-apps-landing-page__content-container .instant-apps-landing-page__subtitle-text,:host .instant-apps-landing-page__alignment--top-center .instant-apps-landing-page__content-container .instant-apps-landing-page__description-text{text-align:center}:host .instant-apps-landing-page__alignment--center .instant-apps-landing-page__content-container .instant-apps-landing-page__title-text,:host .instant-apps-landing-page__alignment--center .instant-apps-landing-page__content-container .instant-apps-landing-page__subtitle-text,:host .instant-apps-landing-page__alignment--center .instant-apps-landing-page__content-container .instant-apps-landing-page__description-text{text-align:center}:host .instant-apps-landing-page__alignment--bottom-center .instant-apps-landing-page__content-container .instant-apps-landing-page__title-text,:host .instant-apps-landing-page__alignment--bottom-center .instant-apps-landing-page__content-container .instant-apps-landing-page__subtitle-text,:host .instant-apps-landing-page__alignment--bottom-center .instant-apps-landing-page__content-container .instant-apps-landing-page__description-text{text-align:center}:host .instant-apps-landing-page__alignment--top-right .instant-apps-landing-page__content-container .instant-apps-landing-page__title-text,:host .instant-apps-landing-page__alignment--top-right .instant-apps-landing-page__content-container .instant-apps-landing-page__subtitle-text,:host .instant-apps-landing-page__alignment--top-right .instant-apps-landing-page__content-container .instant-apps-landing-page__description-text{text-align:right}:host .instant-apps-landing-page__alignment--center-right .instant-apps-landing-page__content-container .instant-apps-landing-page__title-text,:host .instant-apps-landing-page__alignment--center-right .instant-apps-landing-page__content-container .instant-apps-landing-page__subtitle-text,:host .instant-apps-landing-page__alignment--center-right .instant-apps-landing-page__content-container .instant-apps-landing-page__description-text{text-align:right}:host .instant-apps-landing-page__alignment--bottom-right .instant-apps-landing-page__content-container .instant-apps-landing-page__title-text,:host .instant-apps-landing-page__alignment--bottom-right .instant-apps-landing-page__content-container .instant-apps-landing-page__subtitle-text,:host .instant-apps-landing-page__alignment--bottom-right .instant-apps-landing-page__content-container .instant-apps-landing-page__description-text{text-align:right}:host instant-apps-sign-in{width:50%}@media screen and (max-width:500px){:host instant-apps-sign-in{width:100%}}@media only screen and (max-width:768px){:host .instant-apps-landing-page__icon-image{max-width:70%;margin-bottom:20px}:host .instant-apps-landing-page__description-text{width:80%}:host .instant-apps-landing-page__title-text{font-size:var(--calcite-font-size-3)}:host .instant-apps-landing-page__subtitle-text{font-size:var(--calcite-font-size-0)}:host .instant-apps-landing-page__content-container{display:flex;flex-direction:column;align-items:center;margin-top:auto}:host .instant-apps-landing-page__button-container{display:flex;flex-direction:column;width:100%;margin-top:auto}:host .instant-apps-landing-page__button-container .instant-apps-landing-page__entry-button{width:100%;margin-right:unset;margin-bottom:10px}:host .instant-apps-landing-page instant-apps-sign-in{margin-bottom:auto}}@media only screen and (max-width:896px)and (orientation:landscape){:host .instant-apps-landing-page__icon-image{max-width:25%}}`,t={BASE:"instant-apps-landing-page",rtl:"instant-apps-landing-page--rtl",titleText:"instant-apps-landing-page__title-text",subtitleText:"instant-apps-landing-page__subtitle-text",descriptionText:"instant-apps-landing-page__description-text",iconImage:"instant-apps-landing-page__icon-image",alignment:"instant-apps-landing-page__alignment--",entryButton:"instant-apps-landing-page__entry-button",contentContainer:"instant-apps-landing-page__content-container",buttonContainer:"instant-apps-landing-page__button-container",backgroundAction:"instant-apps-landing-page__background-action",iconImageScale:{s:" instant-apps-landing-page__icon-image-scale--s",m:" instant-apps-landing-page__icon-image-scale--m",l:" instant-apps-landing-page__icon-image-scale--l"}},l=class extends c{constructor(){super(...arguments),this._sanitizer=new h({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"],header:["id","class","style","role"]}},!0),this._direction=d(),this.iconImageScale="m",this.alignment=u.CENTER,this.disableTransition=!0,this.open=!0,this.entryButtonScale="l",this.fontFamily="var(--calcite-sans-family);",this.landingPageClose=g(),this.landingPageOpen=g()}static{this.properties={titleText:1,subtitleText:1,descriptionText:1,entryButtonText:1,iconImage:1,iconImageScale:1,iconImageAltText:1,alignment:1,disableTransition:5,backgroundImageSrc:1,open:5,entryButtonScale:1,fontFamily:3,enableSignIn:5,portal:0,oauthappid:1}}static{this.styles=f}willUpdate(n){n.has("open")&&(this.hasUpdated||!this.open)&&(this.open?this.landingPageOpen.emit():this.landingPageClose.emit()),this.checkEnableSignIn()}closeLandingPage(){this.open=!1}getAlignmentClass(){return` ${t.alignment}${this.alignment}`}getIconImageScale(){let{iconImageScale:n}=this,{s:i,m:s,l:x}=t.iconImageScale;return n==="l"?x:n==="s"?i:s}getContentStyle(){let n=m(this.fontFamily);return this.backgroundImageSrc?{fontFamily:n,backgroundSize:"cover",backgroundImage:`url("${this.backgroundImageSrc}")`,backgroundRepeat:"no-repeat",backgroundPosition:"center"}:{fontFamily:n}}checkEnableSignIn(){if(this.enableSignIn){let n=localStorage.getItem("signing-in")?Number(localStorage.getItem("signing-in")):null;n!=null&&((Date.now()-n)/(60*1e3)<2&&(this.open=!1),localStorage.removeItem("signing-in"))}}render(){return this.renderLandingPageContent()}renderLandingPageContent(){let n=this.getAlignmentClass(),i=this._direction==="rtl"?` ${t.rtl}`:"",s=this.getContentStyle();return a`<calcite-dialog .open=${this.open} close-disabled placement=cover><div style=${r(s)} class=${`${t.BASE}${i}${n}`}><div class=${e(t.backgroundAction)}><slot name=background-action></slot></div><div class=${e(t.contentContainer)}>${this.renderIconImage()}${this.renderTitleText()}${this.renderSubtitleText()}${this.renderDescriptionText()}</div>${this.renderEntryButtonContainer()}</div></calcite-dialog>`}renderEntryButtonContainer(){return this.enableSignIn?this.renderLandingPageSignIn():a`<div class=${e(t.buttonContainer)}>${this.renderEntryButton()}<slot name=secondary-action></slot></div>`}renderLandingPageSignIn(){return a`<instant-apps-sign-in type=landingPage landing-page .portal=${this.portal} .oauthappid=${this.oauthappid} .closeLandingPage=${this.closeLandingPage.bind(this)}></instant-apps-sign-in>`}renderIconImage(){return this.iconImage?a`<img class=${`${t.iconImage}${this.getIconImageScale()}`} src=${this.iconImage??p} alt=${this.iconImageAltText??p}>`:null}renderTitleText(){return a`<h1 class=${e(t.titleText)}>${this.titleText}</h1>`}renderSubtitleText(){return a`<span class=${e(t.subtitleText)}>${this.subtitleText}</span>`}renderDescriptionText(){return a`<p class=${e(t.descriptionText)} .innerHTML=${this._sanitizer?.sanitize(this.descriptionText)??""??""}></p>`}renderEntryButton(){return a`<calcite-button class=${e(t.entryButton)} @click=${this.closeLandingPage} .scale=${this.entryButtonScale} appearance=outline-fill>${this.entryButtonText?this.entryButtonText:"Enter"}</calcite-button>`}};_("instant-apps-landing-page",l);export{l as InstantAppsLandingPage};
|
|
2
|
+
import{a as m}from"./ONLHK7DM.js";import{a as h}from"./VVZAS55G.js";import{b as _}from"./55UXOGN6.js";import{b as d}from"./QMAV4UTN.js";import"./Y2AUIXNK.js";import{H as c,J as e,K as r,h as o,i as a,l as p,q as g}from"./T3EPRHTT.js";import"./EXBEKVP5.js";var u={CENTER:"center"},f=o`:host{--instant-apps-landing-page-background-color: var(--calcite-color-brand);--instant-apps-landing-page-text-color: var(--calcite-color-text-inverse);--instant-apps-landing-page-entry-button-color: var(--calcite-color-brand);--instant-apps-landing-page-title-text-font-size: var(--calcite-font-size-6);--instant-apps-landing-page-subtitle-text-font-size: var( --calcite-font-size-3 );--instant-apps-landing-page-description-text-font-size: var( --calcite-font-size-0 );--instant-apps-landing-page-icon-image-scale--s: 100px;--instant-apps-landing-page-icon-image-scale--m: 250px;--instant-apps-landing-page-icon-image-scale--l: 500px;--instant-apps-landing-page-entry-button-margin: 0}:host .instant-apps-landing-page,:host calcite-dialog{box-sizing:border-box;display:flex;flex-direction:column;flex:1;transition:top .5s ease-in-out;position:absolute;top:0;left:0;width:100%;height:100%;padding:60px;--calcite-dialog-background-color: var( --instant-apps-landing-page-background-color );--calcite-dialog-text-color: var(--instant-apps-landing-page-text-color);--calcite-color-text-2: var(--instant-apps-landing-page-text-color)}:host .instant-apps-landing-page__title-text,:host calcite-dialog__title-text{color:var(--instant-apps-landing-page-text-color);font-size:var(--instant-apps-landing-page-title-text-font-size);margin:10px 0}:host .instant-apps-landing-page__subtitle-text,:host calcite-dialog__subtitle-text{font-weight:var(--calcite-font-weight-medium);font-size:var(--instant-apps-landing-page-subtitle-text-font-size);margin:10px 0}:host .instant-apps-landing-page__description-text,:host calcite-dialog__description-text{font-size:var(--instant-apps-landing-page-description-text-font-size);width:50%;min-width:250px;margin-top:10px;color:var(--instant-apps-landing-page-text-color)}:host .instant-apps-landing-page__title-text,:host .instant-apps-landing-page__subtitle-text,:host calcite-dialog__title-text,:host calcite-dialog__subtitle-text{text-shadow:0px 4px 3px rgba(0,0,0,.4),0px 8px 13px rgba(0,0,0,.1),0px 18px 23px rgba(0,0,0,.1)}:host .instant-apps-landing-page__icon-image,:host calcite-dialog__icon-image{margin-bottom:10px}:host .instant-apps-landing-page__icon-image-scale--s,:host calcite-dialog__icon-image-scale--s{width:100px}:host .instant-apps-landing-page__icon-image-scale--m,:host calcite-dialog__icon-image-scale--m{width:250px}:host .instant-apps-landing-page__icon-image-scale--l,:host calcite-dialog__icon-image-scale--l{width:500px}:host .instant-apps-landing-page__button-container,:host calcite-dialog__button-container{display:flex;padding:20px 0}:host .instant-apps-landing-page__button-container .instant-apps-landing-page__entry-button,:host calcite-dialog__button-container .instant-apps-landing-page__entry-button{margin:var(--instant-apps-landing-page-entry-button-margin)}:host .instant-apps-landing-page__entry-button,:host calcite-dialog__entry-button{--calcite-color-brand: var( --instant-apps-landing-page-entry-button-color );--calcite-color-brand-hover: var( --instant-apps-landing-page-entry-button-color );--calcite-color-brand-press: var( --instant-apps-landing-page-entry-button-color )}:host .instant-apps-landing-page__background-action,:host calcite-dialog__background-action{position:absolute;top:1%;right:.5%;max-width:300px}:host .instant-apps-landing-page--rtl.instant-apps-landing-page__alignment--top-right .instant-apps-landing-page__content-container .instant-apps-landing-page__description-text,:host .instant-apps-landing-page--rtl.instant-apps-landing-page__alignment--center-right .instant-apps-landing-page__content-container .instant-apps-landing-page__description-text,:host .instant-apps-landing-page--rtl.instant-apps-landing-page__alignment--bottom-right .instant-apps-landing-page__content-container .instant-apps-landing-page__description-text{text-align:left}:host .instant-apps-landing-page--rtl.instant-apps-landing-page__alignment--top-left .instant-apps-landing-page__content-container .instant-apps-landing-page__description-text,:host .instant-apps-landing-page--rtl.instant-apps-landing-page__alignment--center-left .instant-apps-landing-page__content-container .instant-apps-landing-page__description-text,:host .instant-apps-landing-page--rtl.instant-apps-landing-page__alignment--bottom-left .instant-apps-landing-page__content-container .instant-apps-landing-page__description-text{text-align:right}:host .instant-apps-landing-page__remove-transition{transition:none}:host .instant-apps-landing-page__remove-padding{padding:0}:host .instant-apps-landing-page--closed-no-transition{display:none}:host .instant-apps-landing-page--closed{top:-100%}:host .instant-apps-landing-page__alignment--top-center{justify-content:flex-start;align-items:center}:host .instant-apps-landing-page__alignment--top-center .instant-apps-landing-page__content-container{display:flex;flex-direction:column;align-items:center;justify-content:center;overflow-y:auto}:host .instant-apps-landing-page__alignment--center{justify-content:center;align-items:center}:host .instant-apps-landing-page__alignment--center .instant-apps-landing-page__content-container{display:flex;flex-direction:column;align-items:center;overflow-y:auto}:host .instant-apps-landing-page__alignment--bottom-center{justify-content:flex-end;align-items:center}:host .instant-apps-landing-page__alignment--bottom-center .instant-apps-landing-page__content-container{display:flex;flex-direction:column;align-items:center;overflow-y:auto}:host .instant-apps-landing-page__alignment--top-left{justify-content:flex-start;align-items:flex-start}:host .instant-apps-landing-page__alignment--top-left .instant-apps-landing-page__content-container{display:flex;flex-direction:column;align-items:flex-start;overflow-y:auto}:host .instant-apps-landing-page__alignment--center-left{justify-content:center;align-items:flex-start}:host .instant-apps-landing-page__alignment--center-left .instant-apps-landing-page__content-container{display:flex;flex-direction:column;align-items:flex-start;overflow-y:auto}:host .instant-apps-landing-page__alignment--bottom-left{justify-content:flex-end;align-items:flex-start}:host .instant-apps-landing-page__alignment--bottom-left .instant-apps-landing-page__content-container{display:flex;flex-direction:column;align-items:flex-start;overflow-y:auto}:host .instant-apps-landing-page__alignment--top-right{justify-content:flex-start;align-items:flex-end}:host .instant-apps-landing-page__alignment--top-right .instant-apps-landing-page__content-container{display:flex;flex-direction:column;align-items:flex-end;overflow-y:auto}:host .instant-apps-landing-page__alignment--center-right{justify-content:center;align-items:flex-end}:host .instant-apps-landing-page__alignment--center-right .instant-apps-landing-page__content-container{display:flex;flex-direction:column;align-items:flex-end;overflow-y:auto}:host .instant-apps-landing-page__alignment--bottom-right{justify-content:flex-end;align-items:flex-end}:host .instant-apps-landing-page__alignment--bottom-right .instant-apps-landing-page__content-container{display:flex;flex-direction:column;align-items:flex-end;overflow-y:auto}:host .instant-apps-landing-page__alignment--top-left .instant-apps-landing-page__content-container .instant-apps-landing-page__title-text,:host .instant-apps-landing-page__alignment--top-left .instant-apps-landing-page__content-container .instant-apps-landing-page__subtitle-text,:host .instant-apps-landing-page__alignment--top-left .instant-apps-landing-page__content-container .instant-apps-landing-page__description-text{text-align:left}:host .instant-apps-landing-page__alignment--center-left .instant-apps-landing-page__content-container .instant-apps-landing-page__title-text,:host .instant-apps-landing-page__alignment--center-left .instant-apps-landing-page__content-container .instant-apps-landing-page__subtitle-text,:host .instant-apps-landing-page__alignment--center-left .instant-apps-landing-page__content-container .instant-apps-landing-page__description-text{text-align:left}:host .instant-apps-landing-page__alignment--bottom-left .instant-apps-landing-page__content-container .instant-apps-landing-page__title-text,:host .instant-apps-landing-page__alignment--bottom-left .instant-apps-landing-page__content-container .instant-apps-landing-page__subtitle-text,:host .instant-apps-landing-page__alignment--bottom-left .instant-apps-landing-page__content-container .instant-apps-landing-page__description-text{text-align:left}:host .instant-apps-landing-page__alignment--top-center .instant-apps-landing-page__content-container .instant-apps-landing-page__title-text,:host .instant-apps-landing-page__alignment--top-center .instant-apps-landing-page__content-container .instant-apps-landing-page__subtitle-text,:host .instant-apps-landing-page__alignment--top-center .instant-apps-landing-page__content-container .instant-apps-landing-page__description-text{text-align:center}:host .instant-apps-landing-page__alignment--center .instant-apps-landing-page__content-container .instant-apps-landing-page__title-text,:host .instant-apps-landing-page__alignment--center .instant-apps-landing-page__content-container .instant-apps-landing-page__subtitle-text,:host .instant-apps-landing-page__alignment--center .instant-apps-landing-page__content-container .instant-apps-landing-page__description-text{text-align:center}:host .instant-apps-landing-page__alignment--bottom-center .instant-apps-landing-page__content-container .instant-apps-landing-page__title-text,:host .instant-apps-landing-page__alignment--bottom-center .instant-apps-landing-page__content-container .instant-apps-landing-page__subtitle-text,:host .instant-apps-landing-page__alignment--bottom-center .instant-apps-landing-page__content-container .instant-apps-landing-page__description-text{text-align:center}:host .instant-apps-landing-page__alignment--top-right .instant-apps-landing-page__content-container .instant-apps-landing-page__title-text,:host .instant-apps-landing-page__alignment--top-right .instant-apps-landing-page__content-container .instant-apps-landing-page__subtitle-text,:host .instant-apps-landing-page__alignment--top-right .instant-apps-landing-page__content-container .instant-apps-landing-page__description-text{text-align:right}:host .instant-apps-landing-page__alignment--center-right .instant-apps-landing-page__content-container .instant-apps-landing-page__title-text,:host .instant-apps-landing-page__alignment--center-right .instant-apps-landing-page__content-container .instant-apps-landing-page__subtitle-text,:host .instant-apps-landing-page__alignment--center-right .instant-apps-landing-page__content-container .instant-apps-landing-page__description-text{text-align:right}:host .instant-apps-landing-page__alignment--bottom-right .instant-apps-landing-page__content-container .instant-apps-landing-page__title-text,:host .instant-apps-landing-page__alignment--bottom-right .instant-apps-landing-page__content-container .instant-apps-landing-page__subtitle-text,:host .instant-apps-landing-page__alignment--bottom-right .instant-apps-landing-page__content-container .instant-apps-landing-page__description-text{text-align:right}:host instant-apps-sign-in{width:50%}@media screen and (max-width:500px){:host instant-apps-sign-in{width:100%}}@media only screen and (max-width:768px){:host .instant-apps-landing-page__icon-image{max-width:70%;margin-bottom:20px}:host .instant-apps-landing-page__description-text{width:80%}:host .instant-apps-landing-page__title-text{font-size:var(--calcite-font-size-3)}:host .instant-apps-landing-page__subtitle-text{font-size:var(--calcite-font-size-0)}:host .instant-apps-landing-page__content-container{display:flex;flex-direction:column;align-items:center;margin-top:auto}:host .instant-apps-landing-page__button-container{display:flex;flex-direction:column;width:100%;margin-top:auto}:host .instant-apps-landing-page__button-container .instant-apps-landing-page__entry-button{width:100%;margin-right:unset;margin-bottom:10px}:host .instant-apps-landing-page instant-apps-sign-in{margin-bottom:auto}}@media only screen and (max-width:896px)and (orientation:landscape){:host .instant-apps-landing-page__icon-image{max-width:25%}}`,t={BASE:"instant-apps-landing-page",rtl:"instant-apps-landing-page--rtl",titleText:"instant-apps-landing-page__title-text",subtitleText:"instant-apps-landing-page__subtitle-text",descriptionText:"instant-apps-landing-page__description-text",iconImage:"instant-apps-landing-page__icon-image",alignment:"instant-apps-landing-page__alignment--",entryButton:"instant-apps-landing-page__entry-button",contentContainer:"instant-apps-landing-page__content-container",buttonContainer:"instant-apps-landing-page__button-container",backgroundAction:"instant-apps-landing-page__background-action",iconImageScale:{s:" instant-apps-landing-page__icon-image-scale--s",m:" instant-apps-landing-page__icon-image-scale--m",l:" instant-apps-landing-page__icon-image-scale--l"}},l=class extends c{constructor(){super(...arguments),this._sanitizer=new h({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"],header:["id","class","style","role"]}},!0),this._direction=d(),this.iconImageScale="m",this.alignment=u.CENTER,this.disableTransition=!0,this.open=!0,this.entryButtonScale="l",this.fontFamily="var(--calcite-sans-family);",this.landingPageClose=g(),this.landingPageOpen=g()}static{this.properties={titleText:1,subtitleText:1,descriptionText:1,entryButtonText:1,iconImage:1,iconImageScale:1,iconImageAltText:1,alignment:1,disableTransition:5,backgroundImageSrc:1,open:5,entryButtonScale:1,fontFamily:3,enableSignIn:5,portal:0,oauthappid:1}}static{this.styles=f}willUpdate(n){n.has("open")&&(this.hasUpdated||!this.open)&&(this.open?this.landingPageOpen.emit():this.landingPageClose.emit()),this.checkEnableSignIn()}closeLandingPage(){this.open=!1}getAlignmentClass(){return` ${t.alignment}${this.alignment}`}getIconImageScale(){let{iconImageScale:n}=this,{s:i,m:s,l:x}=t.iconImageScale;return n==="l"?x:n==="s"?i:s}getContentStyle(){let n=m(this.fontFamily);return this.backgroundImageSrc?{fontFamily:n,backgroundSize:"cover",backgroundImage:`url("${this.backgroundImageSrc}")`,backgroundRepeat:"no-repeat",backgroundPosition:"center"}:{fontFamily:n}}checkEnableSignIn(){if(this.enableSignIn){let n=localStorage.getItem("signing-in")?Number(localStorage.getItem("signing-in")):null;n!=null&&((Date.now()-n)/(60*1e3)<2&&(this.open=!1),localStorage.removeItem("signing-in"))}}render(){return this.renderLandingPageContent()}renderLandingPageContent(){let n=this.getAlignmentClass(),i=this._direction==="rtl"?` ${t.rtl}`:"",s=this.getContentStyle();return a`<calcite-dialog .open=${this.open} close-disabled placement=cover><div style=${r(s)} class=${`${t.BASE}${i}${n}`}><div class=${e(t.backgroundAction)}><slot name=background-action></slot></div><div class=${e(t.contentContainer)}>${this.renderIconImage()}${this.renderTitleText()}${this.renderSubtitleText()}${this.renderDescriptionText()}</div>${this.renderEntryButtonContainer()}</div></calcite-dialog>`}renderEntryButtonContainer(){return this.enableSignIn?this.renderLandingPageSignIn():a`<div class=${e(t.buttonContainer)}>${this.renderEntryButton()}<slot name=secondary-action></slot></div>`}renderLandingPageSignIn(){return a`<instant-apps-sign-in type=landingPage landing-page .portal=${this.portal} .oauthappid=${this.oauthappid} .closeLandingPage=${this.closeLandingPage.bind(this)}></instant-apps-sign-in>`}renderIconImage(){return this.iconImage?a`<img class=${`${t.iconImage}${this.getIconImageScale()}`} src=${this.iconImage??p} alt=${this.iconImageAltText??p}>`:null}renderTitleText(){return a`<h1 class=${e(t.titleText)}>${this.titleText}</h1>`}renderSubtitleText(){return a`<span class=${e(t.subtitleText)}>${this.subtitleText}</span>`}renderDescriptionText(){return a`<p class=${e(t.descriptionText)} .innerHTML=${this._sanitizer?.sanitize(this.descriptionText)??""??""}></p>`}renderEntryButton(){return a`<calcite-button class=${e(t.entryButton)} @click=${this.closeLandingPage} .scale=${this.entryButtonScale} appearance=outline-fill>${this.entryButtonText?this.entryButtonText:"Enter"}</calcite-button>`}};_("instant-apps-landing-page",l);export{l as InstantAppsLandingPage};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import e from"./KGUELU4O.js";import d from"./3W7ANZME.js";import{a as Ne}from"./CJ3EZE7U.js";import c from"./SHQFXQEI.js";import{d as je}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 Ce,b as Ge,c as ue}from"./TCUNTTNI.js";import{a as N}from"./IADXB53D.js";import b from"./QZ2ZMWIH.js";import a from"./CS5N3DOL.js";import{a as Q}from"./YUWXPLTE.js";import{b as We}from"./57K3VUDO.js";import"./Y2AUIXNK.js";import{F as Ue,G as xe,H as qe,J as x,K as k,h as Be,i as L,j as Le,l as pe,u as De}from"./T3EPRHTT.js";import"./EXBEKVP5.js";export default $arcgis.t(([ct,vt,pt,U,fe,At,,{a:j,b:J,c:Je,d:he},{a:be,b:Ve,d:et,f:tt,g:we,h:it,i:nt,j:at},{a:rt,b:Ae,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 p=0;p<a.length;p++)t[p]!==a[p]&&(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=[],h=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},u=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},w=function(t){if(typeof t!="string")throw new Error("Style values must be strings")},$=function(t,i,a){if(i.vnodeSelector!==""){for(var c=a;c<t.length;c++)if(u(t[c],i))return c}return-1},S=function(t,i,a,c){var p=t[i];if(p.vnodeSelector!==""){var o=p.properties,C=o?o.key===void 0?o.bind:o.key:void 0;if(!C){for(var g=0;g<t.length;g++)if(g!==i){var f=t[g];if(u(f,p))throw Object.assign(new Error("".concat(a.vnodeSelector," had a ").concat(p.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:p})}}}},E=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))},A=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 q(t){return!B.includes(t)}var K=function(t,i,a){if(i){for(var c=a.eventHandlerInterceptor,p=Object.keys(i).filter(q),o=p.length,C=0;C<o;C++){var g=p[C],f=i[g];if(g==="className")throw new Error('Property "className" is not supported, use "class".');if(g==="class")se(t,f,!0);else if(g==="classes")for(var v=Object.keys(f),R=v.length,b=0;b<R;b++){var y=v[b];f[y]&&t.classList.add(y)}else if(g==="styles")for(var z=Object.keys(f),F=z.length,b=0;b<F;b++){var G=z[b],te=f[G];te&&(w(te),a.styleApplyer(t,G,te))}else if(g!=="key"&&f!==null&&f!==void 0){var ve=typeof f;ve==="function"?(g.lastIndexOf("on",0)===0&&c&&(f=c(g,f,t,i)),t[g]=f):a.namespace===l?g==="href"?t.setAttributeNS(r,g,f):t.setAttribute(g,f):ve==="string"&&g!=="value"&&g!=="innerHTML"?t.setAttribute(g,f):t[g]=f}}if(i.on)for(var ie=0,ge=Object.entries(i.on);ie<ge.length;ie++){var Y=ge[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,p=i;c<p.length;c++){var o=p[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 p,o,C=0,g=t.vnodeSelector,f=i.ownerDocument;if(g==="")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<=g.length;++v){var R=g.charAt(v);if(v===g.length||R==="."||R==="#"){var b=g.charAt(C-1),y=g.slice(C,v);b==="."?o.classList.add(y):b==="#"?o.id=y:(y==="svg"&&(c=h(c,{namespace:l})),c.namespace!==void 0?o=t.domNode=f.createElementNS(c.namespace,y):(o=t.domNode=t.domNode||(!((p=t.properties)===null||p===void 0)&&p.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)),C=v+1}}D(o,t,c)}},V,se=function(t,i,a){i&&i.split(" ").forEach(function(c){c&&t.classList.toggle(c,a)})},_e=function(t,i,a,c){if(a){for(var p=!1,o=Object.keys(a).filter(q),C=o.length,g=0;g<C;g++){var f=o[g],v=a[f],R=i[f];if(f==="class")R!==v&&(se(t,R,!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=!!R[G];te!==ve&&(p=!0,te?b.add(G):b.remove(G))}else if(f==="styles")for(var ie=Object.keys(v),ge=ie.length,F=0;F<ge;F++){var Y=ie[F],Z=v[Y],O=R[Y];Z!==O&&(p=!0,Z?(w(Z),c.styleApplyer(t,Y,Z)):c.styleApplyer(t,Y,""))}else if(!v&&typeof R=="string"&&(v=""),f==="value"){var ne=t[f];ne!==v&&v!==R&&(t[f]=v),v!==R&&(p=!0)}else if(v!==R){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),p=!0)}}return p}},bt=function(t,i,a,c,p){if(a===c)return!1;a=a||s,c=c||s;for(var o=a.length,C=c.length,g=0,f=0,v,R=!1;f<C;){var b=g<o?a[g]:void 0,y=c[f];if(b!==void 0&&u(b,y))R=V(b,y,p,i,a)||R,g++;else{var z=$(a,y,g+1);if(z>=0){for(v=g;v<z;v++)A(a[v]),S(a,v,t,"removed");R=V(a[z],y,p,i,a)||R,g=z+1}else W(y,i,g<o?a[g].domNode:void 0,p),E(y),S(c,f,t,"added")}f++}if(o>g)for(v=g;v<o;v++)A(a[v]),S(a,v,t,"removed");return R};V=function(t,i,a,c,p){var o=t.domNode,C=!1;if(t===i)return!1;var g=!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[p.indexOf(t)])}return i.domNode=f,C=!0,C}i.domNode=o}else i.vnodeSelector.lastIndexOf("svg",0)===0&&(a=h(a,{namespace:l})),t.text!==i.text&&(g=!0,i.text===void 0?o.removeChild(o.firstChild):o.textContent=i.text),i.domNode=o,g=bt(i,o,t.children,i.children,a)||g,g=_e(o,t.properties,i.properties,a)||g,i.properties&&i.properties.afterUpdate&&i.properties.afterUpdate.apply(i.properties.bind||i.properties,[o,a,i.vnodeSelector,i.properties,i.children]);return g&&i.properties&&i.properties.updateAnimation&&i.properties.updateAnimation(o,i.properties,t.properties),C};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}},wt={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 h(wt,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)}},$t=function(t){return{vnodeSelector:"",properties:void 0,children:void 0,text:t.toString(),domNode:null}},Me=function(t,i,a){for(var c=0,p=i.length;c<p;c++){var o=i[c];Array.isArray(o)?Me(t,o,a):o!=null&&o!==!1&&(typeof o=="string"&&(o=$t(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,p;return a&&a.length===1&&typeof a[0]=="string"?c=a[0]:a&&(p=[],Me(t,a,p),p.length===0&&(p=void 0)),{vnodeSelector:t,properties:i,children:p,text:c===""?void 0:c,domNode:null}}var Lt=function(t,i,a){var c=[],p=[];return{results:p,map:function(o){for(var C=o.map(t),g=p.slice(),f=0,v=0;v<o.length;v++){var R=o[v],b=C[v];if(b===c[f])p[v]=g[f],a(R,g[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){p[v]=g[F],a(o[v],g[F],v),f=F+1,y=!0;break}}y||(p[v]=i(R,v))}}p.length=o.length,c=C}}},xt=function(t,i){for(var a=[];t&&t!==i;)a.push(t),t=t.parentNode;return a},Ct=function(t,i){var a=t;return i.forEach(function(c){a=a&&a.children?a.children.find(function(p){return p.domNode===c}):void 0}),a},Et=function(t,i,a){return function(p,o,C,g){return c};function c(p){var o,C;a("domEvent",p);var g=i(),f=xt(p.currentTarget,g.domNode);f.reverse();var v=Ct(g.getLastRender(),f);t.scheduleRender();var R;if(v){var b=(C=(o=v.properties["on".concat(p.type)])!==null&&o!==void 0?o:v.properties.on[p.type].listener)!==null&&C!==void 0?C:v.properties.on[p.type];R=b.apply(v.properties.bind||this,arguments)}return a("domEventProcessed",p),R}},Rt=function(t){var i,a=ee(t),c=a.performanceLogger,p=!0,o,C=!1,g=[],f=[],v=function(b,y,z){var F,G=function(){return F};a.eventHandlerInterceptor=Et(i,G,c),F=b(y,z(),a),g.push(F),f.push(z)},R=function(){if(o=void 0,!!p){p=!1,c("renderStart",void 0);for(var b=0;b<g.length;b++){var y=f[b]();c("rendered",void 0),g[b].update(y),c("patched",void 0)}c("renderDone",void 0),p=!0}};return i={renderNow:R,scheduleRender:function(){!o&&!C&&(o=requestAnimationFrame(R))},stop:function(){o&&(cancelAnimationFrame(o),o=void 0),C=!0},resume:function(){C=!1,p=!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),g.splice(y,1)[0];throw new Error("renderFunction was not found")}},i};d.createCache=e,d.createMapping=Lt,d.createProjector=Rt,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))?Ae.AND:Ae.OR}async function dt(d,e,n,l,r){let{fLayerView:s}=d,h=kt(d,e,n,r),u=s?.filter?.timeExtent??s?.featureEffect?.filter?.timeExtent??null,{type:w}=l;if(ue(w))s.filter=new ct({where:h,timeExtent:u});else if(l.effect){let{includedEffect:$,excludedEffect:S}=l.effect,E=await oe(S,s,"excludedEffect"),_=await oe($,s,"includedEffect");s.featureEffect=new vt({filter:new ct({where:h,timeExtent:u}),includedEffect:_,excludedEffect:E})}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,h=await oe(s,l,"excludedEffect"),u=await oe(r,l,"includedEffect"),w=ut(l);l.featureEffect=new vt({filter:w,includedEffect:u,excludedEffect:h}),l.set(Ce.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","")),h=X(e.style.height?.replace("px","")),u=X(e.clientWidth),w=X(e.clientHeight);return Math.max(l,r,s,h,u,w)}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>${Le`<line x1=0 y1=2 x2=10 y2=2 style=${k(e)} />`}</svg>`:L`<svg height=10 width=10>${Le`<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:h}=r,u=re(h)+(n==="horizontal"?Pe:$e),w=r.preview.tagName.toLowerCase()==="div",$=w?r.preview:document.createElement("div");$&&($.className=ze.univariateAboveAndBelowSymbol),n==="horizontal"?$&&($.style.width=`${u}px`):$&&($.style.height=`${u}px`),w||$&&$.appendChild(r.preview),r.preview=$}})}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=pt.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,h=Math.floor(s.length/2),u=e==="full"||e==="above"?0:h,w=e==="full"||e==="below"?s.length-1:h;for(let $=u;$<=w;$++)if(n&&$===h)r+=l==="horizontal"?mt:Fe;else{let S=s[$].size,E=re(S)+(l==="horizontal"?Pe:$e);r+=E}return Math.round(r)}function Se(d,e,n,l="vertical"){let r=Gt(d,e,n,l),s=d.infos,h=Math.floor(s.length/2),u=e==="full"||e==="above"?0:h,w=e==="full"||e==="below"?s.length-1:h,$=e==="full"?s[u].size+s[w].size:e==="above"?s[u].size:s[w].size,S=n?l==="vertical"?Fe:mt:0,E=l==="vertical"?$e*(e==="full"?2:1):Pe*(e==="full"?2:1);return Math.round(r-(re($)/2+S/2+E/2))}function Jt(d,e,n="vertical"){let l=d.infos,r=l.find(h=>ye(h)),s=l.find(h=>de(h));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:Ce.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 At)}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),e.has("featureCount")&&e.get("featureCount")===!1&&this.featureCount&&this.legendvm&&this.refreshFeatureCount().catch(n=>{console.error(n)})}async loaded(){await this.initLegend()}disconnectedCallback(){super.disconnectedCallback(),this.handles?.removeAll(),this.handles?.destroy(),this.handles=null}async initLegend(){try{await U.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 u=>await u.load()),r=(await Promise.allSettled(l)).map(u=>u?.status==="fulfilled"&&u?.value?u.value:null).filter(u=>!!u),s=[];r.forEach(u=>{this.legendvm?.view&&s.push(this.legendvm.view.whenLayerView(u))}),await Promise.allSettled(s),await Promise.race([U.whenOnce(()=>(this.legendvm?.activeLayerInfos?.length??0)>0),new Promise(u=>{setTimeout(u,250)})]);let h=await we(this.legendvm);Object.keys(h).length===0&&(await new Promise(u=>{setTimeout(u,250)}),h=await we(this.legendvm)),J.set("data",{...j.data,...h}),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:h}=e,u=this.messages[s],w=typeof this.messages[h]=="string"?this.messages[h]:h;return`${u}: ${w}`}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(h=>{console.error(h)})}),s)}e?.forEach(r=>{let s=`fLayer-${r?.id}`;this.handles?.has(s)||this.handles?.add(U?.watch(()=>r?.visible,()=>this.handleFeatureLayerVisibilityChange(r)),s)}),this.handles?.add(U.when(()=>this.legendvm,()=>{U.watch(()=>this.legendvm?.view?.updating,()=>{this.legendvm?.view?.updating&&U.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(U.on(()=>this.legendvm?.activeLayerInfos,"change",r=>{this.regenerateData().then(()=>{this.handles?.add(U.on(()=>r.children,"change",()=>{this.regenerateData().catch(s=>{console.error(s)})}))}).catch(s=>{console.error(s)})})),this.handles?.add(U.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={...j.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 we(this.legendvm),n=at(e,j.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,j.data);if(e!==this.featureCountRequestId)return;J.set("data",{...j.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=${`${N(this.el)}${n}`} ${xe(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(h=>this.renderLegendForLayer(h,!0)).toArray();return L`<instant-apps-interactive-legend-group-legend-element class=${x(N(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,h)=>this.renderLegendForElement(s,e.layer,e.effectList,e,h)).filter(s=>!!s);return r.length?L`<instant-apps-interactive-legend-layer-element class=${x(N(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,h,u){let w=de(e),$=me(e),S=ye(e),E=null,_=Ne(r,e,s),T=Xe(e),M=Bt(this._legendContainerRef?.value?.clientWidth||this.el?.clientWidth);if(Ye(e)||S){let A=e.infos.some(q=>Ht(q,M)),B=e.infos.map((q,K)=>this.renderLegendForElementInfo(q,n,l,S,e,r,s,K,_,u)).filter(q=>!!q);B.length&&(E=L`<div class=${`${m.layerBody}${A?` ${m.layerBodyLargeSymbol}`:""}`}>${B}</div>`)}else if(de(e)||me(e)||Ee(e)||Re(e)){let A=e;E=this.renderLegendForRamp(A,n.opacity)}else if(T){let A=e;E=Q(Ke.RELATIONSHIP_RAMP,L`<instant-apps-interactive-legend-relationship class=${x(N(this.el))} .filterMode=${this.filterMode} .activeLayerInfo=${r} .legendElement=${A}></instant-apps-interactive-legend-relationship>`)}else if(Qe(e)){let A=e;E=this.renderPieChartRamp(A)}else if(Ze(e)){let A=e;E=this.renderUnivariateAboveAndBelowRamp(A,n.opacity,l)}else if(Oe(e)){let A=e;E=this.renderUnivariateColorSizeRamp(A,n.opacity,l)}if(!E)return null;let I=e.title,P=null;if(typeof I=="string")P=I;else if(I){let A=I,B=this.getTitle(A,w||$);this.isRendererTitle(w||$)?"title"in I&&(P=`${I.title} (${B})`):P=B}return L`<instant-apps-interactive-legend-legend-element class=${x(N(this.el))} .activeLayerInfo=${r} .isSizeRamp=${S} .isChild=${!!h} .isColorRamp=${w} .isRelationshipRamp=${T} .isInteractive=${_} .zoomTo=${this.zoomTo} .legendElement=${e} .titleText=${P} .legendvm=${this.legendvm} .legendElementIndex=${s}><div slot=content>${E}</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 h=Se(r,"above",!0),u=Se(r,"below",!0),w=12,$=ke(s,{width:w,height:h,rampAlignment:"vertical",opacity:n,type:"above",effectList:l}),S=ke(s,{width:w,height:u,rampAlignment:"vertical",opacity:n,type:"below",effectList:l}),E=ot(r),_=r.infos.map(H=>H.label),T=_.map((H,D)=>D===0?L`<div class=${x(H?$?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?$?m.univariateAboveAndBelowLabel:m.rampLabel:"")}>${H}</div>`:null),A={display:"table-cell",verticalAlign:"middle"},B={marginTop:`${E}px`},q={height:`${h}px`},K={height:`${u}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(A)} .innerHTML=${H?.preview?.outerHTML??""??""}></div>${!$&&D%2===0?L`<div class=${x(m.layerInfo)}>${_[D]}</div>`:null}</div>`)}</div>${$?Q("color-ramp-preview",L`<div style=${k(B)}><div style=${k(Ie)}><div style=${k(ae)}><div class=${x(m.rampContainer)}>${$}</div></div><div style=${k(ae)}><div class=${x(m.rampLabelsContainer)} style=${k(q)}>${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 h=ot(r),u=12,w=Se(r,"full",!1),$=ke(s,{width:u,height:w,rampAlignment:"vertical",opacity:n,type:"full",effectList:l}),S=r.infos.length-1,E=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:`${h}px`},M={height:`${w}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)}>${$}</div></div><div style=${k(ae)}><div class=${x(m.rampLabelsContainer)} style=${k(M)}>${E}</div></div></div></div>`)}</div>`)}renderLegendForRamp(e,n){let l=e.infos,r=me(e),s=Ee(e),h=Re(e),u=e.preview,w=r?m.opacityRamp:"";u&&(u.classList.add(m.colorRamp),w&&u.classList.add(w)),n!=null&&u&&(u.style.opacity=n.toString());let $=l.map(_=>{let T;if(s){let M=this.messages[_.label];T=typeof M=="string"?M:_.label}else h?T="value"in _?this.getStretchStopLabel(_):_.label:T=_.label;return L`<div class=${x(_.label?m.rampLabel:"")}>${T}</div>`}),S={width:`${Xt}px`},E={height:u?.style?.height};return L`<div class=${x(m.layerRow)}><div class=${x(m.symbolContainer)} style=${k({...S})}><div class=${x(m.rampContainer)} ${xe(_=>{_?.firstChild&&_?.firstChild?.remove(),_?.appendChild(u)})}></div></div><div class=${x(m.layerInfo)}><div class=${x(m.rampLabelsContainer)} style=${k({...E})}>${$}</div></div></div>`}renderLegendForElementInfo(e,n,l,r,s,h,u,w,$,S){if("infos"in e)return this.renderLegendForElement(e,n,l,h,u,!0,e);let E=null,_=!this.isImageryStretchedLegend(n,s.type);if("preview"in e){let{outerHTML:W}=e.preview;E=L`<div class=${x(m.symbol)} .innerHTML=${W??""}></div>`}else"src"in e&&(E=this.renderImage(e,n,_));if(!E)return null;let T=_?` ${m.imageryLayerInfoStretched}`:"",M=!_&&r?` ${m.sizeRamp}`:"",I,P=Je(n),A=tt(P,S);if(j.data){let W=et(P,n,e,A,w),V=A?A?.nestedInfos:P,se=je(V),_e=!!h?.children?.length||!!A;I=P?.categories?.size===1&&!_e?!W?.selected:se||W?.selected}let B="label"in e?e.label:null,q=A&&!("value"in e)?!1:$,K=J.get("compact"),H=this.getTitle(B,!1)||"",D=A?s.title:B??n?.id;return q?L`<button @click=${this.applyFilter(e,n,w,S)} class=${`${m.layerRow} ${m.interactiveLayerRow}${I?` ${m.infoSelected}`:""}`} title=${(K?`${H}`:void 0)??pe} .ariaPressed=${I?"true":"false"}><div class=${`${m.symbolContainer}${T}${M}`}>${E}</div><div class=${`${m.layerInfo}${T}`}>${this.getTitle(B,!1)||""}</div>${this.featureCount&&!K?L`<instant-apps-interactive-legend-count class=${x(N(this.el))} .categoryId=${D} .activeLayerInfo=${h} .legendvm=${this.legendvm} .selected=${!!I} .legendElement=${s} .infoIndex=${w}></instant-apps-interactive-legend-count>`:null}</button>`:L`<div class=${x(m.layerRow)}><div class=${`${m.symbolContainer}${T}${M}`}>${E}</div><div class=${`${m.layerInfo}${T}`}>${H}</div></div>`}renderImage(e,n,l){let{label:r,src:s,opacity:h}=e,u=l?` ${m.imageryLayerStretchedImage}`:"",w=l?"":` ${m.symbol}`,$={opacity:`${h??n.opacity}`};return L`<img alt=${this.getTitle(r,!1)??pe} src=${s??pe} width=${e.width} height=${e.height} class=${`$${u}${w}`} style=${k($)}>`}};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 d from"./3W7ANZME.js";import{a as Ne}from"./CJ3EZE7U.js";import c from"./SHQFXQEI.js";import{d as je}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 Ce,b as Ge,c as ue}from"./TCUNTTNI.js";import{a as N}from"./IADXB53D.js";import b from"./QZ2ZMWIH.js";import a from"./CS5N3DOL.js";import{a as Q}from"./YUWXPLTE.js";import{b as We}from"./55UXOGN6.js";import"./Y2AUIXNK.js";import{F as Ue,G as xe,H as qe,J as x,K as k,h as Be,i as L,j as Le,l as pe,u as De}from"./T3EPRHTT.js";import"./EXBEKVP5.js";export default $arcgis.t(([ct,vt,pt,U,fe,At,,{a:j,b:J,c:Je,d:he},{a:be,b:Ve,d:et,f:tt,g:we,h:it,i:nt,j:at},{a:rt,b:Ae,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 p=0;p<a.length;p++)t[p]!==a[p]&&(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=[],h=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},u=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},w=function(t){if(typeof t!="string")throw new Error("Style values must be strings")},$=function(t,i,a){if(i.vnodeSelector!==""){for(var c=a;c<t.length;c++)if(u(t[c],i))return c}return-1},S=function(t,i,a,c){var p=t[i];if(p.vnodeSelector!==""){var o=p.properties,C=o?o.key===void 0?o.bind:o.key:void 0;if(!C){for(var g=0;g<t.length;g++)if(g!==i){var f=t[g];if(u(f,p))throw Object.assign(new Error("".concat(a.vnodeSelector," had a ").concat(p.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:p})}}}},E=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))},A=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 q(t){return!B.includes(t)}var K=function(t,i,a){if(i){for(var c=a.eventHandlerInterceptor,p=Object.keys(i).filter(q),o=p.length,C=0;C<o;C++){var g=p[C],f=i[g];if(g==="className")throw new Error('Property "className" is not supported, use "class".');if(g==="class")se(t,f,!0);else if(g==="classes")for(var v=Object.keys(f),R=v.length,b=0;b<R;b++){var y=v[b];f[y]&&t.classList.add(y)}else if(g==="styles")for(var z=Object.keys(f),F=z.length,b=0;b<F;b++){var G=z[b],te=f[G];te&&(w(te),a.styleApplyer(t,G,te))}else if(g!=="key"&&f!==null&&f!==void 0){var ve=typeof f;ve==="function"?(g.lastIndexOf("on",0)===0&&c&&(f=c(g,f,t,i)),t[g]=f):a.namespace===l?g==="href"?t.setAttributeNS(r,g,f):t.setAttribute(g,f):ve==="string"&&g!=="value"&&g!=="innerHTML"?t.setAttribute(g,f):t[g]=f}}if(i.on)for(var ie=0,ge=Object.entries(i.on);ie<ge.length;ie++){var Y=ge[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,p=i;c<p.length;c++){var o=p[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 p,o,C=0,g=t.vnodeSelector,f=i.ownerDocument;if(g==="")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<=g.length;++v){var R=g.charAt(v);if(v===g.length||R==="."||R==="#"){var b=g.charAt(C-1),y=g.slice(C,v);b==="."?o.classList.add(y):b==="#"?o.id=y:(y==="svg"&&(c=h(c,{namespace:l})),c.namespace!==void 0?o=t.domNode=f.createElementNS(c.namespace,y):(o=t.domNode=t.domNode||(!((p=t.properties)===null||p===void 0)&&p.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)),C=v+1}}D(o,t,c)}},V,se=function(t,i,a){i&&i.split(" ").forEach(function(c){c&&t.classList.toggle(c,a)})},_e=function(t,i,a,c){if(a){for(var p=!1,o=Object.keys(a).filter(q),C=o.length,g=0;g<C;g++){var f=o[g],v=a[f],R=i[f];if(f==="class")R!==v&&(se(t,R,!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=!!R[G];te!==ve&&(p=!0,te?b.add(G):b.remove(G))}else if(f==="styles")for(var ie=Object.keys(v),ge=ie.length,F=0;F<ge;F++){var Y=ie[F],Z=v[Y],O=R[Y];Z!==O&&(p=!0,Z?(w(Z),c.styleApplyer(t,Y,Z)):c.styleApplyer(t,Y,""))}else if(!v&&typeof R=="string"&&(v=""),f==="value"){var ne=t[f];ne!==v&&v!==R&&(t[f]=v),v!==R&&(p=!0)}else if(v!==R){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),p=!0)}}return p}},bt=function(t,i,a,c,p){if(a===c)return!1;a=a||s,c=c||s;for(var o=a.length,C=c.length,g=0,f=0,v,R=!1;f<C;){var b=g<o?a[g]:void 0,y=c[f];if(b!==void 0&&u(b,y))R=V(b,y,p,i,a)||R,g++;else{var z=$(a,y,g+1);if(z>=0){for(v=g;v<z;v++)A(a[v]),S(a,v,t,"removed");R=V(a[z],y,p,i,a)||R,g=z+1}else W(y,i,g<o?a[g].domNode:void 0,p),E(y),S(c,f,t,"added")}f++}if(o>g)for(v=g;v<o;v++)A(a[v]),S(a,v,t,"removed");return R};V=function(t,i,a,c,p){var o=t.domNode,C=!1;if(t===i)return!1;var g=!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[p.indexOf(t)])}return i.domNode=f,C=!0,C}i.domNode=o}else i.vnodeSelector.lastIndexOf("svg",0)===0&&(a=h(a,{namespace:l})),t.text!==i.text&&(g=!0,i.text===void 0?o.removeChild(o.firstChild):o.textContent=i.text),i.domNode=o,g=bt(i,o,t.children,i.children,a)||g,g=_e(o,t.properties,i.properties,a)||g,i.properties&&i.properties.afterUpdate&&i.properties.afterUpdate.apply(i.properties.bind||i.properties,[o,a,i.vnodeSelector,i.properties,i.children]);return g&&i.properties&&i.properties.updateAnimation&&i.properties.updateAnimation(o,i.properties,t.properties),C};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}},wt={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 h(wt,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)}},$t=function(t){return{vnodeSelector:"",properties:void 0,children:void 0,text:t.toString(),domNode:null}},Me=function(t,i,a){for(var c=0,p=i.length;c<p;c++){var o=i[c];Array.isArray(o)?Me(t,o,a):o!=null&&o!==!1&&(typeof o=="string"&&(o=$t(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,p;return a&&a.length===1&&typeof a[0]=="string"?c=a[0]:a&&(p=[],Me(t,a,p),p.length===0&&(p=void 0)),{vnodeSelector:t,properties:i,children:p,text:c===""?void 0:c,domNode:null}}var Lt=function(t,i,a){var c=[],p=[];return{results:p,map:function(o){for(var C=o.map(t),g=p.slice(),f=0,v=0;v<o.length;v++){var R=o[v],b=C[v];if(b===c[f])p[v]=g[f],a(R,g[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){p[v]=g[F],a(o[v],g[F],v),f=F+1,y=!0;break}}y||(p[v]=i(R,v))}}p.length=o.length,c=C}}},xt=function(t,i){for(var a=[];t&&t!==i;)a.push(t),t=t.parentNode;return a},Ct=function(t,i){var a=t;return i.forEach(function(c){a=a&&a.children?a.children.find(function(p){return p.domNode===c}):void 0}),a},Et=function(t,i,a){return function(p,o,C,g){return c};function c(p){var o,C;a("domEvent",p);var g=i(),f=xt(p.currentTarget,g.domNode);f.reverse();var v=Ct(g.getLastRender(),f);t.scheduleRender();var R;if(v){var b=(C=(o=v.properties["on".concat(p.type)])!==null&&o!==void 0?o:v.properties.on[p.type].listener)!==null&&C!==void 0?C:v.properties.on[p.type];R=b.apply(v.properties.bind||this,arguments)}return a("domEventProcessed",p),R}},Rt=function(t){var i,a=ee(t),c=a.performanceLogger,p=!0,o,C=!1,g=[],f=[],v=function(b,y,z){var F,G=function(){return F};a.eventHandlerInterceptor=Et(i,G,c),F=b(y,z(),a),g.push(F),f.push(z)},R=function(){if(o=void 0,!!p){p=!1,c("renderStart",void 0);for(var b=0;b<g.length;b++){var y=f[b]();c("rendered",void 0),g[b].update(y),c("patched",void 0)}c("renderDone",void 0),p=!0}};return i={renderNow:R,scheduleRender:function(){!o&&!C&&(o=requestAnimationFrame(R))},stop:function(){o&&(cancelAnimationFrame(o),o=void 0),C=!0},resume:function(){C=!1,p=!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),g.splice(y,1)[0];throw new Error("renderFunction was not found")}},i};d.createCache=e,d.createMapping=Lt,d.createProjector=Rt,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))?Ae.AND:Ae.OR}async function dt(d,e,n,l,r){let{fLayerView:s}=d,h=kt(d,e,n,r),u=s?.filter?.timeExtent??s?.featureEffect?.filter?.timeExtent??null,{type:w}=l;if(ue(w))s.filter=new ct({where:h,timeExtent:u});else if(l.effect){let{includedEffect:$,excludedEffect:S}=l.effect,E=await oe(S,s,"excludedEffect"),_=await oe($,s,"includedEffect");s.featureEffect=new vt({filter:new ct({where:h,timeExtent:u}),includedEffect:_,excludedEffect:E})}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,h=await oe(s,l,"excludedEffect"),u=await oe(r,l,"includedEffect"),w=ut(l);l.featureEffect=new vt({filter:w,includedEffect:u,excludedEffect:h}),l.set(Ce.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","")),h=X(e.style.height?.replace("px","")),u=X(e.clientWidth),w=X(e.clientHeight);return Math.max(l,r,s,h,u,w)}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>${Le`<line x1=0 y1=2 x2=10 y2=2 style=${k(e)} />`}</svg>`:L`<svg height=10 width=10>${Le`<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:h}=r,u=re(h)+(n==="horizontal"?Pe:$e),w=r.preview.tagName.toLowerCase()==="div",$=w?r.preview:document.createElement("div");$&&($.className=ze.univariateAboveAndBelowSymbol),n==="horizontal"?$&&($.style.width=`${u}px`):$&&($.style.height=`${u}px`),w||$&&$.appendChild(r.preview),r.preview=$}})}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=pt.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,h=Math.floor(s.length/2),u=e==="full"||e==="above"?0:h,w=e==="full"||e==="below"?s.length-1:h;for(let $=u;$<=w;$++)if(n&&$===h)r+=l==="horizontal"?mt:Fe;else{let S=s[$].size,E=re(S)+(l==="horizontal"?Pe:$e);r+=E}return Math.round(r)}function Se(d,e,n,l="vertical"){let r=Gt(d,e,n,l),s=d.infos,h=Math.floor(s.length/2),u=e==="full"||e==="above"?0:h,w=e==="full"||e==="below"?s.length-1:h,$=e==="full"?s[u].size+s[w].size:e==="above"?s[u].size:s[w].size,S=n?l==="vertical"?Fe:mt:0,E=l==="vertical"?$e*(e==="full"?2:1):Pe*(e==="full"?2:1);return Math.round(r-(re($)/2+S/2+E/2))}function Jt(d,e,n="vertical"){let l=d.infos,r=l.find(h=>ye(h)),s=l.find(h=>de(h));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:Ce.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 At)}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),e.has("featureCount")&&e.get("featureCount")===!1&&this.featureCount&&this.legendvm&&this.refreshFeatureCount().catch(n=>{console.error(n)})}async loaded(){await this.initLegend()}disconnectedCallback(){super.disconnectedCallback(),this.handles?.removeAll(),this.handles?.destroy(),this.handles=null}async initLegend(){try{await U.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 u=>await u.load()),r=(await Promise.allSettled(l)).map(u=>u?.status==="fulfilled"&&u?.value?u.value:null).filter(u=>!!u),s=[];r.forEach(u=>{this.legendvm?.view&&s.push(this.legendvm.view.whenLayerView(u))}),await Promise.allSettled(s),await Promise.race([U.whenOnce(()=>(this.legendvm?.activeLayerInfos?.length??0)>0),new Promise(u=>{setTimeout(u,250)})]);let h=await we(this.legendvm);Object.keys(h).length===0&&(await new Promise(u=>{setTimeout(u,250)}),h=await we(this.legendvm)),J.set("data",{...j.data,...h}),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:h}=e,u=this.messages[s],w=typeof this.messages[h]=="string"?this.messages[h]:h;return`${u}: ${w}`}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(h=>{console.error(h)})}),s)}e?.forEach(r=>{let s=`fLayer-${r?.id}`;this.handles?.has(s)||this.handles?.add(U?.watch(()=>r?.visible,()=>this.handleFeatureLayerVisibilityChange(r)),s)}),this.handles?.add(U.when(()=>this.legendvm,()=>{U.watch(()=>this.legendvm?.view?.updating,()=>{this.legendvm?.view?.updating&&U.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(U.on(()=>this.legendvm?.activeLayerInfos,"change",r=>{this.regenerateData().then(()=>{this.handles?.add(U.on(()=>r.children,"change",()=>{this.regenerateData().catch(s=>{console.error(s)})}))}).catch(s=>{console.error(s)})})),this.handles?.add(U.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={...j.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 we(this.legendvm),n=at(e,j.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,j.data);if(e!==this.featureCountRequestId)return;J.set("data",{...j.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=${`${N(this.el)}${n}`} ${xe(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(h=>this.renderLegendForLayer(h,!0)).toArray();return L`<instant-apps-interactive-legend-group-legend-element class=${x(N(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,h)=>this.renderLegendForElement(s,e.layer,e.effectList,e,h)).filter(s=>!!s);return r.length?L`<instant-apps-interactive-legend-layer-element class=${x(N(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,h,u){let w=de(e),$=me(e),S=ye(e),E=null,_=Ne(r,e,s),T=Xe(e),M=Bt(this._legendContainerRef?.value?.clientWidth||this.el?.clientWidth);if(Ye(e)||S){let A=e.infos.some(q=>Ht(q,M)),B=e.infos.map((q,K)=>this.renderLegendForElementInfo(q,n,l,S,e,r,s,K,_,u)).filter(q=>!!q);B.length&&(E=L`<div class=${`${m.layerBody}${A?` ${m.layerBodyLargeSymbol}`:""}`}>${B}</div>`)}else if(de(e)||me(e)||Ee(e)||Re(e)){let A=e;E=this.renderLegendForRamp(A,n.opacity)}else if(T){let A=e;E=Q(Ke.RELATIONSHIP_RAMP,L`<instant-apps-interactive-legend-relationship class=${x(N(this.el))} .filterMode=${this.filterMode} .activeLayerInfo=${r} .legendElement=${A}></instant-apps-interactive-legend-relationship>`)}else if(Qe(e)){let A=e;E=this.renderPieChartRamp(A)}else if(Ze(e)){let A=e;E=this.renderUnivariateAboveAndBelowRamp(A,n.opacity,l)}else if(Oe(e)){let A=e;E=this.renderUnivariateColorSizeRamp(A,n.opacity,l)}if(!E)return null;let I=e.title,P=null;if(typeof I=="string")P=I;else if(I){let A=I,B=this.getTitle(A,w||$);this.isRendererTitle(w||$)?"title"in I&&(P=`${I.title} (${B})`):P=B}return L`<instant-apps-interactive-legend-legend-element class=${x(N(this.el))} .activeLayerInfo=${r} .isSizeRamp=${S} .isChild=${!!h} .isColorRamp=${w} .isRelationshipRamp=${T} .isInteractive=${_} .zoomTo=${this.zoomTo} .legendElement=${e} .titleText=${P} .legendvm=${this.legendvm} .legendElementIndex=${s}><div slot=content>${E}</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 h=Se(r,"above",!0),u=Se(r,"below",!0),w=12,$=ke(s,{width:w,height:h,rampAlignment:"vertical",opacity:n,type:"above",effectList:l}),S=ke(s,{width:w,height:u,rampAlignment:"vertical",opacity:n,type:"below",effectList:l}),E=ot(r),_=r.infos.map(H=>H.label),T=_.map((H,D)=>D===0?L`<div class=${x(H?$?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?$?m.univariateAboveAndBelowLabel:m.rampLabel:"")}>${H}</div>`:null),A={display:"table-cell",verticalAlign:"middle"},B={marginTop:`${E}px`},q={height:`${h}px`},K={height:`${u}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(A)} .innerHTML=${H?.preview?.outerHTML??""??""}></div>${!$&&D%2===0?L`<div class=${x(m.layerInfo)}>${_[D]}</div>`:null}</div>`)}</div>${$?Q("color-ramp-preview",L`<div style=${k(B)}><div style=${k(Ie)}><div style=${k(ae)}><div class=${x(m.rampContainer)}>${$}</div></div><div style=${k(ae)}><div class=${x(m.rampLabelsContainer)} style=${k(q)}>${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 h=ot(r),u=12,w=Se(r,"full",!1),$=ke(s,{width:u,height:w,rampAlignment:"vertical",opacity:n,type:"full",effectList:l}),S=r.infos.length-1,E=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:`${h}px`},M={height:`${w}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)}>${$}</div></div><div style=${k(ae)}><div class=${x(m.rampLabelsContainer)} style=${k(M)}>${E}</div></div></div></div>`)}</div>`)}renderLegendForRamp(e,n){let l=e.infos,r=me(e),s=Ee(e),h=Re(e),u=e.preview,w=r?m.opacityRamp:"";u&&(u.classList.add(m.colorRamp),w&&u.classList.add(w)),n!=null&&u&&(u.style.opacity=n.toString());let $=l.map(_=>{let T;if(s){let M=this.messages[_.label];T=typeof M=="string"?M:_.label}else h?T="value"in _?this.getStretchStopLabel(_):_.label:T=_.label;return L`<div class=${x(_.label?m.rampLabel:"")}>${T}</div>`}),S={width:`${Xt}px`},E={height:u?.style?.height};return L`<div class=${x(m.layerRow)}><div class=${x(m.symbolContainer)} style=${k({...S})}><div class=${x(m.rampContainer)} ${xe(_=>{_?.firstChild&&_?.firstChild?.remove(),_?.appendChild(u)})}></div></div><div class=${x(m.layerInfo)}><div class=${x(m.rampLabelsContainer)} style=${k({...E})}>${$}</div></div></div>`}renderLegendForElementInfo(e,n,l,r,s,h,u,w,$,S){if("infos"in e)return this.renderLegendForElement(e,n,l,h,u,!0,e);let E=null,_=!this.isImageryStretchedLegend(n,s.type);if("preview"in e){let{outerHTML:W}=e.preview;E=L`<div class=${x(m.symbol)} .innerHTML=${W??""}></div>`}else"src"in e&&(E=this.renderImage(e,n,_));if(!E)return null;let T=_?` ${m.imageryLayerInfoStretched}`:"",M=!_&&r?` ${m.sizeRamp}`:"",I,P=Je(n),A=tt(P,S);if(j.data){let W=et(P,n,e,A,w),V=A?A?.nestedInfos:P,se=je(V),_e=!!h?.children?.length||!!A;I=P?.categories?.size===1&&!_e?!W?.selected:se||W?.selected}let B="label"in e?e.label:null,q=A&&!("value"in e)?!1:$,K=J.get("compact"),H=this.getTitle(B,!1)||"",D=A?s.title:B??n?.id;return q?L`<button @click=${this.applyFilter(e,n,w,S)} class=${`${m.layerRow} ${m.interactiveLayerRow}${I?` ${m.infoSelected}`:""}`} title=${(K?`${H}`:void 0)??pe} .ariaPressed=${I?"true":"false"}><div class=${`${m.symbolContainer}${T}${M}`}>${E}</div><div class=${`${m.layerInfo}${T}`}>${this.getTitle(B,!1)||""}</div>${this.featureCount&&!K?L`<instant-apps-interactive-legend-count class=${x(N(this.el))} .categoryId=${D} .activeLayerInfo=${h} .legendvm=${this.legendvm} .selected=${!!I} .legendElement=${s} .infoIndex=${w}></instant-apps-interactive-legend-count>`:null}</button>`:L`<div class=${x(m.layerRow)}><div class=${`${m.symbolContainer}${T}${M}`}>${E}</div><div class=${`${m.layerInfo}${T}`}>${H}</div></div>`}renderImage(e,n,l){let{label:r,src:s,opacity:h}=e,u=l?` ${m.imageryLayerStretchedImage}`:"",w=l?"":` ${m.symbol}`,$={opacity:`${h??n.opacity}`};return L`<img alt=${this.getTitle(r,!1)??pe} src=${s??pe} width=${e.width} height=${e.height} class=${`$${u}${w}`} style=${k($)}>`}};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 c from"./2C4DK6YC.js";import b from"./WV7QX3ED.js";import{a as L}from"./
|
|
2
|
+
import c from"./2C4DK6YC.js";import b from"./WV7QX3ED.js";import{a as L}from"./573G4DTV.js";import"./QMAV4UTN.js";import"./Y2AUIXNK.js";import{b as m}from"./IPOPM3LM.js";import{H as p,h as y,i as a,q as l,u as d}from"./T3EPRHTT.js";import"./EXBEKVP5.js";export default $arcgis.t(([n,_,,{a:w,c:u,e:f}])=>{async function I(h,t){let{style:i="decimal",places:e=2}=t||{},s=n.convertNumberFormatToIntlOptions({places:e,digitSeparator:!0});return s.style=i,n.formatNumber(h,s)}var x=y`@layer{:host{display:block}.notice-msg{width:calc(100% - 20px);padding:10px}.layer-name{font-weight:500;word-break:break-word}.feature-count{padding:0 10px}}`,o=class extends p{constructor(){super(),this.layers=[],this.showFeatureCount=!0,this.showNextIcon=!1,this.applyLayerViewFilter=!1,this.filterByMapExtent=!1,this._noLayersToDisplay=!1,this._mapLayerIds=[],this._isLoading=!1,this._translations=L({name:"layer-list",blocking:!0}),this.layerSelect=l(),this.layersListLoaded=l(),this.listenOn(window,"selectedLanguageUpdated",this.selectedLanguageUpdated)}static{this.properties={mapView:0,layers:0,showFeatureCount:5,showNextIcon:5,applyLayerViewFilter:5,filterByMapExtent:5,_noLayersToDisplay:16,_mapLayerIds:16,_isLoading:16,_translations:16}}static{this.styles=x}static{this.shadowRootOptions=d}willUpdate(t){t.has("filterByMapExtent")&&this.hasUpdated&&this.filterByMapExtentWatchHandler(this.filterByMapExtent)}filterByMapExtentWatchHandler(t){t?this.initializeMapExtentFilter():this._filterByMapExtentHandle&&this._filterByMapExtentHandle.remove()}async refresh(){await this.setLayers()}async selectedLanguageUpdated(t){await this.setLayers()}async load(){this.filterByMapExtent&&this.initializeMapExtentFilter()}async loaded(){await this.setLayers()}render(){return a`${this._isLoading&&a`<calcite-loader label scale=m></calcite-loader>`||""}${!this._isLoading&&this.mapView&&this._noLayersToDisplay&&a`<calcite-notice class="notice-msg" icon=layers-reference kind=danger open><div slot=title>${this._translations.error}</div><div slot=message>${this._translations.noLayerToDisplayErrorMsg}</div></calcite-notice>`||""}${!this._isLoading&&this.mapView&&a`<calcite-list label selection-appearance=border selection-mode=none>${this.filterByMapExtent&&this._mapLayerIds.length>0&&this.getExtentNotice()||""}${this.renderLayerList()}</calcite-list>`||""}`}initializeMapExtentFilter(){this._filterByMapExtentHandle=_.when(()=>this.mapView?.stationary,()=>{this.setLayers()},{initial:!0})}async setLayers(){this.mapView&&(this._isLoading=!0,await this.initLayerHash(),this._isLoading=!1)}async initLayerHash(){let t=[];if(this.mapView){this._layerItemsHash=await w(this.mapView,!1);let i=await f(this.mapView);for(let e of i)if(e?.type==="feature"&&this.showFeatureCount){let s=e.createQuery();if(e?.definitionExpression&&(s.where=s.where+" AND "+e.definitionExpression),this.applyLayerViewFilter){let r=await u(this.mapView,e.id);r?.filter?.where&&(s.where=s.where?s.where+" AND "+r.filter.where:r.filter.where)}s.geometry=this.filterByMapExtent?this.mapView.extent:null;let c=e.queryFeatureCount(s);t.push(c),c.then(async r=>{let g=Number.isNaN(r)?"":await I(r,{places:0,style:"decimal"});this._layerItemsHash?.[e.id]&&(this._layerItemsHash[e.id].formattedFeatureCount=g)})}await Promise.all(t).then(()=>{let e=this._layerItemsHash&&this.getLayersToBeShownInList(this._layerItemsHash);this._mapLayerIds=e?.reverse()||[],this.handleNoLayersToDisplay()},()=>{this._mapLayerIds=[],this.handleNoLayersToDisplay()})}}handleNoLayersToDisplay(){this._noLayersToDisplay=!(this._mapLayerIds.length>0),this.layersListLoaded.emit(this._mapLayerIds)}getLayersToBeShownInList(t){let i=this.layers?.length>0?this.layers:[];return Object.keys(t).reduce((e,s)=>(i.indexOf(s)>-1&&e.push(s),e),[])}renderLayerList(){return this._mapLayerIds.length>0?this._mapLayerIds.reduce((t,i)=>{if(this._layerItemsHash&&this._layerItemsHash[i]){let e=this.getLayerListItem(i);e&&t.push(e)}return t},[]):void 0}getLayerListItem(t){let i=this._layerItemsHash&&this._layerItemsHash[t].name,e=this._layerItemsHash&&this._layerItemsHash[t].formattedFeatureCount;return a`<calcite-list-item @calciteListItemSelect=${()=>{this.onLayerItemSelected(t)}}><div class="layer-name" slot=content-start>${i}</div>${this.showFeatureCount&&e!==void 0&&e!==""&&a`<div class="feature-count" slot=content-end>${`(${e})`}</div>`||""}${this.showNextIcon&&a`<calcite-icon aria-hidden=true flip-rtl icon=chevron-right scale=s slot=content-end></calcite-icon>`||""}</calcite-list-item>`}getExtentNotice(){return a`<calcite-notice class="notice-msg" icon=extent-filter kind=brand open scale=s><div slot=message>${this._translations.extentFilterMsg}</div></calcite-notice>`}onLayerItemSelected(t){this._layerItemsHash&&this.layerSelect.emit({layerId:t,layerName:this._layerItemsHash[t]?.name})}};m("layer-list",o);return o},"intl","core/reactiveUtils",b,c)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{a as u}from"./
|
|
2
|
+
import{a as u}from"./73WHDMBB.js";import{b as d}from"./55UXOGN6.js";import"./QMAV4UTN.js";import"./Y2AUIXNK.js";import{H as c,L as o,h as a,i as t,q as r}from"./T3EPRHTT.js";import"./EXBEKVP5.js";export default $arcgis.t(([p,m,{on:w}])=>{var T=a`:host{--default-width: auto;--width: var(--default-width);--padding: 10px;--border-style: 1px solid var(--calcite-color-border-1);--calcite-button-height: 48px;--calcite-icon-color: var(--calcite-color-text-3);display:block;width:var(--width);background:var(--background-color, var(--calcite-color-foreground-1));color:var(--calcite-color-text-1);font-size:var(--calcite-font-size--1);padding:var(--padding);box-sizing:border-box;>*{border:var(--border-style)}}[role=group]{display:grid;grid-template-columns:repeat(3,1fr);grid-template-rows:var(--calcite-button-height)}.selection-count{display:flex;align-items:center;justify-content:space-between;padding-inline-start:var(--padding);margin-block-start:var(--padding)}`,i=class extends c{constructor(){super(),this._messages=u({name:"instant-apps-selection-toolbar",blocking:!0}),this._selectionCount=0,this.disabled=!1,this.selectionChange=r(),this.selectionManager=new p,this.selectionToolbarViewModel=new m({selectionManager:this.selectionManager})}static{this.properties={_selectionCount:16,view:0,selectionManager:0,selectionToolbarViewModel:0,selectedCount:32,sources:0,enabledTool:3,readyToSelect:39,continuousSelectionEnabled:5,selectionOperationType:1,toolbarState:32,layerViewPreferenceEnabled:5,disabled:5}}static{this.styles=T}get#e(){return this.disabled||this.selectionToolbarViewModel.state==="disabled"}get view(){return this.selectionManager.view}set view(e){this.selectionManager.view=e,this.selectionToolbarViewModel.view=e}get selectedCount(){return this._selectionCount}get sources(){return this.selectionManager.sources}set sources(e){this.selectionManager.sources=e,this.selectionToolbarViewModel.sources=e}get readyToSelect(){return!this.#e&&!!this.view&&!!this.sources?.length&&!!this.selectionManager&&!!this.selectionToolbarViewModel}get continuousSelectionEnabled(){return this.selectionToolbarViewModel.continuousSelectionEnabled}set continuousSelectionEnabled(e){this.selectionToolbarViewModel.continuousSelectionEnabled=e}get selectionOperationType(){return this.selectionToolbarViewModel.defaultOperationType}set selectionOperationType(e){this.selectionToolbarViewModel.defaultOperationType=e}get toolbarState(){return this.selectionToolbarViewModel?.state}get layerViewPreferenceEnabled(){return this.selectionToolbarViewModel.layerViewPreferenceEnabled}set layerViewPreferenceEnabled(e){this.layerViewPreferenceEnabled=e}clearSelection(){this.selectionManager.clear()}getSelectedFeatures(){return this.selectionManager.getSelectedFeatures(null,{returnGeometry:!0})}load(){this.manager.onLifecycle(()=>w(()=>this.selectionManager,"selection-change",e=>{this._selectionCount=this.selectionManager.count,this.selectionChange.emit(e)}))}willUpdate(e){e.has("enabledTool")&&this.readyToSelect&&(this.enabledTool?this.selectionToolbarViewModel.activateTool(this.enabledTool):this.selectionToolbarViewModel.cancel())}_getSelectButtonClickEventHandler(e){return()=>{this.enabledTool===e?this.enabledTool=null:this.enabledTool=e}}_renderSelectionButton(e,l,h){let s=this.enabledTool===e,b={pressed:s},g=this._getSelectButtonClickEventHandler(e),n=`${e}-action`;return t`<calcite-action id=${n??o} .aria=${b} .active=${s} alignment=center .text=${l} @click=${g} .disabled=${this.disabled}><calcite-icon .icon=${h}></calcite-icon></calcite-action><calcite-tooltip .referenceElement=${n}><span>${l}</span></calcite-tooltip>`}_renderSelectionCount(){if(this._selectionCount>0){let e=this._selectionCount===1?this._messages.labels.singleFeatureSelected:this._messages.labels.multipleFeaturesSelected.replace("{number}",String(this._selectionCount));return t`<div class="selection-count"><span>${e}</span><calcite-button appearance=transparent .label=${this._messages.labels.deselectFeatures} @click=${this.clearSelection}><calcite-icon icon=x></calcite-icon></calcite-button></div>`}return null}render(){return t`<div role=group aria-label=${this._messages.labels.groupLabel??o}>${this._renderSelectionButton("point",this._messages.labels.selectCursor,"cursor")}${this._renderSelectionButton("rectangle",this._messages.labels.selectMarquee,"cursor-marquee")}${this._renderSelectionButton("lasso",this._messages.labels.selectLasso,"lasso-select")}</div>${this._renderSelectionCount()}`}};d("instant-apps-selection-toolbar",i);return i},"views/SelectionManager","widgets/support/SelectionToolbar/SelectionToolbarViewModel","core/reactiveUtils")
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{a as _}from"./
|
|
2
|
+
import{a as _}from"./73WHDMBB.js";import{b as m}from"./55UXOGN6.js";import"./QMAV4UTN.js";import"./Y2AUIXNK.js";import{F as h,G as g,H as u,J as r,h as d,i as s}from"./T3EPRHTT.js";import"./EXBEKVP5.js";var o=class{constructor(){this.pages=[],this.headerText="",this.pages=[]}setPages(e){this.pages=e,this.setDefaultHeaderText()}setDefaultHeaderText(){this.headerText=this.pages.length?this.pages[0].title:""}},f=d`:host{--instant-apps-app-guide-width: 300px;--instant-apps-app-guide-height: 400px;--instant-apps-app-guide-list-item-bubble-size: 22px;width:var(--instant-apps-app-guide-width);height:var(--instant-apps-app-guide-height);display:block}:host calcite-panel{max-width:var(--instant-apps-app-guide-width);max-height:var(--instant-apps-app-guide-height);display:flex}:host calcite-carousel{flex:1;height:fit-content;background-color:var(--calcite-color-foreground-1);overflow:auto}:host [slot=header-content]{display:flex;gap:var(--calcite-spacing-sm);padding-inline-start:.25rem;font-weight:var(--calcite-font-weight-bold)}:host calcite-carousel-item{flex-grow:1;display:flex;flex-direction:column}:host .instant-apps-app-guide__content-wrapper{padding-block-start:.5rem;padding-inline:.5rem;flex-shrink:1;flex-grow:0}:host calcite-icon{--calcite-icon-color: var(--calcite-color-brand)}:host .instant-apps-app-guide__content-list{counter-set:item-counter;margin-inline:0;padding-inline-start:var(--calcite-spacing-xxxl);padding-inline-end:var(--calcite-spacing-lg);position:relative}:host .instant-apps-app-guide__content-list .instant-apps-app-guide__content-list--item{counter-increment:item-counter;margin-block-start:var(--calcite-spacing-lg);display:flex;align-items:flex-start}:host .instant-apps-app-guide__content-list .instant-apps-app-guide__content-list--item:before{content:counter(item-counter);background-color:var(--calcite-color-text-2);color:var(--calcite-color-text-inverse);line-height:var(--calcite-font-line-height-fixed-xl);width:var(--instant-apps-app-guide-list-item-bubble-size);left:0;border-radius:var(--calcite-corner-radius-pill);display:flex;justify-content:center;font-size:var(--calcite-font-size-sm);position:absolute;max-height:var(--instant-apps-app-guide-list-item-bubble-size)}:host .instant-apps-app-guide__content-list .instant-apps-app-guide__content-list--item::marker{color:var(--calcite-color-transparent)}`,l={contentList:"instant-apps-app-guide__content-list",contentListItem:"instant-apps-app-guide__content-list--item",contentWrapper:"instant-apps-app-guide__content-wrapper"},c=class extends u{constructor(){super(...arguments),this._messages=_({name:"instant-apps-app-guide"}),this._viewModel=new o,this._carouselRef=h(),this.header=!0}static{this.properties={headerText:16,header:5,data:0}}static{this.styles=f}load(){this._setContent(this.data)}willUpdate(e){e.has("data")&&this._setContent(this.data),e.has("headerText")&&(this._viewModel.headerText=this.headerText)}_setContent(e){this._viewModel.setPages(e),this.headerText=this._viewModel.headerText}_updateHeaderText(){let{_viewModel:e,_carouselRef:{value:t},_messages:a}=this;if(!(e&&t))return;let i=Array.from(t.children).indexOf(t.selectedItem),n=e?.pages,p=n?.[i]??n[0];this.headerText=p?.title||a.headerText}_getArrowType(){return this._viewModel.pages.length>2?"inline":"none"}render(){let e=this._renderAppGuidePages(this._viewModel.pages),t=this._renderAppGuideHeader();return s`<calcite-panel scale=s>${t}<calcite-carousel label="App Guide" @calciteCarouselChange=${()=>this._updateHeaderText()} .arrowType=${this._getArrowType()} ${g(this._carouselRef)}>${e}</calcite-carousel></calcite-panel>`}_renderAppGuideHeader(){let{_messages:e,header:t,headerText:a}=this,i=!!t&&e.headerText,n=a||e.headerText;return i?s`<span slot=header-content>${n} <calcite-icon icon=lightbulb scale=s></calcite-icon></span>`:null}_renderAppGuidePages(e){return e.map((t,a)=>{let{content:i,type:n,title:p}=t;return s`<calcite-carousel-item .label=${p}><div class=${r(l.contentWrapper)}>${this._renderContentItems(i,n)}</div></calcite-carousel-item>`})}_renderContentItems(e,t){return t==="list"?s`<ol class=${r(l.contentList)}>${e.map((a,i)=>s`<li class=${r(l.contentListItem)}>${a}</li>`)}</ol>`:e.map((a,i)=>s`<p>${a}</p>`)}};m("instant-apps-app-guide",c);export{c as InstantAppsAppGuide};
|