@arcgis/map-components 5.0.6 → 5.0.8
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/{2QMWNCA2.js → 2BKO4X64.js} +1 -1
- package/dist/cdn/{4VZDLCDM.js → 2ERUSYFG.js} +1 -1
- package/dist/cdn/{QFDABZBR.js → 2KLBPWCO.js} +1 -1
- package/dist/cdn/{5OPJLOFN.js → 2PSYTKRG.js} +1 -1
- package/dist/cdn/{IX7OU6IJ.js → 2WZ3RMR7.js} +1 -1
- package/dist/cdn/{IZIU4J7M.js → 32Q5BYKS.js} +1 -1
- package/dist/cdn/{MJ74362A.js → 33YWYJ4B.js} +1 -1
- package/dist/cdn/{RDEHO74Y.js → 3AJGQWWJ.js} +1 -1
- package/dist/cdn/{UYJ5XGBA.js → 3MNBJANP.js} +1 -1
- package/dist/cdn/{KXSAGSN4.js → 3QMAQRDF.js} +1 -1
- package/dist/cdn/{3ARU6HXS.js → 3UQI2KLK.js} +1 -1
- package/dist/cdn/{TN6QKFA2.js → 3XA7FNHU.js} +1 -1
- package/dist/cdn/{XHWL2OHB.js → 43SFYWBA.js} +1 -1
- package/dist/cdn/{32UQZIPD.js → 452XJTUD.js} +1 -1
- package/dist/cdn/{QXKVG4VC.js → 4HIKXNLJ.js} +1 -1
- package/dist/cdn/{OYAWQBUJ.js → 4K34BUTQ.js} +1 -1
- package/dist/cdn/{MBWMVD5N.js → 4MJ6RR6C.js} +1 -1
- package/dist/cdn/{QFFQL2UW.js → 4QL2L5HG.js} +1 -1
- package/dist/cdn/{C34Y4G3N.js → 4QLSHCCH.js} +1 -1
- package/dist/cdn/{IW4OBOPT.js → 4VANT2H2.js} +1 -1
- package/dist/cdn/{6T5SHFHI.js → 4Y5ZV64K.js} +1 -1
- package/dist/cdn/{3RJECMNO.js → 5226JY7U.js} +1 -1
- package/dist/cdn/{HLMDKUOU.js → 57QXQ42V.js} +1 -1
- package/dist/cdn/{6FC2Z44G.js → 5HY425PW.js} +1 -1
- package/dist/cdn/{GQMWRADC.js → 62PPRW5H.js} +1 -1
- package/dist/cdn/{46P3J64W.js → 64DLLWCT.js} +1 -1
- package/dist/cdn/{S6XBCSKI.js → 65GHL7AK.js} +1 -1
- package/dist/cdn/{MMXCIDBO.js → 6FKMR33M.js} +1 -1
- package/dist/cdn/{7BW4265R.js → 6KELW6YE.js} +1 -1
- package/dist/cdn/{5KEFHN6T.js → 6Z5BZD4S.js} +1 -1
- package/dist/cdn/{BHL7BVTY.js → 7BSE4Y2A.js} +1 -1
- package/dist/cdn/{FNPMMKJD.js → 7SBVVOP3.js} +1 -1
- package/dist/cdn/7TXQADKX.js +2 -0
- package/dist/cdn/{SDOBWEQE.js → 7VUB7AFJ.js} +1 -1
- package/dist/cdn/{IXXLA2Z7.js → A3ZA5MCJ.js} +1 -1
- package/dist/cdn/{Q4BWNVI4.js → A5GHD7L7.js} +1 -1
- package/dist/cdn/{KGXZM7OU.js → AGBHCVRA.js} +1 -1
- package/dist/cdn/{UOWJ65WB.js → AJAD4RUP.js} +1 -1
- package/dist/cdn/{5M7CI7TV.js → AKBJKSH3.js} +1 -1
- package/dist/cdn/{GK3TNRAT.js → ARB7ESUF.js} +1 -1
- package/dist/cdn/{ROQLHTVO.js → AWIUYN3W.js} +1 -1
- package/dist/cdn/{57QVYCIL.js → AXFOWKQN.js} +1 -1
- package/dist/cdn/{3QADA54G.js → AYFGP5ZN.js} +1 -1
- package/dist/cdn/BC5B7PGD.js +2 -0
- package/dist/cdn/{LG4CKKZJ.js → BGCXNQ5U.js} +1 -1
- package/dist/cdn/{CNHU242I.js → BLRU43VQ.js} +1 -1
- package/dist/cdn/{QUD4HICL.js → BNQQ7JMQ.js} +1 -1
- package/dist/cdn/{LKSP2TYH.js → BWSEQK6S.js} +1 -1
- package/dist/cdn/{JHEX6VZF.js → BXEQ2GR7.js} +1 -1
- package/dist/cdn/{VAG6UT3R.js → BXMF7CDZ.js} +1 -1
- package/dist/cdn/{BLNKE5YR.js → C4OFSKWZ.js} +1 -1
- package/dist/cdn/{IOCCNMZU.js → CQ4OP5KR.js} +1 -1
- package/dist/cdn/{G7IP6IPD.js → CVVCPCHQ.js} +1 -1
- package/dist/cdn/{RWGQCMXU.js → CWMCSQSK.js} +1 -1
- package/dist/cdn/{2RM3JPSZ.js → CWTYBVDX.js} +1 -1
- package/dist/cdn/{7PXQ5F5K.js → DAXUZZYI.js} +1 -1
- package/dist/cdn/{2JNQT3CU.js → DGBQDSJV.js} +1 -1
- package/dist/cdn/{CZ3WW6GZ.js → DJ3SEHH7.js} +1 -1
- package/dist/cdn/{X7NWAN4R.js → DLCRIX3F.js} +1 -1
- package/dist/cdn/{QE7X3ZJG.js → DZXBV52D.js} +1 -1
- package/dist/cdn/{PU3CIOMW.js → E4NS5EP3.js} +1 -1
- package/dist/cdn/{GRFF5Y4R.js → E52S65JA.js} +1 -1
- package/dist/cdn/{4WR7M5OM.js → EZNR44ZZ.js} +1 -1
- package/dist/cdn/{DR4N3HTB.js → F3QMZQEN.js} +1 -1
- package/dist/cdn/{NLTHGBJD.js → FDCGR4B4.js} +1 -1
- package/dist/cdn/{JWUV4MPH.js → FKAXOX2G.js} +1 -1
- package/dist/cdn/{RWIYG576.js → FRQBH455.js} +1 -1
- package/dist/cdn/{4NCPVAN3.js → FWLGMF7U.js} +1 -1
- package/dist/cdn/{WH63C3TF.js → G5CFCDWX.js} +1 -1
- package/dist/cdn/{6EBGGCML.js → G6Z2GTC7.js} +1 -1
- package/dist/cdn/{5LB3TTX6.js → GCJHT65W.js} +1 -1
- package/dist/cdn/{J3SW4HDC.js → GEEP3X2Y.js} +1 -1
- package/dist/cdn/{C37KK5NP.js → GHNGYP3W.js} +1 -1
- package/dist/cdn/{MW6M3U2C.js → GNF5NJB7.js} +1 -1
- package/dist/cdn/{75NISNHG.js → GYOEIXYM.js} +1 -1
- package/dist/cdn/{E75BGRH4.js → H5ZGEYHN.js} +1 -1
- package/dist/cdn/{JPYIWZET.js → H6NJXUN6.js} +1 -1
- package/dist/cdn/{ECQWVBBN.js → HC3MHWTP.js} +1 -1
- package/dist/cdn/{HBF7NI2K.js → HEUVUMO7.js} +1 -1
- package/dist/cdn/{4JYXRNR3.js → HM67OIIC.js} +1 -1
- package/dist/cdn/{6OAJEQLR.js → HX5VKOH7.js} +1 -1
- package/dist/cdn/{ABY53DLF.js → I2JJUUZQ.js} +1 -1
- package/dist/cdn/{4N2YRLJH.js → I3EZXW2U.js} +1 -1
- package/dist/cdn/{DIIHZGZR.js → IB2J54RM.js} +1 -1
- package/dist/cdn/{VZOMAMSZ.js → IE2YLVLQ.js} +1 -1
- package/dist/cdn/{FPKVLC2S.js → IENGLEJA.js} +1 -1
- package/dist/cdn/{SMPH52ZG.js → IPMDK4MT.js} +1 -1
- package/dist/cdn/{WPGDCLOF.js → IPN4LJ7V.js} +1 -1
- package/dist/cdn/{IQLNEPKQ.js → J3TV3V5W.js} +1 -1
- package/dist/cdn/{B77GDHWP.js → JADRITCD.js} +1 -1
- package/dist/cdn/{MZQ4MCV4.js → JQA7633S.js} +1 -1
- package/dist/cdn/{BE5MCWNQ.js → JTB4D5Y2.js} +1 -1
- package/dist/cdn/{BEUT37NH.js → JW4IYKZW.js} +1 -1
- package/dist/cdn/{FHPE7GN3.js → JY37VVM4.js} +1 -1
- package/dist/cdn/{HQ33F2C2.js → K6KI46YC.js} +1 -1
- package/dist/cdn/{GWSF247V.js → KBXRLSRQ.js} +1 -1
- package/dist/cdn/{4XWPSCE3.js → KH3CK4NM.js} +1 -1
- package/dist/cdn/{3C6GI6FX.js → KLUJHBJX.js} +1 -1
- package/dist/cdn/{SHMRXLLT.js → KS2NA752.js} +1 -1
- package/dist/cdn/{TJHX7S4T.js → L4TUBH7W.js} +1 -1
- package/dist/cdn/{EGKIBLJO.js → L7U7JQYH.js} +1 -1
- package/dist/cdn/{JSRA6F62.js → LDESQMMT.js} +1 -1
- package/dist/cdn/{RBGK7M3W.js → LFH2LJU7.js} +1 -1
- package/dist/cdn/{DWICVKPP.js → LGKCESB4.js} +1 -1
- package/dist/cdn/{XH3WZPG4.js → LNKGOWH7.js} +1 -1
- package/dist/cdn/{23UI3GZC.js → LNKIDH5D.js} +1 -1
- package/dist/cdn/{W3VP6R57.js → LTDNG7YS.js} +1 -1
- package/dist/cdn/{XNOKCT3W.js → LU6GBARZ.js} +1 -1
- package/dist/cdn/{JOOZASOM.js → M2M7DHX2.js} +1 -1
- package/dist/cdn/{CMQVBJYS.js → M2MYLPEX.js} +1 -1
- package/dist/cdn/MI2C6GGG.js +2 -0
- package/dist/cdn/MPTRSZMX.js +2 -0
- package/dist/cdn/{ZLA6JWIL.js → MRRD3ZPK.js} +1 -1
- package/dist/cdn/{HAFUKMGJ.js → MS7JRJ6R.js} +1 -1
- package/dist/cdn/{N4GUAV3X.js → MYPHE7JL.js} +1 -1
- package/dist/cdn/{FL35N4DV.js → N46RUHPV.js} +1 -1
- package/dist/cdn/{JBS7G4UI.js → N4RWJWIQ.js} +1 -1
- package/dist/cdn/{VLTWAK7Z.js → NIIMT3SS.js} +1 -1
- package/dist/cdn/{W72445UR.js → NJBN5VJA.js} +1 -1
- package/dist/cdn/{LJBXNM4S.js → NQ7AJXP5.js} +1 -1
- package/dist/cdn/{7EXL53DQ.js → NXMSFJ7A.js} +1 -1
- package/dist/cdn/{EFXP3BAR.js → NZEXJWD3.js} +1 -1
- package/dist/cdn/{P7BSHSKS.js → O2756ASS.js} +1 -1
- package/dist/cdn/{EU7XLLJW.js → O2CHOEOT.js} +1 -1
- package/dist/cdn/{7WCPDHQW.js → OEEM2YOU.js} +1 -1
- package/dist/cdn/{7IYDZBW5.js → OIPOVOS7.js} +1 -1
- package/dist/cdn/{JV6FTSZF.js → OIXQVXVX.js} +1 -1
- package/dist/cdn/{HG5HM7AV.js → OJS2HGOV.js} +1 -1
- package/dist/cdn/{IB6UNF7C.js → OMUYJPC3.js} +1 -1
- package/dist/cdn/{ZALH6EK6.js → P6WTQUAO.js} +1 -1
- package/dist/cdn/{3VWGWEXT.js → PAIWJPLK.js} +1 -1
- package/dist/cdn/{3VBXIZ32.js → PF2QXZ63.js} +1 -1
- package/dist/cdn/{FKP6TUEF.js → PTX37QR4.js} +1 -1
- package/dist/cdn/{WENBZKCS.js → QDB572U4.js} +1 -1
- package/dist/cdn/{QOODCGAQ.js → QDM5XPXZ.js} +1 -1
- package/dist/cdn/{QQYM7FA4.js → QITFIJJH.js} +1 -1
- package/dist/cdn/{RTYFCVEU.js → QIVD6SID.js} +1 -1
- package/dist/cdn/{RZWX3WFZ.js → QK23OZPY.js} +1 -1
- package/dist/cdn/{OFOR6IVQ.js → QLKVY23N.js} +1 -1
- package/dist/cdn/{7WMSCU6F.js → QOYZ3JEZ.js} +1 -1
- package/dist/cdn/QT5JEHEL.js +2 -0
- package/dist/cdn/{EPP5LYPS.js → QUMXEH6O.js} +1 -1
- package/dist/cdn/{B3H7SS4Z.js → R4BFR6CR.js} +1 -1
- package/dist/cdn/{OJCS6OP2.js → RL3YYALU.js} +1 -1
- package/dist/cdn/{EJWYTUSN.js → RLGD7QFK.js} +1 -1
- package/dist/cdn/{DVJBMKDK.js → RMXIPB4F.js} +1 -1
- package/dist/cdn/{W7UGNAAG.js → RS7XEIXD.js} +1 -1
- package/dist/cdn/{FKS2JSN2.js → RUNR4PHJ.js} +1 -1
- package/dist/cdn/{3OUJ5LT2.js → SKTGMQNL.js} +1 -1
- package/dist/cdn/{4UFLSZSK.js → SQ2BHLMX.js} +1 -1
- package/dist/cdn/{OQFWYILA.js → SUKF2DNP.js} +1 -1
- package/dist/cdn/{EH5576ZY.js → THWXFLFI.js} +1 -1
- package/dist/cdn/{DADOJOY5.js → TM62FNIH.js} +1 -1
- package/dist/cdn/{XP35KWVR.js → TPGQZBGS.js} +1 -1
- package/dist/cdn/{XJAHXINN.js → TX2C55A4.js} +1 -1
- package/dist/cdn/{HKERLB3O.js → U2AWOURC.js} +1 -1
- package/dist/cdn/{ELJCWFP4.js → UPEU3R2L.js} +1 -1
- package/dist/cdn/{AKERMTGF.js → UPJWDEDA.js} +1 -1
- package/dist/cdn/{5I472FQZ.js → UPP7IN72.js} +1 -1
- package/dist/cdn/{P5EZZH6S.js → UQN4KPNM.js} +1 -1
- package/dist/cdn/{6FZBZG62.js → V5KZVJFN.js} +1 -1
- package/dist/cdn/V64WJLLP.js +2 -0
- package/dist/cdn/{R7FF7B2B.js → V7B4YUMV.js} +1 -1
- package/dist/cdn/{HFXULUGO.js → VF3Q4EFN.js} +1 -1
- package/dist/cdn/{DJAXABGJ.js → VF5OXNNE.js} +1 -1
- package/dist/cdn/{RHJ4GDQU.js → VRQRANLV.js} +1 -1
- package/dist/cdn/{4SYS7Z5Q.js → VUEBCRTT.js} +1 -1
- package/dist/cdn/{KZUFDOJ2.js → W5ABTJHB.js} +1 -1
- package/dist/cdn/{J4OTW75Q.js → WB6NANDC.js} +1 -1
- package/dist/cdn/{22334O7S.js → WCBA3F5G.js} +1 -1
- package/dist/cdn/{LGCVG3ID.js → WH46XXVN.js} +1 -1
- package/dist/cdn/{7QZVR2UR.js → WUDIJWPW.js} +1 -1
- package/dist/cdn/{CRZ7YK66.js → X2MXOMPH.js} +1 -1
- package/dist/cdn/{5NUQGSOR.js → XFRWBORH.js} +1 -1
- package/dist/cdn/{UC5MSQTK.js → Y6QLR3JD.js} +1 -1
- package/dist/cdn/{TQQDD3LX.js → YCCZLRZB.js} +1 -1
- package/dist/cdn/{ZA47H62T.js → YK2NREJU.js} +1 -1
- package/dist/cdn/{CHWAA2DS.js → YLCINN3O.js} +1 -1
- package/dist/cdn/{E2HOEDZD.js → YRRD6IOX.js} +1 -1
- package/dist/cdn/{RUHKUWCY.js → ZAXHNBK4.js} +1 -1
- package/dist/cdn/{XC2MFEBD.js → ZCZAVJTC.js} +1 -1
- package/dist/cdn/{CSO4T27H.js → ZDMBWQNI.js} +1 -1
- package/dist/cdn/{D2BD7FGS.js → ZLYS2U4C.js} +1 -1
- package/dist/cdn/{OMKENRIP.js → ZRR7SK7S.js} +1 -1
- package/dist/cdn/{ZBQAM52J.js → ZZDZPOW3.js} +1 -1
- package/dist/cdn/assets/fonts/CalciteWebCoreIcons.woff2 +0 -0
- package/dist/cdn/index.js +1 -1
- package/dist/cdn/main.css +1 -1
- package/dist/chunks/layer-utils.js +23 -19
- package/dist/chunks/runtime.js +1 -1
- package/dist/components/arcgis-feature-table/customElement.js +1 -1
- package/dist/components/arcgis-link-chart/customElement.d.ts +14 -14
- package/dist/components/arcgis-map/customElement.d.ts +14 -14
- package/dist/components/arcgis-slider-opacity-legacy/customElement.d.ts +1 -1
- package/dist/components/arcgis-utility-network-trace-location/customElement.js +57 -51
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/package.json +4 -4
- package/dist/cdn/2BUAB7HW.js +0 -2
- package/dist/cdn/6VN3TPXR.js +0 -2
- package/dist/cdn/CPF6OKUS.js +0 -2
- package/dist/cdn/MATFNQVX.js +0 -2
- package/dist/cdn/UJNWWAKI.js +0 -2
- package/dist/cdn/UTIAMQZJ.js +0 -2
- package/dist/cdn/assets/fonts/CalciteWebCoreIcons.svg +0 -197
- package/dist/cdn/assets/fonts/CalciteWebCoreIcons.ttf +0 -0
- package/dist/cdn/assets/fonts/CalciteWebCoreIcons.woff +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
|
|
2
|
-
import i from"./R7FF7B2B.js";import h from"./SDSJSO7N.js";import{c as U}from"./MATFNQVX.js";import{a as b}from"./C34Y4G3N.js";import g from"./CHWAA2DS.js";import f from"./S6XBCSKI.js";import{a as se}from"./P5EZZH6S.js";import e from"./VZOMAMSZ.js";import c from"./7PXQ5F5K.js";import{g as re}from"./EH5576ZY.js";import"./7QZVR2UR.js";import a from"./KTDXN3YM.js";import"./ZNBKMZP7.js";import{M as V,N as D,O as ee,P as te,Q as N,R as ie,U as ae,a as Y,b as d,c as R,x as E}from"./GRFF5Y4R.js";import"./ALDX5YZO.js";export default $arcgis.t(([{property:s,subclass:C},Z,B,{getApplicationClipboard:Me},Ce,j,{getFullTemplate:ce,isSharedTemplate:de,getCreationAttributes:Fe,isSharedTemplateOrMetadata:me},{createApplySetModifyItem:W,createApplySet:J,createFeatureStateProvider:Q,createApplySetAddItem:q,writeApplySetToService:_e},{whenOnce:ue,watch:X},{getRendererFields:pe,getFeatureEditFields:xe},Pe,{substitute:y},{createGraphicsMover:$e},,,,oe,,{a:le,b:ne}])=>{var Ae=Y`.esri-widget__heading{color:var(--calcite-color-text-2);margin:0 0 .5rem;font-weight:var(--calcite-font-weight-semibold)}h1.esri-widget__heading{font-size:var(--calcite-font-size-xl)}h2.esri-widget__heading{font-size:var(--calcite-font-size-md)}h3.esri-widget__heading,h4.esri-widget__heading,h5.esri-widget__heading,h6.esri-widget__heading{font-size:var(--calcite-font-size)}.esri-widget{box-sizing:border-box;color:var(--calcite-color-text-2);background-color:var(--calcite-color-foreground-1);font-size:var(--calcite-font-size);line-height:var(--calcite-font-line-height-relative-tight)}.esri-widget *,.esri-widget :before,.esri-widget :after{box-sizing:inherit}.esri-widget.esri-widget--disabled>*{opacity:.4;pointer-events:none}.esri-widget.esri-widget--compact{--esri-widget-padding-y: 0;--esri-widget-padding-x: 0}.esri-widget__anchor{color:var(--calcite-color-text-2)}.esri-widget__anchor:hover{color:var(--calcite-color-text-3)}.esri-widget__anchor:hover,.esri-widget__anchor:focus{text-decoration:underline}.esri-widget__anchor--disabled{opacity:.4;pointer-events:none}.esri-widget__header{background-color:var(--calcite-color-foreground-1);flex:1 0 100%;justify-content:space-between;align-items:center;width:100%;min-height:48px;padding:12px 0 12px 15px;display:flex}.esri-widget__heading{word-break:break-word}.esri-widget__header .esri-widget__heading{width:calc(100% - 48px);text-align:initial;color:var(--calcite-color-text-1);align-items:center;margin:0;padding:0;display:flex}.esri-widget__header-button{appearance:none;cursor:pointer;color:var(--calcite-color-text-2);background-color:var(--calcite-color-foreground-1);border:none;flex:0 0 48px;justify-content:center;align-self:stretch;align-items:center;width:48px;padding:0;display:flex}.esri-widget__footer{background-color:var(--calcite-color-foreground-1);justify-content:center;align-items:center;width:100%;min-height:48px;display:flex}.esri-widget__footer-pagination{color:var(--calcite-color-text-2);justify-content:space-between;align-items:center;display:flex}.esri-widget__footer-pagination-previous-button,.esri-widget__footer-pagination-next-button{cursor:pointer;background-color:var(--calcite-color-foreground-1);border:0;margin:0 7px;padding:12px 15px;transition:background-color .125s ease-in-out}.esri-widget__footer-pagination-previous-button:hover,.esri-widget__footer-pagination-previous-button:focus,.esri-widget__footer-pagination-next-button:hover,.esri-widget__footer-pagination-next-button:focus{color:var(--calcite-color-text-1);background-color:var(--calcite-color-foreground-1)}.esri-menu{visibility:hidden;z-index:1;background-clip:padding;background-color:var(--calcite-color-foreground-1);background-clip:padding-box;width:100%;max-height:0;margin:2px 0 0;padding:0;font-size:var(--calcite-font-size);line-height:var(--calcite-spacing-xl);position:absolute;top:100%;left:0;overflow:hidden;box-shadow:0 1px 2px #0000004d}.esri-menu .esri-menu__header{color:var(--calcite-color-text-inverse);background-color:var(--calcite-color-inverse);padding:6px 12px}.esri-menu__list{margin:0;padding:0;list-style:none}.esri-menu__list-item{cursor:pointer;border-top:1px solid #adadad4d;border-left:3px solid #0000;padding:.8em 1em}.esri-menu__list-item [class^=esri-icon-],.esri-menu__list-item [class*=" esri-icon-"]{padding-right:2.8px}.esri-menu__list-item:first-child{border-top:none}.esri-menu__list-item--focus,.esri-menu__list-item:hover,.esri-menu__list-item:focus{background-color:var(--calcite-color-foreground-1)}.esri-menu__list-item:active{background-color:var(--calcite-color-foreground-current)}.esri-menu__list-item--active,.esri-menu__list-item--active:hover,.esri-menu__list-item--active:focus{background-color:var(--calcite-color-foreground-1);border-left-color:var(--calcite-color-brand)}.esri-widget__table{border-collapse:collapse;color:var(--calcite-color-text-1);border:none;width:100%;line-height:var(--calcite-font-line-height-relative-tight)}.esri-widget__table tr:nth-child(odd){background-color:var(--calcite-color-transparent)}.esri-widget__table tr:nth-child(2n){background-color:var(--calcite-color-transparent-press)}.esri-widget__table tr a{color:var(--calcite-color-text-2)}.esri-widget__table tr a:hover,.esri-widget__table tr a:focus{color:var(--calcite-color-text-1)}.esri-widget__table tr td,.esri-widget__table tr th{vertical-align:top;word-break:break-word;padding:.5em .7em;font-size:var(--calcite-font-size-sm);font-weight:var(--calcite-font-weight-regular)}.esri-widget__table tr th{text-align:left;border-right:3px solid #0000000d;width:50%}.esri-widget__table tr td{width:50%}.esri-input{color:var(--calcite-color-text-1);background-color:var(--calcite-color-foreground-1);border:1px solid #959595;font-size:var(--calcite-font-size)}.esri-input::-ms-clear{display:none}.esri-input::placeholder{opacity:1;color:var(--calcite-color-text-2)}.esri-input:placeholder-shown{text-overflow:ellipsis}.esri-input[type=text],.esri-input[type=password],.esri-input[type=number]{height:32px;padding:0 .5em}calcite-combobox.esri-input{border:none}.esri-widget__content--empty{text-align:center;color:var(--calcite-color-border-input);flex-flow:column wrap;align-items:center;padding:18px 22px;display:flex}.esri-widget__content--empty h1.esri-widget__heading,.esri-widget__content--empty h2.esri-widget__heading,.esri-widget__content--empty h3.esri-widget__heading,.esri-widget__content--empty h4.esri-widget__heading,.esri-widget__content--empty h5.esri-widget__heading{font-weight:var(--calcite-font-weight-regular)}.esri-widget__content-illustration--empty{width:128px;padding:1rem 0}.esri-widget__content-icon--empty{width:32px;padding:.5rem 0}.esri-select{appearance:none;cursor:pointer;color:var(--calcite-color-text-2);background:var(--calcite-color-foreground-1) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-8 -8 32 32' width='32' height='32'%3E%3Cpath d='M8 11.207l-4-4V5.793l4 4 4-4v1.414z' fill='%23adadad' fillrule='nonzero'/%3E%3C/svg%3E") 100% no-repeat;border:1px solid #959595;border-radius:0;width:100%;height:32px;margin:0;padding:0 .5em;font-family:inherit;font-size:.85em;display:block}.esri-select[disabled]{cursor:auto}.esri-select::-ms-expand{display:none}.esri-disabled a,.esri-disabled [role=menu],.esri-disabled [role=checkbox],.esri-disabled [class^=esri-icon-],.esri-disabled [class*=" esri-icon-"]{color:var(--calcite-color-text-3)}.keynav-mode .esri-widget:focus,.keynav-mode .esri-widget :focus{z-index:1;outline-offset:2px;outline:2px solid #adadad}.esri-widget__loader-animation{border:.15em solid #adadad4d;border-top-color:var(--calcite-color-border-input);border-radius:100%;width:1em;height:1em;font-size:var(--calcite-font-size-md);animation:1.25s linear infinite esri-rotate;display:block;transform:translateZ(0)}:dir(rtl) .esri-widget__table th{text-align:right;border-left:3px solid #0000000d;border-right:none}:dir(rtl) .esri-select{background-position:0}:dir(rtl) .esri-menu__list-item{border-left:none;border-right:3px solid #0000}:dir(rtl) .esri-menu__list-item [class^=esri-icon-],:dir(rtl) .esri-menu__list-item [class*=" esri-icon-"]{padding-left:2px;padding-right:0}:dir(rtl) .esri-menu__list-item--active{border-right-color:var(--calcite-color-brand)}.esri-icon-font-fallback-text{clip:rect(0 0 0 0);width:1px;height:1px;position:absolute;overflow:hidden}.esri-rotating{animation:1.25s linear infinite esri-rotate;transform:translateZ(0)}.esri-clearfix:before,.esri-clearfix:after{content:" ";display:table}.esri-clearfix:after{clear:both}.esri-interactive{cursor:pointer}.esri-hidden{display:none!important}.esri-invisible{visibility:hidden!important}.esri-offscreen{position:absolute;top:-999em;left:-999em}.esri-match-height{flex-direction:column;flex:auto;display:flex;overflow:hidden}:host{display:flex}.arcgis-paste{height:var(--arcgis-paste-height, 300px);width:var(--arcgis-paste-width, 300px);flex:1}.hidden{display:none}.flex-row{flex-direction:row}.justify-center{justify-content:center}.h-full{height:100%}.w-full{width:100%}.flex{display:flex}.text-center{text-align:center}.pad-contents{padding:var(--arcgis-paste-blocks-padding, var(--calcite-spacing-md))}.merge-feature-form{padding-left:var(--arcgis-paste-blocks-padding, var(--calcite-spacing-md));padding-right:var(--arcgis-paste-blocks-padding, var(--calcite-spacing-md));padding-bottom:var(--arcgis-paste-blocks-padding, var(--calcite-spacing-md))}.pad-start-end{padding-left:var(--arcgis-paste-blocks-padding, var(--calcite-spacing-md));padding-right:var(--arcgis-paste-blocks-padding, var(--calcite-spacing-md))}.gallery-content{padding-top:var(--arcgis-paste-blocks-padding, var(--calcite-spacing-md));padding-bottom:var(--arcgis-paste-blocks-padding, var(--calcite-spacing-md));display:flex;row-gap:var(--arcgis-paste-blocks-padding, var(--calcite-spacing-md));flex-direction:column}.chip-indent{margin-left:5px;margin-right:5px}.merge-split-view-container{display:flex;flex-direction:column;height:100%}.merge-split-view-items{flex:0 1 auto;max-height:50%;overflow-y:scroll}.merge-split-view-attributes{flex:1;overflow-y:scroll}.choose-feature{position:absolute;width:100%;max-height:100%;z-index:2;overflow-y:auto}.bau-pick{display:flex;flex-direction:row;align-items:center;gap:4px}.danger-icon-warning{--calcite-icon-color: var(--calcite-color-status-danger)}.paste-feature-templates{--arcgis-feature-templates-max-list-height: 100%}`;async function Ee(e,t={}){if(e?.type==="subtype-group"){if(!e.subtypeField)return[];let i=t[e.subtypeField];if(!be(i))return[];let a=e.findSublayerForSubtypeCode(i);return a?a.renderer&&a.fieldsIndex?await pe(a.renderer,e.fieldsIndex):[]:[]}return e?e.renderer&&e.fieldsIndex?await pe(e.renderer,e.fieldsIndex):[]:[]}function Ie(e,t,i,a,r,o){let l={...a},h=ke(o),p=Se(o),m="";(o.type==="subtype-group"||o.type==="subtype-sublayer")&&(m=o.subtypeField??"");let v=o.objectIdField??"";return e.forEach(u=>{if(u.name!==v&&!h.includes(u.name)&&!p.includes(u.name)&&!r.includes(u.name)&&u.type!=="global-id"&&(m===""||m!==u.name)){let w=He(u,t);w.match&&w.targetField&&(l[w.targetField?.name]=i[u.name])}}),l}function ke(e){return e&&"relationships"in e?(e.relationships??[]).filter(t=>t.role==="origin").map(t=>t.keyField):[]}function Se(e){return e?.type==="subtype-sublayer"&&(e=e.parent),e?xe(e):[]}function Te(e,t){if(e.type===t.type)return t.type==="string"?e.length<=t.length:!0;switch(e.type){case"small-integer":return["integer","big-integer"].includes(t.type);case"integer":return t.type==="big-integer";case"single":return t.type==="double";default:return!1}}function He(e,t){let i={match:!1,sourceField:null,targetField:null};for(let a of t)if(Te(e,a)){let r=e.name.replace(/\s/gu,"").toLowerCase();if(a.name.replace(/\s/gu,"").toLowerCase()===r)return i.match=!0,i.sourceField=e,i.targetField=a,i}return i}async function ge(e,t,i,a){let r=!0,o={hasAsyncArcadeExpressions:!1},l=e.items.filter(h=>h.type==="add");for(let h of l){let p=h.graphic.clone(),m=Oe(h.graphic,h.layer);if(!m){r=!1;continue}let v=!await Ge(t,h.graphic,m,i,o);if(o.hasAsyncArcadeExpressions&&l.length>a)return!1;let u=W({graphic:h.graphic,layer:h.layer,originalGraphic:p});if(e.push(u),!v)return!1}return r}function Oe(e,t){return t.type==="feature"||t.type==="subtype-sublayer"?t:t.findSublayerForFeature(e)||null}async function Ge(e,t,i,a,r){let o=i.formTemplate,l=i.fields.filter(w=>{let z=t.attributes[w.name],fe=z===null||z===""||z===void 0;return w.editable&&!w.nullable&&fe});if(!o)return l.length!==0;let h=new Set;we(o.elements??[],h);let p=new Set;if(ve(o.elements??[],p),h.size===0&&p.size===0)return l.length>0;let m=t.clone();m.layer=i,delete m.attributes[i.objectIdField],a.has(i)||a.set(i,new Pe({map:e.map,editType:"INSERT"}));let v=a.get(i);if(v.features=new j([m]),await ue(()=>(v.status==="loaded"||v.status==="failed")&&!v.updating),v.hasAsyncArcadeExpressions&&(r.hasAsyncArcadeExpressions=!0),v.status==="failed")return!0;let u=v.getValues(m)??{};if(i.objectIdField&&u[i.objectIdField]!==void 0){let{[i.objectIdField]:w,...z}=u;u=z}return Object.keys(u).forEach(w=>{i.fieldsIndex.has(w)&&(t.attributes[w]=ze(u[w],w,i.fieldsIndex))}),v.invalidFeatures.length>0}function ve(e,t){for(let i of e)i.type==="group"?ve(i.elements,t):i.type==="field"&&i.valueExpression&&t.add(i.fieldName)}function we(e,t){for(let i of e)i.type==="group"?we(i.elements,t):i.type==="field"&&i.requiredExpression&&t.add(i.fieldName)}function be(e){return typeof e=="number"}function Le(e){return typeof e=="number"&&window.isFinite(e)&&Math.floor(e)===e}function ze(e,t,i){if(e==null)return null;switch(i.get(t).type){case"big-integer":case"long":case"oid":case"integer":case"small-integer":return Le(e)?e:window.parseInt(e);case"single":case"double":return be(e)?e:window.parseFloat(e);case"global-id":case"guid":return e===""?null:e;case"date":break;case"date-only":case"time-only":case"timestamp-offset":return e===""?null:e;case"string":return e===""?null:e}return e}function Ve(e){return e&&"layer"in e?e.layer:void 0}function I(e){if(!e)return null;let t=Ve(e.origin)??e.layer??e?.sourceLayer??null;if(t&&t.type==="subtype-sublayer")return t.parent;switch(t?.type){case"csv":case"feature":case"geojson":case"ogc-feature":case"subtype-group":case"wfs":return t;default:return null}}var De=Object.defineProperty,Be=Object.getOwnPropertyDescriptor,A=(e,t,i,a)=>{for(var r=a>1?void 0:a?Be(t,i):t,o=e.length-1,l;o>=0;o--)(l=e[o])&&(r=(a?l(t,i,r):l(r))||r);return a&&r&&De(t,i,r),r},ye={noChangeError:"Operation has not made any changes",noSelectedError:"Operation requires a selected feature",deletesGeometryError:"Operation would result in a null geometry",noGeometryError:"The selected feature has not geometry"},g=class extends Z{constructor(e){super(e)}get mustShowOnCommandPage(){return!0}get icon(){}get id(){return""}label(e,t){return""}description(e,t){return""}get commandEnabled(){return!1}commandDisabledReason(e,t){return""}get immediate(){return!1}async initiate(e,t){}async execute(){throw new Error("arcgis-paste: Paste command does not support execute")}async runPasteCommand(e,t,i){try{this.viewModel.applying=!0;let a=await this.prepareCopy(t);if(!a||a.items.length===0){this.viewModel.lastPasteError={errorCode:"noPasteItems",errorMessage:"No items to paste",localizedErrorMessage:"noPasteItemsError"},e.onPasteError(this.viewModel.lastPasteError);return}let r=a.items.length>this.viewModel.maximumFeatureCount||this.viewModel.alwaysShowFeatureForm||i?.showFeatureForm===!0||!await ge(a,this.viewModel.view,this.viewModel.formViewModelMap,this.viewModel.maximumFeatureCountWithComplexForms);if(this.viewModel.alwaysShowFeatureForm||r||i?.showFeatureForm===!0)this.viewModel.bauActiveFeatureIndex=0,this.viewModel.bauApplySet=a,this.viewModel.activeCommand=t,this.viewModel.bauOriginalGraphics=a.items.map(o=>o.type==="add"?{layer:o.layer,graphic:o.graphic}:null).filter(o=>o!==null),this.viewModel.bauFeatures=new j,this.viewModel.activeFlowPage="form-page",await new Promise(o=>{setTimeout(o,100)}),this.viewModel.bauFeatures=new j(this.viewModel.bauOriginalGraphics.map(o=>(o.graphic.layer=o.layer,o.graphic))),this.viewModel.updateIndividualMultiFeatureFormHighlight();else try{let o=await e.onApply({command:"paste",applySet:a});if(o.success){this.viewModel.resetHome(),this.viewModel.closeOnApply&&e.closeAfterApply();return}this.viewModel.handleApplyError(o,e.onPasteError)}catch(o){this.viewModel.lastPasteError={errorCode:"unexpectedError",errorMessage:o.message,localizedErrorMessage:"unexpectedError"},e.onPasteError(this.viewModel.lastPasteError);return}finally{a?.featureState?.clearAll()}}finally{this.viewModel.applying=!1}}async prepareCopy(e){let t=e==="paste"||e==="paste-as"&&this.viewModel.pasteWithAttributes||e==="paste-merge"&&this.viewModel.pasteWithAttributes,i=t&&e==="paste-merge"?this.viewModel.clipboard.items.getItemAt(this.viewModel.selectedClipboardItemIndex):null,a=J();if(a.featureState=Q(this.viewModel.view),e==="paste-merge"){let r=this.viewModel.pasteTemplate?.template?await ce(this.viewModel.view,this.viewModel.pasteTemplate.template):null;if(!r)return null;let o=de(this.viewModel.pasteTemplate.template)?r.layer:this.viewModel.pasteTemplate.layer,l=await this.createMergedClipboardGeom(),h=await this.constructFeatureAttributesCopy(r,o,i),p=new B({geometry:l,attributes:h});this.removeGraphicIdentifierFields(p,o),a.push(q({graphic:p,layer:o}))}else if(e==="paste")for(let r of this.viewModel.clipboardFeatures){let o=r.graphic.clone();this.removeGraphicIdentifierFields(o,r.layer),a.push(q({graphic:o,layer:r.layer}))}else if(e==="paste-as"){let r=this.viewModel.pasteTemplate?.template?await ce(this.viewModel.view,this.viewModel.pasteTemplate.template):null;if(!r)return null;let o=de(r)?r.layer:this.viewModel.pasteTemplate.layer;for(let l of this.viewModel.clipboardFeatures){let h=await this.constructFeatureAttributesCopy(r,o,t?l:null),p=new B({geometry:l.graphic?.geometry?.clone()??null,attributes:h});this.removeGraphicIdentifierFields(p,o),a.push(q({graphic:p,layer:o}))}}return a}async constructFeatureAttributesCopy(e,t,i){let a=Fe(e,{});if(i){let r=i.layer?.fields;if(r){let o=t.fields,l=i.graphic.attributes??{},h=await Ee(t,a);a=Ie(r,o,l,a,h,t)}}return a}async createMergedClipboardGeom(){let e=this.viewModel.clipboardFeatures.map(t=>t.graphic?.geometry).filter(t=>t!=null).toArray();return e.length===0?null:e.length===1?e[0].clone():(await $arcgis.t(m=>m[0],"geometry/operators/unionOperator")).executeMany(e)??null}removeGraphicIdentifierFields(e,t){t.objectIdField&&delete e.attributes[t.objectIdField],t.globalIdField&&delete e.attributes[t.globalIdField]}};A([s()],g.prototype,"viewModel",2);A([s()],g.prototype,"mustShowOnCommandPage",1);A([s()],g.prototype,"icon",1);A([s()],g.prototype,"id",1);A([s()],g.prototype,"commandEnabled",1);A([s()],g.prototype,"commandDisabledReason",1);A([s()],g.prototype,"immediate",1);g=A([C("components.paste.commands.PasteCommand")],g);var je=Object.defineProperty,We=Object.getOwnPropertyDescriptor,T=(e,t,i,a)=>{for(var r=a>1?void 0:a?We(t,i):t,o=e.length-1,l;o>=0;o--)(l=e[o])&&(r=(a?l(t,i,r):l(r))||r);return a&&r&&je(t,i,r),r},F=class extends g{get id(){return"paste-append"}get icon(){return"reshape-add-geometry"}get immediate(){return!0}get mustShowOnCommandPage(){return!0}get commandEnabled(){return this.viewModel.clipboardFeatures.length>0&&this.viewModel.selectedFeature!==void 0&&this.viewModel.layerPermissionsCheck.canUpdate(I(this.viewModel.selectedFeature))&&this.viewModel.selectedFeature?.geometry!==null&&(this.viewModel.selectedFeature?.geometry?.type==="multipoint"||this.viewModel.selectedFeature?.geometry?.type==="polyline"||this.viewModel.selectedFeature?.geometry?.type==="polygon")&&this.viewModel.clipboard.singleGeometryType===this.viewModel.selectedFeature?.geometry?.type}async initiate(e){let t=null;try{this.viewModel.applying=!0;let i=await this.prepareAppend();if(i.applySet&&(t=i.applySet),!i.success){this.viewModel.lastPasteError={errorCode:i.failReason,errorMessage:ye[i.failReason],localizedErrorMessage:i.failReason},e.onPasteError(this.viewModel.lastPasteError);return}let a=await e.onApply({command:"paste-append",applySet:i.applySet});if(a.success){this.viewModel.resetHome(),this.viewModel.closeOnApply&&e.closeAfterApply();return}this.viewModel.handleApplyError(a,e.onPasteError)}catch(i){this.viewModel.lastPasteError={errorCode:"unexpectedError",errorMessage:i.message,localizedErrorMessage:"unexpectedError"},e.onPasteError(this.viewModel.lastPasteError);return}finally{this.viewModel.applying=!1,t&&(t.featureState?.clearAll(),t.featureState=null)}}async execute(){let e=await this.prepareAppend();if(!e.success)throw new Error(`arcgis-paste: Paste append failed. ${e.failReason}`);return{success:!0,userInputRequired:!1,applySet:e.applySet}}async prepareAppend(){let e=J();if(e.featureState=Q(this.viewModel.view),!this.viewModel.selectedFeature)return{success:!1,failReason:"noSelectedError"};let[t,i]=await Promise.all([$arcgis.t(m=>m[0],"geometry/operators/unionOperator"),$arcgis.t(m=>m[0],"geometry/operators/equalsOperator")]),a=this.viewModel.selectedFeature.geometry,r=!1;for(let l of this.viewModel.clipboardFeatures){let h=l?.graphic?.geometry??null;if(!h)continue;if(a===null){a=l?.graphic?.geometry??null,a&&(a=a.clone(),r=!0);continue}let p=t.execute(a,h);i.execute(a,p)||(a=p,r=!0)}if(!r)return{success:!1,failReason:"noChangeError"};let o=this.viewModel.selectedFeature.clone();return o.geometry=a,e.push(W({graphic:o,layer:I(this.viewModel.selectedFeature),originalGraphic:this.viewModel.selectedFeature})),{success:!0,applySet:e}}description(e,t){return e.pasteAppendDesc}label(e,t){return e.pasteAppendTitle}};T([s()],F.prototype,"id",1);T([s()],F.prototype,"icon",1);T([s()],F.prototype,"immediate",1);T([s()],F.prototype,"mustShowOnCommandPage",1);T([s()],F.prototype,"commandEnabled",1);F=T([C("components.paste.commands.PasteAppendCommand")],F);var Re=Object.defineProperty,Ne=Object.getOwnPropertyDescriptor,H=(e,t,i,a)=>{for(var r=a>1?void 0:a?Ne(t,i):t,o=e.length-1,l;o>=0;o--)(l=e[o])&&(r=(a?l(t,i,r):l(r))||r);return a&&r&&Re(t,i,r),r},_=class extends g{get id(){return"paste-subtract"}get icon(){return"reshape-subtract-geometry"}get immediate(){return!0}get mustShowOnCommandPage(){return!0}get commandEnabled(){return this.viewModel.clipboardFeatures.length>0&&this.viewModel.selectedFeature!==void 0&&this.viewModel.layerPermissionsCheck.canUpdate(I(this.viewModel.selectedFeature))&&this.viewModel.selectedFeature?.geometry!==null&&(this.viewModel.selectedFeature?.geometry?.type==="multipoint"||this.viewModel.selectedFeature?.geometry?.type==="polyline"||this.viewModel.selectedFeature?.geometry?.type==="polygon")&&(this.viewModel.clipboard.singleGeometryType===this.viewModel.selectedFeature?.geometry?.type||this.viewModel.clipboard.singleGeometryType==="polygon")}async prepareSubtract(){let e=J();if(e.featureState=Q(this.viewModel.view),!this.viewModel.selectedFeature)return{success:!1,failReason:"noSelectedError",applySet:e};let[t,i]=await Promise.all([$arcgis.t(m=>m[0],"geometry/operators/differenceOperator"),$arcgis.t(m=>m[0],"geometry/operators/equalsOperator")]),a=this.viewModel.selectedFeature.geometry;if(!a)return{success:!1,failReason:"noGeometryError",applySet:e};let r=!1;for(let l of this.viewModel.clipboardFeatures){let h=l?.graphic?.geometry;if(!h)continue;let p=t.execute(a,h);if(!p)return{success:!1,failReason:"deletesGeometryError",applySet:e};i.execute(a,p)||(a=p,r=!0)}if(!r)return{success:!1,failReason:"noChangeError",applySet:e};let o=this.viewModel.selectedFeature.clone();return o.geometry=a,e.push(W({graphic:o,layer:I(this.viewModel.selectedFeature),originalGraphic:this.viewModel.selectedFeature})),{success:!0,applySet:e}}async execute(){let e=await this.prepareSubtract();if(!e.success)throw new Error(`arcgis-paste: Paste subtract failed. ${e.failReason}`);return{success:!0,userInputRequired:!1,applySet:e.applySet}}async initiate(e){let t=null;try{this.viewModel.applying=!0;let i=await this.prepareSubtract();if(i.applySet&&(t=i.applySet),!i.success){this.viewModel.lastPasteError={errorCode:i.failReason,errorMessage:ye[i.failReason],localizedErrorMessage:i.failReason},e.onPasteError(this.viewModel.lastPasteError);return}let a=await e.onApply({command:"paste-subtract",applySet:i.applySet});if(a.success){this.viewModel.resetHome(),this.viewModel.closeOnApply&&e.closeAfterApply();return}this.viewModel.handleApplyError(a,e.onPasteError)}catch(i){this.viewModel.lastPasteError={errorCode:"unexpectedError",errorMessage:i.message,localizedErrorMessage:"unexpectedError"},e.onPasteError(this.viewModel.lastPasteError);return}finally{this.viewModel.applying=!1,t&&(t.featureState?.clearAll(),t.featureState=null)}}description(e,t){return e.pasteSubtractDesc}label(e,t){return e.pasteSubtractTitle}};H([s()],_.prototype,"id",1);H([s()],_.prototype,"icon",1);H([s()],_.prototype,"immediate",1);H([s()],_.prototype,"mustShowOnCommandPage",1);H([s()],_.prototype,"commandEnabled",1);_=H([C("components.paste.commands.PasteSubtractCommand")],_);var Ue=Object.defineProperty,qe=Object.getOwnPropertyDescriptor,O=(e,t,i,a)=>{for(var r=a>1?void 0:a?qe(t,i):t,o=e.length-1,l;o>=0;o--)(l=e[o])&&(r=(a?l(t,i,r):l(r))||r);return a&&r&&Ue(t,i,r),r},x=class extends g{get id(){return"paste-as"}get icon(){return"templates"}get immediate(){return!1}get mustShowOnCommandPage(){return!1}get commandEnabled(){return(this.viewModel.clipboardFeatures.length===1||this.viewModel.clipboardFeatures.length>0&&this.viewModel.pasteWithMultipleFeaturesEnabled)&&this.viewModel.clipboard.singleGeometryType!==void 0}async initiate(e){this.viewModel.activeFlowPage="gallery-page",this.viewModel.activeCommand="paste-as"}description(e,t){return e.pasteAsDesc}label(e,t){return e.pasteAsTitle}};O([s()],x.prototype,"id",1);O([s()],x.prototype,"icon",1);O([s()],x.prototype,"immediate",1);O([s()],x.prototype,"mustShowOnCommandPage",1);O([s()],x.prototype,"commandEnabled",1);x=O([C("components.paste.commands.PasteAsCommand")],x);var Xe=Object.defineProperty,Ke=Object.getOwnPropertyDescriptor,G=(e,t,i,a)=>{for(var r=a>1?void 0:a?Ke(t,i):t,o=e.length-1,l;o>=0;o--)(l=e[o])&&(r=(a?l(t,i,r):l(r))||r);return a&&r&&Xe(t,i,r),r},P=class extends g{get id(){return"paste"}get icon(){return"duplicate"}get immediate(){return!0}get mustShowOnCommandPage(){return!0}get commandEnabled(){let e=this.viewModel.clipboardFeatures.length===1,t=this.viewModel.clipboardFeatures.length>0&&this.viewModel.clipboardItemLayers.length===1&&this.viewModel.pasteWithMultipleFeaturesEnabled,i=this.viewModel.clipboardFeatures.length>0&&this.viewModel.pasteWithMultipleFeaturesEnabled&&this.viewModel.pasteWithMultipleLayersEnabled;return this.viewModel.clipboardFeatures.length>0&&this.viewModel.canCreateOnAllLayers&&(e||t||i)}async initiate(e,t){await this.runPasteCommand(e,"paste",t)}async execute(){let e=await this.prepareCopy("paste");if(!e||e.items.length===0)throw new Error("arcgis-paste: No items to paste");return e.items.length>this.viewModel.maximumFeatureCount||!await ge(e,this.viewModel.view,this.viewModel.formViewModelMap,this.viewModel.maximumFeatureCountWithComplexForms)?{success:!1,userInputRequired:!0}:{success:!0,userInputRequired:!1,applySet:e}}description(e,t){return e.pasteDesc}label(e,t){return e.pasteTitle}};G([s()],P.prototype,"id",1);G([s()],P.prototype,"icon",1);G([s()],P.prototype,"immediate",1);G([s()],P.prototype,"mustShowOnCommandPage",1);G([s()],P.prototype,"commandEnabled",1);P=G([C("components.paste.commands.PasteSetCommand")],P);var Ze=Object.defineProperty,Je=Object.getOwnPropertyDescriptor,L=(e,t,i,a)=>{for(var r=a>1?void 0:a?Je(t,i):t,o=e.length-1,l;o>=0;o--)(l=e[o])&&(r=(a?l(t,i,r):l(r))||r);return a&&r&&Ze(t,i,r),r},$=class extends g{get id(){return"paste-merge"}get icon(){return"merge"}get immediate(){return!1}get mustShowOnCommandPage(){return!0}get commandEnabled(){return this.viewModel.clipboardFeatures.length>1&&this.viewModel.clipboard.singleGeometryType!==void 0}async initiate(e){this.viewModel.activeFlowPage="gallery-page",this.viewModel.activeCommand="paste-merge";for(let t=0;t<this.viewModel.clipboard.items.length;t++)if(this.viewModel.clipboard.items.getItemAt(t).type==="feature"){this.viewModel.selectedClipboardItemIndex=t;break}}description(e,t){return e.pasteMergeDesc}label(e,t){return e.pasteMergeTitle}};L([s()],$.prototype,"id",1);L([s()],$.prototype,"icon",1);L([s()],$.prototype,"immediate",1);L([s()],$.prototype,"mustShowOnCommandPage",1);L([s()],$.prototype,"commandEnabled",1);$=L([C("components.paste.commands.PasteMergeCommand")],$);var Qe=Object.defineProperty,Ye=Object.getOwnPropertyDescriptor,k=(e,t,i,a)=>{for(var r=a>1?void 0:a?Ye(t,i):t,o=e.length-1,l;o>=0;o--)(l=e[o])&&(r=(a?l(t,i,r):l(r))||r);return a&&r&&Qe(t,i,r),r},f=class extends g{constructor(e){super(e)}get id(){return this.customCommand.id}get icon(){return this.customCommand.icon}get immediate(){return!0}get mustShowOnCommandPage(){return!0}get commandEnabled(){return this.customCommand.commandEnabled(this.viewModel.clipboard,this.viewModel.selectedFeature)}async initiate(e){try{this.viewModel.applying=!0;let t=await e.onApply({command:this.id});if(t.success){this.viewModel.resetHome(),this.viewModel.closeOnApply&&e.closeAfterApply();return}this.viewModel.handleApplyError(t,e.onPasteError)}catch(t){this.viewModel.lastPasteError={errorCode:"unexpectedError",errorMessage:t.message,localizedErrorMessage:"unexpectedError"},e.onPasteError(this.viewModel.lastPasteError);return}finally{this.viewModel.applying=!1}}description(e,t){return this.customCommand.description(e,t)}label(e,t){return this.customCommand.label(e,t)}};k([s()],f.prototype,"customCommand",2);k([s()],f.prototype,"id",1);k([s()],f.prototype,"icon",1);k([s()],f.prototype,"immediate",1);k([s()],f.prototype,"mustShowOnCommandPage",1);k([s()],f.prototype,"commandEnabled",1);f=k([C("components.paste.commands.PasteCustomCommand")],f);var et=Object.defineProperty,tt=Object.getOwnPropertyDescriptor,c=(e,t,i,a)=>{for(var r=a>1?void 0:a?tt(t,i):t,o=e.length-1,l;o>=0;o--)(l=e[o])&&(r=(a?l(t,i,r):l(r))||r);return a&&r&&et(t,i,r),r};function he(e){return!me(e)||e.type==="feature"}var n=class extends Z{constructor(e){super(e),this.customPasteCommands=new j,this.bauInvalidFeatures=[],this.bauFormValid=!0,this.bauFormUpdating=!1,this.bauActiveFeatureIndex=-1,this.bauHasTooManyFeatures=!1,this.bauHasTooManyComplexFeatures=!1,this.bauOriginalGraphics=[],this.formViewModelMap=new Map,this.supportedCommands=["paste-append","paste-as","paste-subtract","paste","paste-merge"],this.pasteWithMultipleLayersEnabled=!1,this.pasteWithMultipleFeaturesEnabled=!1,this.alwaysShowFeatureForm=!1,this.selectedClipboardItemIndex=-1,this.pasteWithAttributes=!0,this.closeOnApply=!1,this.currentPasteOperation="",this._activeFlowPage="commands-page",this.showClipboardItems=!1,this.hideTooltips=!1,this.hideFooter=!1,this.hideFooterCancelButton=!1,this.hideHeaderCloseButton=!1,this.hideViewClipboard=!1,this.hideErrorNotice=!1,this.highlightGroup="temporary",this._hoverHighlightHandle=null,this.maximumFeatureCount=200,this.maximumFeatureCountWithComplexForms=50,this.layerPermissionsCheck={canCreate:t=>t?!!t.effectiveCapabilities?.operations.supportsAdd:!1,canUpdate:t=>{if(!t)return!1;let i=t.effectiveCapabilities,a=!!i?.operations.supportsUpdate,r=!!i?.editing.supportsGeometryUpdate&&a;return!t.isTable&&!r?!1:a}},this.applying=!1}get bauActiveGraphic(){return this.bauActiveFeatureIndex===-1?void 0:this.bauFeatures?.getItemAt(this.bauActiveFeatureIndex)}get hasTooManyPasteCreateFeatures(){return this.clipboardFeatures.length>this.maximumFeatureCount&&["paste","paste-as"].includes(this.activeCommand??"")}get bauActiveLayer(){if(this.bauActiveFeatureIndex!==-1&&this.bauFeatures)return I(this.bauFeatures.getItemAt(this.bauActiveFeatureIndex))??void 0}get pasteTemplateIsValid(){return this.pasteTemplate?this.pasteTemplate.layer?!!this.workingLayers.includes(this.pasteTemplate.layer.type==="subtype-sublayer"?this.pasteTemplate.layer.parent:this.pasteTemplate.layer):!1:!0}get clipboardAndTemplateSupportAttributes(){if(this.clipboardFeatures.length===0||!this.pasteTemplate?.layer)return!1;let e=this.pasteTemplate.template;if(!he(e))return!1;for(let t of this.clipboardFeatures){let i=t.layer;if(!i)return!1;let a=i.type==="subtype-sublayer"?i.parent:i;if(a.type==="subtype-group"){let r=a.fieldsIndex.get(a.subtypeField).name,o=e.prototype?.[r];if(o==null||o!==t.graphic.attributes[r])return!1}}return!0}get hasClipboardItemMatchingTemplate(){let e=this.pasteTemplate?.layer;if(!e||this.clipboardFeatures.length===0)return!1;let t=this.pasteTemplate.template;if(!he(t))return!1;for(let i of this.clipboardFeatures){let a=i.layer;if(!a)return!1;let r=a.type==="subtype-sublayer"?a.parent:a;if(e===a){if(r.type==="subtype-group"){let o=r.fieldsIndex.get(r.subtypeField).name,l=t.prototype?.[o];if(l==null||l!==i.graphic.attributes[o])continue}return!0}}return!1}get activeFlowPage(){return this._activeFlowPage}set activeFlowPage(e){e==="clipboard"&&this.beforeClipboard===void 0?this.beforeClipboard=this.activeFlowPage:e!=="clipboard"&&(this.beforeClipboard=void 0),e==="form-page"&&this.beforeForm===void 0?this.beforeForm=this.activeFlowPage:e!=="form-page"&&(this.beforeForm=void 0),this._activeFlowPage=e,this.checkAndSuspendMove()}get updating(){return this.applying}formFeatureValuesChanged(e,t){if(!t)return;let i=e.graphic.clone();for(let r of Object.keys(t))i.attributes[r]=t[r];let a=W({graphic:i,originalGraphic:e.graphic.clone(),layer:e.layer});this.bauApplySet?.push(a)}highlightSelectedGraphicOnMap(e){if(this.clearHighlightSelectedGraphic(),!e.graphic?.geometry||!this.view)return;let t=new B({geometry:e.graphic.geometry,symbol:ne(e.graphic.geometry.type)});this.view.graphics.add(t),this._hoverHighlightHandle={remove:()=>{this.view.graphics.remove(t)}}}clearHighlightSelectedGraphic(){this._hoverHighlightHandle?.remove(),this._hoverHighlightHandle=null}updateIndividualMultiFeatureFormHighlight(){if(this.activeFlowPage!=="form-page"){this.clearIndividualFeatureFormHighlight();return}if(this.view)if(this.bauActiveGraphic&&this.bauActiveLayer){if(this.bauIndividualHighlight?.graphic!==this.bauActiveGraphic&&this.clearIndividualFeatureFormHighlight(),!this.bauIndividualHighlight){let e=U(this.view,this.bauActiveLayer);if(!e)return;this.bauIndividualHighlight={graphic:this.bauActiveGraphic,handle:e.highlight(this.bauActiveGraphic,{name:this.highlightGroup})}}}else this.clearIndividualFeatureFormHighlight()}clearIndividualFeatureFormHighlight(){this.bauIndividualHighlight?.handle?.remove(),this.bauIndividualHighlight=void 0}highlightMultiFeatureFormFeature(e,t){this.bauHighlight&&this.clearMultiFeatureFormHighlights();let i=this.view?U(this.view,e.layer):void 0;i&&(this.bauHighlight=i.highlight(e,{name:this.highlightGroup}))}clearMultiFeatureFormHighlights(){this.bauHighlight?.remove(),this.bauHighlight=void 0}updateClipboardGraphicsLayer(){if(!this.showClipboardItems){if(this.clipboardMover?.cancel(),this.clipboardMover=void 0,this.clipboardGraphicsLayer&&this.view)try{this.view.map?.remove(this.clipboardGraphicsLayer),this.clipboardGraphicsLayer=void 0}catch{}return}if(this.showClipboardItems&&this.view){this.clipboardGraphicsLayer||(this.clipboardGraphicsLayer=new Ce({listMode:"hide"}),this.view.map?.layers.add(this.clipboardGraphicsLayer));let e=this.clipboard.items;this.clipboardGraphicsLayer.removeAll();let t=-1;for(let i of e){if(t++,i.type!=="feature"||!i.graphic.geometry)continue;let a=new B({geometry:i.graphic.geometry.clone(),attributes:{clipboardIdx:t},symbol:le(i.graphic.geometry.type)});this.clipboardGraphicsLayer.add(a)}}else if(!this.showClipboardItems&&this.view&&this.clipboardGraphicsLayer)try{this.view.map?.remove(this.clipboardGraphicsLayer),this.clipboardGraphicsLayer=void 0}catch{}this.checkAndSuspendMove()}checkAndSuspendMove(){let e=this.activeFlowPage==="form-page";this.clipboardGraphicsLayer&&(this.clipboardGraphicsLayer.visible=!e),this.clipboardMover&&(this.clipboardMover.suspended=e)}get clipboard(){return Me()}get clipboardFeatures(){return this.clipboard.items.filter(e=>e.type==="feature")}get hasPasteCommandsPage(){return this.availableCommands.length>1||!!this.availableCommands.at(0)?.mustShowOnCommandPage}_clearActiveCommand(){this.activeCommand=void 0,this.lastPasteError=void 0}resetHome(){let e=this.activeFlowPage;this.hasPasteCommandsPage?(e="commands-page",this._clearActiveCommand(),this.selectedClipboardItemIndex=-1):this.clipboard.items.length===0?(e="clipboard-empty-page",this._clearActiveCommand(),this.selectedClipboardItemIndex=-1):this.availableCommands.length===0?(e="no-command-page",this._clearActiveCommand()):this.availableCommands[0].commandEnabled?(e="gallery-page",this.activeCommand=this.availableCommands[0].id,this.lastPasteError=void 0):(e="no-command-page",this._clearActiveCommand(),this.selectedClipboardItemIndex=-1),this.activeFlowPage==="clipboard"&&this.hideViewClipboard?(this.activeFlowPage=e,this.beforeClipboard=void 0):this.activeFlowPage==="clipboard"&&!this.hideViewClipboard?this.beforeClipboard=e:(this.activeFlowPage=e,this.beforeClipboard=void 0),this.resetFormPage()}get workingLayers(){return(this.view?.map?.allLayers?.toArray()??[]).filter(e=>e.type==="feature"||e.type==="subtype-group").filter(e=>{let t=this.clipboard.singleGeometryType;return this.activeCommand==="paste-merge"&&this.clipboard.singleGeometryType==="point"&&(t="multipoint"),!(e.geometryType!==t||!this.layerPermissionsCheck.canCreate(e))})}get clipboardItemLayers(){let e=new Set;for(let t of this.clipboard.items)t.layer&&e.add(t.layer.type==="subtype-sublayer"?t.layer.parent:t.layer);return[...e]}get canCreateOnAllLayers(){if(this.clipboardItemLayers.length===0)return!1;for(let e of this.clipboardItemLayers)if(!e||!this.layerPermissionsCheck.canCreate(e))return!1;return!0}get availableCommands(){let e=new Set(this.supportedCommands);return this.allCommands.filter(t=>e.has(t.id))}get allCommands(){let e=[];e.push(...[P,x,$,F,_].map(t=>new t({viewModel:this})));for(let t of this.customPasteCommands)e.push(new f({viewModel:this,customCommand:t}));return e}get pasteCommandsState(){return this.allCommands.map(e=>({id:e.id,disabled:!e.commandEnabled,available:this.supportedCommands.includes(e.id)}))}nextActiveFeature(){this.bauActiveFeatureIndex++,this.updateIndividualMultiFeatureFormHighlight()}previousActiveFeature(){this.bauActiveFeatureIndex--,this.updateIndividualMultiFeatureFormHighlight()}resetFormPage(){this.bauApplySet?.featureState?.clearAll(),this.bauApplySet=void 0,this.clearIndividualFeatureFormHighlight(),this.clearMultiFeatureFormHighlights(),this.bauFeatures=void 0,this.bauOriginalGraphics=[]}getPasteCommandById(e){return this.allCommands.find(t=>t.id===e)}async runPasteFormCommand(e){try{this.applying=!0;let t=this.bauApplySet,i=await e.onApply({command:this.activeCommand,applySet:t});if(i.success){this.resetHome(),this.closeOnApply&&e.closeAfterApply();return}this.handleApplyError(i,e.onPasteError)}catch(t){this.lastPasteError={errorCode:"unexpectedError",errorMessage:t.message,localizedErrorMessage:"unexpectedError"},e.onPasteError(this.lastPasteError);return}finally{this.applying=!1}}handleApplyError(e,t){e.success||e.errorCode!=="cancelled"&&(this.lastPasteError={errorCode:e.errorCode??"unexpectedError",errorMessage:e.errorMessage??"",localizedErrorMessage:e.errorMessage?void 0:"unexpectedError"},t(this.lastPasteError))}async writeChanges(e){return await _e(e,this.view)}};c([s()],n.prototype,"customPasteCommands",2);c([s()],n.prototype,"bauInvalidFeatures",2);c([s()],n.prototype,"bauFormValid",2);c([s()],n.prototype,"bauFormUpdating",2);c([s()],n.prototype,"bauActiveFeatureIndex",2);c([s()],n.prototype,"bauHasTooManyFeatures",2);c([s()],n.prototype,"bauHasTooManyComplexFeatures",2);c([s()],n.prototype,"bauActiveGraphic",1);c([s()],n.prototype,"hasTooManyPasteCreateFeatures",1);c([s()],n.prototype,"bauActiveLayer",1);c([s()],n.prototype,"bauFeatures",2);c([s()],n.prototype,"bauApplySet",2);c([s()],n.prototype,"bauOriginalGraphics",2);c([s()],n.prototype,"formViewModelMap",2);c([s()],n.prototype,"bauHighlight",2);c([s()],n.prototype,"bauIndividualHighlight",2);c([s()],n.prototype,"view",2);c([s()],n.prototype,"supportedCommands",2);c([s()],n.prototype,"selectedFeature",2);c([s()],n.prototype,"pasteWithMultipleLayersEnabled",2);c([s()],n.prototype,"pasteWithMultipleFeaturesEnabled",2);c([s()],n.prototype,"alwaysShowFeatureForm",2);c([s()],n.prototype,"pasteTemplate",2);c([s()],n.prototype,"pasteTemplateIsValid",1);c([s()],n.prototype,"selectedClipboardItemIndex",2);c([s()],n.prototype,"clipboardAndTemplateSupportAttributes",1);c([s()],n.prototype,"hasClipboardItemMatchingTemplate",1);c([s()],n.prototype,"pasteWithAttributes",2);c([s()],n.prototype,"closeOnApply",2);c([s()],n.prototype,"currentPasteOperation",2);c([s()],n.prototype,"activeFlowPage",1);c([s()],n.prototype,"_activeFlowPage",2);c([s()],n.prototype,"beforeClipboard",2);c([s()],n.prototype,"beforeForm",2);c([s()],n.prototype,"showClipboardItems",2);c([s()],n.prototype,"updating",1);c([s()],n.prototype,"hideTooltips",2);c([s()],n.prototype,"hideFooter",2);c([s()],n.prototype,"hideFooterCancelButton",2);c([s()],n.prototype,"hideHeaderCloseButton",2);c([s()],n.prototype,"hideViewClipboard",2);c([s()],n.prototype,"hideErrorNotice",2);c([s()],n.prototype,"clipboardGraphicsLayer",2);c([s()],n.prototype,"clipboardMover",2);c([s()],n.prototype,"highlightGroup",2);c([s()],n.prototype,"clipboard",1);c([s()],n.prototype,"clipboardFeatures",1);c([s()],n.prototype,"hasPasteCommandsPage",1);c([s()],n.prototype,"activeCommand",2);c([s()],n.prototype,"maximumFeatureCount",2);c([s()],n.prototype,"maximumFeatureCountWithComplexForms",2);c([s()],n.prototype,"workingLayers",1);c([s()],n.prototype,"layerPermissionsCheck",2);c([s()],n.prototype,"clipboardItemLayers",1);c([s()],n.prototype,"canCreateOnAllLayers",1);c([s()],n.prototype,"applying",2);c([s()],n.prototype,"lastPasteError",2);c([s()],n.prototype,"availableCommands",1);c([s()],n.prototype,"allCommands",1);c([s()],n.prototype,"pasteCommandsState",1);n=c([C("components.paste.PasteViewModel")],n);var it=Object.defineProperty,at=Object.getOwnPropertyDescriptor,S=(e,t,i,a)=>{for(var r=a>1?void 0:a?at(t,i):t,o=e.length-1,l;o>=0;o--)(l=e[o])&&(r=(a?l(t,i,r):l(r))||r);return a&&r&&it(t,i,r),r},M=class extends Z{constructor(){super(...arguments),this.continuous=!1,this._mover=null,this.stateChanged=null,this._suspended=!1}clipboardContentsChanged(){this._destroyMover(),this.stateChanged?.("clipboard-contents-changed"),this.continuous&&this.start()}start(){this._destroyMover(),this._mover=$e({view:this.view,graphics:this.graphicsLayer.graphics.toArray(),indicatorsEnabled:!0,highlightsEnabled:!0,enableMoveAllGraphics:!0,callbacks:{onGraphicPointerOver:()=>{"cursor"in this.view&&(this.view.cursor="move")},onGraphicPointerOut:()=>{"cursor"in this.view&&(this.view.cursor="default")},onGraphicMoveStop:async()=>{"cursor"in this.view&&(this.view.cursor="default");for(let e of this.graphicsLayer.graphics)this.clipboard.items.getItemAt(e.attributes.clipboardIdx).graphic.geometry=e.geometry;this._destroyMover(),this.stateChanged?.("contents-moved"),this.continuous&&setTimeout(()=>{this.start()},100)}}})}cancel(){this.continuous=!1,this._destroyMover(),this.stateChanged?.("completed")}get suspended(){return this._suspended}set suspended(e){e!==this._suspended&&(e?(this._destroyMover(),this.stateChanged?.("suspended")):(this.start(),this.stateChanged?.("suspended")),this._suspended=e)}_destroyMover(){this._mover?.destroy(),this._mover=null}};S([s()],M.prototype,"view",2);S([s()],M.prototype,"continuous",2);S([s()],M.prototype,"clipboard",2);S([s()],M.prototype,"graphicsLayer",2);S([s()],M.prototype,"suspended",1);S([s()],M.prototype,"_suspended",2);M=S([C("components.paste.ClipboardMove")],M);var rt=oe(n),K=class extends ee{constructor(){super(),this._featureFormElement=V(),this._floatingChoiceContainer=V(),this._bauForm=V(),this._templateGallery=V(),this._messages=se(),this.viewModel=rt(this),this.hasPasteCommandsPage=this.viewModel.hasPasteCommandsPage,this.activeCommand=this.viewModel.activeCommand,this.availableCommands=this.viewModel.availableCommands,this._showFloatingChoice=!1,this.activeFlowPage=this.viewModel.activeFlowPage,this.autoDestroyDisabled=!1,this.view=this.viewModel.view,this.selectedFeature=this.viewModel.selectedFeature,this.closed=!1,this.highlightGroup=this.viewModel.highlightGroup,this.pasteWithMultipleLayersEnabled=this.viewModel.pasteWithMultipleLayersEnabled,this.pasteWithMultipleFeaturesEnabled=this.viewModel.pasteWithMultipleFeaturesEnabled,this.alwaysShowFeatureForm=this.viewModel.alwaysShowFeatureForm,this.closeOnApply=this.viewModel.closeOnApply,this.hideErrorNotice=this.viewModel.hideErrorNotice,this.hideFooterCancelButton=this.viewModel.hideFooterCancelButton,this.hideFooter=this.viewModel.hideFooter,this.hideHeaderCloseButton=this.viewModel.hideHeaderCloseButton,this.hideTooltips=this.viewModel.hideTooltips,this.hideViewClipboard=this.viewModel.hideViewClipboard,this.maximumFeatureCount=this.viewModel.maximumFeatureCount,this.maximumFeatureCountWithComplexForms=this.viewModel.maximumFeatureCountWithComplexForms,this.layerPermissionsCheck=this.viewModel.layerPermissionsCheck,this.pasteCommandsState=this.viewModel.pasteCommandsState,this.arcgisApplyPasteCommand=E(),this.arcgisApplyPasteError=E(),this.arcgisBeforeClipboardMove=E(),this.arcgisClipboardMoveStateChanged=E(),this.arcgisClose=E(),this.arcgisPropertyChange=re()("pasteCommandsState","activeFlowPage"),this.arcgisReady=E(),this.listenOn(window,"click",this._handleClickAway),this.listenOn(window,"keydown",this._handleKeyDown)}static{this.properties={hasPasteCommandsPage:16,activeCommand:16,availableCommands:16,_showFloatingChoice:16,activeFlowPage:32,autoDestroyDisabled:5,referenceElement:1,view:0,selectedFeature:0,closed:7,highlightGroup:1,supportedCommands:1,pasteWithMultipleLayersEnabled:5,pasteWithMultipleFeaturesEnabled:5,alwaysShowFeatureForm:5,beforeApply:0,clipboard:32,closeOnApply:5,hideErrorNotice:5,hideFooterCancelButton:5,hideFooter:5,hideHeaderCloseButton:5,hideTooltips:5,hideViewClipboard:5,maximumFeatureCount:9,maximumFeatureCountWithComplexForms:9,layerPermissionsCheck:0,pasteCommandsState:0}}static{this.styles=Ae}get supportedCommands(){return this.viewModel.supportedCommands}set supportedCommands(t){if(!Array.isArray(t)){this.viewModel.supportedCommands=t.split(",");return}this.viewModel.supportedCommands=t.slice(0)}get clipboard(){return this.viewModel.clipboard}async cancelMoveClipboard(){this.viewModel.clipboardMover?.cancel(),this.viewModel.clipboardMover=void 0}async destroy(){await this.manager.destroy()}async executePasteCommand(t,i){let a=this.viewModel.getPasteCommandById(t);if(!a)throw new Error("arcgis-paste: Paste command not found");if(!a.commandEnabled)throw new Error("arcgis-paste: Paste command is not enabled");if(!i?.silent){if(!this.availableCommands.includes(a))throw new Error("arcgis-paste: Paste command is not available");return this.viewModel.resetHome(),await this._runPasteCommand(a,i),{userInputRequired:!1,success:!0}}return await a.execute()}async registerPasteCommand(t){this.viewModel.customPasteCommands.add(t)}async reset(){this.viewModel.activeFlowPage==="clipboard"&&(this.viewModel.activeFlowPage=this.viewModel.beforeClipboard),this.viewModel.resetHome()}async showClipboardItems(t){this.viewModel.showClipboardItems=t,this.viewModel.updateClipboardGraphicsLayer()}async startMoveClipboard(t){if(!this.viewModel.showClipboardItems)throw new Error("arcgis-paste: Cannot move clipboard. Clipboard items must be visible first.");this.arcgisBeforeClipboardMove.emit().defaultPrevented||(this.viewModel.clipboardMover&&(this.viewModel.clipboardMover.stateChanged=null,this.viewModel.clipboardMover.cancel(),this.viewModel.clipboardMover=void 0),this.viewModel.clipboardMover=new M({view:this.view,continuous:t,clipboard:this.clipboard,graphicsLayer:this.viewModel.clipboardGraphicsLayer,stateChanged:i=>{i==="contents-moved"&&this.viewModel.updateClipboardGraphicsLayer(),this.arcgisClipboardMoveStateChanged.emit({change:i})}}),this.viewModel.clipboardMover.start())}async writeChanges(t){return await this.viewModel.writeChanges(t)}updated(){this._featureFormElement.value&&(this._featureFormElement.value.hideReadOnlyNotice=!0,this._featureFormElement.value.disabled=!0),this._checkAndUpdateInitialPasteTemplate()}loaded(){this.manager.onLifecycle(()=>[this.viewModel.clipboard.items.on("change",()=>{this.viewModel.updateClipboardGraphicsLayer(),this.activeFlowPage==="form-page"&&this.viewModel.resetHome()}),X(()=>this.clipboard.version,()=>{this.viewModel.resetHome(),this.viewModel.updateClipboardGraphicsLayer(),this.viewModel.clipboardMover?.clipboardContentsChanged()}),X(()=>this.closed,()=>{this.closed&&this.viewModel.formViewModelMap.clear(),this.viewModel.updateClipboardGraphicsLayer()}),X(()=>[this.viewModel?.supportedCommands.join(","),this.pasteWithMultipleFeaturesEnabled,this.viewModel?.hideViewClipboard,this.pasteWithMultipleLayersEnabled].join(","),()=>{this.viewModel.resetHome()},{initial:!0})])}_handleCloseAfterApply(){this.closed=!0,this.arcgisClose.emit()}_updateBauViewModelFields(t){this.viewModel.bauActiveFeatureIndex=t.activeFeatureIndex,this.viewModel.bauInvalidFeatures=t.invalidFeatures,this.viewModel.bauFormValid=t.valid,this.viewModel.bauFormUpdating=t.updating,this.viewModel.bauHasTooManyComplexFeatures=t.hasTooManyComplexFeatures,this.viewModel.bauHasTooManyFeatures=t.hasTooManyFeatures}_handleClickAway(t){!this._showFloatingChoice||!this._floatingChoiceContainer.value||t.composedPath().find(i=>i===this._floatingChoiceContainer.value)||(this._showFloatingChoice=!1)}_handleKeyDown(t){!this._showFloatingChoice||!this._floatingChoiceContainer.value||t.composedPath().find(i=>i===this._floatingChoiceContainer.value)||(this._showFloatingChoice=!1)}async _runPasteCommand(t,i){try{this.viewModel.lastPasteError=void 0,await t.initiate({closeAfterApply:()=>{this._handleCloseAfterApply()},onPasteError:a=>{this.arcgisApplyPasteError.emit({command:t.id,errorMessage:a.errorMessage,errorCode:a.errorCode})},onApply:async a=>{try{await this.beforeApply?.();let r={...a};return this.arcgisApplyPasteCommand.emit(r).defaultPrevented?{success:!1,errorCode:"cancelled"}:r.completionCallback?await r.completionCallback??{success:!0}:{success:!0}}catch{return{success:!1}}}},i)}catch{}}_checkAndUpdateInitialPasteTemplate(){requestAnimationFrame(()=>{if(!this._templateGallery.value||this.viewModel.activeFlowPage!=="gallery-page")return;let t=this._templateGallery.value;if(t.state!=="ready")return;if(this.viewModel.pasteTemplateIsValid||(this.viewModel.pasteTemplate=void 0),this.viewModel.pasteTemplate!==void 0){t.selectedItem||this._templateGallery.value?.select(this.viewModel.pasteTemplate);return}let i;for(let a of t.items){if("items"in a){if(a.items.length>0){i=a.items[0];break}continue}i=a;break}i&&t.select(i)})}_renderFlowCommandStart(t){return t?d`<slot name=home-header-actions-start slot=header-actions-start></slot>`:null}_renderCloseCommand(t){return d`${this.hideHeaderCloseButton?null:d`<calcite-action slot=header-actions-end icon=x text @click=${()=>{this.reset(),this.closed=!0,this.arcgisClose.emit()}}></calcite-action>`}${t?d`<slot name=header-actions-end slot=header-actions-end></slot>`:null}`}_renderClipboardCommand(t){return d`<calcite-action slot=header-actions-end icon=clipboard .hidden=${this.viewModel.hideViewClipboard} .text=${this._messages.clipboardTooltip??""} .id=${`arcgis-clipboard-show-${t}`} .disabled=${this.viewModel.updating} @click=${()=>{this.viewModel.activeFlowPage="clipboard"}}>${this.hideTooltips?null:d`<calcite-tooltip .referenceElement=${`arcgis-clipboard-show-${t}`} placement=bottom><span>${this._messages.clipboardTooltip}</span></calcite-tooltip>`}</calcite-action>`}_renderNoClipboardData(t){return b("no-data",d`<calcite-flow-item .selected=${t} .heading=${this._messages.componentLabel} @calciteFlowItemBack=${i=>{i.preventDefault()}}>${this._renderClipboardCommand("no-data")}${this._renderCloseCommand(t)}<calcite-panel><div class="pad-contents"><div class="flex flex-row justify-center"><svg xmlns=http://www.w3.org/2000/svg height=92 width=92 style=${N({strokeWidth:"0.1px",fill:"var(--calcite-color-text-2)"})} viewBox="0 0 64 64">${R`<path d="M21 18h-1v-3h1zm24-3h-1v3h1zm0 5h-1v3h1zm-24 0h-1v3h1zm9.84 13.71l.3.954 3.02-.954-.3-.953zm-6.04 1.908l.3.953 3.02-.953-.3-.953zm-3.8 1.2V35h-1v3.182l2.08-.657-.3-.953zM21 30h-1v3h1zm0-5h-1v3h1zm27.816 5.896l-4.746.015 2.294 4.575-3.071 1.535-2.358-4.668-2.835 3.886V23.036zm-6.04-.78l3.607-.012-7.483-5.49v9.17l2.16-2.96 2.587 5.126 1.643-.821zM60.9 10.874v41.25a1.777 1.777 0 0 1-1.775 1.775H4.875A1.777 1.777 0 0 1 3.1 52.125v-41.25A1.777 1.777 0 0 1 4.875 9.1h54.25a1.777 1.777 0 0 1 1.775 1.775zm-.8 24.54l-24.2 7.641V53.1h23.225a.976.976 0 0 0 .975-.975zm0-24.54a.976.976 0 0 0-.975-.975H45V13h-1V9.9H21V13h-1V9.9H4.875a.976.976 0 0 0-.975.975V32.1H18v.8H3.9v19.225a.976.976 0 0 0 .975.975H35.1V35.51l.8-.252v6.96l24.2-7.643z" />`}</svg></div><p class="text-center">${this._messages.noClipboardData}</p></div></calcite-panel></calcite-flow-item>`)}_renderNoCommandPage(t){let i=this._messages.noPasteCommandsAvailable,a=this.availableCommands.at(0);return a?.commandDisabledReason&&(i=a.commandDisabledReason(this._messages,this._messages._lang),i||(i=this._messages.noPasteCommandsAvailable)),b("no-command",d`<calcite-flow-item .selected=${t} .heading=${this._messages.componentLabel} @calciteFlowItemBack=${r=>{r.preventDefault()}}>${this._renderClipboardCommand("no-command")}${this._renderCloseCommand(t)}<calcite-panel><div class="pad-contents"><div class="flex flex-row justify-center"><svg xmlns=http://www.w3.org/2000/svg height=92 width=92 style=${N({strokeWidth:"0.1px",fill:"var(--calcite-color-text-2)"})} viewBox="0 0 64 64">${R`<path d="M21 18h-1v-3h1zm24-3h-1v3h1zm0 5h-1v3h1zm-24 0h-1v3h1zm9.84 13.71l.3.954 3.02-.954-.3-.953zm-6.04 1.908l.3.953 3.02-.953-.3-.953zm-3.8 1.2V35h-1v3.182l2.08-.657-.3-.953zM21 30h-1v3h1zm0-5h-1v3h1zm27.816 5.896l-4.746.015 2.294 4.575-3.071 1.535-2.358-4.668-2.835 3.886V23.036zm-6.04-.78l3.607-.012-7.483-5.49v9.17l2.16-2.96 2.587 5.126 1.643-.821zM60.9 10.874v41.25a1.777 1.777 0 0 1-1.775 1.775H4.875A1.777 1.777 0 0 1 3.1 52.125v-41.25A1.777 1.777 0 0 1 4.875 9.1h54.25a1.777 1.777 0 0 1 1.775 1.775zm-.8 24.54l-24.2 7.641V53.1h23.225a.976.976 0 0 0 .975-.975zm0-24.54a.976.976 0 0 0-.975-.975H45V13h-1V9.9H21V13h-1V9.9H4.875a.976.976 0 0 0-.975.975V32.1H18v.8H3.9v19.225a.976.976 0 0 0 .975.975H35.1V35.51l.8-.252v6.96l24.2-7.643z" />`}</svg></div><p class="text-center">${i}</p></div></calcite-panel></calcite-flow-item>`)}_renderAttributeCheckbox(t){return d`<calcite-label class="bold">${this._messages.attributesSubtitle}</calcite-label><calcite-label layout=inline><calcite-checkbox .disabled=${t} .checked=${this.viewModel.pasteWithAttributes} @calciteCheckboxChange=${i=>{this.viewModel.pasteWithAttributes=i.target.checked}}></calcite-checkbox>${this._messages.pasteWithAttributesLabel}</calcite-label>`}_renderFlowPasteAs(t){return t?b("paste-gallery",d`<calcite-flow-item .selected=${t} .heading=${this._messages.componentLabel} @calciteFlowItemBack=${i=>{i.preventDefault(),this.viewModel.hasPasteCommandsPage&&(this.viewModel.activeFlowPage="commands-page")}}>${this._renderFlowCommandStart(!this.viewModel.hasPasteCommandsPage)}${this._renderClipboardCommand("paste-as")}${this._renderCloseCommand(t)}<calcite-panel>${this.hideFooter?null:d`<div class="w-full" slot=footer><div class="w-full flex"><calcite-button .disabled=${this.viewModel.updating} width=half .hidden=${this.viewModel.hideFooterCancelButton} kind=brand appearance=outline @click=${()=>{this.viewModel.resetHome(),this.closed=!0,this.arcgisClose.emit()}}>${this._messages.cancel}</calcite-button><calcite-button .disabled=${this.viewModel.updating||!this.viewModel.pasteTemplate||this.viewModel.hasTooManyPasteCreateFeatures} kind=brand appearance=solid .width=${this.viewModel.hideFooterCancelButton?"full":"half"} @click=${()=>{try{this.viewModel.lastPasteError=void 0,this.viewModel.getPasteCommandById(this.viewModel.activeCommand).runPasteCommand({closeAfterApply:()=>{this._handleCloseAfterApply()},onPasteError:i=>{this.arcgisApplyPasteError.emit({command:this.activeCommand??"paste-as",errorMessage:i.errorMessage,errorCode:i.errorCode})},onApply:async i=>{try{await this.beforeApply?.();let a={...i};return this.arcgisApplyPasteCommand.emit(a).defaultPrevented?{success:!1,errorCode:"cancelled"}:a.completionCallback?await a.completionCallback??{success:!0}:{success:!0}}catch{return{success:!1}}}},this.viewModel.activeCommand??"paste-as")}catch{}}}>${this.viewModel.alwaysShowFeatureForm?this._messages.next:(this.viewModel.clipboardFeatures.length??0)>1&&this.activeCommand!=="paste-merge"?y(this._messages.pasteMany??"",{num:this.viewModel.clipboardFeatures.length}):this._messages.paste}</calcite-button></div></div>`}${this.viewModel.hasTooManyPasteCreateFeatures?d`<div class="pad-start-end gallery-content"><calcite-notice open icon=exclamation-point kind=warning><div slot=message>${y(this._messages.tooManyCreateFeatures??"",{num:this.maximumFeatureCount})}</div></calcite-notice></div>`:null}<slot name=gallery-page-message></slot><div class="pad-start-end gallery-content"><div>${!this.viewModel.clipboardAndTemplateSupportAttributes&&this.viewModel.pasteTemplate?d`<div class="pad-contents"><calcite-notice open icon=exclamation-point kind=info><div slot=message>${this._messages.attributesNotCopied}</div>${this.activeCommand==="paste-merge"&&this.viewModel.hasClipboardItemMatchingTemplate?d`<calcite-link slot=link @click=${()=>{this.viewModel.activeFlowPage="merge-page"}} title=${this._messages.seeMergeOptions??ie}>${this._messages.seeMergeOptions}</calcite-link>`:null}</calcite-notice></div>`:null}${this.viewModel.clipboardAndTemplateSupportAttributes&&this.viewModel.pasteTemplate?this._renderAttributeCheckbox(!this.viewModel.clipboardAndTemplateSupportAttributes):null}${this.viewModel.clipboardAndTemplateSupportAttributes?null:this._renderAttributeCheckbox(!1)}</div><calcite-list .hidden=${this.viewModel.activeCommand!=="paste-merge"} .label=${this._messages.pasteCommandChoices??""} selection-mode=none selection-appearance=border><calcite-list-item .label=${this._messages.mergeOptionsTitle} .description=${this._messages.mergeOptionsDesc} .disabled=${this.viewModel.updating} @click=${()=>{this.viewModel.activeFlowPage="merge-page"}}><calcite-icon slot=content-start icon=configure></calcite-icon><calcite-icon slot=content-end icon=chevron-right></calcite-icon></calcite-list-item></calcite-list><div>${this.viewModel.workingLayers.length>0?d`<arcgis-feature-templates-legacy .disabledItemFunction=${i=>!!(i.template&&me(i.template)&&i.template.type!=="feature")} class="paste-feature-templates" .layers=${this.viewModel.workingLayers} selection-mode=single @arcgisPropertyChange=${i=>{this._checkAndUpdateInitialPasteTemplate()}} @arcgisSelect=${i=>{this.viewModel.pasteTemplate=i.detail.item}} .view=${this.viewModel.view} .referenceElement=${this.referenceElement} ${D(this._templateGallery)}></arcgis-feature-templates-legacy>`:d`<calcite-notice open icon=exclamation-point kind=warning><div slot=message>${y(this._messages.noMatchingEditableLayers??"",{num:this.maximumFeatureCount})}</div></calcite-notice>`}</div></div></calcite-panel>${this._renderApplying()}</calcite-flow-item>`):b("paste-gallery",d`<calcite-flow-item .selected=${t} .heading=${this._messages.componentLabel} @calciteFlowItemBack=${i=>{i.preventDefault(),this.viewModel.hasPasteCommandsPage&&(this.viewModel.activeFlowPage="commands-page")}}>${this._renderFlowCommandStart(!this.viewModel.hasPasteCommandsPage)}</calcite-flow-item>`)}_renderFlowPasteMerge(t){if(!t)return b("paste-merge",d`<calcite-flow-item .selected=${t} .heading=${this._messages.componentLabel} @calciteFlowItemBack=${a=>{a.preventDefault(),this.viewModel.activeFlowPage="gallery-page"}}></calcite-flow-item>`);let i=this.viewModel.selectedClipboardItemIndex===-1?null:this.viewModel.clipboard.items.getItemAt(this.viewModel.selectedClipboardItemIndex);return b("paste-merge",d`<calcite-flow-item .selected=${t} .heading=${this._messages.componentLabel} @calciteFlowItemBack=${a=>{a.preventDefault(),this.viewModel.activeFlowPage="gallery-page"}}>${this._renderClipboardCommand("merge")}${this._renderCloseCommand(t)}<calcite-panel><div class="merge-split-view-container"><div class="pad-contents merge-split-view-items"><calcite-label>${this._messages.selectionLabel}<calcite-list .label=${this._messages.features??""} selection-mode=single selection-appearance=border>${this.clipboard.items.toArray().map((a,r)=>({id:r,item:a})).filter(a=>a.item.type==="feature"&&a.item.layer&&a.item.graphic).map(a=>d`<calcite-list-item .disabled=${this.viewModel.updating} .selected=${a.id===this.viewModel.selectedClipboardItemIndex} @calciteListItemSelect=${()=>{this.viewModel.selectedClipboardItemIndex=a.id}} @pointerenter=${r=>{this.viewModel.highlightSelectedGraphicOnMap(a.item),r.target.classList.add("hovering")}} @pointerleave=${r=>{r.target.classList.remove("hovering"),this.viewModel.clearHighlightSelectedGraphic()}} .value=${a.id}><arcgis-feature-title slot=content .graphic=${a.item.graphic} .layer=${a.item.layer}></arcgis-feature-title><arcgis-feature-image width-in-pixels=16 height-in-pixels=16 use-true-shape slot=content-start .graphic=${a.item.graphic} .layer=${a.item.layer}></arcgis-feature-image>${this.viewModel.selectedClipboardItemIndex!==a.id?d`<calcite-chip slot=content-end .label=${this._messages.preservethis??""} class="chip-indent only-on-hover item-candidate" scale=s .value=${a.id}>${this._messages.preservethis??""}</calcite-chip>`:""}${this.viewModel.selectedClipboardItemIndex===a.id?d`<calcite-chip icon=check .label=${this._messages.preserved??""} class="item-preserved chip-indent" scale=s slot=content-end .value=${a.id}>${this._messages.preserved}</calcite-chip>`:""}</calcite-list-item>`)}</calcite-list></calcite-label></div><div class="merge-split-view-attributes">${this.viewModel.selectedClipboardItemIndex===-1?d`<div></div>`:d`<div class="merge-feature-form"><arcgis-feature-form heading-level=5 .feature=${i.graphic} .formTemplate=${i.layer.formTemplate?i.layer.formTemplate:null} .layer=${i.layer} ${D(this._featureFormElement)}></arcgis-feature-form></div>`}</div></div></calcite-panel>${this._renderApplying()}</calcite-flow-item>`)}_renderFlowPasteForm(t){if(!t)return b("paste-form",d`<calcite-flow-item .selected=${t} .heading=${this._messages.componentLabel} @calciteFlowItemBack=${p=>{p.preventDefault(),this.viewModel.activeFlowPage=this.viewModel.beforeForm,this.viewModel.resetFormPage()}}></calcite-flow-item>`);let i=(this.viewModel.bauFeatures?.length??0)>1&&!this.viewModel.bauHasTooManyFeatures&&!this.viewModel.bauHasTooManyComplexFeatures,a=this.viewModel.updating,r=this.viewModel.bauActiveFeatureIndex>0,o=this.viewModel.bauActiveFeatureIndex!==-1&&this.viewModel.bauActiveFeatureIndex<(this.viewModel.bauFeatures?.length??0)-1,l=this.viewModel.bauActiveFeatureIndex===-1?y(this._messages.multipleFeaturesX??"",{total:this.viewModel.bauFeatures?.length??0}):y(this._messages.range??"",{current:this.viewModel.bauActiveFeatureIndex+1,total:this.viewModel.bauFeatures?.length??0}),h=(this.viewModel.bauInvalidFeatures?.length??0)>0;return b("paste-form",d`<calcite-flow-item .selected=${t} .heading=${this._messages.componentLabel} @calciteFlowItemBack=${p=>{p.preventDefault(),this.viewModel.activeFlowPage=this.viewModel.beforeForm,this.viewModel.resetFormPage()}}>${this._renderCloseCommand(t)}<calcite-panel>${this.hideFooter?null:d`<div class="w-full" slot=footer><div class="w-full flex"><calcite-button .disabled=${this.viewModel.updating} width=half .hidden=${this.viewModel.hideFooterCancelButton} kind=brand appearance=outline @click=${()=>{this.viewModel.resetHome(),this.closed=!0,this.arcgisClose.emit()}}>${this._messages.cancel}</calcite-button><calcite-button .disabled=${this.viewModel.updating||this.viewModel.bauFormUpdating||this.viewModel.bauHasTooManyFeatures||this.viewModel.bauHasTooManyComplexFeatures} kind=brand appearance=solid .width=${this.viewModel.hideFooterCancelButton?"full":"half"} @click=${async()=>{try{if(await ue(()=>!this.viewModel.bauFormUpdating),!this.viewModel.bauFormValid){this._bauForm.value?.goToFirstError();return}this.viewModel.lastPasteError=void 0,this.viewModel.runPasteFormCommand({closeAfterApply:()=>{this._handleCloseAfterApply()},onPasteError:p=>{this.arcgisApplyPasteError.emit({command:this.activeCommand??"paste-as",errorMessage:p.errorMessage,errorCode:p.errorCode})},onApply:async p=>{try{await this.beforeApply?.();let m={...p};return this.arcgisApplyPasteCommand.emit(m).defaultPrevented?{success:!1,errorCode:"cancelled"}:m.completionCallback?await m.completionCallback??{success:!0}:{success:!0}}catch{return{success:!1}}}})}catch{}}}>${(this.viewModel.bauFeatures?.length??0)>1?y(this._messages.pasteMany??"",{num:this.viewModel.bauFeatures.length}):this._messages.paste}</calcite-button></div></div>`}${i?d`<calcite-action-bar overflow-actions-disabled slot=action-bar layout=horizontal scale=s expand-disabled class="carousel-bar"><calcite-button .disabled=${this.viewModel.updating} @click=${p=>{this._showFloatingChoice=!this._showFloatingChoice,p.stopPropagation()}} scale=s appearance=transparent icon-start=legend icon-end=chevron-down kind=neutral><span class="bau-pick">${l}${h?d`<calcite-icon scale=s icon=exclamation-mark-triangle class="danger-icon-warning"></calcite-icon>`:""}</span></calcite-button><calcite-action slot=actions-end icon=chevron-left icon-flip-rtl scale=s .text=${this._messages.back??""} .disabled=${!r||a||!i} @click=${()=>{this.viewModel.previousActiveFeature()}}></calcite-action><calcite-action slot=actions-end icon=chevron-right icon-flip-rtl scale=s .text=${this._messages.next??""} .disabled=${!o||a||!i} @click=${()=>{this.viewModel.nextActiveFeature()}}></calcite-action></calcite-action-bar>${this._renderFloatingUIChoice(i)}`:""}<div class=${te(this.viewModel.bauHasTooManyComplexFeatures||this.viewModel.bauHasTooManyFeatures?"hidden":void 0)}>${this._renderPasteFormBreadcrumb()}<arcgis-multi-feature-form edit-type=INSERT submit-has-been-attempted .view=${this.view} .referenceElement=${this.referenceElement} .hidden=${this.viewModel.bauHasTooManyComplexFeatures||this.viewModel.bauHasTooManyFeatures} .disabled=${this.viewModel.updating} .maximumFeatureCount=${this.maximumFeatureCount} .maximumFeatureCountWithComplexForms=${this.maximumFeatureCountWithComplexForms} .features=${this.viewModel.bauFeatures} .activeFeatureIndex=${this.viewModel.bauActiveFeatureIndex} @arcgisPropertyChange=${p=>{this._updateBauViewModelFields(p.target)}} @arcgisValueChange=${p=>{let m=0;for(let v of this.viewModel.bauFeatures?.toArray()??[]){let u=this.viewModel.bauOriginalGraphics[m];this.viewModel.formFeatureValuesChanged(u,p.target.getValues(v)),m++}}} ${D(this._bauForm)}></arcgis-multi-feature-form></div>${this.viewModel.bauHasTooManyComplexFeatures||this.viewModel.bauHasTooManyFeatures?d`<div class="pad-start-end gallery-content"><calcite-notice open icon=exclamation-point kind=warning><div slot=message>${this.viewModel.bauHasTooManyFeatures?y(this._messages.tooManyCreateFeatures??"",{num:this.maximumFeatureCount}):y(this._messages.tooManyCreateComplexFeatures??"",{num:this.maximumFeatureCountWithComplexForms})}</div></calcite-notice></div>`:null}</calcite-panel>${this.renderPasteErrorFooter()}${this._renderApplying()}</calcite-flow-item>`)}_renderPasteFormBreadcrumb(){return d`<calcite-list .label=${this._messages.breadcrumb??""} selection-appearance=border scale=s selection-mode=none><calcite-list-item>${this.viewModel.bauActiveFeatureIndex===-1?d`<calcite-icon scale=s slot=content-start icon=group-form></calcite-icon>`:I(this.viewModel.bauActiveGraphic)?.isTable?d`<calcite-icon scale=s slot=content-start icon=table></calcite-icon>`:d`<arcgis-feature-image width-in-pixels=16 height-in-pixels=16 use-true-shape slot=content-start .graphic=${this.viewModel.bauActiveGraphic} .layer=${this.viewModel.bauActiveLayer}></arcgis-feature-image>`}${this.viewModel.bauActiveFeatureIndex===-1?d`<span slot=content>${y(this._messages.multipleFeaturesX??"",{total:this.viewModel.bauFeatures?.length??0})}</span>`:d`<arcgis-feature-title is-new-feature slot=content .graphic=${this.viewModel.bauActiveGraphic} .layer=${this.viewModel.bauActiveLayer}></arcgis-feature-title>`}</calcite-list-item></calcite-list>`}_renderFloatingUIChoice(t){if(!this._showFloatingChoice||!t)return d`<div></div>`;let i=!1;this.viewModel.bauInvalidFeatures.length>0&&(i=!0);let a=new Set(this.viewModel.bauInvalidFeatures);return d`<div class="choose-feature" slot=action-bar ${D(this._floatingChoiceContainer)}><calcite-list .label=${this._messages.choosefeature??""} selection-mode=single selection-appearance=border><calcite-list-item .disabled=${this.viewModel.updating} @calciteListItemSelect=${r=>{this.viewModel.bauActiveFeatureIndex!==-1&&(this.viewModel.bauActiveFeatureIndex=-1,this.viewModel.updateIndividualMultiFeatureFormHighlight()),this.viewModel.clearMultiFeatureFormHighlights(),this._showFloatingChoice=!1}} .label=${y(this._messages.multipleFeaturesX??"",{total:this.viewModel.bauFeatures.length})} .selected=${this.viewModel.bauActiveFeatureIndex===-1} value=shared><calcite-icon scale=s icon=group-form class="feature-choose-listitem" slot=content-start></calcite-icon></calcite-list-item>${this.viewModel.bauFeatures.map((r,o)=>d`<calcite-list-item .disabled=${this.viewModel.updating} @pointerenter=${l=>{this.viewModel.highlightMultiFeatureFormFeature(r,o)}} @pointerleave=${l=>{this.viewModel.clearMultiFeatureFormHighlights()}} .selected=${this.viewModel.bauActiveFeatureIndex===o} @calciteListItemSelect=${l=>{let h=window.parseInt(l.currentTarget.value);this.viewModel.bauActiveFeatureIndex=h,this.viewModel.updateIndividualMultiFeatureFormHighlight(),this.viewModel.clearMultiFeatureFormHighlights(),this._showFloatingChoice=!1}} .value=${o}><arcgis-feature-title is-new-feature slot=content .graphic=${r} .layer=${r.layer}></arcgis-feature-title>${I(r)?.isTable?d`<calcite-icon scale=s icon=table slot=content-start class="feature-choose-listitem"></calcite-icon>`:d`<arcgis-feature-image slot=content-start class="feature-choose-listitem" .graphic=${r} width-in-pixels=16 height-in-pixels=16 use-true-shape .layer=${r.layer}></arcgis-feature-image>`}${a.has(r)&&i?d`<calcite-icon slot=content-end icon=exclamation-mark-triangle scale=s class="danger-icon-warning"></calcite-icon>`:""}</calcite-list-item>`)}</calcite-list></div>`}_renderClipboard(t){return t?b("paste-form",d`<calcite-flow-item .selected=${t} .heading=${this._messages.clipboardContents} @calciteFlowItemBack=${i=>{i.preventDefault(),this.viewModel.activeFlowPage=this.viewModel.beforeClipboard}}>${this._renderCloseCommand(t)}<calcite-panel><arcgis-clipboard .view=${this.view} .referenceElement=${this.referenceElement} .hideTooltips=${this.hideTooltips}></arcgis-clipboard></calcite-panel></calcite-flow-item>`):b("paste-form",d`<calcite-flow-item .selected=${t} .heading=${this._messages.clipboardContents} @calciteFlowItemBack=${i=>{i.preventDefault(),this.viewModel.activeFlowPage=this.viewModel.beforeClipboard}}></calcite-flow-item>`)}_renderPasteCommands(t){if(!t)return b("paste-commands",d`<calcite-flow-item .selected=${t} .heading=${this._messages.componentLabel} @calciteFlowItemBack=${a=>{a.preventDefault(),this.viewModel.activeFlowPage="commands-page"}}>${this._renderFlowCommandStart(this.viewModel.hasPasteCommandsPage)}</calcite-flow-item>`);let i=this.viewModel.clipboard.items.length===0?this._messages.clipboardEmpty??"":this.viewModel.clipboard.items.length>1?y(this._messages.clipboardContentsMany??"",{num:this.viewModel.clipboard.items.length}):this._messages.clipboardContentsSingle??"";return b("paste-commands",d`<calcite-flow-item .selected=${t} .heading=${this._messages.componentLabel} @calciteFlowItemBack=${a=>{a.preventDefault(),this.viewModel.activeFlowPage="commands-page"}}>${this._renderFlowCommandStart(this.viewModel.hasPasteCommandsPage)}${this._renderClipboardCommand("commands")}${this._renderCloseCommand(t)}<calcite-panel><calcite-list .label=${this._messages.clipboardContents??""} selection-mode=none selection-appearance=border><calcite-list-item .description=${i}></calcite-list-item></calcite-list><slot name=commands-page-message></slot><div class="pad-contents"><calcite-list .label=${this._messages.pasteCommandChoices??""} selection-mode=none selection-appearance=border>${this.availableCommands.map(a=>d`<calcite-list-item .label=${a.label(this._messages,this._messages._lang)} .description=${a.description(this._messages,this._messages._lang)} .value=${a.id} .disabled=${!a.commandEnabled||this.viewModel.updating} @click=${async()=>{await this._runPasteCommand(a)}}><calcite-icon slot=content-start .icon=${a.icon}></calcite-icon>${a.immediate?"":d`<calcite-icon slot=content-end icon=chevron-right flip-rtl></calcite-icon>`}</calcite-list-item>`)}</calcite-list></div></calcite-panel>${this.renderPasteErrorFooter()}${this._renderApplying()}</calcite-flow-item>`)}renderPasteErrorFooter(){return!this.viewModel.lastPasteError||this.viewModel.hideErrorNotice?null:d`<calcite-notice slot=footer open kind=danger icon=exclamation-mark-triangle closable @calciteNoticeClose=${()=>{this.viewModel.lastPasteError=void 0}}><div slot=title>${this._messages.errorNoticeTitle??""}</div><div slot=message>${this.viewModel.lastPasteError.localizedErrorMessage?this._messages[this.viewModel.lastPasteError.localizedErrorMessage]:this._messages.errorNoticeMessage??""}</div></calcite-notice>`}_renderApplying(){return this.viewModel.applying?d`<calcite-scrim><calcite-loader scale=s .label=${this._messages.updating??""}></calcite-loader></calcite-scrim>`:""}render(){return this.activeFlowPage==="clipboard-empty-page"?d`<calcite-flow class="arcgis-paste" .hidden=${this.closed}>${this._renderNoClipboardData(this.activeFlowPage==="clipboard-empty-page")}</calcite-flow>`:this.activeFlowPage==="no-command-page"?d`<calcite-flow class="arcgis-paste" .hidden=${this.closed}>${this._renderNoCommandPage(this.activeFlowPage==="no-command-page")}</calcite-flow>`:d`<calcite-flow class="arcgis-paste" .hidden=${this.closed}>${this.hasPasteCommandsPage&&this._renderPasteCommands(this.activeFlowPage==="commands-page")||""}${this._renderFlowPasteAs(this.activeFlowPage==="gallery-page")}${this._renderFlowPasteMerge(this.activeFlowPage==="merge-page")}${this._renderFlowPasteForm(this.activeFlowPage==="form-page")}${this._renderClipboard(this.activeFlowPage==="clipboard")}</calcite-flow>`}};ae("arcgis-paste",K);return K},"core/accessorSupport/decorators","core/Accessor","Graphic","applications/Components/clipboard","layers/GraphicsLayer","core/Collection","applications/Components/templateUtils","applications/Components/applySetUtils","core/reactiveUtils","layers/support/fieldUtils","widgets/BatchAttributeForm/BatchAttributeFormViewModel","intl","applications/Components/editUtils",a,c,e,f,g,h,i)
|
|
2
|
+
import i from"./V7B4YUMV.js";import h from"./SDSJSO7N.js";import{d as U}from"./7TXQADKX.js";import{a as b}from"./4QLSHCCH.js";import g from"./YLCINN3O.js";import f from"./65GHL7AK.js";import{a as se}from"./UQN4KPNM.js";import e from"./IE2YLVLQ.js";import c from"./DAXUZZYI.js";import{g as re}from"./THWXFLFI.js";import"./WUDIJWPW.js";import a from"./KTDXN3YM.js";import"./ZNBKMZP7.js";import{M as V,N as D,O as ee,P as te,Q as N,R as ie,U as ae,a as Y,b as d,c as R,x as E}from"./E52S65JA.js";import"./ALDX5YZO.js";export default $arcgis.t(([{property:s,subclass:C},Z,B,{getApplicationClipboard:Me},Ce,j,{getFullTemplate:ce,isSharedTemplate:de,getCreationAttributes:Fe,isSharedTemplateOrMetadata:me},{createApplySetModifyItem:W,createApplySet:J,createFeatureStateProvider:Q,createApplySetAddItem:q,writeApplySetToService:_e},{whenOnce:ue,watch:X},{getRendererFields:pe,getFeatureEditFields:xe},Pe,{substitute:y},{createGraphicsMover:$e},,,,oe,,{a:le,b:ne}])=>{var Ae=Y`.esri-widget__heading{color:var(--calcite-color-text-2);margin:0 0 .5rem;font-weight:var(--calcite-font-weight-semibold)}h1.esri-widget__heading{font-size:var(--calcite-font-size-xl)}h2.esri-widget__heading{font-size:var(--calcite-font-size-md)}h3.esri-widget__heading,h4.esri-widget__heading,h5.esri-widget__heading,h6.esri-widget__heading{font-size:var(--calcite-font-size)}.esri-widget{box-sizing:border-box;color:var(--calcite-color-text-2);background-color:var(--calcite-color-foreground-1);font-size:var(--calcite-font-size);line-height:var(--calcite-font-line-height-relative-tight)}.esri-widget *,.esri-widget :before,.esri-widget :after{box-sizing:inherit}.esri-widget.esri-widget--disabled>*{opacity:.4;pointer-events:none}.esri-widget.esri-widget--compact{--esri-widget-padding-y: 0;--esri-widget-padding-x: 0}.esri-widget__anchor{color:var(--calcite-color-text-2)}.esri-widget__anchor:hover{color:var(--calcite-color-text-3)}.esri-widget__anchor:hover,.esri-widget__anchor:focus{text-decoration:underline}.esri-widget__anchor--disabled{opacity:.4;pointer-events:none}.esri-widget__header{background-color:var(--calcite-color-foreground-1);flex:1 0 100%;justify-content:space-between;align-items:center;width:100%;min-height:48px;padding:12px 0 12px 15px;display:flex}.esri-widget__heading{word-break:break-word}.esri-widget__header .esri-widget__heading{width:calc(100% - 48px);text-align:initial;color:var(--calcite-color-text-1);align-items:center;margin:0;padding:0;display:flex}.esri-widget__header-button{appearance:none;cursor:pointer;color:var(--calcite-color-text-2);background-color:var(--calcite-color-foreground-1);border:none;flex:0 0 48px;justify-content:center;align-self:stretch;align-items:center;width:48px;padding:0;display:flex}.esri-widget__footer{background-color:var(--calcite-color-foreground-1);justify-content:center;align-items:center;width:100%;min-height:48px;display:flex}.esri-widget__footer-pagination{color:var(--calcite-color-text-2);justify-content:space-between;align-items:center;display:flex}.esri-widget__footer-pagination-previous-button,.esri-widget__footer-pagination-next-button{cursor:pointer;background-color:var(--calcite-color-foreground-1);border:0;margin:0 7px;padding:12px 15px;transition:background-color .125s ease-in-out}.esri-widget__footer-pagination-previous-button:hover,.esri-widget__footer-pagination-previous-button:focus,.esri-widget__footer-pagination-next-button:hover,.esri-widget__footer-pagination-next-button:focus{color:var(--calcite-color-text-1);background-color:var(--calcite-color-foreground-1)}.esri-menu{visibility:hidden;z-index:1;background-clip:padding;background-color:var(--calcite-color-foreground-1);background-clip:padding-box;width:100%;max-height:0;margin:2px 0 0;padding:0;font-size:var(--calcite-font-size);line-height:var(--calcite-spacing-xl);position:absolute;top:100%;left:0;overflow:hidden;box-shadow:0 1px 2px #0000004d}.esri-menu .esri-menu__header{color:var(--calcite-color-text-inverse);background-color:var(--calcite-color-inverse);padding:6px 12px}.esri-menu__list{margin:0;padding:0;list-style:none}.esri-menu__list-item{cursor:pointer;border-top:1px solid #adadad4d;border-left:3px solid #0000;padding:.8em 1em}.esri-menu__list-item [class^=esri-icon-],.esri-menu__list-item [class*=" esri-icon-"]{padding-right:2.8px}.esri-menu__list-item:first-child{border-top:none}.esri-menu__list-item--focus,.esri-menu__list-item:hover,.esri-menu__list-item:focus{background-color:var(--calcite-color-foreground-1)}.esri-menu__list-item:active{background-color:var(--calcite-color-foreground-current)}.esri-menu__list-item--active,.esri-menu__list-item--active:hover,.esri-menu__list-item--active:focus{background-color:var(--calcite-color-foreground-1);border-left-color:var(--calcite-color-brand)}.esri-widget__table{border-collapse:collapse;color:var(--calcite-color-text-1);border:none;width:100%;line-height:var(--calcite-font-line-height-relative-tight)}.esri-widget__table tr:nth-child(odd){background-color:var(--calcite-color-transparent)}.esri-widget__table tr:nth-child(2n){background-color:var(--calcite-color-transparent-press)}.esri-widget__table tr a{color:var(--calcite-color-text-2)}.esri-widget__table tr a:hover,.esri-widget__table tr a:focus{color:var(--calcite-color-text-1)}.esri-widget__table tr td,.esri-widget__table tr th{vertical-align:top;word-break:break-word;padding:.5em .7em;font-size:var(--calcite-font-size-sm);font-weight:var(--calcite-font-weight-regular)}.esri-widget__table tr th{text-align:left;border-right:3px solid #0000000d;width:50%}.esri-widget__table tr td{width:50%}.esri-input{color:var(--calcite-color-text-1);background-color:var(--calcite-color-foreground-1);border:1px solid #959595;font-size:var(--calcite-font-size)}.esri-input::-ms-clear{display:none}.esri-input::placeholder{opacity:1;color:var(--calcite-color-text-2)}.esri-input:placeholder-shown{text-overflow:ellipsis}.esri-input[type=text],.esri-input[type=password],.esri-input[type=number]{height:32px;padding:0 .5em}calcite-combobox.esri-input{border:none}.esri-widget__content--empty{text-align:center;color:var(--calcite-color-border-input);flex-flow:column wrap;align-items:center;padding:18px 22px;display:flex}.esri-widget__content--empty h1.esri-widget__heading,.esri-widget__content--empty h2.esri-widget__heading,.esri-widget__content--empty h3.esri-widget__heading,.esri-widget__content--empty h4.esri-widget__heading,.esri-widget__content--empty h5.esri-widget__heading{font-weight:var(--calcite-font-weight-regular)}.esri-widget__content-illustration--empty{width:128px;padding:1rem 0}.esri-widget__content-icon--empty{width:32px;padding:.5rem 0}.esri-select{appearance:none;cursor:pointer;color:var(--calcite-color-text-2);background:var(--calcite-color-foreground-1) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-8 -8 32 32' width='32' height='32'%3E%3Cpath d='M8 11.207l-4-4V5.793l4 4 4-4v1.414z' fill='%23adadad' fillrule='nonzero'/%3E%3C/svg%3E") 100% no-repeat;border:1px solid #959595;border-radius:0;width:100%;height:32px;margin:0;padding:0 .5em;font-family:inherit;font-size:.85em;display:block}.esri-select[disabled]{cursor:auto}.esri-select::-ms-expand{display:none}.esri-disabled a,.esri-disabled [role=menu],.esri-disabled [role=checkbox],.esri-disabled [class^=esri-icon-],.esri-disabled [class*=" esri-icon-"]{color:var(--calcite-color-text-3)}.keynav-mode .esri-widget:focus,.keynav-mode .esri-widget :focus{z-index:1;outline-offset:2px;outline:2px solid #adadad}.esri-widget__loader-animation{border:.15em solid #adadad4d;border-top-color:var(--calcite-color-border-input);border-radius:100%;width:1em;height:1em;font-size:var(--calcite-font-size-md);animation:1.25s linear infinite esri-rotate;display:block;transform:translateZ(0)}:dir(rtl) .esri-widget__table th{text-align:right;border-left:3px solid #0000000d;border-right:none}:dir(rtl) .esri-select{background-position:0}:dir(rtl) .esri-menu__list-item{border-left:none;border-right:3px solid #0000}:dir(rtl) .esri-menu__list-item [class^=esri-icon-],:dir(rtl) .esri-menu__list-item [class*=" esri-icon-"]{padding-left:2px;padding-right:0}:dir(rtl) .esri-menu__list-item--active{border-right-color:var(--calcite-color-brand)}.esri-icon-font-fallback-text{clip:rect(0 0 0 0);width:1px;height:1px;position:absolute;overflow:hidden}.esri-rotating{animation:1.25s linear infinite esri-rotate;transform:translateZ(0)}.esri-clearfix:before,.esri-clearfix:after{content:" ";display:table}.esri-clearfix:after{clear:both}.esri-interactive{cursor:pointer}.esri-hidden{display:none!important}.esri-invisible{visibility:hidden!important}.esri-offscreen{position:absolute;top:-999em;left:-999em}.esri-match-height{flex-direction:column;flex:auto;display:flex;overflow:hidden}:host{display:flex}.arcgis-paste{height:var(--arcgis-paste-height, 300px);width:var(--arcgis-paste-width, 300px);flex:1}.hidden{display:none}.flex-row{flex-direction:row}.justify-center{justify-content:center}.h-full{height:100%}.w-full{width:100%}.flex{display:flex}.text-center{text-align:center}.pad-contents{padding:var(--arcgis-paste-blocks-padding, var(--calcite-spacing-md))}.merge-feature-form{padding-left:var(--arcgis-paste-blocks-padding, var(--calcite-spacing-md));padding-right:var(--arcgis-paste-blocks-padding, var(--calcite-spacing-md));padding-bottom:var(--arcgis-paste-blocks-padding, var(--calcite-spacing-md))}.pad-start-end{padding-left:var(--arcgis-paste-blocks-padding, var(--calcite-spacing-md));padding-right:var(--arcgis-paste-blocks-padding, var(--calcite-spacing-md))}.gallery-content{padding-top:var(--arcgis-paste-blocks-padding, var(--calcite-spacing-md));padding-bottom:var(--arcgis-paste-blocks-padding, var(--calcite-spacing-md));display:flex;row-gap:var(--arcgis-paste-blocks-padding, var(--calcite-spacing-md));flex-direction:column}.chip-indent{margin-left:5px;margin-right:5px}.merge-split-view-container{display:flex;flex-direction:column;height:100%}.merge-split-view-items{flex:0 1 auto;max-height:50%;overflow-y:scroll}.merge-split-view-attributes{flex:1;overflow-y:scroll}.choose-feature{position:absolute;width:100%;max-height:100%;z-index:2;overflow-y:auto}.bau-pick{display:flex;flex-direction:row;align-items:center;gap:4px}.danger-icon-warning{--calcite-icon-color: var(--calcite-color-status-danger)}.paste-feature-templates{--arcgis-feature-templates-max-list-height: 100%}`;async function Ee(e,t={}){if(e?.type==="subtype-group"){if(!e.subtypeField)return[];let i=t[e.subtypeField];if(!be(i))return[];let a=e.findSublayerForSubtypeCode(i);return a?a.renderer&&a.fieldsIndex?await pe(a.renderer,e.fieldsIndex):[]:[]}return e?e.renderer&&e.fieldsIndex?await pe(e.renderer,e.fieldsIndex):[]:[]}function Ie(e,t,i,a,r,o){let l={...a},h=ke(o),p=Se(o),m="";(o.type==="subtype-group"||o.type==="subtype-sublayer")&&(m=o.subtypeField??"");let v=o.objectIdField??"";return e.forEach(u=>{if(u.name!==v&&!h.includes(u.name)&&!p.includes(u.name)&&!r.includes(u.name)&&u.type!=="global-id"&&(m===""||m!==u.name)){let w=He(u,t);w.match&&w.targetField&&(l[w.targetField?.name]=i[u.name])}}),l}function ke(e){return e&&"relationships"in e?(e.relationships??[]).filter(t=>t.role==="origin").map(t=>t.keyField):[]}function Se(e){return e?.type==="subtype-sublayer"&&(e=e.parent),e?xe(e):[]}function Te(e,t){if(e.type===t.type)return t.type==="string"?e.length<=t.length:!0;switch(e.type){case"small-integer":return["integer","big-integer"].includes(t.type);case"integer":return t.type==="big-integer";case"single":return t.type==="double";default:return!1}}function He(e,t){let i={match:!1,sourceField:null,targetField:null};for(let a of t)if(Te(e,a)){let r=e.name.replace(/\s/gu,"").toLowerCase();if(a.name.replace(/\s/gu,"").toLowerCase()===r)return i.match=!0,i.sourceField=e,i.targetField=a,i}return i}async function ge(e,t,i,a){let r=!0,o={hasAsyncArcadeExpressions:!1},l=e.items.filter(h=>h.type==="add");for(let h of l){let p=h.graphic.clone(),m=Oe(h.graphic,h.layer);if(!m){r=!1;continue}let v=!await Ge(t,h.graphic,m,i,o);if(o.hasAsyncArcadeExpressions&&l.length>a)return!1;let u=W({graphic:h.graphic,layer:h.layer,originalGraphic:p});if(e.push(u),!v)return!1}return r}function Oe(e,t){return t.type==="feature"||t.type==="subtype-sublayer"?t:t.findSublayerForFeature(e)||null}async function Ge(e,t,i,a,r){let o=i.formTemplate,l=i.fields.filter(w=>{let z=t.attributes[w.name],fe=z===null||z===""||z===void 0;return w.editable&&!w.nullable&&fe});if(!o)return l.length!==0;let h=new Set;we(o.elements??[],h);let p=new Set;if(ve(o.elements??[],p),h.size===0&&p.size===0)return l.length>0;let m=t.clone();m.layer=i,delete m.attributes[i.objectIdField],a.has(i)||a.set(i,new Pe({map:e.map,editType:"INSERT"}));let v=a.get(i);if(v.features=new j([m]),await ue(()=>(v.status==="loaded"||v.status==="failed")&&!v.updating),v.hasAsyncArcadeExpressions&&(r.hasAsyncArcadeExpressions=!0),v.status==="failed")return!0;let u=v.getValues(m)??{};if(i.objectIdField&&u[i.objectIdField]!==void 0){let{[i.objectIdField]:w,...z}=u;u=z}return Object.keys(u).forEach(w=>{i.fieldsIndex.has(w)&&(t.attributes[w]=ze(u[w],w,i.fieldsIndex))}),v.invalidFeatures.length>0}function ve(e,t){for(let i of e)i.type==="group"?ve(i.elements,t):i.type==="field"&&i.valueExpression&&t.add(i.fieldName)}function we(e,t){for(let i of e)i.type==="group"?we(i.elements,t):i.type==="field"&&i.requiredExpression&&t.add(i.fieldName)}function be(e){return typeof e=="number"}function Le(e){return typeof e=="number"&&window.isFinite(e)&&Math.floor(e)===e}function ze(e,t,i){if(e==null)return null;switch(i.get(t).type){case"big-integer":case"long":case"oid":case"integer":case"small-integer":return Le(e)?e:window.parseInt(e);case"single":case"double":return be(e)?e:window.parseFloat(e);case"global-id":case"guid":return e===""?null:e;case"date":break;case"date-only":case"time-only":case"timestamp-offset":return e===""?null:e;case"string":return e===""?null:e}return e}function Ve(e){return e&&"layer"in e?e.layer:void 0}function I(e){if(!e)return null;let t=Ve(e.origin)??e.layer??e?.sourceLayer??null;if(t&&t.type==="subtype-sublayer")return t.parent;switch(t?.type){case"csv":case"feature":case"geojson":case"ogc-feature":case"subtype-group":case"wfs":return t;default:return null}}var De=Object.defineProperty,Be=Object.getOwnPropertyDescriptor,A=(e,t,i,a)=>{for(var r=a>1?void 0:a?Be(t,i):t,o=e.length-1,l;o>=0;o--)(l=e[o])&&(r=(a?l(t,i,r):l(r))||r);return a&&r&&De(t,i,r),r},ye={noChangeError:"Operation has not made any changes",noSelectedError:"Operation requires a selected feature",deletesGeometryError:"Operation would result in a null geometry",noGeometryError:"The selected feature has not geometry"},g=class extends Z{constructor(e){super(e)}get mustShowOnCommandPage(){return!0}get icon(){}get id(){return""}label(e,t){return""}description(e,t){return""}get commandEnabled(){return!1}commandDisabledReason(e,t){return""}get immediate(){return!1}async initiate(e,t){}async execute(){throw new Error("arcgis-paste: Paste command does not support execute")}async runPasteCommand(e,t,i){try{this.viewModel.applying=!0;let a=await this.prepareCopy(t);if(!a||a.items.length===0){this.viewModel.lastPasteError={errorCode:"noPasteItems",errorMessage:"No items to paste",localizedErrorMessage:"noPasteItemsError"},e.onPasteError(this.viewModel.lastPasteError);return}let r=a.items.length>this.viewModel.maximumFeatureCount||this.viewModel.alwaysShowFeatureForm||i?.showFeatureForm===!0||!await ge(a,this.viewModel.view,this.viewModel.formViewModelMap,this.viewModel.maximumFeatureCountWithComplexForms);if(this.viewModel.alwaysShowFeatureForm||r||i?.showFeatureForm===!0)this.viewModel.bauActiveFeatureIndex=0,this.viewModel.bauApplySet=a,this.viewModel.activeCommand=t,this.viewModel.bauOriginalGraphics=a.items.map(o=>o.type==="add"?{layer:o.layer,graphic:o.graphic}:null).filter(o=>o!==null),this.viewModel.bauFeatures=new j,this.viewModel.activeFlowPage="form-page",await new Promise(o=>{setTimeout(o,100)}),this.viewModel.bauFeatures=new j(this.viewModel.bauOriginalGraphics.map(o=>(o.graphic.layer=o.layer,o.graphic))),this.viewModel.updateIndividualMultiFeatureFormHighlight();else try{let o=await e.onApply({command:"paste",applySet:a});if(o.success){this.viewModel.resetHome(),this.viewModel.closeOnApply&&e.closeAfterApply();return}this.viewModel.handleApplyError(o,e.onPasteError)}catch(o){this.viewModel.lastPasteError={errorCode:"unexpectedError",errorMessage:o.message,localizedErrorMessage:"unexpectedError"},e.onPasteError(this.viewModel.lastPasteError);return}finally{a?.featureState?.clearAll()}}finally{this.viewModel.applying=!1}}async prepareCopy(e){let t=e==="paste"||e==="paste-as"&&this.viewModel.pasteWithAttributes||e==="paste-merge"&&this.viewModel.pasteWithAttributes,i=t&&e==="paste-merge"?this.viewModel.clipboard.items.getItemAt(this.viewModel.selectedClipboardItemIndex):null,a=J();if(a.featureState=Q(this.viewModel.view),e==="paste-merge"){let r=this.viewModel.pasteTemplate?.template?await ce(this.viewModel.view,this.viewModel.pasteTemplate.template):null;if(!r)return null;let o=de(this.viewModel.pasteTemplate.template)?r.layer:this.viewModel.pasteTemplate.layer,l=await this.createMergedClipboardGeom(),h=await this.constructFeatureAttributesCopy(r,o,i),p=new B({geometry:l,attributes:h});this.removeGraphicIdentifierFields(p,o),a.push(q({graphic:p,layer:o}))}else if(e==="paste")for(let r of this.viewModel.clipboardFeatures){let o=r.graphic.clone();this.removeGraphicIdentifierFields(o,r.layer),a.push(q({graphic:o,layer:r.layer}))}else if(e==="paste-as"){let r=this.viewModel.pasteTemplate?.template?await ce(this.viewModel.view,this.viewModel.pasteTemplate.template):null;if(!r)return null;let o=de(r)?r.layer:this.viewModel.pasteTemplate.layer;for(let l of this.viewModel.clipboardFeatures){let h=await this.constructFeatureAttributesCopy(r,o,t?l:null),p=new B({geometry:l.graphic?.geometry?.clone()??null,attributes:h});this.removeGraphicIdentifierFields(p,o),a.push(q({graphic:p,layer:o}))}}return a}async constructFeatureAttributesCopy(e,t,i){let a=Fe(e,{});if(i){let r=i.layer?.fields;if(r){let o=t.fields,l=i.graphic.attributes??{},h=await Ee(t,a);a=Ie(r,o,l,a,h,t)}}return a}async createMergedClipboardGeom(){let e=this.viewModel.clipboardFeatures.map(t=>t.graphic?.geometry).filter(t=>t!=null).toArray();return e.length===0?null:e.length===1?e[0].clone():(await $arcgis.t(m=>m[0],"geometry/operators/unionOperator")).executeMany(e)??null}removeGraphicIdentifierFields(e,t){t.objectIdField&&delete e.attributes[t.objectIdField],t.globalIdField&&delete e.attributes[t.globalIdField]}};A([s()],g.prototype,"viewModel",2);A([s()],g.prototype,"mustShowOnCommandPage",1);A([s()],g.prototype,"icon",1);A([s()],g.prototype,"id",1);A([s()],g.prototype,"commandEnabled",1);A([s()],g.prototype,"commandDisabledReason",1);A([s()],g.prototype,"immediate",1);g=A([C("components.paste.commands.PasteCommand")],g);var je=Object.defineProperty,We=Object.getOwnPropertyDescriptor,T=(e,t,i,a)=>{for(var r=a>1?void 0:a?We(t,i):t,o=e.length-1,l;o>=0;o--)(l=e[o])&&(r=(a?l(t,i,r):l(r))||r);return a&&r&&je(t,i,r),r},F=class extends g{get id(){return"paste-append"}get icon(){return"reshape-add-geometry"}get immediate(){return!0}get mustShowOnCommandPage(){return!0}get commandEnabled(){return this.viewModel.clipboardFeatures.length>0&&this.viewModel.selectedFeature!==void 0&&this.viewModel.layerPermissionsCheck.canUpdate(I(this.viewModel.selectedFeature))&&this.viewModel.selectedFeature?.geometry!==null&&(this.viewModel.selectedFeature?.geometry?.type==="multipoint"||this.viewModel.selectedFeature?.geometry?.type==="polyline"||this.viewModel.selectedFeature?.geometry?.type==="polygon")&&this.viewModel.clipboard.singleGeometryType===this.viewModel.selectedFeature?.geometry?.type}async initiate(e){let t=null;try{this.viewModel.applying=!0;let i=await this.prepareAppend();if(i.applySet&&(t=i.applySet),!i.success){this.viewModel.lastPasteError={errorCode:i.failReason,errorMessage:ye[i.failReason],localizedErrorMessage:i.failReason},e.onPasteError(this.viewModel.lastPasteError);return}let a=await e.onApply({command:"paste-append",applySet:i.applySet});if(a.success){this.viewModel.resetHome(),this.viewModel.closeOnApply&&e.closeAfterApply();return}this.viewModel.handleApplyError(a,e.onPasteError)}catch(i){this.viewModel.lastPasteError={errorCode:"unexpectedError",errorMessage:i.message,localizedErrorMessage:"unexpectedError"},e.onPasteError(this.viewModel.lastPasteError);return}finally{this.viewModel.applying=!1,t&&(t.featureState?.clearAll(),t.featureState=null)}}async execute(){let e=await this.prepareAppend();if(!e.success)throw new Error(`arcgis-paste: Paste append failed. ${e.failReason}`);return{success:!0,userInputRequired:!1,applySet:e.applySet}}async prepareAppend(){let e=J();if(e.featureState=Q(this.viewModel.view),!this.viewModel.selectedFeature)return{success:!1,failReason:"noSelectedError"};let[t,i]=await Promise.all([$arcgis.t(m=>m[0],"geometry/operators/unionOperator"),$arcgis.t(m=>m[0],"geometry/operators/equalsOperator")]),a=this.viewModel.selectedFeature.geometry,r=!1;for(let l of this.viewModel.clipboardFeatures){let h=l?.graphic?.geometry??null;if(!h)continue;if(a===null){a=l?.graphic?.geometry??null,a&&(a=a.clone(),r=!0);continue}let p=t.execute(a,h);i.execute(a,p)||(a=p,r=!0)}if(!r)return{success:!1,failReason:"noChangeError"};let o=this.viewModel.selectedFeature.clone();return o.geometry=a,e.push(W({graphic:o,layer:I(this.viewModel.selectedFeature),originalGraphic:this.viewModel.selectedFeature})),{success:!0,applySet:e}}description(e,t){return e.pasteAppendDesc}label(e,t){return e.pasteAppendTitle}};T([s()],F.prototype,"id",1);T([s()],F.prototype,"icon",1);T([s()],F.prototype,"immediate",1);T([s()],F.prototype,"mustShowOnCommandPage",1);T([s()],F.prototype,"commandEnabled",1);F=T([C("components.paste.commands.PasteAppendCommand")],F);var Re=Object.defineProperty,Ne=Object.getOwnPropertyDescriptor,H=(e,t,i,a)=>{for(var r=a>1?void 0:a?Ne(t,i):t,o=e.length-1,l;o>=0;o--)(l=e[o])&&(r=(a?l(t,i,r):l(r))||r);return a&&r&&Re(t,i,r),r},_=class extends g{get id(){return"paste-subtract"}get icon(){return"reshape-subtract-geometry"}get immediate(){return!0}get mustShowOnCommandPage(){return!0}get commandEnabled(){return this.viewModel.clipboardFeatures.length>0&&this.viewModel.selectedFeature!==void 0&&this.viewModel.layerPermissionsCheck.canUpdate(I(this.viewModel.selectedFeature))&&this.viewModel.selectedFeature?.geometry!==null&&(this.viewModel.selectedFeature?.geometry?.type==="multipoint"||this.viewModel.selectedFeature?.geometry?.type==="polyline"||this.viewModel.selectedFeature?.geometry?.type==="polygon")&&(this.viewModel.clipboard.singleGeometryType===this.viewModel.selectedFeature?.geometry?.type||this.viewModel.clipboard.singleGeometryType==="polygon")}async prepareSubtract(){let e=J();if(e.featureState=Q(this.viewModel.view),!this.viewModel.selectedFeature)return{success:!1,failReason:"noSelectedError",applySet:e};let[t,i]=await Promise.all([$arcgis.t(m=>m[0],"geometry/operators/differenceOperator"),$arcgis.t(m=>m[0],"geometry/operators/equalsOperator")]),a=this.viewModel.selectedFeature.geometry;if(!a)return{success:!1,failReason:"noGeometryError",applySet:e};let r=!1;for(let l of this.viewModel.clipboardFeatures){let h=l?.graphic?.geometry;if(!h)continue;let p=t.execute(a,h);if(!p)return{success:!1,failReason:"deletesGeometryError",applySet:e};i.execute(a,p)||(a=p,r=!0)}if(!r)return{success:!1,failReason:"noChangeError",applySet:e};let o=this.viewModel.selectedFeature.clone();return o.geometry=a,e.push(W({graphic:o,layer:I(this.viewModel.selectedFeature),originalGraphic:this.viewModel.selectedFeature})),{success:!0,applySet:e}}async execute(){let e=await this.prepareSubtract();if(!e.success)throw new Error(`arcgis-paste: Paste subtract failed. ${e.failReason}`);return{success:!0,userInputRequired:!1,applySet:e.applySet}}async initiate(e){let t=null;try{this.viewModel.applying=!0;let i=await this.prepareSubtract();if(i.applySet&&(t=i.applySet),!i.success){this.viewModel.lastPasteError={errorCode:i.failReason,errorMessage:ye[i.failReason],localizedErrorMessage:i.failReason},e.onPasteError(this.viewModel.lastPasteError);return}let a=await e.onApply({command:"paste-subtract",applySet:i.applySet});if(a.success){this.viewModel.resetHome(),this.viewModel.closeOnApply&&e.closeAfterApply();return}this.viewModel.handleApplyError(a,e.onPasteError)}catch(i){this.viewModel.lastPasteError={errorCode:"unexpectedError",errorMessage:i.message,localizedErrorMessage:"unexpectedError"},e.onPasteError(this.viewModel.lastPasteError);return}finally{this.viewModel.applying=!1,t&&(t.featureState?.clearAll(),t.featureState=null)}}description(e,t){return e.pasteSubtractDesc}label(e,t){return e.pasteSubtractTitle}};H([s()],_.prototype,"id",1);H([s()],_.prototype,"icon",1);H([s()],_.prototype,"immediate",1);H([s()],_.prototype,"mustShowOnCommandPage",1);H([s()],_.prototype,"commandEnabled",1);_=H([C("components.paste.commands.PasteSubtractCommand")],_);var Ue=Object.defineProperty,qe=Object.getOwnPropertyDescriptor,O=(e,t,i,a)=>{for(var r=a>1?void 0:a?qe(t,i):t,o=e.length-1,l;o>=0;o--)(l=e[o])&&(r=(a?l(t,i,r):l(r))||r);return a&&r&&Ue(t,i,r),r},x=class extends g{get id(){return"paste-as"}get icon(){return"templates"}get immediate(){return!1}get mustShowOnCommandPage(){return!1}get commandEnabled(){return(this.viewModel.clipboardFeatures.length===1||this.viewModel.clipboardFeatures.length>0&&this.viewModel.pasteWithMultipleFeaturesEnabled)&&this.viewModel.clipboard.singleGeometryType!==void 0}async initiate(e){this.viewModel.activeFlowPage="gallery-page",this.viewModel.activeCommand="paste-as"}description(e,t){return e.pasteAsDesc}label(e,t){return e.pasteAsTitle}};O([s()],x.prototype,"id",1);O([s()],x.prototype,"icon",1);O([s()],x.prototype,"immediate",1);O([s()],x.prototype,"mustShowOnCommandPage",1);O([s()],x.prototype,"commandEnabled",1);x=O([C("components.paste.commands.PasteAsCommand")],x);var Xe=Object.defineProperty,Ke=Object.getOwnPropertyDescriptor,G=(e,t,i,a)=>{for(var r=a>1?void 0:a?Ke(t,i):t,o=e.length-1,l;o>=0;o--)(l=e[o])&&(r=(a?l(t,i,r):l(r))||r);return a&&r&&Xe(t,i,r),r},P=class extends g{get id(){return"paste"}get icon(){return"duplicate"}get immediate(){return!0}get mustShowOnCommandPage(){return!0}get commandEnabled(){let e=this.viewModel.clipboardFeatures.length===1,t=this.viewModel.clipboardFeatures.length>0&&this.viewModel.clipboardItemLayers.length===1&&this.viewModel.pasteWithMultipleFeaturesEnabled,i=this.viewModel.clipboardFeatures.length>0&&this.viewModel.pasteWithMultipleFeaturesEnabled&&this.viewModel.pasteWithMultipleLayersEnabled;return this.viewModel.clipboardFeatures.length>0&&this.viewModel.canCreateOnAllLayers&&(e||t||i)}async initiate(e,t){await this.runPasteCommand(e,"paste",t)}async execute(){let e=await this.prepareCopy("paste");if(!e||e.items.length===0)throw new Error("arcgis-paste: No items to paste");return e.items.length>this.viewModel.maximumFeatureCount||!await ge(e,this.viewModel.view,this.viewModel.formViewModelMap,this.viewModel.maximumFeatureCountWithComplexForms)?{success:!1,userInputRequired:!0}:{success:!0,userInputRequired:!1,applySet:e}}description(e,t){return e.pasteDesc}label(e,t){return e.pasteTitle}};G([s()],P.prototype,"id",1);G([s()],P.prototype,"icon",1);G([s()],P.prototype,"immediate",1);G([s()],P.prototype,"mustShowOnCommandPage",1);G([s()],P.prototype,"commandEnabled",1);P=G([C("components.paste.commands.PasteSetCommand")],P);var Ze=Object.defineProperty,Je=Object.getOwnPropertyDescriptor,L=(e,t,i,a)=>{for(var r=a>1?void 0:a?Je(t,i):t,o=e.length-1,l;o>=0;o--)(l=e[o])&&(r=(a?l(t,i,r):l(r))||r);return a&&r&&Ze(t,i,r),r},$=class extends g{get id(){return"paste-merge"}get icon(){return"merge"}get immediate(){return!1}get mustShowOnCommandPage(){return!0}get commandEnabled(){return this.viewModel.clipboardFeatures.length>1&&this.viewModel.clipboard.singleGeometryType!==void 0}async initiate(e){this.viewModel.activeFlowPage="gallery-page",this.viewModel.activeCommand="paste-merge";for(let t=0;t<this.viewModel.clipboard.items.length;t++)if(this.viewModel.clipboard.items.getItemAt(t).type==="feature"){this.viewModel.selectedClipboardItemIndex=t;break}}description(e,t){return e.pasteMergeDesc}label(e,t){return e.pasteMergeTitle}};L([s()],$.prototype,"id",1);L([s()],$.prototype,"icon",1);L([s()],$.prototype,"immediate",1);L([s()],$.prototype,"mustShowOnCommandPage",1);L([s()],$.prototype,"commandEnabled",1);$=L([C("components.paste.commands.PasteMergeCommand")],$);var Qe=Object.defineProperty,Ye=Object.getOwnPropertyDescriptor,k=(e,t,i,a)=>{for(var r=a>1?void 0:a?Ye(t,i):t,o=e.length-1,l;o>=0;o--)(l=e[o])&&(r=(a?l(t,i,r):l(r))||r);return a&&r&&Qe(t,i,r),r},f=class extends g{constructor(e){super(e)}get id(){return this.customCommand.id}get icon(){return this.customCommand.icon}get immediate(){return!0}get mustShowOnCommandPage(){return!0}get commandEnabled(){return this.customCommand.commandEnabled(this.viewModel.clipboard,this.viewModel.selectedFeature)}async initiate(e){try{this.viewModel.applying=!0;let t=await e.onApply({command:this.id});if(t.success){this.viewModel.resetHome(),this.viewModel.closeOnApply&&e.closeAfterApply();return}this.viewModel.handleApplyError(t,e.onPasteError)}catch(t){this.viewModel.lastPasteError={errorCode:"unexpectedError",errorMessage:t.message,localizedErrorMessage:"unexpectedError"},e.onPasteError(this.viewModel.lastPasteError);return}finally{this.viewModel.applying=!1}}description(e,t){return this.customCommand.description(e,t)}label(e,t){return this.customCommand.label(e,t)}};k([s()],f.prototype,"customCommand",2);k([s()],f.prototype,"id",1);k([s()],f.prototype,"icon",1);k([s()],f.prototype,"immediate",1);k([s()],f.prototype,"mustShowOnCommandPage",1);k([s()],f.prototype,"commandEnabled",1);f=k([C("components.paste.commands.PasteCustomCommand")],f);var et=Object.defineProperty,tt=Object.getOwnPropertyDescriptor,c=(e,t,i,a)=>{for(var r=a>1?void 0:a?tt(t,i):t,o=e.length-1,l;o>=0;o--)(l=e[o])&&(r=(a?l(t,i,r):l(r))||r);return a&&r&&et(t,i,r),r};function he(e){return!me(e)||e.type==="feature"}var n=class extends Z{constructor(e){super(e),this.customPasteCommands=new j,this.bauInvalidFeatures=[],this.bauFormValid=!0,this.bauFormUpdating=!1,this.bauActiveFeatureIndex=-1,this.bauHasTooManyFeatures=!1,this.bauHasTooManyComplexFeatures=!1,this.bauOriginalGraphics=[],this.formViewModelMap=new Map,this.supportedCommands=["paste-append","paste-as","paste-subtract","paste","paste-merge"],this.pasteWithMultipleLayersEnabled=!1,this.pasteWithMultipleFeaturesEnabled=!1,this.alwaysShowFeatureForm=!1,this.selectedClipboardItemIndex=-1,this.pasteWithAttributes=!0,this.closeOnApply=!1,this.currentPasteOperation="",this._activeFlowPage="commands-page",this.showClipboardItems=!1,this.hideTooltips=!1,this.hideFooter=!1,this.hideFooterCancelButton=!1,this.hideHeaderCloseButton=!1,this.hideViewClipboard=!1,this.hideErrorNotice=!1,this.highlightGroup="temporary",this._hoverHighlightHandle=null,this.maximumFeatureCount=200,this.maximumFeatureCountWithComplexForms=50,this.layerPermissionsCheck={canCreate:t=>t?!!t.effectiveCapabilities?.operations.supportsAdd:!1,canUpdate:t=>{if(!t)return!1;let i=t.effectiveCapabilities,a=!!i?.operations.supportsUpdate,r=!!i?.editing.supportsGeometryUpdate&&a;return!t.isTable&&!r?!1:a}},this.applying=!1}get bauActiveGraphic(){return this.bauActiveFeatureIndex===-1?void 0:this.bauFeatures?.getItemAt(this.bauActiveFeatureIndex)}get hasTooManyPasteCreateFeatures(){return this.clipboardFeatures.length>this.maximumFeatureCount&&["paste","paste-as"].includes(this.activeCommand??"")}get bauActiveLayer(){if(this.bauActiveFeatureIndex!==-1&&this.bauFeatures)return I(this.bauFeatures.getItemAt(this.bauActiveFeatureIndex))??void 0}get pasteTemplateIsValid(){return this.pasteTemplate?this.pasteTemplate.layer?!!this.workingLayers.includes(this.pasteTemplate.layer.type==="subtype-sublayer"?this.pasteTemplate.layer.parent:this.pasteTemplate.layer):!1:!0}get clipboardAndTemplateSupportAttributes(){if(this.clipboardFeatures.length===0||!this.pasteTemplate?.layer)return!1;let e=this.pasteTemplate.template;if(!he(e))return!1;for(let t of this.clipboardFeatures){let i=t.layer;if(!i)return!1;let a=i.type==="subtype-sublayer"?i.parent:i;if(a.type==="subtype-group"){let r=a.fieldsIndex.get(a.subtypeField).name,o=e.prototype?.[r];if(o==null||o!==t.graphic.attributes[r])return!1}}return!0}get hasClipboardItemMatchingTemplate(){let e=this.pasteTemplate?.layer;if(!e||this.clipboardFeatures.length===0)return!1;let t=this.pasteTemplate.template;if(!he(t))return!1;for(let i of this.clipboardFeatures){let a=i.layer;if(!a)return!1;let r=a.type==="subtype-sublayer"?a.parent:a;if(e===a){if(r.type==="subtype-group"){let o=r.fieldsIndex.get(r.subtypeField).name,l=t.prototype?.[o];if(l==null||l!==i.graphic.attributes[o])continue}return!0}}return!1}get activeFlowPage(){return this._activeFlowPage}set activeFlowPage(e){e==="clipboard"&&this.beforeClipboard===void 0?this.beforeClipboard=this.activeFlowPage:e!=="clipboard"&&(this.beforeClipboard=void 0),e==="form-page"&&this.beforeForm===void 0?this.beforeForm=this.activeFlowPage:e!=="form-page"&&(this.beforeForm=void 0),this._activeFlowPage=e,this.checkAndSuspendMove()}get updating(){return this.applying}formFeatureValuesChanged(e,t){if(!t)return;let i=e.graphic.clone();for(let r of Object.keys(t))i.attributes[r]=t[r];let a=W({graphic:i,originalGraphic:e.graphic.clone(),layer:e.layer});this.bauApplySet?.push(a)}highlightSelectedGraphicOnMap(e){if(this.clearHighlightSelectedGraphic(),!e.graphic?.geometry||!this.view)return;let t=new B({geometry:e.graphic.geometry,symbol:ne(e.graphic.geometry.type)});this.view.graphics.add(t),this._hoverHighlightHandle={remove:()=>{this.view.graphics.remove(t)}}}clearHighlightSelectedGraphic(){this._hoverHighlightHandle?.remove(),this._hoverHighlightHandle=null}updateIndividualMultiFeatureFormHighlight(){if(this.activeFlowPage!=="form-page"){this.clearIndividualFeatureFormHighlight();return}if(this.view)if(this.bauActiveGraphic&&this.bauActiveLayer){if(this.bauIndividualHighlight?.graphic!==this.bauActiveGraphic&&this.clearIndividualFeatureFormHighlight(),!this.bauIndividualHighlight){let e=U(this.view,this.bauActiveLayer);if(!e)return;this.bauIndividualHighlight={graphic:this.bauActiveGraphic,handle:e.highlight(this.bauActiveGraphic,{name:this.highlightGroup})}}}else this.clearIndividualFeatureFormHighlight()}clearIndividualFeatureFormHighlight(){this.bauIndividualHighlight?.handle?.remove(),this.bauIndividualHighlight=void 0}highlightMultiFeatureFormFeature(e,t){this.bauHighlight&&this.clearMultiFeatureFormHighlights();let i=this.view?U(this.view,e.layer):void 0;i&&(this.bauHighlight=i.highlight(e,{name:this.highlightGroup}))}clearMultiFeatureFormHighlights(){this.bauHighlight?.remove(),this.bauHighlight=void 0}updateClipboardGraphicsLayer(){if(!this.showClipboardItems){if(this.clipboardMover?.cancel(),this.clipboardMover=void 0,this.clipboardGraphicsLayer&&this.view)try{this.view.map?.remove(this.clipboardGraphicsLayer),this.clipboardGraphicsLayer=void 0}catch{}return}if(this.showClipboardItems&&this.view){this.clipboardGraphicsLayer||(this.clipboardGraphicsLayer=new Ce({listMode:"hide"}),this.view.map?.layers.add(this.clipboardGraphicsLayer));let e=this.clipboard.items;this.clipboardGraphicsLayer.removeAll();let t=-1;for(let i of e){if(t++,i.type!=="feature"||!i.graphic.geometry)continue;let a=new B({geometry:i.graphic.geometry.clone(),attributes:{clipboardIdx:t},symbol:le(i.graphic.geometry.type)});this.clipboardGraphicsLayer.add(a)}}else if(!this.showClipboardItems&&this.view&&this.clipboardGraphicsLayer)try{this.view.map?.remove(this.clipboardGraphicsLayer),this.clipboardGraphicsLayer=void 0}catch{}this.checkAndSuspendMove()}checkAndSuspendMove(){let e=this.activeFlowPage==="form-page";this.clipboardGraphicsLayer&&(this.clipboardGraphicsLayer.visible=!e),this.clipboardMover&&(this.clipboardMover.suspended=e)}get clipboard(){return Me()}get clipboardFeatures(){return this.clipboard.items.filter(e=>e.type==="feature")}get hasPasteCommandsPage(){return this.availableCommands.length>1||!!this.availableCommands.at(0)?.mustShowOnCommandPage}_clearActiveCommand(){this.activeCommand=void 0,this.lastPasteError=void 0}resetHome(){let e=this.activeFlowPage;this.hasPasteCommandsPage?(e="commands-page",this._clearActiveCommand(),this.selectedClipboardItemIndex=-1):this.clipboard.items.length===0?(e="clipboard-empty-page",this._clearActiveCommand(),this.selectedClipboardItemIndex=-1):this.availableCommands.length===0?(e="no-command-page",this._clearActiveCommand()):this.availableCommands[0].commandEnabled?(e="gallery-page",this.activeCommand=this.availableCommands[0].id,this.lastPasteError=void 0):(e="no-command-page",this._clearActiveCommand(),this.selectedClipboardItemIndex=-1),this.activeFlowPage==="clipboard"&&this.hideViewClipboard?(this.activeFlowPage=e,this.beforeClipboard=void 0):this.activeFlowPage==="clipboard"&&!this.hideViewClipboard?this.beforeClipboard=e:(this.activeFlowPage=e,this.beforeClipboard=void 0),this.resetFormPage()}get workingLayers(){return(this.view?.map?.allLayers?.toArray()??[]).filter(e=>e.type==="feature"||e.type==="subtype-group").filter(e=>{let t=this.clipboard.singleGeometryType;return this.activeCommand==="paste-merge"&&this.clipboard.singleGeometryType==="point"&&(t="multipoint"),!(e.geometryType!==t||!this.layerPermissionsCheck.canCreate(e))})}get clipboardItemLayers(){let e=new Set;for(let t of this.clipboard.items)t.layer&&e.add(t.layer.type==="subtype-sublayer"?t.layer.parent:t.layer);return[...e]}get canCreateOnAllLayers(){if(this.clipboardItemLayers.length===0)return!1;for(let e of this.clipboardItemLayers)if(!e||!this.layerPermissionsCheck.canCreate(e))return!1;return!0}get availableCommands(){let e=new Set(this.supportedCommands);return this.allCommands.filter(t=>e.has(t.id))}get allCommands(){let e=[];e.push(...[P,x,$,F,_].map(t=>new t({viewModel:this})));for(let t of this.customPasteCommands)e.push(new f({viewModel:this,customCommand:t}));return e}get pasteCommandsState(){return this.allCommands.map(e=>({id:e.id,disabled:!e.commandEnabled,available:this.supportedCommands.includes(e.id)}))}nextActiveFeature(){this.bauActiveFeatureIndex++,this.updateIndividualMultiFeatureFormHighlight()}previousActiveFeature(){this.bauActiveFeatureIndex--,this.updateIndividualMultiFeatureFormHighlight()}resetFormPage(){this.bauApplySet?.featureState?.clearAll(),this.bauApplySet=void 0,this.clearIndividualFeatureFormHighlight(),this.clearMultiFeatureFormHighlights(),this.bauFeatures=void 0,this.bauOriginalGraphics=[]}getPasteCommandById(e){return this.allCommands.find(t=>t.id===e)}async runPasteFormCommand(e){try{this.applying=!0;let t=this.bauApplySet,i=await e.onApply({command:this.activeCommand,applySet:t});if(i.success){this.resetHome(),this.closeOnApply&&e.closeAfterApply();return}this.handleApplyError(i,e.onPasteError)}catch(t){this.lastPasteError={errorCode:"unexpectedError",errorMessage:t.message,localizedErrorMessage:"unexpectedError"},e.onPasteError(this.lastPasteError);return}finally{this.applying=!1}}handleApplyError(e,t){e.success||e.errorCode!=="cancelled"&&(this.lastPasteError={errorCode:e.errorCode??"unexpectedError",errorMessage:e.errorMessage??"",localizedErrorMessage:e.errorMessage?void 0:"unexpectedError"},t(this.lastPasteError))}async writeChanges(e){return await _e(e,this.view)}};c([s()],n.prototype,"customPasteCommands",2);c([s()],n.prototype,"bauInvalidFeatures",2);c([s()],n.prototype,"bauFormValid",2);c([s()],n.prototype,"bauFormUpdating",2);c([s()],n.prototype,"bauActiveFeatureIndex",2);c([s()],n.prototype,"bauHasTooManyFeatures",2);c([s()],n.prototype,"bauHasTooManyComplexFeatures",2);c([s()],n.prototype,"bauActiveGraphic",1);c([s()],n.prototype,"hasTooManyPasteCreateFeatures",1);c([s()],n.prototype,"bauActiveLayer",1);c([s()],n.prototype,"bauFeatures",2);c([s()],n.prototype,"bauApplySet",2);c([s()],n.prototype,"bauOriginalGraphics",2);c([s()],n.prototype,"formViewModelMap",2);c([s()],n.prototype,"bauHighlight",2);c([s()],n.prototype,"bauIndividualHighlight",2);c([s()],n.prototype,"view",2);c([s()],n.prototype,"supportedCommands",2);c([s()],n.prototype,"selectedFeature",2);c([s()],n.prototype,"pasteWithMultipleLayersEnabled",2);c([s()],n.prototype,"pasteWithMultipleFeaturesEnabled",2);c([s()],n.prototype,"alwaysShowFeatureForm",2);c([s()],n.prototype,"pasteTemplate",2);c([s()],n.prototype,"pasteTemplateIsValid",1);c([s()],n.prototype,"selectedClipboardItemIndex",2);c([s()],n.prototype,"clipboardAndTemplateSupportAttributes",1);c([s()],n.prototype,"hasClipboardItemMatchingTemplate",1);c([s()],n.prototype,"pasteWithAttributes",2);c([s()],n.prototype,"closeOnApply",2);c([s()],n.prototype,"currentPasteOperation",2);c([s()],n.prototype,"activeFlowPage",1);c([s()],n.prototype,"_activeFlowPage",2);c([s()],n.prototype,"beforeClipboard",2);c([s()],n.prototype,"beforeForm",2);c([s()],n.prototype,"showClipboardItems",2);c([s()],n.prototype,"updating",1);c([s()],n.prototype,"hideTooltips",2);c([s()],n.prototype,"hideFooter",2);c([s()],n.prototype,"hideFooterCancelButton",2);c([s()],n.prototype,"hideHeaderCloseButton",2);c([s()],n.prototype,"hideViewClipboard",2);c([s()],n.prototype,"hideErrorNotice",2);c([s()],n.prototype,"clipboardGraphicsLayer",2);c([s()],n.prototype,"clipboardMover",2);c([s()],n.prototype,"highlightGroup",2);c([s()],n.prototype,"clipboard",1);c([s()],n.prototype,"clipboardFeatures",1);c([s()],n.prototype,"hasPasteCommandsPage",1);c([s()],n.prototype,"activeCommand",2);c([s()],n.prototype,"maximumFeatureCount",2);c([s()],n.prototype,"maximumFeatureCountWithComplexForms",2);c([s()],n.prototype,"workingLayers",1);c([s()],n.prototype,"layerPermissionsCheck",2);c([s()],n.prototype,"clipboardItemLayers",1);c([s()],n.prototype,"canCreateOnAllLayers",1);c([s()],n.prototype,"applying",2);c([s()],n.prototype,"lastPasteError",2);c([s()],n.prototype,"availableCommands",1);c([s()],n.prototype,"allCommands",1);c([s()],n.prototype,"pasteCommandsState",1);n=c([C("components.paste.PasteViewModel")],n);var it=Object.defineProperty,at=Object.getOwnPropertyDescriptor,S=(e,t,i,a)=>{for(var r=a>1?void 0:a?at(t,i):t,o=e.length-1,l;o>=0;o--)(l=e[o])&&(r=(a?l(t,i,r):l(r))||r);return a&&r&&it(t,i,r),r},M=class extends Z{constructor(){super(...arguments),this.continuous=!1,this._mover=null,this.stateChanged=null,this._suspended=!1}clipboardContentsChanged(){this._destroyMover(),this.stateChanged?.("clipboard-contents-changed"),this.continuous&&this.start()}start(){this._destroyMover(),this._mover=$e({view:this.view,graphics:this.graphicsLayer.graphics.toArray(),indicatorsEnabled:!0,highlightsEnabled:!0,enableMoveAllGraphics:!0,callbacks:{onGraphicPointerOver:()=>{"cursor"in this.view&&(this.view.cursor="move")},onGraphicPointerOut:()=>{"cursor"in this.view&&(this.view.cursor="default")},onGraphicMoveStop:async()=>{"cursor"in this.view&&(this.view.cursor="default");for(let e of this.graphicsLayer.graphics)this.clipboard.items.getItemAt(e.attributes.clipboardIdx).graphic.geometry=e.geometry;this._destroyMover(),this.stateChanged?.("contents-moved"),this.continuous&&setTimeout(()=>{this.start()},100)}}})}cancel(){this.continuous=!1,this._destroyMover(),this.stateChanged?.("completed")}get suspended(){return this._suspended}set suspended(e){e!==this._suspended&&(e?(this._destroyMover(),this.stateChanged?.("suspended")):(this.start(),this.stateChanged?.("suspended")),this._suspended=e)}_destroyMover(){this._mover?.destroy(),this._mover=null}};S([s()],M.prototype,"view",2);S([s()],M.prototype,"continuous",2);S([s()],M.prototype,"clipboard",2);S([s()],M.prototype,"graphicsLayer",2);S([s()],M.prototype,"suspended",1);S([s()],M.prototype,"_suspended",2);M=S([C("components.paste.ClipboardMove")],M);var rt=oe(n),K=class extends ee{constructor(){super(),this._featureFormElement=V(),this._floatingChoiceContainer=V(),this._bauForm=V(),this._templateGallery=V(),this._messages=se(),this.viewModel=rt(this),this.hasPasteCommandsPage=this.viewModel.hasPasteCommandsPage,this.activeCommand=this.viewModel.activeCommand,this.availableCommands=this.viewModel.availableCommands,this._showFloatingChoice=!1,this.activeFlowPage=this.viewModel.activeFlowPage,this.autoDestroyDisabled=!1,this.view=this.viewModel.view,this.selectedFeature=this.viewModel.selectedFeature,this.closed=!1,this.highlightGroup=this.viewModel.highlightGroup,this.pasteWithMultipleLayersEnabled=this.viewModel.pasteWithMultipleLayersEnabled,this.pasteWithMultipleFeaturesEnabled=this.viewModel.pasteWithMultipleFeaturesEnabled,this.alwaysShowFeatureForm=this.viewModel.alwaysShowFeatureForm,this.closeOnApply=this.viewModel.closeOnApply,this.hideErrorNotice=this.viewModel.hideErrorNotice,this.hideFooterCancelButton=this.viewModel.hideFooterCancelButton,this.hideFooter=this.viewModel.hideFooter,this.hideHeaderCloseButton=this.viewModel.hideHeaderCloseButton,this.hideTooltips=this.viewModel.hideTooltips,this.hideViewClipboard=this.viewModel.hideViewClipboard,this.maximumFeatureCount=this.viewModel.maximumFeatureCount,this.maximumFeatureCountWithComplexForms=this.viewModel.maximumFeatureCountWithComplexForms,this.layerPermissionsCheck=this.viewModel.layerPermissionsCheck,this.pasteCommandsState=this.viewModel.pasteCommandsState,this.arcgisApplyPasteCommand=E(),this.arcgisApplyPasteError=E(),this.arcgisBeforeClipboardMove=E(),this.arcgisClipboardMoveStateChanged=E(),this.arcgisClose=E(),this.arcgisPropertyChange=re()("pasteCommandsState","activeFlowPage"),this.arcgisReady=E(),this.listenOn(window,"click",this._handleClickAway),this.listenOn(window,"keydown",this._handleKeyDown)}static{this.properties={hasPasteCommandsPage:16,activeCommand:16,availableCommands:16,_showFloatingChoice:16,activeFlowPage:32,autoDestroyDisabled:5,referenceElement:1,view:0,selectedFeature:0,closed:7,highlightGroup:1,supportedCommands:1,pasteWithMultipleLayersEnabled:5,pasteWithMultipleFeaturesEnabled:5,alwaysShowFeatureForm:5,beforeApply:0,clipboard:32,closeOnApply:5,hideErrorNotice:5,hideFooterCancelButton:5,hideFooter:5,hideHeaderCloseButton:5,hideTooltips:5,hideViewClipboard:5,maximumFeatureCount:9,maximumFeatureCountWithComplexForms:9,layerPermissionsCheck:0,pasteCommandsState:0}}static{this.styles=Ae}get supportedCommands(){return this.viewModel.supportedCommands}set supportedCommands(t){if(!Array.isArray(t)){this.viewModel.supportedCommands=t.split(",");return}this.viewModel.supportedCommands=t.slice(0)}get clipboard(){return this.viewModel.clipboard}async cancelMoveClipboard(){this.viewModel.clipboardMover?.cancel(),this.viewModel.clipboardMover=void 0}async destroy(){await this.manager.destroy()}async executePasteCommand(t,i){let a=this.viewModel.getPasteCommandById(t);if(!a)throw new Error("arcgis-paste: Paste command not found");if(!a.commandEnabled)throw new Error("arcgis-paste: Paste command is not enabled");if(!i?.silent){if(!this.availableCommands.includes(a))throw new Error("arcgis-paste: Paste command is not available");return this.viewModel.resetHome(),await this._runPasteCommand(a,i),{userInputRequired:!1,success:!0}}return await a.execute()}async registerPasteCommand(t){this.viewModel.customPasteCommands.add(t)}async reset(){this.viewModel.activeFlowPage==="clipboard"&&(this.viewModel.activeFlowPage=this.viewModel.beforeClipboard),this.viewModel.resetHome()}async showClipboardItems(t){this.viewModel.showClipboardItems=t,this.viewModel.updateClipboardGraphicsLayer()}async startMoveClipboard(t){if(!this.viewModel.showClipboardItems)throw new Error("arcgis-paste: Cannot move clipboard. Clipboard items must be visible first.");this.arcgisBeforeClipboardMove.emit().defaultPrevented||(this.viewModel.clipboardMover&&(this.viewModel.clipboardMover.stateChanged=null,this.viewModel.clipboardMover.cancel(),this.viewModel.clipboardMover=void 0),this.viewModel.clipboardMover=new M({view:this.view,continuous:t,clipboard:this.clipboard,graphicsLayer:this.viewModel.clipboardGraphicsLayer,stateChanged:i=>{i==="contents-moved"&&this.viewModel.updateClipboardGraphicsLayer(),this.arcgisClipboardMoveStateChanged.emit({change:i})}}),this.viewModel.clipboardMover.start())}async writeChanges(t){return await this.viewModel.writeChanges(t)}updated(){this._featureFormElement.value&&(this._featureFormElement.value.hideReadOnlyNotice=!0,this._featureFormElement.value.disabled=!0),this._checkAndUpdateInitialPasteTemplate()}loaded(){this.manager.onLifecycle(()=>[this.viewModel.clipboard.items.on("change",()=>{this.viewModel.updateClipboardGraphicsLayer(),this.activeFlowPage==="form-page"&&this.viewModel.resetHome()}),X(()=>this.clipboard.version,()=>{this.viewModel.resetHome(),this.viewModel.updateClipboardGraphicsLayer(),this.viewModel.clipboardMover?.clipboardContentsChanged()}),X(()=>this.closed,()=>{this.closed&&this.viewModel.formViewModelMap.clear(),this.viewModel.updateClipboardGraphicsLayer()}),X(()=>[this.viewModel?.supportedCommands.join(","),this.pasteWithMultipleFeaturesEnabled,this.viewModel?.hideViewClipboard,this.pasteWithMultipleLayersEnabled].join(","),()=>{this.viewModel.resetHome()},{initial:!0})])}_handleCloseAfterApply(){this.closed=!0,this.arcgisClose.emit()}_updateBauViewModelFields(t){this.viewModel.bauActiveFeatureIndex=t.activeFeatureIndex,this.viewModel.bauInvalidFeatures=t.invalidFeatures,this.viewModel.bauFormValid=t.valid,this.viewModel.bauFormUpdating=t.updating,this.viewModel.bauHasTooManyComplexFeatures=t.hasTooManyComplexFeatures,this.viewModel.bauHasTooManyFeatures=t.hasTooManyFeatures}_handleClickAway(t){!this._showFloatingChoice||!this._floatingChoiceContainer.value||t.composedPath().find(i=>i===this._floatingChoiceContainer.value)||(this._showFloatingChoice=!1)}_handleKeyDown(t){!this._showFloatingChoice||!this._floatingChoiceContainer.value||t.composedPath().find(i=>i===this._floatingChoiceContainer.value)||(this._showFloatingChoice=!1)}async _runPasteCommand(t,i){try{this.viewModel.lastPasteError=void 0,await t.initiate({closeAfterApply:()=>{this._handleCloseAfterApply()},onPasteError:a=>{this.arcgisApplyPasteError.emit({command:t.id,errorMessage:a.errorMessage,errorCode:a.errorCode})},onApply:async a=>{try{await this.beforeApply?.();let r={...a};return this.arcgisApplyPasteCommand.emit(r).defaultPrevented?{success:!1,errorCode:"cancelled"}:r.completionCallback?await r.completionCallback??{success:!0}:{success:!0}}catch{return{success:!1}}}},i)}catch{}}_checkAndUpdateInitialPasteTemplate(){requestAnimationFrame(()=>{if(!this._templateGallery.value||this.viewModel.activeFlowPage!=="gallery-page")return;let t=this._templateGallery.value;if(t.state!=="ready")return;if(this.viewModel.pasteTemplateIsValid||(this.viewModel.pasteTemplate=void 0),this.viewModel.pasteTemplate!==void 0){t.selectedItem||this._templateGallery.value?.select(this.viewModel.pasteTemplate);return}let i;for(let a of t.items){if("items"in a){if(a.items.length>0){i=a.items[0];break}continue}i=a;break}i&&t.select(i)})}_renderFlowCommandStart(t){return t?d`<slot name=home-header-actions-start slot=header-actions-start></slot>`:null}_renderCloseCommand(t){return d`${this.hideHeaderCloseButton?null:d`<calcite-action slot=header-actions-end icon=x text @click=${()=>{this.reset(),this.closed=!0,this.arcgisClose.emit()}}></calcite-action>`}${t?d`<slot name=header-actions-end slot=header-actions-end></slot>`:null}`}_renderClipboardCommand(t){return d`<calcite-action slot=header-actions-end icon=clipboard .hidden=${this.viewModel.hideViewClipboard} .text=${this._messages.clipboardTooltip??""} .id=${`arcgis-clipboard-show-${t}`} .disabled=${this.viewModel.updating} @click=${()=>{this.viewModel.activeFlowPage="clipboard"}}>${this.hideTooltips?null:d`<calcite-tooltip .referenceElement=${`arcgis-clipboard-show-${t}`} placement=bottom><span>${this._messages.clipboardTooltip}</span></calcite-tooltip>`}</calcite-action>`}_renderNoClipboardData(t){return b("no-data",d`<calcite-flow-item .selected=${t} .heading=${this._messages.componentLabel} @calciteFlowItemBack=${i=>{i.preventDefault()}}>${this._renderClipboardCommand("no-data")}${this._renderCloseCommand(t)}<calcite-panel><div class="pad-contents"><div class="flex flex-row justify-center"><svg xmlns=http://www.w3.org/2000/svg height=92 width=92 style=${N({strokeWidth:"0.1px",fill:"var(--calcite-color-text-2)"})} viewBox="0 0 64 64">${R`<path d="M21 18h-1v-3h1zm24-3h-1v3h1zm0 5h-1v3h1zm-24 0h-1v3h1zm9.84 13.71l.3.954 3.02-.954-.3-.953zm-6.04 1.908l.3.953 3.02-.953-.3-.953zm-3.8 1.2V35h-1v3.182l2.08-.657-.3-.953zM21 30h-1v3h1zm0-5h-1v3h1zm27.816 5.896l-4.746.015 2.294 4.575-3.071 1.535-2.358-4.668-2.835 3.886V23.036zm-6.04-.78l3.607-.012-7.483-5.49v9.17l2.16-2.96 2.587 5.126 1.643-.821zM60.9 10.874v41.25a1.777 1.777 0 0 1-1.775 1.775H4.875A1.777 1.777 0 0 1 3.1 52.125v-41.25A1.777 1.777 0 0 1 4.875 9.1h54.25a1.777 1.777 0 0 1 1.775 1.775zm-.8 24.54l-24.2 7.641V53.1h23.225a.976.976 0 0 0 .975-.975zm0-24.54a.976.976 0 0 0-.975-.975H45V13h-1V9.9H21V13h-1V9.9H4.875a.976.976 0 0 0-.975.975V32.1H18v.8H3.9v19.225a.976.976 0 0 0 .975.975H35.1V35.51l.8-.252v6.96l24.2-7.643z" />`}</svg></div><p class="text-center">${this._messages.noClipboardData}</p></div></calcite-panel></calcite-flow-item>`)}_renderNoCommandPage(t){let i=this._messages.noPasteCommandsAvailable,a=this.availableCommands.at(0);return a?.commandDisabledReason&&(i=a.commandDisabledReason(this._messages,this._messages._lang),i||(i=this._messages.noPasteCommandsAvailable)),b("no-command",d`<calcite-flow-item .selected=${t} .heading=${this._messages.componentLabel} @calciteFlowItemBack=${r=>{r.preventDefault()}}>${this._renderClipboardCommand("no-command")}${this._renderCloseCommand(t)}<calcite-panel><div class="pad-contents"><div class="flex flex-row justify-center"><svg xmlns=http://www.w3.org/2000/svg height=92 width=92 style=${N({strokeWidth:"0.1px",fill:"var(--calcite-color-text-2)"})} viewBox="0 0 64 64">${R`<path d="M21 18h-1v-3h1zm24-3h-1v3h1zm0 5h-1v3h1zm-24 0h-1v3h1zm9.84 13.71l.3.954 3.02-.954-.3-.953zm-6.04 1.908l.3.953 3.02-.953-.3-.953zm-3.8 1.2V35h-1v3.182l2.08-.657-.3-.953zM21 30h-1v3h1zm0-5h-1v3h1zm27.816 5.896l-4.746.015 2.294 4.575-3.071 1.535-2.358-4.668-2.835 3.886V23.036zm-6.04-.78l3.607-.012-7.483-5.49v9.17l2.16-2.96 2.587 5.126 1.643-.821zM60.9 10.874v41.25a1.777 1.777 0 0 1-1.775 1.775H4.875A1.777 1.777 0 0 1 3.1 52.125v-41.25A1.777 1.777 0 0 1 4.875 9.1h54.25a1.777 1.777 0 0 1 1.775 1.775zm-.8 24.54l-24.2 7.641V53.1h23.225a.976.976 0 0 0 .975-.975zm0-24.54a.976.976 0 0 0-.975-.975H45V13h-1V9.9H21V13h-1V9.9H4.875a.976.976 0 0 0-.975.975V32.1H18v.8H3.9v19.225a.976.976 0 0 0 .975.975H35.1V35.51l.8-.252v6.96l24.2-7.643z" />`}</svg></div><p class="text-center">${i}</p></div></calcite-panel></calcite-flow-item>`)}_renderAttributeCheckbox(t){return d`<calcite-label class="bold">${this._messages.attributesSubtitle}</calcite-label><calcite-label layout=inline><calcite-checkbox .disabled=${t} .checked=${this.viewModel.pasteWithAttributes} @calciteCheckboxChange=${i=>{this.viewModel.pasteWithAttributes=i.target.checked}}></calcite-checkbox>${this._messages.pasteWithAttributesLabel}</calcite-label>`}_renderFlowPasteAs(t){return t?b("paste-gallery",d`<calcite-flow-item .selected=${t} .heading=${this._messages.componentLabel} @calciteFlowItemBack=${i=>{i.preventDefault(),this.viewModel.hasPasteCommandsPage&&(this.viewModel.activeFlowPage="commands-page")}}>${this._renderFlowCommandStart(!this.viewModel.hasPasteCommandsPage)}${this._renderClipboardCommand("paste-as")}${this._renderCloseCommand(t)}<calcite-panel>${this.hideFooter?null:d`<div class="w-full" slot=footer><div class="w-full flex"><calcite-button .disabled=${this.viewModel.updating} width=half .hidden=${this.viewModel.hideFooterCancelButton} kind=brand appearance=outline @click=${()=>{this.viewModel.resetHome(),this.closed=!0,this.arcgisClose.emit()}}>${this._messages.cancel}</calcite-button><calcite-button .disabled=${this.viewModel.updating||!this.viewModel.pasteTemplate||this.viewModel.hasTooManyPasteCreateFeatures} kind=brand appearance=solid .width=${this.viewModel.hideFooterCancelButton?"full":"half"} @click=${()=>{try{this.viewModel.lastPasteError=void 0,this.viewModel.getPasteCommandById(this.viewModel.activeCommand).runPasteCommand({closeAfterApply:()=>{this._handleCloseAfterApply()},onPasteError:i=>{this.arcgisApplyPasteError.emit({command:this.activeCommand??"paste-as",errorMessage:i.errorMessage,errorCode:i.errorCode})},onApply:async i=>{try{await this.beforeApply?.();let a={...i};return this.arcgisApplyPasteCommand.emit(a).defaultPrevented?{success:!1,errorCode:"cancelled"}:a.completionCallback?await a.completionCallback??{success:!0}:{success:!0}}catch{return{success:!1}}}},this.viewModel.activeCommand??"paste-as")}catch{}}}>${this.viewModel.alwaysShowFeatureForm?this._messages.next:(this.viewModel.clipboardFeatures.length??0)>1&&this.activeCommand!=="paste-merge"?y(this._messages.pasteMany??"",{num:this.viewModel.clipboardFeatures.length}):this._messages.paste}</calcite-button></div></div>`}${this.viewModel.hasTooManyPasteCreateFeatures?d`<div class="pad-start-end gallery-content"><calcite-notice open icon=exclamation-point kind=warning><div slot=message>${y(this._messages.tooManyCreateFeatures??"",{num:this.maximumFeatureCount})}</div></calcite-notice></div>`:null}<slot name=gallery-page-message></slot><div class="pad-start-end gallery-content"><div>${!this.viewModel.clipboardAndTemplateSupportAttributes&&this.viewModel.pasteTemplate?d`<div class="pad-contents"><calcite-notice open icon=exclamation-point kind=info><div slot=message>${this._messages.attributesNotCopied}</div>${this.activeCommand==="paste-merge"&&this.viewModel.hasClipboardItemMatchingTemplate?d`<calcite-link slot=link @click=${()=>{this.viewModel.activeFlowPage="merge-page"}} title=${this._messages.seeMergeOptions??ie}>${this._messages.seeMergeOptions}</calcite-link>`:null}</calcite-notice></div>`:null}${this.viewModel.clipboardAndTemplateSupportAttributes&&this.viewModel.pasteTemplate?this._renderAttributeCheckbox(!this.viewModel.clipboardAndTemplateSupportAttributes):null}${this.viewModel.clipboardAndTemplateSupportAttributes?null:this._renderAttributeCheckbox(!1)}</div><calcite-list .hidden=${this.viewModel.activeCommand!=="paste-merge"} .label=${this._messages.pasteCommandChoices??""} selection-mode=none selection-appearance=border><calcite-list-item .label=${this._messages.mergeOptionsTitle} .description=${this._messages.mergeOptionsDesc} .disabled=${this.viewModel.updating} @click=${()=>{this.viewModel.activeFlowPage="merge-page"}}><calcite-icon slot=content-start icon=configure></calcite-icon><calcite-icon slot=content-end icon=chevron-right></calcite-icon></calcite-list-item></calcite-list><div>${this.viewModel.workingLayers.length>0?d`<arcgis-feature-templates-legacy .disabledItemFunction=${i=>!!(i.template&&me(i.template)&&i.template.type!=="feature")} class="paste-feature-templates" .layers=${this.viewModel.workingLayers} selection-mode=single @arcgisPropertyChange=${i=>{this._checkAndUpdateInitialPasteTemplate()}} @arcgisSelect=${i=>{this.viewModel.pasteTemplate=i.detail.item}} .view=${this.viewModel.view} .referenceElement=${this.referenceElement} ${D(this._templateGallery)}></arcgis-feature-templates-legacy>`:d`<calcite-notice open icon=exclamation-point kind=warning><div slot=message>${y(this._messages.noMatchingEditableLayers??"",{num:this.maximumFeatureCount})}</div></calcite-notice>`}</div></div></calcite-panel>${this._renderApplying()}</calcite-flow-item>`):b("paste-gallery",d`<calcite-flow-item .selected=${t} .heading=${this._messages.componentLabel} @calciteFlowItemBack=${i=>{i.preventDefault(),this.viewModel.hasPasteCommandsPage&&(this.viewModel.activeFlowPage="commands-page")}}>${this._renderFlowCommandStart(!this.viewModel.hasPasteCommandsPage)}</calcite-flow-item>`)}_renderFlowPasteMerge(t){if(!t)return b("paste-merge",d`<calcite-flow-item .selected=${t} .heading=${this._messages.componentLabel} @calciteFlowItemBack=${a=>{a.preventDefault(),this.viewModel.activeFlowPage="gallery-page"}}></calcite-flow-item>`);let i=this.viewModel.selectedClipboardItemIndex===-1?null:this.viewModel.clipboard.items.getItemAt(this.viewModel.selectedClipboardItemIndex);return b("paste-merge",d`<calcite-flow-item .selected=${t} .heading=${this._messages.componentLabel} @calciteFlowItemBack=${a=>{a.preventDefault(),this.viewModel.activeFlowPage="gallery-page"}}>${this._renderClipboardCommand("merge")}${this._renderCloseCommand(t)}<calcite-panel><div class="merge-split-view-container"><div class="pad-contents merge-split-view-items"><calcite-label>${this._messages.selectionLabel}<calcite-list .label=${this._messages.features??""} selection-mode=single selection-appearance=border>${this.clipboard.items.toArray().map((a,r)=>({id:r,item:a})).filter(a=>a.item.type==="feature"&&a.item.layer&&a.item.graphic).map(a=>d`<calcite-list-item .disabled=${this.viewModel.updating} .selected=${a.id===this.viewModel.selectedClipboardItemIndex} @calciteListItemSelect=${()=>{this.viewModel.selectedClipboardItemIndex=a.id}} @pointerenter=${r=>{this.viewModel.highlightSelectedGraphicOnMap(a.item),r.target.classList.add("hovering")}} @pointerleave=${r=>{r.target.classList.remove("hovering"),this.viewModel.clearHighlightSelectedGraphic()}} .value=${a.id}><arcgis-feature-title slot=content .graphic=${a.item.graphic} .layer=${a.item.layer}></arcgis-feature-title><arcgis-feature-image width-in-pixels=16 height-in-pixels=16 use-true-shape slot=content-start .graphic=${a.item.graphic} .layer=${a.item.layer}></arcgis-feature-image>${this.viewModel.selectedClipboardItemIndex!==a.id?d`<calcite-chip slot=content-end .label=${this._messages.preservethis??""} class="chip-indent only-on-hover item-candidate" scale=s .value=${a.id}>${this._messages.preservethis??""}</calcite-chip>`:""}${this.viewModel.selectedClipboardItemIndex===a.id?d`<calcite-chip icon=check .label=${this._messages.preserved??""} class="item-preserved chip-indent" scale=s slot=content-end .value=${a.id}>${this._messages.preserved}</calcite-chip>`:""}</calcite-list-item>`)}</calcite-list></calcite-label></div><div class="merge-split-view-attributes">${this.viewModel.selectedClipboardItemIndex===-1?d`<div></div>`:d`<div class="merge-feature-form"><arcgis-feature-form heading-level=5 .feature=${i.graphic} .formTemplate=${i.layer.formTemplate?i.layer.formTemplate:null} .layer=${i.layer} ${D(this._featureFormElement)}></arcgis-feature-form></div>`}</div></div></calcite-panel>${this._renderApplying()}</calcite-flow-item>`)}_renderFlowPasteForm(t){if(!t)return b("paste-form",d`<calcite-flow-item .selected=${t} .heading=${this._messages.componentLabel} @calciteFlowItemBack=${p=>{p.preventDefault(),this.viewModel.activeFlowPage=this.viewModel.beforeForm,this.viewModel.resetFormPage()}}></calcite-flow-item>`);let i=(this.viewModel.bauFeatures?.length??0)>1&&!this.viewModel.bauHasTooManyFeatures&&!this.viewModel.bauHasTooManyComplexFeatures,a=this.viewModel.updating,r=this.viewModel.bauActiveFeatureIndex>0,o=this.viewModel.bauActiveFeatureIndex!==-1&&this.viewModel.bauActiveFeatureIndex<(this.viewModel.bauFeatures?.length??0)-1,l=this.viewModel.bauActiveFeatureIndex===-1?y(this._messages.multipleFeaturesX??"",{total:this.viewModel.bauFeatures?.length??0}):y(this._messages.range??"",{current:this.viewModel.bauActiveFeatureIndex+1,total:this.viewModel.bauFeatures?.length??0}),h=(this.viewModel.bauInvalidFeatures?.length??0)>0;return b("paste-form",d`<calcite-flow-item .selected=${t} .heading=${this._messages.componentLabel} @calciteFlowItemBack=${p=>{p.preventDefault(),this.viewModel.activeFlowPage=this.viewModel.beforeForm,this.viewModel.resetFormPage()}}>${this._renderCloseCommand(t)}<calcite-panel>${this.hideFooter?null:d`<div class="w-full" slot=footer><div class="w-full flex"><calcite-button .disabled=${this.viewModel.updating} width=half .hidden=${this.viewModel.hideFooterCancelButton} kind=brand appearance=outline @click=${()=>{this.viewModel.resetHome(),this.closed=!0,this.arcgisClose.emit()}}>${this._messages.cancel}</calcite-button><calcite-button .disabled=${this.viewModel.updating||this.viewModel.bauFormUpdating||this.viewModel.bauHasTooManyFeatures||this.viewModel.bauHasTooManyComplexFeatures} kind=brand appearance=solid .width=${this.viewModel.hideFooterCancelButton?"full":"half"} @click=${async()=>{try{if(await ue(()=>!this.viewModel.bauFormUpdating),!this.viewModel.bauFormValid){this._bauForm.value?.goToFirstError();return}this.viewModel.lastPasteError=void 0,this.viewModel.runPasteFormCommand({closeAfterApply:()=>{this._handleCloseAfterApply()},onPasteError:p=>{this.arcgisApplyPasteError.emit({command:this.activeCommand??"paste-as",errorMessage:p.errorMessage,errorCode:p.errorCode})},onApply:async p=>{try{await this.beforeApply?.();let m={...p};return this.arcgisApplyPasteCommand.emit(m).defaultPrevented?{success:!1,errorCode:"cancelled"}:m.completionCallback?await m.completionCallback??{success:!0}:{success:!0}}catch{return{success:!1}}}})}catch{}}}>${(this.viewModel.bauFeatures?.length??0)>1?y(this._messages.pasteMany??"",{num:this.viewModel.bauFeatures.length}):this._messages.paste}</calcite-button></div></div>`}${i?d`<calcite-action-bar overflow-actions-disabled slot=action-bar layout=horizontal scale=s expand-disabled class="carousel-bar"><calcite-button .disabled=${this.viewModel.updating} @click=${p=>{this._showFloatingChoice=!this._showFloatingChoice,p.stopPropagation()}} scale=s appearance=transparent icon-start=legend icon-end=chevron-down kind=neutral><span class="bau-pick">${l}${h?d`<calcite-icon scale=s icon=exclamation-mark-triangle class="danger-icon-warning"></calcite-icon>`:""}</span></calcite-button><calcite-action slot=actions-end icon=chevron-left icon-flip-rtl scale=s .text=${this._messages.back??""} .disabled=${!r||a||!i} @click=${()=>{this.viewModel.previousActiveFeature()}}></calcite-action><calcite-action slot=actions-end icon=chevron-right icon-flip-rtl scale=s .text=${this._messages.next??""} .disabled=${!o||a||!i} @click=${()=>{this.viewModel.nextActiveFeature()}}></calcite-action></calcite-action-bar>${this._renderFloatingUIChoice(i)}`:""}<div class=${te(this.viewModel.bauHasTooManyComplexFeatures||this.viewModel.bauHasTooManyFeatures?"hidden":void 0)}>${this._renderPasteFormBreadcrumb()}<arcgis-multi-feature-form edit-type=INSERT submit-has-been-attempted .view=${this.view} .referenceElement=${this.referenceElement} .hidden=${this.viewModel.bauHasTooManyComplexFeatures||this.viewModel.bauHasTooManyFeatures} .disabled=${this.viewModel.updating} .maximumFeatureCount=${this.maximumFeatureCount} .maximumFeatureCountWithComplexForms=${this.maximumFeatureCountWithComplexForms} .features=${this.viewModel.bauFeatures} .activeFeatureIndex=${this.viewModel.bauActiveFeatureIndex} @arcgisPropertyChange=${p=>{this._updateBauViewModelFields(p.target)}} @arcgisValueChange=${p=>{let m=0;for(let v of this.viewModel.bauFeatures?.toArray()??[]){let u=this.viewModel.bauOriginalGraphics[m];this.viewModel.formFeatureValuesChanged(u,p.target.getValues(v)),m++}}} ${D(this._bauForm)}></arcgis-multi-feature-form></div>${this.viewModel.bauHasTooManyComplexFeatures||this.viewModel.bauHasTooManyFeatures?d`<div class="pad-start-end gallery-content"><calcite-notice open icon=exclamation-point kind=warning><div slot=message>${this.viewModel.bauHasTooManyFeatures?y(this._messages.tooManyCreateFeatures??"",{num:this.maximumFeatureCount}):y(this._messages.tooManyCreateComplexFeatures??"",{num:this.maximumFeatureCountWithComplexForms})}</div></calcite-notice></div>`:null}</calcite-panel>${this.renderPasteErrorFooter()}${this._renderApplying()}</calcite-flow-item>`)}_renderPasteFormBreadcrumb(){return d`<calcite-list .label=${this._messages.breadcrumb??""} selection-appearance=border scale=s selection-mode=none><calcite-list-item>${this.viewModel.bauActiveFeatureIndex===-1?d`<calcite-icon scale=s slot=content-start icon=group-form></calcite-icon>`:I(this.viewModel.bauActiveGraphic)?.isTable?d`<calcite-icon scale=s slot=content-start icon=table></calcite-icon>`:d`<arcgis-feature-image width-in-pixels=16 height-in-pixels=16 use-true-shape slot=content-start .graphic=${this.viewModel.bauActiveGraphic} .layer=${this.viewModel.bauActiveLayer}></arcgis-feature-image>`}${this.viewModel.bauActiveFeatureIndex===-1?d`<span slot=content>${y(this._messages.multipleFeaturesX??"",{total:this.viewModel.bauFeatures?.length??0})}</span>`:d`<arcgis-feature-title is-new-feature slot=content .graphic=${this.viewModel.bauActiveGraphic} .layer=${this.viewModel.bauActiveLayer}></arcgis-feature-title>`}</calcite-list-item></calcite-list>`}_renderFloatingUIChoice(t){if(!this._showFloatingChoice||!t)return d`<div></div>`;let i=!1;this.viewModel.bauInvalidFeatures.length>0&&(i=!0);let a=new Set(this.viewModel.bauInvalidFeatures);return d`<div class="choose-feature" slot=action-bar ${D(this._floatingChoiceContainer)}><calcite-list .label=${this._messages.choosefeature??""} selection-mode=single selection-appearance=border><calcite-list-item .disabled=${this.viewModel.updating} @calciteListItemSelect=${r=>{this.viewModel.bauActiveFeatureIndex!==-1&&(this.viewModel.bauActiveFeatureIndex=-1,this.viewModel.updateIndividualMultiFeatureFormHighlight()),this.viewModel.clearMultiFeatureFormHighlights(),this._showFloatingChoice=!1}} .label=${y(this._messages.multipleFeaturesX??"",{total:this.viewModel.bauFeatures.length})} .selected=${this.viewModel.bauActiveFeatureIndex===-1} value=shared><calcite-icon scale=s icon=group-form class="feature-choose-listitem" slot=content-start></calcite-icon></calcite-list-item>${this.viewModel.bauFeatures.map((r,o)=>d`<calcite-list-item .disabled=${this.viewModel.updating} @pointerenter=${l=>{this.viewModel.highlightMultiFeatureFormFeature(r,o)}} @pointerleave=${l=>{this.viewModel.clearMultiFeatureFormHighlights()}} .selected=${this.viewModel.bauActiveFeatureIndex===o} @calciteListItemSelect=${l=>{let h=window.parseInt(l.currentTarget.value);this.viewModel.bauActiveFeatureIndex=h,this.viewModel.updateIndividualMultiFeatureFormHighlight(),this.viewModel.clearMultiFeatureFormHighlights(),this._showFloatingChoice=!1}} .value=${o}><arcgis-feature-title is-new-feature slot=content .graphic=${r} .layer=${r.layer}></arcgis-feature-title>${I(r)?.isTable?d`<calcite-icon scale=s icon=table slot=content-start class="feature-choose-listitem"></calcite-icon>`:d`<arcgis-feature-image slot=content-start class="feature-choose-listitem" .graphic=${r} width-in-pixels=16 height-in-pixels=16 use-true-shape .layer=${r.layer}></arcgis-feature-image>`}${a.has(r)&&i?d`<calcite-icon slot=content-end icon=exclamation-mark-triangle scale=s class="danger-icon-warning"></calcite-icon>`:""}</calcite-list-item>`)}</calcite-list></div>`}_renderClipboard(t){return t?b("paste-form",d`<calcite-flow-item .selected=${t} .heading=${this._messages.clipboardContents} @calciteFlowItemBack=${i=>{i.preventDefault(),this.viewModel.activeFlowPage=this.viewModel.beforeClipboard}}>${this._renderCloseCommand(t)}<calcite-panel><arcgis-clipboard .view=${this.view} .referenceElement=${this.referenceElement} .hideTooltips=${this.hideTooltips}></arcgis-clipboard></calcite-panel></calcite-flow-item>`):b("paste-form",d`<calcite-flow-item .selected=${t} .heading=${this._messages.clipboardContents} @calciteFlowItemBack=${i=>{i.preventDefault(),this.viewModel.activeFlowPage=this.viewModel.beforeClipboard}}></calcite-flow-item>`)}_renderPasteCommands(t){if(!t)return b("paste-commands",d`<calcite-flow-item .selected=${t} .heading=${this._messages.componentLabel} @calciteFlowItemBack=${a=>{a.preventDefault(),this.viewModel.activeFlowPage="commands-page"}}>${this._renderFlowCommandStart(this.viewModel.hasPasteCommandsPage)}</calcite-flow-item>`);let i=this.viewModel.clipboard.items.length===0?this._messages.clipboardEmpty??"":this.viewModel.clipboard.items.length>1?y(this._messages.clipboardContentsMany??"",{num:this.viewModel.clipboard.items.length}):this._messages.clipboardContentsSingle??"";return b("paste-commands",d`<calcite-flow-item .selected=${t} .heading=${this._messages.componentLabel} @calciteFlowItemBack=${a=>{a.preventDefault(),this.viewModel.activeFlowPage="commands-page"}}>${this._renderFlowCommandStart(this.viewModel.hasPasteCommandsPage)}${this._renderClipboardCommand("commands")}${this._renderCloseCommand(t)}<calcite-panel><calcite-list .label=${this._messages.clipboardContents??""} selection-mode=none selection-appearance=border><calcite-list-item .description=${i}></calcite-list-item></calcite-list><slot name=commands-page-message></slot><div class="pad-contents"><calcite-list .label=${this._messages.pasteCommandChoices??""} selection-mode=none selection-appearance=border>${this.availableCommands.map(a=>d`<calcite-list-item .label=${a.label(this._messages,this._messages._lang)} .description=${a.description(this._messages,this._messages._lang)} .value=${a.id} .disabled=${!a.commandEnabled||this.viewModel.updating} @click=${async()=>{await this._runPasteCommand(a)}}><calcite-icon slot=content-start .icon=${a.icon}></calcite-icon>${a.immediate?"":d`<calcite-icon slot=content-end icon=chevron-right flip-rtl></calcite-icon>`}</calcite-list-item>`)}</calcite-list></div></calcite-panel>${this.renderPasteErrorFooter()}${this._renderApplying()}</calcite-flow-item>`)}renderPasteErrorFooter(){return!this.viewModel.lastPasteError||this.viewModel.hideErrorNotice?null:d`<calcite-notice slot=footer open kind=danger icon=exclamation-mark-triangle closable @calciteNoticeClose=${()=>{this.viewModel.lastPasteError=void 0}}><div slot=title>${this._messages.errorNoticeTitle??""}</div><div slot=message>${this.viewModel.lastPasteError.localizedErrorMessage?this._messages[this.viewModel.lastPasteError.localizedErrorMessage]:this._messages.errorNoticeMessage??""}</div></calcite-notice>`}_renderApplying(){return this.viewModel.applying?d`<calcite-scrim><calcite-loader scale=s .label=${this._messages.updating??""}></calcite-loader></calcite-scrim>`:""}render(){return this.activeFlowPage==="clipboard-empty-page"?d`<calcite-flow class="arcgis-paste" .hidden=${this.closed}>${this._renderNoClipboardData(this.activeFlowPage==="clipboard-empty-page")}</calcite-flow>`:this.activeFlowPage==="no-command-page"?d`<calcite-flow class="arcgis-paste" .hidden=${this.closed}>${this._renderNoCommandPage(this.activeFlowPage==="no-command-page")}</calcite-flow>`:d`<calcite-flow class="arcgis-paste" .hidden=${this.closed}>${this.hasPasteCommandsPage&&this._renderPasteCommands(this.activeFlowPage==="commands-page")||""}${this._renderFlowPasteAs(this.activeFlowPage==="gallery-page")}${this._renderFlowPasteMerge(this.activeFlowPage==="merge-page")}${this._renderFlowPasteForm(this.activeFlowPage==="form-page")}${this._renderClipboard(this.activeFlowPage==="clipboard")}</calcite-flow>`}};ae("arcgis-paste",K);return K},"core/accessorSupport/decorators","core/Accessor","Graphic","applications/Components/clipboard","layers/GraphicsLayer","core/Collection","applications/Components/templateUtils","applications/Components/applySetUtils","core/reactiveUtils","layers/support/fieldUtils","widgets/BatchAttributeForm/BatchAttributeFormViewModel","intl","applications/Components/editUtils",a,c,e,f,g,h,i)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
|
|
2
|
-
import{a as u}from"./
|
|
2
|
+
import{a as u}from"./UQN4KPNM.js";import"./THWXFLFI.js";import"./WUDIJWPW.js";import"./ZNBKMZP7.js";import{B as h,N as m,O as d,R as s,U as f,a as n,b as a,x as p}from"./E52S65JA.js";import"./ALDX5YZO.js";export default $arcgis.t(([i,{substitute:b}])=>{var g=n`:host{display:inline-block;position:relative;width:fit-content;isolation:isolate}calcite-label:focus-within .swatch-wrapper{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:2px}`,l=class extends d{constructor(){super(...arguments),this._messages=u(),this.#t=e=>{this._popoverReferenceElement=e??void 0},this.#e=h(),this._color=new i([0,0,0,1]),this._open=!1,this.arcgisColorChanged=p()}static{this.properties={_color:16,_open:16,_popoverReferenceElement:16,color:1,label:1}}static{this.styles=g}#t;#e;#s(e){(e.key===" "||e.key==="Enter")&&this.#o(e)}#o(e){e.preventDefault(),e.stopPropagation(),this._open=!this._open}get color(){return this._color}set color(e){let o=e instanceof i?e:new i(e);o.equals(this._color)||(this._color=o)}render(){let e=this._color.toCss(!0),[o,_,$,v]=this._color.toRgba(),r=b(this._messages?.ariaDescription??"",{label:this.label??this._messages?.label??"",color:`${o}, ${_}, ${$}, ${v}`});return a`<calcite-label layout=inline scale=s @click=${this.#o}><div class="swatch-wrapper" tabindex=0 role=button aria-controls=${this.#e??s} aria-expanded=${this._open?"true":"false"} aria-haspopup=dialog aria-label=${r??s} @keydown=${this.#s} @click=${this.#o} ${m(this.#t)}><calcite-swatch .color=${e} .label=${r}></calcite-swatch></div>${this.label??this._messages?.label}${this._popoverReferenceElement?a`<calcite-popover id=${this.#e??s} auto-close class="popover" .label=${this._messages?.popoverLabel??""} .open=${this._open} @calcitePopoverClose=${()=>this._open=!1} @calcitePopoverOpen=${()=>this._open=!0} overlay-positioning=fixed .referenceElement=${this._popoverReferenceElement}><calcite-color-picker alpha-channel channels-disabled @click=${t=>{t.stopPropagation()}} @calciteColorPickerInput=${({target:{value:t}})=>{if(typeof t=="string"){let c=new i(t);this.color=c,this.arcgisColorChanged.emit(c)}}} saved-disabled .value=${e}></calcite-color-picker></calcite-popover>`:void 0}</calcite-label>`}};f("arcgis-color-select",l);return l},"Color","intl")
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
|
|
2
|
-
import{a as z}from"./76KXMQ3Y.js";import{d as _,k as y}from"./GMSXMC4Y.js";import h from"./DR4N3HTB.js";import f from"./DXIOCBFP.js";import{a as O}from"./E7SYUWIQ.js";import e from"./S6XBCSKI.js";import{a as M}from"./P5EZZH6S.js";import{a as u}from"./DHVEHATY.js";import d from"./VZOMAMSZ.js";import c from"./7PXQ5F5K.js";import{g as U}from"./EH5576ZY.js";import"./7QZVR2UR.js";import a from"./KTDXN3YM.js";import"./ZNBKMZP7.js";import{N as C,O as S,P as v,R as g,U as k,a as b,b as l,x}from"./GRFF5Y4R.js";import"./ALDX5YZO.js";export default $arcgis.t(([{createChart:E},{ignoreAbortErrors:P},{watch:m},F,{property:a,subclass:A},,,,B,{a:D,d:f},$])=>{var I=b`.esri-widget__heading{color:var(--calcite-color-text-2);margin:0 0 .5rem;font-weight:var(--calcite-font-weight-semibold)}h1.esri-widget__heading{font-size:var(--calcite-font-size-xl)}h2.esri-widget__heading{font-size:var(--calcite-font-size-md)}h3.esri-widget__heading,h4.esri-widget__heading,h5.esri-widget__heading,h6.esri-widget__heading{font-size:var(--calcite-font-size)}.esri-widget{box-sizing:border-box;color:var(--calcite-color-text-2);background-color:var(--calcite-color-foreground-1);font-size:var(--calcite-font-size);line-height:var(--calcite-font-line-height-relative-tight)}.esri-widget *,.esri-widget :before,.esri-widget :after{box-sizing:inherit}.esri-widget.esri-widget--disabled>*{opacity:.4;pointer-events:none}.esri-widget.esri-widget--compact{--esri-widget-padding-y: 0;--esri-widget-padding-x: 0}.esri-widget__anchor{color:var(--calcite-color-text-2)}.esri-widget__anchor:hover{color:var(--calcite-color-text-3)}.esri-widget__anchor:hover,.esri-widget__anchor:focus{text-decoration:underline}.esri-widget__anchor--disabled{opacity:.4;pointer-events:none}.esri-widget__header{background-color:var(--calcite-color-foreground-1);flex:1 0 100%;justify-content:space-between;align-items:center;width:100%;min-height:48px;padding:12px 0 12px 15px;display:flex}.esri-widget__heading{word-break:break-word}.esri-widget__header .esri-widget__heading{width:calc(100% - 48px);text-align:initial;color:var(--calcite-color-text-1);align-items:center;margin:0;padding:0;display:flex}.esri-widget__header-button{appearance:none;cursor:pointer;color:var(--calcite-color-text-2);background-color:var(--calcite-color-foreground-1);border:none;flex:0 0 48px;justify-content:center;align-self:stretch;align-items:center;width:48px;padding:0;display:flex}.esri-widget__footer{background-color:var(--calcite-color-foreground-1);justify-content:center;align-items:center;width:100%;min-height:48px;display:flex}.esri-widget__footer-pagination{color:var(--calcite-color-text-2);justify-content:space-between;align-items:center;display:flex}.esri-widget__footer-pagination-previous-button,.esri-widget__footer-pagination-next-button{cursor:pointer;background-color:var(--calcite-color-foreground-1);border:0;margin:0 7px;padding:12px 15px;transition:background-color .125s ease-in-out}.esri-widget__footer-pagination-previous-button:hover,.esri-widget__footer-pagination-previous-button:focus,.esri-widget__footer-pagination-next-button:hover,.esri-widget__footer-pagination-next-button:focus{color:var(--calcite-color-text-1);background-color:var(--calcite-color-foreground-1)}.esri-menu{visibility:hidden;z-index:1;background-clip:padding;background-color:var(--calcite-color-foreground-1);background-clip:padding-box;width:100%;max-height:0;margin:2px 0 0;padding:0;font-size:var(--calcite-font-size);line-height:var(--calcite-spacing-xl);position:absolute;top:100%;left:0;overflow:hidden;box-shadow:0 1px 2px #0000004d}.esri-menu .esri-menu__header{color:var(--calcite-color-text-inverse);background-color:var(--calcite-color-inverse);padding:6px 12px}.esri-menu__list{margin:0;padding:0;list-style:none}.esri-menu__list-item{cursor:pointer;border-top:1px solid #adadad4d;border-left:3px solid #0000;padding:.8em 1em}.esri-menu__list-item [class^=esri-icon-],.esri-menu__list-item [class*=" esri-icon-"]{padding-right:2.8px}.esri-menu__list-item:first-child{border-top:none}.esri-menu__list-item--focus,.esri-menu__list-item:hover,.esri-menu__list-item:focus{background-color:var(--calcite-color-foreground-1)}.esri-menu__list-item:active{background-color:var(--calcite-color-foreground-current)}.esri-menu__list-item--active,.esri-menu__list-item--active:hover,.esri-menu__list-item--active:focus{background-color:var(--calcite-color-foreground-1);border-left-color:var(--calcite-color-brand)}.esri-widget__table{border-collapse:collapse;color:var(--calcite-color-text-1);border:none;width:100%;line-height:var(--calcite-font-line-height-relative-tight)}.esri-widget__table tr:nth-child(odd){background-color:var(--calcite-color-transparent)}.esri-widget__table tr:nth-child(2n){background-color:var(--calcite-color-transparent-press)}.esri-widget__table tr a{color:var(--calcite-color-text-2)}.esri-widget__table tr a:hover,.esri-widget__table tr a:focus{color:var(--calcite-color-text-1)}.esri-widget__table tr td,.esri-widget__table tr th{vertical-align:top;word-break:break-word;padding:.5em .7em;font-size:var(--calcite-font-size-sm);font-weight:var(--calcite-font-weight-regular)}.esri-widget__table tr th{text-align:left;border-right:3px solid #0000000d;width:50%}.esri-widget__table tr td{width:50%}.esri-input{color:var(--calcite-color-text-1);background-color:var(--calcite-color-foreground-1);border:1px solid #959595;font-size:var(--calcite-font-size)}.esri-input::-ms-clear{display:none}.esri-input::placeholder{opacity:1;color:var(--calcite-color-text-2)}.esri-input:placeholder-shown{text-overflow:ellipsis}.esri-input[type=text],.esri-input[type=password],.esri-input[type=number]{height:32px;padding:0 .5em}calcite-combobox.esri-input{border:none}.esri-widget__content--empty{text-align:center;color:var(--calcite-color-border-input);flex-flow:column wrap;align-items:center;padding:18px 22px;display:flex}.esri-widget__content--empty h1.esri-widget__heading,.esri-widget__content--empty h2.esri-widget__heading,.esri-widget__content--empty h3.esri-widget__heading,.esri-widget__content--empty h4.esri-widget__heading,.esri-widget__content--empty h5.esri-widget__heading{font-weight:var(--calcite-font-weight-regular)}.esri-widget__content-illustration--empty{width:128px;padding:1rem 0}.esri-widget__content-icon--empty{width:32px;padding:.5rem 0}.esri-select{appearance:none;cursor:pointer;color:var(--calcite-color-text-2);background:var(--calcite-color-foreground-1) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-8 -8 32 32' width='32' height='32'%3E%3Cpath d='M8 11.207l-4-4V5.793l4 4 4-4v1.414z' fill='%23adadad' fillrule='nonzero'/%3E%3C/svg%3E") 100% no-repeat;border:1px solid #959595;border-radius:0;width:100%;height:32px;margin:0;padding:0 .5em;font-family:inherit;font-size:.85em;display:block}.esri-select[disabled]{cursor:auto}.esri-select::-ms-expand{display:none}.esri-disabled a,.esri-disabled [role=menu],.esri-disabled [role=checkbox],.esri-disabled [class^=esri-icon-],.esri-disabled [class*=" esri-icon-"]{color:var(--calcite-color-text-3)}.keynav-mode .esri-widget:focus,.keynav-mode .esri-widget :focus{z-index:1;outline-offset:2px;outline:2px solid #adadad}.esri-widget__loader-animation{border:.15em solid #adadad4d;border-top-color:var(--calcite-color-border-input);border-radius:100%;width:1em;height:1em;font-size:var(--calcite-font-size-md);animation:1.25s linear infinite esri-rotate;display:block;transform:translateZ(0)}:dir(rtl) .esri-widget__table th{text-align:right;border-left:3px solid #0000000d;border-right:none}:dir(rtl) .esri-select{background-position:0}:dir(rtl) .esri-menu__list-item{border-left:none;border-right:3px solid #0000}:dir(rtl) .esri-menu__list-item [class^=esri-icon-],:dir(rtl) .esri-menu__list-item [class*=" esri-icon-"]{padding-left:2px;padding-right:0}:dir(rtl) .esri-menu__list-item--active{border-right-color:var(--calcite-color-brand)}.esri-icon-font-fallback-text{clip:rect(0 0 0 0);width:1px;height:1px;position:absolute;overflow:hidden}.esri-rotating{animation:1.25s linear infinite esri-rotate;transform:translateZ(0)}.esri-clearfix:before,.esri-clearfix:after{content:" ";display:table}.esri-clearfix:after{clear:both}.esri-interactive{cursor:pointer}.esri-hidden{display:none!important}.esri-invisible{visibility:hidden!important}.esri-offscreen{position:absolute;top:-999em;left:-999em}.esri-match-height{flex-direction:column;flex:auto;display:flex;overflow:hidden}.esri-widget--panel{min-width:300px;min-height:32px;padding:var(--arcgis-internal-padding);transition:max-height .25s ease-in-out;overflow-y:auto}:host{--internal-chart-height: 180px;--internal-gap: var(--calcite-spacing-sm-plus);width:550px;isolation:isolate;position:relative;container-type:inline-size}.root{display:flex;flex-direction:column;width:100%;min-width:0;gap:var(--internal-gap)}.header{display:flex;flex-direction:row;align-items:center;justify-content:flex-end;margin-bottom:calc(var(--internal-gap) * -1)}.actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:var(--calcite-spacing-xs)}.action-button{width:auto;min-height:32px}.main-container{display:flex;position:relative;flex-flow:column;width:100%;height:var(--internal-chart-height)}.chart-container{position:relative;width:100%;height:100%}.prompt-container{box-sizing:border-box;display:grid;place-content:center;padding-inline:var(--calcite-spacing-md);height:100%;text-align:center}.prompt-message{margin:0;width:100%}.spinner{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transition:opacity .15s ease-in-out;transition-delay:0;opacity:0;&.visible{transition-delay:50ms;opacity:1}&.small{inset-inline-start:0;inset-block-start:-24px;left:unset;transform:none;color:var(--calcite-color-brand)}}@container (max-width: 400px){.esri-widget--panel{height:auto}.actions{flex-direction:column}.action-button{align-self:stretch}}`;async function T(t,e,i){let r=await L(t,e);return D(i),R(r)?r.highlight(e):z()}async function L(t,e){let i=e?.layer;if(!(!i||i.type==="subtype-sublayer"||i.type==="sublayer"||i.type==="building-component"))return await t.whenLayerView(i)}function R(t){return t!=null&&"highlight"in t&&typeof t.highlight=="function"}function Z({geometry:t}){return t?.type==="polyline"&&t.paths.length>0&&t.paths.every(e=>e.length>=2)}function H({geometry:t}){return t?.type==="polyline"&&t.paths.reduce((e,i)=>e+i.length,0)>0}function j(t){return t?.samples?.some(e=>e.z!=null)??!1}function q(t){return t?.type==="polyline"}var G=Object.defineProperty,K=Object.getOwnPropertyDescriptor,s=(t,e,i,r)=>{for(var n=r>1?void 0:r?K(e,i):e,c=t.length-1,d;c>=0;c--)(d=t[c])&&(n=(r?d(e,i,n):d(n))||n);return r&&n&&G(e,i,n),n},o=class extends ${constructor(){super(...arguments),this.highlightDisabled=!1,this.uniformChartScaling=!1,this.shouldForceInteractive=!1,this.supportedViewType="both",this.unsupportedErrorMessage=""}get _hasSamples(){let{progress:t}=this;return!!this.analysisView?.results?.some(e=>e.available&&(t<1||j(e)))}get doneButtonAvailable(){if(this.featureIsSelected)return!1;let{geometry:t}=this.analysis;return q(t)&&t.paths.length>0&&t.paths[0].length>2}get effectiveDisplayUnits(){return this.analysisView?.effectiveDisplayUnits}get errorState(){if(!Z(this.analysis))return"no-valid-input";let t=this.analysisView?.error;if(t)switch(t.name){case"too-complex":return"too-complex";case"elevation-query-error":return"no-valid-input";default:return"unknown"}return this._hasSamples?"none":"no-available-profiles"}get feature(){return this._selectedFeature}set feature(t){t?t!==this.feature&&(this.analysis.setGeometryFromFeature(t),this._selectedFeature=t):this._selectedFeature=void 0}get featureIsSelected(){return this.feature!=null}get hasVertices(){return H(this.analysis)}get indicatorRelativePosition(){return this.analysisView?.indicatorRelativePosition??void 0}get geometry(){return this.analysis.geometry}set geometry(t){this.analysis.geometry=t}get elevationInfo(){return this.analysis.elevationInfo}set elevationInfo(t){this.analysis.elevationInfo=t}get profiles(){return this.analysis.profiles}set profiles(t){this.analysis.profiles=t}get progress(){return this.analysisView?.progress??0}get results(){return this.analysisView?.results??[]}get selectButtonAvailable(){for(let t of this.view?.map?.allLayers.toArray()??[])if(t.type==="graphics"&&!("internal"in t&&t.internal)&&t.graphics.some(e=>e.geometry?.type==="polyline")||"geometryType"in t&&t.geometryType==="polyline")return!0;return!!this.view?.graphics?.some(t=>t.geometry?.type==="polyline")}get state(){return this.disabled||!this.ready?"disabled":this._selectingPromise?"selecting":this.operationState==="active"?"creating":this.analysis.valid?this.featureIsSelected?"selected":"created":"ready"}get distanceUnit(){return y(this._userDistanceUnit,this.analysis.displayUnits?.distance,this.distanceUnitOptions,this.defaultMeasurementSystem)}set distanceUnit(t){this._userDistanceUnit=t}get distanceUnitOptions(){return V(this._userDistanceUnitOptions)}set distanceUnitOptions(t){this._userDistanceUnitOptions=t}get elevationUnit(){return y(this._userElevationUnit,this.analysis.displayUnits?.elevation,this.elevationUnitOptions,this.defaultMeasurementSystem)}set elevationUnit(t){this._userElevationUnit=t}get elevationUnitOptions(){return V(this._userElevationUnitOptions)}set elevationUnitOptions(t){this._userElevationUnitOptions=t}initialize(){this.addHandles([m(()=>({analysis:this.analysis,unitDistance:this._userDistanceUnit,unitElevation:this._userElevationUnit}),({analysis:t,unitDistance:e,unitElevation:i})=>{i&&(t.displayUnits.elevation=i),e&&(t.displayUnits.distance=e)},{sync:!0,initial:!0}),m(()=>({selectedFeature:this.feature,profiles:this.analysis.profiles.toArray()}),({selectedFeature:t,profiles:e},i)=>{this._highlightSelectedFeature(this.highlightDisabled?void 0:t),this.analysis.viewOptions.geometryVisualizationVisible=!this.highlightDisabled&&t==null;let r=i?.selectedFeature;e.forEach(n=>{switch(n.type){case"scene":this._excludeSelectedFeatureFromProfile(n,t,r);break;case"input":n.chartOptions.lineVisible=t!=null,n.viewOptions.lineVisible=t!=null;break}})},{initial:!0})])}destroy(){this._removeSelectionHighlight()}async select(){let t=this.analysisView;if(!t)return;this.clear();let e=super.start({operation:async i=>{let r=await t.pickFeature(i);i?.signal?.aborted||(t.interactive=!1,this.feature=r.feature)},clear:!1});e.finally(()=>{this._selectingPromise===e&&(this._selectingPromise=void 0)}),this._selectingPromise=e,await e.catch()}async place(t){await this.analysisView?.place(t)}clearAnalysis(){this.geometry=null,this.elevationInfo=null,this.feature=void 0}constructAnalysis(){return new F}_highlightSelectedFeature(t){this._removeSelectionHighlight();let e=this.view;!e||!t||(this._selectionHighlightTask=f(async i=>await T(e,t,{signal:i})))}_removeSelectionHighlight(){this._selectionHighlightTask?.value?.remove(),this._selectionHighlightTask=O(this._selectionHighlightTask)}_excludeSelectedFeatureFromProfile(t,e,i){let r=new Set(t.exclude??[]);i&&r.delete(i),e&&r.add(e),t.exclude=Array.from(r)}};s([a()],o.prototype,"_userDistanceUnit",2);s([a()],o.prototype,"_userDistanceUnitOptions",2);s([a()],o.prototype,"_userElevationUnit",2);s([a()],o.prototype,"_userElevationUnitOptions",2);s([a()],o.prototype,"_selectingPromise",2);s([a()],o.prototype,"_selectedFeature",2);s([a()],o.prototype,"_selectionHighlightTask",2);s([a()],o.prototype,"_hasSamples",1);s([a()],o.prototype,"doneButtonAvailable",1);s([a({readOnly:!0})],o.prototype,"effectiveDisplayUnits",1);s([a({readOnly:!0})],o.prototype,"errorState",1);s([a()],o.prototype,"feature",1);s([a()],o.prototype,"featureIsSelected",1);s([a({readOnly:!0})],o.prototype,"hasVertices",1);s([a()],o.prototype,"highlightDisabled",2);s([a()],o.prototype,"indicatorRelativePosition",1);s([a()],o.prototype,"geometry",1);s([a()],o.prototype,"elevationInfo",1);s([a()],o.prototype,"profiles",1);s([a({readOnly:!0})],o.prototype,"progress",1);s([a({readOnly:!0})],o.prototype,"results",1);s([a({readOnly:!0})],o.prototype,"selectButtonAvailable",1);s([a({readOnly:!0})],o.prototype,"state",1);s([a()],o.prototype,"uniformChartScaling",2);s([a()],o.prototype,"distanceUnit",1);s([a()],o.prototype,"distanceUnitOptions",1);s([a()],o.prototype,"elevationUnit",1);s([a()],o.prototype,"elevationUnitOptions",1);o=s([A("components.elevation-profile.ElevationProfileViewModel")],o);function V(t){let e=t?.filter(i=>_.includes(i));return e&&e.length>0?e:_.slice()}var N=B(o),w=class extends S{constructor(){super(...arguments),this.viewModel=N(this),this._messages=M(),this._hideZoomOutButton=!0,this.analysis=this.viewModel.analysis,this.view=this.viewModel.view,this.autoDestroyDisabled=!1,this.effectiveDisplayUnits=this.viewModel.effectiveDisplayUnits,this.feature=this.viewModel.feature,this.hideChart=!1,this.hideClearButton=!1,this.hideLegend=!1,this.hideSelectButton=!1,this.hideSettingsButton=!1,this.hideStartButton=!1,this.hideUniformChartScalingToggle=!1,this.hideDistanceDisplayUnitSelect=!1,this.hideElevationDisplayUnitSelect=!1,this.hideVisualization=this.viewModel.hideVisualization,this.highlightDisabled=this.viewModel.highlightDisabled,this.icon="altitude",this.indicatorRelativePosition=this.viewModel.indicatorRelativePosition,this.geometry=this.viewModel.geometry,this.elevationInfo=this.viewModel.elevationInfo,this.profiles=this.viewModel.profiles,this.progress=this.viewModel.progress,this.state=this.viewModel.state,this.uniformChartScaling=this.viewModel.uniformChartScaling,this.distanceUnit=this.viewModel.distanceUnit,this.distanceUnitOptions=this.viewModel.distanceUnitOptions,this.elevationUnit=this.viewModel.elevationUnit,this.elevationUnitOptions=this.viewModel.elevationUnitOptions,this.arcgisPropertyChange=U()("analysis","effectiveDisplayUnits","elevationInfo","feature","geometry","indicatorRelativePosition","progress","state"),this.arcgisReady=x()}static{this.properties={_hideZoomOutButton:16,_chartContainer:16,analysis:0,view:0,autoDestroyDisabled:5,effectiveDisplayUnits:32,feature:0,hideChart:5,hideClearButton:5,hideLegend:5,hideSelectButton:5,hideSettingsButton:5,hideStartButton:5,hideUniformChartScalingToggle:5,hideDistanceDisplayUnitSelect:5,hideElevationDisplayUnitSelect:5,hideVisualization:5,highlightDisabled:5,icon:3,indicatorRelativePosition:40,geometry:0,elevationInfo:0,label:1,messageOverrides:0,referenceElement:1,profiles:0,progress:40,state:32,uniformChartScaling:5,distanceUnit:1,distanceUnitOptions:0,elevationUnit:1,elevationUnitOptions:0}}static{this.styles=I}get _selectButtonVisible(){return!this.hideSelectButton&&this.viewModel.selectButtonAvailable}get _chart(){return this._chartInitializationTask?.value}async destroy(){await this.manager.destroy()}async select(){P(this.viewModel.select())}async start(){P(this.viewModel.start())}async stop(){this.viewModel.stop()}async clear(){this.viewModel.clear()}load(){this.manager.onLifecycle(()=>[m(()=>({container:this._chartContainer}),({container:e})=>{this._destroyChart(),e&&(this._chartInitializationTask=f(async i=>await E({view:this.viewModel.view,analysisView:this.viewModel.analysisView,container:e,messages:this._messages,signal:i,uniformScaling:this.viewModel.uniformChartScaling,onRangeChange:(r,n)=>{this._hideZoomOutButton=r===1&&n===1},onCursorPositionChange:(r,n)=>{let{analysisView:c}=this.viewModel;c&&(c.indicatorRelativePosition=r)}})))},{sync:!0,initial:!0}),m(()=>({chart:this._chart,view:this.viewModel.view,analysisView:this.viewModel.analysisView,uniformScaling:this.viewModel.uniformChartScaling}),({chart:e,view:i,analysisView:r,uniformScaling:n})=>{e&&(e.view=i,e.analysisView=r,e.uniformScaling=n)},{sync:!0,initial:!0}),{remove:()=>this._destroyChart()}])}_destroyChart(){let e=this._chart;this._chartInitializationTask?.abort(),this._chartInitializationTask=void 0,e?.destroy()}_onCancelButtonClick(){this.viewModel.stop(),this.viewModel.clear()}_onDoneButtonClick(){this.viewModel.stop()}_getErrorMessage(){let e=Q[this.viewModel.errorState];return e?this._messages?.errors?.[e]:void 0}_onClearButtonClick(){this.viewModel.clear()}_onZoomOutButtonClick(){this._chart?.zoomOut()}_onChartContainerRef(e){this._chartContainer=e}render(){return l`<div aria-label=${this._messages.componentLabel??g} class=${v({root:!0,[u.widget]:!0,[u.widgetDisabled]:this.viewModel.state==="disabled",[u.panel]:!0})} role=presentation>${this._renderContentForState()}</div>`}_renderContentForState(){switch(this.viewModel.state){case"ready":return this._renderContentForReadyState();case"selecting":return this._renderContentForSelectingState();case"creating":return this._renderContentForCreatingState();case"selected":return this._renderContentForSelectedState();case"created":return this._renderContentForCreatedState();case"disabled":return this._renderContentForReadyState()}}_renderContentForReadyState(){let{_messages:e,hideSelectButton:i,hideStartButton:r}=this,{selectButtonAvailable:n}=this.viewModel,c=!i&&n,d;return!r&&c?d=e.readyPrompt:r?c?d=e.readyPromptSelectOnly:d=e.errors?.noProfile:d=e.readyPromptCreateOnly,this._renderContent({prompt:d,chart:!1,actions:p})}_renderContentForSelectingState(){let{view:e}=this.viewModel;if(!e)return;let i=this._messages[`selectingPrompt-${e.type}`];return this._renderContent({prompt:i,chart:!1,actions:[{type:"select-cancel"}]})}_renderContentForCreatingState(){let{viewModel:e}=this,{view:i}=e;if(!i)return;let r=e.hasVertices?[{type:"sketch-cancel"},{type:"sketch-done",disabled:!e.doneButtonAvailable}]:[{type:"select"},{type:"sketch",disabled:!0}];if(e.errorState==="no-valid-input"){let c=this._messages[`creatingPrompt-${i.type}`];return this._renderContent({chart:!1,actions:r,prompt:c})}let n=this._getErrorMessage();return n?this._renderContent({chart:!1,actions:r,prompt:n}):this._renderContent({chart:!0,actions:r})}_renderContentForSelectedState(){let e=this._getErrorMessage();return e?this._renderContent({chart:!1,actions:p,prompt:e}):this._renderContent({chart:!0,actions:p})}_renderContentForCreatedState(){let e=this._getErrorMessage();return e?this._renderContent({chart:!1,actions:p,prompt:e}):this._renderContent({chart:!0,actions:p})}_renderContent(e){let{viewModel:i}=this,r=i.geometry!=null;return l`<header class="header">${h({hidden:this._hideZoomOutButton,children:this._renderZoomOutButton()})}${h({hidden:this.hideClearButton||!r,children:this._renderClearButton()})}${h({hidden:this.hideSettingsButton,children:this._renderSettingsButton()})}</header><div class="main-container">${e.prompt!=null?this._renderPrompt(e.prompt):e.chart?this._renderChart():void 0}</div>${h({hidden:this.hideLegend,children:this._renderLegend()})}${this._renderActions(e)}`}_renderPrompt(e){return[l`<div class="prompt-container"><p class="prompt-message">${e}</p></div>`]}_renderZoomOutButton(){let e=this._messages.zoomOut??"";return l`<calcite-action icon=magnifying-glass-minus @click=${this._onZoomOutButtonClick} .text=${e} title=${e??g}></calcite-action>`}_renderChart(){if(this.hideChart)return;let e=this._chart;return l`${this._renderSpinner({size:e?.chartVisible?"small":"large",visible:e?.spinnerVisible??!1})}<div class="chart-container" ${C(this._onChartContainerRef)}></div>`}_renderSpinner(e){let i=e.size==="small",r=e.visible??!0;return l`<calcite-loader class=${v({spinner:!0,small:i,visible:r})} .inline=${i} label></calcite-loader>`}_renderClearButton(){let e=this._messages.clearProfile??"";return l`<calcite-action icon=trash @click=${this._onClearButtonClick} .text=${e} title=${e??g}></calcite-action>`}_renderLegend(){return l`<arcgis-elevation-profile-legend .effectiveDisplayUnits=${this.viewModel.effectiveDisplayUnits} .featureSelected=${this.viewModel.featureIsSelected} .messages=${this._messages} .results=${this.viewModel.results}></arcgis-elevation-profile-legend>`}_renderSettingsButton(){return l`<arcgis-elevation-profile-settings .viewModel=${this.viewModel} .hideUniformChartScalingToggle=${this.hideUniformChartScalingToggle} .hideDistanceDisplayUnitSelect=${this.hideDistanceDisplayUnitSelect} .hideElevationDisplayUnitSelect=${this.hideElevationDisplayUnitSelect} .messages=${this._messages} .uniformChartScaling=${this.viewModel.uniformChartScaling} .unitOptionsDistance=${this.viewModel.distanceUnitOptions} .unitOptionsElevation=${this.viewModel.elevationUnitOptions} @arcgisElevationProfileSettingsUniformChartScalingChange=${e=>{this.viewModel.uniformChartScaling=e.detail}}></arcgis-elevation-profile-settings>`}_renderActions({actions:e}){let i=this._messages,r=e.map(n=>{switch(n.type){case"sketch":return h({hidden:this.hideStartButton,children:this._renderAction({action:n,label:i.sketchButtonLabel,primary:!0,onClick:()=>void this.start()})});case"sketch-cancel":return h({hidden:this.hideStartButton,children:this._renderAction({action:n,label:i.cancelButtonLabel,primary:!1,onClick:this._onCancelButtonClick})});case"sketch-done":return h({hidden:this.hideStartButton,children:this._renderAction({action:n,label:i.doneButtonLabel,primary:!0,onClick:this._onDoneButtonClick})});case"select":return h({hidden:!this._selectButtonVisible,children:this._renderAction({action:n,label:i.selectButtonLabel,primary:!1,onClick:()=>void this.select()})});case"select-cancel":return h({hidden:!this._selectButtonVisible,children:this._renderAction({action:n,label:i.cancelButtonLabel,primary:!1,onClick:this._onCancelButtonClick})});default:return}}).filter(Boolean);return r.length?l`<footer class="actions">${r}</footer>`:void 0}_renderAction({action:e,label:i,onClick:r,primary:n}){return l`<calcite-button .appearance=${n?"solid":"outline-fill"} class="action-button" .disabled=${e.disabled||void 0} @click=${r}>${i}</calcite-button>`}};function h(t){return t.hidden?void 0:t.children}var p=[{type:"select"},{type:"sketch"}],Q={none:void 0,"no-valid-input":"noProfile","no-available-profiles":"noProfile","too-complex":"tooComplex",unknown:"unknown"};k("arcgis-elevation-profile",w);return w},"applications/Components/analysisUtils","core/promiseUtils","core/reactiveUtils","analysis/ElevationProfileAnalysis","core/accessorSupport/decorators",a,c,d,e,f,h)
|
|
2
|
+
import{a as z}from"./76KXMQ3Y.js";import{d as _,k as y}from"./GMSXMC4Y.js";import h from"./F3QMZQEN.js";import f from"./DXIOCBFP.js";import{a as O}from"./E7SYUWIQ.js";import e from"./65GHL7AK.js";import{a as M}from"./UQN4KPNM.js";import{a as u}from"./DHVEHATY.js";import d from"./IE2YLVLQ.js";import c from"./DAXUZZYI.js";import{g as U}from"./THWXFLFI.js";import"./WUDIJWPW.js";import a from"./KTDXN3YM.js";import"./ZNBKMZP7.js";import{N as C,O as S,P as v,R as g,U as k,a as b,b as l,x}from"./E52S65JA.js";import"./ALDX5YZO.js";export default $arcgis.t(([{createChart:E},{ignoreAbortErrors:P},{watch:m},F,{property:a,subclass:A},,,,B,{a:D,d:f},$])=>{var I=b`.esri-widget__heading{color:var(--calcite-color-text-2);margin:0 0 .5rem;font-weight:var(--calcite-font-weight-semibold)}h1.esri-widget__heading{font-size:var(--calcite-font-size-xl)}h2.esri-widget__heading{font-size:var(--calcite-font-size-md)}h3.esri-widget__heading,h4.esri-widget__heading,h5.esri-widget__heading,h6.esri-widget__heading{font-size:var(--calcite-font-size)}.esri-widget{box-sizing:border-box;color:var(--calcite-color-text-2);background-color:var(--calcite-color-foreground-1);font-size:var(--calcite-font-size);line-height:var(--calcite-font-line-height-relative-tight)}.esri-widget *,.esri-widget :before,.esri-widget :after{box-sizing:inherit}.esri-widget.esri-widget--disabled>*{opacity:.4;pointer-events:none}.esri-widget.esri-widget--compact{--esri-widget-padding-y: 0;--esri-widget-padding-x: 0}.esri-widget__anchor{color:var(--calcite-color-text-2)}.esri-widget__anchor:hover{color:var(--calcite-color-text-3)}.esri-widget__anchor:hover,.esri-widget__anchor:focus{text-decoration:underline}.esri-widget__anchor--disabled{opacity:.4;pointer-events:none}.esri-widget__header{background-color:var(--calcite-color-foreground-1);flex:1 0 100%;justify-content:space-between;align-items:center;width:100%;min-height:48px;padding:12px 0 12px 15px;display:flex}.esri-widget__heading{word-break:break-word}.esri-widget__header .esri-widget__heading{width:calc(100% - 48px);text-align:initial;color:var(--calcite-color-text-1);align-items:center;margin:0;padding:0;display:flex}.esri-widget__header-button{appearance:none;cursor:pointer;color:var(--calcite-color-text-2);background-color:var(--calcite-color-foreground-1);border:none;flex:0 0 48px;justify-content:center;align-self:stretch;align-items:center;width:48px;padding:0;display:flex}.esri-widget__footer{background-color:var(--calcite-color-foreground-1);justify-content:center;align-items:center;width:100%;min-height:48px;display:flex}.esri-widget__footer-pagination{color:var(--calcite-color-text-2);justify-content:space-between;align-items:center;display:flex}.esri-widget__footer-pagination-previous-button,.esri-widget__footer-pagination-next-button{cursor:pointer;background-color:var(--calcite-color-foreground-1);border:0;margin:0 7px;padding:12px 15px;transition:background-color .125s ease-in-out}.esri-widget__footer-pagination-previous-button:hover,.esri-widget__footer-pagination-previous-button:focus,.esri-widget__footer-pagination-next-button:hover,.esri-widget__footer-pagination-next-button:focus{color:var(--calcite-color-text-1);background-color:var(--calcite-color-foreground-1)}.esri-menu{visibility:hidden;z-index:1;background-clip:padding;background-color:var(--calcite-color-foreground-1);background-clip:padding-box;width:100%;max-height:0;margin:2px 0 0;padding:0;font-size:var(--calcite-font-size);line-height:var(--calcite-spacing-xl);position:absolute;top:100%;left:0;overflow:hidden;box-shadow:0 1px 2px #0000004d}.esri-menu .esri-menu__header{color:var(--calcite-color-text-inverse);background-color:var(--calcite-color-inverse);padding:6px 12px}.esri-menu__list{margin:0;padding:0;list-style:none}.esri-menu__list-item{cursor:pointer;border-top:1px solid #adadad4d;border-left:3px solid #0000;padding:.8em 1em}.esri-menu__list-item [class^=esri-icon-],.esri-menu__list-item [class*=" esri-icon-"]{padding-right:2.8px}.esri-menu__list-item:first-child{border-top:none}.esri-menu__list-item--focus,.esri-menu__list-item:hover,.esri-menu__list-item:focus{background-color:var(--calcite-color-foreground-1)}.esri-menu__list-item:active{background-color:var(--calcite-color-foreground-current)}.esri-menu__list-item--active,.esri-menu__list-item--active:hover,.esri-menu__list-item--active:focus{background-color:var(--calcite-color-foreground-1);border-left-color:var(--calcite-color-brand)}.esri-widget__table{border-collapse:collapse;color:var(--calcite-color-text-1);border:none;width:100%;line-height:var(--calcite-font-line-height-relative-tight)}.esri-widget__table tr:nth-child(odd){background-color:var(--calcite-color-transparent)}.esri-widget__table tr:nth-child(2n){background-color:var(--calcite-color-transparent-press)}.esri-widget__table tr a{color:var(--calcite-color-text-2)}.esri-widget__table tr a:hover,.esri-widget__table tr a:focus{color:var(--calcite-color-text-1)}.esri-widget__table tr td,.esri-widget__table tr th{vertical-align:top;word-break:break-word;padding:.5em .7em;font-size:var(--calcite-font-size-sm);font-weight:var(--calcite-font-weight-regular)}.esri-widget__table tr th{text-align:left;border-right:3px solid #0000000d;width:50%}.esri-widget__table tr td{width:50%}.esri-input{color:var(--calcite-color-text-1);background-color:var(--calcite-color-foreground-1);border:1px solid #959595;font-size:var(--calcite-font-size)}.esri-input::-ms-clear{display:none}.esri-input::placeholder{opacity:1;color:var(--calcite-color-text-2)}.esri-input:placeholder-shown{text-overflow:ellipsis}.esri-input[type=text],.esri-input[type=password],.esri-input[type=number]{height:32px;padding:0 .5em}calcite-combobox.esri-input{border:none}.esri-widget__content--empty{text-align:center;color:var(--calcite-color-border-input);flex-flow:column wrap;align-items:center;padding:18px 22px;display:flex}.esri-widget__content--empty h1.esri-widget__heading,.esri-widget__content--empty h2.esri-widget__heading,.esri-widget__content--empty h3.esri-widget__heading,.esri-widget__content--empty h4.esri-widget__heading,.esri-widget__content--empty h5.esri-widget__heading{font-weight:var(--calcite-font-weight-regular)}.esri-widget__content-illustration--empty{width:128px;padding:1rem 0}.esri-widget__content-icon--empty{width:32px;padding:.5rem 0}.esri-select{appearance:none;cursor:pointer;color:var(--calcite-color-text-2);background:var(--calcite-color-foreground-1) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-8 -8 32 32' width='32' height='32'%3E%3Cpath d='M8 11.207l-4-4V5.793l4 4 4-4v1.414z' fill='%23adadad' fillrule='nonzero'/%3E%3C/svg%3E") 100% no-repeat;border:1px solid #959595;border-radius:0;width:100%;height:32px;margin:0;padding:0 .5em;font-family:inherit;font-size:.85em;display:block}.esri-select[disabled]{cursor:auto}.esri-select::-ms-expand{display:none}.esri-disabled a,.esri-disabled [role=menu],.esri-disabled [role=checkbox],.esri-disabled [class^=esri-icon-],.esri-disabled [class*=" esri-icon-"]{color:var(--calcite-color-text-3)}.keynav-mode .esri-widget:focus,.keynav-mode .esri-widget :focus{z-index:1;outline-offset:2px;outline:2px solid #adadad}.esri-widget__loader-animation{border:.15em solid #adadad4d;border-top-color:var(--calcite-color-border-input);border-radius:100%;width:1em;height:1em;font-size:var(--calcite-font-size-md);animation:1.25s linear infinite esri-rotate;display:block;transform:translateZ(0)}:dir(rtl) .esri-widget__table th{text-align:right;border-left:3px solid #0000000d;border-right:none}:dir(rtl) .esri-select{background-position:0}:dir(rtl) .esri-menu__list-item{border-left:none;border-right:3px solid #0000}:dir(rtl) .esri-menu__list-item [class^=esri-icon-],:dir(rtl) .esri-menu__list-item [class*=" esri-icon-"]{padding-left:2px;padding-right:0}:dir(rtl) .esri-menu__list-item--active{border-right-color:var(--calcite-color-brand)}.esri-icon-font-fallback-text{clip:rect(0 0 0 0);width:1px;height:1px;position:absolute;overflow:hidden}.esri-rotating{animation:1.25s linear infinite esri-rotate;transform:translateZ(0)}.esri-clearfix:before,.esri-clearfix:after{content:" ";display:table}.esri-clearfix:after{clear:both}.esri-interactive{cursor:pointer}.esri-hidden{display:none!important}.esri-invisible{visibility:hidden!important}.esri-offscreen{position:absolute;top:-999em;left:-999em}.esri-match-height{flex-direction:column;flex:auto;display:flex;overflow:hidden}.esri-widget--panel{min-width:300px;min-height:32px;padding:var(--arcgis-internal-padding);transition:max-height .25s ease-in-out;overflow-y:auto}:host{--internal-chart-height: 180px;--internal-gap: var(--calcite-spacing-sm-plus);width:550px;isolation:isolate;position:relative;container-type:inline-size}.root{display:flex;flex-direction:column;width:100%;min-width:0;gap:var(--internal-gap)}.header{display:flex;flex-direction:row;align-items:center;justify-content:flex-end;margin-bottom:calc(var(--internal-gap) * -1)}.actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:var(--calcite-spacing-xs)}.action-button{width:auto;min-height:32px}.main-container{display:flex;position:relative;flex-flow:column;width:100%;height:var(--internal-chart-height)}.chart-container{position:relative;width:100%;height:100%}.prompt-container{box-sizing:border-box;display:grid;place-content:center;padding-inline:var(--calcite-spacing-md);height:100%;text-align:center}.prompt-message{margin:0;width:100%}.spinner{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transition:opacity .15s ease-in-out;transition-delay:0;opacity:0;&.visible{transition-delay:50ms;opacity:1}&.small{inset-inline-start:0;inset-block-start:-24px;left:unset;transform:none;color:var(--calcite-color-brand)}}@container (max-width: 400px){.esri-widget--panel{height:auto}.actions{flex-direction:column}.action-button{align-self:stretch}}`;async function T(t,e,i){let r=await L(t,e);return D(i),R(r)?r.highlight(e):z()}async function L(t,e){let i=e?.layer;if(!(!i||i.type==="subtype-sublayer"||i.type==="sublayer"||i.type==="building-component"))return await t.whenLayerView(i)}function R(t){return t!=null&&"highlight"in t&&typeof t.highlight=="function"}function Z({geometry:t}){return t?.type==="polyline"&&t.paths.length>0&&t.paths.every(e=>e.length>=2)}function H({geometry:t}){return t?.type==="polyline"&&t.paths.reduce((e,i)=>e+i.length,0)>0}function j(t){return t?.samples?.some(e=>e.z!=null)??!1}function q(t){return t?.type==="polyline"}var G=Object.defineProperty,K=Object.getOwnPropertyDescriptor,s=(t,e,i,r)=>{for(var n=r>1?void 0:r?K(e,i):e,c=t.length-1,d;c>=0;c--)(d=t[c])&&(n=(r?d(e,i,n):d(n))||n);return r&&n&&G(e,i,n),n},o=class extends ${constructor(){super(...arguments),this.highlightDisabled=!1,this.uniformChartScaling=!1,this.shouldForceInteractive=!1,this.supportedViewType="both",this.unsupportedErrorMessage=""}get _hasSamples(){let{progress:t}=this;return!!this.analysisView?.results?.some(e=>e.available&&(t<1||j(e)))}get doneButtonAvailable(){if(this.featureIsSelected)return!1;let{geometry:t}=this.analysis;return q(t)&&t.paths.length>0&&t.paths[0].length>2}get effectiveDisplayUnits(){return this.analysisView?.effectiveDisplayUnits}get errorState(){if(!Z(this.analysis))return"no-valid-input";let t=this.analysisView?.error;if(t)switch(t.name){case"too-complex":return"too-complex";case"elevation-query-error":return"no-valid-input";default:return"unknown"}return this._hasSamples?"none":"no-available-profiles"}get feature(){return this._selectedFeature}set feature(t){t?t!==this.feature&&(this.analysis.setGeometryFromFeature(t),this._selectedFeature=t):this._selectedFeature=void 0}get featureIsSelected(){return this.feature!=null}get hasVertices(){return H(this.analysis)}get indicatorRelativePosition(){return this.analysisView?.indicatorRelativePosition??void 0}get geometry(){return this.analysis.geometry}set geometry(t){this.analysis.geometry=t}get elevationInfo(){return this.analysis.elevationInfo}set elevationInfo(t){this.analysis.elevationInfo=t}get profiles(){return this.analysis.profiles}set profiles(t){this.analysis.profiles=t}get progress(){return this.analysisView?.progress??0}get results(){return this.analysisView?.results??[]}get selectButtonAvailable(){for(let t of this.view?.map?.allLayers.toArray()??[])if(t.type==="graphics"&&!("internal"in t&&t.internal)&&t.graphics.some(e=>e.geometry?.type==="polyline")||"geometryType"in t&&t.geometryType==="polyline")return!0;return!!this.view?.graphics?.some(t=>t.geometry?.type==="polyline")}get state(){return this.disabled||!this.ready?"disabled":this._selectingPromise?"selecting":this.operationState==="active"?"creating":this.analysis.valid?this.featureIsSelected?"selected":"created":"ready"}get distanceUnit(){return y(this._userDistanceUnit,this.analysis.displayUnits?.distance,this.distanceUnitOptions,this.defaultMeasurementSystem)}set distanceUnit(t){this._userDistanceUnit=t}get distanceUnitOptions(){return V(this._userDistanceUnitOptions)}set distanceUnitOptions(t){this._userDistanceUnitOptions=t}get elevationUnit(){return y(this._userElevationUnit,this.analysis.displayUnits?.elevation,this.elevationUnitOptions,this.defaultMeasurementSystem)}set elevationUnit(t){this._userElevationUnit=t}get elevationUnitOptions(){return V(this._userElevationUnitOptions)}set elevationUnitOptions(t){this._userElevationUnitOptions=t}initialize(){this.addHandles([m(()=>({analysis:this.analysis,unitDistance:this._userDistanceUnit,unitElevation:this._userElevationUnit}),({analysis:t,unitDistance:e,unitElevation:i})=>{i&&(t.displayUnits.elevation=i),e&&(t.displayUnits.distance=e)},{sync:!0,initial:!0}),m(()=>({selectedFeature:this.feature,profiles:this.analysis.profiles.toArray()}),({selectedFeature:t,profiles:e},i)=>{this._highlightSelectedFeature(this.highlightDisabled?void 0:t),this.analysis.viewOptions.geometryVisualizationVisible=!this.highlightDisabled&&t==null;let r=i?.selectedFeature;e.forEach(n=>{switch(n.type){case"scene":this._excludeSelectedFeatureFromProfile(n,t,r);break;case"input":n.chartOptions.lineVisible=t!=null,n.viewOptions.lineVisible=t!=null;break}})},{initial:!0})])}destroy(){this._removeSelectionHighlight()}async select(){let t=this.analysisView;if(!t)return;this.clear();let e=super.start({operation:async i=>{let r=await t.pickFeature(i);i?.signal?.aborted||(t.interactive=!1,this.feature=r.feature)},clear:!1});e.finally(()=>{this._selectingPromise===e&&(this._selectingPromise=void 0)}),this._selectingPromise=e,await e.catch()}async place(t){await this.analysisView?.place(t)}clearAnalysis(){this.geometry=null,this.elevationInfo=null,this.feature=void 0}constructAnalysis(){return new F}_highlightSelectedFeature(t){this._removeSelectionHighlight();let e=this.view;!e||!t||(this._selectionHighlightTask=f(async i=>await T(e,t,{signal:i})))}_removeSelectionHighlight(){this._selectionHighlightTask?.value?.remove(),this._selectionHighlightTask=O(this._selectionHighlightTask)}_excludeSelectedFeatureFromProfile(t,e,i){let r=new Set(t.exclude??[]);i&&r.delete(i),e&&r.add(e),t.exclude=Array.from(r)}};s([a()],o.prototype,"_userDistanceUnit",2);s([a()],o.prototype,"_userDistanceUnitOptions",2);s([a()],o.prototype,"_userElevationUnit",2);s([a()],o.prototype,"_userElevationUnitOptions",2);s([a()],o.prototype,"_selectingPromise",2);s([a()],o.prototype,"_selectedFeature",2);s([a()],o.prototype,"_selectionHighlightTask",2);s([a()],o.prototype,"_hasSamples",1);s([a()],o.prototype,"doneButtonAvailable",1);s([a({readOnly:!0})],o.prototype,"effectiveDisplayUnits",1);s([a({readOnly:!0})],o.prototype,"errorState",1);s([a()],o.prototype,"feature",1);s([a()],o.prototype,"featureIsSelected",1);s([a({readOnly:!0})],o.prototype,"hasVertices",1);s([a()],o.prototype,"highlightDisabled",2);s([a()],o.prototype,"indicatorRelativePosition",1);s([a()],o.prototype,"geometry",1);s([a()],o.prototype,"elevationInfo",1);s([a()],o.prototype,"profiles",1);s([a({readOnly:!0})],o.prototype,"progress",1);s([a({readOnly:!0})],o.prototype,"results",1);s([a({readOnly:!0})],o.prototype,"selectButtonAvailable",1);s([a({readOnly:!0})],o.prototype,"state",1);s([a()],o.prototype,"uniformChartScaling",2);s([a()],o.prototype,"distanceUnit",1);s([a()],o.prototype,"distanceUnitOptions",1);s([a()],o.prototype,"elevationUnit",1);s([a()],o.prototype,"elevationUnitOptions",1);o=s([A("components.elevation-profile.ElevationProfileViewModel")],o);function V(t){let e=t?.filter(i=>_.includes(i));return e&&e.length>0?e:_.slice()}var N=B(o),w=class extends S{constructor(){super(...arguments),this.viewModel=N(this),this._messages=M(),this._hideZoomOutButton=!0,this.analysis=this.viewModel.analysis,this.view=this.viewModel.view,this.autoDestroyDisabled=!1,this.effectiveDisplayUnits=this.viewModel.effectiveDisplayUnits,this.feature=this.viewModel.feature,this.hideChart=!1,this.hideClearButton=!1,this.hideLegend=!1,this.hideSelectButton=!1,this.hideSettingsButton=!1,this.hideStartButton=!1,this.hideUniformChartScalingToggle=!1,this.hideDistanceDisplayUnitSelect=!1,this.hideElevationDisplayUnitSelect=!1,this.hideVisualization=this.viewModel.hideVisualization,this.highlightDisabled=this.viewModel.highlightDisabled,this.icon="altitude",this.indicatorRelativePosition=this.viewModel.indicatorRelativePosition,this.geometry=this.viewModel.geometry,this.elevationInfo=this.viewModel.elevationInfo,this.profiles=this.viewModel.profiles,this.progress=this.viewModel.progress,this.state=this.viewModel.state,this.uniformChartScaling=this.viewModel.uniformChartScaling,this.distanceUnit=this.viewModel.distanceUnit,this.distanceUnitOptions=this.viewModel.distanceUnitOptions,this.elevationUnit=this.viewModel.elevationUnit,this.elevationUnitOptions=this.viewModel.elevationUnitOptions,this.arcgisPropertyChange=U()("analysis","effectiveDisplayUnits","elevationInfo","feature","geometry","indicatorRelativePosition","progress","state"),this.arcgisReady=x()}static{this.properties={_hideZoomOutButton:16,_chartContainer:16,analysis:0,view:0,autoDestroyDisabled:5,effectiveDisplayUnits:32,feature:0,hideChart:5,hideClearButton:5,hideLegend:5,hideSelectButton:5,hideSettingsButton:5,hideStartButton:5,hideUniformChartScalingToggle:5,hideDistanceDisplayUnitSelect:5,hideElevationDisplayUnitSelect:5,hideVisualization:5,highlightDisabled:5,icon:3,indicatorRelativePosition:40,geometry:0,elevationInfo:0,label:1,messageOverrides:0,referenceElement:1,profiles:0,progress:40,state:32,uniformChartScaling:5,distanceUnit:1,distanceUnitOptions:0,elevationUnit:1,elevationUnitOptions:0}}static{this.styles=I}get _selectButtonVisible(){return!this.hideSelectButton&&this.viewModel.selectButtonAvailable}get _chart(){return this._chartInitializationTask?.value}async destroy(){await this.manager.destroy()}async select(){P(this.viewModel.select())}async start(){P(this.viewModel.start())}async stop(){this.viewModel.stop()}async clear(){this.viewModel.clear()}load(){this.manager.onLifecycle(()=>[m(()=>({container:this._chartContainer}),({container:e})=>{this._destroyChart(),e&&(this._chartInitializationTask=f(async i=>await E({view:this.viewModel.view,analysisView:this.viewModel.analysisView,container:e,messages:this._messages,signal:i,uniformScaling:this.viewModel.uniformChartScaling,onRangeChange:(r,n)=>{this._hideZoomOutButton=r===1&&n===1},onCursorPositionChange:(r,n)=>{let{analysisView:c}=this.viewModel;c&&(c.indicatorRelativePosition=r)}})))},{sync:!0,initial:!0}),m(()=>({chart:this._chart,view:this.viewModel.view,analysisView:this.viewModel.analysisView,uniformScaling:this.viewModel.uniformChartScaling}),({chart:e,view:i,analysisView:r,uniformScaling:n})=>{e&&(e.view=i,e.analysisView=r,e.uniformScaling=n)},{sync:!0,initial:!0}),{remove:()=>this._destroyChart()}])}_destroyChart(){let e=this._chart;this._chartInitializationTask?.abort(),this._chartInitializationTask=void 0,e?.destroy()}_onCancelButtonClick(){this.viewModel.stop(),this.viewModel.clear()}_onDoneButtonClick(){this.viewModel.stop()}_getErrorMessage(){let e=Q[this.viewModel.errorState];return e?this._messages?.errors?.[e]:void 0}_onClearButtonClick(){this.viewModel.clear()}_onZoomOutButtonClick(){this._chart?.zoomOut()}_onChartContainerRef(e){this._chartContainer=e}render(){return l`<div aria-label=${this._messages.componentLabel??g} class=${v({root:!0,[u.widget]:!0,[u.widgetDisabled]:this.viewModel.state==="disabled",[u.panel]:!0})} role=presentation>${this._renderContentForState()}</div>`}_renderContentForState(){switch(this.viewModel.state){case"ready":return this._renderContentForReadyState();case"selecting":return this._renderContentForSelectingState();case"creating":return this._renderContentForCreatingState();case"selected":return this._renderContentForSelectedState();case"created":return this._renderContentForCreatedState();case"disabled":return this._renderContentForReadyState()}}_renderContentForReadyState(){let{_messages:e,hideSelectButton:i,hideStartButton:r}=this,{selectButtonAvailable:n}=this.viewModel,c=!i&&n,d;return!r&&c?d=e.readyPrompt:r?c?d=e.readyPromptSelectOnly:d=e.errors?.noProfile:d=e.readyPromptCreateOnly,this._renderContent({prompt:d,chart:!1,actions:p})}_renderContentForSelectingState(){let{view:e}=this.viewModel;if(!e)return;let i=this._messages[`selectingPrompt-${e.type}`];return this._renderContent({prompt:i,chart:!1,actions:[{type:"select-cancel"}]})}_renderContentForCreatingState(){let{viewModel:e}=this,{view:i}=e;if(!i)return;let r=e.hasVertices?[{type:"sketch-cancel"},{type:"sketch-done",disabled:!e.doneButtonAvailable}]:[{type:"select"},{type:"sketch",disabled:!0}];if(e.errorState==="no-valid-input"){let c=this._messages[`creatingPrompt-${i.type}`];return this._renderContent({chart:!1,actions:r,prompt:c})}let n=this._getErrorMessage();return n?this._renderContent({chart:!1,actions:r,prompt:n}):this._renderContent({chart:!0,actions:r})}_renderContentForSelectedState(){let e=this._getErrorMessage();return e?this._renderContent({chart:!1,actions:p,prompt:e}):this._renderContent({chart:!0,actions:p})}_renderContentForCreatedState(){let e=this._getErrorMessage();return e?this._renderContent({chart:!1,actions:p,prompt:e}):this._renderContent({chart:!0,actions:p})}_renderContent(e){let{viewModel:i}=this,r=i.geometry!=null;return l`<header class="header">${h({hidden:this._hideZoomOutButton,children:this._renderZoomOutButton()})}${h({hidden:this.hideClearButton||!r,children:this._renderClearButton()})}${h({hidden:this.hideSettingsButton,children:this._renderSettingsButton()})}</header><div class="main-container">${e.prompt!=null?this._renderPrompt(e.prompt):e.chart?this._renderChart():void 0}</div>${h({hidden:this.hideLegend,children:this._renderLegend()})}${this._renderActions(e)}`}_renderPrompt(e){return[l`<div class="prompt-container"><p class="prompt-message">${e}</p></div>`]}_renderZoomOutButton(){let e=this._messages.zoomOut??"";return l`<calcite-action icon=magnifying-glass-minus @click=${this._onZoomOutButtonClick} .text=${e} title=${e??g}></calcite-action>`}_renderChart(){if(this.hideChart)return;let e=this._chart;return l`${this._renderSpinner({size:e?.chartVisible?"small":"large",visible:e?.spinnerVisible??!1})}<div class="chart-container" ${C(this._onChartContainerRef)}></div>`}_renderSpinner(e){let i=e.size==="small",r=e.visible??!0;return l`<calcite-loader class=${v({spinner:!0,small:i,visible:r})} .inline=${i} label></calcite-loader>`}_renderClearButton(){let e=this._messages.clearProfile??"";return l`<calcite-action icon=trash @click=${this._onClearButtonClick} .text=${e} title=${e??g}></calcite-action>`}_renderLegend(){return l`<arcgis-elevation-profile-legend .effectiveDisplayUnits=${this.viewModel.effectiveDisplayUnits} .featureSelected=${this.viewModel.featureIsSelected} .messages=${this._messages} .results=${this.viewModel.results}></arcgis-elevation-profile-legend>`}_renderSettingsButton(){return l`<arcgis-elevation-profile-settings .viewModel=${this.viewModel} .hideUniformChartScalingToggle=${this.hideUniformChartScalingToggle} .hideDistanceDisplayUnitSelect=${this.hideDistanceDisplayUnitSelect} .hideElevationDisplayUnitSelect=${this.hideElevationDisplayUnitSelect} .messages=${this._messages} .uniformChartScaling=${this.viewModel.uniformChartScaling} .unitOptionsDistance=${this.viewModel.distanceUnitOptions} .unitOptionsElevation=${this.viewModel.elevationUnitOptions} @arcgisElevationProfileSettingsUniformChartScalingChange=${e=>{this.viewModel.uniformChartScaling=e.detail}}></arcgis-elevation-profile-settings>`}_renderActions({actions:e}){let i=this._messages,r=e.map(n=>{switch(n.type){case"sketch":return h({hidden:this.hideStartButton,children:this._renderAction({action:n,label:i.sketchButtonLabel,primary:!0,onClick:()=>void this.start()})});case"sketch-cancel":return h({hidden:this.hideStartButton,children:this._renderAction({action:n,label:i.cancelButtonLabel,primary:!1,onClick:this._onCancelButtonClick})});case"sketch-done":return h({hidden:this.hideStartButton,children:this._renderAction({action:n,label:i.doneButtonLabel,primary:!0,onClick:this._onDoneButtonClick})});case"select":return h({hidden:!this._selectButtonVisible,children:this._renderAction({action:n,label:i.selectButtonLabel,primary:!1,onClick:()=>void this.select()})});case"select-cancel":return h({hidden:!this._selectButtonVisible,children:this._renderAction({action:n,label:i.cancelButtonLabel,primary:!1,onClick:this._onCancelButtonClick})});default:return}}).filter(Boolean);return r.length?l`<footer class="actions">${r}</footer>`:void 0}_renderAction({action:e,label:i,onClick:r,primary:n}){return l`<calcite-button .appearance=${n?"solid":"outline-fill"} class="action-button" .disabled=${e.disabled||void 0} @click=${r}>${i}</calcite-button>`}};function h(t){return t.hidden?void 0:t.children}var p=[{type:"select"},{type:"sketch"}],Q={none:void 0,"no-valid-input":"noProfile","no-available-profiles":"noProfile","too-complex":"tooComplex",unknown:"unknown"};k("arcgis-elevation-profile",w);return w},"applications/Components/analysisUtils","core/promiseUtils","core/reactiveUtils","analysis/ElevationProfileAnalysis","core/accessorSupport/decorators",a,c,d,e,f,h)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
|
|
2
|
-
import a from"./ZKOJATCN.js";import{a as u}from"./
|
|
2
|
+
import a from"./ZKOJATCN.js";import{a as u}from"./QIVD6SID.js";import"./M2M7DHX2.js";import{a as w}from"./DHVEHATY.js";import{b as l}from"./ZNBKMZP7.js";import{O as _,P as r,Q as b,R as p,U as L,a as k,b as t}from"./E52S65JA.js";import"./ALDX5YZO.js";export default $arcgis.t(([v,{a:f,b:z,d:F,g:$,h:x}])=>{var I=k`.esri-widget__heading{color:var(--calcite-color-text-2);margin:0 0 .5rem;font-weight:var(--calcite-font-weight-semibold)}h1.esri-widget__heading{font-size:var(--calcite-font-size-xl)}h2.esri-widget__heading{font-size:var(--calcite-font-size-md)}h3.esri-widget__heading,h4.esri-widget__heading,h5.esri-widget__heading,h6.esri-widget__heading{font-size:var(--calcite-font-size)}.section{word-break:break-word;word-wrap:break-word;padding:var(--calcite-spacing-sm) var(--calcite-spacing-md);min-width:250px;max-width:500px;height:100%;height:-moz-available;height:-webkit-fill-available;height:fill-available;overflow:auto;font-size:var(--calcite-font-size-sm)}.carousel-title-container{margin-bottom:var(--calcite-spacing-sm)}.carousel-title{margin:0}.section-title{font-weight:var(--calcite-font-weight-normal)}.layer-caption{padding:var(--calcite-spacing-xs) 0;margin:0;font-weight:var(--calcite-font-weight-normal)}.imagery-layer-stretched-image{display:block;margin-bottom:-2px}.image-label{padding-right:var(--calcite-spacing-xs);padding-left:var(--calcite-spacing-xs)}.label-element{margin:.1em;padding:.5em 1em;min-width:2em;min-height:1em;text-align:center;display:flex;align-items:center;justify-content:center;flex:1}.layer-row{display:flex;align-items:center}.symbol{display:block;margin:auto}.pie-chart-ramp-preview{display:flex;justify-content:center}.relationship-container{display:flex;flex-direction:column}.relationship-container .layer-row{padding-bottom:.5em}.relationship-container .layer-row:last-child{padding-bottom:0}.container{display:flex;gap:var(--calcite-spacing-sm);flex-wrap:wrap}.background-styles-container{display:flex;flex-wrap:wrap}:host([stacked]) .container{display:table}:host([stacked]) .symbol-row{display:table-row;width:100%}:host([stacked]) .label-cell{display:table-cell;vertical-align:middle;padding:var(--calcite-spacing-xxs)}:host([stacked]) .symbol-cell{display:table-cell;vertical-align:middle;text-align:center;padding:var(--calcite-spacing-xxs)}:host([stacked]) .symbol-cell div{display:flex;align-items:center;justify-content:center}`;function C(h){return h?h.r*.299+h.g*.587+h.b*.114>=127:void 0}var E=class extends _{constructor(){super(...arguments),this.stacked=!1,this.headingLevel=3}static{this.properties={cssEffectFilter:1,stacked:7,activeLayerInfo:0,headingLevel:9,layer:0,legendElement:0,messages:0}}static{this.styles=I}_getBackgroundStyles(e){let s=e.symbol,i=s.color,n=!!i?.a,a="outline"in s?s.outline:null,c=!!a?.color?.a,o=n&&i?new v([i.r,i.g,i.b,i.a*this.layer.opacity]):new v([255,255,255,0]),d=c&&a.color?new v([a.color.r,a.color.g,a.color.b,a.color.a*this.layer.opacity]):new v([255,255,255,0]),g=C(e.symbol.color)??!0,m=g?"black":"white",y=g?"rgba(255, 255, 255, .6)":"rgba(0, 0, 0, .6)";return{background:n?o.toCss(!0):"none",color:m,textShadow:`-1px -1px 0 ${y},
|
|
3
3
|
1px -1px 0 ${y},
|
|
4
4
|
-1px 1px 0 ${y},
|
|
5
5
|
1px 1px 0 ${y}`,border:c?`1px solid ${d.toCss(!0)}`:"none",filter:this.cssEffectFilter??""}}render(){let e=this._renderLegendElement(),s=z(this.legendElement,this.messages),i=this.stacked?t`<div class="carousel-title-container">${u({class:l("carousel-title",w.heading),level:this.headingLevel,children:this.activeLayerInfo.title})}${s?t`<p class="layer-caption">${s}</p>`:null}</div>`:s?u({class:l("section-title",w.heading),level:this.headingLevel,children:s}):null;return t`<section class="section" role=tabpanel tabindex=0>${i}${e}</section>`}_renderLegendElement(){switch(this.legendElement.type){case"symbol-table":return this._renderSymbolTable(this.legendElement);case"size-ramp":return t`<arcgis-legend-card-size-ramp .hasIndicators=${this.stacked} .legendElement=${this.legendElement} .messages=${this.messages} .opacity=${this.layer.opacity}></arcgis-legend-card-size-ramp>`;case"color-ramp":case"opacity-ramp":case"heatmap-ramp":case"stretch-ramp":return t`<arcgis-legend-card-color-ramp .cssEffectFilter=${this.cssEffectFilter} .legendElement=${this.legendElement} .messages=${this.messages} .opacity=${this.layer.opacity}></arcgis-legend-card-color-ramp>`;case"relationship-ramp":return t`<arcgis-legend-relationship-ramp .cssEffectFilter=${this.cssEffectFilter} .legendElement=${this.legendElement} .opacity=${this.layer.opacity} .messages=${this.messages}></arcgis-legend-relationship-ramp>`;case"pie-chart-ramp":{let{preview:e}=this.legendElement;return x(e,this.messages.previewPieChartAriaLabel),t`<div class="pie-chart-ramp-preview">${e}</div>`}case"univariate-above-and-below-ramp":return t`<arcgis-legend-card-univariate-above-and-below-ramp .cssEffectFilter=${this.cssEffectFilter} .legendElement=${this.legendElement} .messages=${this.messages} .opacity=${this.layer.opacity}></arcgis-legend-card-univariate-above-and-below-ramp>`;case"univariate-color-size-ramp":return t`<arcgis-legend-card-univariate-color-size-ramp .cssEffectFilter=${this.cssEffectFilter} .legendElement=${this.legendElement} .messages=${this.messages} .opacity=${this.layer.opacity}></arcgis-legend-card-univariate-color-size-ramp>`;default:return null}}_renderSymbolTable(e){let s=e.infos.map(a=>this._renderElementInfo(a,e.legendType)).filter(Boolean);if(!s.length)return null;let i=e.infos.some(a=>"symbol"in a&&a.symbol?.type.includes("simple-fill")),n=this.activeLayerInfo.legendElements.some(({type:a})=>a==="relationship-ramp")?"relationship-container":i?"background-styles-container":"container";return t`<div class=${r(n)}>${s}</div>`}_renderElementInfo(e,s){let{layer:i}=this,n="label"in e?e.label:null;if("type"in e&&e.type)return t`<arcgis-legend-card-element .activeLayerInfo=${this.activeLayerInfo} .cssEffectFilter=${this.cssEffectFilter} .stacked=${this.stacked} .headingLevel=${this.headingLevel} .layer=${i} .legendElement=${e} .messages=${this.messages}></arcgis-legend-card-element>`;if(!("preview"in e&&e.preview)&&!("src"in e&&e.src))return null;let a=F(i,s),c=f(this.messages,n,!1)||"";if("src"in e&&e.src){let o={"symbol-cell":this.stacked};return t`<div class=${r(l("layer-row",{"symbol-row":this.stacked}))}><div class=${r(l(o))}>${this._renderImage(e,i,a)}</div><div class=${r(l("image-label",{"label-cell":this.stacked}))}>${c}</div></div>`}if("symbol"in e&&e.preview){if(!e.symbol?.type.includes("simple-fill")){if(!e.label)return t`<div>${e.preview}</div>`;let o={"symbol-cell":this.stacked},{preview:d}=e,g="previewAriaLabel"in e?e.previewAriaLabel:null,m="label"in e?f(this.messages,e.label,!1):null;return x(d,$(this.messages,g||m)),t`<div class=${r(l("layer-row",{"symbol-row":this.stacked}))}><div class=${r(l(o))}>${d}</div><div class=${r(l("image-label",{"label-cell":this.stacked}))}>${c}</div></div>`}return t`<div class="layer-row"><div class="label-element" style=${b(this._getBackgroundStyles(e))}>${c}</div></div>`}return null}_renderImage(e,s,i){let{previewAriaLabel:n,src:a,opacity:c}=e,o=f(this.messages,e.label,!1),d={"imagery-layer-stretched-image":i,symbol:!i},g={opacity:`${c??s.opacity}`},m=$(this.messages,n||o);return t`<img alt=${m??p} .ariaLabel=${m} class=${r(l(d))} height=${e.height??void 0??p} src=${a??p} style=${b(g)} width=${e.width??void 0??p}>`}};L("arcgis-legend-card-element",E);return E},"Color",a)
|