@esri/solutions-components 5.1.0-next.79 → 5.1.0-next.80

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.
Files changed (160) hide show
  1. package/dist/cdn/{DJTOZZZA.js → 224TOFAW.js} +4 -0
  2. package/dist/cdn/{DBNQXJAC.js → 23CGFV6D.js} +1 -1
  3. package/dist/cdn/{4IMAYCJM.js → 2AUHEG2A.js} +1 -1
  4. package/dist/cdn/{JAFNSVRV.js → 2C4TQJVZ.js} +1 -1
  5. package/dist/cdn/{DCM5QRV6.js → 2HIYREV6.js} +1 -1
  6. package/dist/cdn/{N5RPCP3A.js → 2LBDG4TO.js} +1 -1
  7. package/dist/cdn/{OZZ7I4JM.js → 2QEXO7ZH.js} +1 -1
  8. package/dist/cdn/{BOU4VPX6.js → 2XS5OH3O.js} +1 -1
  9. package/dist/cdn/{5MKDWIDM.js → 3DR66XVF.js} +1 -1
  10. package/dist/cdn/{GIOPY5S4.js → 3MEDCOT3.js} +1 -1
  11. package/dist/cdn/{YOPFAHBT.js → 3OCYAA4P.js} +1 -1
  12. package/dist/cdn/{C6JAM52C.js → 4GJHDLZU.js} +1 -1
  13. package/dist/cdn/{ETMBHO6W.js → 56ICUISN.js} +83 -85
  14. package/dist/cdn/{7J5LZ73U.js → 5MAO5XLB.js} +1 -1
  15. package/dist/cdn/{WXWKDOK2.js → 63QOJNSI.js} +1 -1
  16. package/dist/cdn/{KIIHG5RR.js → 6GRAP4DV.js} +1 -1
  17. package/dist/cdn/{UUK4R4CR.js → 6SADY7KT.js} +1 -1
  18. package/dist/cdn/{UJ2CJJL6.js → 6TCJ2NKA.js} +1 -1
  19. package/dist/cdn/{SXHEEF3S.js → 76PFFHQQ.js} +1 -1
  20. package/dist/cdn/{BMMT73FL.js → 7EAWZIWB.js} +1 -1
  21. package/dist/cdn/{VQXYPYZO.js → 7QNQNET4.js} +1 -1
  22. package/dist/cdn/{3LTRULIX.js → 7UVBIBQS.js} +1 -1
  23. package/dist/cdn/{G7FUC22M.js → ACINVVFD.js} +1 -1
  24. package/dist/cdn/{2C676HQP.js → AGMFVUEV.js} +1 -1
  25. package/dist/cdn/{TI2UR2TV.js → ARGV7QZA.js} +1 -1
  26. package/dist/cdn/{ZCQCAKCG.js → BCDBB2P5.js} +1 -1
  27. package/dist/cdn/{RNJF2E2J.js → BWTT7T3L.js} +1 -1
  28. package/dist/cdn/{UYRQWVGS.js → BXFMZEWK.js} +1 -1
  29. package/dist/cdn/{NXRV57RV.js → BXNDQ2JH.js} +1 -1
  30. package/dist/cdn/{J4JDMWM4.js → C2CJFQ6Q.js} +1 -1
  31. package/dist/cdn/{Y2YNNMWR.js → CGZDUJRA.js} +1 -1
  32. package/dist/cdn/{OUHRBNXD.js → CKNELMMH.js} +1 -1
  33. package/dist/cdn/{M6HNHWAM.js → CQIP3CFN.js} +6 -1
  34. package/dist/cdn/{OQH2TBQQ.js → CR7KUQQF.js} +1 -1
  35. package/dist/cdn/D4VZQUOX.js +2 -0
  36. package/dist/cdn/{33AIZBI7.js → DPSP2HYG.js} +1 -1
  37. package/dist/cdn/{XJBEBXI7.js → DVXR45DO.js} +1 -1
  38. package/dist/cdn/{D7B7IHCG.js → E26MY5HW.js} +1 -1
  39. package/dist/cdn/{MXLV3VVN.js → E7Y745EK.js} +1 -1
  40. package/dist/cdn/{4S4OOBWQ.js → ECFYA6DN.js} +1 -1
  41. package/dist/cdn/{EDIUHKTP.js → EUFBJHIH.js} +1 -1
  42. package/dist/cdn/{ZR2WIC7U.js → F3QDP6N3.js} +1 -1
  43. package/dist/cdn/{7B7ZJJMJ.js → FDQE4EO7.js} +1 -1
  44. package/dist/cdn/{R246WZC7.js → FEQDFENU.js} +1 -1
  45. package/dist/cdn/{H73TAHQU.js → FFMJQJUP.js} +1 -1
  46. package/dist/cdn/{MK6WD5QW.js → FSTBKODU.js} +1 -1
  47. package/dist/cdn/{EYFE2OOK.js → FUAPM3ST.js} +1 -1
  48. package/dist/cdn/{VCAHYC6Y.js → FWWWKZLH.js} +1 -1
  49. package/dist/cdn/{U7XLS67A.js → FZ2ZJGJB.js} +1 -1
  50. package/dist/cdn/{HSQV7EUD.js → G3CCK7KY.js} +1 -1
  51. package/dist/cdn/{AGR2N66Z.js → GQ4DWI5G.js} +1 -1
  52. package/dist/cdn/{C6LJNGJU.js → GURBVBZQ.js} +1 -1
  53. package/dist/cdn/H2E6R4EN.js +2 -0
  54. package/dist/cdn/{MYXGI5F2.js → HJJK5IEH.js} +1 -1
  55. package/dist/cdn/{Q5ZGIKBW.js → HO5JGUUI.js} +1 -1
  56. package/dist/cdn/{X5QI4UGD.js → HT55AVL4.js} +1 -1
  57. package/dist/cdn/HWTXHNOE.js +2 -0
  58. package/dist/cdn/{5CEMQAMC.js → IHD4JFYA.js} +1 -1
  59. package/dist/cdn/{VGXNLBOO.js → IKHBFQZ5.js} +1 -1
  60. package/dist/cdn/IPIK53AM.js +2 -0
  61. package/dist/cdn/IV3XFPKC.js +2 -0
  62. package/dist/cdn/{DJ67MNGR.js → J3VPCRTT.js} +1 -1
  63. package/dist/cdn/{4PPQA4MT.js → J5GPIJHD.js} +1 -1
  64. package/dist/cdn/{XC4IAFAX.js → J72FZDMP.js} +1 -1
  65. package/dist/cdn/{ELGSNGSL.js → JCQ5JRVZ.js} +1 -1
  66. package/dist/cdn/{U4ZLSRR7.js → JHPCQXLT.js} +1 -1
  67. package/dist/cdn/{AOURVIOP.js → JM44ZPIE.js} +1 -1
  68. package/dist/cdn/{QI3QDEUY.js → JNREEHT7.js} +1 -1
  69. package/dist/cdn/{FCSE4STJ.js → JSJYFWT6.js} +1 -1
  70. package/dist/cdn/{AVSO56QZ.js → JTIMMQ6K.js} +1 -1
  71. package/dist/cdn/{ZWQVP22R.js → JUWJNZMD.js} +1 -1
  72. package/dist/cdn/{4BXRUI5X.js → KDRNRUDO.js} +1 -1
  73. package/dist/cdn/{KBXEHQIZ.js → KG6FSDWT.js} +1 -1
  74. package/dist/cdn/KNGBLBV7.js +2 -0
  75. package/dist/cdn/{ETI5PM5G.js → LCWGF752.js} +1 -1
  76. package/dist/cdn/{J7EVCSVS.js → LCZHBERK.js} +1 -1
  77. package/dist/cdn/{LEXIWBOG.js → LR57LX6P.js} +1 -1
  78. package/dist/cdn/{RI5IMXL3.js → LRRFLTS7.js} +1 -1
  79. package/dist/cdn/{BO7FV4W5.js → LRZBOUPX.js} +1 -1
  80. package/dist/cdn/{733RRE2J.js → M5YODM3W.js} +1 -1
  81. package/dist/cdn/{JAJ3EUEU.js → MCZXYUMV.js} +1 -1
  82. package/dist/cdn/{QWHQYVUI.js → MH2KV42H.js} +1 -1
  83. package/dist/cdn/{2UIWWBIH.js → MH4GMDK7.js} +1 -1
  84. package/dist/cdn/{P4PCDUNA.js → MRGCC5C4.js} +1 -1
  85. package/dist/cdn/{TCMBDCFZ.js → MSEF4EVI.js} +1 -1
  86. package/dist/cdn/{GF4D45RS.js → N463B6AB.js} +1 -1
  87. package/dist/cdn/{BRJXJE3N.js → N7CI3FRD.js} +1 -1
  88. package/dist/cdn/{NB2SOBAF.js → NLOASWJ3.js} +1 -1
  89. package/dist/cdn/{NI43FKX7.js → NPUZIHVP.js} +1 -1
  90. package/dist/cdn/NVJH5A6R.js +2 -0
  91. package/dist/cdn/OFM2G4BH.js +2 -0
  92. package/dist/cdn/{TBOLV3EZ.js → OILJWT3N.js} +1 -1
  93. package/dist/cdn/{4AW45DXY.js → OR5M4R6K.js} +1 -1
  94. package/dist/cdn/{P6PKBBHT.js → PJNP375B.js} +1 -1
  95. package/dist/cdn/{6QKRLRAP.js → PUDHZZVS.js} +1 -1
  96. package/dist/cdn/{D5MQLBMW.js → Q2WAWIFY.js} +1 -1
  97. package/dist/cdn/{ZVOCQW2E.js → QUWHB36D.js} +1 -1
  98. package/dist/cdn/{XMTFJETA.js → RF2W2PD4.js} +1 -1
  99. package/dist/cdn/{NAXZK2NU.js → RJ35WJNP.js} +1 -1
  100. package/dist/cdn/{RCZDZTUZ.js → RU3J7KVD.js} +1 -1
  101. package/dist/cdn/{AVT2PNZG.js → SCZI2MJN.js} +1 -1
  102. package/dist/cdn/{SR2CKHRR.js → SGK4AMN6.js} +1 -1
  103. package/dist/cdn/{E62ERGXQ.js → SHAQ3O3Z.js} +1 -1
  104. package/dist/cdn/{6PVJU2EV.js → SNR6ZHKZ.js} +1 -1
  105. package/dist/cdn/{ZRGU46YJ.js → SPUZEM7P.js} +1 -1
  106. package/dist/cdn/{2QHRG2N2.js → SQVN3YNK.js} +1 -1
  107. package/dist/cdn/{RUHBLPYT.js → TFINIJHF.js} +1 -1
  108. package/dist/cdn/{RCL2R2OE.js → TJDM5OLA.js} +1 -1
  109. package/dist/cdn/{P26C2HKO.js → TJNO7ZMF.js} +1 -1
  110. package/dist/cdn/{GEHBDP52.js → TMSMQA7C.js} +1 -1
  111. package/dist/cdn/{A4XBJJEQ.js → TNS6HDBI.js} +1 -1
  112. package/dist/cdn/{4XPYA3ZL.js → TPKJTOUB.js} +1 -1
  113. package/dist/cdn/{YVCQPPKA.js → TQWICREM.js} +1 -1
  114. package/dist/cdn/{INPXR3VX.js → TW7HOOK6.js} +1 -1
  115. package/dist/cdn/{PFXXAD6R.js → U3ZZOP55.js} +1 -1
  116. package/dist/cdn/{YKM2Z3FM.js → U727H4NV.js} +1 -1
  117. package/dist/cdn/{RGCSGE7R.js → UIR3N7OD.js} +1 -1
  118. package/dist/cdn/{TFLS2WXP.js → ULZKT76M.js} +1 -1
  119. package/dist/cdn/{W6N2C4I3.js → UOGOGQ2H.js} +1 -1
  120. package/dist/cdn/{LRBXQ2IB.js → URLISIUW.js} +1 -1
  121. package/dist/cdn/{CWT2ZAQ6.js → UWU7WKT4.js} +1 -1
  122. package/dist/cdn/{J25DRPOQ.js → VP3VH32T.js} +1 -1
  123. package/dist/cdn/{NCIV3HWJ.js → VRSBUIGV.js} +1 -1
  124. package/dist/cdn/{KZMJQGVV.js → VZ4XWWT6.js} +1 -1
  125. package/dist/cdn/{PPPDIFLS.js → WCTKCI5Q.js} +1 -1
  126. package/dist/cdn/{VKLUFCKS.js → WUJQ6R2U.js} +1 -1
  127. package/dist/cdn/{HTGJEIDJ.js → X7FPPH3E.js} +1 -1
  128. package/dist/cdn/{Q5PKFSLK.js → X7GJCPNX.js} +1 -1
  129. package/dist/cdn/{WOHWRJVM.js → XMOI3PP6.js} +1 -1
  130. package/dist/cdn/{YSUNZHTY.js → XRZHHEBP.js} +1 -1
  131. package/dist/cdn/{6LLGL7KH.js → XV7A4KNT.js} +1 -1
  132. package/dist/cdn/{WKGI2FX5.js → XY65IFHL.js} +1 -1
  133. package/dist/cdn/{26RBTMKU.js → XZ65OHYC.js} +1 -1
  134. package/dist/cdn/{H2M2ACTQ.js → XZWWZKHK.js} +1 -1
  135. package/dist/cdn/{MSSBDYEE.js → Y4WHK65W.js} +1 -1
  136. package/dist/cdn/{HC5I7DO7.js → YSBVJZ5G.js} +1 -1
  137. package/dist/cdn/{FIJSXIFB.js → ZC7BRSIV.js} +1 -1
  138. package/dist/cdn/{3UYIJ6KW.js → ZJ3PH44C.js} +1 -1
  139. package/dist/cdn/{VBWAOJWD.js → ZNXPS2JP.js} +1 -1
  140. package/dist/cdn/{TJLD6M3R.js → ZUM2PBNR.js} +1 -1
  141. package/dist/cdn/index.js +1 -1
  142. package/dist/chunks/description.js +6 -1
  143. package/dist/chunks/solutions_assistant_description.js +4 -0
  144. package/dist/components/arcgis-solutions-assistant/customElement.js +2913 -2914
  145. package/dist/components/solution-builder-assistant/customElement.js +3 -3
  146. package/dist/components/solution-item-accordion/customElement.js +1 -1
  147. package/dist/components/solutions-deploy-app/customElement.js +1 -1
  148. package/dist/docs/api.json +1 -1
  149. package/dist/docs/docs.json +1 -1
  150. package/dist/docs/web-types.json +1 -1
  151. package/dist/solutions-components_commit.txt +7 -7
  152. package/package.json +1 -1
  153. package/dist/cdn/B4OQ6W5E.js +0 -2
  154. package/dist/cdn/KE3URGMT.js +0 -2
  155. package/dist/cdn/MRN27OEB.js +0 -2
  156. package/dist/cdn/R2N4GBMQ.js +0 -2
  157. package/dist/cdn/RSLFPOX6.js +0 -2
  158. package/dist/cdn/WGMESBWP.js +0 -2
  159. package/dist/cdn/WLO44PL6.js +0 -2
  160. package/dist/cdn/YMNLP2QU.js +0 -2
@@ -1,5 +1,5 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{a as ct,b as lt,d as fn,e as Ve,f as dn,g as pn,h as gn,i as mn,j as ft}from"./IRRMUFW7.js";import{a as ln}from"./Q5ZGIKBW.js";import"./OQH2TBQQ.js";import"./3LTRULIX.js";import{b as cn}from"./FCSE4STJ.js";import{G as un,h as an,q as sn}from"./P4PCDUNA.js";import"./QPIMTXPL.js";function wi(e){return dn(e).then(t=>{let n=e.folderId?`${Ve(e)}/content/users/${t}/${e.folderId}/items/${e.item.id}/update`:`${Ve(e)}/content/users/${t}/items/${e.item.id}/update`;e.params=Object.assign(Object.assign({},e.params),e.item),e.params.extent&&pn(e.params.extent)&&(e.params.extent=gn(e.params.extent));let r=Ve(e),i=mn(Object.assign(Object.assign({},e.item),{access:e.item.access}),r),o=e.params.thumbnailUrl;return typeof i.thumbnailUrl=="string"&&typeof o=="string"&&i.thumbnailUrl.split("?")[0]===o.split("?")[0]&&delete e.params.thumbnailUrl,fn(n,e)})}function xi(){var e;return!!(!((e=window?.navigator)===null||e===void 0)&&e.globalPrivacyControl)}function Si(e={}){let{disabled:t,portal:n,requireConsent:r,userPrivacySettings:i}=e;if(r)if(i?.accepted){if(i?.functional===!1&&i?.performance===!1&&i?.targeting===!1)return!0}else return!0;return i?.accepted===!0&&i?.functional===!1&&i?.performance===!1&&i?.targeting===!1||t||n?.eueiEnabled===!1||xi()?!0:!(!n||Ii(n)||ki(n)||Oi(n))}function Ii(e){return e.eueiEnabled&&e.user&&e.user.orgId===e.id}function ki(e){return e.user&&!e.user.orgId&&e.ipCntryCode==="US"}function Oi(e){return!e.user&&e.ipCntryCode==="US"}var Me={storage:{},memory:!0,get(e){let t;try{t=window.localStorage&&window.localStorage.getItem(e)||this.storage[e]}catch{t=this.storage[e]}if(t)try{return JSON.parse(t)}catch{return}else return},set(e,t){let n=JSON.stringify(t);try{window.localStorage.setItem(e,n)}catch{this.memory||(console.error("setting local storage failed, falling back to in-memory storage"),this.memory=!0),this.storage[e]=t}},delete(e){try{window.localStorage.removeItem(e)}catch{this.memory||(console.error("setting local storage failed, falling back to in-memory storage"),this.memory=!0),delete this.storage[e]}}},jr="esri-telemetry";function Pi(e){return new Promise((t,n)=>{e.onload=t,e.onerror=n,(!Ai(e)||e.body)&&t()})}function Ei(e){let{id:t,dataAttribute:n}=e;return!!document.getElementById(t)||!!document.querySelector(`[data-${jr}="${n}"]`)}function Ai(e){let{body:t,src:n,id:r,dataAttribute:i,section:o="body",type:a="text/javascript",async:s=!1,defer:c=!1,onload:u,onerror:p}=e;if(typeof window>"u")throw new Fe("Window is undefined: Cannot add script element.");if(Ei(e)){console.log(`script (${r||i}) is already present, skipping`);return}let l=ji({id:r,dataAttribute:i,type:a,async:s,defer:c,body:t,src:n,onload:u,onerror:p});return o==="body"?document.body.appendChild(l):document.head.appendChild(l)}var Fe=class extends Error{};function ji({id:e,dataAttribute:t,type:n,async:r,defer:i,body:o,src:a,onload:s,onerror:c}){let u=document.createElement("script");return e&&(u.id=e),t&&u.setAttribute(`data-${jr}`,t),a&&(u.src=a),o&&(u.innerText=o),u.type=n,u.async=r,u.defer=i,s&&(u.onload=s),c&&(u.onerror=c),u}function Ti(e){return e.map(t=>{let n=[];return["src","id","dataAttribute","type"].forEach(r=>{let i=r;r==="dataAttribute"&&(i="data-esri-telemetry"),t[r]&&n.push(`${i}="${t[r]}"`)}),["async","defer"].forEach(r=>{t[r]&&n.push(`${r}`)}),`<script ${n.join(" ")}>${t.body?t.body:""}<\/script>`}).join("")}var _i=["esri.com","esriuk.com","esri.de","esri.ca","esrifrance.fr","esri.nl","esri-portugal.pt","esribulgaria.com","esri.fi","esri.kr","esrimalaysia.com.my","esri.es","esriaustralia.com.au","esri-southafrica.com","esri.cl","esrichina.com.cn","esri.co","esriturkey.com.tr","geodata.no","esriitalia.it","esri.pl"],It=class{constructor(t){var n,r,i;this.trackers=[],this.options=t,this.debug=t.debug,this.suppressDisabledWarnings=t.suppressDisabledWarnings,this.logger=t.logger||console,t.userPrivacySettings&&(this._userPrivacySettings=t.userPrivacySettings),t.requireConsent&&!t.userPrivacySettings&&(this._userPrivacySettings={accepted:!1,performance:!1,targeting:!1,functional:!1,id:Ci(),timestamp:Date.now()},t.userPrivacySettings=this._userPrivacySettings),this.disabled=Si(t),this.disabled&&!this.suppressDisabledWarnings&&this.logger.info("Telemetry Disabled");let o=((n=t.portal)===null||n===void 0?void 0:n.user)||t.user;o&&this.setUser(o,(i=(r=t.portal)===null||r===void 0?void 0:r.subscriptionInfo)===null||i===void 0?void 0:i.type),this.disabled||this.initializeTrackers()}shouldInitializeTrackers(t,n,r){let i=!n&&!t?.accepted,o=r.every(a=>t?.[a]);return i||o}filterTrackers(t){return this.options.plugins.filter(n=>t.includes(n.name))}initializeTrackers(){let t=this._userPrivacySettings,n=this.options.requireConsent;this.trackers=[],this.options.plugins&&(t?(this.shouldInitializeTrackers(t,n,["performance"])&&this.trackers.push(...this.filterTrackers(["amazon"])),this.shouldInitializeTrackers(t,n,["performance","targeting","functional"])&&this.trackers.push(...this.filterTrackers(["adobe-analytics","googleAnalytics","siteimprove"]))):this.trackers.push(...this.options.plugins)),this.trackers.length||this.logger.info("No trackers configured")}getScriptTags(){return this.trackers.map(t=>t.getScriptTags&&t.getScriptTags()).join("")}async init(){let t=this.trackers.map(n=>n.init());await Promise.all(t)}setUser(t={},n="Public"){t=typeof t=="string"?{username:t}:t,this.user=t,this.user.accountType=n;let r;if(t.email&&t.email.split){let i=t.email.split("@")[1];r=_i.filter(o=>i===o).length>0}(r||["In House","Demo and Marketing"].indexOf(n)>-1)&&(this.user.internalUser=!0)}async updateUserPrivacySettings(t){let{accepted:n,performance:r,targeting:i,functional:o}=this._userPrivacySettings,a=t.accepted&&!n&&!this.options.requireConsent&&(!t.performance||!t.targeting||!t.functional)||!t.performance&&r||!t.targeting&&i||!t.functional&&o;return this._userPrivacySettings=t,a||(this.disabled=!1,this.initializeTrackers(),await this.init()),{reload:a}}logPageView(t,n={},r={}){if(this.disabled&&!this.suppressDisabledWarnings)return this.logger.info("Page view was not logged because telemetry is disabled."),!1;let i=this.trackers.filter(({disabled:s,hasError:c})=>!s&&!c);if(!i.length)return this.logger.info("Page view was not logged because no enabled telemetry-plugins are registered."),!1;let o=this.preProcess(n,r);this.debug&&this.logger.info("Tracking page view",JSON.stringify(o));let a=i.map(s=>s.logPageView(t,o));return Promise.all(a).then(),!0}logEvent(t,n={}){if(this.disabled&&!this.suppressDisabledWarnings)return this.logger.info("Event was not logged because telemetry is disabled."),!1;let r=this.trackers.filter(({disabled:a,hasError:s})=>!a&&!s);if(!r.length)return this.logger.info("Event was not logged because no enabled telemetry-plugins are registered."),!1;let i=this.preProcess(t,n);this.debug&&this.logger.info("Tracking event",JSON.stringify(i));let o=r.map(a=>a.logEvent(i));return Promise.all(o).then(),!0}logError(t={}){t=Object.assign({eventType:"error"},t),this.logEvent(t)}startWorkflow(t,n={}){let r={name:t,start:Date.now(),steps:[],workflowId:Math.floor((1+Math.random())*17592186044416).toString(16)};this.saveWorkflow(r);let i=Object.assign({name:t,step:"start"},n);return this.logWorkflow(i),r}stepWorkflow(t,n,r={}){let i=typeof r=="string"?r:r.details,o=Object.assign({name:t,step:n,details:i},r);this.logWorkflow(o)}endWorkflow(t,n={}){let r=Object.assign({name:t,step:"finish"},n);this.logWorkflow(r)}cancelWorkflow(t,n={}){let r=Object.assign({name:t,step:"cancel"},n);this.logWorkflow(r)}getWorkflow(t){let n=Me.get(`TELEMETRY-WORKFLOW:${t}`);if(n){let r=Date.now()-n.start,i=1800*1e3;if(r<i)return n;this.deleteWorkflow(n)}}saveWorkflow(t){Me.set(`TELEMETRY-WORKFLOW:${t.name}`,t)}deleteWorkflow(t){Me.delete(`TELEMETRY-WORKFLOW:${t.name}`)}logWorkflow(t={}){t=this.preProcess(t);let n=this.getWorkflow(t.name);n||(this.startWorkflow(t.name),n=this.getWorkflow(t.name)),n.steps.push(t.step),n.duration=(Date.now()-n.start)/1e3,["cancel","finish"].indexOf(t.step)>-1?this.deleteWorkflow(n):this.saveWorkflow(n);let r=Object.assign(t,{eventType:"workflow",category:t.name,action:t.step,label:t.details,duration:n.duration,workflowId:n.workflowId});this.logEvent(r)}preProcess(t={},n={}){let r={};return this.user&&(r={user:"unknown",org:"unknown",lastLogin:this.user.lastLogin,userSince:this.user.created,internalUser:this.user.internalUser||!1,accountType:this.user.accountType}),Object.entries(Object.assign(Object.assign({},t),r)).reduce(Ni(n.omitComplexData,this.logger),{})}disable(){this.disabled=!0,this.trackers.forEach(t=>{var n;t.hasError||(t.disabled=!0,(n=t.disable)===null||n===void 0||n.call(t))})}disableTracker(t){var n;let r=this.trackers.find(({name:i})=>i===t);r&&!r.hasError&&(r.disabled=!0,(n=r.disable)===null||n===void 0||n.call(r))}enableTracker(t){var n;let r=this.trackers.find(({name:i})=>i===t);r&&!r.hasError&&(r.disabled=!1,(n=r.enable)===null||n===void 0||n.call(r))}};function Ni(e,t){return function(n,[r,i]){return Mi(i)?n[r]=i:e||(t.warn(`You are trying to log a non-primitive value, ${r}:${JSON.stringify(i)}. This will get logged as [object Object]`),n[r]=i),n}}function Mi(e){return["string","number","boolean","undefined"].includes(typeof e)||e&&typeof e.valueOf()=="string"}function Ci(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){let t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}var kt=class{constructor(t){var n;if(this.name="googleAnalytics",this.dimensions={},this.metrics={},this.isInitialized=!1,typeof window<"u"&&!(!((n=t?.measurementIds)===null||n===void 0)&&n.length))throw new Error("at least one measurementId needs to be provided in your configuration");Object.assign(this,t)}_getScripts(){return[{dataAttribute:"google-analytics",async:!0,src:`https://www.googletagmanager.com/gtag/js?id=${this.measurementIds?this.measurementIds[0]:""}`}]}getScriptTags(){return Ti(this._getScripts())}async init(){if(!this.isInitialized){if(typeof window>"u")throw new Fe("Window is undefined: Cannot add script element.");await Promise.all(this._getScripts().map(t=>Pi(t))),this.injectConfig(),this.isInitialized=!0}}logPageView(t,n={}){let r=this.buildCustomParams(n),i=Object.assign({page_title:t||window.location.pathname},r);return window.gtag("event","page_view",i),!0}logEvent(t){let{action:n}=t,r=lt(t,["action"]),i=n||"other",o=this.buildCustomParams(r);return window.gtag("event",i,o),!0}disable(){this.measurementIds&&this.measurementIds.forEach(t=>{window[`ga-disable-${t}`]=!0})}enable(){this.measurementIds&&this.measurementIds.forEach(t=>{window[`ga-disable-${t}`]=void 0})}injectConfig(){window.dataLayer=window.dataLayer||[],window.gtag=function(){window.dataLayer.push(arguments)},window.gtag("js",new Date);let t={custom_map:this.createDimensionsAndMetricsCustomMap(this.dimensions,this.metrics),send_page_view:!1,anonymize_ip:!0};this.measurementIds.forEach(n=>{window.gtag("config",n,t)})}buildCustomParams(t){let n,{category:r,label:i}=t;return n=this.verifyCustomDimensionAndMetrics(t),r&&(n=Object.assign(Object.assign({},n),{event_category:r})),i&&(n=Object.assign(Object.assign({},n),{event_label:i})),n}verifyCustomDimensionAndMetrics(t){let n=this.createDimensionsAndMetricsCustomMap(this.dimensions,this.metrics),r=Object.values(n);return Object.keys(t).filter(i=>r.includes(i)).reduce((i,o)=>Object.assign(i,{[o]:t[o]}),{})}createDimensionsAndMetricsCustomMap(t={},n={}){let r=this.createMetricCustomMap(n),i=this.createDimensionCustomMap(t);return Object.assign(Object.assign({},r),i)}createMetricCustomMap(t={}){return Object.keys(t).map(function(n){return{key:`metric${t[n]}`,value:n}}).filter(n=>n).reduce((n,{key:r,value:i})=>(n[r]=i,n),{})}createDimensionCustomMap(t={}){return Object.keys(t).map(function(n){return{key:`dimension${t[n]}`,value:n}}).filter(n=>n).reduce((n,{key:r,value:i})=>(n[r]=i,n),{})}},hn="TELEMETRY_COGNITO_CREDENTIALS";function zi(e,t={}){let n=`https://cognito-identity${t.fips===!0?"-fips":""}.us-east-1.amazonaws.com/`,r=Me.get(hn);if(r&&Date.now()/1e3<r.Expiration)return Promise.resolve(r);let i={method:"POST",headers:{"Content-type":"application/x-amz-json-1.1","X-Amz-Target":"AWSCognitoIdentityService.GetId"},body:JSON.stringify({IdentityPoolId:e})};return fetch(n,i).then(o=>{if(!o.ok)throw new Error(o.statusText);return o.json()}).then(o=>{let{IdentityId:a}=o,s={method:"POST",headers:{"Content-type":"application/x-amz-json-1.1","X-Amz-Target":"AWSCognitoIdentityService.GetCredentialsForIdentity"},body:JSON.stringify({IdentityId:a})};return fetch(n,s)}).then(o=>{if(!o.ok)throw new Error(o.statusText);return o.json()}).then(({Credentials:o})=>(Me.set(hn,o),o))}function Tr({telemetryData:e,dimensionLookup:t={},excludeKeys:n=[]}){return Object.keys(e).filter(r=>!n.includes(r)).map(r=>t[r]?{key:Ui(t,r),value:e[r]}:{key:r,value:Di(e,r)}).reduce((r,{key:i,value:o})=>(r[i]=o,r),{})}function Di(e,t){return t==="json"?e[t]?JSON.stringify(e[t]):"null":e[t]===void 0?"null":e[t].toString()}function Ui(e,t){return`dimension${e[t]}`}var Wi=["size","duration","position","number","count"];function _r(e,t={}){return Object.keys(e).filter(n=>t[n]||Wi.includes(n)).map(n=>t[n]?{key:Vi(t,n),value:e[n]}:{key:n,value:e[n]}).reduce((n,{key:r,value:i})=>(n[r]=i,n),{})}function Vi(e,t){return`metric${e[t]}`}function Li({event:e={},dimensionLookup:t={},metricLookup:n={}}){var r,i;let{pathname:o,eventType:a="other"}=e,s=_r(e,n),c=Tr({telemetryData:Object.assign({eventType:a},e),dimensionLookup:t,excludeKeys:["workflow","pathname",...Object.keys(s),...Object.keys(n)]}),u=Object.assign(Object.assign({name:a},c),s);return typeof document<"u"&&document.referrer&&(u.referrer=document.referrer),typeof window<"u"&&!u.hostname&&(u.hostname=(r=window.location)===null||r===void 0?void 0:r.hostname),u.path=typeof window<"u"&&window.location.pathname?(i=window.location)===null||i===void 0?void 0:i.pathname:o,u}function $i({page:e,previousPage:t={},options:n={},dimensionLookup:r={},metricLookup:i={}}){let o=_r(n,i),a=Tr({telemetryData:n,dimensionLookup:r,excludeKeys:["workflow",...Object.keys(o),...Object.keys(i)]}),{referrer:s,title:c}=document||{},{hostname:u,pathname:p}=window&&window.location?window.location:{};return Object.assign(Object.assign({name:"pageView",referrer:s,hostname:u,path:e||p,pageUrl:e||p,pageName:c,previousPageUrl:t.pageUrl,previousPageName:t.pageName},a),o)}function vn(e,t,n,r,i){for(t=t.split?t.split("."):t,r=0;r<t.length;r++)e=e?e[t[r]]:i;return e===i?n:e}var Ri="function",Hi="string",te="undefined",Ki="boolean",Je="object",qi="array",Xi="number",Fi="symbol",Ji="null",Bi=function(){},Nr="any",Mr="*",ye="__",Gi="form",Yi="input",Qi="button",Zi="select",Be=typeof process!==te?process:{};Be.env&&Be.env.NODE_ENV;var Q=typeof document!==te;Be.versions!=null&&Be.versions.node!=null;typeof Deno!==te&&Deno.core;Q&&window.name==="nodejs"||typeof navigator!==te&&typeof navigator.userAgent!==te&&(navigator.userAgent.includes("Node.js")||navigator.userAgent.includes("jsdom"));function Cr(e,t){return t.charAt(0)[e]()+t.slice(1)}var eo=Cr.bind(null,"toUpperCase"),to=Cr.bind(null,"toLowerCase");function no(e){return zr(e)?eo(Ji):typeof e===Je?ao(e):Object.prototype.toString.call(e).slice(8,-1)}function Ge(e,t){t===void 0&&(t=!0);var n=no(e);return t?to(n):n}function Ue(e,t){return typeof t===e}var Z=Ue.bind(null,Ri),ce=Ue.bind(null,Hi),we=Ue.bind(null,te),ro=Ue.bind(null,Ki);Ue.bind(null,Fi);function zr(e){return e===null}function io(e){return Ge(e)===Xi&&!isNaN(e)}function Dr(e){return Ge(e)===qi}function Y(e){if(!oo(e))return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function oo(e){return e&&(typeof e===Je||e!==null)}function ao(e){return Z(e.constructor)?e.constructor.name:null}function so(e){return e instanceof Error||ce(e.message)&&e.constructor&&io(e.constructor.stackTraceLimit)}function Ur(e,t){if(typeof t!="object"||zr(t))return!1;if(t instanceof e)return!0;var n=Ge(new e(""));if(so(t))for(;t;){if(Ge(t)===n)return!0;t=Object.getPrototypeOf(t)}return!1}Ur.bind(null,TypeError);Ur.bind(null,SyntaxError);function Ze(e,t){var n=e instanceof Element||e instanceof HTMLDocument;return n&&t?uo(e,t):n}function uo(e,t){return t===void 0&&(t=""),e&&e.nodeName===t.toUpperCase()}function et(e){var t=[].slice.call(arguments,1);return function(){return e.apply(void 0,[].slice.call(arguments).concat(t))}}et(Ze,Gi);et(Ze,Qi);et(Ze,Yi);et(Ze,Zi);function co(e){return e?Dr(e)?e:[e]:[]}function yn(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch{return null}}function lo(){if(Q){var e=navigator,t=e.languages;return e.userLanguage||(t&&t.length?t[0]:e.language)}}function fo(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch{}}function po(e){return(function(t){for(var n,r=Object.create(null),i=/([^&=]+)=?([^&]*)/g;n=i.exec(t);){var o=yn(n[1]),a=yn(n[2]);if(o)if(o.substring(o.length-2)==="[]"){var s=r[o=o.substring(0,o.length-2)]||(r[o]=[]);r[o]=Array.isArray(s)?s:[],r[o].push(a)}else r[o]=a===""||a}for(var c in r){var u=c.split("[");u.length>1&&(go(r,u.map(function(p){return p.replace(/[?[\]\\ ]/g,"")}),r[c]),delete r[c])}return r})((function(t){return Q&&window.location.search.substring(1)})())}function go(e,t,n){for(var r=t.length-1,i=0;i<r;++i){var o=t[i];if(o==="__proto__"||o==="constructor")break;o in e||(e[o]={}),e=e[o]}e[t[r]]=n}function be(){for(var e="",t=0,n=4294967295*Math.random()|0;t++<36;){var r="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx"[t-1],i=15&n;e+=r=="-"||r=="4"?r:(r=="x"?i:3&i|8).toString(16),n=t%8==0?4294967295*Math.random()|0:n>>4}return e}var ge="global",Oe=ye+ge+ye,Pe=typeof self===Je&&self.self===self&&self||typeof global===Je&&global[ge]===global&&global||void 0;function fe(e){return Pe[Oe][e]}function de(e,t){return Pe[Oe][e]=t}function Ae(e){delete Pe[Oe][e]}function je(e,t,n){var r;try{if(Kt(e)){var i=window[e];r=i[t].bind(i)}}catch{}return r||n}Pe[Oe]||(Pe[Oe]={});var Le={};function Kt(e){if(typeof Le[e]!==te)return Le[e];try{var t=window[e];t.setItem(te,te),t.removeItem(te)}catch{return Le[e]=!1}return Le[e]=!0}function T(){return T=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},T.apply(null,arguments)}var ue="function",ie="undefined",Ce="reducer",Wr="@@redux/",Ot=Wr+"INIT",mo=Wr+Math.random().toString(36),bn=(function(){return typeof Symbol===ue&&Symbol.observable||"@@observable"})(),$e=" != "+ue;function Vr(e,t,n){var r;if(typeof t===ue&&typeof n===ie&&(n=t,t=void 0),typeof n!==ie){if(typeof n!==ue)throw new Error("enhancer"+$e);return n(Vr)(e,t)}if(typeof e!==ue)throw new Error(Ce+$e);var i=e,o=t,a=[],s=a,c=!1;function u(){s===a&&(s=a.slice())}function p(){return o}function l(h){if(typeof h!==ue)throw new Error("Listener"+$e);var I=!0;return u(),s.push(h),function(){if(I){I=!1,u();var S=s.indexOf(h);s.splice(S,1)}}}function w(h){if(!Y(h))throw new Error("Act != obj");if(typeof h.type===ie)throw new Error("ActType "+ie);if(c)throw new Error("Dispatch in "+Ce);try{c=!0,o=i(o,h)}finally{c=!1}for(var I=a=s,S=0;S<I.length;S++)(0,I[S])();return h}return w({type:Ot}),(r={dispatch:w,subscribe:l,getState:p,replaceReducer:function(h){if(typeof h!==ue)throw new Error("next "+Ce+$e);i=h,w({type:Ot})}})[bn]=function(){var h,I=l;return(h={subscribe:function(S){if(typeof S!="object")throw new TypeError("Observer != obj");function v(){S.next&&S.next(p())}return v(),{unsubscribe:I(v)}}})[bn]=function(){return this},h},r}function ho(e,t){var n=t&&t.type;return"action "+(n&&n.toString()||"?")+Ce+" "+e+" returns "+ie}function Ee(){var e=[].slice.call(arguments);return e.length===0?function(t){return t}:e.length===1?e[0]:e.reduce(function(t,n){return function(){return t(n.apply(void 0,[].slice.call(arguments)))}})}function vo(){var e=arguments;return function(t){return function(n,r,i){var o,a=t(n,r,i),s=a.dispatch,c={getState:a.getState,dispatch:function(u){return s(u)}};return o=[].slice.call(e).map(function(u){return u(c)}),T({},a,{dispatch:s=Ee.apply(void 0,o)(a.dispatch)})}}}var le=ye+"anon_id",me=ye+"user_id",Se=ye+"user_traits",Pt="analytics",se="userId",xe="anonymousId",qe=["bootstrap","params","campaign","initializeStart","initialize","initializeEnd","ready","resetStart","reset","resetEnd","pageStart","page","pageEnd","pageAborted","trackStart","track","trackEnd","trackAborted","identifyStart","identify","identifyEnd","identifyAborted","userIdChanged","registerPlugins","enablePlugin","disablePlugin","online","offline","setItemStart","setItem","setItemEnd","setItemAborted","removeItemStart","removeItem","removeItemEnd","removeItemAborted"],Et=["name","EVENTS","config","loaded"],j=qe.reduce(function(e,t){return e[t]=t,e},{registerPluginType:function(e){return"registerPlugin:"+e},pluginReadyType:function(e){return"ready:"+e}}),wn=/^utm_/,xn=/^an_prop_/,Sn=/^an_trait_/;function yo(e){var t=e.storage.setItem;return function(n){return function(r){return function(i){if(i.type===j.bootstrap){var o=i.params,a=i.user,s=i.persistedUser,c=i.initialUser,u=s.userId===a.userId;s.anonymousId!==a.anonymousId&&t(le,a.anonymousId),u||t(me,a.userId),c.traits&&t(Se,T({},u&&s.traits?s.traits:{},c.traits));var p=Object.keys(i.params);if(p.length){var l=o.an_uid,w=o.an_event,h=p.reduce(function(I,S){if(S.match(wn)||S.match(/^(d|g)clid/)){var v=S.replace(wn,"");I.campaign[v==="campaign"?"name":v]=o[S]}return S.match(xn)&&(I.props[S.replace(xn,"")]=o[S]),S.match(Sn)&&(I.traits[S.replace(Sn,"")]=o[S]),I},{campaign:{},props:{},traits:{}});n.dispatch(T({type:j.params,raw:o},h,l?{userId:l}:{})),l&&setTimeout(function(){return e.identify(l,h.traits)},0),w&&setTimeout(function(){return e.track(w,h.props)},0),Object.keys(h.campaign).length&&n.dispatch({type:j.campaign,campaign:h.campaign})}}return r(i)}}}}function bo(e){return function(t,n){if(t===void 0&&(t={}),n===void 0&&(n={}),n.type===j.setItemEnd){if(n.key===le)return T({},t,{anonymousId:n.value});if(n.key===me)return T({},t,{userId:n.value})}switch(n.type){case j.identify:return Object.assign({},t,{userId:n.userId,traits:T({},t.traits,n.traits)});case j.reset:return[me,le,Se].forEach(function(r){e.removeItem(r)}),Object.assign({},t,{userId:null,anonymousId:null,traits:{}});default:return t}}}function In(e){return{userId:e.getItem(me),anonymousId:e.getItem(le),traits:e.getItem(Se)}}var At=function(e){return ye+"TEMP"+ye+e};function wo(e){var t=e.storage,n=t.setItem,r=t.removeItem,i=t.getItem;return function(o){return function(a){return function(s){var c=s.userId,u=s.traits,p=s.options;if(s.type===j.reset&&([me,Se,le].forEach(function(h){r(h)}),[se,xe,"traits"].forEach(function(h){Ae(At(h))})),s.type===j.identify){i(le)||n(le,be());var l=i(me),w=i(Se)||{};l&&l!==c&&o.dispatch({type:j.userIdChanged,old:{userId:l,traits:w},new:{userId:c,traits:u},options:p}),c&&n(me,c),u&&n(Se,T({},w,u))}return a(s)}}}}var Ne={};function kn(e,t){Ne[e]&&Z(Ne[e])&&(Ne[e](t),delete Ne[e])}function Lr(e,t,n){return new Promise(function(r,i){return t()?r(e):n<1?i(T({},e,{queue:!0})):new Promise(function(o){return setTimeout(o,10)}).then(function(o){return Lr(e,t,n-10).then(r,i)})})}function xo(e){return{abort:e}}function $r(e,t,n){var r={},i=t(),o=e.getState(),a=o.plugins,s=o.queue,c=o.user;if(!o.context.offline&&s&&s.actions&&s.actions.length){var u=s.actions.reduce(function(l,w,h){return a[w.plugin].loaded?(l.process.push(w),l.processIndex.push(h)):(l.requeue.push(w),l.requeueIndex.push(h)),l},{processIndex:[],process:[],requeue:[],requeueIndex:[]});if(u.processIndex&&u.processIndex.length){u.processIndex.forEach(function(l){var w=s.actions[l],h=w.plugin,I=w.payload.type,S=i[h][I];if(S&&Z(S)){var v,d=(function(b,m){return b===void 0&&(b={}),m===void 0&&(m={}),[se,xe].reduce(function(O,k){return b.hasOwnProperty(k)&&m[k]&&m[k]!==b[k]&&(O[k]=m[k]),O},b)})(w.payload,c),y=r[d.meta.rid];if(!y&&(v=S({payload:d,config:a[h].config,instance:n,abort:xo}))&&Y(v)&&v.abort)return void(r[d.meta.rid]=!0);if(!y){var x=I+":"+h;e.dispatch(T({},d,{type:x,_:{called:x,from:"queueDrain"}}))}}});var p=s.actions.filter(function(l,w){return!~u.processIndex.indexOf(w)});s.actions=p}}}var dt=function(e){var t=e.data,n=e.action,r=e.instance,i=e.state,o=e.allPlugins,a=e.allMatches,s=e.store,c=e.EVENTS;try{var u=i.plugins,p=i.context,l=n.type,w=l.match(Ie),h=t.exact.map(function(v){return v.pluginName});w&&(h=a.during.map(function(v){return v.pluginName}));var I=(function(v,d){return function(y,x,b){var m=x.config,O=x.name,k=O+"."+y.type;b&&(k=b.event);var M=y.type.match(Ie)?(function(C,A,W,z,H){return function(L,E){var K=z?z.name:C,D=E&&ze(E)?E:W;if(z&&(!(D=E&&ze(E)?E:[C]).includes(C)||D.length!==1))throw new Error("Method "+A+" can only abort "+C+" plugin. "+JSON.stringify(D)+" input valid");return T({},H,{abort:{reason:L,plugins:D,caller:A,_:K}})}})(O,k,d,b,y):(function(C,A){return function(){throw new Error(C.type+" action not cancellable. Remove abort in "+A)}})(y,k);return{payload:So(y),instance:v,config:m||{},abort:M}}})(r,h),S=t.exact.reduce(function(v,d){var y=d.pluginName,x=d.methodName,b=!1;return x.match(/^initialize/)||x.match(/^reset/)||(b=!u[y].loaded),p.offline&&x.match(/^(page|track|identify)/)&&(b=!0),v[""+y]=b,v},{});return Promise.resolve(t.exact.reduce(function(v,d,y){var x=d.pluginName;return Promise.resolve(v).then(function(b){function m(){return Promise.resolve(b)}var O=(function(){if(t.namespaced&&t.namespaced[x])return Promise.resolve(t.namespaced[x].reduce(function(k,M,C){return Promise.resolve(k).then(function(A){return M.method&&Z(M.method)?((function(L,E){var K=_n(L);if(K&&K.name===E){var D=_n(K.method);throw new Error([E+" plugin is calling method "+L,"Plugins cant call self","Use "+K.method+" "+(D?"or "+D.method:"")+" in "+E+" plugin insteadof "+L].join(`
2
+ import{a as ct,b as lt,d as fn,e as Ve,f as dn,g as pn,h as gn,i as mn,j as ft}from"./IRRMUFW7.js";import{a as ln}from"./HO5JGUUI.js";import"./CR7KUQQF.js";import"./7UVBIBQS.js";import{b as cn}from"./JSJYFWT6.js";import{G as un,h as an,q as sn}from"./MRGCC5C4.js";import"./QPIMTXPL.js";function wi(e){return dn(e).then(t=>{let n=e.folderId?`${Ve(e)}/content/users/${t}/${e.folderId}/items/${e.item.id}/update`:`${Ve(e)}/content/users/${t}/items/${e.item.id}/update`;e.params=Object.assign(Object.assign({},e.params),e.item),e.params.extent&&pn(e.params.extent)&&(e.params.extent=gn(e.params.extent));let r=Ve(e),i=mn(Object.assign(Object.assign({},e.item),{access:e.item.access}),r),o=e.params.thumbnailUrl;return typeof i.thumbnailUrl=="string"&&typeof o=="string"&&i.thumbnailUrl.split("?")[0]===o.split("?")[0]&&delete e.params.thumbnailUrl,fn(n,e)})}function xi(){var e;return!!(!((e=window?.navigator)===null||e===void 0)&&e.globalPrivacyControl)}function Si(e={}){let{disabled:t,portal:n,requireConsent:r,userPrivacySettings:i}=e;if(r)if(i?.accepted){if(i?.functional===!1&&i?.performance===!1&&i?.targeting===!1)return!0}else return!0;return i?.accepted===!0&&i?.functional===!1&&i?.performance===!1&&i?.targeting===!1||t||n?.eueiEnabled===!1||xi()?!0:!(!n||Ii(n)||ki(n)||Oi(n))}function Ii(e){return e.eueiEnabled&&e.user&&e.user.orgId===e.id}function ki(e){return e.user&&!e.user.orgId&&e.ipCntryCode==="US"}function Oi(e){return!e.user&&e.ipCntryCode==="US"}var Me={storage:{},memory:!0,get(e){let t;try{t=window.localStorage&&window.localStorage.getItem(e)||this.storage[e]}catch{t=this.storage[e]}if(t)try{return JSON.parse(t)}catch{return}else return},set(e,t){let n=JSON.stringify(t);try{window.localStorage.setItem(e,n)}catch{this.memory||(console.error("setting local storage failed, falling back to in-memory storage"),this.memory=!0),this.storage[e]=t}},delete(e){try{window.localStorage.removeItem(e)}catch{this.memory||(console.error("setting local storage failed, falling back to in-memory storage"),this.memory=!0),delete this.storage[e]}}},jr="esri-telemetry";function Pi(e){return new Promise((t,n)=>{e.onload=t,e.onerror=n,(!Ai(e)||e.body)&&t()})}function Ei(e){let{id:t,dataAttribute:n}=e;return!!document.getElementById(t)||!!document.querySelector(`[data-${jr}="${n}"]`)}function Ai(e){let{body:t,src:n,id:r,dataAttribute:i,section:o="body",type:a="text/javascript",async:s=!1,defer:c=!1,onload:u,onerror:p}=e;if(typeof window>"u")throw new Fe("Window is undefined: Cannot add script element.");if(Ei(e)){console.log(`script (${r||i}) is already present, skipping`);return}let l=ji({id:r,dataAttribute:i,type:a,async:s,defer:c,body:t,src:n,onload:u,onerror:p});return o==="body"?document.body.appendChild(l):document.head.appendChild(l)}var Fe=class extends Error{};function ji({id:e,dataAttribute:t,type:n,async:r,defer:i,body:o,src:a,onload:s,onerror:c}){let u=document.createElement("script");return e&&(u.id=e),t&&u.setAttribute(`data-${jr}`,t),a&&(u.src=a),o&&(u.innerText=o),u.type=n,u.async=r,u.defer=i,s&&(u.onload=s),c&&(u.onerror=c),u}function Ti(e){return e.map(t=>{let n=[];return["src","id","dataAttribute","type"].forEach(r=>{let i=r;r==="dataAttribute"&&(i="data-esri-telemetry"),t[r]&&n.push(`${i}="${t[r]}"`)}),["async","defer"].forEach(r=>{t[r]&&n.push(`${r}`)}),`<script ${n.join(" ")}>${t.body?t.body:""}<\/script>`}).join("")}var _i=["esri.com","esriuk.com","esri.de","esri.ca","esrifrance.fr","esri.nl","esri-portugal.pt","esribulgaria.com","esri.fi","esri.kr","esrimalaysia.com.my","esri.es","esriaustralia.com.au","esri-southafrica.com","esri.cl","esrichina.com.cn","esri.co","esriturkey.com.tr","geodata.no","esriitalia.it","esri.pl"],It=class{constructor(t){var n,r,i;this.trackers=[],this.options=t,this.debug=t.debug,this.suppressDisabledWarnings=t.suppressDisabledWarnings,this.logger=t.logger||console,t.userPrivacySettings&&(this._userPrivacySettings=t.userPrivacySettings),t.requireConsent&&!t.userPrivacySettings&&(this._userPrivacySettings={accepted:!1,performance:!1,targeting:!1,functional:!1,id:Ci(),timestamp:Date.now()},t.userPrivacySettings=this._userPrivacySettings),this.disabled=Si(t),this.disabled&&!this.suppressDisabledWarnings&&this.logger.info("Telemetry Disabled");let o=((n=t.portal)===null||n===void 0?void 0:n.user)||t.user;o&&this.setUser(o,(i=(r=t.portal)===null||r===void 0?void 0:r.subscriptionInfo)===null||i===void 0?void 0:i.type),this.disabled||this.initializeTrackers()}shouldInitializeTrackers(t,n,r){let i=!n&&!t?.accepted,o=r.every(a=>t?.[a]);return i||o}filterTrackers(t){return this.options.plugins.filter(n=>t.includes(n.name))}initializeTrackers(){let t=this._userPrivacySettings,n=this.options.requireConsent;this.trackers=[],this.options.plugins&&(t?(this.shouldInitializeTrackers(t,n,["performance"])&&this.trackers.push(...this.filterTrackers(["amazon"])),this.shouldInitializeTrackers(t,n,["performance","targeting","functional"])&&this.trackers.push(...this.filterTrackers(["adobe-analytics","googleAnalytics","siteimprove"]))):this.trackers.push(...this.options.plugins)),this.trackers.length||this.logger.info("No trackers configured")}getScriptTags(){return this.trackers.map(t=>t.getScriptTags&&t.getScriptTags()).join("")}async init(){let t=this.trackers.map(n=>n.init());await Promise.all(t)}setUser(t={},n="Public"){t=typeof t=="string"?{username:t}:t,this.user=t,this.user.accountType=n;let r;if(t.email&&t.email.split){let i=t.email.split("@")[1];r=_i.filter(o=>i===o).length>0}(r||["In House","Demo and Marketing"].indexOf(n)>-1)&&(this.user.internalUser=!0)}async updateUserPrivacySettings(t){let{accepted:n,performance:r,targeting:i,functional:o}=this._userPrivacySettings,a=t.accepted&&!n&&!this.options.requireConsent&&(!t.performance||!t.targeting||!t.functional)||!t.performance&&r||!t.targeting&&i||!t.functional&&o;return this._userPrivacySettings=t,a||(this.disabled=!1,this.initializeTrackers(),await this.init()),{reload:a}}logPageView(t,n={},r={}){if(this.disabled&&!this.suppressDisabledWarnings)return this.logger.info("Page view was not logged because telemetry is disabled."),!1;let i=this.trackers.filter(({disabled:s,hasError:c})=>!s&&!c);if(!i.length)return this.logger.info("Page view was not logged because no enabled telemetry-plugins are registered."),!1;let o=this.preProcess(n,r);this.debug&&this.logger.info("Tracking page view",JSON.stringify(o));let a=i.map(s=>s.logPageView(t,o));return Promise.all(a).then(),!0}logEvent(t,n={}){if(this.disabled&&!this.suppressDisabledWarnings)return this.logger.info("Event was not logged because telemetry is disabled."),!1;let r=this.trackers.filter(({disabled:a,hasError:s})=>!a&&!s);if(!r.length)return this.logger.info("Event was not logged because no enabled telemetry-plugins are registered."),!1;let i=this.preProcess(t,n);this.debug&&this.logger.info("Tracking event",JSON.stringify(i));let o=r.map(a=>a.logEvent(i));return Promise.all(o).then(),!0}logError(t={}){t=Object.assign({eventType:"error"},t),this.logEvent(t)}startWorkflow(t,n={}){let r={name:t,start:Date.now(),steps:[],workflowId:Math.floor((1+Math.random())*17592186044416).toString(16)};this.saveWorkflow(r);let i=Object.assign({name:t,step:"start"},n);return this.logWorkflow(i),r}stepWorkflow(t,n,r={}){let i=typeof r=="string"?r:r.details,o=Object.assign({name:t,step:n,details:i},r);this.logWorkflow(o)}endWorkflow(t,n={}){let r=Object.assign({name:t,step:"finish"},n);this.logWorkflow(r)}cancelWorkflow(t,n={}){let r=Object.assign({name:t,step:"cancel"},n);this.logWorkflow(r)}getWorkflow(t){let n=Me.get(`TELEMETRY-WORKFLOW:${t}`);if(n){let r=Date.now()-n.start,i=1800*1e3;if(r<i)return n;this.deleteWorkflow(n)}}saveWorkflow(t){Me.set(`TELEMETRY-WORKFLOW:${t.name}`,t)}deleteWorkflow(t){Me.delete(`TELEMETRY-WORKFLOW:${t.name}`)}logWorkflow(t={}){t=this.preProcess(t);let n=this.getWorkflow(t.name);n||(this.startWorkflow(t.name),n=this.getWorkflow(t.name)),n.steps.push(t.step),n.duration=(Date.now()-n.start)/1e3,["cancel","finish"].indexOf(t.step)>-1?this.deleteWorkflow(n):this.saveWorkflow(n);let r=Object.assign(t,{eventType:"workflow",category:t.name,action:t.step,label:t.details,duration:n.duration,workflowId:n.workflowId});this.logEvent(r)}preProcess(t={},n={}){let r={};return this.user&&(r={user:"unknown",org:"unknown",lastLogin:this.user.lastLogin,userSince:this.user.created,internalUser:this.user.internalUser||!1,accountType:this.user.accountType}),Object.entries(Object.assign(Object.assign({},t),r)).reduce(Ni(n.omitComplexData,this.logger),{})}disable(){this.disabled=!0,this.trackers.forEach(t=>{var n;t.hasError||(t.disabled=!0,(n=t.disable)===null||n===void 0||n.call(t))})}disableTracker(t){var n;let r=this.trackers.find(({name:i})=>i===t);r&&!r.hasError&&(r.disabled=!0,(n=r.disable)===null||n===void 0||n.call(r))}enableTracker(t){var n;let r=this.trackers.find(({name:i})=>i===t);r&&!r.hasError&&(r.disabled=!1,(n=r.enable)===null||n===void 0||n.call(r))}};function Ni(e,t){return function(n,[r,i]){return Mi(i)?n[r]=i:e||(t.warn(`You are trying to log a non-primitive value, ${r}:${JSON.stringify(i)}. This will get logged as [object Object]`),n[r]=i),n}}function Mi(e){return["string","number","boolean","undefined"].includes(typeof e)||e&&typeof e.valueOf()=="string"}function Ci(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){let t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}var kt=class{constructor(t){var n;if(this.name="googleAnalytics",this.dimensions={},this.metrics={},this.isInitialized=!1,typeof window<"u"&&!(!((n=t?.measurementIds)===null||n===void 0)&&n.length))throw new Error("at least one measurementId needs to be provided in your configuration");Object.assign(this,t)}_getScripts(){return[{dataAttribute:"google-analytics",async:!0,src:`https://www.googletagmanager.com/gtag/js?id=${this.measurementIds?this.measurementIds[0]:""}`}]}getScriptTags(){return Ti(this._getScripts())}async init(){if(!this.isInitialized){if(typeof window>"u")throw new Fe("Window is undefined: Cannot add script element.");await Promise.all(this._getScripts().map(t=>Pi(t))),this.injectConfig(),this.isInitialized=!0}}logPageView(t,n={}){let r=this.buildCustomParams(n),i=Object.assign({page_title:t||window.location.pathname},r);return window.gtag("event","page_view",i),!0}logEvent(t){let{action:n}=t,r=lt(t,["action"]),i=n||"other",o=this.buildCustomParams(r);return window.gtag("event",i,o),!0}disable(){this.measurementIds&&this.measurementIds.forEach(t=>{window[`ga-disable-${t}`]=!0})}enable(){this.measurementIds&&this.measurementIds.forEach(t=>{window[`ga-disable-${t}`]=void 0})}injectConfig(){window.dataLayer=window.dataLayer||[],window.gtag=function(){window.dataLayer.push(arguments)},window.gtag("js",new Date);let t={custom_map:this.createDimensionsAndMetricsCustomMap(this.dimensions,this.metrics),send_page_view:!1,anonymize_ip:!0};this.measurementIds.forEach(n=>{window.gtag("config",n,t)})}buildCustomParams(t){let n,{category:r,label:i}=t;return n=this.verifyCustomDimensionAndMetrics(t),r&&(n=Object.assign(Object.assign({},n),{event_category:r})),i&&(n=Object.assign(Object.assign({},n),{event_label:i})),n}verifyCustomDimensionAndMetrics(t){let n=this.createDimensionsAndMetricsCustomMap(this.dimensions,this.metrics),r=Object.values(n);return Object.keys(t).filter(i=>r.includes(i)).reduce((i,o)=>Object.assign(i,{[o]:t[o]}),{})}createDimensionsAndMetricsCustomMap(t={},n={}){let r=this.createMetricCustomMap(n),i=this.createDimensionCustomMap(t);return Object.assign(Object.assign({},r),i)}createMetricCustomMap(t={}){return Object.keys(t).map(function(n){return{key:`metric${t[n]}`,value:n}}).filter(n=>n).reduce((n,{key:r,value:i})=>(n[r]=i,n),{})}createDimensionCustomMap(t={}){return Object.keys(t).map(function(n){return{key:`dimension${t[n]}`,value:n}}).filter(n=>n).reduce((n,{key:r,value:i})=>(n[r]=i,n),{})}},hn="TELEMETRY_COGNITO_CREDENTIALS";function zi(e,t={}){let n=`https://cognito-identity${t.fips===!0?"-fips":""}.us-east-1.amazonaws.com/`,r=Me.get(hn);if(r&&Date.now()/1e3<r.Expiration)return Promise.resolve(r);let i={method:"POST",headers:{"Content-type":"application/x-amz-json-1.1","X-Amz-Target":"AWSCognitoIdentityService.GetId"},body:JSON.stringify({IdentityPoolId:e})};return fetch(n,i).then(o=>{if(!o.ok)throw new Error(o.statusText);return o.json()}).then(o=>{let{IdentityId:a}=o,s={method:"POST",headers:{"Content-type":"application/x-amz-json-1.1","X-Amz-Target":"AWSCognitoIdentityService.GetCredentialsForIdentity"},body:JSON.stringify({IdentityId:a})};return fetch(n,s)}).then(o=>{if(!o.ok)throw new Error(o.statusText);return o.json()}).then(({Credentials:o})=>(Me.set(hn,o),o))}function Tr({telemetryData:e,dimensionLookup:t={},excludeKeys:n=[]}){return Object.keys(e).filter(r=>!n.includes(r)).map(r=>t[r]?{key:Ui(t,r),value:e[r]}:{key:r,value:Di(e,r)}).reduce((r,{key:i,value:o})=>(r[i]=o,r),{})}function Di(e,t){return t==="json"?e[t]?JSON.stringify(e[t]):"null":e[t]===void 0?"null":e[t].toString()}function Ui(e,t){return`dimension${e[t]}`}var Wi=["size","duration","position","number","count"];function _r(e,t={}){return Object.keys(e).filter(n=>t[n]||Wi.includes(n)).map(n=>t[n]?{key:Vi(t,n),value:e[n]}:{key:n,value:e[n]}).reduce((n,{key:r,value:i})=>(n[r]=i,n),{})}function Vi(e,t){return`metric${e[t]}`}function Li({event:e={},dimensionLookup:t={},metricLookup:n={}}){var r,i;let{pathname:o,eventType:a="other"}=e,s=_r(e,n),c=Tr({telemetryData:Object.assign({eventType:a},e),dimensionLookup:t,excludeKeys:["workflow","pathname",...Object.keys(s),...Object.keys(n)]}),u=Object.assign(Object.assign({name:a},c),s);return typeof document<"u"&&document.referrer&&(u.referrer=document.referrer),typeof window<"u"&&!u.hostname&&(u.hostname=(r=window.location)===null||r===void 0?void 0:r.hostname),u.path=typeof window<"u"&&window.location.pathname?(i=window.location)===null||i===void 0?void 0:i.pathname:o,u}function $i({page:e,previousPage:t={},options:n={},dimensionLookup:r={},metricLookup:i={}}){let o=_r(n,i),a=Tr({telemetryData:n,dimensionLookup:r,excludeKeys:["workflow",...Object.keys(o),...Object.keys(i)]}),{referrer:s,title:c}=document||{},{hostname:u,pathname:p}=window&&window.location?window.location:{};return Object.assign(Object.assign({name:"pageView",referrer:s,hostname:u,path:e||p,pageUrl:e||p,pageName:c,previousPageUrl:t.pageUrl,previousPageName:t.pageName},a),o)}function vn(e,t,n,r,i){for(t=t.split?t.split("."):t,r=0;r<t.length;r++)e=e?e[t[r]]:i;return e===i?n:e}var Ri="function",Hi="string",te="undefined",Ki="boolean",Je="object",qi="array",Xi="number",Fi="symbol",Ji="null",Bi=function(){},Nr="any",Mr="*",ye="__",Gi="form",Yi="input",Qi="button",Zi="select",Be=typeof process!==te?process:{};Be.env&&Be.env.NODE_ENV;var Q=typeof document!==te;Be.versions!=null&&Be.versions.node!=null;typeof Deno!==te&&Deno.core;Q&&window.name==="nodejs"||typeof navigator!==te&&typeof navigator.userAgent!==te&&(navigator.userAgent.includes("Node.js")||navigator.userAgent.includes("jsdom"));function Cr(e,t){return t.charAt(0)[e]()+t.slice(1)}var eo=Cr.bind(null,"toUpperCase"),to=Cr.bind(null,"toLowerCase");function no(e){return zr(e)?eo(Ji):typeof e===Je?ao(e):Object.prototype.toString.call(e).slice(8,-1)}function Ge(e,t){t===void 0&&(t=!0);var n=no(e);return t?to(n):n}function Ue(e,t){return typeof t===e}var Z=Ue.bind(null,Ri),ce=Ue.bind(null,Hi),we=Ue.bind(null,te),ro=Ue.bind(null,Ki);Ue.bind(null,Fi);function zr(e){return e===null}function io(e){return Ge(e)===Xi&&!isNaN(e)}function Dr(e){return Ge(e)===qi}function Y(e){if(!oo(e))return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function oo(e){return e&&(typeof e===Je||e!==null)}function ao(e){return Z(e.constructor)?e.constructor.name:null}function so(e){return e instanceof Error||ce(e.message)&&e.constructor&&io(e.constructor.stackTraceLimit)}function Ur(e,t){if(typeof t!="object"||zr(t))return!1;if(t instanceof e)return!0;var n=Ge(new e(""));if(so(t))for(;t;){if(Ge(t)===n)return!0;t=Object.getPrototypeOf(t)}return!1}Ur.bind(null,TypeError);Ur.bind(null,SyntaxError);function Ze(e,t){var n=e instanceof Element||e instanceof HTMLDocument;return n&&t?uo(e,t):n}function uo(e,t){return t===void 0&&(t=""),e&&e.nodeName===t.toUpperCase()}function et(e){var t=[].slice.call(arguments,1);return function(){return e.apply(void 0,[].slice.call(arguments).concat(t))}}et(Ze,Gi);et(Ze,Qi);et(Ze,Yi);et(Ze,Zi);function co(e){return e?Dr(e)?e:[e]:[]}function yn(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch{return null}}function lo(){if(Q){var e=navigator,t=e.languages;return e.userLanguage||(t&&t.length?t[0]:e.language)}}function fo(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch{}}function po(e){return(function(t){for(var n,r=Object.create(null),i=/([^&=]+)=?([^&]*)/g;n=i.exec(t);){var o=yn(n[1]),a=yn(n[2]);if(o)if(o.substring(o.length-2)==="[]"){var s=r[o=o.substring(0,o.length-2)]||(r[o]=[]);r[o]=Array.isArray(s)?s:[],r[o].push(a)}else r[o]=a===""||a}for(var c in r){var u=c.split("[");u.length>1&&(go(r,u.map(function(p){return p.replace(/[?[\]\\ ]/g,"")}),r[c]),delete r[c])}return r})((function(t){return Q&&window.location.search.substring(1)})())}function go(e,t,n){for(var r=t.length-1,i=0;i<r;++i){var o=t[i];if(o==="__proto__"||o==="constructor")break;o in e||(e[o]={}),e=e[o]}e[t[r]]=n}function be(){for(var e="",t=0,n=4294967295*Math.random()|0;t++<36;){var r="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx"[t-1],i=15&n;e+=r=="-"||r=="4"?r:(r=="x"?i:3&i|8).toString(16),n=t%8==0?4294967295*Math.random()|0:n>>4}return e}var ge="global",Oe=ye+ge+ye,Pe=typeof self===Je&&self.self===self&&self||typeof global===Je&&global[ge]===global&&global||void 0;function fe(e){return Pe[Oe][e]}function de(e,t){return Pe[Oe][e]=t}function Ae(e){delete Pe[Oe][e]}function je(e,t,n){var r;try{if(Kt(e)){var i=window[e];r=i[t].bind(i)}}catch{}return r||n}Pe[Oe]||(Pe[Oe]={});var Le={};function Kt(e){if(typeof Le[e]!==te)return Le[e];try{var t=window[e];t.setItem(te,te),t.removeItem(te)}catch{return Le[e]=!1}return Le[e]=!0}function T(){return T=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},T.apply(null,arguments)}var ue="function",ie="undefined",Ce="reducer",Wr="@@redux/",Ot=Wr+"INIT",mo=Wr+Math.random().toString(36),bn=(function(){return typeof Symbol===ue&&Symbol.observable||"@@observable"})(),$e=" != "+ue;function Vr(e,t,n){var r;if(typeof t===ue&&typeof n===ie&&(n=t,t=void 0),typeof n!==ie){if(typeof n!==ue)throw new Error("enhancer"+$e);return n(Vr)(e,t)}if(typeof e!==ue)throw new Error(Ce+$e);var i=e,o=t,a=[],s=a,c=!1;function u(){s===a&&(s=a.slice())}function p(){return o}function l(h){if(typeof h!==ue)throw new Error("Listener"+$e);var I=!0;return u(),s.push(h),function(){if(I){I=!1,u();var S=s.indexOf(h);s.splice(S,1)}}}function w(h){if(!Y(h))throw new Error("Act != obj");if(typeof h.type===ie)throw new Error("ActType "+ie);if(c)throw new Error("Dispatch in "+Ce);try{c=!0,o=i(o,h)}finally{c=!1}for(var I=a=s,S=0;S<I.length;S++)(0,I[S])();return h}return w({type:Ot}),(r={dispatch:w,subscribe:l,getState:p,replaceReducer:function(h){if(typeof h!==ue)throw new Error("next "+Ce+$e);i=h,w({type:Ot})}})[bn]=function(){var h,I=l;return(h={subscribe:function(S){if(typeof S!="object")throw new TypeError("Observer != obj");function v(){S.next&&S.next(p())}return v(),{unsubscribe:I(v)}}})[bn]=function(){return this},h},r}function ho(e,t){var n=t&&t.type;return"action "+(n&&n.toString()||"?")+Ce+" "+e+" returns "+ie}function Ee(){var e=[].slice.call(arguments);return e.length===0?function(t){return t}:e.length===1?e[0]:e.reduce(function(t,n){return function(){return t(n.apply(void 0,[].slice.call(arguments)))}})}function vo(){var e=arguments;return function(t){return function(n,r,i){var o,a=t(n,r,i),s=a.dispatch,c={getState:a.getState,dispatch:function(u){return s(u)}};return o=[].slice.call(e).map(function(u){return u(c)}),T({},a,{dispatch:s=Ee.apply(void 0,o)(a.dispatch)})}}}var le=ye+"anon_id",me=ye+"user_id",Se=ye+"user_traits",Pt="analytics",se="userId",xe="anonymousId",qe=["bootstrap","params","campaign","initializeStart","initialize","initializeEnd","ready","resetStart","reset","resetEnd","pageStart","page","pageEnd","pageAborted","trackStart","track","trackEnd","trackAborted","identifyStart","identify","identifyEnd","identifyAborted","userIdChanged","registerPlugins","enablePlugin","disablePlugin","online","offline","setItemStart","setItem","setItemEnd","setItemAborted","removeItemStart","removeItem","removeItemEnd","removeItemAborted"],Et=["name","EVENTS","config","loaded"],j=qe.reduce(function(e,t){return e[t]=t,e},{registerPluginType:function(e){return"registerPlugin:"+e},pluginReadyType:function(e){return"ready:"+e}}),wn=/^utm_/,xn=/^an_prop_/,Sn=/^an_trait_/;function yo(e){var t=e.storage.setItem;return function(n){return function(r){return function(i){if(i.type===j.bootstrap){var o=i.params,a=i.user,s=i.persistedUser,c=i.initialUser,u=s.userId===a.userId;s.anonymousId!==a.anonymousId&&t(le,a.anonymousId),u||t(me,a.userId),c.traits&&t(Se,T({},u&&s.traits?s.traits:{},c.traits));var p=Object.keys(i.params);if(p.length){var l=o.an_uid,w=o.an_event,h=p.reduce(function(I,S){if(S.match(wn)||S.match(/^(d|g)clid/)){var v=S.replace(wn,"");I.campaign[v==="campaign"?"name":v]=o[S]}return S.match(xn)&&(I.props[S.replace(xn,"")]=o[S]),S.match(Sn)&&(I.traits[S.replace(Sn,"")]=o[S]),I},{campaign:{},props:{},traits:{}});n.dispatch(T({type:j.params,raw:o},h,l?{userId:l}:{})),l&&setTimeout(function(){return e.identify(l,h.traits)},0),w&&setTimeout(function(){return e.track(w,h.props)},0),Object.keys(h.campaign).length&&n.dispatch({type:j.campaign,campaign:h.campaign})}}return r(i)}}}}function bo(e){return function(t,n){if(t===void 0&&(t={}),n===void 0&&(n={}),n.type===j.setItemEnd){if(n.key===le)return T({},t,{anonymousId:n.value});if(n.key===me)return T({},t,{userId:n.value})}switch(n.type){case j.identify:return Object.assign({},t,{userId:n.userId,traits:T({},t.traits,n.traits)});case j.reset:return[me,le,Se].forEach(function(r){e.removeItem(r)}),Object.assign({},t,{userId:null,anonymousId:null,traits:{}});default:return t}}}function In(e){return{userId:e.getItem(me),anonymousId:e.getItem(le),traits:e.getItem(Se)}}var At=function(e){return ye+"TEMP"+ye+e};function wo(e){var t=e.storage,n=t.setItem,r=t.removeItem,i=t.getItem;return function(o){return function(a){return function(s){var c=s.userId,u=s.traits,p=s.options;if(s.type===j.reset&&([me,Se,le].forEach(function(h){r(h)}),[se,xe,"traits"].forEach(function(h){Ae(At(h))})),s.type===j.identify){i(le)||n(le,be());var l=i(me),w=i(Se)||{};l&&l!==c&&o.dispatch({type:j.userIdChanged,old:{userId:l,traits:w},new:{userId:c,traits:u},options:p}),c&&n(me,c),u&&n(Se,T({},w,u))}return a(s)}}}}var Ne={};function kn(e,t){Ne[e]&&Z(Ne[e])&&(Ne[e](t),delete Ne[e])}function Lr(e,t,n){return new Promise(function(r,i){return t()?r(e):n<1?i(T({},e,{queue:!0})):new Promise(function(o){return setTimeout(o,10)}).then(function(o){return Lr(e,t,n-10).then(r,i)})})}function xo(e){return{abort:e}}function $r(e,t,n){var r={},i=t(),o=e.getState(),a=o.plugins,s=o.queue,c=o.user;if(!o.context.offline&&s&&s.actions&&s.actions.length){var u=s.actions.reduce(function(l,w,h){return a[w.plugin].loaded?(l.process.push(w),l.processIndex.push(h)):(l.requeue.push(w),l.requeueIndex.push(h)),l},{processIndex:[],process:[],requeue:[],requeueIndex:[]});if(u.processIndex&&u.processIndex.length){u.processIndex.forEach(function(l){var w=s.actions[l],h=w.plugin,I=w.payload.type,S=i[h][I];if(S&&Z(S)){var v,d=(function(b,m){return b===void 0&&(b={}),m===void 0&&(m={}),[se,xe].reduce(function(O,k){return b.hasOwnProperty(k)&&m[k]&&m[k]!==b[k]&&(O[k]=m[k]),O},b)})(w.payload,c),y=r[d.meta.rid];if(!y&&(v=S({payload:d,config:a[h].config,instance:n,abort:xo}))&&Y(v)&&v.abort)return void(r[d.meta.rid]=!0);if(!y){var x=I+":"+h;e.dispatch(T({},d,{type:x,_:{called:x,from:"queueDrain"}}))}}});var p=s.actions.filter(function(l,w){return!~u.processIndex.indexOf(w)});s.actions=p}}}var dt=function(e){var t=e.data,n=e.action,r=e.instance,i=e.state,o=e.allPlugins,a=e.allMatches,s=e.store,c=e.EVENTS;try{var u=i.plugins,p=i.context,l=n.type,w=l.match(Ie),h=t.exact.map(function(v){return v.pluginName});w&&(h=a.during.map(function(v){return v.pluginName}));var I=(function(v,d){return function(y,x,b){var m=x.config,O=x.name,k=O+"."+y.type;b&&(k=b.event);var M=y.type.match(Ie)?(function(C,A,W,z,H){return function(L,E){var K=z?z.name:C,D=E&&ze(E)?E:W;if(z&&(!(D=E&&ze(E)?E:[C]).includes(C)||D.length!==1))throw new Error("Method "+A+" can only abort "+C+" plugin. "+JSON.stringify(D)+" input valid");return T({},H,{abort:{reason:L,plugins:D,caller:A,_:K}})}})(O,k,d,b,y):(function(C,A){return function(){throw new Error(C.type+" action not cancellable. Remove abort in "+A)}})(y,k);return{payload:So(y),instance:v,config:m||{},abort:M}}})(r,h),S=t.exact.reduce(function(v,d){var y=d.pluginName,x=d.methodName,b=!1;return x.match(/^initialize/)||x.match(/^reset/)||(b=!u[y].loaded),p.offline&&x.match(/^(page|track|identify)/)&&(b=!0),v[""+y]=b,v},{});return Promise.resolve(t.exact.reduce(function(v,d,y){var x=d.pluginName;return Promise.resolve(v).then(function(b){function m(){return Promise.resolve(b)}var O=(function(){if(t.namespaced&&t.namespaced[x])return Promise.resolve(t.namespaced[x].reduce(function(k,M,C){return Promise.resolve(k).then(function(A){return M.method&&Z(M.method)?((function(L,E){var K=_n(L);if(K&&K.name===E){var D=_n(K.method);throw new Error([E+" plugin is calling method "+L,"Plugins cant call self","Use "+K.method+" "+(D?"or "+D.method:"")+" in "+E+" plugin insteadof "+L].join(`
3
3
  `))}})(M.methodName,M.pluginName),Promise.resolve(M.method({payload:A,instance:r,abort:(W=A,z=x,H=M.pluginName,function(L,E){return T({},W,{abort:{reason:L,plugins:E||[z],caller:l,from:H||z}})}),config:En(M.pluginName,u,o),plugins:u})).then(function(L){var E=Y(L)?L:{};return Promise.resolve(T({},A,E))})):A;var W,z,H})},Promise.resolve(n))).then(function(k){b[x]=k});b[x]=n})();return O&&O.then?O.then(m):m()})},Promise.resolve({}))).then(function(v){return Promise.resolve(t.exact.reduce(function(d,y,x){try{var b=t.exact.length===x+1,m=y.pluginName,O=o[m];return Promise.resolve(d).then(function(k){var M=v[m]?v[m]:{};if(w&&(M=k),gt(M,m))return pt({data:M,method:l,instance:r,pluginName:m,store:s}),Promise.resolve(k);if(gt(k,m))return b&&pt({data:k,method:l,instance:r,store:s}),Promise.resolve(k);if(S.hasOwnProperty(m)&&S[m]===!0)return s.dispatch({type:"queue",plugin:m,payload:M,_:{called:"queue",from:"queueMechanism"}}),Promise.resolve(k);var C=I(v[m],o[m]);return Promise.resolve(O[l]({abort:C.abort,payload:M,instance:r,config:En(m,u,o),plugins:u})).then(function(A){var W=Y(A)?A:{},z=T({},k,W),H=v[m];if(gt(H,m))pt({data:H,method:l,instance:r,pluginName:m,store:s});else{var L=l+":"+m;(L.match(/:/g)||[]).length<2&&!l.match(On)&&!l.match(Pn)&&r.dispatch(T({},w?z:M,{type:L,_:{called:L,from:"submethod"}}))}return Promise.resolve(z)})})}catch(k){return Promise.reject(k)}},Promise.resolve(n))).then(function(d){if(!(l.match(Ie)||l.match(/^registerPlugin/)||l.match(Pn)||l.match(On)||l.match(/^params/)||l.match(/^userIdChanged/))){if(c.plugins.includes(l),d._&&d._.originalAction===l)return d;var y=T({},d,{_:{originalAction:d.type,called:d.type,from:"engineEnd"}});Rr(d,t.exact.length)&&!l.match(/End$/)&&(y=T({},y,{type:d.type+"Aborted"})),s.dispatch(y)}return d})})}catch(v){return Promise.reject(v)}},Ie=/Start$/,On=/^bootstrap/,Pn=/^ready/;function pt(e){var t=e.pluginName,n=e.method+"Aborted"+(t?":"+t:"");e.store.dispatch(T({},e.data,{type:n,_:{called:n,from:"abort"}}))}function En(e,t,n){var r=t[e]||n[e];return r&&r.config?r.config:{}}function An(e,t){return t.reduce(function(n,r){return r[e]?n.concat({methodName:e,pluginName:r.name,method:r[e]}):n},[])}function jn(e,t){var n=e.replace(Ie,""),r=t?":"+t:"";return[""+e+r,""+n+r,n+"End"+r]}function gt(e,t){var n=e.abort;return!!n&&(n===!0||Tn(n,t)||n&&Tn(n.plugins,t))}function Rr(e,t){var n=e.abort;if(!n)return!1;if(n===!0||ce(n))return!0;var r=n.plugins;return ze(n)&&n.length===t||ze(r)&&r.length===t}function ze(e){return Array.isArray(e)}function Tn(e,t){return!(!e||!ze(e))&&e.includes(t)}function _n(e){var t=e.match(/(.*):(.*)/);return!!t&&{method:t[1],name:t[2]}}function So(e){return Object.keys(e).reduce(function(t,n){return n==="type"||(t[n]=Y(e[n])?Object.assign({},e[n]):e[n]),t},{})}function Io(e,t,n){var r={};return function(i){return function(o){return function(a){try{var s,c=function(b){return s?b:o(l)},u=a.type,p=a.plugins,l=a;if(a.abort)return Promise.resolve(o(a));if(u===j.enablePlugin&&i.dispatch({type:j.initializeStart,plugins:p,disabled:[],fromEnable:!0,meta:a.meta}),u===j.disablePlugin&&setTimeout(function(){return kn(a.meta.rid,{payload:a})},0),u===j.initializeEnd){var w=t(),h=Object.keys(w),I=h.filter(function(b){return p.includes(b)}).map(function(b){return w[b]}),S=[],v=[],d=a.disabled,y=I.map(function(b){var m=b.loaded,O=b.name,k=b.config;return Lr(b,function(){return m({config:k})},1e4).then(function(M){return r[O]||(i.dispatch({type:j.pluginReadyType(O),name:O,events:Object.keys(b).filter(function(C){return!Et.includes(C)})}),r[O]=!0),S=S.concat(O),b}).catch(function(M){if(M instanceof Error)throw new Error(M);return v=v.concat(M.name),M})});Promise.all(y).then(function(b){var m={plugins:S,failed:v,disabled:d};setTimeout(function(){h.length===y.length+d.length&&i.dispatch(T({},{type:j.ready},m))},0)})}var x=(function(){if(u!==j.bootstrap)return/^ready:([^:]*)$/.test(u)&&setTimeout(function(){return $r(i,t,e)},0),Promise.resolve((function(b,m,O,k,M){try{var C=Z(m)?m():m,A=b.type,W=A.replace(Ie,"");if(b._&&b._.called)return Promise.resolve(b);var z=O.getState(),H=(K=C,(D=z.plugins)===void 0&&(D={}),(_=b.options)===void 0&&(_={}),Object.keys(K).filter(function(f){var g=_.plugins||{};return ro(g[f])?g[f]:g.all!==!1&&(!D[f]||D[f].enabled!==!1)}).map(function(f){return K[f]}));A===j.initializeStart&&b.fromEnable&&(H=Object.keys(z.plugins).filter(function(f){var g=z.plugins[f];return b.plugins.includes(f)&&!g.initialized}).map(function(f){return C[f]}));var L=H.map(function(f){return f.name}),E=(function(f,g){var P=jn(f).map(function(N){return An(N,g)});return g.reduce(function(N,V){var U=V.name,J=jn(f,U).map(function(re){return An(re,g)}),R=J[0],X=J[1],$=J[2];return R.length&&(N.beforeNS[U]=R),X.length&&(N.duringNS[U]=X),$.length&&(N.afterNS[U]=$),N},{before:P[0],beforeNS:{},during:P[1],duringNS:{},after:P[2],afterNS:{}})})(A,H);return Promise.resolve(dt({action:b,data:{exact:E.before,namespaced:E.beforeNS},state:z,allPlugins:C,allMatches:E,instance:O,store:k,EVENTS:M})).then(function(f){function g(){var V=(function(){if(A.match(Ie))return Promise.resolve(dt({action:T({},P,{type:W+"End"}),data:{exact:E.after,namespaced:E.afterNS},state:z,allPlugins:C,allMatches:E,instance:O,store:k,EVENTS:M})).then(function(U){U.meta&&U.meta.hasCallback&&kn(U.meta.rid,{payload:U})})})();return V&&V.then?V.then(function(){return f}):f}if(Rr(f,L.length))return f;var P,N=(function(){if(A!==W)return Promise.resolve(dt({action:T({},f,{type:W}),data:{exact:E.during,namespaced:E.duringNS},state:z,allPlugins:C,allMatches:E,instance:O,store:k,EVENTS:M})).then(function(V){P=V});P=f})();return N&&N.then?N.then(g):g()})}catch(f){return Promise.reject(f)}var K,D,_})(a,t,e,i,n)).then(function(b){var m=o(b);return s=1,m})})();return Promise.resolve(x&&x.then?x.then(c):c(x))}catch(b){return Promise.reject(b)}}}}}function ko(e){return function(t){return function(n){return function(r){var i=r.type,o=r.key,a=r.value,s=r.options;if(i===j.setItem||i===j.removeItem){if(r.abort)return n(r);i===j.setItem?e.setItem(o,a,s):e.removeItem(o,s)}return n(r)}}}}var Oo=function(){var e=this;this.before=[],this.after=[],this.addMiddleware=function(t,n){e[n]=e[n].concat(t)},this.removeMiddleware=function(t,n){var r=e[n].findIndex(function(i){return i===t});r!==-1&&(e[n]=[].concat(e[n].slice(0,r),e[n].slice(r+1)))},this.dynamicMiddlewares=function(t){return function(n){return function(r){return function(i){var o={getState:n.getState,dispatch:function(s){return n.dispatch(s)}},a=e[t].map(function(s){return s(o)});return Ee.apply(void 0,a)(r)(i)}}}}};function Po(e){return function(t,n){t===void 0&&(t={});var r={};if(n.type==="initialize:aborted")return t;if(/^registerPlugin:([^:]*)$/.test(n.type)){var i=Nn(n.type,"registerPlugin"),o=e()[i];if(!o||!i)return t;var a=n.enabled,s=o.config;return r[i]={enabled:a,initialized:!!a&&!o.initialize,loaded:!!a&&!!o.loaded({config:s}),config:s},T({},t,r)}if(/^initialize:([^:]*)$/.test(n.type)){var c=Nn(n.type,j.initialize),u=e()[c];return u&&c?(r[c]=T({},t[c],{initialized:!0,loaded:!!u.loaded({config:u.config})}),T({},t,r)):t}if(/^ready:([^:]*)$/.test(n.type))return r[n.name]=T({},t[n.name],{loaded:!0}),T({},t,r);switch(n.type){case j.disablePlugin:return T({},t,Mn(n.plugins,!1,t));case j.enablePlugin:return T({},t,Mn(n.plugins,!0,t));default:return t}}}function Nn(e,t){return e.substring(t.length+1,e.length)}function Mn(e,t,n){return e.reduce(function(r,i){return r[i]=T({},n[i],{enabled:t}),r},n)}function Hr(e){try{return JSON.parse(JSON.stringify(e))}catch{}return e}var Eo={last:{},history:[]};function Ao(e,t){e===void 0&&(e=Eo);var n=t.options,r=t.meta;if(t.type===j.track){var i=Hr(T({event:t.event,properties:t.properties},Object.keys(n).length&&{options:n},{meta:r}));return T({},e,{last:i,history:e.history.concat(i)})}return e}var jo={actions:[]};function To(e,t){e===void 0&&(e=jo);var n=t.payload;switch(t.type){case"queue":var r;return r=n&&n.type&&n.type===j.identify?[t].concat(e.actions):e.actions.concat(t),T({},e,{actions:r});case"dequeue":return[];default:return e}}var Kr=/#.*$/;function _o(e){var t=/(http[s]?:\/\/)?([^\/\s]+\/)(.*)/g.exec(e);return"/"+(t&&t[3]?t[3].split("?")[0].replace(Kr,""):"")}var qr,Xr,Fr,Jr,No=function(e){if(e===void 0&&(e={}),!Q)return e;var t=document,n=t.title,r=t.referrer,i=window,o=i.location,a=i.innerWidth,s=i.innerHeight,c=o.hash,u=o.search,p=(function(w){var h=(function(){if(Q){for(var I,S=document.getElementsByTagName("link"),v=0;I=S[v];v++)if(I.getAttribute("rel")==="canonical")return I.getAttribute("href")}})();return h?h.match(/\?/)?h:h+w:window.location.href.replace(Kr,"")})(u),l={title:n,url:p,path:_o(p),hash:c,search:u,width:a,height:s};return r&&r!==""&&(l.referrer=r),T({},l,e)},Mo={last:{},history:[]};function Co(e,t){e===void 0&&(e=Mo);var n=t.options;if(t.type===j.page){var r=Hr(T({properties:t.properties,meta:t.meta},Object.keys(n).length&&{options:n}));return T({},e,{last:r,history:e.history.concat(r)})}return e}qr=(function(){if(!Q)return!1;var e=navigator.appVersion;return~e.indexOf("Win")?"Windows":~e.indexOf("Mac")?"MacOS":~e.indexOf("X11")?"UNIX":~e.indexOf("Linux")?"Linux":"Unknown OS"})(),Xr=Q?document.referrer:null,Fr=lo(),Jr=fo();var Cn={initialized:!1,sessionId:be(),app:null,version:null,debug:!1,offline:!!Q&&!navigator.onLine,os:{name:qr},userAgent:Q?navigator.userAgent:"node",library:{name:Pt,version:"0.13.1"},timezone:Jr,locale:Fr,campaign:{},referrer:Xr};function zo(e,t){e===void 0&&(e=Cn);var n=e.initialized,r=t.campaign;switch(t.type){case j.campaign:return T({},e,{campaign:r});case j.offline:return T({},e,{offline:!0});case j.online:return T({},e,{offline:!1});default:return n?e:T({},Cn,e,{initialized:!0})}}var Do=["plugins","reducers","storage"];function Uo(e,t,n){if(Q){var r=window[(n?"add":"remove")+"EventListener"];e.split(" ").forEach(function(i){r(i,t)})}}function Wo(e){var t=Uo.bind(null,"online offline",function(n){return Promise.resolve(!navigator.onLine).then(e)});return t(!0),function(n){return t(!1)}}function Br(){return de(Pt,[]),function(e){return function(t,n,r){var i=e(t,n,r),o=i.dispatch;return Object.assign(i,{dispatch:function(a){return Pe[Oe][Pt].push(a.action||a),o(a)}})}}}function zn(e){return function(){return Ee(Ee.apply(null,arguments),Br())}}function mt(e){return e?Dr(e)?e:[e]:[]}function Dn(e,t,n){e===void 0&&(e={});var r,i,o=be();return t&&(Ne[o]=(r=t,i=(function(a){for(var s,c=a||Array.prototype.slice.call(arguments),u=0;u<c.length;u++)if(Z(c[u])){s=c[u];break}return s})(n),function(a){i&&i(a),r(a)})),T({},e,{rid:o,ts:new Date().getTime()},t?{hasCallback:!0}:{})}function Vo(e){e===void 0&&(e={});var t=e.reducers||{},n=e.initialUser||{},r=(e.plugins||[]).reduce(function(f,g){if(Z(g))return f.middlewares=f.middlewares.concat(g),f;if(g.NAMESPACE&&(g.name=g.NAMESPACE),!g.name)throw new Error("https://lytics.dev/errors/1");g.config||(g.config={});var P=g.EVENTS?Object.keys(g.EVENTS).map(function(U){return g.EVENTS[U]}):[];f.pluginEnabled[g.name]=!(g.enabled===!1||g.config.enabled===!1),delete g.enabled,g.methods&&(f.methods[g.name]=Object.keys(g.methods).reduce(function(U,J){var R;return U[J]=(R=g.methods[J],function(){for(var X=Array.prototype.slice.call(arguments),$=new Array(R.length),re=0;re<X.length;re++)$[re]=X[re];return $[$.length]=m,R.apply({instance:m},$)}),U},{}),delete g.methods);var N=Object.keys(g).concat(P),V=new Set(f.events.concat(N));if(f.events=Array.from(V),f.pluginsArray=f.pluginsArray.concat(g),f.plugins[g.name])throw new Error(g.name+"AlreadyLoaded");return f.plugins[g.name]=g,f.plugins[g.name].loaded||(f.plugins[g.name].loaded=function(){return!0}),f},{plugins:{},pluginEnabled:{},methods:{},pluginsArray:[],middlewares:[],events:[]}),i=e.storage?e.storage:{getItem:fe,setItem:de,removeItem:Ae},o=(function(f){return function(g,P,N){return P.getState("user")[g]||(N&&Y(N)&&N[g]?N[g]:In(f)[g]||fe(At(g))||null)}})(i),a=r.plugins,s=r.events.filter(function(f){return!Et.includes(f)}).sort(),c=new Set(s.concat(qe).filter(function(f){return!Et.includes(f)})),u=Array.from(c).sort(),p=function(){return a},l=new Oo,w=l.addMiddleware,h=l.removeMiddleware,I=l.dynamicMiddlewares,S=function(){throw new Error("Abort disabled inListener")},v=po(),d=In(i),y=T({},d,n,v.an_uid?{userId:v.an_uid}:{},v.an_aid?{anonymousId:v.an_aid}:{});y.anonymousId||(y.anonymousId=be());var x=T({enable:function(f,g){return new Promise(function(P){E.dispatch({type:j.enablePlugin,plugins:mt(f),_:{originalAction:j.enablePlugin}},P,[g])})},disable:function(f,g){return new Promise(function(P){E.dispatch({type:j.disablePlugin,plugins:mt(f),_:{originalAction:j.disablePlugin}},P,[g])})}},r.methods),b=!1,m={identify:function(f,g,P,N){try{var V=ce(f)?f:null,U=Y(f)?f:g,J=P||{},R=m.user();de(At(se),V);var X=V||U.userId||o(se,m,U);return Promise.resolve(new Promise(function($){E.dispatch(T({type:j.identifyStart,userId:X,traits:U||{},options:J,anonymousId:R.anonymousId},R.id&&R.id!==V&&{previousId:R.id}),$,[g,P,N])}))}catch($){return Promise.reject($)}},track:function(f,g,P,N){try{var V=Y(f)?f.event:f;if(!V||!ce(V))throw new Error("EventMissing");var U=Y(f)?f:g||{},J=Y(P)?P:{};return Promise.resolve(new Promise(function(R){E.dispatch({type:j.trackStart,event:V,properties:U,options:J,userId:o(se,m,g),anonymousId:o(xe,m,g)},R,[g,P,N])}))}catch(R){return Promise.reject(R)}},page:function(f,g,P){try{var N=Y(f)?f:{},V=Y(g)?g:{};return Promise.resolve(new Promise(function(U){E.dispatch({type:j.pageStart,properties:No(N),options:V,userId:o(se,m,N),anonymousId:o(xe,m,N)},U,[f,g,P])}))}catch(U){return Promise.reject(U)}},user:function(f){if(f===se||f==="id")return o(se,m);if(f===xe||f==="anonId")return o(xe,m);var g=m.getState("user");return f?vn(g,f):g},reset:function(f){return new Promise(function(g){E.dispatch({type:j.resetStart},g,f)})},ready:function(f){return b&&f({plugins:x,instance:m}),m.on(j.ready,function(g){f&&f(g),b=!0})},on:function(f,g){if(!f||!Z(g))return!1;if(f===j.bootstrap)throw new Error(".on disabled for "+f);var P=/Start$|Start:/;if(f==="*"){var N=function(R){return function(X){return function($){return $.type.match(P)&&g({payload:$,instance:m,plugins:a}),X($)}}},V=function(R){return function(X){return function($){return $.type.match(P)||g({payload:$,instance:m,plugins:a}),X($)}}};return w(N,Re),w(V,He),function(){h(N,Re),h(V,He)}}var U=f.match(P)?Re:He,J=function(R){return function(X){return function($){return $.type===f&&g({payload:$,instance:m,plugins:a,abort:S}),X($)}}};return w(J,U),function(){return h(J,U)}},once:function(f,g){if(!f||!Z(g))return!1;if(f===j.bootstrap)throw new Error(".once disabled for "+f);var P=m.on(f,function(N){g({payload:N.payload,instance:m,plugins:a,abort:S}),P()});return P},getState:function(f){var g=E.getState();return f?vn(g,f):Object.assign({},g)},dispatch:function(f){var g=ce(f)?{type:f}:f;if(qe.includes(g.type))throw new Error("reserved action "+g.type);var P=T({},g,{_:T({originalAction:g.type},f._||{})});E.dispatch(P)},enablePlugin:x.enable,disablePlugin:x.disable,plugins:x,storage:{getItem:i.getItem,setItem:function(f,g,P){E.dispatch({type:j.setItemStart,key:f,value:g,options:P})},removeItem:function(f,g){E.dispatch({type:j.removeItemStart,key:f,options:g})}},setAnonymousId:function(f,g){m.storage.setItem(le,f,g)},events:{core:qe,plugins:s}},O=r.middlewares.concat([function(f){return function(g){return function(P){return P.meta||(P.meta=Dn()),g(P)}}},I(Re),Io(m,p,{all:u,plugins:s}),ko(i),yo(m),wo(m),I(He)]),k={context:zo,user:bo(i),page:Co,track:Ao,plugins:Po(p),queue:To},M=Ee,C=Ee;if(Q&&e.debug){var A=window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__;A&&(M=A({trace:!0,traceLimit:25})),C=function(){return arguments.length===0?Br():Y(typeof arguments[0])?zn():zn().apply(null,arguments)}}var W,z=(function(f){return Object.keys(f).reduce(function(g,P){return Do.includes(P)||(g[P]=f[P]),g},{})})(e),H=r.pluginsArray.reduce(function(f,g){var P=g.name,N=g.config,V=g.loaded,U=r.pluginEnabled[P];return f[P]={enabled:U,initialized:!!U&&!g.initialize,loaded:!!V({config:N}),config:N},f},{}),L={context:z,user:y,plugins:H},E=Vr((function(f){for(var g=Object.keys(f),P={},N=0;N<g.length;N++){var V=g[N];typeof f[V]===ue&&(P[V]=f[V])}var U,J=Object.keys(P);try{(function(R){Object.keys(R).forEach(function(X){var $=R[X];if(typeof $(void 0,{type:Ot})===ie||typeof $(void 0,{type:mo})===ie)throw new Error(Ce+" "+X+" "+ie)})})(P)}catch(R){U=R}return function(R,X){if(R===void 0&&(R={}),U)throw U;for(var $=!1,re={},st=0;st<J.length;st++){var We=J[st],on=R[We],ut=(0,P[We])(on,X);if(typeof ut===ie){var bi=ho(We,X);throw new Error(bi)}re[We]=ut,$=$||ut!==on}return $?re:R}})(T({},k,t)),L,C(M(vo.apply(void 0,O))));E.dispatch=(W=E.dispatch,function(f,g,P){var N=T({},f,{meta:Dn(f.meta,g,mt(P))});return W.apply(null,[N])});var K=Object.keys(a);E.dispatch({type:j.bootstrap,plugins:K,config:z,params:v,user:y,initialUser:n,persistedUser:d});var D=K.filter(function(f){return r.pluginEnabled[f]}),_=K.filter(function(f){return!r.pluginEnabled[f]});return E.dispatch({type:j.registerPlugins,plugins:K,enabled:r.pluginEnabled}),r.pluginsArray.map(function(f,g){var P=f.bootstrap,N=f.config,V=f.name;P&&Z(P)&&P({instance:m,config:N,payload:f}),E.dispatch({type:j.registerPluginType(V),name:V,enabled:r.pluginEnabled[V],plugin:f}),r.pluginsArray.length===g+1&&E.dispatch({type:j.initializeStart,plugins:D,disabled:_})}),Wo(function(f){E.dispatch({type:f?j.offline:j.online})}),(function(f,g,P){setInterval(function(){return $r(f,g,P)},3e3)})(E,p,m),m}var Re="before",He="after",he="cookie",pe=Qr(),qt=tt,Gr=tt;function Yr(e){return pe?tt(e,"",-1):Ae(e)}function Qr(){if(pe!==void 0)return pe;var e=he+he;try{tt(e,e),pe=document.cookie.indexOf(e)!==-1,Yr(e)}catch{pe=!1}return pe}function tt(e,t,n,r,i,o){if(typeof window<"u"){var a=arguments.length>1;return pe===!1&&(a?de(e,t):fe(e)),a?document.cookie=e+"="+encodeURIComponent(t)+(n?"; expires="+new Date(+new Date+1e3*n).toUTCString()+(r?"; path="+r:"")+(i?"; domain="+i:"")+(o?"; secure":""):""):decodeURIComponent((("; "+document.cookie).split("; "+e+"=")[1]||"").split(";")[0])}}var oe="localStorage",Lo=Kt.bind(null,oe),Xt=je(oe,"getItem",fe),$o=je(oe,"setItem",de),Zr=je(oe,"removeItem",Ae),ae="sessionStorage",Ro=Kt.bind(null,ae),Ho=je(ae,"getItem",fe),Ko=je(ae,"setItem",de);je(ae,"removeItem",Ae);function ke(e){var t=e;try{if((t=JSON.parse(e))==="true")return!0;if(t==="false")return!1;if(Y(t))return t;parseFloat(t)===t&&(t=parseFloat(t))}catch{}if(t!==null&&t!=="")return t}var qo=Lo(),Xo=Ro(),Fo=Qr();function ei(e,t){if(e){var n=Ft(t),r=!Yt(n),i=Jt(n)?ke(localStorage.getItem(e)):void 0;if(r&&!we(i))return i;var o=Bt(n)?ke(qt(e)):void 0;if(r&&o)return o;var a=Gt(n)?ke(sessionStorage.getItem(e)):void 0;if(r&&a)return a;var s=fe(e);return r?s:{localStorage:i,sessionStorage:a,cookie:o,global:s}}}function Jo(e,t,n){if(e&&!we(t)){var r={},i=Ft(n),o=JSON.stringify(t),a=!Yt(i);return Jt(i)&&(r[oe]=Ke(oe,t,ke(localStorage.getItem(e))),localStorage.setItem(e,o),a)?r[oe]:Bt(i)&&(r[he]=Ke(he,t,ke(qt(e))),Gr(e,o),a)?r[he]:Gt(i)&&(r[ae]=Ke(ae,t,ke(sessionStorage.getItem(e))),sessionStorage.setItem(e,o),a)?r[ae]:(r[ge]=Ke(ge,t,fe(e)),de(e,t),a?r[ge]:r)}}function Bo(e,t){if(e){var n=Ft(t),r=ei(e,Mr),i={};return!we(r.localStorage)&&Jt(n)&&(localStorage.removeItem(e),i[oe]=r.localStorage),!we(r.cookie)&&Bt(n)&&(Yr(e),i[he]=r.cookie),!we(r.sessionStorage)&&Gt(n)&&(sessionStorage.removeItem(e),i[ae]=r.sessionStorage),!we(r.global)&&nt(n,ge)&&(Ae(e),i[ge]=r.global),i}}function Ft(e){return e?ce(e)?e:e.storage:Nr}function Jt(e){return qo&&nt(e,oe)}function Bt(e){return Fo&&nt(e,he)}function Gt(e){return Xo&&nt(e,ae)}function Yt(e){return e===Mr||e==="all"}function nt(e,t){return e===Nr||e===t||Yt(e)}function Ke(e,t,n){return{location:e,current:t,previous:n}}var Go={setItem:Jo,getItem:ei,removeItem:Bo};function Yo(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Un(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Wn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Un(Object(n),!0).forEach(function(r){Yo(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Un(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Qo(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t={storage:Go};return Vo(Wn(Wn({},t),e))}function ee(e){"@babel/helpers - typeof";return ee=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ee(e)}function Zo(e,t){if(ee(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ee(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ea(e){var t=Zo(e,"string");return ee(t)=="symbol"?t:t+""}function Qt(e,t,n){return(t=ea(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Vn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function F(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Vn(Object(n),!0).forEach(function(r){Qt(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Vn(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var Ln={exports:{}},$n={exports:{}},Rn;function ti(){return Rn||(Rn=1,(function(e){function t(n,r){this.v=n,this.k=r}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})($n)),$n.exports}var Hn={exports:{}},Kn={exports:{}},qn;function ni(){return qn||(qn=1,(function(e){function t(n,r,i,o){var a=Object.defineProperty;try{a({},"",{})}catch{a=0}e.exports=t=function(s,c,u,p){function l(w,h){t(s,w,function(I){return this._invoke(w,h,I)})}c?a?a(s,c,{value:u,enumerable:!p,configurable:!p,writable:!p}):s[c]=u:(l("next",0),l("throw",1),l("return",2))},e.exports.__esModule=!0,e.exports.default=e.exports,t(n,r,i,o)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(Kn)),Kn.exports}var Xn;function ri(){return Xn||(Xn=1,(function(e){var t=ni();function n(){var r,i,o=typeof Symbol=="function"?Symbol:{},a=o.iterator||"@@iterator",s=o.toStringTag||"@@toStringTag";function c(v,d,y,x){var b=d&&d.prototype instanceof p?d:p,m=Object.create(b.prototype);return t(m,"_invoke",(function(O,k,M){var C,A,W,z=0,H=M||[],L=!1,E={p:0,n:0,v:r,a:K,f:K.bind(r,4),d:function(D,_){return C=D,A=0,W=r,E.n=_,u}};function K(D,_){for(A=D,W=_,i=0;!L&&z&&!f&&i<H.length;i++){var f,g=H[i],P=E.p,N=g[2];D>3?(f=N===_)&&(W=g[(A=g[4])?5:(A=3,3)],g[4]=g[5]=r):g[0]<=P&&((f=D<2&&P<g[1])?(A=0,E.v=_,E.n=g[1]):P<N&&(f=D<3||g[0]>_||_>N)&&(g[4]=D,g[5]=_,E.n=N,A=0))}if(f||D>1)return u;throw L=!0,_}return function(D,_,f){if(z>1)throw TypeError("Generator is already running");for(L&&_===1&&K(_,f),A=_,W=f;(i=A<2?r:W)||!L;){C||(A?A<3?(A>1&&(E.n=-1),K(A,W)):E.n=W:E.v=W);try{if(z=2,C){if(A||(D="next"),i=C[D]){if(!(i=i.call(C,W)))throw TypeError("iterator result is not an object");if(!i.done)return i;W=i.value,A<2&&(A=0)}else A===1&&(i=C.return)&&i.call(C),A<2&&(W=TypeError("The iterator does not provide a '"+D+"' method"),A=1);C=r}else if((i=(L=E.n<0)?W:O.call(k,E))!==u)break}catch(g){C=r,A=1,W=g}finally{z=1}}return{value:i,done:L}}})(v,y,x),!0),m}var u={};function p(){}function l(){}function w(){}i=Object.getPrototypeOf;var h=[][a]?i(i([][a]())):(t(i={},a,function(){return this}),i),I=w.prototype=p.prototype=Object.create(h);function S(v){return Object.setPrototypeOf?Object.setPrototypeOf(v,w):(v.__proto__=w,t(v,s,"GeneratorFunction")),v.prototype=Object.create(I),v}return l.prototype=w,t(I,"constructor",w),t(w,"constructor",l),l.displayName="GeneratorFunction",t(w,s,"GeneratorFunction"),t(I),t(I,s,"Generator"),t(I,a,function(){return this}),t(I,"toString",function(){return"[object Generator]"}),(e.exports=n=function(){return{w:c,m:S}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports})(Hn)),Hn.exports}var Fn={exports:{}},Jn={exports:{}},Bn={exports:{}},Gn;function ii(){return Gn||(Gn=1,(function(e){var t=ti(),n=ni();function r(i,o){function a(c,u,p,l){try{var w=i[c](u),h=w.value;return h instanceof t?o.resolve(h.v).then(function(I){a("next",I,p,l)},function(I){a("throw",I,p,l)}):o.resolve(h).then(function(I){w.value=I,p(w)},function(I){return a("throw",I,p,l)})}catch(I){l(I)}}var s;this.next||(n(r.prototype),n(r.prototype,typeof Symbol=="function"&&Symbol.asyncIterator||"@asyncIterator",function(){return this})),n(this,"_invoke",function(c,u,p){function l(){return new o(function(w,h){a(c,p,w,h)})}return s=s?s.then(l,l):l()},!0)}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(Bn)),Bn.exports}var Yn;function oi(){return Yn||(Yn=1,(function(e){var t=ri(),n=ii();function r(i,o,a,s,c){return new n(t().w(i,o,a,s),c||Promise)}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(Jn)),Jn.exports}var Qn;function ta(){return Qn||(Qn=1,(function(e){var t=oi();function n(r,i,o,a,s){var c=t(r,i,o,a,s);return c.next().then(function(u){return u.done?u.value:c.next()})}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports})(Fn)),Fn.exports}var Zn={exports:{}},er;function na(){return er||(er=1,(function(e){function t(n){var r=Object(n),i=[];for(var o in r)i.unshift(o);return function a(){for(;i.length;)if((o=i.pop())in r)return a.value=o,a.done=!1,a;return a.done=!0,a}}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(Zn)),Zn.exports}var tr={exports:{}},nr={exports:{}},rr;function ra(){return rr||(rr=1,(function(e){function t(n){"@babel/helpers - typeof";return e.exports=t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(nr)),nr.exports}var ir;function ia(){return ir||(ir=1,(function(e){var t=ra().default;function n(r){if(r!=null){var i=r[typeof Symbol=="function"&&Symbol.iterator||"@@iterator"],o=0;if(i)return i.call(r);if(typeof r.next=="function")return r;if(!isNaN(r.length))return{next:function(){return r&&o>=r.length&&(r=void 0),{value:r&&r[o++],done:!r}}}}throw new TypeError(t(r)+" is not iterable")}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports})(tr)),tr.exports}var or;function oa(){return or||(or=1,(function(e){var t=ti(),n=ri(),r=ta(),i=oi(),o=ii(),a=na(),s=ia();function c(){var u=n(),p=u.m(c),l=(Object.getPrototypeOf?Object.getPrototypeOf(p):p.__proto__).constructor;function w(S){var v=typeof S=="function"&&S.constructor;return!!v&&(v===l||(v.displayName||v.name)==="GeneratorFunction")}var h={throw:1,return:2,break:3,continue:3};function I(S){var v,d;return function(y){v||(v={stop:function(){return d(y.a,2)},catch:function(){return y.v},abrupt:function(x,b){return d(y.a,h[x],b)},delegateYield:function(x,b,m){return v.resultName=b,d(y.d,s(x),m)},finish:function(x){return d(y.f,x)}},d=function(x,b,m){y.p=v.prev,y.n=v.next;try{return x(b,m)}finally{v.next=y.n}}),v.resultName&&(v[v.resultName]=y.v,v.resultName=void 0),v.sent=y.v,v.next=y.n;try{return S.call(this,v)}finally{y.p=v.prev,y.n=v.next}}}return(e.exports=c=function(){return{wrap:function(S,v,d,y){return u.w(I(S),v,d,y&&y.reverse())},isGeneratorFunction:w,mark:u.m,awrap:function(S,v){return new t(S,v)},AsyncIterator:o,async:function(S,v,d,y,x){return(w(v)?i:r)(I(S),v,d,y,x)},keys:a,values:s}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=c,e.exports.__esModule=!0,e.exports.default=e.exports})(Ln)),Ln.exports}var ht,ar;function aa(){if(ar)return ht;ar=1;var e=oa()();ht=e;try{regeneratorRuntime=e}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}return ht}var sa=aa(),q=ct(sa);function sr(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(u){return void n(u)}s.done?t(c):Promise.resolve(c).then(r,i)}function ne(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var o=e.apply(t,n);function a(c){sr(o,r,i,a,s,"next",c)}function s(c){sr(o,r,i,a,s,"throw",c)}a(void 0)})}}var ur=function(){};function ua(e,t){var n,r,i,o=(t=t||{}).initial||[],a=t.max||1/0,s=t.interval||1e4,c=t.onEmpty||ur,u=t.onPause||ur;function p(w){clearInterval(n);var h=o.splice(0,a);return h.length&&e(h,o),o.length?w?p():l():(i=!1,c(o))}function l(){i=!0,n=setInterval(p,s)}return o.length&&l(),{flush:function(w){p(w)},resume:p,push:function(w){return(r=o.push(w))>=a&&!t.throttle&&p(),i||l(),r},size:function(){return o.length},pause:function(w){w&&p(),clearInterval(n),i=!1,u(o)}}}var Xe="__",rt="session",ai=Xe+rt,si="page",cr=["id","createdAt","created"];function jt(e){var t=e?new Date(e):new Date;return[t.toISOString(),t.getTime()]}function ui(){var e=jt(),t=e[0],n=e[1];return{id:be(),created:n,createdAt:t}}var ca={session:[Ho,Ko],page:[fe,de]};function it(e,t){for(var n=ca[e],r=n[0],i=n[1],o=ui(),a=!1,s={},c=0;c<cr.length;c++){var u=cr[c],p=Xe+e+Xe+rt+Xe+u,l=r(p);a=t||!l,(t||!t&&!l)&&i(p,o[u]);var w=l&&!t?l:o[u],h=u!=="created"?w:Number(w);s[u]=h}return Zt(s,a)}function Zt(e,t){var n=Date.now();return e.elapsed=n-e.created,e.expires&&(e.remaining=Math.max(e.expires-n,0),e.isExpired=e.remaining===0),e.isNew=t,e}function De(e,t){e===void 0&&(e=30);var n=qt(ai),r=n?JSON.parse(n):Ye(e);return t?r:Zt(r,!n)}function Ye(e,t,n){e===void 0&&(e=30);var r=n?De(e,!0):ui(),i=60*e,o=r.created;if(n){var a=jt(),s=a[0],c=a[1];r.modified=c,r.modifiedAt=s,o=c}var u=jt(o+1e3*i),p=u[0];return r.expires=u[1],r.expiresAt=p,r.duration=1e3*i,t&&(r=Object.assign(r,t)),Gr(ai,JSON.stringify(r),i),Zt(r,!n)}var la=function(e,t){return Ye(e,t,!0)},ci=it.bind(null,rt),fa=it.bind(null,rt,!0),en=it.bind(null,si),lr=it.bind(null,si,!0),ve=typeof window<"u";function da(e){return typeof e=="string"}function fr(e){return typeof e=="boolean"}var vt,dr;function pa(){if(dr)return vt;dr=1;var e=function(d){return t(d)&&!n(d)};function t(d){return!!d&&typeof d=="object"}function n(d){var y=Object.prototype.toString.call(d);return y==="[object RegExp]"||y==="[object Date]"||o(d)}var r=typeof Symbol=="function"&&Symbol.for,i=r?Symbol.for("react.element"):60103;function o(d){return d.$$typeof===i}function a(d){return Array.isArray(d)?[]:{}}function s(d,y){return y.clone!==!1&&y.isMergeableObject(d)?S(a(d),d,y):d}function c(d,y,x){return d.concat(y).map(function(b){return s(b,x)})}function u(d,y){if(!y.customMerge)return S;var x=y.customMerge(d);return typeof x=="function"?x:S}function p(d){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(d).filter(function(y){return Object.propertyIsEnumerable.call(d,y)}):[]}function l(d){return Object.keys(d).concat(p(d))}function w(d,y){try{return y in d}catch{return!1}}function h(d,y){return w(d,y)&&!(Object.hasOwnProperty.call(d,y)&&Object.propertyIsEnumerable.call(d,y))}function I(d,y,x){var b={};return x.isMergeableObject(d)&&l(d).forEach(function(m){b[m]=s(d[m],x)}),l(y).forEach(function(m){h(d,m)||(w(d,m)&&x.isMergeableObject(y[m])?b[m]=u(m,x)(d[m],y[m],x):b[m]=s(y[m],x))}),b}function S(d,y,x){x=x||{},x.arrayMerge=x.arrayMerge||c,x.isMergeableObject=x.isMergeableObject||e,x.cloneUnlessOtherwiseSpecified=s;var b=Array.isArray(y),m=Array.isArray(d),O=b===m;return O?b?x.arrayMerge(d,y,x):I(d,y,x):s(y,x)}S.all=function(d,y){if(!Array.isArray(d))throw new Error("first argument should be an array");return d.reduce(function(x,b){return S(x,b,y)},{})};var v=S;return vt=v,vt}var ga=pa(),ma=ct(ga),Tt=new TextEncoder,ha={appstream2:"appstream",cloudhsmv2:"cloudhsm",email:"ses",marketplace:"aws-marketplace",mobile:"AWSMobileHubService",pinpoint:"mobiletargeting",queue:"sqs","git-codecommit":"codecommit","mturk-requester-sandbox":"mturk-requester","personalize-runtime":"personalize"},va=new Set(["authorization","content-type","content-length","user-agent","presigned-expires","expect","x-amzn-trace-id","range","connection"]),_t=class{constructor({accessKeyId:t,secretAccessKey:n,sessionToken:r,service:i,region:o,cache:a,retries:s,initRetryMs:c}){if(t==null)throw new TypeError("accessKeyId is a required option");if(n==null)throw new TypeError("secretAccessKey is a required option");this.accessKeyId=t,this.secretAccessKey=n,this.sessionToken=r,this.service=i,this.region=o,this.cache=a||new Map,this.retries=s??10,this.initRetryMs=c||50}async sign(t,n){if(t instanceof Request){let{method:o,url:a,headers:s,body:c}=t;n=Object.assign({method:o,url:a,headers:s},n),n.body==null&&s.has("Content-Type")&&(n.body=c!=null&&s.has("X-Amz-Content-Sha256")?c:await t.clone().arrayBuffer()),t=a}let r=new Nt(Object.assign({url:t.toString()},n,this,n&&n.aws)),i=Object.assign({},n,await r.sign());delete i.aws;try{return new Request(i.url.toString(),i)}catch(o){if(o instanceof TypeError)return new Request(i.url.toString(),Object.assign({duplex:"half"},i));throw o}}async fetch(t,n){for(let r=0;r<=this.retries;r++){let i=fetch(await this.sign(t,n));if(r===this.retries)return i;let o=await i;if(o.status<500&&o.status!==429)return o;await new Promise(a=>setTimeout(a,Math.random()*this.initRetryMs*Math.pow(2,r)))}throw new Error("An unknown error occurred, ensure retries is not negative")}},Nt=class{constructor({method:t,url:n,headers:r,body:i,accessKeyId:o,secretAccessKey:a,sessionToken:s,service:c,region:u,cache:p,datetime:l,signQuery:w,appendSessionToken:h,allHeaders:I,singleEncode:S}){if(n==null)throw new TypeError("url is a required option");if(o==null)throw new TypeError("accessKeyId is a required option");if(a==null)throw new TypeError("secretAccessKey is a required option");this.method=t||(i?"POST":"GET"),this.url=new URL(n),this.headers=new Headers(r||{}),this.body=i,this.accessKeyId=o,this.secretAccessKey=a,this.sessionToken=s;let v,d;(!c||!u)&&([v,d]=ya(this.url,this.headers)),this.service=c||v||"",this.region=u||d||"us-east-1",this.cache=p||new Map,this.datetime=l||new Date().toISOString().replace(/[:-]|\.\d{3}/g,""),this.signQuery=w,this.appendSessionToken=h||this.service==="iotdevicegateway",this.headers.delete("Host"),this.service==="s3"&&!this.signQuery&&!this.headers.has("X-Amz-Content-Sha256")&&this.headers.set("X-Amz-Content-Sha256","UNSIGNED-PAYLOAD");let y=this.signQuery?this.url.searchParams:this.headers;if(y.set("X-Amz-Date",this.datetime),this.sessionToken&&!this.appendSessionToken&&y.set("X-Amz-Security-Token",this.sessionToken),this.signableHeaders=["host",...this.headers.keys()].filter(b=>I||!va.has(b)).sort(),this.signedHeaders=this.signableHeaders.join(";"),this.canonicalHeaders=this.signableHeaders.map(b=>b+":"+(b==="host"?this.url.host:(this.headers.get(b)||"").replace(/\s+/g," "))).join(`
4
4
  `),this.credentialString=[this.datetime.slice(0,8),this.region,this.service,"aws4_request"].join("/"),this.signQuery&&(this.service==="s3"&&!y.has("X-Amz-Expires")&&y.set("X-Amz-Expires","86400"),y.set("X-Amz-Algorithm","AWS4-HMAC-SHA256"),y.set("X-Amz-Credential",this.accessKeyId+"/"+this.credentialString),y.set("X-Amz-SignedHeaders",this.signedHeaders)),this.service==="s3")try{this.encodedPath=decodeURIComponent(this.url.pathname.replace(/\+/g," "))}catch{this.encodedPath=this.url.pathname}else this.encodedPath=this.url.pathname.replace(/\/+/g,"/");S||(this.encodedPath=encodeURIComponent(this.encodedPath).replace(/%2F/g,"/")),this.encodedPath=mr(this.encodedPath);let x=new Set;this.encodedSearch=[...this.url.searchParams].filter(([b])=>{if(!b)return!1;if(this.service==="s3"){if(x.has(b))return!1;x.add(b)}return!0}).map(b=>b.map(m=>mr(encodeURIComponent(m)))).sort(([b,m],[O,k])=>b<O?-1:b>O?1:m<k?-1:m>k?1:0).map(b=>b.join("=")).join("&")}async sign(){return this.signQuery?(this.url.searchParams.set("X-Amz-Signature",await this.signature()),this.sessionToken&&this.appendSessionToken&&this.url.searchParams.set("X-Amz-Security-Token",this.sessionToken)):this.headers.set("Authorization",await this.authHeader()),{method:this.method,url:this.url,headers:this.headers,body:this.body}}async authHeader(){return["AWS4-HMAC-SHA256 Credential="+this.accessKeyId+"/"+this.credentialString,"SignedHeaders="+this.signedHeaders,"Signature="+await this.signature()].join(", ")}async signature(){let t=this.datetime.slice(0,8),n=[this.secretAccessKey,t,this.region,this.service].join(),r=this.cache.get(n);if(!r){let i=await Te("AWS4"+this.secretAccessKey,t),o=await Te(i,this.region),a=await Te(o,this.service);r=await Te(a,"aws4_request"),this.cache.set(n,r)}return yt(await Te(r,await this.stringToSign()))}async stringToSign(){return["AWS4-HMAC-SHA256",this.datetime,this.credentialString,yt(await pr(await this.canonicalString()))].join(`
5
5
  `)}async canonicalString(){return[this.method.toUpperCase(),this.encodedPath,this.encodedSearch,this.canonicalHeaders+`
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{a as _}from"./HSQV7EUD.js";import{b as m}from"./4AW45DXY.js";import"./OQH2TBQQ.js";import"./3LTRULIX.js";import{E as h,F as u,G as g,I as r,h as d,i as s}from"./P4PCDUNA.js";import"./QPIMTXPL.js";var c=class{constructor(){this.pages=[],this.headerText="",this.pages=[]}setPages(e){this.pages=e,this.setDefaultHeaderText()}setDefaultHeaderText(){this.headerText=this.pages.length?this.pages[0].title:""}},f=d`:host{--instant-apps-app-guide-width: 300px;--instant-apps-app-guide-height: 400px;--instant-apps-app-guide-list-item-bubble-size: 22px;width:var(--instant-apps-app-guide-width);height:var(--instant-apps-app-guide-height);display:block}:host calcite-panel{max-width:var(--instant-apps-app-guide-width);max-height:var(--instant-apps-app-guide-height);display:flex}:host calcite-carousel{flex:1;height:fit-content;background-color:var(--calcite-color-foreground-1);overflow:auto}:host [slot=header-content]{display:flex;gap:var(--calcite-spacing-sm);padding-inline-start:.25rem;font-weight:var(--calcite-font-weight-bold)}:host calcite-carousel-item{flex-grow:1;display:flex;flex-direction:column}:host .instant-apps-app-guide__content-wrapper{padding-block-start:.5rem;padding-inline:.5rem;flex-shrink:1;flex-grow:0}:host calcite-icon{--calcite-icon-color: var(--calcite-color-brand)}:host .instant-apps-app-guide__content-list{counter-set:item-counter;margin-inline:0;padding-inline-start:var(--calcite-spacing-xxxl);padding-inline-end:var(--calcite-spacing-lg);position:relative}:host .instant-apps-app-guide__content-list .instant-apps-app-guide__content-list--item{counter-increment:item-counter;margin-block-start:var(--calcite-spacing-lg);display:flex;align-items:flex-start}:host .instant-apps-app-guide__content-list .instant-apps-app-guide__content-list--item:before{content:counter(item-counter);background-color:var(--calcite-color-text-2);color:var(--calcite-color-text-inverse);line-height:var(--calcite-font-line-height-fixed-xl);width:var(--instant-apps-app-guide-list-item-bubble-size);left:0;border-radius:var(--calcite-corner-radius-pill);display:flex;justify-content:center;font-size:var(--calcite-font-size-sm);position:absolute;max-height:var(--instant-apps-app-guide-list-item-bubble-size)}:host .instant-apps-app-guide__content-list .instant-apps-app-guide__content-list--item::marker{color:var(--calcite-color-transparent)}`,l={contentList:"instant-apps-app-guide__content-list",contentListItem:"instant-apps-app-guide__content-list--item",contentWrapper:"instant-apps-app-guide__content-wrapper"},o=class extends g{constructor(){super(...arguments),this._messages=_({name:"instant-apps-app-guide"}),this._viewModel=new c,this._carouselRef=h(),this.header=!0}static{this.properties={headerText:16,header:5,data:0}}static{this.styles=f}load(){this._setContent(this.data)}willUpdate(e){e.has("data")&&this._setContent(this.data),e.has("headerText")&&(this._viewModel.headerText=this.headerText)}_setContent(e){this._viewModel.setPages(e),this.headerText=this._viewModel.headerText}_updateHeaderText(){let{_viewModel:e,_carouselRef:{value:t},_messages:a}=this;if(!(e&&t))return;let i=Array.from(t.children).indexOf(t.selectedItem),n=e?.pages,p=n?.[i]??n[0];this.headerText=p?.title||a.headerText}_getArrowType(){return this._viewModel.pages.length>2?"inline":"none"}render(){let e=this._renderAppGuidePages(this._viewModel.pages),t=this._renderAppGuideHeader();return s`<calcite-panel scale=s>${t}<calcite-carousel label="App Guide" @calciteCarouselChange=${()=>this._updateHeaderText()} .arrowType=${this._getArrowType()} ${u(this._carouselRef)}>${e}</calcite-carousel></calcite-panel>`}_renderAppGuideHeader(){let{_messages:e,header:t,headerText:a}=this,i=!!t&&e.headerText,n=a||e.headerText;return i?s`<span slot=header-content>${n} <calcite-icon icon=lightbulb scale=s></calcite-icon></span>`:null}_renderAppGuidePages(e){return e.map((t,a)=>{let{content:i,type:n,title:p}=t;return s`<calcite-carousel-item .label=${p}><div class=${r(l.contentWrapper)}>${this._renderContentItems(i,n)}</div></calcite-carousel-item>`})}_renderContentItems(e,t){return t==="list"?s`<ol class=${r(l.contentList)}>${e.map((a,i)=>s`<li class=${r(l.contentListItem)}>${a}</li>`)}</ol>`:e.map((a,i)=>s`<p>${a}</p>`)}};m("instant-apps-app-guide",o);export{o as InstantAppsAppGuide};
2
+ import{a as _}from"./G3CCK7KY.js";import{b as m}from"./OR5M4R6K.js";import"./CR7KUQQF.js";import"./7UVBIBQS.js";import{E as h,F as u,G as g,I as r,h as d,i as s}from"./MRGCC5C4.js";import"./QPIMTXPL.js";var c=class{constructor(){this.pages=[],this.headerText="",this.pages=[]}setPages(e){this.pages=e,this.setDefaultHeaderText()}setDefaultHeaderText(){this.headerText=this.pages.length?this.pages[0].title:""}},f=d`:host{--instant-apps-app-guide-width: 300px;--instant-apps-app-guide-height: 400px;--instant-apps-app-guide-list-item-bubble-size: 22px;width:var(--instant-apps-app-guide-width);height:var(--instant-apps-app-guide-height);display:block}:host calcite-panel{max-width:var(--instant-apps-app-guide-width);max-height:var(--instant-apps-app-guide-height);display:flex}:host calcite-carousel{flex:1;height:fit-content;background-color:var(--calcite-color-foreground-1);overflow:auto}:host [slot=header-content]{display:flex;gap:var(--calcite-spacing-sm);padding-inline-start:.25rem;font-weight:var(--calcite-font-weight-bold)}:host calcite-carousel-item{flex-grow:1;display:flex;flex-direction:column}:host .instant-apps-app-guide__content-wrapper{padding-block-start:.5rem;padding-inline:.5rem;flex-shrink:1;flex-grow:0}:host calcite-icon{--calcite-icon-color: var(--calcite-color-brand)}:host .instant-apps-app-guide__content-list{counter-set:item-counter;margin-inline:0;padding-inline-start:var(--calcite-spacing-xxxl);padding-inline-end:var(--calcite-spacing-lg);position:relative}:host .instant-apps-app-guide__content-list .instant-apps-app-guide__content-list--item{counter-increment:item-counter;margin-block-start:var(--calcite-spacing-lg);display:flex;align-items:flex-start}:host .instant-apps-app-guide__content-list .instant-apps-app-guide__content-list--item:before{content:counter(item-counter);background-color:var(--calcite-color-text-2);color:var(--calcite-color-text-inverse);line-height:var(--calcite-font-line-height-fixed-xl);width:var(--instant-apps-app-guide-list-item-bubble-size);left:0;border-radius:var(--calcite-corner-radius-pill);display:flex;justify-content:center;font-size:var(--calcite-font-size-sm);position:absolute;max-height:var(--instant-apps-app-guide-list-item-bubble-size)}:host .instant-apps-app-guide__content-list .instant-apps-app-guide__content-list--item::marker{color:var(--calcite-color-transparent)}`,l={contentList:"instant-apps-app-guide__content-list",contentListItem:"instant-apps-app-guide__content-list--item",contentWrapper:"instant-apps-app-guide__content-wrapper"},o=class extends g{constructor(){super(...arguments),this._messages=_({name:"instant-apps-app-guide"}),this._viewModel=new c,this._carouselRef=h(),this.header=!0}static{this.properties={headerText:16,header:5,data:0}}static{this.styles=f}load(){this._setContent(this.data)}willUpdate(e){e.has("data")&&this._setContent(this.data),e.has("headerText")&&(this._viewModel.headerText=this.headerText)}_setContent(e){this._viewModel.setPages(e),this.headerText=this._viewModel.headerText}_updateHeaderText(){let{_viewModel:e,_carouselRef:{value:t},_messages:a}=this;if(!(e&&t))return;let i=Array.from(t.children).indexOf(t.selectedItem),n=e?.pages,p=n?.[i]??n[0];this.headerText=p?.title||a.headerText}_getArrowType(){return this._viewModel.pages.length>2?"inline":"none"}render(){let e=this._renderAppGuidePages(this._viewModel.pages),t=this._renderAppGuideHeader();return s`<calcite-panel scale=s>${t}<calcite-carousel label="App Guide" @calciteCarouselChange=${()=>this._updateHeaderText()} .arrowType=${this._getArrowType()} ${u(this._carouselRef)}>${e}</calcite-carousel></calcite-panel>`}_renderAppGuideHeader(){let{_messages:e,header:t,headerText:a}=this,i=!!t&&e.headerText,n=a||e.headerText;return i?s`<span slot=header-content>${n} <calcite-icon icon=lightbulb scale=s></calcite-icon></span>`:null}_renderAppGuidePages(e){return e.map((t,a)=>{let{content:i,type:n,title:p}=t;return s`<calcite-carousel-item .label=${p}><div class=${r(l.contentWrapper)}>${this._renderContentItems(i,n)}</div></calcite-carousel-item>`})}_renderContentItems(e,t){return t==="list"?s`<ol class=${r(l.contentList)}>${e.map((a,i)=>s`<li class=${r(l.contentListItem)}>${a}</li>`)}</ol>`:e.map((a,i)=>s`<p>${a}</p>`)}};m("instant-apps-app-guide",o);export{o as InstantAppsAppGuide};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{a as I}from"./BM666UZR.js";import{b as w}from"./RUHBLPYT.js";import e from"./CEP54NLT.js";import a from"./YVNP437O.js";import{a as L}from"./Q5ZGIKBW.js";import"./OQH2TBQQ.js";import"./3LTRULIX.js";import{b as u}from"./FCSE4STJ.js";import{E as d,F as o,G as g,I as p,J as c,h as b,i,l,q as h,t as _}from"./P4PCDUNA.js";import"./QPIMTXPL.js";export default $arcgis.t(([,{a:f,b:v,d:y}])=>{var $=b`@layer{:host{display:block}.map-layer-picker-container{width:100%;align-items:center}.map-layer-picker{position:relative;width:100%;display:inline-block}.padding-bottom-1{padding-bottom:1rem}.layer-picker-dropdown{height:100%;width:100%}.max-width-350{max-width:350px}.height-100{height:100%}.disabled{cursor:default!important;user-select:none;opacity:var(--calcite-opacity-disabled);pointer-events:none}.no-bottom-margin{--calcite-label-margin-bottom: 0px}.layer-picker-label-container{align-items:center;display:inline-flex;height:100%;padding-inline-start:1rem;padding-inline-end:1rem}.padding-start-1{padding-inline-start:1rem}.cursor-default{cursor:default}.popover-list{overflow:auto;width:250px}}`,m=class extends g{constructor(){super(),this.appearance="transparent",this.configLayerOrderDefined=!1,this.defaultLayerId="",this.disabled=!1,this.display="inline-block",this.enabledLayerIds=[],this.isMobile=!1,this.showOnlyUpdatableLayers=!1,this.selectedIds=[],this.scale="m",this.showTables=!1,this.showTablesDisabled=!1,this.showSingleLayerAsLabel=!1,this.type="select",this.showLayersListInPopover=!1,this.referenceElement="",this.force=!1,this._hasMultipleLayers=!0,this._hasValidLayers=!0,this._isDropdownOpen=!1,this.ids=[],this.selectedName="",this._translations=L({name:"map-layer-picker",blocking:!0}),this.defaultLayerHonored=!1,this._layerSelectElement=d(),this._layerComboboxElement=d(),this._pnContextConsumer=w({context:I,subscribe:!0}),this._skipEditCheck=!1,this._popover=d(),this.beforeLayerSelectionChange=h(),this.idsFound=h(),this.noLayersFound=h(),this.layerSelectionChange=h(),this.listenOn(window,"mapChanged",this.mapChanged)}static{this.properties={appearance:1,configLayerOrderDefined:5,defaultLayerId:1,disabled:5,display:1,enabledLayerIds:0,height:9,isMobile:5,mapView:0,showOnlyUpdatableLayers:5,placeholderIcon:1,selectedIds:0,scale:1,showTables:5,showTablesDisabled:5,showSingleLayerAsLabel:5,type:1,showLayersListInPopover:5,referenceElement:1,force:16,_hasMultipleLayers:16,_hasValidLayers:16,_isDropdownOpen:16,ids:16,selectedName:16,_translations:16}}static{this.styles=$}static{this.shadowRootOptions=_}willUpdate(e){e.has("mapView")&&this.hasUpdated&&this.mapViewWatchHandler(),e.has("type")&&(this._layerElement=this.type==="select"?this._layerSelectElement:this._layerComboboxElement),e.has("selectedIds")&&this.hasUpdated&&this.mapView&&(async()=>{let t=await y(this.mapView,this.selectedIds[0]);this.selectedName=t?.title??""})(),e.has("enabledLayerIds")&&this.hasUpdated&&this.enabledLayerIdsWatchHandler()}async enabledLayerIdsWatchHandler(){let e=this.selectedIds.length>0&&!this.enabledLayerIds.includes(this.selectedIds[0]),t=this.enabledLayerIds.some(a=>!this.ids.includes(a)),s=this.ids.toString()!==this.enabledLayerIds.toString();e?this.mapViewWatchHandler():(t||s)&&this._setLayers(),this._hasMultipleLayers=this.enabledLayerIds.length>1}async mapViewWatchHandler(){if(await this._setLayers(),this.ids?.length>0){this._hasValidLayers=!0,this._hasMultipleLayers=this.ids.length>1;let e=this.ids[0];this.defaultLayerId&&!this.defaultLayerHonored&&(e=this.defaultLayerId),await this._setSelectedLayer(e)}else this.mapView&&(this._hasValidLayers=!1,this.noLayersFound.emit())}async setLayerById(e,t=!1){this._skipEditCheck=t,!t||t&&e!==this.selectedIds[0]?this._setSelectedLayer(e):t&&e===this.selectedIds[0]&&(this.force=!0,setTimeout(()=>{this.force=!1},10)),this._skipEditCheck=!1}async setLayerByIds(e,t=!1){this._skipEditCheck=t,this._layerSelectionChange(e),this._skipEditCheck=!1}async updateLayer(){await this._setSelectedLayer(this.ids[0])}async mapChanged(e){e.detail.isValid||(this._hasValidLayers=!1,this.noLayersFound.emit())}async load(){await this._setLayers(),this.ids?.length>0?(this._hasValidLayers=!0,this._hasMultipleLayers=this.ids.length>1,this.defaultLayerId||await this._setSelectedLayer(this.ids[0])):this.mapView&&(this._hasValidLayers=!1,this.noLayersFound.emit())}render(){let e="map-layer-picker",t=this.height&&this.height>0&&!this.showLayersListInPopover?{height:`${this.height.toString()}px`}:{};return t={...t,display:this.display},i`<div class="map-layer-picker-container" style=${c(t)}><div class="map-layer-picker" style=${c(t)}>${this._hasValidLayers?!this._hasMultipleLayers&&this.showSingleLayerAsLabel?this._getSingleLayerPlaceholder():this.type==="combobox"?this._getCombobox(e):this.type==="select"?this._getSelect(e):this.showLayersListInPopover?this._getMapLayerPopOver():this._getDropdown(e):this._getInvalidPlaceholder()}</div></div>`}loaded(){if(this.ids?.length>0||this.selectedIds?.length===1){let e=this.selectedIds.length===1?this.selectedIds[0]:this.ids[0];this.type==="select"?this._layerElement.value&&(this._layerElement.value.value=e):this.type==="dropdown"&&(this.selectedName=this._layerNameHash&&Object.keys(this._layerNameHash).indexOf(e)>-1?this._layerNameHash[e].name:this._tableNameHash&&Object.keys(this._tableNameHash).indexOf(e)>-1?this._tableNameHash[e].name:"")}this._popover.value?.addEventListener("calcitePopoverOpen",()=>{this.el.querySelector("calcite-dropdown-item[selected]")?.setFocus()})}_getMapLayerPopOver(){let e=this.height&&this.height>0?{"max-height":`${this.height.toString()}px`}:{};return i`<calcite-popover auto-close focus-trap-disabled .label=${this.referenceElement} placement=left .referenceElement=${this.referenceElement} scale=s ${o(this._popover)}><div class=popover-list style=${c(e)}>${this._getMapLayerOptions()}</div></calcite-popover>`}_getInvalidPlaceholder(){return i`<div><calcite-notice class="height-100" icon=exclamation-mark-triangle id=no-valid-layers kind=danger open><div slot=message>${this._translations.noLayersFound}</div></calcite-notice><calcite-tooltip .label=${this._translations.enableEditUpdate} placement=bottom reference-element=no-valid-layers><span>${this._translations.enableEditUpdate}</span></calcite-tooltip></div>`}_getSingleLayerPlaceholder(){let e=this._getItemTypeIcon();return i`<div class="layer-picker-label-container cursor-default"><calcite-icon .icon=${e} scale=s></calcite-icon><calcite-label class="no-bottom-margin padding-start-1">${this.selectedName}</calcite-label></div>`}_getSelect(e){return i`<calcite-select .disabled=${this.disabled} id=${e??l} label @calciteSelectChange=${()=>this._layerSelectionChange()} .scale=${this.scale} ${o(this._layerElement)}>${this._getMapLayerOptions()}</calcite-select>`}_getCombobox(e){return i`<calcite-combobox clear-disabled id=${e??l} label @calciteComboboxChange=${()=>this._layerSelectionChange()} .placeholderIcon=${this.placeholderIcon} .scale=${this.scale} selection-mode=single ${o(this._layerElement)}>${this._getMapLayerOptions()}</calcite-combobox>`}_getDropdown(e){return i`<calcite-dropdown class="layer-picker-dropdown" @calciteDropdownBeforeClose=${()=>this._isDropdownOpen=!1} @calciteDropdownBeforeOpen=${()=>this._isDropdownOpen=!0}>${this.isMobile?this._getDropdownButton():this._getActionDropdownButton(e)}<calcite-dropdown-group selection-mode=single>${this._getMapLayerOptions()}</calcite-dropdown-group></calcite-dropdown>`}_getActionDropdownButton(e){return i`<calcite-action appearance=solid id=${e??l} slot=trigger text>${this._getDropdownButton()}</calcite-action>`}_getDropdownButton(){let e=this._getItemTypeIcon(),t=this.isMobile?"":"max-width-350",s=this.isMobile?"trigger":"",a=this._isDropdownOpen?"chevron-up":"chevron-down";return i`<calcite-button alignment=icon-end-space-between .appearance=${this.appearance} class=${p(t)} .iconEnd=${a} .iconStart=${e} kind=neutral slot=${s??l} width=full><div>${this.selectedName}</div></calcite-button>`}_getItemTypeIcon(){let e=this.selectedIds.length>0&&this._layerNameHash,t=e?this.selectedIds[0]:void 0;return e?Object.keys(this._layerNameHash).indexOf(t)>-1?"layers":"table":"layers"}_getMapLayerOptions(){return this.ids.reduce((e,t)=>(this._validLayer(t)?e.push(this._getItem(t,"layer")):this._validTable(t)&&e.push(this._getItem(t,"table")),e),[])}_getItem(e,t){let s=t==="layer"&&this._layerNameHash?this._layerNameHash[e]:this._tableNameHash?this._tableNameHash[e]:void 0,a=this.showOnlyUpdatableLayers?s&&!s.supportsUpdate:!1,r=s?.name||"",n=this.selectedIds.indexOf(e)>-1;return this.type==="combobox"?i`<calcite-combobox-item .disabled=${a} .heading=${r} .selected=${n} .value=${e}></calcite-combobox-item>`:this.type==="select"?i`<calcite-option .disabled=${a} .label=${r} .selected=${n} .value=${e}></calcite-option>`:this.force&&n||!this.force?i`<calcite-dropdown-group class=${p(a?"disabled":"")} id=${r??l} .selectionMode=${a?"none":"single"}><calcite-dropdown-item .disabled=${!!(t==="table"&&this.showTablesDisabled)} .iconStart=${t} @click=${a?void 0:()=>{this._setSelectedLayer(e)}} .selected=${n}>${r}</calcite-dropdown-item></calcite-dropdown-group>`:null}async _setSelectedLayer(e){if(e!==this.selectedIds[0]){let t;if(this.defaultLayerId&&!this.defaultLayerHonored&&(t=this._getLayerFromHash(this.defaultLayerId),this.defaultLayerHonored=t!==void 0,e=this.defaultLayerHonored?this.defaultLayerId:e),t=t||this._getLayerFromHash(e),!this._skipEditCheck&&this.beforeLayerSelectionChange.emit({currentId:this.selectedIds[0],newId:e,ref:this.el}).defaultPrevented)return;this.selectedName=t?.name,this.selectedIds=[e],this._popover.value&&(this._popover.value.open=!1),this.layerSelectionChange.emit(this.selectedIds)}else{let t=this.mapView&&await y(this.mapView,this.selectedIds[0]);this.selectedName=t?.title||""}}_getLayerFromHash(e){return this._layerNameHash&&Object.keys(this._layerNameHash).indexOf(e)>-1?this._layerNameHash[e]:this._tableNameHash&&Object.keys(this._tableNameHash).indexOf(e)>-1?this._tableNameHash[e]:void 0}async _setLayers(){if(this.mapView){await this._initLayerTableHash();let e=[];this._layerNameHash&&(e=this.showOnlyUpdatableLayers?this._getEditableIds(this._layerNameHash):Object.keys(this._layerNameHash));let t=[];if(this._tableNameHash&&(t=this.showTables?this.showOnlyUpdatableLayers?this._getEditableIds(this._tableNameHash):Object.keys(this._tableNameHash):[]),this.configLayerOrderDefined){let s=[...e.reverse(),...t.reverse()];this.ids=this.enabledLayerIds.length>0?this.enabledLayerIds.filter(a=>s.includes(a)):s}else this.ids=[...e.reverse().filter(s=>this.enabledLayerIds?.length>0?this.enabledLayerIds.indexOf(s)>-1:!0),...t.reverse().filter(s=>this.enabledLayerIds?.length>0?this.enabledLayerIds.indexOf(s)>-1:!0)];this.idsFound.emit(this.ids)}}_getEditableIds(e){return Object.keys(e).filter(t=>e[t].supportsUpdate)}async _initLayerTableHash(){this._layerNameHash=this.mapView&&await f(this.mapView,this.showOnlyUpdatableLayers),this._tableNameHash=this.showTables&&this.mapView?await v(this.mapView,this.showOnlyUpdatableLayers):{}}_validLayer(e){let t=this._pnContextConsumer.value,s=this._layerNameHash&&this._layerNameHash[e]?.name;return s!==void 0&&Object.keys(t?.managedLayers||[]).indexOf(s)<0&&(this.enabledLayerIds?.length>0?this.enabledLayerIds.indexOf(e)>-1:!0)}_validTable(e){let t=this._pnContextConsumer.value,s=this._tableNameHash&&this._tableNameHash[e]?.name,a=s&&this.showTables;return a?(t?.managedTables||[]).indexOf(s)<0&&(this.enabledLayerIds?.length>0?this.enabledLayerIds.indexOf(e)>-1:!0):a!==void 0}_layerSelectionChange(e){if(this._layerElement.value){let t=e||(Array.isArray(this._layerElement.value.value)?this._layerElement.value.value:[this._layerElement.value.value]);if(JSON.stringify(t)!==JSON.stringify([""])){if(!this._skipEditCheck&&this.beforeLayerSelectionChange.emit({currentIds:this.selectedIds,newIds:t,ref:this.el}).defaultPrevented)return;this.selectedIds=t,this.layerSelectionChange.emit(this.selectedIds)}}}};u("map-layer-picker",m);return m},a,e)
2
+ import{a as I}from"./BM666UZR.js";import{b as w}from"./TFINIJHF.js";import e from"./CEP54NLT.js";import a from"./YVNP437O.js";import{a as L}from"./HO5JGUUI.js";import"./CR7KUQQF.js";import"./7UVBIBQS.js";import{b as u}from"./JSJYFWT6.js";import{E as d,F as o,G as g,I as p,J as c,h as b,i,l,q as h,t as _}from"./MRGCC5C4.js";import"./QPIMTXPL.js";export default $arcgis.t(([,{a:f,b:v,d:y}])=>{var $=b`@layer{:host{display:block}.map-layer-picker-container{width:100%;align-items:center}.map-layer-picker{position:relative;width:100%;display:inline-block}.padding-bottom-1{padding-bottom:1rem}.layer-picker-dropdown{height:100%;width:100%}.max-width-350{max-width:350px}.height-100{height:100%}.disabled{cursor:default!important;user-select:none;opacity:var(--calcite-opacity-disabled);pointer-events:none}.no-bottom-margin{--calcite-label-margin-bottom: 0px}.layer-picker-label-container{align-items:center;display:inline-flex;height:100%;padding-inline-start:1rem;padding-inline-end:1rem}.padding-start-1{padding-inline-start:1rem}.cursor-default{cursor:default}.popover-list{overflow:auto;width:250px}}`,m=class extends g{constructor(){super(),this.appearance="transparent",this.configLayerOrderDefined=!1,this.defaultLayerId="",this.disabled=!1,this.display="inline-block",this.enabledLayerIds=[],this.isMobile=!1,this.showOnlyUpdatableLayers=!1,this.selectedIds=[],this.scale="m",this.showTables=!1,this.showTablesDisabled=!1,this.showSingleLayerAsLabel=!1,this.type="select",this.showLayersListInPopover=!1,this.referenceElement="",this.force=!1,this._hasMultipleLayers=!0,this._hasValidLayers=!0,this._isDropdownOpen=!1,this.ids=[],this.selectedName="",this._translations=L({name:"map-layer-picker",blocking:!0}),this.defaultLayerHonored=!1,this._layerSelectElement=d(),this._layerComboboxElement=d(),this._pnContextConsumer=w({context:I,subscribe:!0}),this._skipEditCheck=!1,this._popover=d(),this.beforeLayerSelectionChange=h(),this.idsFound=h(),this.noLayersFound=h(),this.layerSelectionChange=h(),this.listenOn(window,"mapChanged",this.mapChanged)}static{this.properties={appearance:1,configLayerOrderDefined:5,defaultLayerId:1,disabled:5,display:1,enabledLayerIds:0,height:9,isMobile:5,mapView:0,showOnlyUpdatableLayers:5,placeholderIcon:1,selectedIds:0,scale:1,showTables:5,showTablesDisabled:5,showSingleLayerAsLabel:5,type:1,showLayersListInPopover:5,referenceElement:1,force:16,_hasMultipleLayers:16,_hasValidLayers:16,_isDropdownOpen:16,ids:16,selectedName:16,_translations:16}}static{this.styles=$}static{this.shadowRootOptions=_}willUpdate(e){e.has("mapView")&&this.hasUpdated&&this.mapViewWatchHandler(),e.has("type")&&(this._layerElement=this.type==="select"?this._layerSelectElement:this._layerComboboxElement),e.has("selectedIds")&&this.hasUpdated&&this.mapView&&(async()=>{let t=await y(this.mapView,this.selectedIds[0]);this.selectedName=t?.title??""})(),e.has("enabledLayerIds")&&this.hasUpdated&&this.enabledLayerIdsWatchHandler()}async enabledLayerIdsWatchHandler(){let e=this.selectedIds.length>0&&!this.enabledLayerIds.includes(this.selectedIds[0]),t=this.enabledLayerIds.some(a=>!this.ids.includes(a)),s=this.ids.toString()!==this.enabledLayerIds.toString();e?this.mapViewWatchHandler():(t||s)&&this._setLayers(),this._hasMultipleLayers=this.enabledLayerIds.length>1}async mapViewWatchHandler(){if(await this._setLayers(),this.ids?.length>0){this._hasValidLayers=!0,this._hasMultipleLayers=this.ids.length>1;let e=this.ids[0];this.defaultLayerId&&!this.defaultLayerHonored&&(e=this.defaultLayerId),await this._setSelectedLayer(e)}else this.mapView&&(this._hasValidLayers=!1,this.noLayersFound.emit())}async setLayerById(e,t=!1){this._skipEditCheck=t,!t||t&&e!==this.selectedIds[0]?this._setSelectedLayer(e):t&&e===this.selectedIds[0]&&(this.force=!0,setTimeout(()=>{this.force=!1},10)),this._skipEditCheck=!1}async setLayerByIds(e,t=!1){this._skipEditCheck=t,this._layerSelectionChange(e),this._skipEditCheck=!1}async updateLayer(){await this._setSelectedLayer(this.ids[0])}async mapChanged(e){e.detail.isValid||(this._hasValidLayers=!1,this.noLayersFound.emit())}async load(){await this._setLayers(),this.ids?.length>0?(this._hasValidLayers=!0,this._hasMultipleLayers=this.ids.length>1,this.defaultLayerId||await this._setSelectedLayer(this.ids[0])):this.mapView&&(this._hasValidLayers=!1,this.noLayersFound.emit())}render(){let e="map-layer-picker",t=this.height&&this.height>0&&!this.showLayersListInPopover?{height:`${this.height.toString()}px`}:{};return t={...t,display:this.display},i`<div class="map-layer-picker-container" style=${c(t)}><div class="map-layer-picker" style=${c(t)}>${this._hasValidLayers?!this._hasMultipleLayers&&this.showSingleLayerAsLabel?this._getSingleLayerPlaceholder():this.type==="combobox"?this._getCombobox(e):this.type==="select"?this._getSelect(e):this.showLayersListInPopover?this._getMapLayerPopOver():this._getDropdown(e):this._getInvalidPlaceholder()}</div></div>`}loaded(){if(this.ids?.length>0||this.selectedIds?.length===1){let e=this.selectedIds.length===1?this.selectedIds[0]:this.ids[0];this.type==="select"?this._layerElement.value&&(this._layerElement.value.value=e):this.type==="dropdown"&&(this.selectedName=this._layerNameHash&&Object.keys(this._layerNameHash).indexOf(e)>-1?this._layerNameHash[e].name:this._tableNameHash&&Object.keys(this._tableNameHash).indexOf(e)>-1?this._tableNameHash[e].name:"")}this._popover.value?.addEventListener("calcitePopoverOpen",()=>{this.el.querySelector("calcite-dropdown-item[selected]")?.setFocus()})}_getMapLayerPopOver(){let e=this.height&&this.height>0?{"max-height":`${this.height.toString()}px`}:{};return i`<calcite-popover auto-close focus-trap-disabled .label=${this.referenceElement} placement=left .referenceElement=${this.referenceElement} scale=s ${o(this._popover)}><div class=popover-list style=${c(e)}>${this._getMapLayerOptions()}</div></calcite-popover>`}_getInvalidPlaceholder(){return i`<div><calcite-notice class="height-100" icon=exclamation-mark-triangle id=no-valid-layers kind=danger open><div slot=message>${this._translations.noLayersFound}</div></calcite-notice><calcite-tooltip .label=${this._translations.enableEditUpdate} placement=bottom reference-element=no-valid-layers><span>${this._translations.enableEditUpdate}</span></calcite-tooltip></div>`}_getSingleLayerPlaceholder(){let e=this._getItemTypeIcon();return i`<div class="layer-picker-label-container cursor-default"><calcite-icon .icon=${e} scale=s></calcite-icon><calcite-label class="no-bottom-margin padding-start-1">${this.selectedName}</calcite-label></div>`}_getSelect(e){return i`<calcite-select .disabled=${this.disabled} id=${e??l} label @calciteSelectChange=${()=>this._layerSelectionChange()} .scale=${this.scale} ${o(this._layerElement)}>${this._getMapLayerOptions()}</calcite-select>`}_getCombobox(e){return i`<calcite-combobox clear-disabled id=${e??l} label @calciteComboboxChange=${()=>this._layerSelectionChange()} .placeholderIcon=${this.placeholderIcon} .scale=${this.scale} selection-mode=single ${o(this._layerElement)}>${this._getMapLayerOptions()}</calcite-combobox>`}_getDropdown(e){return i`<calcite-dropdown class="layer-picker-dropdown" @calciteDropdownBeforeClose=${()=>this._isDropdownOpen=!1} @calciteDropdownBeforeOpen=${()=>this._isDropdownOpen=!0}>${this.isMobile?this._getDropdownButton():this._getActionDropdownButton(e)}<calcite-dropdown-group selection-mode=single>${this._getMapLayerOptions()}</calcite-dropdown-group></calcite-dropdown>`}_getActionDropdownButton(e){return i`<calcite-action appearance=solid id=${e??l} slot=trigger text>${this._getDropdownButton()}</calcite-action>`}_getDropdownButton(){let e=this._getItemTypeIcon(),t=this.isMobile?"":"max-width-350",s=this.isMobile?"trigger":"",a=this._isDropdownOpen?"chevron-up":"chevron-down";return i`<calcite-button alignment=icon-end-space-between .appearance=${this.appearance} class=${p(t)} .iconEnd=${a} .iconStart=${e} kind=neutral slot=${s??l} width=full><div>${this.selectedName}</div></calcite-button>`}_getItemTypeIcon(){let e=this.selectedIds.length>0&&this._layerNameHash,t=e?this.selectedIds[0]:void 0;return e?Object.keys(this._layerNameHash).indexOf(t)>-1?"layers":"table":"layers"}_getMapLayerOptions(){return this.ids.reduce((e,t)=>(this._validLayer(t)?e.push(this._getItem(t,"layer")):this._validTable(t)&&e.push(this._getItem(t,"table")),e),[])}_getItem(e,t){let s=t==="layer"&&this._layerNameHash?this._layerNameHash[e]:this._tableNameHash?this._tableNameHash[e]:void 0,a=this.showOnlyUpdatableLayers?s&&!s.supportsUpdate:!1,r=s?.name||"",n=this.selectedIds.indexOf(e)>-1;return this.type==="combobox"?i`<calcite-combobox-item .disabled=${a} .heading=${r} .selected=${n} .value=${e}></calcite-combobox-item>`:this.type==="select"?i`<calcite-option .disabled=${a} .label=${r} .selected=${n} .value=${e}></calcite-option>`:this.force&&n||!this.force?i`<calcite-dropdown-group class=${p(a?"disabled":"")} id=${r??l} .selectionMode=${a?"none":"single"}><calcite-dropdown-item .disabled=${!!(t==="table"&&this.showTablesDisabled)} .iconStart=${t} @click=${a?void 0:()=>{this._setSelectedLayer(e)}} .selected=${n}>${r}</calcite-dropdown-item></calcite-dropdown-group>`:null}async _setSelectedLayer(e){if(e!==this.selectedIds[0]){let t;if(this.defaultLayerId&&!this.defaultLayerHonored&&(t=this._getLayerFromHash(this.defaultLayerId),this.defaultLayerHonored=t!==void 0,e=this.defaultLayerHonored?this.defaultLayerId:e),t=t||this._getLayerFromHash(e),!this._skipEditCheck&&this.beforeLayerSelectionChange.emit({currentId:this.selectedIds[0],newId:e,ref:this.el}).defaultPrevented)return;this.selectedName=t?.name,this.selectedIds=[e],this._popover.value&&(this._popover.value.open=!1),this.layerSelectionChange.emit(this.selectedIds)}else{let t=this.mapView&&await y(this.mapView,this.selectedIds[0]);this.selectedName=t?.title||""}}_getLayerFromHash(e){return this._layerNameHash&&Object.keys(this._layerNameHash).indexOf(e)>-1?this._layerNameHash[e]:this._tableNameHash&&Object.keys(this._tableNameHash).indexOf(e)>-1?this._tableNameHash[e]:void 0}async _setLayers(){if(this.mapView){await this._initLayerTableHash();let e=[];this._layerNameHash&&(e=this.showOnlyUpdatableLayers?this._getEditableIds(this._layerNameHash):Object.keys(this._layerNameHash));let t=[];if(this._tableNameHash&&(t=this.showTables?this.showOnlyUpdatableLayers?this._getEditableIds(this._tableNameHash):Object.keys(this._tableNameHash):[]),this.configLayerOrderDefined){let s=[...e.reverse(),...t.reverse()];this.ids=this.enabledLayerIds.length>0?this.enabledLayerIds.filter(a=>s.includes(a)):s}else this.ids=[...e.reverse().filter(s=>this.enabledLayerIds?.length>0?this.enabledLayerIds.indexOf(s)>-1:!0),...t.reverse().filter(s=>this.enabledLayerIds?.length>0?this.enabledLayerIds.indexOf(s)>-1:!0)];this.idsFound.emit(this.ids)}}_getEditableIds(e){return Object.keys(e).filter(t=>e[t].supportsUpdate)}async _initLayerTableHash(){this._layerNameHash=this.mapView&&await f(this.mapView,this.showOnlyUpdatableLayers),this._tableNameHash=this.showTables&&this.mapView?await v(this.mapView,this.showOnlyUpdatableLayers):{}}_validLayer(e){let t=this._pnContextConsumer.value,s=this._layerNameHash&&this._layerNameHash[e]?.name;return s!==void 0&&Object.keys(t?.managedLayers||[]).indexOf(s)<0&&(this.enabledLayerIds?.length>0?this.enabledLayerIds.indexOf(e)>-1:!0)}_validTable(e){let t=this._pnContextConsumer.value,s=this._tableNameHash&&this._tableNameHash[e]?.name,a=s&&this.showTables;return a?(t?.managedTables||[]).indexOf(s)<0&&(this.enabledLayerIds?.length>0?this.enabledLayerIds.indexOf(e)>-1:!0):a!==void 0}_layerSelectionChange(e){if(this._layerElement.value){let t=e||(Array.isArray(this._layerElement.value.value)?this._layerElement.value.value:[this._layerElement.value.value]);if(JSON.stringify(t)!==JSON.stringify([""])){if(!this._skipEditCheck&&this.beforeLayerSelectionChange.emit({currentIds:this.selectedIds,newIds:t,ref:this.el}).defaultPrevented)return;this.selectedIds=t,this.layerSelectionChange.emit(this.selectedIds)}}}};u("map-layer-picker",m);return m},a,e)