@esri/solutions-components 1.2.0-next.35 → 1.2.0-next.37

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 (489) hide show
  1. package/dist/cdn/{B5DG7MHH.js → 24GFQBBP.js} +2 -2
  2. package/dist/cdn/{H7SGDNC5.js → 2FBFQ2FF.js} +2 -2
  3. package/dist/cdn/{NJQBU7CR.js → 2I3XBAD6.js} +2 -2
  4. package/dist/cdn/{YHUNJ3ML.js → 2JY3LFAY.js} +2 -2
  5. package/dist/cdn/{UA5UBWLP.js → 2LH54QCN.js} +2 -2
  6. package/dist/cdn/{F62APU22.js → 2PMRXHBC.js} +2 -2
  7. package/dist/cdn/{UGWNXUFJ.js → 32SQEJ32.js} +2 -2
  8. package/dist/cdn/{W64KXNUQ.js → 36TCBSHS.js} +2 -2
  9. package/dist/cdn/{PRGZNWJV.js → 36ZEDQEQ.js} +2 -2
  10. package/dist/cdn/{QGM6TJLI.js → 3BQPEIW4.js} +2 -2
  11. package/dist/cdn/{LHJUIZBT.js → 3E4YA4DX.js} +2 -2
  12. package/dist/cdn/{XZ5T5VBY.js → 3EZ6ZHBT.js} +2 -2
  13. package/dist/cdn/{FJ5COB3V.js → 3FCPDGAP.js} +2 -2
  14. package/dist/cdn/{NOZ2AV5D.js → 3MLQ5VLG.js} +2 -2
  15. package/dist/cdn/{GPS7M3MZ.js → 3NKNRU2S.js} +2 -2
  16. package/dist/cdn/{J3V6JALQ.js → 3PWYLWF3.js} +2 -2
  17. package/dist/cdn/{DVEWQYBN.js → 3VAHJ6OS.js} +1 -1
  18. package/dist/cdn/{C27WWRWN.js → 3YTMGW67.js} +2 -2
  19. package/dist/cdn/{BVLBXGUG.js → 423EZ5EV.js} +2 -2
  20. package/dist/cdn/{WYD7SFWY.js → 424EU24N.js} +1 -1
  21. package/dist/cdn/452XRCXF.js +4 -0
  22. package/dist/cdn/{452H4YLI.js → 46VNDLON.js} +2 -2
  23. package/dist/cdn/{PDVTMMC5.js → 4A5SM2SV.js} +3 -3
  24. package/dist/cdn/{YMK5DBGR.js → 4BQMZQ72.js} +2 -2
  25. package/dist/cdn/{QAMHZBOL.js → 4KS7QQ4H.js} +2 -2
  26. package/dist/cdn/{E2OWCPHL.js → 4WQFSTBO.js} +2 -2
  27. package/dist/cdn/{OVCHPDJI.js → 4YBAWYKJ.js} +2 -2
  28. package/dist/cdn/4YVOMO6V.js +4 -0
  29. package/dist/cdn/{II2EKN44.js → 4ZPW2OXL.js} +2 -2
  30. package/dist/cdn/{BKDFIGQN.js → 4ZQSXXK2.js} +2 -2
  31. package/dist/cdn/{KC3COFFL.js → 53GOGPNG.js} +2 -2
  32. package/dist/cdn/{RLADC6ZH.js → 5BNQCACV.js} +1 -1
  33. package/dist/cdn/5DX6WVAZ.js +4 -0
  34. package/dist/cdn/{U5R65CBD.js → 5IFLAE53.js} +2 -2
  35. package/dist/cdn/{GOQMLFFQ.js → 5M2QMRJL.js} +2 -2
  36. package/dist/cdn/{GHWKVBNL.js → 5NEG6V7C.js} +2 -2
  37. package/dist/cdn/{KT322YWI.js → 5S2WCZEA.js} +2 -2
  38. package/dist/cdn/{KUU3H6DM.js → 5SD4GLV7.js} +1 -1
  39. package/dist/cdn/{TOVO7FLD.js → 5TVCMZSS.js} +1 -1
  40. package/dist/cdn/{EJP6XSNT.js → 5UGMN35T.js} +2 -2
  41. package/dist/cdn/{W43Q7E2D.js → 5XA5H7WP.js} +2 -2
  42. package/dist/cdn/{LDTZWJSI.js → 5Y6D7GAD.js} +2 -2
  43. package/dist/cdn/{2LENHCY2.js → 63Y6PNJA.js} +2 -2
  44. package/dist/cdn/{DOOGD72N.js → 6CE4YRSO.js} +2 -2
  45. package/dist/cdn/{QBUS2XC4.js → 6DQJ62GT.js} +2 -2
  46. package/dist/cdn/{DLCSMGPX.js → 6ECJVVSW.js} +2 -2
  47. package/dist/cdn/{2ER7UUJH.js → 6FXZTARY.js} +2 -2
  48. package/dist/cdn/{AKMP3RHE.js → 6M2YQHKL.js} +2 -2
  49. package/dist/cdn/{JXQHDGFE.js → 6O6N23MM.js} +2 -2
  50. package/dist/cdn/{4JWEF3A7.js → 6SXHSBLJ.js} +2 -2
  51. package/dist/cdn/{XVSV3RV7.js → 6XD3ZRKO.js} +2 -2
  52. package/dist/cdn/{TFF3C5WO.js → 6YYMH5PX.js} +2 -2
  53. package/dist/cdn/{U77QOKF7.js → 72MBRWK6.js} +2 -2
  54. package/dist/cdn/72RLVVSX.js +4 -0
  55. package/dist/cdn/74LUVNL4.js +4 -0
  56. package/dist/cdn/{NSAM3Z2I.js → 7ESB4BIX.js} +2 -2
  57. package/dist/cdn/{7W6EJX6E.js → 7JSNAR22.js} +2 -2
  58. package/dist/cdn/{33Q4FILP.js → 7KEV5EDQ.js} +2 -2
  59. package/dist/cdn/{EWRCYITS.js → 7P42WTQV.js} +1 -1
  60. package/dist/cdn/{DFEAJG43.js → 7ZDOFCTW.js} +2 -2
  61. package/dist/cdn/{SDSPTQ4P.js → A3NNJFSP.js} +1 -1
  62. package/dist/cdn/{AZJVG23H.js → A4PYZCF4.js} +2 -2
  63. package/dist/cdn/{MATQV33Q.js → AGX3RZG4.js} +2 -2
  64. package/dist/cdn/{P5MC5ZOS.js → ANAB56OE.js} +1 -1
  65. package/dist/cdn/{FDERPD3Z.js → AP6ZDTQD.js} +2 -2
  66. package/dist/cdn/{EYPYJLO3.js → APVSI2SZ.js} +2 -2
  67. package/dist/cdn/{UPSPO6Q6.js → AQKOJPHG.js} +2 -2
  68. package/dist/cdn/{F2E4GD3J.js → AR5WNEZQ.js} +2 -2
  69. package/dist/cdn/{CAFWZN3Q.js → B2NJWJEX.js} +2 -2
  70. package/dist/cdn/{RPOWI7AN.js → B4G4HG7G.js} +2 -2
  71. package/dist/cdn/{SOSUPZ6Z.js → BAXA4KPA.js} +2 -2
  72. package/dist/cdn/{53RDOENQ.js → BB7HSIAW.js} +2 -2
  73. package/dist/cdn/{MNYIDOED.js → BGDVCFC5.js} +2 -2
  74. package/dist/cdn/BHJ3FK5R.js +4 -0
  75. package/dist/cdn/{UPK4BCIL.js → BMP2GO3P.js} +2 -2
  76. package/dist/cdn/{BEG2TOQV.js → BN4PITTB.js} +2 -2
  77. package/dist/cdn/{RZQ5TYUK.js → BYSR45CB.js} +2 -2
  78. package/dist/cdn/{HQVBD5JD.js → BZIZPNUK.js} +2 -2
  79. package/dist/cdn/{G3BITZ2H.js → C3BQFXQF.js} +2 -2
  80. package/dist/cdn/{23FGLOT6.js → C6NBFMUN.js} +2 -2
  81. package/dist/cdn/{F57FN2B7.js → CDOBISBF.js} +3 -3
  82. package/dist/cdn/{C3VVC4C4.js → CDOFMMN2.js} +2 -2
  83. package/dist/cdn/{CZG4YI7M.js → CIYZ2AN4.js} +2 -2
  84. package/dist/cdn/{5QCLOSQV.js → CONGS255.js} +2 -2
  85. package/dist/cdn/{NQ6LZCAO.js → CQ6F4CMD.js} +2 -2
  86. package/dist/cdn/{KWEQV7YG.js → CQYVMXJQ.js} +2 -2
  87. package/dist/cdn/{VJ2NSIZG.js → CYFMM5FD.js} +2 -2
  88. package/dist/cdn/{YJPOFS37.js → CYYJ6NL6.js} +2 -2
  89. package/dist/cdn/{Y2YDWSQW.js → DLFTUS6N.js} +2 -2
  90. package/dist/cdn/DN2WILUJ.js +4 -0
  91. package/dist/cdn/{UXYHGXW5.js → DPIPFQHC.js} +2 -2
  92. package/dist/cdn/{HBU2D3OK.js → DPLAIA57.js} +2 -2
  93. package/dist/cdn/{6W4SZKHC.js → DTQRFAUA.js} +1 -1
  94. package/dist/cdn/{FIZY6G5H.js → DWTENLEP.js} +2 -2
  95. package/dist/cdn/{726Z6HOK.js → DXZTJZGT.js} +2 -2
  96. package/dist/cdn/{PLP4AUXD.js → E2A66IT7.js} +2 -2
  97. package/dist/cdn/{MRIG2YO3.js → E4XCFS73.js} +2 -2
  98. package/dist/cdn/{PSFFLNY5.js → E4ZK7PXW.js} +2 -2
  99. package/dist/cdn/{5VBN7ISR.js → E5LNNUQ4.js} +2 -2
  100. package/dist/cdn/EGU4CQRY.js +18 -0
  101. package/dist/cdn/{EEIXNMVO.js → EH6ZHRL2.js} +2 -2
  102. package/dist/cdn/{BKJHOEZU.js → EKSP7YLO.js} +2 -2
  103. package/dist/cdn/{PGHMWU3D.js → EQCPPTQ6.js} +2 -2
  104. package/dist/cdn/{EECYCFWL.js → ER2FWAYR.js} +2 -2
  105. package/dist/cdn/{YLSCZUU6.js → EUKVXDNG.js} +2 -2
  106. package/dist/cdn/{F7MGFTCQ.js → EV5XUWL7.js} +2 -2
  107. package/dist/cdn/{3N25OU3J.js → EVQFZAOY.js} +1 -1
  108. package/dist/cdn/{FCD4N3ZW.js → F4QK3JD4.js} +2 -2
  109. package/dist/cdn/F5NZOEPR.js +4 -0
  110. package/dist/cdn/{OUED4MLC.js → FIUWMVQQ.js} +2 -2
  111. package/dist/cdn/{H5MEOZDB.js → FIYQ7AVM.js} +1 -1
  112. package/dist/cdn/{IHF42XGT.js → FIZ4MXAR.js} +2 -2
  113. package/dist/cdn/{VISD52LT.js → FJ7MBYCT.js} +1 -1
  114. package/dist/cdn/{YPHUWWV7.js → FJTFQRL5.js} +2 -2
  115. package/dist/cdn/{PUXPSAVO.js → FREL7BD5.js} +2 -2
  116. package/dist/cdn/{MNMVQPBS.js → FSPSNGCT.js} +1 -1
  117. package/dist/cdn/{5IFWWA3H.js → FUZ33ABZ.js} +2 -2
  118. package/dist/cdn/{JCTPFMKF.js → FVDU6QYT.js} +2 -2
  119. package/dist/cdn/{U3LIFD6P.js → FW2LIJOW.js} +2 -2
  120. package/dist/cdn/{Q4O2Y3MB.js → G4KYQBYG.js} +2 -2
  121. package/dist/cdn/{F4ANZSV2.js → G57RFHLM.js} +1 -1
  122. package/dist/cdn/{JFZ6S5ZR.js → G7YTZWI3.js} +2 -2
  123. package/dist/cdn/{O24P4ZWY.js → GBSAWLN7.js} +2 -2
  124. package/dist/cdn/{3FJ2NMMC.js → GEQYI5LQ.js} +1 -1
  125. package/dist/cdn/{K7UPKLEM.js → GEZ43YJ3.js} +2 -2
  126. package/dist/cdn/{WXEDRX6B.js → GHHGZTF2.js} +1 -1
  127. package/dist/cdn/{5SSW7Y3K.js → GLMGQOCD.js} +2 -2
  128. package/dist/cdn/{GF5XRNMK.js → GNCDKWP7.js} +2 -2
  129. package/dist/cdn/{4ETO6FSU.js → GOHR2WBV.js} +2 -2
  130. package/dist/cdn/{Q7SWNS7T.js → GTQQFSR7.js} +2 -2
  131. package/dist/cdn/{47THXKD7.js → GUONN762.js} +2 -2
  132. package/dist/cdn/{PU2JEWLV.js → GURJXEVE.js} +2 -2
  133. package/dist/cdn/{EO22SHSN.js → GVUIEVOK.js} +2 -2
  134. package/dist/cdn/{NR2RWD3G.js → GW6YU6ST.js} +2 -2
  135. package/dist/cdn/{GP3PPM7C.js → GXRYK5M3.js} +2 -2
  136. package/dist/cdn/{EAPEHWA6.js → H5HNEV3N.js} +2 -2
  137. package/dist/cdn/{7LPAPZPU.js → HBVYVKPT.js} +2 -2
  138. package/dist/cdn/{54D2Q7JB.js → HD26QQR3.js} +20 -20
  139. package/dist/cdn/{TTYH46CZ.js → HI4EEQYA.js} +2 -2
  140. package/dist/cdn/{CFTWPEYJ.js → HISYT2BM.js} +2 -2
  141. package/dist/cdn/HRO2O5YA.js +4 -0
  142. package/dist/cdn/{I2OMO5AF.js → HSNKQLTD.js} +2 -2
  143. package/dist/cdn/{X36X6MUL.js → HYVQWVII.js} +1 -1
  144. package/dist/cdn/{ZHUJKDJZ.js → I2NF5AQL.js} +2 -2
  145. package/dist/cdn/{SBRY65ME.js → I4MPIKEW.js} +2 -2
  146. package/dist/cdn/{YUDVYFYK.js → I66BIXLD.js} +2 -2
  147. package/dist/cdn/{CJ55BFN4.js → I7FYKKZQ.js} +2 -2
  148. package/dist/cdn/{C2ZOVOPY.js → IA4DQPM2.js} +2 -2
  149. package/dist/cdn/{UJGZQYSB.js → IA6P4LLI.js} +2 -2
  150. package/dist/cdn/{UEWK7WEY.js → IBJ2NRSR.js} +2 -2
  151. package/dist/cdn/{XECAMJCZ.js → ICNTIMFT.js} +2 -2
  152. package/dist/cdn/{R5426IXX.js → IG7YJRSC.js} +2 -2
  153. package/dist/cdn/{3DIJDENJ.js → IKS56X7L.js} +2 -2
  154. package/dist/cdn/{PHLPHUZR.js → ILFJYMBN.js} +2 -2
  155. package/dist/cdn/{JHORWHA2.js → IOMYEAZ5.js} +2 -2
  156. package/dist/cdn/{UHACBH77.js → ISDRJ7X5.js} +2 -2
  157. package/dist/cdn/{LMD6RFKF.js → IUALFASY.js} +2 -2
  158. package/dist/cdn/{DQA76X3J.js → IXQX4XPD.js} +2 -2
  159. package/dist/cdn/J72BYK5B.js +4 -0
  160. package/dist/cdn/{4I5EVC4E.js → J7Q4KRMI.js} +2 -2
  161. package/dist/cdn/{WKXQ4CDC.js → JAIFS46U.js} +2 -2
  162. package/dist/cdn/JCTZWSLP.js +18 -0
  163. package/dist/cdn/{XQTX6OA2.js → JE475QOP.js} +2 -2
  164. package/dist/cdn/{FGVNYPS4.js → JGUMEH2C.js} +2 -2
  165. package/dist/cdn/{TV2IMW4B.js → JMDQYQ4K.js} +2 -2
  166. package/dist/cdn/{Q2OCZM23.js → JSIXRLNJ.js} +2 -2
  167. package/dist/cdn/{3MZHBNPF.js → JVSFJEUY.js} +2 -2
  168. package/dist/cdn/{BPI6FZ7H.js → JXOMNVZL.js} +2 -2
  169. package/dist/cdn/{HIUFTFCE.js → JZIHZER2.js} +2 -2
  170. package/dist/cdn/{APZG4DQ2.js → K3SBDFS5.js} +2 -2
  171. package/dist/cdn/{SVAPESHQ.js → K4SZKA6R.js} +2 -2
  172. package/dist/cdn/{VQG4I24V.js → K5HBJGDW.js} +2 -2
  173. package/dist/cdn/{3NXTQ2LG.js → K62D3BRE.js} +2 -2
  174. package/dist/cdn/{L3MDCUJN.js → K6NIWIL6.js} +2 -2
  175. package/dist/cdn/{2NT2F4WJ.js → KBWXAZ4H.js} +2 -2
  176. package/dist/cdn/{3YRAWZUZ.js → KGHT2XEI.js} +2 -2
  177. package/dist/cdn/{LL5S26MO.js → KIVPWFPC.js} +2 -2
  178. package/dist/cdn/{GKVHUWB4.js → KJNCDHLD.js} +2 -2
  179. package/dist/cdn/{OCFKULCG.js → KKQN5HZN.js} +2 -2
  180. package/dist/cdn/KMHUVZZI.js +18 -0
  181. package/dist/cdn/{IQSX2PS2.js → KMKNTBIH.js} +2 -2
  182. package/dist/cdn/{S5H7SXZP.js → KPEDGFTA.js} +2 -2
  183. package/dist/cdn/{6WG5PP6R.js → KZMYX67M.js} +2 -2
  184. package/dist/cdn/{GWNEUXVW.js → L5MQY34Z.js} +2 -2
  185. package/dist/cdn/{ZRKJZ3NG.js → L6TIHRIP.js} +2 -2
  186. package/dist/cdn/{PGVJ7TAF.js → LASDKRI4.js} +2 -2
  187. package/dist/cdn/{WLTXVG73.js → LJ43GGEC.js} +2 -2
  188. package/dist/cdn/{AS7FG6KA.js → LKSAOR3Q.js} +2 -2
  189. package/dist/cdn/{KEVGCYOD.js → LM4EBPP6.js} +2 -2
  190. package/dist/cdn/LO44SNEK.js +4 -0
  191. package/dist/cdn/{TSVPTY5X.js → LSSZKYSS.js} +2 -2
  192. package/dist/cdn/{XELDZ5WC.js → LUQ4WLNW.js} +2 -2
  193. package/dist/cdn/{XUAUP5UD.js → LZEOQZID.js} +2 -2
  194. package/dist/cdn/{3JM3B4OX.js → M4FQFEFR.js} +2 -2
  195. package/dist/cdn/{CNIGVYFK.js → M7M2CGEJ.js} +2 -2
  196. package/dist/cdn/{MRKA2VZW.js → M7NFV3CM.js} +2 -2
  197. package/dist/cdn/{KSNTFOGZ.js → MDHPRL5E.js} +1 -1
  198. package/dist/cdn/{IKVHXZ3U.js → MGCF2UNQ.js} +2 -2
  199. package/dist/cdn/MKFL7RJ7.js +4 -0
  200. package/dist/cdn/{CN56TZC4.js → MKGO4FB3.js} +1 -1
  201. package/dist/cdn/MOLY4YNP.js +4 -0
  202. package/dist/cdn/{D73JDJX5.js → MPVYH7ZS.js} +2 -2
  203. package/dist/cdn/{TY3Z22SJ.js → MRGELRV4.js} +3 -3
  204. package/dist/cdn/{OC34KPAE.js → MVF3OTGI.js} +2 -2
  205. package/dist/cdn/{IJMX3WHX.js → N33O2BIB.js} +1 -1
  206. package/dist/cdn/{H3YODQR5.js → N3KRZFHG.js} +2 -2
  207. package/dist/cdn/{JGHG6FT3.js → N6GNJA45.js} +2 -2
  208. package/dist/cdn/{6UZSVHNV.js → NAEBOEYF.js} +1 -1
  209. package/dist/cdn/{VKDCA5UF.js → NAZ5XBGE.js} +2 -2
  210. package/dist/cdn/{ISNPPNRQ.js → NC56FO2U.js} +2 -2
  211. package/dist/cdn/{M5HWGCGL.js → NDP7NBM5.js} +2 -2
  212. package/dist/cdn/{7PAF7CNO.js → NELITFII.js} +2 -2
  213. package/dist/cdn/{IOTPW2AJ.js → NEOMIFQL.js} +1 -1
  214. package/dist/cdn/{SUDJ3QJQ.js → NI4UN53N.js} +2 -2
  215. package/dist/cdn/{HK67EOND.js → NKYMARCE.js} +2 -2
  216. package/dist/cdn/{B3R6WK5M.js → NSPCTDM2.js} +2 -2
  217. package/dist/cdn/{4HYUCEEW.js → NUZ3X3TY.js} +3 -3
  218. package/dist/cdn/{LZKNYSNH.js → NXULBGLI.js} +2 -2
  219. package/dist/cdn/{OZDXDKIE.js → O3JRO5FX.js} +2 -2
  220. package/dist/cdn/{FY4NHLO7.js → OD3D7QYW.js} +2 -2
  221. package/dist/cdn/{IRTZHNJ2.js → OJEB2OUL.js} +3 -3
  222. package/dist/cdn/{PZM2KMF5.js → OKT4Y73O.js} +1 -1
  223. package/dist/cdn/{6EDB6GK3.js → OSXEN5JP.js} +1 -1
  224. package/dist/cdn/{ILXA7GQX.js → P2WGO4LL.js} +2 -2
  225. package/dist/cdn/{SL2KLULR.js → P4LHHV2L.js} +2 -2
  226. package/dist/cdn/{GBVCSYHJ.js → P624LHBW.js} +2 -2
  227. package/dist/cdn/{WDABZAMD.js → PDMV5IT4.js} +2 -2
  228. package/dist/cdn/{U7KZK2EY.js → PFR23FJ6.js} +2 -2
  229. package/dist/cdn/{XG3IGQNL.js → PHCA5N7C.js} +2 -2
  230. package/dist/cdn/{PF3SMK6J.js → PJ6KNZ6S.js} +2 -2
  231. package/dist/cdn/{OTD7G2LZ.js → PJLPIBTV.js} +2 -2
  232. package/dist/cdn/{RGWPFZBE.js → PL2C3G4A.js} +2 -2
  233. package/dist/cdn/{RJTIJXKK.js → PLFFKHEM.js} +2 -2
  234. package/dist/cdn/{46X2JXUZ.js → PM2UKFMR.js} +1 -1
  235. package/dist/cdn/{VOGT362X.js → PRRKNEDA.js} +2 -2
  236. package/dist/cdn/{UY3VZJPX.js → PTGWJCD4.js} +1 -1
  237. package/dist/cdn/{ZG5QDNEY.js → PUW47NDX.js} +2 -2
  238. package/dist/cdn/{2M6JD42W.js → PVA2IKH3.js} +2 -2
  239. package/dist/cdn/{4XK3CYJA.js → PWFBJW3E.js} +2 -2
  240. package/dist/cdn/{OQN43J5V.js → Q3PHBE3I.js} +2 -2
  241. package/dist/cdn/{KNXO4SHH.js → QBO4NBIH.js} +2 -2
  242. package/dist/cdn/{YJ7ARJVK.js → QDZFT6XX.js} +2 -2
  243. package/dist/cdn/{KPBDPVOH.js → QGEWNXUV.js} +2 -2
  244. package/dist/cdn/{5V5ZHMSG.js → QJSSZFXP.js} +2 -2
  245. package/dist/cdn/{SCD4O3HR.js → QNWIK3CL.js} +2 -2
  246. package/dist/cdn/{ZIAMK572.js → QOYBKS3B.js} +2 -2
  247. package/dist/cdn/{7R3HFPO5.js → QWXW2AN3.js} +2 -2
  248. package/dist/cdn/{WASE4EMU.js → QX3WCFMI.js} +2 -2
  249. package/dist/cdn/{OC6XS4V3.js → R5UDEZYK.js} +2 -2
  250. package/dist/cdn/{6EPLFGYN.js → R7KYO5ZG.js} +2 -2
  251. package/dist/cdn/{GIN3MYSZ.js → RBRNL7SB.js} +2 -2
  252. package/dist/cdn/{EBGWAP5Z.js → RCCXKNQ4.js} +2 -2
  253. package/dist/cdn/{XU7REEAW.js → REVZPMUQ.js} +2 -2
  254. package/dist/cdn/{7A2PBJ4H.js → RGRJX7VL.js} +2 -2
  255. package/dist/cdn/{YWFST23Y.js → RIPIPE2H.js} +2 -2
  256. package/dist/cdn/{YADRL4DR.js → RKQ7SMUL.js} +2 -2
  257. package/dist/cdn/{JH6DHGLR.js → RMEHXLBL.js} +2 -2
  258. package/dist/cdn/{RW7ZM26C.js → RTVUTDYU.js} +2 -2
  259. package/dist/cdn/{AAXE4NNV.js → SDCYJLL6.js} +2 -2
  260. package/dist/cdn/{LBWCS2F2.js → SGIH2ISG.js} +2 -2
  261. package/dist/cdn/{CJDJS6PW.js → SI5WT33D.js} +2 -2
  262. package/dist/cdn/{2HPBUJHT.js → SIXQTLOX.js} +2 -2
  263. package/dist/cdn/SJYRSHGU.js +4 -0
  264. package/dist/cdn/{NARMCTDX.js → SLIJNZF2.js} +2 -2
  265. package/dist/cdn/SNCHHDKU.js +4 -0
  266. package/dist/cdn/{LBVSC6V5.js → SOHBYYBW.js} +1 -1
  267. package/dist/cdn/{E3SSTVN6.js → SSPNUWJG.js} +2 -2
  268. package/dist/cdn/{QRMHDSPG.js → STRJM3V4.js} +2 -2
  269. package/dist/cdn/{JLPE7SCU.js → SUNKHACZ.js} +2 -2
  270. package/dist/cdn/SW2P7VRT.js +4 -0
  271. package/dist/cdn/{47BDB4P2.js → T5C25ZMO.js} +2 -2
  272. package/dist/cdn/{UJWRBULT.js → T5JH5TJ3.js} +2 -2
  273. package/dist/cdn/{5WJ6ZL2F.js → T7DEXXTT.js} +2 -2
  274. package/dist/cdn/{JQKSXJYV.js → TA2RACYZ.js} +2 -2
  275. package/dist/cdn/{66IIONNC.js → TBUT4K52.js} +2 -2
  276. package/dist/cdn/{IWI73FFP.js → TDLHGHAT.js} +2 -2
  277. package/dist/cdn/{MPODIKYY.js → TENPACT4.js} +1 -1
  278. package/dist/cdn/{HFRR75VA.js → THCQ6NVA.js} +2 -2
  279. package/dist/cdn/{XIS3BUIS.js → TKLY3JHO.js} +2 -2
  280. package/dist/cdn/{RYI242BN.js → TKTQN74R.js} +2 -2
  281. package/dist/cdn/{YJQC45UC.js → TPBFTLWD.js} +2 -2
  282. package/dist/cdn/{GOLYOFYE.js → TPKKVCOQ.js} +2 -2
  283. package/dist/cdn/{B4CMZXG3.js → TPYSHDIM.js} +2 -2
  284. package/dist/cdn/{SMCQMEMR.js → TSADEK2J.js} +2 -2
  285. package/dist/cdn/{D4GTHJLZ.js → TVUJAFGV.js} +2 -2
  286. package/dist/cdn/{MKMGVPCZ.js → TWK424K2.js} +2 -2
  287. package/dist/cdn/{MV6XNLAM.js → UECAUOPR.js} +2 -2
  288. package/dist/cdn/UHIV6FPP.js +4 -0
  289. package/dist/cdn/{XY7KPZMX.js → UHNQFO36.js} +2 -2
  290. package/dist/cdn/{ONDXGQGY.js → UJ2AWWAN.js} +2 -2
  291. package/dist/cdn/{WKMFPSQW.js → UOQ3FCNP.js} +2 -2
  292. package/dist/cdn/{KRUY7SP2.js → UQ2IVIDC.js} +2 -2
  293. package/dist/cdn/{YPX4SI53.js → URNR4MX5.js} +1 -1
  294. package/dist/cdn/{2SG2PXGL.js → UVQ562IF.js} +2 -2
  295. package/dist/cdn/{USIRKXKZ.js → UXZ6E3YI.js} +1 -1
  296. package/dist/cdn/{Y7K6LQIN.js → V3NAW6GR.js} +2 -2
  297. package/dist/cdn/{ASXBKBK2.js → V4RJF5IE.js} +2 -2
  298. package/dist/cdn/{Y6CYPHR2.js → VEGWRELS.js} +2 -2
  299. package/dist/cdn/{WQRHTLJO.js → VLJFRLND.js} +2 -2
  300. package/dist/cdn/{QTMY6775.js → VMG4O43V.js} +2 -2
  301. package/dist/cdn/{M5WBP3MF.js → VTHVAWU2.js} +2 -2
  302. package/dist/cdn/{GT2JLUV4.js → WI2CLU5D.js} +2 -2
  303. package/dist/cdn/{NZ2UFQWL.js → WIB5D523.js} +2 -2
  304. package/dist/cdn/WIKGMFQB.js +4 -0
  305. package/dist/cdn/{UJ6PB446.js → WMTY2QON.js} +4 -4
  306. package/dist/cdn/{MQVB3EYO.js → WOIOCP7E.js} +2 -2
  307. package/dist/cdn/{BKCHP3B5.js → WPI5SW6Q.js} +2 -2
  308. package/dist/cdn/{O5EUNI6K.js → WQS2ODC4.js} +1 -1
  309. package/dist/cdn/{LWS5H7PA.js → WSG3X4W7.js} +2 -2
  310. package/dist/cdn/{E4DP6L26.js → WSPGBA5V.js} +2 -2
  311. package/dist/cdn/{QW6SMLEJ.js → WVD743FV.js} +1 -1
  312. package/dist/cdn/{K75CGTHV.js → WWUEVP3G.js} +2 -2
  313. package/dist/cdn/WYGC7ZWZ.js +4 -0
  314. package/dist/cdn/{U7254QFF.js → WZDGYMAK.js} +2 -2
  315. package/dist/cdn/{3L7BNK46.js → X4PRZYID.js} +2 -2
  316. package/dist/cdn/{FPO2DWSK.js → XAEGXLNW.js} +2 -2
  317. package/dist/cdn/{OB2XVGF2.js → XAYDYTK3.js} +2 -2
  318. package/dist/cdn/{CLQS3XZJ.js → XDAOOCEG.js} +2 -2
  319. package/dist/cdn/{QZ7Q5VPY.js → XGIL5KIH.js} +1 -1
  320. package/dist/cdn/{NL3VLVHN.js → XLGAWE5C.js} +2 -2
  321. package/dist/cdn/{DYGURLI3.js → XMVLPCMO.js} +2 -2
  322. package/dist/cdn/{LPOXKLZD.js → XNZSJ7ZH.js} +2 -2
  323. package/dist/cdn/{VE5735VO.js → XOBJ2UJL.js} +2 -2
  324. package/dist/cdn/{I762EBNV.js → XPW2JHBD.js} +2 -2
  325. package/dist/cdn/{RXNWGOXC.js → XQJZEMYH.js} +2 -2
  326. package/dist/cdn/{HQYGQQAN.js → XQQMJQSG.js} +2 -2
  327. package/dist/cdn/{QAVV5U2X.js → XSKJGWBR.js} +2 -2
  328. package/dist/cdn/{P6MMMMO7.js → XT472227.js} +2 -2
  329. package/dist/cdn/{BCESZOJS.js → XTBSIMMN.js} +2 -2
  330. package/dist/cdn/{OYAG7QQN.js → XYSG7JPV.js} +1 -1
  331. package/dist/cdn/{YFLTGUED.js → YA4XILWS.js} +2 -2
  332. package/dist/cdn/{XE7CWWZX.js → YAGATS6J.js} +2 -2
  333. package/dist/cdn/{66NEFBOE.js → YAX3KOMD.js} +1 -1
  334. package/dist/cdn/{GG2UJSZY.js → YF5KQ6I7.js} +2 -2
  335. package/dist/cdn/{CJ2LQ2KZ.js → YGWIZXL6.js} +2 -2
  336. package/dist/cdn/{BKZWROLB.js → YIAF3YJA.js} +2 -2
  337. package/dist/cdn/{QC6TPXOS.js → YJRF44L6.js} +2 -2
  338. package/dist/cdn/{RAGS7E4J.js → YKF6Z6IG.js} +2 -2
  339. package/dist/cdn/YNHPEGMO.js +4 -0
  340. package/dist/cdn/{ZE3S7KFP.js → YTAA5GHS.js} +1 -1
  341. package/dist/cdn/{TSYM7JGM.js → YTZDATT6.js} +2 -2
  342. package/dist/cdn/{OW44CMT4.js → YY2GZYFM.js} +2 -2
  343. package/dist/cdn/YZ55MUBG.js +4 -0
  344. package/dist/cdn/{JIP3YG24.js → YZR4IOOG.js} +2 -2
  345. package/dist/cdn/{H6O2K3QN.js → Z43YJGZV.js} +2 -2
  346. package/dist/cdn/{3YO3ZWJZ.js → Z6SHSJSK.js} +2 -2
  347. package/dist/cdn/{UI44CDNQ.js → ZE2JTU52.js} +2 -2
  348. package/dist/cdn/{PHOLF6NG.js → ZHNZL6MM.js} +2 -2
  349. package/dist/cdn/{4JD2T6JR.js → ZPJJ3H5I.js} +1 -1
  350. package/dist/cdn/{Z2YE22PL.js → ZRIYWZA2.js} +2 -2
  351. package/dist/cdn/{M3MNKMIM.js → ZVAI3FZ3.js} +1 -1
  352. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.en.json +1 -1
  353. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.json +1 -1
  354. package/dist/cdn/index.js +2 -2
  355. package/dist/chunks/Auth.js +18 -15
  356. package/dist/chunks/appConfig.js +1 -1
  357. package/dist/chunks/cardFetchingUtils.js +307 -26
  358. package/dist/chunks/cardsHelpers.js +1 -1
  359. package/dist/chunks/common.js +3 -3
  360. package/dist/chunks/deployAppContexts.js +1 -1
  361. package/dist/chunks/downloadUtils.js +1 -1
  362. package/dist/chunks/getItemIcon.js +1 -1
  363. package/dist/chunks/helpers.js +5 -5
  364. package/dist/chunks/interfaces.js +1 -1
  365. package/dist/chunks/mapViewUtils.js +1 -1
  366. package/dist/chunks/pciUtils.js +1 -1
  367. package/dist/chunks/popupUtils.js +1 -1
  368. package/dist/chunks/privilegeUtils.js +1 -1
  369. package/dist/chunks/publicNotificationContext.js +1 -1
  370. package/dist/chunks/queryUtils.js +1 -1
  371. package/dist/chunks/runtime.js +1 -1
  372. package/dist/chunks/solution-deployed-card.js +1 -1
  373. package/dist/chunks/solution-store.js +1 -1
  374. package/dist/chunks/templates.js +1 -1
  375. package/dist/chunks/useT9n.js +1 -1
  376. package/dist/components/arcgis-solutions-assistant/customElement.d.ts +6 -0
  377. package/dist/components/arcgis-solutions-assistant/customElement.js +40 -36
  378. package/dist/components/buffer-tools/customElement.js +1 -1
  379. package/dist/components/card-manager/customElement.js +1 -1
  380. package/dist/components/consent-manager/customElement.js +1 -1
  381. package/dist/components/create-feature/customElement.js +1 -1
  382. package/dist/components/create-related-feature/customElement.js +1 -1
  383. package/dist/components/crowdsource-manager/customElement.js +1 -1
  384. package/dist/components/crowdsource-reporter/customElement.js +1 -1
  385. package/dist/components/deduct-calculator/customElement.js +1 -1
  386. package/dist/components/delete-button/customElement.js +1 -1
  387. package/dist/components/delete-dialog/customElement.js +1 -1
  388. package/dist/components/edit-card/customElement.js +1 -1
  389. package/dist/components/feature-details/customElement.js +1 -1
  390. package/dist/components/feature-list/customElement.js +1 -1
  391. package/dist/components/field-selection/customElement.js +1 -1
  392. package/dist/components/info-card/customElement.js +1 -1
  393. package/dist/components/json-editor/customElement.js +1 -1
  394. package/dist/components/layer-list/customElement.js +1 -1
  395. package/dist/components/layer-table/customElement.js +1 -1
  396. package/dist/components/map-basemap-gallery/customElement.js +1 -1
  397. package/dist/components/map-card/customElement.js +1 -1
  398. package/dist/components/map-draw-tools/customElement.js +1 -1
  399. package/dist/components/map-floor-filter/customElement.js +1 -1
  400. package/dist/components/map-fullscreen/customElement.js +1 -1
  401. package/dist/components/map-layer-picker/customElement.js +1 -1
  402. package/dist/components/map-legend/customElement.js +1 -1
  403. package/dist/components/map-picker/customElement.js +1 -1
  404. package/dist/components/map-search/customElement.js +1 -1
  405. package/dist/components/map-select-tools/customElement.js +1 -1
  406. package/dist/components/map-tools/customElement.js +1 -1
  407. package/dist/components/pci-calculator/customElement.js +1 -1
  408. package/dist/components/pdf-download/customElement.js +1 -1
  409. package/dist/components/public-notification/customElement.js +1 -1
  410. package/dist/components/refine-selection/customElement.js +1 -1
  411. package/dist/components/selection-tool/customElement.js +1 -1
  412. package/dist/components/solution-configuration/customElement.js +1 -1
  413. package/dist/components/solution-configure-titles/customElement.js +37 -36
  414. package/dist/components/solution-contents/customElement.js +1 -1
  415. package/dist/components/solution-delete-dialog/customElement.js +1 -1
  416. package/dist/components/solution-deploy-dialog/customElement.js +1 -1
  417. package/dist/components/solution-deployed-card/customElement.js +1 -1
  418. package/dist/components/solution-deployed-card-panel/customElement.js +1 -1
  419. package/dist/components/solution-deploying-dialog/customElement.js +1 -1
  420. package/dist/components/solution-details-card/customElement.js +1 -1
  421. package/dist/components/solution-details-panel/customElement.js +14 -18
  422. package/dist/components/solution-item/customElement.js +1 -1
  423. package/dist/components/solution-item-accordion/customElement.js +1 -1
  424. package/dist/components/solution-item-details/customElement.js +1 -1
  425. package/dist/components/solution-item-diagram/customElement.js +1 -1
  426. package/dist/components/solution-item-icon/customElement.js +1 -1
  427. package/dist/components/solution-item-sharing/customElement.js +1 -1
  428. package/dist/components/solution-organization-variables/customElement.js +1 -1
  429. package/dist/components/solution-resource-card/customElement.js +1 -1
  430. package/dist/components/solution-resource-item/customElement.js +1 -1
  431. package/dist/components/solution-snapshot-gallery/customElement.js +1 -1
  432. package/dist/components/solution-social-share/customElement.js +1 -1
  433. package/dist/components/solution-spatial-ref/customElement.js +1 -1
  434. package/dist/components/solution-template-data/customElement.js +1 -1
  435. package/dist/components/solution-variables/customElement.js +1 -1
  436. package/dist/components/solutions-all-panel/customElement.js +5 -6
  437. package/dist/components/solutions-all-shell/customElement.js +1 -1
  438. package/dist/components/solutions-deploy-app/customElement.d.ts +9 -0
  439. package/dist/components/solutions-deploy-app/customElement.js +36 -28
  440. package/dist/components/solutions-deploy-app-nav/customElement.js +1 -1
  441. package/dist/components/solutions-deployed-filter-panel/customElement.js +1 -1
  442. package/dist/components/solutions-deployed-panel/customElement.js +9 -10
  443. package/dist/components/solutions-deployed-shell/customElement.js +1 -1
  444. package/dist/components/solutions-filter-panel/customElement.js +2 -2
  445. package/dist/components/solutions-resource-panel/customElement.js +1 -1
  446. package/dist/components/solutions-resources/customElement.js +1 -1
  447. package/dist/components/solutions-resources-shell/customElement.js +1 -1
  448. package/dist/components/solutions-searchsort-toolbar/customElement.js +1 -1
  449. package/dist/components/spatial-ref/customElement.js +1 -1
  450. package/dist/components/store-manager/customElement.js +1 -1
  451. package/dist/docs/api.json +122 -2
  452. package/dist/docs/docs.json +85 -3
  453. package/dist/docs/vscode.html-custom-data.json +32 -1
  454. package/dist/docs/web-types.json +50 -4
  455. package/dist/index.js +1 -1
  456. package/dist/loader.js +3 -3
  457. package/dist/types/lumina.d.ts +2 -2
  458. package/dist/types/preact.d.ts +2 -2
  459. package/dist/types/preact10.d.ts +2 -2
  460. package/dist/types/react.d.ts +2 -2
  461. package/dist/types/stencil.d.ts +2 -2
  462. package/dist/utils/Auth.d.ts +3 -1
  463. package/package.json +1 -1
  464. package/dist/cdn/2VKMKYL6.js +0 -18
  465. package/dist/cdn/57J42JUN.js +0 -4
  466. package/dist/cdn/5A26Z5P3.js +0 -4
  467. package/dist/cdn/5OZR325I.js +0 -4
  468. package/dist/cdn/65WJMWR3.js +0 -4
  469. package/dist/cdn/6KJSUNIO.js +0 -4
  470. package/dist/cdn/7HTC5YEL.js +0 -4
  471. package/dist/cdn/A7OPEKUN.js +0 -4
  472. package/dist/cdn/AG3TIL56.js +0 -4
  473. package/dist/cdn/DKCAZENN.js +0 -4
  474. package/dist/cdn/FTKOEAFC.js +0 -4
  475. package/dist/cdn/HZ3LIX7G.js +0 -4
  476. package/dist/cdn/J7LK2CL5.js +0 -18
  477. package/dist/cdn/JDN2ZHDI.js +0 -4
  478. package/dist/cdn/LC4GTXHD.js +0 -4
  479. package/dist/cdn/LSXCQZSF.js +0 -4
  480. package/dist/cdn/LZQ63MH5.js +0 -4
  481. package/dist/cdn/NXRGD3NX.js +0 -18
  482. package/dist/cdn/QXICXAYA.js +0 -4
  483. package/dist/cdn/RVEEZ7ZT.js +0 -4
  484. package/dist/cdn/SKN6RBMC.js +0 -4
  485. package/dist/cdn/SNZW2GSZ.js +0 -4
  486. package/dist/cdn/TNKW7I2F.js +0 -4
  487. package/dist/cdn/YVBCISOO.js +0 -4
  488. package/dist/cdn/YXI7DFWF.js +0 -4
  489. package/dist/chunks/CardsFetcher.js +0 -288
@@ -1,12 +1,12 @@
1
1
  /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
2
  See https://js.arcgis.com/1.2/esri/copyright.txt for details.
3
- v1.2.0-next.35 */
4
- import{a as he}from"./GT2JLUV4.js";import"./MKMGVPCZ.js";import"./R5426IXX.js";import{b as ce}from"./WDABZAMD.js";import{E as O,F as ae,H as oe,J as le,h as ie,i as b,m as S,p as re}from"./KSNTFOGZ.js";import"./6UZSVHNV.js";var Ae=ie`:host{display:block;height:100%}.display-flex-row{display:flex;flex-direction:row}.padding-left-10{padding-left:10px}.chat-container{display:flex;flex-direction:column;gap:0px;max-width:600px;height:75%;background-color:var(--calcite-color-foreground-3);padding:1px}.chat-container_expanded{display:flex;flex-direction:column;gap:0px;max-width:100%;height:95%;background-color:var(--calcite-color-background);border-radius:10px;padding:10px}.chat-panel{--calcite-dialog-header-background-color: var(--calcite-color-brand);--calcite-dialog-header-action-background-color: var(--calcite-color-brand);--calcite-dialog-heading-text-color: var(--calcite-color-background);--calcite-dialog-header-action-background-color-hover: var(--calcite-color-brand);--calcite-dialog-header-action-text-color: var(--calcite-color-background);--calcite-dialog-min-size-y: 90vh;--calcite-dialog-max-size-y: 90vh}.chat-panel-heading{font-size:var(--calcite-font-size-0);font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-background, var(--calcite-color-text-1))}.chat-messages{display:flex;flex-direction:column;gap:20px;padding:4px;height:100%;overflow-y:auto}.user-message{align-self:flex-end;background:var(--calcite-ui-brand);border-radius:8px;max-width:90%;--calcite-card-corner-radius: 8px;--calcite-card-background-color: var(--calcite-color-brand);--calcite-card-border-color: var(--calcite-color-brand);color:var(--calcite-color-background);text-align:left}.system-message{align-self:flex-start;background:var(--calcite-color-foreground-2);border-radius:8px;max-width:90%;--calcite-card-corner-radius: 8px;--calcite-card-background-color: var(--calcite-color-foreground-3);--calcite-card-border-color: var(--calcite-color-foreground-3);text-align:left}.loader-message{align-self:flex-start;background:var(--calcite-color-foreground-3);border-radius:8px;--calcite-card-corner-radius: 8px;--calcite-card-background-color: var(--calcite-color-foreground-3);--calcite-card-border-color: var(--calcite-color-foreground-3)}.message-content{padding:0;font-size:14px}.message-content p:first-child{margin-top:0}.message-content img{max-width:100%;height:auto;display:block;object-fit:contain}.message-content-pad{padding-bottom:10px;font-size:14px}.message-content-summary{padding-bottom:14px}.message-content-alignment{display:flex;align-items:center;gap:var(--calcite-spacing-md);font-size:var(--calcite-font-size--1);color:var(--calcite-color-text-1)}.padding-top-10{padding-top:10px}.padding-right-8{padding-right:8px}.chip-content{padding:5px 5px 5px 0}.chat-input{display:flex;flex-direction:row;flex-grow:1}.table-cell{--calcite-table-cell-background: var(--calcite-color-foreground-3)}.cursor-pointer{cursor:pointer}.notice-border-color{--temp-initial-brand: var(--calcite-color-brand)}.notice-border-color calcite-notice{--calcite-color-brand: #ddd;--calcite-icon-color: var(--temp-initial-brand)}.notice-border-color calcite-notice *{--calcite-color-brand: var(--temp-initial-brand)}.solution-card{padding:5px 0;text-decoration:none;display:block;width:100%;cursor:pointer}.solution-card calcite-card{display:flex;flex-direction:column;max-width:520px;overflow:hidden;--calcite-card-corner-radius: var(--calcite-corner-radius-round) !important;--calcite-card-shadow: var(--calcite-shadow-sm);--calcite-card-background-color: var(--calcite-card-background-color) }.solution-card div[slot=thumbnail]{max-height:100%;width:100%;position:relative;&:after{content:"";position:absolute;top:0;left:0;width:100%;height:100%;transition:all .15s ease-in-out}}.solution-card div[slot=thumbnail] img{max-height:100%;width:100%;object-fit:cover}.solution-card span[slot=description]{padding-top:10px}.solution-card calcite-chip{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);visibility:hidden;pointer-events:none;opacity:0;transition:all .15s ease-in-out;z-index:9999}.solution-card:hover calcite-chip{visibility:visible;opacity:1}.solution-card:hover div[slot=thumbnail]:after{background-color:#00000080}.solution-card:hover h3{text-decoration:underline}.references-container{padding-top:10px;display:block}.references-container.collapsed{display:none}.width-100{width:100%}.disclaimer-div{display:flex;gap:var(--calcite-spacing-sm);font-size:var(--calcite-font-size--0);color:var(--calcite-color-text-1)}.height-32-flex-auto{height:32px;flex:0 0 auto}.display-none{display:none}.chat-messages calcite-fab{position:absolute;bottom:16px;left:50%;transform:translate(-50%);z-index:999}.icon-color-background{--calcite-button-icon-color: var(--calcite-color-background)}@media(max-width:430px){.solution-card .solution-snippet{display:none}}`;var Ie="https://www.arcgis.com/sharing/rest/content/items/";async function ze(n){return await Ce(n)}async function Ce(n){let e=Ie+n+"?f=json";try{let t=await fetch(e,{method:"GET"});if(!t.ok)throw new Error(`HTTP error! Status: ${t.status}`);return await t.json()}catch(t){return{error:t.message}}}function X(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var T=X();function xe(n){T=n}var L={exec:()=>null};function u(n,e=""){let t=typeof n=="string"?n:n.source,i={replace:(s,a)=>{let r=typeof a=="string"?a:a.source;return r=r.replace(m.caret,"$1"),t=t.replace(s,r),i},getRegex:()=>new RegExp(t,e)};return i}var Le=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),m={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:n=>new RegExp(`^( {0,3}${n})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:n=>new RegExp(`^ {0,${Math.min(3,n-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:n=>new RegExp(`^ {0,${Math.min(3,n-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:n=>new RegExp(`^ {0,${Math.min(3,n-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:n=>new RegExp(`^ {0,${Math.min(3,n-1)}}#`),htmlBeginRegex:n=>new RegExp(`^ {0,${Math.min(3,n-1)}}<(?:[a-z].*>|!--)`,"i")},qe=/^(?:[ \t]*(?:\n|$))+/,Ee=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Be=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,q=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Pe=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,J=/(?:[*+-]|\d{1,9}[.)])/,be=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,me=u(be).replace(/bull/g,J).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Me=u(be).replace(/bull/g,J).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),K=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Qe=/^[^\n]+/,V=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,De=u(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",V).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Ze=u(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,J).getRegex(),D="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Y=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Ne=u("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Y).replace("tag",D).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),we=u(K).replace("hr",q).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",D).getRegex(),Fe=u(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",we).getRegex(),ee={blockquote:Fe,code:Ee,def:De,fences:Be,heading:Pe,hr:q,html:Ne,lheading:me,list:Ze,newline:qe,paragraph:we,table:L,text:Qe},pe=u("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",q).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",D).getRegex(),Oe={...ee,lheading:Me,table:pe,paragraph:u(K).replace("hr",q).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",pe).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",D).getRegex()},je={...ee,html:u(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Y).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:L,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:u(K).replace("hr",q).replace("heading",` *#{1,6} *[^
5
- ]`).replace("lheading",me).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},He=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Ue=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,_e=/^( {2,}|\\)\n(?!\s*$)/,Ge=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Z=/[\p{P}\p{S}]/u,te=/[\s\p{P}\p{S}]/u,ye=/[^\s\p{P}\p{S}]/u,We=u(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,te).getRegex(),ve=/(?!~)[\p{P}\p{S}]/u,Xe=/(?!~)[\s\p{P}\p{S}]/u,Je=/(?:[^\s\p{P}\p{S}]|~)/u,Ke=u(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Le?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Se=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,Ve=u(Se,"u").replace(/punct/g,Z).getRegex(),Ye=u(Se,"u").replace(/punct/g,ve).getRegex(),$e="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",et=u($e,"gu").replace(/notPunctSpace/g,ye).replace(/punctSpace/g,te).replace(/punct/g,Z).getRegex(),tt=u($e,"gu").replace(/notPunctSpace/g,Je).replace(/punctSpace/g,Xe).replace(/punct/g,ve).getRegex(),st=u("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,ye).replace(/punctSpace/g,te).replace(/punct/g,Z).getRegex(),nt=u(/\\(punct)/,"gu").replace(/punct/g,Z).getRegex(),it=u(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),rt=u(Y).replace("(?:-->|$)","-->").getRegex(),at=u("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",rt).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),P=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,ot=u(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",P).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Te=u(/^!?\[(label)\]\[(ref)\]/).replace("label",P).replace("ref",V).getRegex(),Re=u(/^!?\[(ref)\](?:\[\])?/).replace("ref",V).getRegex(),lt=u("reflink|nolink(?!\\()","g").replace("reflink",Te).replace("nolink",Re).getRegex(),ue=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,se={_backpedal:L,anyPunctuation:nt,autolink:it,blockSkip:Ke,br:_e,code:Ue,del:L,emStrongLDelim:Ve,emStrongRDelimAst:et,emStrongRDelimUnd:st,escape:He,link:ot,nolink:Re,punctuation:We,reflink:Te,reflinkSearch:lt,tag:at,text:Ge,url:L},ct={...se,link:u(/^!?\[(label)\]\((.*?)\)/).replace("label",P).getRegex(),reflink:u(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",P).getRegex()},j={...se,emStrongRDelimAst:tt,emStrongLDelim:Ye,url:u(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",ue).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:u(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",ue).getRegex()},ht={...j,br:u(_e).replace("{2,}","*").getRegex(),text:u(j.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},B={normal:ee,gfm:Oe,pedantic:je},I={normal:se,gfm:j,breaks:ht,pedantic:ct},pt={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},de=n=>pt[n];function v(n,e){if(e){if(m.escapeTest.test(n))return n.replace(m.escapeReplace,de)}else if(m.escapeTestNoEncode.test(n))return n.replace(m.escapeReplaceNoEncode,de);return n}function ge(n){try{n=encodeURI(n).replace(m.percentDecode,"%")}catch{return null}return n}function ke(n,e){let t=n.replace(m.findPipe,(a,r,l)=>{let o=!1,h=r;for(;--h>=0&&l[h]==="\\";)o=!o;return o?"|":" |"}),i=t.split(m.splitPipe),s=0;if(i[0].trim()||i.shift(),i.length>0&&!i.at(-1)?.trim()&&i.pop(),e)if(i.length>e)i.splice(e);else for(;i.length<e;)i.push("");for(;s<i.length;s++)i[s]=i[s].trim().replace(m.slashPipe,"|");return i}function z(n,e,t){let i=n.length;if(i===0)return"";let s=0;for(;s<i&&n.charAt(i-s-1)===e;)s++;return n.slice(0,i-s)}function ut(n,e){if(n.indexOf(e[1])===-1)return-1;let t=0;for(let i=0;i<n.length;i++)if(n[i]==="\\")i++;else if(n[i]===e[0])t++;else if(n[i]===e[1]&&(t--,t<0))return i;return t>0?-2:-1}function fe(n,e,t,i,s){let a=e.href,r=e.title||null,l=n[1].replace(s.other.outputLinkReplace,"$1");i.state.inLink=!0;let o={type:n[0].charAt(0)==="!"?"image":"link",raw:t,href:a,title:r,text:l,tokens:i.inlineTokens(l)};return i.state.inLink=!1,o}function dt(n,e,t){let i=n.match(t.other.indentCodeCompensation);if(i===null)return e;let s=i[1];return e.split(`
3
+ v1.2.0-next.37 */
4
+ import{a as fe}from"./WI2CLU5D.js";import"./TWK424K2.js";import"./IG7YJRSC.js";import{b as ke}from"./PDMV5IT4.js";import{E as j,F as ue,H as de,J as ge,h as ae,i as b,k as oe,l as O,m as $,p as le,u as ce,v as he,w as pe}from"./MDHPRL5E.js";import"./NAEBOEYF.js";var I=class extends pe{constructor(e){if(super(e),this.it=O,e.type!==ce.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===O||e==null)return this._t=void 0,this.it=e;if(e===oe)return e;if(typeof e!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(e===this.it)return this._t;this.it=e;let t=[e];return t.raw=t,this._t={_$litType$:this.constructor.resultType,strings:t,values:[]}}};I.directiveName="unsafeHTML",I.resultType=1;var xe=he(I);var Pe=ae`:host{display:block;height:100%}.display-flex-row{display:flex;flex-direction:row}.padding-left-10{padding-left:10px}.chat-container{display:flex;flex-direction:column;gap:0px;max-width:600px;height:75%;background-color:var(--calcite-color-foreground-3);padding:1px}.chat-container_expanded{display:flex;flex-direction:column;gap:0px;max-width:100%;height:95%;background-color:var(--calcite-color-background);border-radius:10px;padding:10px}.chat-panel{--calcite-dialog-header-background-color: var(--calcite-color-brand);--calcite-dialog-header-action-background-color: var(--calcite-color-brand);--calcite-dialog-heading-text-color: var(--calcite-color-background);--calcite-dialog-header-action-background-color-hover: var(--calcite-color-brand);--calcite-dialog-header-action-text-color: var(--calcite-color-background);--calcite-dialog-min-size-y: 90vh;--calcite-dialog-max-size-y: 90vh}.chat-panel-heading{font-size:var(--calcite-font-size-0);font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-background, var(--calcite-color-text-1))}.chat-messages{display:flex;flex-direction:column;gap:20px;padding:4px;height:100%;overflow-y:auto}.user-message{align-self:flex-end;background:var(--calcite-ui-brand);border-radius:8px;max-width:90%;--calcite-card-corner-radius: 8px;--calcite-card-background-color: var(--calcite-color-brand);--calcite-card-border-color: var(--calcite-color-brand);color:var(--calcite-color-background);text-align:left}.system-message{align-self:flex-start;background:var(--calcite-color-foreground-2);border-radius:8px;max-width:90%;--calcite-card-corner-radius: 8px;--calcite-card-background-color: var(--calcite-color-foreground-3);--calcite-card-border-color: var(--calcite-color-foreground-3);text-align:left}.loader-message{align-self:flex-start;background:var(--calcite-color-foreground-3);border-radius:8px;--calcite-card-corner-radius: 8px;--calcite-card-background-color: var(--calcite-color-foreground-3);--calcite-card-border-color: var(--calcite-color-foreground-3)}.message-content{padding:0;font-size:14px}.message-content p:first-child{margin-top:0}.message-content img{max-width:100%;height:auto;display:block;object-fit:contain}.message-content-pad{padding-bottom:10px;font-size:14px}.message-content-summary{padding-bottom:14px}.message-content-alignment{display:flex;align-items:center;gap:var(--calcite-spacing-md);font-size:var(--calcite-font-size--1);color:var(--calcite-color-text-1)}.padding-top-10{padding-top:10px}.padding-right-8{padding-right:8px}.chip-content{padding:5px 5px 5px 0}.chat-input{display:flex;flex-direction:row;flex-grow:1}.table-cell{--calcite-table-cell-background: var(--calcite-color-foreground-3)}.cursor-pointer{cursor:pointer}.notice-border-color{--temp-initial-brand: var(--calcite-color-brand)}.notice-border-color calcite-notice{--calcite-color-brand: #ddd;--calcite-icon-color: var(--temp-initial-brand)}.notice-border-color calcite-notice *{--calcite-color-brand: var(--temp-initial-brand)}.solution-card{padding:5px 0;text-decoration:none;display:block;width:100%;cursor:pointer}.solution-card calcite-card{display:flex;flex-direction:column;max-width:520px;overflow:hidden;--calcite-card-corner-radius: var(--calcite-corner-radius-round) !important;--calcite-card-shadow: var(--calcite-shadow-sm);--calcite-card-background-color: var(--calcite-card-background-color) }.solution-card div[slot=thumbnail]{max-height:100%;width:100%;position:relative;&:after{content:"";position:absolute;top:0;left:0;width:100%;height:100%;transition:all .15s ease-in-out}}.solution-card div[slot=thumbnail] img{max-height:100%;width:100%;object-fit:cover}.solution-card span[slot=description]{padding-top:10px}.solution-card calcite-chip{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);visibility:hidden;pointer-events:none;opacity:0;transition:all .15s ease-in-out;z-index:9999}.solution-card:hover calcite-chip{visibility:visible;opacity:1}.solution-card:hover div[slot=thumbnail]:after{background-color:#00000080}.solution-card:hover h3{text-decoration:underline}.references-container{padding-top:10px;display:block}.references-container.collapsed{display:none}.width-100{width:100%}.disclaimer-div{display:flex;gap:var(--calcite-spacing-sm);font-size:var(--calcite-font-size--0);color:var(--calcite-color-text-1)}.height-32-flex-auto{height:32px;flex:0 0 auto}.display-none{display:none}.chat-messages calcite-fab{position:absolute;bottom:16px;left:50%;transform:translate(-50%);z-index:999}.icon-color-background{--calcite-button-icon-color: var(--calcite-color-background)}@media(max-width:430px){.solution-card .solution-snippet{display:none}}`;var Be="https://www.arcgis.com/sharing/rest/content/items/";async function Me(n){return await Qe(n)}async function Qe(n){let e=Be+n+"?f=json";try{let t=await fetch(e,{method:"GET"});if(!t.ok)throw new Error(`HTTP error! Status: ${t.status}`);return await t.json()}catch(t){return{error:t.message}}}function K(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var T=K();function $e(n){T=n}var q={exec:()=>null};function u(n,e=""){let t=typeof n=="string"?n:n.source,i={replace:(s,a)=>{let r=typeof a=="string"?a:a.source;return r=r.replace(m.caret,"$1"),t=t.replace(s,r),i},getRegex:()=>new RegExp(t,e)};return i}var De=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),m={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:n=>new RegExp(`^( {0,3}${n})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:n=>new RegExp(`^ {0,${Math.min(3,n-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:n=>new RegExp(`^ {0,${Math.min(3,n-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:n=>new RegExp(`^ {0,${Math.min(3,n-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:n=>new RegExp(`^ {0,${Math.min(3,n-1)}}#`),htmlBeginRegex:n=>new RegExp(`^ {0,${Math.min(3,n-1)}}<(?:[a-z].*>|!--)`,"i")},Ne=/^(?:[ \t]*(?:\n|$))+/,Fe=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Ze=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,E=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,He=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,V=/(?:[*+-]|\d{1,9}[.)])/,Se=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Te=u(Se).replace(/bull/g,V).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Oe=u(Se).replace(/bull/g,V).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Y=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,je=/^[^\n]+/,ee=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Ue=u(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",ee).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Ge=u(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,V).getRegex(),N="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",te=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,We=u("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",te).replace("tag",N).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Re=u(Y).replace("hr",E).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",N).getRegex(),Xe=u(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Re).getRegex(),se={blockquote:Xe,code:Fe,def:Ue,fences:Ze,heading:He,hr:E,html:We,lheading:Te,list:Ge,newline:Ne,paragraph:Re,table:q,text:je},be=u("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",E).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",N).getRegex(),Je={...se,lheading:Oe,table:be,paragraph:u(Y).replace("hr",E).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",be).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",N).getRegex()},Ke={...se,html:u(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",te).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:q,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:u(Y).replace("hr",E).replace("heading",` *#{1,6} *[^
5
+ ]`).replace("lheading",Te).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Ve=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Ye=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Ae=/^( {2,}|\\)\n(?!\s*$)/,et=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,F=/[\p{P}\p{S}]/u,ne=/[\s\p{P}\p{S}]/u,Ie=/[^\s\p{P}\p{S}]/u,tt=u(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,ne).getRegex(),ze=/(?!~)[\p{P}\p{S}]/u,st=/(?!~)[\s\p{P}\p{S}]/u,nt=/(?:[^\s\p{P}\p{S}]|~)/u,it=u(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",De?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Ce=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,rt=u(Ce,"u").replace(/punct/g,F).getRegex(),at=u(Ce,"u").replace(/punct/g,ze).getRegex(),Le="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",ot=u(Le,"gu").replace(/notPunctSpace/g,Ie).replace(/punctSpace/g,ne).replace(/punct/g,F).getRegex(),lt=u(Le,"gu").replace(/notPunctSpace/g,nt).replace(/punctSpace/g,st).replace(/punct/g,ze).getRegex(),ct=u("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Ie).replace(/punctSpace/g,ne).replace(/punct/g,F).getRegex(),ht=u(/\\(punct)/,"gu").replace(/punct/g,F).getRegex(),pt=u(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),ut=u(te).replace("(?:-->|$)","-->").getRegex(),dt=u("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",ut).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),M=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,gt=u(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",M).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),qe=u(/^!?\[(label)\]\[(ref)\]/).replace("label",M).replace("ref",ee).getRegex(),Ee=u(/^!?\[(ref)\](?:\[\])?/).replace("ref",ee).getRegex(),kt=u("reflink|nolink(?!\\()","g").replace("reflink",qe).replace("nolink",Ee).getRegex(),me=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,ie={_backpedal:q,anyPunctuation:ht,autolink:pt,blockSkip:it,br:Ae,code:Ye,del:q,emStrongLDelim:rt,emStrongRDelimAst:ot,emStrongRDelimUnd:ct,escape:Ve,link:gt,nolink:Ee,punctuation:tt,reflink:qe,reflinkSearch:kt,tag:dt,text:et,url:q},ft={...ie,link:u(/^!?\[(label)\]\((.*?)\)/).replace("label",M).getRegex(),reflink:u(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",M).getRegex()},U={...ie,emStrongRDelimAst:lt,emStrongLDelim:at,url:u(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",me).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:u(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",me).getRegex()},xt={...U,br:u(Ae).replace("{2,}","*").getRegex(),text:u(U.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},B={normal:se,gfm:Je,pedantic:Ke},z={normal:ie,gfm:U,breaks:xt,pedantic:ft},bt={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},we=n=>bt[n];function v(n,e){if(e){if(m.escapeTest.test(n))return n.replace(m.escapeReplace,we)}else if(m.escapeTestNoEncode.test(n))return n.replace(m.escapeReplaceNoEncode,we);return n}function _e(n){try{n=encodeURI(n).replace(m.percentDecode,"%")}catch{return null}return n}function ye(n,e){let t=n.replace(m.findPipe,(a,r,l)=>{let o=!1,h=r;for(;--h>=0&&l[h]==="\\";)o=!o;return o?"|":" |"}),i=t.split(m.splitPipe),s=0;if(i[0].trim()||i.shift(),i.length>0&&!i.at(-1)?.trim()&&i.pop(),e)if(i.length>e)i.splice(e);else for(;i.length<e;)i.push("");for(;s<i.length;s++)i[s]=i[s].trim().replace(m.slashPipe,"|");return i}function C(n,e,t){let i=n.length;if(i===0)return"";let s=0;for(;s<i&&n.charAt(i-s-1)===e;)s++;return n.slice(0,i-s)}function mt(n,e){if(n.indexOf(e[1])===-1)return-1;let t=0;for(let i=0;i<n.length;i++)if(n[i]==="\\")i++;else if(n[i]===e[0])t++;else if(n[i]===e[1]&&(t--,t<0))return i;return t>0?-2:-1}function ve(n,e,t,i,s){let a=e.href,r=e.title||null,l=n[1].replace(s.other.outputLinkReplace,"$1");i.state.inLink=!0;let o={type:n[0].charAt(0)==="!"?"image":"link",raw:t,href:a,title:r,text:l,tokens:i.inlineTokens(l)};return i.state.inLink=!1,o}function wt(n,e,t){let i=n.match(t.other.indentCodeCompensation);if(i===null)return e;let s=i[1];return e.split(`
6
6
  `).map(a=>{let r=a.match(t.other.beginningSpace);if(r===null)return a;let[l]=r;return l.length>=s.length?a.slice(s.length):a}).join(`
7
- `)}var M=class{options;rules;lexer;constructor(n){this.options=n||T}space(n){let e=this.rules.block.newline.exec(n);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(n){let e=this.rules.block.code.exec(n);if(e){let t=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?t:z(t,`
8
- `)}}}fences(n){let e=this.rules.block.fences.exec(n);if(e){let t=e[0],i=dt(t,e[3]||"",this.rules);return{type:"code",raw:t,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:i}}}heading(n){let e=this.rules.block.heading.exec(n);if(e){let t=e[2].trim();if(this.rules.other.endingHash.test(t)){let i=z(t,"#");(this.options.pedantic||!i||this.rules.other.endingSpaceChar.test(i))&&(t=i.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:t,tokens:this.lexer.inline(t)}}}hr(n){let e=this.rules.block.hr.exec(n);if(e)return{type:"hr",raw:z(e[0],`
9
- `)}}blockquote(n){let e=this.rules.block.blockquote.exec(n);if(e){let t=z(e[0],`
7
+ `)}var Q=class{options;rules;lexer;constructor(n){this.options=n||T}space(n){let e=this.rules.block.newline.exec(n);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(n){let e=this.rules.block.code.exec(n);if(e){let t=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?t:C(t,`
8
+ `)}}}fences(n){let e=this.rules.block.fences.exec(n);if(e){let t=e[0],i=wt(t,e[3]||"",this.rules);return{type:"code",raw:t,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:i}}}heading(n){let e=this.rules.block.heading.exec(n);if(e){let t=e[2].trim();if(this.rules.other.endingHash.test(t)){let i=C(t,"#");(this.options.pedantic||!i||this.rules.other.endingSpaceChar.test(i))&&(t=i.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:t,tokens:this.lexer.inline(t)}}}hr(n){let e=this.rules.block.hr.exec(n);if(e)return{type:"hr",raw:C(e[0],`
9
+ `)}}blockquote(n){let e=this.rules.block.blockquote.exec(n);if(e){let t=C(e[0],`
10
10
  `).split(`
11
11
  `),i="",s="",a=[];for(;t.length>0;){let r=!1,l=[],o;for(o=0;o<t.length;o++)if(this.rules.other.blockquoteStart.test(t[o]))l.push(t[o]),r=!0;else if(!r)l.push(t[o]);else break;t=t.slice(o);let h=l.join(`
12
12
  `),c=h.replace(this.rules.other.blockquoteSetextReplace,`
@@ -20,13 +20,13 @@ ${c}`:c;let d=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTo
20
20
  `);continue}}return{type:"blockquote",raw:i,tokens:a,text:s}}}list(n){let e=this.rules.block.list.exec(n);if(e){let t=e[1].trim(),i=t.length>1,s={type:"list",raw:"",ordered:i,start:i?+t.slice(0,-1):"",loose:!1,items:[]};t=i?`\\d{1,9}\\${t.slice(-1)}`:`\\${t}`,this.options.pedantic&&(t=i?t:"[*+-]");let a=this.rules.other.listItemRegex(t),r=!1;for(;n;){let o=!1,h="",c="";if(!(e=a.exec(n))||this.rules.block.hr.test(n))break;h=e[0],n=n.substring(h.length);let d=e[2].split(`
21
21
  `,1)[0].replace(this.rules.other.listReplaceTabs,f=>" ".repeat(3*f.length)),p=n.split(`
22
22
  `,1)[0],x=!d.trim(),k=0;if(this.options.pedantic?(k=2,c=d.trimStart()):x?k=e[1].length+1:(k=e[2].search(this.rules.other.nonSpaceChar),k=k>4?1:k,c=d.slice(k),k+=e[1].length),x&&this.rules.other.blankLine.test(p)&&(h+=p+`
23
- `,n=n.substring(p.length+1),o=!0),!o){let f=this.rules.other.nextBulletRegex(k),w=this.rules.other.hrRegex(k),R=this.rules.other.fencesBeginRegex(k),E=this.rules.other.headingBeginRegex(k),N=this.rules.other.htmlBeginRegex(k);for(;n;){let F=n.split(`
24
- `,1)[0],A;if(p=F,this.options.pedantic?(p=p.replace(this.rules.other.listReplaceNesting," "),A=p):A=p.replace(this.rules.other.tabCharGlobal," "),R.test(p)||E.test(p)||N.test(p)||f.test(p)||w.test(p))break;if(A.search(this.rules.other.nonSpaceChar)>=k||!p.trim())c+=`
25
- `+A.slice(k);else{if(x||d.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||R.test(d)||E.test(d)||w.test(d))break;c+=`
26
- `+p}!x&&!p.trim()&&(x=!0),h+=F+`
27
- `,n=n.substring(F.length+1),d=A.slice(k)}}s.loose||(r?s.loose=!0:this.rules.other.doubleBlankLine.test(h)&&(r=!0)),s.items.push({type:"list_item",raw:h,task:!!this.options.gfm&&this.rules.other.listIsTask.test(c),loose:!1,text:c,tokens:[]}),s.raw+=h}let l=s.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;s.raw=s.raw.trimEnd();for(let o of s.items){if(this.lexer.state.top=!1,o.tokens=this.lexer.blockTokens(o.text,[]),o.task){if(o.text=o.text.replace(this.rules.other.listReplaceTask,""),o.tokens[0]?.type==="text"||o.tokens[0]?.type==="paragraph"){o.tokens[0].raw=o.tokens[0].raw.replace(this.rules.other.listReplaceTask,""),o.tokens[0].text=o.tokens[0].text.replace(this.rules.other.listReplaceTask,"");for(let c=this.lexer.inlineQueue.length-1;c>=0;c--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[c].src)){this.lexer.inlineQueue[c].src=this.lexer.inlineQueue[c].src.replace(this.rules.other.listReplaceTask,"");break}}let h=this.rules.other.listTaskCheckbox.exec(o.raw);if(h){let c={type:"checkbox",raw:h[0]+" ",checked:h[0]!=="[ ]"};o.checked=c.checked,s.loose?o.tokens[0]&&["paragraph","text"].includes(o.tokens[0].type)&&"tokens"in o.tokens[0]&&o.tokens[0].tokens?(o.tokens[0].raw=c.raw+o.tokens[0].raw,o.tokens[0].text=c.raw+o.tokens[0].text,o.tokens[0].tokens.unshift(c)):o.tokens.unshift({type:"paragraph",raw:c.raw,text:c.raw,tokens:[c]}):o.tokens.unshift(c)}}if(!s.loose){let h=o.tokens.filter(d=>d.type==="space"),c=h.length>0&&h.some(d=>this.rules.other.anyLine.test(d.raw));s.loose=c}}if(s.loose)for(let o of s.items){o.loose=!0;for(let h of o.tokens)h.type==="text"&&(h.type="paragraph")}return s}}html(n){let e=this.rules.block.html.exec(n);if(e)return{type:"html",block:!0,raw:e[0],pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:e[0]}}def(n){let e=this.rules.block.def.exec(n);if(e){let t=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),i=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",s=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:t,raw:e[0],href:i,title:s}}}table(n){let e=this.rules.block.table.exec(n);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;let t=ke(e[1]),i=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),s=e[3]?.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split(`
28
- `):[],a={type:"table",raw:e[0],header:[],align:[],rows:[]};if(t.length===i.length){for(let r of i)this.rules.other.tableAlignRight.test(r)?a.align.push("right"):this.rules.other.tableAlignCenter.test(r)?a.align.push("center"):this.rules.other.tableAlignLeft.test(r)?a.align.push("left"):a.align.push(null);for(let r=0;r<t.length;r++)a.header.push({text:t[r],tokens:this.lexer.inline(t[r]),header:!0,align:a.align[r]});for(let r of s)a.rows.push(ke(r,a.header.length).map((l,o)=>({text:l,tokens:this.lexer.inline(l),header:!1,align:a.align[o]})));return a}}lheading(n){let e=this.rules.block.lheading.exec(n);if(e)return{type:"heading",raw:e[0],depth:e[2].charAt(0)==="="?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(n){let e=this.rules.block.paragraph.exec(n);if(e){let t=e[1].charAt(e[1].length-1)===`
29
- `?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:t,tokens:this.lexer.inline(t)}}}text(n){let e=this.rules.block.text.exec(n);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(n){let e=this.rules.inline.escape.exec(n);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(n){let e=this.rules.inline.tag.exec(n);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(n){let e=this.rules.inline.link.exec(n);if(e){let t=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(t)){if(!this.rules.other.endAngleBracket.test(t))return;let a=z(t.slice(0,-1),"\\");if((t.length-a.length)%2===0)return}else{let a=ut(e[2],"()");if(a===-2)return;if(a>-1){let r=(e[0].indexOf("!")===0?5:4)+e[1].length+a;e[2]=e[2].substring(0,a),e[0]=e[0].substring(0,r).trim(),e[3]=""}}let i=e[2],s="";if(this.options.pedantic){let a=this.rules.other.pedanticHrefTitle.exec(i);a&&(i=a[1],s=a[3])}else s=e[3]?e[3].slice(1,-1):"";return i=i.trim(),this.rules.other.startAngleBracket.test(i)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(t)?i=i.slice(1):i=i.slice(1,-1)),fe(e,{href:i&&i.replace(this.rules.inline.anyPunctuation,"$1"),title:s&&s.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(n,e){let t;if((t=this.rules.inline.reflink.exec(n))||(t=this.rules.inline.nolink.exec(n))){let i=(t[2]||t[1]).replace(this.rules.other.multipleSpaceGlobal," "),s=e[i.toLowerCase()];if(!s){let a=t[0].charAt(0);return{type:"text",raw:a,text:a}}return fe(t,s,t[0],this.lexer,this.rules)}}emStrong(n,e,t=""){let i=this.rules.inline.emStrongLDelim.exec(n);if(!(!i||i[3]&&t.match(this.rules.other.unicodeAlphaNumeric))&&(!(i[1]||i[2])||!t||this.rules.inline.punctuation.exec(t))){let s=[...i[0]].length-1,a,r,l=s,o=0,h=i[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(h.lastIndex=0,e=e.slice(-1*n.length+s);(i=h.exec(e))!=null;){if(a=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!a)continue;if(r=[...a].length,i[3]||i[4]){l+=r;continue}else if((i[5]||i[6])&&s%3&&!((s+r)%3)){o+=r;continue}if(l-=r,l>0)continue;r=Math.min(r,r+l+o);let c=[...i[0]][0].length,d=n.slice(0,s+i.index+c+r);if(Math.min(s,r)%2){let x=d.slice(1,-1);return{type:"em",raw:d,text:x,tokens:this.lexer.inlineTokens(x)}}let p=d.slice(2,-2);return{type:"strong",raw:d,text:p,tokens:this.lexer.inlineTokens(p)}}}}codespan(n){let e=this.rules.inline.code.exec(n);if(e){let t=e[2].replace(this.rules.other.newLineCharGlobal," "),i=this.rules.other.nonSpaceChar.test(t),s=this.rules.other.startingSpaceChar.test(t)&&this.rules.other.endingSpaceChar.test(t);return i&&s&&(t=t.substring(1,t.length-1)),{type:"codespan",raw:e[0],text:t}}}br(n){let e=this.rules.inline.br.exec(n);if(e)return{type:"br",raw:e[0]}}del(n){let e=this.rules.inline.del.exec(n);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(n){let e=this.rules.inline.autolink.exec(n);if(e){let t,i;return e[2]==="@"?(t=e[1],i="mailto:"+t):(t=e[1],i=t),{type:"link",raw:e[0],text:t,href:i,tokens:[{type:"text",raw:t,text:t}]}}}url(n){let e;if(e=this.rules.inline.url.exec(n)){let t,i;if(e[2]==="@")t=e[0],i="mailto:"+t;else{let s;do s=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??"";while(s!==e[0]);t=e[0],e[1]==="www."?i="http://"+e[0]:i=e[0]}return{type:"link",raw:e[0],text:t,href:i,tokens:[{type:"text",raw:t,text:t}]}}}inlineText(n){let e=this.rules.inline.text.exec(n);if(e){let t=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:t}}}},_=class H{tokens;options;state;inlineQueue;tokenizer;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||T,this.options.tokenizer=this.options.tokenizer||new M,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let t={other:m,block:B.normal,inline:I.normal};this.options.pedantic?(t.block=B.pedantic,t.inline=I.pedantic):this.options.gfm&&(t.block=B.gfm,this.options.breaks?t.inline=I.breaks:t.inline=I.gfm),this.tokenizer.rules=t}static get rules(){return{block:B,inline:I}}static lex(e,t){return new H(t).lex(e)}static lexInline(e,t){return new H(t).inlineTokens(e)}lex(e){e=e.replace(m.carriageReturn,`
23
+ `,n=n.substring(p.length+1),o=!0),!o){let f=this.rules.other.nextBulletRegex(k),w=this.rules.other.hrRegex(k),R=this.rules.other.fencesBeginRegex(k),P=this.rules.other.headingBeginRegex(k),Z=this.rules.other.htmlBeginRegex(k);for(;n;){let H=n.split(`
24
+ `,1)[0],A;if(p=H,this.options.pedantic?(p=p.replace(this.rules.other.listReplaceNesting," "),A=p):A=p.replace(this.rules.other.tabCharGlobal," "),R.test(p)||P.test(p)||Z.test(p)||f.test(p)||w.test(p))break;if(A.search(this.rules.other.nonSpaceChar)>=k||!p.trim())c+=`
25
+ `+A.slice(k);else{if(x||d.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||R.test(d)||P.test(d)||w.test(d))break;c+=`
26
+ `+p}!x&&!p.trim()&&(x=!0),h+=H+`
27
+ `,n=n.substring(H.length+1),d=A.slice(k)}}s.loose||(r?s.loose=!0:this.rules.other.doubleBlankLine.test(h)&&(r=!0)),s.items.push({type:"list_item",raw:h,task:!!this.options.gfm&&this.rules.other.listIsTask.test(c),loose:!1,text:c,tokens:[]}),s.raw+=h}let l=s.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;s.raw=s.raw.trimEnd();for(let o of s.items){if(this.lexer.state.top=!1,o.tokens=this.lexer.blockTokens(o.text,[]),o.task){if(o.text=o.text.replace(this.rules.other.listReplaceTask,""),o.tokens[0]?.type==="text"||o.tokens[0]?.type==="paragraph"){o.tokens[0].raw=o.tokens[0].raw.replace(this.rules.other.listReplaceTask,""),o.tokens[0].text=o.tokens[0].text.replace(this.rules.other.listReplaceTask,"");for(let c=this.lexer.inlineQueue.length-1;c>=0;c--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[c].src)){this.lexer.inlineQueue[c].src=this.lexer.inlineQueue[c].src.replace(this.rules.other.listReplaceTask,"");break}}let h=this.rules.other.listTaskCheckbox.exec(o.raw);if(h){let c={type:"checkbox",raw:h[0]+" ",checked:h[0]!=="[ ]"};o.checked=c.checked,s.loose?o.tokens[0]&&["paragraph","text"].includes(o.tokens[0].type)&&"tokens"in o.tokens[0]&&o.tokens[0].tokens?(o.tokens[0].raw=c.raw+o.tokens[0].raw,o.tokens[0].text=c.raw+o.tokens[0].text,o.tokens[0].tokens.unshift(c)):o.tokens.unshift({type:"paragraph",raw:c.raw,text:c.raw,tokens:[c]}):o.tokens.unshift(c)}}if(!s.loose){let h=o.tokens.filter(d=>d.type==="space"),c=h.length>0&&h.some(d=>this.rules.other.anyLine.test(d.raw));s.loose=c}}if(s.loose)for(let o of s.items){o.loose=!0;for(let h of o.tokens)h.type==="text"&&(h.type="paragraph")}return s}}html(n){let e=this.rules.block.html.exec(n);if(e)return{type:"html",block:!0,raw:e[0],pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:e[0]}}def(n){let e=this.rules.block.def.exec(n);if(e){let t=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),i=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",s=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:t,raw:e[0],href:i,title:s}}}table(n){let e=this.rules.block.table.exec(n);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;let t=ye(e[1]),i=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),s=e[3]?.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split(`
28
+ `):[],a={type:"table",raw:e[0],header:[],align:[],rows:[]};if(t.length===i.length){for(let r of i)this.rules.other.tableAlignRight.test(r)?a.align.push("right"):this.rules.other.tableAlignCenter.test(r)?a.align.push("center"):this.rules.other.tableAlignLeft.test(r)?a.align.push("left"):a.align.push(null);for(let r=0;r<t.length;r++)a.header.push({text:t[r],tokens:this.lexer.inline(t[r]),header:!0,align:a.align[r]});for(let r of s)a.rows.push(ye(r,a.header.length).map((l,o)=>({text:l,tokens:this.lexer.inline(l),header:!1,align:a.align[o]})));return a}}lheading(n){let e=this.rules.block.lheading.exec(n);if(e)return{type:"heading",raw:e[0],depth:e[2].charAt(0)==="="?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(n){let e=this.rules.block.paragraph.exec(n);if(e){let t=e[1].charAt(e[1].length-1)===`
29
+ `?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:t,tokens:this.lexer.inline(t)}}}text(n){let e=this.rules.block.text.exec(n);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(n){let e=this.rules.inline.escape.exec(n);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(n){let e=this.rules.inline.tag.exec(n);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(n){let e=this.rules.inline.link.exec(n);if(e){let t=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(t)){if(!this.rules.other.endAngleBracket.test(t))return;let a=C(t.slice(0,-1),"\\");if((t.length-a.length)%2===0)return}else{let a=mt(e[2],"()");if(a===-2)return;if(a>-1){let r=(e[0].indexOf("!")===0?5:4)+e[1].length+a;e[2]=e[2].substring(0,a),e[0]=e[0].substring(0,r).trim(),e[3]=""}}let i=e[2],s="";if(this.options.pedantic){let a=this.rules.other.pedanticHrefTitle.exec(i);a&&(i=a[1],s=a[3])}else s=e[3]?e[3].slice(1,-1):"";return i=i.trim(),this.rules.other.startAngleBracket.test(i)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(t)?i=i.slice(1):i=i.slice(1,-1)),ve(e,{href:i&&i.replace(this.rules.inline.anyPunctuation,"$1"),title:s&&s.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(n,e){let t;if((t=this.rules.inline.reflink.exec(n))||(t=this.rules.inline.nolink.exec(n))){let i=(t[2]||t[1]).replace(this.rules.other.multipleSpaceGlobal," "),s=e[i.toLowerCase()];if(!s){let a=t[0].charAt(0);return{type:"text",raw:a,text:a}}return ve(t,s,t[0],this.lexer,this.rules)}}emStrong(n,e,t=""){let i=this.rules.inline.emStrongLDelim.exec(n);if(!(!i||i[3]&&t.match(this.rules.other.unicodeAlphaNumeric))&&(!(i[1]||i[2])||!t||this.rules.inline.punctuation.exec(t))){let s=[...i[0]].length-1,a,r,l=s,o=0,h=i[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(h.lastIndex=0,e=e.slice(-1*n.length+s);(i=h.exec(e))!=null;){if(a=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!a)continue;if(r=[...a].length,i[3]||i[4]){l+=r;continue}else if((i[5]||i[6])&&s%3&&!((s+r)%3)){o+=r;continue}if(l-=r,l>0)continue;r=Math.min(r,r+l+o);let c=[...i[0]][0].length,d=n.slice(0,s+i.index+c+r);if(Math.min(s,r)%2){let x=d.slice(1,-1);return{type:"em",raw:d,text:x,tokens:this.lexer.inlineTokens(x)}}let p=d.slice(2,-2);return{type:"strong",raw:d,text:p,tokens:this.lexer.inlineTokens(p)}}}}codespan(n){let e=this.rules.inline.code.exec(n);if(e){let t=e[2].replace(this.rules.other.newLineCharGlobal," "),i=this.rules.other.nonSpaceChar.test(t),s=this.rules.other.startingSpaceChar.test(t)&&this.rules.other.endingSpaceChar.test(t);return i&&s&&(t=t.substring(1,t.length-1)),{type:"codespan",raw:e[0],text:t}}}br(n){let e=this.rules.inline.br.exec(n);if(e)return{type:"br",raw:e[0]}}del(n){let e=this.rules.inline.del.exec(n);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(n){let e=this.rules.inline.autolink.exec(n);if(e){let t,i;return e[2]==="@"?(t=e[1],i="mailto:"+t):(t=e[1],i=t),{type:"link",raw:e[0],text:t,href:i,tokens:[{type:"text",raw:t,text:t}]}}}url(n){let e;if(e=this.rules.inline.url.exec(n)){let t,i;if(e[2]==="@")t=e[0],i="mailto:"+t;else{let s;do s=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??"";while(s!==e[0]);t=e[0],e[1]==="www."?i="http://"+e[0]:i=e[0]}return{type:"link",raw:e[0],text:t,href:i,tokens:[{type:"text",raw:t,text:t}]}}}inlineText(n){let e=this.rules.inline.text.exec(n);if(e){let t=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:t}}}},_=class G{tokens;options;state;inlineQueue;tokenizer;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||T,this.options.tokenizer=this.options.tokenizer||new Q,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let t={other:m,block:B.normal,inline:z.normal};this.options.pedantic?(t.block=B.pedantic,t.inline=z.pedantic):this.options.gfm&&(t.block=B.gfm,this.options.breaks?t.inline=z.breaks:t.inline=z.gfm),this.tokenizer.rules=t}static get rules(){return{block:B,inline:z}}static lex(e,t){return new G(t).lex(e)}static lexInline(e,t){return new G(t).inlineTokens(e)}lex(e){e=e.replace(m.carriageReturn,`
30
30
  `),this.blockTokens(e,this.tokens);for(let t=0;t<this.inlineQueue.length;t++){let i=this.inlineQueue[t];this.inlineTokens(i.src,i.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],i=!1){for(this.options.pedantic&&(e=e.replace(m.tabCharGlobal," ").replace(m.spaceLine,""));e;){let s;if(this.options.extensions?.block?.some(r=>(s=r.call({lexer:this},e,t))?(e=e.substring(s.raw.length),t.push(s),!0):!1))continue;if(s=this.tokenizer.space(e)){e=e.substring(s.raw.length);let r=t.at(-1);s.raw.length===1&&r!==void 0?r.raw+=`
31
31
  `:t.push(s);continue}if(s=this.tokenizer.code(e)){e=e.substring(s.raw.length);let r=t.at(-1);r?.type==="paragraph"||r?.type==="text"?(r.raw+=(r.raw.endsWith(`
32
32
  `)?"":`
@@ -40,7 +40,7 @@ ${c}`:c;let d=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTo
40
40
  `+s.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=r.text):t.push(s),i=a.length!==e.length,e=e.substring(s.raw.length);continue}if(s=this.tokenizer.text(e)){e=e.substring(s.raw.length);let r=t.at(-1);r?.type==="text"?(r.raw+=(r.raw.endsWith(`
41
41
  `)?"":`
42
42
  `)+s.raw,r.text+=`
43
- `+s.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=r.text):t.push(s);continue}if(e){let r="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(r);break}else throw new Error(r)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){let i=e,s=null;if(this.tokens.links){let o=Object.keys(this.tokens.links);if(o.length>0)for(;(s=this.tokenizer.rules.inline.reflinkSearch.exec(i))!=null;)o.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(s=this.tokenizer.rules.inline.anyPunctuation.exec(i))!=null;)i=i.slice(0,s.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let a;for(;(s=this.tokenizer.rules.inline.blockSkip.exec(i))!=null;)a=s[2]?s[2].length:0,i=i.slice(0,s.index+a)+"["+"a".repeat(s[0].length-a-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);i=this.options.hooks?.emStrongMask?.call({lexer:this},i)??i;let r=!1,l="";for(;e;){r||(l=""),r=!1;let o;if(this.options.extensions?.inline?.some(c=>(o=c.call({lexer:this},e,t))?(e=e.substring(o.raw.length),t.push(o),!0):!1))continue;if(o=this.tokenizer.escape(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.tag(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.link(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(o.raw.length);let c=t.at(-1);o.type==="text"&&c?.type==="text"?(c.raw+=o.raw,c.text+=o.text):t.push(o);continue}if(o=this.tokenizer.emStrong(e,i,l)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.codespan(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.br(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.del(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.autolink(e)){e=e.substring(o.raw.length),t.push(o);continue}if(!this.state.inLink&&(o=this.tokenizer.url(e))){e=e.substring(o.raw.length),t.push(o);continue}let h=e;if(this.options.extensions?.startInline){let c=1/0,d=e.slice(1),p;this.options.extensions.startInline.forEach(x=>{p=x.call({lexer:this},d),typeof p=="number"&&p>=0&&(c=Math.min(c,p))}),c<1/0&&c>=0&&(h=e.substring(0,c+1))}if(o=this.tokenizer.inlineText(h)){e=e.substring(o.raw.length),o.raw.slice(-1)!=="_"&&(l=o.raw.slice(-1)),r=!0;let c=t.at(-1);c?.type==="text"?(c.raw+=o.raw,c.text+=o.text):t.push(o);continue}if(e){let c="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return t}},Q=class{options;parser;constructor(n){this.options=n||T}space(n){return""}code({text:n,lang:e,escaped:t}){let i=(e||"").match(m.notSpaceStart)?.[0],s=n.replace(m.endingNewline,"")+`
43
+ `+s.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=r.text):t.push(s);continue}if(e){let r="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(r);break}else throw new Error(r)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){let i=e,s=null;if(this.tokens.links){let o=Object.keys(this.tokens.links);if(o.length>0)for(;(s=this.tokenizer.rules.inline.reflinkSearch.exec(i))!=null;)o.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(s=this.tokenizer.rules.inline.anyPunctuation.exec(i))!=null;)i=i.slice(0,s.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let a;for(;(s=this.tokenizer.rules.inline.blockSkip.exec(i))!=null;)a=s[2]?s[2].length:0,i=i.slice(0,s.index+a)+"["+"a".repeat(s[0].length-a-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);i=this.options.hooks?.emStrongMask?.call({lexer:this},i)??i;let r=!1,l="";for(;e;){r||(l=""),r=!1;let o;if(this.options.extensions?.inline?.some(c=>(o=c.call({lexer:this},e,t))?(e=e.substring(o.raw.length),t.push(o),!0):!1))continue;if(o=this.tokenizer.escape(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.tag(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.link(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(o.raw.length);let c=t.at(-1);o.type==="text"&&c?.type==="text"?(c.raw+=o.raw,c.text+=o.text):t.push(o);continue}if(o=this.tokenizer.emStrong(e,i,l)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.codespan(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.br(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.del(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.autolink(e)){e=e.substring(o.raw.length),t.push(o);continue}if(!this.state.inLink&&(o=this.tokenizer.url(e))){e=e.substring(o.raw.length),t.push(o);continue}let h=e;if(this.options.extensions?.startInline){let c=1/0,d=e.slice(1),p;this.options.extensions.startInline.forEach(x=>{p=x.call({lexer:this},d),typeof p=="number"&&p>=0&&(c=Math.min(c,p))}),c<1/0&&c>=0&&(h=e.substring(0,c+1))}if(o=this.tokenizer.inlineText(h)){e=e.substring(o.raw.length),o.raw.slice(-1)!=="_"&&(l=o.raw.slice(-1)),r=!0;let c=t.at(-1);c?.type==="text"?(c.raw+=o.raw,c.text+=o.text):t.push(o);continue}if(e){let c="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return t}},D=class{options;parser;constructor(n){this.options=n||T}space(n){return""}code({text:n,lang:e,escaped:t}){let i=(e||"").match(m.notSpaceStart)?.[0],s=n.replace(m.endingNewline,"")+`
44
44
  `;return i?'<pre><code class="language-'+v(i)+'">'+(t?s:v(s,!0))+`</code></pre>
45
45
  `:"<pre><code>"+(t?s:v(s,!0))+`</code></pre>
46
46
  `}blockquote({tokens:n}){return`<blockquote>
@@ -58,10 +58,10 @@ ${this.parser.parse(n)}</blockquote>
58
58
  `}tablerow({text:n}){return`<tr>
59
59
  ${n}</tr>
60
60
  `}tablecell(n){let e=this.parser.parseInline(n.tokens),t=n.header?"th":"td";return(n.align?`<${t} align="${n.align}">`:`<${t}>`)+e+`</${t}>
61
- `}strong({tokens:n}){return`<strong>${this.parser.parseInline(n)}</strong>`}em({tokens:n}){return`<em>${this.parser.parseInline(n)}</em>`}codespan({text:n}){return`<code>${v(n,!0)}</code>`}br(n){return"<br>"}del({tokens:n}){return`<del>${this.parser.parseInline(n)}</del>`}link({href:n,title:e,tokens:t}){let i=this.parser.parseInline(t),s=ge(n);if(s===null)return i;n=s;let a='<a href="'+n+'"';return e&&(a+=' title="'+v(e)+'"'),a+=">"+i+"</a>",a}image({href:n,title:e,text:t,tokens:i}){i&&(t=this.parser.parseInline(i,this.parser.textRenderer));let s=ge(n);if(s===null)return v(t);n=s;let a=`<img src="${n}" alt="${t}"`;return e&&(a+=` title="${v(e)}"`),a+=">",a}text(n){return"tokens"in n&&n.tokens?this.parser.parseInline(n.tokens):"escaped"in n&&n.escaped?n.text:v(n.text)}},ne=class{strong({text:n}){return n}em({text:n}){return n}codespan({text:n}){return n}del({text:n}){return n}html({text:n}){return n}text({text:n}){return n}link({text:n}){return""+n}image({text:n}){return""+n}br(){return""}checkbox({raw:n}){return n}},y=class U{options;renderer;textRenderer;constructor(e){this.options=e||T,this.options.renderer=this.options.renderer||new Q,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new ne}static parse(e,t){return new U(t).parse(e)}static parseInline(e,t){return new U(t).parseInline(e)}parse(e){let t="";for(let i=0;i<e.length;i++){let s=e[i];if(this.options.extensions?.renderers?.[s.type]){let r=s,l=this.options.extensions.renderers[r.type].call({parser:this},r);if(l!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(r.type)){t+=l||"";continue}}let a=s;switch(a.type){case"space":{t+=this.renderer.space(a);break}case"hr":{t+=this.renderer.hr(a);break}case"heading":{t+=this.renderer.heading(a);break}case"code":{t+=this.renderer.code(a);break}case"table":{t+=this.renderer.table(a);break}case"blockquote":{t+=this.renderer.blockquote(a);break}case"list":{t+=this.renderer.list(a);break}case"checkbox":{t+=this.renderer.checkbox(a);break}case"html":{t+=this.renderer.html(a);break}case"def":{t+=this.renderer.def(a);break}case"paragraph":{t+=this.renderer.paragraph(a);break}case"text":{t+=this.renderer.text(a);break}default:{let r='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(r),"";throw new Error(r)}}}return t}parseInline(e,t=this.renderer){let i="";for(let s=0;s<e.length;s++){let a=e[s];if(this.options.extensions?.renderers?.[a.type]){let l=this.options.extensions.renderers[a.type].call({parser:this},a);if(l!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(a.type)){i+=l||"";continue}}let r=a;switch(r.type){case"escape":{i+=t.text(r);break}case"html":{i+=t.html(r);break}case"link":{i+=t.link(r);break}case"image":{i+=t.image(r);break}case"checkbox":{i+=t.checkbox(r);break}case"strong":{i+=t.strong(r);break}case"em":{i+=t.em(r);break}case"codespan":{i+=t.codespan(r);break}case"br":{i+=t.br(r);break}case"del":{i+=t.del(r);break}case"text":{i+=t.text(r);break}default:{let l='Token with "'+r.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l)}}}return i}},C=class{options;block;constructor(n){this.options=n||T}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(n){return n}postprocess(n){return n}processAllTokens(n){return n}emStrongMask(n){return n}provideLexer(){return this.block?_.lex:_.lexInline}provideParser(){return this.block?y.parse:y.parseInline}},gt=class{defaults=X();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=y;Renderer=Q;TextRenderer=ne;Lexer=_;Tokenizer=M;Hooks=C;constructor(...n){this.use(...n)}walkTokens(n,e){let t=[];for(let i of n)switch(t=t.concat(e.call(this,i)),i.type){case"table":{let s=i;for(let a of s.header)t=t.concat(this.walkTokens(a.tokens,e));for(let a of s.rows)for(let r of a)t=t.concat(this.walkTokens(r.tokens,e));break}case"list":{let s=i;t=t.concat(this.walkTokens(s.items,e));break}default:{let s=i;this.defaults.extensions?.childTokens?.[s.type]?this.defaults.extensions.childTokens[s.type].forEach(a=>{let r=s[a].flat(1/0);t=t.concat(this.walkTokens(r,e))}):s.tokens&&(t=t.concat(this.walkTokens(s.tokens,e)))}}return t}use(...n){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return n.forEach(t=>{let i={...t};if(i.async=this.defaults.async||i.async||!1,t.extensions&&(t.extensions.forEach(s=>{if(!s.name)throw new Error("extension name required");if("renderer"in s){let a=e.renderers[s.name];a?e.renderers[s.name]=function(...r){let l=s.renderer.apply(this,r);return l===!1&&(l=a.apply(this,r)),l}:e.renderers[s.name]=s.renderer}if("tokenizer"in s){if(!s.level||s.level!=="block"&&s.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let a=e[s.level];a?a.unshift(s.tokenizer):e[s.level]=[s.tokenizer],s.start&&(s.level==="block"?e.startBlock?e.startBlock.push(s.start):e.startBlock=[s.start]:s.level==="inline"&&(e.startInline?e.startInline.push(s.start):e.startInline=[s.start]))}"childTokens"in s&&s.childTokens&&(e.childTokens[s.name]=s.childTokens)}),i.extensions=e),t.renderer){let s=this.defaults.renderer||new Q(this.defaults);for(let a in t.renderer){if(!(a in s))throw new Error(`renderer '${a}' does not exist`);if(["options","parser"].includes(a))continue;let r=a,l=t.renderer[r],o=s[r];s[r]=(...h)=>{let c=l.apply(s,h);return c===!1&&(c=o.apply(s,h)),c||""}}i.renderer=s}if(t.tokenizer){let s=this.defaults.tokenizer||new M(this.defaults);for(let a in t.tokenizer){if(!(a in s))throw new Error(`tokenizer '${a}' does not exist`);if(["options","rules","lexer"].includes(a))continue;let r=a,l=t.tokenizer[r],o=s[r];s[r]=(...h)=>{let c=l.apply(s,h);return c===!1&&(c=o.apply(s,h)),c}}i.tokenizer=s}if(t.hooks){let s=this.defaults.hooks||new C;for(let a in t.hooks){if(!(a in s))throw new Error(`hook '${a}' does not exist`);if(["options","block"].includes(a))continue;let r=a,l=t.hooks[r],o=s[r];C.passThroughHooks.has(a)?s[r]=h=>{if(this.defaults.async&&C.passThroughHooksRespectAsync.has(a))return(async()=>{let d=await l.call(s,h);return o.call(s,d)})();let c=l.call(s,h);return o.call(s,c)}:s[r]=(...h)=>{if(this.defaults.async)return(async()=>{let d=await l.apply(s,h);return d===!1&&(d=await o.apply(s,h)),d})();let c=l.apply(s,h);return c===!1&&(c=o.apply(s,h)),c}}i.hooks=s}if(t.walkTokens){let s=this.defaults.walkTokens,a=t.walkTokens;i.walkTokens=function(r){let l=[];return l.push(a.call(this,r)),s&&(l=l.concat(s.call(this,r))),l}}this.defaults={...this.defaults,...i}}),this}setOptions(n){return this.defaults={...this.defaults,...n},this}lexer(n,e){return _.lex(n,e??this.defaults)}parser(n,e){return y.parse(n,e??this.defaults)}parseMarkdown(n){return(e,t)=>{let i={...t},s={...this.defaults,...i},a=this.onError(!!s.silent,!!s.async);if(this.defaults.async===!0&&i.async===!1)return a(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof e>"u"||e===null)return a(new Error("marked(): input parameter is undefined or null"));if(typeof e!="string")return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));if(s.hooks&&(s.hooks.options=s,s.hooks.block=n),s.async)return(async()=>{let r=s.hooks?await s.hooks.preprocess(e):e,l=await(s.hooks?await s.hooks.provideLexer():n?_.lex:_.lexInline)(r,s),o=s.hooks?await s.hooks.processAllTokens(l):l;s.walkTokens&&await Promise.all(this.walkTokens(o,s.walkTokens));let h=await(s.hooks?await s.hooks.provideParser():n?y.parse:y.parseInline)(o,s);return s.hooks?await s.hooks.postprocess(h):h})().catch(a);try{s.hooks&&(e=s.hooks.preprocess(e));let r=(s.hooks?s.hooks.provideLexer():n?_.lex:_.lexInline)(e,s);s.hooks&&(r=s.hooks.processAllTokens(r)),s.walkTokens&&this.walkTokens(r,s.walkTokens);let l=(s.hooks?s.hooks.provideParser():n?y.parse:y.parseInline)(r,s);return s.hooks&&(l=s.hooks.postprocess(l)),l}catch(r){return a(r)}}}onError(n,e){return t=>{if(t.message+=`
62
- Please report this to https://github.com/markedjs/marked.`,n){let i="<p>An error occurred:</p><pre>"+v(t.message+"",!0)+"</pre>";return e?Promise.resolve(i):i}if(e)return Promise.reject(t);throw t}}},$=new gt;function g(n,e){return $.parse(n,e)}g.options=g.setOptions=function(n){return $.setOptions(n),g.defaults=$.defaults,xe(g.defaults),g};g.getDefaults=X;g.defaults=T;g.use=function(...n){return $.use(...n),g.defaults=$.defaults,xe(g.defaults),g};g.walkTokens=function(n,e){return $.walkTokens(n,e)};g.parseInline=$.parseInline;g.Parser=y;g.parser=y.parse;g.Renderer=Q;g.TextRenderer=ne;g.Lexer=_;g.lexer=_.lex;g.Tokenizer=M;g.Hooks=C;g.parse=g;g.options;g.setOptions;g.use;g.walkTokens;g.parseInline;y.parse;_.lex;var G=class{constructor(e=""){this._text="",this._displayedText="",this._pendingText="",this._text=e,this._pendingText=e}setText(e){this._text=e,this._displayedText&&e.includes(this._displayedText)?this._pendingText=e.substring(this._displayedText.length):(this._pendingText=this._text,this._displayedText="")}getText(){return this._displayedText}clearText(){this._displayedText="",this._text="",this._pendingText=""}updateDisplayText(){if(this._pendingText.length>0){let e=this._pendingText[0];if(e==="["||e==="<"||e==="!"){let t=this._matchMarkdownPattern(this._displayedText+this._pendingText,this._displayedText.length);if(t){let i=t.end-t.start,s=this._pendingText.substring(0,i);this._displayedText+=s,this._pendingText=this._pendingText.substring(i)}else this._displayedText+=e,this._pendingText=this._pendingText.substring(1)}else this._displayedText+=e,this._pendingText=this._pendingText.substring(1)}}_matchMarkdownPattern(e,t){let i=[/<sup>\[\[[^\]]+\]\]\([^)]+\)<\/sup>/,/\[\[[^\]]+\]\]\([^)]+\)/,/\[[^\]]+\]\([^)]+\)/,/!\[[^\]]*\]\([^)]+\)/],s=e.substring(t);for(let a of i){let r=s.match(a);if(r&&r.index===0)return{start:t,end:t+r[0].length}}return null}},W=class extends ae{constructor(){super(),this.serverRoot="https://aiservices-beta.arcgis.com",this.token=null,this.open=!1,this.conversationStore={conversationId:null,inquiryId:null,ackSequenceNumber:null},this._currentResponse="",this._isAutoScroll=!1,this._isLoading=!1,this._isLoadingText="",this.messages=[],this._translations=he({name:"arcgis-solutions-assistant",blocking:!0}),this._isTyping=!1,this.closeAssistant=re(),this._resetConversation=()=>{this.conversationStore.conversationId=null,this.conversationStore.inquiryId=null,this.conversationStore.ackSequenceNumber=null},this._setMessageContainerRef=e=>{this._chatContainer=e},this._setInputRef=e=>{this._inputRef=e,this._inputRef.addEventListener("keydown",t=>{t.key==="Enter"&&!t.shiftKey&&(t.preventDefault(),this.handleSendMessage())}),setTimeout(()=>{this._inputRef?.focus()},100)},this._submitQuestion=e=>{this._inputRef&&(this._inputRef.value=e,this.handleSendMessage())},this.listenOn(window,"submitQuestion",e=>{this._submitQuestion(e.detail)})}static{this.properties={serverRoot:1,token:1,open:5,conversationStore:16,_currentResponse:16,_isAutoScroll:16,_isLoading:16,_isLoadingText:16,messages:16,_translations:16,_isTyping:16}}static{this.styles=Ae}get solutionAIurl(){return`${this.serverRoot}/skills/solution_deployment/chat`}get docAIurl(){return`${this.serverRoot}/skills/doc_ai_assistant/chat`}async handleSendMessage(){if(!this._inputRef?.value.trim())return;this._isLoading=!0;let e=this._inputRef.value.trim();this._inputRef.value="";let t={message:e,context:{debug:!1,kind:"SolutionRequest"}};if(this.conversationStore.conversationId!==null){if(t.conversationId=this.conversationStore.conversationId,this.token){let i={author:"human",conversationId:this.conversationStore.conversationId?this.conversationStore.conversationId:"",message:e,render:this._renderSimpleTextMessage(e,"human","","Other")};this.messages=[...this.messages,i];let s=await this.requestAIServer(t,this.token,this.solutionAIurl);this.loopRequest(s,this.token,this.solutionAIurl)}}else if(this.token){let i={author:"human",message:e,render:this._renderSimpleTextMessage(e,"human","","Other")};this.messages=[...this.messages,i];let s=await this.requestAIServer(t,this.token,this.solutionAIurl);this.conversationStore.conversationId=s.conversationId,this.conversationStore.inquiryId=s.inquiryId,this.conversationStore.ackSequenceNumber=s.sequenceNumber,this.loopRequest(s,this.token,this.solutionAIurl)}}async loopRequest(e,t,i){let s=i;this._isLoading=!0;let a=document.createElement("div");a.classList.add("response-message","message-content");let r=document.createElement("div");r.classList.add("display-none");let l=document.createElement("div");l.classList.add("display-none");let o=e.conversationId+Date.now(),h=this._renderResponseBlock(a,r,l,o),c=new G(this._currentResponse),d={author:"ai",conversationId:e.conversationId,message:e.message??"",render:h};for(this.messages.push(d),this.requestUpdate(),this._isAutoScroll=!0;e.hasMore;){await new Promise(w=>setTimeout(w,500));let f={conversationId:e.conversationId,ackSequenceNumber:e.sequenceNumber,inquiryId:e.inquiryId};if(e.context)if(this.conversationStore.context=e.context,e.context.results&&!e.context.intent)for(let w of e.context.results)this._currentResponse=w.reply,this._currentResponse!==""&&(this._isLoading=!1,this._isTyping=!0,this._showCardById(o),this._startTypeWriter(c,this._currentResponse,a,r,l)),e=await this.requestAIServer(f,t,s);else if(e.context.intent==="Solution question"){let w={message:e.message,conversationId:f.conversationId,context:{kind:"DocAIAssistantRequest",filters:{products:"ArcGIS Solutions"}}};s=this.docAIurl,e=await this.requestAIServer(w,t,s)}else this._currentResponse=e.message??"",e.context.kind&&e.context.kind.toLowerCase()==="ArcGISErrorAsContext".toLowerCase()&&(this._currentResponse=this._translations.genericErrorMessage),this._currentResponse!==""&&(this._isLoading=!1,this._isTyping=!0,this._showCardById(o),this._startTypeWriter(c,this._currentResponse,a,r,l)),e=await this.requestAIServer(f,t,s);else e=await this.requestAIServer(f,t,s)}this._isLoading=!1;let{context:p}=this.conversationStore,x=this.messages.length>=2?this._getMostRecentQuestion():"",k=typeof x=="string"?"":x?.message??"";if(p&&p.intent)switch(p.intent){case"Recommend solution":{if(p.results){let f=p.results,w=f.map(N=>`- ${N.title}`).join(`
63
- `),R=this._renderSuggestedSolutions(f),E=this._renderFeedback(this._currentResponse+`
64
- `+w,k,this.conversationStore.conversationId,p.intent);S(R,r),S(E,l)}else r.innerHTML="";this._scrollToBottom();break}default:{let f=this._renderFeedback(this._currentResponse,k,this.conversationStore.conversationId,p.intent);S(f,l),this._scrollToBottom();break}}else{if(p&&p.results&&!p.intent)for(let f of p.results){let w=this._renderSolutionsQuestionTable(f.ref,f.followupQuestions),R=this._renderFeedback(this._currentResponse,k,this.conversationStore.conversationId,"Solution question");S(w,r),S(R,l)}else if(p&&p.kind&&p.kind.toLowerCase()==="ArcGISErrorAsContext".toLowerCase()){let f=this._renderFeedback(this._currentResponse,k,this.conversationStore.conversationId,"Error");S(f,l)}this._scrollToBottom()}}async requestAIServer(e,t,i){try{let s=await(await fetch(i,{method:"POST",headers:{"Content-Type":"application/json",token:t},body:JSON.stringify(e)})).json();if(s)return s;throw new Error("No data returned")}catch(s){throw new Error(`Request failed: ${s}`)}}resetChat(){let e=this.messages[this.messages.length-1];if(e.author!=="system"&&e.conversationId!=="-1"){this._resetConversation();let t={author:"system",conversationId:"-1",message:this._translations.newConversationStarted,render:this._renderSimpleTextMessage(this._translations.newConversationStarted,"system","","Other","speech-bubble-plus")};this.messages=[...this.messages,t],this._inputRef&&(this._inputRef.value="")}}loaded(){let e=this._chatContainer;e&&e.addEventListener("scroll",()=>{this._isAutoScroll=this._isAtBottom(e)})}willUpdate(e){this.messages.length===0&&this._translations.defaultStartUpMessage&&(this.messages=[{author:"ai",conversationId:"",message:this._translations.defaultStartUpMessage,render:this._renderSimpleTextMessage(this._translations.defaultStartUpMessage,"ai","","Other")}])}updated(e){(e.size||this._isLoading)&&this._scrollToBottom()}_renderFeedback(e,t,i,s){return b`
61
+ `}strong({tokens:n}){return`<strong>${this.parser.parseInline(n)}</strong>`}em({tokens:n}){return`<em>${this.parser.parseInline(n)}</em>`}codespan({text:n}){return`<code>${v(n,!0)}</code>`}br(n){return"<br>"}del({tokens:n}){return`<del>${this.parser.parseInline(n)}</del>`}link({href:n,title:e,tokens:t}){let i=this.parser.parseInline(t),s=_e(n);if(s===null)return i;n=s;let a='<a href="'+n+'"';return e&&(a+=' title="'+v(e)+'"'),a+=">"+i+"</a>",a}image({href:n,title:e,text:t,tokens:i}){i&&(t=this.parser.parseInline(i,this.parser.textRenderer));let s=_e(n);if(s===null)return v(t);n=s;let a=`<img src="${n}" alt="${t}"`;return e&&(a+=` title="${v(e)}"`),a+=">",a}text(n){return"tokens"in n&&n.tokens?this.parser.parseInline(n.tokens):"escaped"in n&&n.escaped?n.text:v(n.text)}},re=class{strong({text:n}){return n}em({text:n}){return n}codespan({text:n}){return n}del({text:n}){return n}html({text:n}){return n}text({text:n}){return n}link({text:n}){return""+n}image({text:n}){return""+n}br(){return""}checkbox({raw:n}){return n}},y=class W{options;renderer;textRenderer;constructor(e){this.options=e||T,this.options.renderer=this.options.renderer||new D,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new re}static parse(e,t){return new W(t).parse(e)}static parseInline(e,t){return new W(t).parseInline(e)}parse(e){let t="";for(let i=0;i<e.length;i++){let s=e[i];if(this.options.extensions?.renderers?.[s.type]){let r=s,l=this.options.extensions.renderers[r.type].call({parser:this},r);if(l!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(r.type)){t+=l||"";continue}}let a=s;switch(a.type){case"space":{t+=this.renderer.space(a);break}case"hr":{t+=this.renderer.hr(a);break}case"heading":{t+=this.renderer.heading(a);break}case"code":{t+=this.renderer.code(a);break}case"table":{t+=this.renderer.table(a);break}case"blockquote":{t+=this.renderer.blockquote(a);break}case"list":{t+=this.renderer.list(a);break}case"checkbox":{t+=this.renderer.checkbox(a);break}case"html":{t+=this.renderer.html(a);break}case"def":{t+=this.renderer.def(a);break}case"paragraph":{t+=this.renderer.paragraph(a);break}case"text":{t+=this.renderer.text(a);break}default:{let r='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(r),"";throw new Error(r)}}}return t}parseInline(e,t=this.renderer){let i="";for(let s=0;s<e.length;s++){let a=e[s];if(this.options.extensions?.renderers?.[a.type]){let l=this.options.extensions.renderers[a.type].call({parser:this},a);if(l!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(a.type)){i+=l||"";continue}}let r=a;switch(r.type){case"escape":{i+=t.text(r);break}case"html":{i+=t.html(r);break}case"link":{i+=t.link(r);break}case"image":{i+=t.image(r);break}case"checkbox":{i+=t.checkbox(r);break}case"strong":{i+=t.strong(r);break}case"em":{i+=t.em(r);break}case"codespan":{i+=t.codespan(r);break}case"br":{i+=t.br(r);break}case"del":{i+=t.del(r);break}case"text":{i+=t.text(r);break}default:{let l='Token with "'+r.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l)}}}return i}},L=class{options;block;constructor(n){this.options=n||T}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(n){return n}postprocess(n){return n}processAllTokens(n){return n}emStrongMask(n){return n}provideLexer(){return this.block?_.lex:_.lexInline}provideParser(){return this.block?y.parse:y.parseInline}},_t=class{defaults=K();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=y;Renderer=D;TextRenderer=re;Lexer=_;Tokenizer=Q;Hooks=L;constructor(...n){this.use(...n)}walkTokens(n,e){let t=[];for(let i of n)switch(t=t.concat(e.call(this,i)),i.type){case"table":{let s=i;for(let a of s.header)t=t.concat(this.walkTokens(a.tokens,e));for(let a of s.rows)for(let r of a)t=t.concat(this.walkTokens(r.tokens,e));break}case"list":{let s=i;t=t.concat(this.walkTokens(s.items,e));break}default:{let s=i;this.defaults.extensions?.childTokens?.[s.type]?this.defaults.extensions.childTokens[s.type].forEach(a=>{let r=s[a].flat(1/0);t=t.concat(this.walkTokens(r,e))}):s.tokens&&(t=t.concat(this.walkTokens(s.tokens,e)))}}return t}use(...n){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return n.forEach(t=>{let i={...t};if(i.async=this.defaults.async||i.async||!1,t.extensions&&(t.extensions.forEach(s=>{if(!s.name)throw new Error("extension name required");if("renderer"in s){let a=e.renderers[s.name];a?e.renderers[s.name]=function(...r){let l=s.renderer.apply(this,r);return l===!1&&(l=a.apply(this,r)),l}:e.renderers[s.name]=s.renderer}if("tokenizer"in s){if(!s.level||s.level!=="block"&&s.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let a=e[s.level];a?a.unshift(s.tokenizer):e[s.level]=[s.tokenizer],s.start&&(s.level==="block"?e.startBlock?e.startBlock.push(s.start):e.startBlock=[s.start]:s.level==="inline"&&(e.startInline?e.startInline.push(s.start):e.startInline=[s.start]))}"childTokens"in s&&s.childTokens&&(e.childTokens[s.name]=s.childTokens)}),i.extensions=e),t.renderer){let s=this.defaults.renderer||new D(this.defaults);for(let a in t.renderer){if(!(a in s))throw new Error(`renderer '${a}' does not exist`);if(["options","parser"].includes(a))continue;let r=a,l=t.renderer[r],o=s[r];s[r]=(...h)=>{let c=l.apply(s,h);return c===!1&&(c=o.apply(s,h)),c||""}}i.renderer=s}if(t.tokenizer){let s=this.defaults.tokenizer||new Q(this.defaults);for(let a in t.tokenizer){if(!(a in s))throw new Error(`tokenizer '${a}' does not exist`);if(["options","rules","lexer"].includes(a))continue;let r=a,l=t.tokenizer[r],o=s[r];s[r]=(...h)=>{let c=l.apply(s,h);return c===!1&&(c=o.apply(s,h)),c}}i.tokenizer=s}if(t.hooks){let s=this.defaults.hooks||new L;for(let a in t.hooks){if(!(a in s))throw new Error(`hook '${a}' does not exist`);if(["options","block"].includes(a))continue;let r=a,l=t.hooks[r],o=s[r];L.passThroughHooks.has(a)?s[r]=h=>{if(this.defaults.async&&L.passThroughHooksRespectAsync.has(a))return(async()=>{let d=await l.call(s,h);return o.call(s,d)})();let c=l.call(s,h);return o.call(s,c)}:s[r]=(...h)=>{if(this.defaults.async)return(async()=>{let d=await l.apply(s,h);return d===!1&&(d=await o.apply(s,h)),d})();let c=l.apply(s,h);return c===!1&&(c=o.apply(s,h)),c}}i.hooks=s}if(t.walkTokens){let s=this.defaults.walkTokens,a=t.walkTokens;i.walkTokens=function(r){let l=[];return l.push(a.call(this,r)),s&&(l=l.concat(s.call(this,r))),l}}this.defaults={...this.defaults,...i}}),this}setOptions(n){return this.defaults={...this.defaults,...n},this}lexer(n,e){return _.lex(n,e??this.defaults)}parser(n,e){return y.parse(n,e??this.defaults)}parseMarkdown(n){return(e,t)=>{let i={...t},s={...this.defaults,...i},a=this.onError(!!s.silent,!!s.async);if(this.defaults.async===!0&&i.async===!1)return a(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof e>"u"||e===null)return a(new Error("marked(): input parameter is undefined or null"));if(typeof e!="string")return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));if(s.hooks&&(s.hooks.options=s,s.hooks.block=n),s.async)return(async()=>{let r=s.hooks?await s.hooks.preprocess(e):e,l=await(s.hooks?await s.hooks.provideLexer():n?_.lex:_.lexInline)(r,s),o=s.hooks?await s.hooks.processAllTokens(l):l;s.walkTokens&&await Promise.all(this.walkTokens(o,s.walkTokens));let h=await(s.hooks?await s.hooks.provideParser():n?y.parse:y.parseInline)(o,s);return s.hooks?await s.hooks.postprocess(h):h})().catch(a);try{s.hooks&&(e=s.hooks.preprocess(e));let r=(s.hooks?s.hooks.provideLexer():n?_.lex:_.lexInline)(e,s);s.hooks&&(r=s.hooks.processAllTokens(r)),s.walkTokens&&this.walkTokens(r,s.walkTokens);let l=(s.hooks?s.hooks.provideParser():n?y.parse:y.parseInline)(r,s);return s.hooks&&(l=s.hooks.postprocess(l)),l}catch(r){return a(r)}}}onError(n,e){return t=>{if(t.message+=`
62
+ Please report this to https://github.com/markedjs/marked.`,n){let i="<p>An error occurred:</p><pre>"+v(t.message+"",!0)+"</pre>";return e?Promise.resolve(i):i}if(e)return Promise.reject(t);throw t}}},S=new _t;function g(n,e){return S.parse(n,e)}g.options=g.setOptions=function(n){return S.setOptions(n),g.defaults=S.defaults,$e(g.defaults),g};g.getDefaults=K;g.defaults=T;g.use=function(...n){return S.use(...n),g.defaults=S.defaults,$e(g.defaults),g};g.walkTokens=function(n,e){return S.walkTokens(n,e)};g.parseInline=S.parseInline;g.Parser=y;g.parser=y.parse;g.Renderer=D;g.TextRenderer=re;g.Lexer=_;g.lexer=_.lex;g.Tokenizer=Q;g.Hooks=L;g.parse=g;g.options;g.setOptions;g.use;g.walkTokens;g.parseInline;y.parse;_.lex;var X=class{constructor(e=""){this._text="",this._displayedText="",this._pendingText="",this._text=e,this._pendingText=e}setText(e){this._text=e,this._displayedText&&e.includes(this._displayedText)?this._pendingText=e.substring(this._displayedText.length):(this._pendingText=this._text,this._displayedText="")}getText(){return this._displayedText}clearText(){this._displayedText="",this._text="",this._pendingText=""}updateDisplayText(){if(this._pendingText.length>0){let e=this._pendingText[0];if(e==="["||e==="<"||e==="!"){let t=this._matchMarkdownPattern(this._displayedText+this._pendingText,this._displayedText.length);if(t){let i=t.end-t.start,s=this._pendingText.substring(0,i);this._displayedText+=s,this._pendingText=this._pendingText.substring(i)}else this._displayedText+=e,this._pendingText=this._pendingText.substring(1)}else this._displayedText+=e,this._pendingText=this._pendingText.substring(1)}}_matchMarkdownPattern(e,t){let i=[/<sup>\[\[[^\]]+\]\]\([^)]+\)<\/sup>/,/\[\[[^\]]+\]\]\([^)]+\)/,/\[[^\]]+\]\([^)]+\)/,/!\[[^\]]*\]\([^)]+\)/],s=e.substring(t);for(let a of i){let r=s.match(a);if(r&&r.index===0)return{start:t,end:t+r[0].length}}return null}},J=class extends ue{constructor(){super(),this.serverRoot="https://aiservices-beta.arcgis.com",this.token=null,this.open=!1,this.userFirstName="",this.conversationStore={conversationId:null,inquiryId:null,ackSequenceNumber:null},this._currentResponse="",this._isAutoScroll=!1,this._isLoading=!1,this._isLoadingText="",this.messages=[],this._translations=fe({name:"arcgis-solutions-assistant",blocking:!0}),this._isTyping=!1,this.closeAssistant=le(),this._resetConversation=()=>{this.conversationStore.conversationId=null,this.conversationStore.inquiryId=null,this.conversationStore.ackSequenceNumber=null},this._setMessageContainerRef=e=>{this._chatContainer=e},this._setInputRef=e=>{this._inputRef=e,this._inputRef.addEventListener("keydown",t=>{t.key==="Enter"&&!t.shiftKey&&(t.preventDefault(),this.handleSendMessage())}),setTimeout(()=>{this._inputRef?.focus()},100)},this._submitQuestion=e=>{this._inputRef&&(this._inputRef.value=e,this.handleSendMessage())},this.listenOn(window,"submitQuestion",e=>{this._submitQuestion(e.detail)})}static{this.properties={serverRoot:1,token:1,open:5,userFirstName:1,conversationStore:16,_currentResponse:16,_isAutoScroll:16,_isLoading:16,_isLoadingText:16,messages:16,_translations:16,_isTyping:16}}static{this.styles=Pe}get solutionAIurl(){return`${this.serverRoot}/skills/solution_deployment/chat`}get docAIurl(){return`${this.serverRoot}/skills/doc_ai_assistant/chat`}async handleSendMessage(){if(!this._inputRef?.value.trim())return;this._isLoading=!0;let e=this._inputRef.value.trim();this._inputRef.value="";let t={message:e,context:{debug:!1,kind:"SolutionRequest"}};if(this.conversationStore.conversationId!==null){if(t.conversationId=this.conversationStore.conversationId,this.token){let i={author:"human",conversationId:this.conversationStore.conversationId?this.conversationStore.conversationId:"",message:e,render:this._renderSimpleTextMessage(e,"human","","Other")};this.messages=[...this.messages,i];let s=await this.requestAIServer(t,this.token,this.solutionAIurl);this.loopRequest(s,this.token,this.solutionAIurl)}}else if(this.token){let i={author:"human",message:e,render:this._renderSimpleTextMessage(e,"human","","Other")};this.messages=[...this.messages,i];let s=await this.requestAIServer(t,this.token,this.solutionAIurl);this.conversationStore.conversationId=s.conversationId,this.conversationStore.inquiryId=s.inquiryId,this.conversationStore.ackSequenceNumber=s.sequenceNumber,this.loopRequest(s,this.token,this.solutionAIurl)}}async loopRequest(e,t,i){let s=i;this._isLoading=!0;let a=document.createElement("div");a.classList.add("response-message","message-content");let r=document.createElement("div");r.classList.add("display-none");let l=document.createElement("div");l.classList.add("display-none");let o=e.conversationId+Date.now(),h=this._renderResponseBlock(a,r,l,o),c=new X(this._currentResponse),d={author:"ai",conversationId:e.conversationId,message:e.message??"",render:h};for(this.messages.push(d),this.requestUpdate(),this._isAutoScroll=!0;e.hasMore;){await new Promise(w=>setTimeout(w,500));let f={conversationId:e.conversationId,ackSequenceNumber:e.sequenceNumber,inquiryId:e.inquiryId};if(e.context)if(this.conversationStore.context=e.context,e.context.results&&!e.context.intent)for(let w of e.context.results)this._currentResponse=w.reply,this._currentResponse!==""&&(this._isLoading=!1,this._isTyping=!0,this._showCardById(o),this._startTypeWriter(c,this._currentResponse,a,r,l)),e=await this.requestAIServer(f,t,s);else if(e.context.intent==="Solution question"){let w={message:e.message,conversationId:f.conversationId,context:{kind:"DocAIAssistantRequest",filters:{products:"ArcGIS Solutions"}}};s=this.docAIurl,e=await this.requestAIServer(w,t,s)}else this._currentResponse=e.message??"",e.context.kind&&e.context.kind.toLowerCase()==="ArcGISErrorAsContext".toLowerCase()&&(this._currentResponse=this._translations.genericErrorMessage),this._currentResponse!==""&&(this._isLoading=!1,this._isTyping=!0,this._showCardById(o),this._startTypeWriter(c,this._currentResponse,a,r,l)),e=await this.requestAIServer(f,t,s);else e=await this.requestAIServer(f,t,s)}this._isLoading=!1;let{context:p}=this.conversationStore,x=this.messages.length>=2?this._getMostRecentQuestion():"",k=typeof x=="string"?"":x?.message??"";if(p&&p.intent)switch(p.intent){case"Recommend solution":{if(p.results){let f=p.results,w=f.map(Z=>`- ${Z.title}`).join(`
63
+ `),R=this._renderSuggestedSolutions(f),P=this._renderFeedback(this._currentResponse+`
64
+ `+w,k,this.conversationStore.conversationId,p.intent);$(R,r),$(P,l)}else r.innerHTML="";this._scrollToBottom();break}default:{let f=this._renderFeedback(this._currentResponse,k,this.conversationStore.conversationId,p.intent);$(f,l),this._scrollToBottom();break}}else{if(p&&p.results&&!p.intent)for(let f of p.results){let w=this._renderSolutionsQuestionTable(f.ref,f.followupQuestions),R=this._renderFeedback(this._currentResponse,k,this.conversationStore.conversationId,"Solution question");$(w,r),$(R,l)}else if(p&&p.kind&&p.kind.toLowerCase()==="ArcGISErrorAsContext".toLowerCase()){let f=this._renderFeedback(this._currentResponse,k,this.conversationStore.conversationId,"Error");$(f,l)}this._scrollToBottom()}}async requestAIServer(e,t,i){try{let s=await(await fetch(i,{method:"POST",headers:{"Content-Type":"application/json",token:t},body:JSON.stringify(e)})).json();if(s)return s;throw new Error("No data returned")}catch(s){throw new Error(`Request failed: ${s}`)}}resetChat(){let e=this.messages[this.messages.length-1];if(e.author!=="system"&&e.conversationId!=="-1"){this._resetConversation();let t={author:"system",conversationId:"-1",message:this._translations.newConversationStarted,render:this._renderSimpleTextMessage(this._translations.newConversationStarted,"system","","Other","speech-bubble-plus")};this.messages=[...this.messages,t],this._inputRef&&(this._inputRef.value="")}}loaded(){let e=this._chatContainer;e&&e.addEventListener("scroll",()=>{this._isAutoScroll=this._isAtBottom(e)})}willUpdate(e){if(this.messages.length===0&&this._translations.defaultStartUpMessage){let t=this._translations.defaultStartUpMessage.replace("{{name}}",this.userFirstName),i=Object.values(this._translations.defaultFollowUpQuestions),s=this._renderSolutionQuestionFollowup(i);this.messages=[{author:"ai",conversationId:"",message:t,render:this._renderSimpleTextMessage(t,"ai","","Other",void 0,s)}]}}updated(e){(e.size||this._isLoading)&&this._scrollToBottom()}_renderFeedback(e,t,i,s){return b`
65
65
  <div>
66
66
  <calcite-button
67
67
  appearance='transparent'
@@ -153,8 +153,8 @@ Please report this to https://github.com/markedjs/marked.`,n){let i="<p>An error
153
153
  <span slot='description' class='solution-snippet'>${e.snippet}</span>
154
154
  </calcite-card>
155
155
  </a>
156
- `}_renderResponseBlock(e,t,i,s){return b`<calcite-card id=${s??le} class="system-message display-none">${e}${t}${i}</calcite-card>`}_renderSimpleTextMessage(e,t,i,s,a){let r=this.messages.length>=2?this._getMostRecentQuestion():"",l=typeof r=="string"?"":r?.message??"";return t==="system"?b`<div class="message-content message-content-alignment">${a&&b`<calcite-icon .icon=${a}></calcite-icon>`||""}${e}</div>`:b`<calcite-card class=${oe(t==="human"?"user-message":"system-message")}><div class="message-content">${e}${t==="ai"&&i!==""&&this._renderFeedback(e,l,i,s)||""}</div></calcite-card>`}_renderSuggestedSolutions(e){let t=e.map(i=>{let s=i.thumbnail.match(/\/items\/([a-f0-9]+)\//);return s?this._renderSolutionCard(i,s[1]):null}).filter(i=>i!==null);return b`
156
+ `}_renderResponseBlock(e,t,i,s){return b`<calcite-card id=${s??ge} class="system-message display-none">${e}${t}${i}</calcite-card>`}_renderSimpleTextMessage(e,t,i,s,a,r){let l=this.messages.length>=2?this._getMostRecentQuestion():"",o=typeof l=="string"?"":l?.message??"";return t==="system"?b`<div class="message-content message-content-alignment">${a&&b`<calcite-icon .icon=${a}></calcite-icon>`||""}${e}</div>`:b`<calcite-card class=${de(t==="human"?"user-message":"system-message")}><div class="message-content">${xe(e)}${r}${t==="ai"&&i!==""&&this._renderFeedback(e,o,i,s)||""}</div></calcite-card>`}_renderSuggestedSolutions(e){let t=e.map(i=>{let s=i.thumbnail.match(/\/items\/([a-f0-9]+)\//);return s?this._renderSolutionCard(i,s[1]):null}).filter(i=>i!==null);return b`
157
157
  <div class='message-content'>
158
158
  ${t}
159
159
  </div>
160
- `}render(){return b`<calcite-dialog class="chat-panel" .open=${this.open} .heading=${this._translations.solutionAssistantTitle} placement=bottom-start @calciteDialogClose=${()=>{this.closeAssistant.emit(!0),this.open=!1}}><span class="chat-panel-heading" slot=header-content><span class="padding-right-8">${this._translations.solutionAssistantTitle}</span><calcite-chip .label=${this._translations.betaTag} .value=${this._translations.betaTag}>${this._translations.betaTag}</calcite-chip></span>${this.messages.length>1?b`<calcite-button appearance=transparent class="icon-color-background" .disabled=${!!this._isLoading||this._isTyping} icon-end=speech-bubble-plus kind=neutral label="New conversation" @click=${this.resetChat} scale=l slot=header-actions-end></calcite-button>`:""}<div class="chat-messages" ${O(this._setMessageContainerRef)}>${this.messages.map(e=>e.render)}${this._isLoading&&b`<calcite-card class="loader-message"><div class="message-content display-flex-row"><calcite-loader .label=${this._isLoadingText} inline scale=s></calcite-loader>${this._isLoadingText!=""&&b`<div class="padding-left-10">${this._isLoadingText}</div>`||""}</div></calcite-card>`||""}${this._chatContainer&&!this._isAtBottom(this._chatContainer)&&!this._isAutoScroll&&b`<calcite-fab icon=arrow-down @click=${()=>{this._isAutoScroll=!0,this._scrollToBottom(),setTimeout(()=>{this.requestUpdate()},100)}} scale=m></calcite-fab>`||""}</div><div slot=footer class="width-100"><div class="chat-input"><calcite-text-area resize=none rows=3 .placeholder=${this._translations.sendMessage} value .disabled=${!!this._isLoading||this._isTyping} ${O(this._setInputRef)}></calcite-text-area><calcite-button icon-start=send appearance=outline kind=neutral @click=${this.handleSendMessage} .disabled=${!!this._isLoading||this._isTyping}></calcite-button></div><div class="disclaimer-div padding-top-10" slot=footer><calcite-icon icon=information scale=s></calcite-icon>${this._translations.disclaimerMessage}<a href=https://trust.arcgis.com/en/security-concern/ target=_blank>${this._translations.reportConcern}</a></div></div></calcite-dialog>`}_scrollToBottom(){this._chatContainer&&this._isAutoScroll&&setTimeout(()=>{this._chatContainer&&(this._chatContainer.scrollTop=this._chatContainer.scrollHeight)},100)}_emitItemIdFromAI(e){this._querySolutions(e).then(t=>{let i=t.typeKeywords.filter(a=>a.includes("solutionid")),s=new CustomEvent("solutionIDFromAssistant",{detail:i.length>0?i[0]:e,bubbles:!0,composed:!0});window.dispatchEvent(s)})}_submitFollowupQuestion(e){let t=new CustomEvent("submitQuestion",{detail:e,bubbles:!0,composed:!0});window.dispatchEvent(t)}_getMostRecentQuestion(){return[...this.messages].reverse().find(e=>e.author==="human")||null}async _querySolutions(e){let t=await ze(e);if("error"in t)throw new Error(t.error);return t}_sendFeedback(e,t,i,s,a){let r=`https://survey123.arcgis.com/share/6e349a50b4504ca6b6107216d568db5f?field:_source=${encodeURIComponent("Solutions Assistant")}&field:user_evaluation=${encodeURIComponent(i)}&field:question=${encodeURIComponent(t)}&field:answer=${encodeURIComponent(e)}&field:context=${encodeURIComponent(JSON.stringify({intent:a}))}&field:conversation_id=${encodeURIComponent(s)}&field:version=${encodeURIComponent("v1")}`;window.open(r,"_blank")}_copyResponseToClipboard(e,t){navigator.clipboard.writeText(e);let i=t.currentTarget;i.iconStart="check",setTimeout(()=>{i.iconStart="copy"},3e3)}_startTypeWriter(e,t,i,s,a){if(t.length>0){e.setText(t);let r=async()=>{e.updateDisplayText();let l=e.getText();i.innerHTML=await g.parse(l),l.length<this._currentResponse.length?(this._scrollToBottom(),setTimeout(r,5)):(this._isTyping=!1,this._isAutoScroll=!1,s.classList.remove("display-none"),a.classList.remove("display-none"))};r()}}_showCardById(e){let t=this.renderRoot.querySelector(`#${e}`);t&&t.classList.remove("display-none")}_isAtBottom(e){return e.scrollTop+e.clientHeight>=e.scrollHeight-5}};ce("arcgis-solutions-assistant",W);export{W as ArcgisSolutionsAssistant};
160
+ `}render(){return b`<calcite-dialog class="chat-panel" .open=${this.open} .heading=${this._translations.solutionAssistantTitle} placement=bottom-start @calciteDialogClose=${()=>{this.closeAssistant.emit(!0),this.open=!1}}><span class="chat-panel-heading" slot=header-content><span class="padding-right-8">${this._translations.solutionAssistantTitle}</span><calcite-chip .label=${this._translations.betaTag} .value=${this._translations.betaTag}>${this._translations.betaTag}</calcite-chip></span>${this.messages.length>1?b`<calcite-button appearance=transparent class="icon-color-background" .disabled=${!!this._isLoading||this._isTyping} icon-end=speech-bubble-plus kind=neutral label="New conversation" @click=${this.resetChat} scale=l slot=header-actions-end></calcite-button>`:""}<div class="chat-messages" ${j(this._setMessageContainerRef)}>${this.messages.map(e=>e.render)}${this._isLoading&&b`<calcite-card class="loader-message"><div class="message-content display-flex-row"><calcite-loader .label=${this._isLoadingText} inline scale=s></calcite-loader>${this._isLoadingText!=""&&b`<div class="padding-left-10">${this._isLoadingText}</div>`||""}</div></calcite-card>`||""}${this._chatContainer&&!this._isAtBottom(this._chatContainer)&&!this._isAutoScroll&&b`<calcite-fab icon=arrow-down @click=${()=>{this._isAutoScroll=!0,this._scrollToBottom(),setTimeout(()=>{this.requestUpdate()},100)}} scale=m></calcite-fab>`||""}</div><div slot=footer class="width-100"><div class="chat-input"><calcite-text-area resize=none rows=3 .placeholder=${this._translations.sendMessage} value .disabled=${!!this._isLoading||this._isTyping} ${j(this._setInputRef)}></calcite-text-area><calcite-button icon-start=send appearance=outline kind=neutral @click=${this.handleSendMessage} .disabled=${!!this._isLoading||this._isTyping}></calcite-button></div><div class="disclaimer-div padding-top-10" slot=footer><calcite-icon icon=information scale=s></calcite-icon>${this._translations.disclaimerMessage}<a href=https://trust.arcgis.com/en/security-concern/ target=_blank>${this._translations.reportConcern}</a></div></div></calcite-dialog>`}_scrollToBottom(){this._chatContainer&&this._isAutoScroll&&setTimeout(()=>{this._chatContainer&&(this._chatContainer.scrollTop=this._chatContainer.scrollHeight)},100)}_emitItemIdFromAI(e){this._querySolutions(e).then(t=>{let i=t.typeKeywords.filter(a=>a.includes("solutionid")),s=new CustomEvent("solutionIDFromAssistant",{detail:i.length>0?i[0]:e,bubbles:!0,composed:!0});window.dispatchEvent(s)})}_submitFollowupQuestion(e){let t=new CustomEvent("submitQuestion",{detail:e,bubbles:!0,composed:!0});window.dispatchEvent(t)}_getMostRecentQuestion(){return[...this.messages].reverse().find(e=>e.author==="human")||null}async _querySolutions(e){let t=await Me(e);if("error"in t)throw new Error(t.error);return t}_sendFeedback(e,t,i,s,a){let r=`https://survey123.arcgis.com/share/6e349a50b4504ca6b6107216d568db5f?field:_source=${encodeURIComponent("Solutions Assistant")}&field:user_evaluation=${encodeURIComponent(i)}&field:question=${encodeURIComponent(t)}&field:answer=${encodeURIComponent(e)}&field:context=${encodeURIComponent(JSON.stringify({intent:a}))}&field:conversation_id=${encodeURIComponent(s)}&field:version=${encodeURIComponent("v1")}`;window.open(r,"_blank")}_copyResponseToClipboard(e,t){navigator.clipboard.writeText(e);let i=t.currentTarget;i.iconStart="check",setTimeout(()=>{i.iconStart="copy"},3e3)}_startTypeWriter(e,t,i,s,a){if(t.length>0){e.setText(t);let r=async()=>{e.updateDisplayText();let l=e.getText();i.innerHTML=await g.parse(l),l.length<this._currentResponse.length?(this._scrollToBottom(),setTimeout(r,5)):(this._isTyping=!1,this._isAutoScroll=!1,s.classList.remove("display-none"),a.classList.remove("display-none"))};r()}}_showCardById(e){let t=this.renderRoot.querySelector(`#${e}`);t&&t.classList.remove("display-none")}_isAtBottom(e){return e.scrollTop+e.clientHeight>=e.scrollHeight-5}};ke("arcgis-solutions-assistant",J);export{J as ArcgisSolutionsAssistant};
@@ -1,4 +1,4 @@
1
1
  /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
2
  See https://js.arcgis.com/1.2/esri/copyright.txt for details.
3
- v1.2.0-next.35 */
4
- import{a,b}from"./UEWK7WEY.js";import"./U5R65CBD.js";import"./UY3VZJPX.js";import"./4JD2T6JR.js";import"./6UZSVHNV.js";export{a as PageEditorTypes,b as PageSchema};
3
+ v1.2.0-next.37 */
4
+ import{a,b}from"./IBJ2NRSR.js";import"./5IFLAE53.js";import"./PTGWJCD4.js";import"./ZPJJ3H5I.js";import"./NAEBOEYF.js";export{a as PageEditorTypes,b as PageSchema};
@@ -1,7 +1,7 @@
1
1
  /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
2
  See https://js.arcgis.com/1.2/esri/copyright.txt for details.
3
- v1.2.0-next.35 */
4
- import{a as d}from"./GT2JLUV4.js";import"./MKMGVPCZ.js";import"./R5426IXX.js";import{b as o}from"./WDABZAMD.js";import{F as n,h as l,i as e,l as a,p as t}from"./KSNTFOGZ.js";import"./6UZSVHNV.js";var r=l`/** @license
3
+ v1.2.0-next.37 */
4
+ import{a as d}from"./WI2CLU5D.js";import"./TWK424K2.js";import"./IG7YJRSC.js";import{b as o}from"./PDMV5IT4.js";import{F as n,h as l,i as e,l as a,p as t}from"./MDHPRL5E.js";import"./NAEBOEYF.js";var r=l`/** @license
5
5
  * Copyright 2025 Esri
6
6
  *
7
7
  * Licensed under the Apache License, Version 2.0 (the "License");
@@ -0,0 +1,4 @@
1
+ /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
+ See https://js.arcgis.com/1.2/esri/copyright.txt for details.
3
+ v1.2.0-next.37 */
4
+ import{a,b}from"./KZMYX67M.js";import"./GEQYI5LQ.js";import"./4WQFSTBO.js";import"./3VAHJ6OS.js";import"./ZPJJ3H5I.js";import"./NAEBOEYF.js";export{a as EventEditorTypes,b as buildSchema};
@@ -1,4 +1,4 @@
1
1
  /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
2
  See https://js.arcgis.com/1.2/esri/copyright.txt for details.
3
- v1.2.0-next.35 */
4
- import{b as p,d as a,e as h,f as E}from"./6W4SZKHC.js";function n(r={}){return r.portal?E(r.portal):r.authentication&&typeof r.authentication!="string"?r.authentication.portal:"https://www.arcgis.com/sharing/rest"}function u(r){return r.owner?Promise.resolve(r.owner):r.item&&r.item.owner?Promise.resolve(r.item.owner):r.authentication&&r.authentication.getUsername?r.authentication.getUsername():Promise.reject(new Error("Could not determine the owner of this item. Pass the `owner`, `item.owner`, or `authentication` option."))}function U(r){return Array.isArray(r)&&Array.isArray(r[0])&&Array.isArray(r[1])}function j(r){return r.join(",")}function v(r,t,e){if(!r)return r;let o=null;return typeof r.thumbnail=="string"&&(o=`${t}/content/items/${r.id}/info/${r.thumbnail}`,o&&r.access!=="public"&&e&&(o+=`?${e}`)),Object.assign(Object.assign({},r),o?{thumbnailUrl:o}:{})}function ar(r,t){let e=T(r,t),o=Object.assign({httpMethod:"GET"},t);return a(e,o).then(async i=>{let m=t?.portal||n(t),c;return t?.authentication&&typeof t.authentication!="string"&&i.access!=="public"&&(c=await t.authentication.getToken(e)),v(i,m,c)})}var T=(r,t)=>`${typeof t=="string"?t:n(t)}/content/items/${r}`;function ir(r,t){let e=`${T(r,t)}/data`,o=Object.assign({httpMethod:"GET",params:{}},t);return o.file&&(o.params.f=null),a(e,o).catch(i=>{if(!RegExp(/The string did not match the expected pattern|(Unexpected end of (JSON input|data at line 1 column 1))/i).test(i.message))throw i})}function mr(r){let t=`${T(r.id,r)}/relatedItems`,e=Object.assign({httpMethod:"GET",params:{direction:r.direction}},r);return typeof r.relationshipType=="string"?e.params.relationshipType=r.relationshipType:e.params.relationshipTypes=r.relationshipType,delete e.direction,delete e.relationshipType,a(t,e)}function cr(r,t){let e=`${T(r,t)}/resources`,o=Object.assign({},t);return o.params=Object.assign({num:1e3},o.params),a(e,o)}function dr(r){return u(r).then(t=>{let e=`${n(r)}/content/users/${t}/items/${r.id}/delete`;return a(e,r)})}function hr(r){return u(r).then(t=>{let e=`${n(r)}/content/users/${t}/items/${r.id}/removeResources`;return r.params=Object.assign(Object.assign({},r.params),{resource:r.resource}),typeof r.deleteAll<"u"&&(r.params.deleteAll=r.deleteAll),a(e,r)})}function pr(r){return u(r).then(t=>{let e=`${n(r)}/content/users/${encodeURIComponent(t)}/${r.folderId}/delete`;return a(e,r)})}function br(r,t){let e=r||"self",o=`${n(t)}/portals/${e}/settings`,i=Object.assign({httpMethod:"GET"},t);return a(o,i)}function Y(r){return u(r).then(t=>{let e=r.folderId?`${n(r)}/content/users/${t}/${r.folderId}/items/${r.item.id}/update`:`${n(r)}/content/users/${t}/items/${r.item.id}/update`;r.params=Object.assign(Object.assign({},r.params),r.item),r.params.extent&&U(r.params.extent)&&(r.params.extent=j(r.params.extent));let o=n(r),i=v(Object.assign(Object.assign({},r.item),{access:r.item.access}),o),m=r.params.thumbnailUrl;return typeof i.thumbnailUrl=="string"&&typeof m=="string"&&i.thumbnailUrl.split("?")[0]===m.split("?")[0]&&delete r.params.thumbnailUrl,a(e,r)})}function jr(r){return u(r).then(t=>{let e=`${n(r)}/content/users/${t}/items/${r.id}/updateResources`;return r.params=Object.assign({file:r.resource,fileName:r.name,resourcesPrefix:r.prefix,text:r.content},r.params),typeof r.private<"u"&&(r.params.access=r.private?"private":"inherit"),a(e,r)})}function vr(r){return u(r).then(t=>{let e=`${n(r)}/content/users/${t}/items/${r.itemId}/move`,o=r.folderId;return o||(o="/"),r.params=Object.assign({folder:o},r.params),a(e,r)})}function Rr(r){return u(r).then(t=>{let e=`${n(r)}/content/users/${t}/addRelationship`,o=h(r,["originItemId","destinationItemId","relationshipType"],{params:Object.assign({},r.params)});return a(e,o)})}function Er(r){return u(r).then(t=>{let e=`${n(r)}/content/users/${t}/items/${r.id}/addResources`;return r.params=Object.assign({file:r.resource,fileName:r.name,resourcesPrefix:r.prefix,text:r.content,access:r.private?"private":"inherit"},r.params),a(e,r)})}function Wr(r){return u(r).then(t=>{let o=`${`${n(r)}/content/users/${t}`}/createFolder`;return r.params=Object.assign({title:r.title},r.params),a(o,r)})}function z(r){return r.multipart&&!r.filename?Promise.reject(new Error("The filename is required for a multipart request.")):u(r).then(t=>{let e=`${n(r)}/content/users/${t}`,o=`${e}/addItem`;r.folderId&&(o=`${e}/${r.folderId}/addItem`),r.params=Object.assign(Object.assign({},r.params),r.item),r.params.extent&&U(r.params.extent)&&(r.params.extent=j(r.params.extent));let i=h(r,["owner","folderId","file","dataUrl","text","async","multipart","filename","overwrite"],{params:Object.assign({},r.params)});return a(o,i)})}function Yr(r){let t=Object.assign({folderId:null},r);return z(t)}function Zr(r){return u(r).then(t=>{let e=`${n(r)}/content/users/${t}/items/${r.id}/protect`;return a(e,r)})}function Or(r){return u(r).then(t=>{let e=`${n(r)}/content/users/${t}/items/${r.id}/unprotect`;return a(e,r)})}function M(r,t){let e=`${n(t)}/community/groups/${r}`,o=Object.assign({httpMethod:"GET"},t);return a(e,o)}function et(r,t){let e=`${n(t)}/content/groups/${r}`,o=Object.assign(Object.assign({httpMethod:"GET"},{params:{start:1,num:100}}),t);return t&&t.paging&&(o.params=Object.assign({},t.paging)),a(e,o)}function A(r,t){let e=t||r.authentication.username,o=r.owner||e;return`${n(r)}/content/users/${encodeURIComponent(o)}/items/${r.id}/share`}function k(r,t){let e=t||r.authentication.username;return(r.owner||e)===e}function S(r){return r.authentication.getUser().then(t=>t&&t.role==="org_admin"&&!t.roleId)}function P(r){return M(r.groupId,r).then(t=>t.userMembership.memberType).catch(()=>"none")}var x=class r{constructor(t=""){this.termStack=[],this.rangeStack=[],this.openGroups=0,this.q=t}match(...t){return this.termStack=this.termStack.concat(t),this}in(t){let e=`\`in(${t?`"${t}"`:""})\``;return!this.hasRange&&!this.hasTerms?(p(`${e} was called with no call to \`match(...)\` or \`from(...)\`/\`to(...)\`. Your query was not modified.`),this):(t&&t!=="*"&&(this.q+=`${t}:`),this.commit())}startGroup(){return this.commit(),this.openGroups>0&&(this.q+=" "),this.openGroups++,this.q+="(",this}endGroup(){return this.openGroups<=0?(p("`endGroup(...)` was called without calling `startGroup(...)` first. Your query was not modified."),this):(this.commit(),this.openGroups--,this.q+=")",this)}and(){return this.addModifier("and")}or(){return this.addModifier("or")}not(){return this.addModifier("not")}from(t){return this.hasTerms?(p('`from(...)` is not allowed after `match(...)` try using `.from(...).to(...).in(...)`. Optionally, you may see this because dates are incorrectly formatted. Dates should be a primative Date value, aka a number in milliseconds or Date object, ie new Date("2020-01-01"). Your query was not modified.'),this):(this.rangeStack[0]=t,this)}to(t){return this.hasTerms?(p('`to(...)` is not allowed after `match(...)` try using `.from(...).to(...).in(...)`. Optionally, you may see this because dates are incorrectly formatted. Dates should be a primative Date value, aka a number in milliseconds or Date object, ie new Date("2020-01-01"). Your query was not modified.'),this):(this.rangeStack[1]=t,this)}boost(t){return this.commit(),this.q+=`^${t}`,this}toParam(){return this.commit(),this.cleanup(),this.q}clone(){return this.commit(),this.cleanup(),new r(this.q+"")}addModifier(t){return this.currentModifer?(p(`You have called \`${this.currentModifer}()\` after \`${t}()\`. Your current query was not modified.`),this):(this.commit(),this.q===""&&t!=="not"?(p(`You have called \`${t}()\` without calling another method to modify your query first. Try calling \`match()\` first.`),this):(this.currentModifer=t,this.q+=this.q===""?"":" ",this.q+=`${t.toUpperCase()} `,this))}hasWhiteSpace(t){return/\s/g.test(t)}formatTerm(t){return t instanceof Date?t.getTime():typeof t=="string"&&this.hasWhiteSpace(t)?`"${t}"`:t}commit(){return this.currentModifer=void 0,this.hasRange&&(this.q+=`[${this.formatTerm(this.rangeStack[0])} TO ${this.formatTerm(this.rangeStack[1])}]`,this.rangeStack=[void 0,void 0]),this.hasTerms&&(this.q+=this.termStack.map(t=>this.formatTerm(t)).join(" "),this.termStack=[]),this}get hasTerms(){return this.termStack.length>0}get hasRange(){return this.rangeStack.length&&this.rangeStack[0]&&this.rangeStack[1]}cleanup(){if(this.openGroups>0)for(p(`Automatically closing ${this.openGroups} group(s). You can use \`endGroup(...)\` to remove this warning.`);this.openGroups>0;)this.q+=")",this.openGroups--;let t=this.q;this.q=t.replace(/( AND ?| NOT ?| OR ?)*$/,""),t!==this.q&&p("`startGroup(...)` was called without calling `endGroup(...)` first. Your query was not modified."),this.q=this.q.replace(/(\(\))*/,"")}};function $(r,t){let e;typeof r=="string"||r instanceof x?e={httpMethod:"GET",params:{q:r}}:e=h(r,["q","num","start","sortField","sortOrder","searchUserAccess","searchUserName","filter","countFields","countSize","categories","categoryFilters"],{httpMethod:"GET"});let o;switch(t){case"item":o="/search";break;case"group":o="/community/groups";break;case"groupContent":if(typeof r!="string"&&!(r instanceof x)&&r.groupId)o=`/content/groups/${r.groupId}/search`;else return Promise.reject(new Error("you must pass a `groupId` option to `searchGroupContent`"));break;case"communityUser":o="/community/users";break;default:o="/portals/self/users/search";break}let i=n(e)+o;return a(i,e).then(m=>(m.nextStart&&m.nextStart!==-1&&(m.nextPage=function(){let c;return typeof r=="string"||r instanceof x?c={q:r,start:m.nextStart}:(c=r,c.start=m.nextStart),$(c,t)}),m))}function N(r){return $(r,"item")}function b(r,t){if(r.length===0)return[];let e=[];for(let o=0;o<r.length;o+=t)e.push(r.slice(o,o+t));return e}function _(r){let t=r.id,e=`${n(r)}/community/groups/${t}/addUsers`,o=Object.assign({},r,{admins:void 0,users:void 0}),m=[...F("users",r.users,o),...F("admins",r.admins,o)].map(c=>J(e,c));return Promise.all(m).then(V)}function F(r,t,e){return!t||t.length<1?[]:b(t,25).map(i=>H(r,i,e))}function H(r,t,e){return Object.assign({},e,{[r]:t,params:Object.assign(Object.assign({},e.params),{[r]:t})})}function J(r,t){return a(r,t).catch(e=>({errors:[e]}))}function V(r){let t=r.filter(i=>i.notAdded).reduce((i,m)=>i.concat(m.notAdded),[]),e=r.filter(i=>i.errors).reduce((i,m)=>i.concat(m.errors),[]),o={notAdded:t};return e.length>0&&(o.errors=e),o}function B(r){let{id:t,users:e}=r,o=`${n(r)}/community/groups/${t}/removeUsers`,i=c=>{let d=Object.assign(Object.assign({},r),{users:c,params:{users:c}});return a(o,d).catch(l=>({errors:[l]}))},m=b(e,25).map(c=>i(c));return Promise.all(m).then(c=>{let d=f=>c.filter(g=>g[f]).reduce((g,w)=>g.concat(w[f]),[]),l=d("errors"),s={notRemoved:d("notRemoved")};return l.length?Object.assign(Object.assign({},s),{errors:l}):s})}function _t(r){let t=`${n(r)}/community/createGroup`;return r.params=Object.assign(Object.assign({},r.params),r.group),a(t,r)}function Jt(r){let t=`${n(r)}/community/groups/${r.id}/protect`;return a(t,r)}function Vt(r){let t=`${n(r)}/community/groups/${r.id}/unprotect`;return a(t,r)}function Xt(r){let t=`${n(r)}/community/groups/${r.id}/delete`,e=Object.assign({},r);return a(t,e)}function qt(r){return $(r,"group")}function re(r){return $(r,"groupContent")}function ne(r){let t=`${n(r)}/community/groups/${r.group.id}/update`;return r.params=Object.assign(Object.assign({},r.params),r.group),a(t,r)}function C(r){let t=`${n(r)}/community/groups/${r.id}/updateUsers`,e={authentication:r.authentication,params:{}};return r.newMemberType==="admin"?e.params.admins=r.users:e.params.users=r.users,a(t,e)}async function y(r){var t;if(r.username)return encodeURIComponent(r.username);if(!((t=r.authentication)===null||t===void 0)&&t.username)return encodeURIComponent(r.authentication.username);if(r.authentication)return r.authentication.getUsername().then(encodeURIComponent)}async function I(r){let t,e={httpMethod:"GET"};if(typeof r=="string")t=`https://www.arcgis.com/sharing/rest/community/users/${r}`;else{let o=await y(r);t=`${n(r)}/community/users/${o}`,e=Object.assign(Object.assign({},r),e)}return a(t,e)}async function Qe(r){let t=await r.authentication.getUsername(),e=A(r,t);return k(r,t)?D(e,r):S(r).then(o=>{if(o)return D(e,r);throw Error(`This item can not be shared by ${t}. They are neither the item owner nor an organization admin.`)})}function D(r,t){return t.params=Object.assign({org:!1,everyone:!1},t.params),t.access==="private"&&(t.params.groups=" "),t.access==="org"&&(t.params.org=!0),t.access==="public"&&(t.params.account=!0,t.params.everyone=!0),a(r,t)}function G(r){let t={q:`id: ${r.id} AND group: ${r.groupId}`,start:1,num:10,sortField:"title",authentication:r.authentication,httpMethod:"POST"};return N(t).then(e=>{let o=!1;if(e.total>0)return o=e.results.some(i=>i.id===r.id),o})}async function io(r){return G(r).then(async t=>{if(t)return{itemId:r.id,shortcut:!0,notSharedWith:[]};let{owner:e,confirmItemControl:o}=r,i=await r.authentication.getUsername(),m=e||i;if(m!==i){let c=!1,d=!1;return Promise.all([I({username:i,authentication:r.authentication}),I({username:m,authentication:r.authentication}),P(r)]).then(([l,s,f])=>{let g=!!o;return c=l.role==="org_admin"&&!l.roleId,d=l.orgId!==s.orgId,L(l,g,f,c,s,r)}).then(l=>{let[{revert:s}={promise:Promise.resolve({notAdded:[]}),revert:f=>Promise.resolve(f)}]=l;return Promise.all(l.map(({promise:f})=>f)).then(()=>W(r,c,d)).then(f=>s(f))})}return W(r)}).then(t=>{if(t.notSharedWith.length)throw Error(`Item ${r.id} could not be shared to group ${r.groupId}.`);return t})}function L(r,t,e,o,i,m){let c=[];if(m.groupId!==r.favGroupId){if(t){if(!o)throw Error(`This item can not be shared to shared editing group ${m.groupId} by ${r.username} as they not the item owner or org admin.`);c.push(R(r,r,!1,`Error adding ${r.username} as member to edit group ${m.groupId}. Consequently item ${m.id} was not shared to the group.`,m),R(r,i,!0,e==="none"?`Error adding user ${i.username} to edit group ${m.groupId}. Consequently item ${m.id} was not shared to the group.`:`Error promoting user ${i.username} to admin in edit group ${m.groupId}. Consequently item ${m.id} was not shared to the group.`,m))}else if(o)c.push(R(r,r,!1,`Error adding ${r.username} as member to view group ${m.groupId}. Consequently item ${m.id} was not shared to the group.`,m));else if(e==="none")throw new Error(`This item can not be shared by ${r.username} as they are not a member of the specified group ${m.groupId}.`)}return c}async function W(r,t=!1,e=!1){let o=await r.authentication.getUsername(),i=r.owner||o,m=`${n(r)}/content/items/${r.id}/share`;return(i===o||t&&!e)&&(m=`${n(r)}/content/users/${i}/items/${r.id}/share`),r.params={groups:r.groupId,confirmItemControl:r.confirmItemControl},a(m,r)}function R(r,t,e,o,i){let m=t.groups||[],c=m.find(s=>s.id===i.groupId);if(r.orgId!==t.orgId)throw Error(`User ${t.username} is not a member of the same org as ${r.username}. Consequently they can not be added added to group ${i.groupId} nor can item ${i.id} be shared to the group.`);if(!c&&m.length>511)throw Error(`User ${t.username} already has 512 groups, and can not be added to group ${i.groupId}. Consequently item ${i.id} can not be shared to the group.`);let d,l;if(c)e&&c.userMembership.memberType==="member"?(d=C({id:i.groupId,users:[t.username],newMemberType:"admin",authentication:i.authentication}).then(s=>{let f=s.results.reduce((g,w)=>(w.success||g.push(w.username),g),[]);return Promise.resolve({notAdded:f})}).catch(()=>({notAdded:[t.username]})),l=s=>C({id:i.groupId,users:[t.username],newMemberType:"member",authentication:i.authentication}).then(()=>s).catch(()=>s)):(d=Promise.resolve({notAdded:[]}),l=s=>Promise.resolve(s));else{let s=e?"admins":"users";d=_({id:i.groupId,[s]:[t.username],authentication:i.authentication}).then(f=>{if(f.errors&&f.errors.length)throw f.errors[0];return f}).catch(()=>({notAdded:[t.username]})),l=f=>B({id:i.groupId,users:[t.username],authentication:i.authentication}).then(()=>f)}return{promise:d.then(s=>{if(s.notAdded.length)throw new Error(o);return s}),revert:l}}function ho(r){return G(r).then(async t=>{if(!t)return Promise.resolve({itemId:r.id,shortcut:!0,notUnsharedFrom:[]});let{owner:e}=r,o=await r.authentication.getUsername();return Promise.all([P(r),I({username:o,authentication:r.authentication})]).then(([i,m])=>{let d=(e||o)===o,l=m.role==="org_admin"&&!m.roleId;if(!d&&!l&&["admin","owner"].indexOf(i)<0)throw Error(`This item can not be unshared from group ${r.groupId} by ${o} as they not the item owner, an org admin, group admin or group owner.`);return Q(r)}).then(i=>{if(i.notUnsharedFrom.length)throw Error(`Item ${r.id} could not be unshared to group ${r.groupId}`);return i})})}async function Q(r){let t=await r.authentication.getUsername(),e=r.owner||t,o=`${n(r)}/content/items/${r.id}/unshare`;return e===t&&(o=`${n(r)}/content/users/${e}/items/${r.id}/unshare`),r.params={groups:r.groupId},a(o,r)}function Uo(r){return K(null,r)}function K(r,t){let e=r||"self",o=`${n(t)}/portals/${e}`,i=Object.assign({httpMethod:"GET"},t);return a(o,i)}export{n as a,u as b,Y as c,jr as d,vr as e,Rr as f,Er as g,Wr as h,z as i,Yr as j,ar as k,ir as l,mr as m,cr as n,Zr as o,Or as p,M as q,et as r,dr as s,hr as t,pr as u,x as v,N as w,B as x,_t as y,Jt as z,Vt as A,Xt as B,qt as C,re as D,ne as E,I as F,Qe as G,io as H,ho as I,Uo as J,K,br as L};
3
+ v1.2.0-next.37 */
4
+ import{b as p,d as a,e as h,f as E}from"./DTQRFAUA.js";function n(r={}){return r.portal?E(r.portal):r.authentication&&typeof r.authentication!="string"?r.authentication.portal:"https://www.arcgis.com/sharing/rest"}function u(r){return r.owner?Promise.resolve(r.owner):r.item&&r.item.owner?Promise.resolve(r.item.owner):r.authentication&&r.authentication.getUsername?r.authentication.getUsername():Promise.reject(new Error("Could not determine the owner of this item. Pass the `owner`, `item.owner`, or `authentication` option."))}function U(r){return Array.isArray(r)&&Array.isArray(r[0])&&Array.isArray(r[1])}function j(r){return r.join(",")}function v(r,t,e){if(!r)return r;let o=null;return typeof r.thumbnail=="string"&&(o=`${t}/content/items/${r.id}/info/${r.thumbnail}`,o&&r.access!=="public"&&e&&(o+=`?${e}`)),Object.assign(Object.assign({},r),o?{thumbnailUrl:o}:{})}function ar(r,t){let e=T(r,t),o=Object.assign({httpMethod:"GET"},t);return a(e,o).then(async i=>{let m=t?.portal||n(t),c;return t?.authentication&&typeof t.authentication!="string"&&i.access!=="public"&&(c=await t.authentication.getToken(e)),v(i,m,c)})}var T=(r,t)=>`${typeof t=="string"?t:n(t)}/content/items/${r}`;function ir(r,t){let e=`${T(r,t)}/data`,o=Object.assign({httpMethod:"GET",params:{}},t);return o.file&&(o.params.f=null),a(e,o).catch(i=>{if(!RegExp(/The string did not match the expected pattern|(Unexpected end of (JSON input|data at line 1 column 1))/i).test(i.message))throw i})}function mr(r){let t=`${T(r.id,r)}/relatedItems`,e=Object.assign({httpMethod:"GET",params:{direction:r.direction}},r);return typeof r.relationshipType=="string"?e.params.relationshipType=r.relationshipType:e.params.relationshipTypes=r.relationshipType,delete e.direction,delete e.relationshipType,a(t,e)}function cr(r,t){let e=`${T(r,t)}/resources`,o=Object.assign({},t);return o.params=Object.assign({num:1e3},o.params),a(e,o)}function dr(r){return u(r).then(t=>{let e=`${n(r)}/content/users/${t}/items/${r.id}/delete`;return a(e,r)})}function hr(r){return u(r).then(t=>{let e=`${n(r)}/content/users/${t}/items/${r.id}/removeResources`;return r.params=Object.assign(Object.assign({},r.params),{resource:r.resource}),typeof r.deleteAll<"u"&&(r.params.deleteAll=r.deleteAll),a(e,r)})}function pr(r){return u(r).then(t=>{let e=`${n(r)}/content/users/${encodeURIComponent(t)}/${r.folderId}/delete`;return a(e,r)})}function br(r,t){let e=r||"self",o=`${n(t)}/portals/${e}/settings`,i=Object.assign({httpMethod:"GET"},t);return a(o,i)}function Y(r){return u(r).then(t=>{let e=r.folderId?`${n(r)}/content/users/${t}/${r.folderId}/items/${r.item.id}/update`:`${n(r)}/content/users/${t}/items/${r.item.id}/update`;r.params=Object.assign(Object.assign({},r.params),r.item),r.params.extent&&U(r.params.extent)&&(r.params.extent=j(r.params.extent));let o=n(r),i=v(Object.assign(Object.assign({},r.item),{access:r.item.access}),o),m=r.params.thumbnailUrl;return typeof i.thumbnailUrl=="string"&&typeof m=="string"&&i.thumbnailUrl.split("?")[0]===m.split("?")[0]&&delete r.params.thumbnailUrl,a(e,r)})}function jr(r){return u(r).then(t=>{let e=`${n(r)}/content/users/${t}/items/${r.id}/updateResources`;return r.params=Object.assign({file:r.resource,fileName:r.name,resourcesPrefix:r.prefix,text:r.content},r.params),typeof r.private<"u"&&(r.params.access=r.private?"private":"inherit"),a(e,r)})}function vr(r){return u(r).then(t=>{let e=`${n(r)}/content/users/${t}/items/${r.itemId}/move`,o=r.folderId;return o||(o="/"),r.params=Object.assign({folder:o},r.params),a(e,r)})}function Rr(r){return u(r).then(t=>{let e=`${n(r)}/content/users/${t}/addRelationship`,o=h(r,["originItemId","destinationItemId","relationshipType"],{params:Object.assign({},r.params)});return a(e,o)})}function Er(r){return u(r).then(t=>{let e=`${n(r)}/content/users/${t}/items/${r.id}/addResources`;return r.params=Object.assign({file:r.resource,fileName:r.name,resourcesPrefix:r.prefix,text:r.content,access:r.private?"private":"inherit"},r.params),a(e,r)})}function Wr(r){return u(r).then(t=>{let o=`${`${n(r)}/content/users/${t}`}/createFolder`;return r.params=Object.assign({title:r.title},r.params),a(o,r)})}function z(r){return r.multipart&&!r.filename?Promise.reject(new Error("The filename is required for a multipart request.")):u(r).then(t=>{let e=`${n(r)}/content/users/${t}`,o=`${e}/addItem`;r.folderId&&(o=`${e}/${r.folderId}/addItem`),r.params=Object.assign(Object.assign({},r.params),r.item),r.params.extent&&U(r.params.extent)&&(r.params.extent=j(r.params.extent));let i=h(r,["owner","folderId","file","dataUrl","text","async","multipart","filename","overwrite"],{params:Object.assign({},r.params)});return a(o,i)})}function Yr(r){let t=Object.assign({folderId:null},r);return z(t)}function Zr(r){return u(r).then(t=>{let e=`${n(r)}/content/users/${t}/items/${r.id}/protect`;return a(e,r)})}function Or(r){return u(r).then(t=>{let e=`${n(r)}/content/users/${t}/items/${r.id}/unprotect`;return a(e,r)})}function M(r,t){let e=`${n(t)}/community/groups/${r}`,o=Object.assign({httpMethod:"GET"},t);return a(e,o)}function et(r,t){let e=`${n(t)}/content/groups/${r}`,o=Object.assign(Object.assign({httpMethod:"GET"},{params:{start:1,num:100}}),t);return t&&t.paging&&(o.params=Object.assign({},t.paging)),a(e,o)}function A(r,t){let e=t||r.authentication.username,o=r.owner||e;return`${n(r)}/content/users/${encodeURIComponent(o)}/items/${r.id}/share`}function k(r,t){let e=t||r.authentication.username;return(r.owner||e)===e}function S(r){return r.authentication.getUser().then(t=>t&&t.role==="org_admin"&&!t.roleId)}function P(r){return M(r.groupId,r).then(t=>t.userMembership.memberType).catch(()=>"none")}var x=class r{constructor(t=""){this.termStack=[],this.rangeStack=[],this.openGroups=0,this.q=t}match(...t){return this.termStack=this.termStack.concat(t),this}in(t){let e=`\`in(${t?`"${t}"`:""})\``;return!this.hasRange&&!this.hasTerms?(p(`${e} was called with no call to \`match(...)\` or \`from(...)\`/\`to(...)\`. Your query was not modified.`),this):(t&&t!=="*"&&(this.q+=`${t}:`),this.commit())}startGroup(){return this.commit(),this.openGroups>0&&(this.q+=" "),this.openGroups++,this.q+="(",this}endGroup(){return this.openGroups<=0?(p("`endGroup(...)` was called without calling `startGroup(...)` first. Your query was not modified."),this):(this.commit(),this.openGroups--,this.q+=")",this)}and(){return this.addModifier("and")}or(){return this.addModifier("or")}not(){return this.addModifier("not")}from(t){return this.hasTerms?(p('`from(...)` is not allowed after `match(...)` try using `.from(...).to(...).in(...)`. Optionally, you may see this because dates are incorrectly formatted. Dates should be a primative Date value, aka a number in milliseconds or Date object, ie new Date("2020-01-01"). Your query was not modified.'),this):(this.rangeStack[0]=t,this)}to(t){return this.hasTerms?(p('`to(...)` is not allowed after `match(...)` try using `.from(...).to(...).in(...)`. Optionally, you may see this because dates are incorrectly formatted. Dates should be a primative Date value, aka a number in milliseconds or Date object, ie new Date("2020-01-01"). Your query was not modified.'),this):(this.rangeStack[1]=t,this)}boost(t){return this.commit(),this.q+=`^${t}`,this}toParam(){return this.commit(),this.cleanup(),this.q}clone(){return this.commit(),this.cleanup(),new r(this.q+"")}addModifier(t){return this.currentModifer?(p(`You have called \`${this.currentModifer}()\` after \`${t}()\`. Your current query was not modified.`),this):(this.commit(),this.q===""&&t!=="not"?(p(`You have called \`${t}()\` without calling another method to modify your query first. Try calling \`match()\` first.`),this):(this.currentModifer=t,this.q+=this.q===""?"":" ",this.q+=`${t.toUpperCase()} `,this))}hasWhiteSpace(t){return/\s/g.test(t)}formatTerm(t){return t instanceof Date?t.getTime():typeof t=="string"&&this.hasWhiteSpace(t)?`"${t}"`:t}commit(){return this.currentModifer=void 0,this.hasRange&&(this.q+=`[${this.formatTerm(this.rangeStack[0])} TO ${this.formatTerm(this.rangeStack[1])}]`,this.rangeStack=[void 0,void 0]),this.hasTerms&&(this.q+=this.termStack.map(t=>this.formatTerm(t)).join(" "),this.termStack=[]),this}get hasTerms(){return this.termStack.length>0}get hasRange(){return this.rangeStack.length&&this.rangeStack[0]&&this.rangeStack[1]}cleanup(){if(this.openGroups>0)for(p(`Automatically closing ${this.openGroups} group(s). You can use \`endGroup(...)\` to remove this warning.`);this.openGroups>0;)this.q+=")",this.openGroups--;let t=this.q;this.q=t.replace(/( AND ?| NOT ?| OR ?)*$/,""),t!==this.q&&p("`startGroup(...)` was called without calling `endGroup(...)` first. Your query was not modified."),this.q=this.q.replace(/(\(\))*/,"")}};function $(r,t){let e;typeof r=="string"||r instanceof x?e={httpMethod:"GET",params:{q:r}}:e=h(r,["q","num","start","sortField","sortOrder","searchUserAccess","searchUserName","filter","countFields","countSize","categories","categoryFilters"],{httpMethod:"GET"});let o;switch(t){case"item":o="/search";break;case"group":o="/community/groups";break;case"groupContent":if(typeof r!="string"&&!(r instanceof x)&&r.groupId)o=`/content/groups/${r.groupId}/search`;else return Promise.reject(new Error("you must pass a `groupId` option to `searchGroupContent`"));break;case"communityUser":o="/community/users";break;default:o="/portals/self/users/search";break}let i=n(e)+o;return a(i,e).then(m=>(m.nextStart&&m.nextStart!==-1&&(m.nextPage=function(){let c;return typeof r=="string"||r instanceof x?c={q:r,start:m.nextStart}:(c=r,c.start=m.nextStart),$(c,t)}),m))}function N(r){return $(r,"item")}function b(r,t){if(r.length===0)return[];let e=[];for(let o=0;o<r.length;o+=t)e.push(r.slice(o,o+t));return e}function _(r){let t=r.id,e=`${n(r)}/community/groups/${t}/addUsers`,o=Object.assign({},r,{admins:void 0,users:void 0}),m=[...F("users",r.users,o),...F("admins",r.admins,o)].map(c=>J(e,c));return Promise.all(m).then(V)}function F(r,t,e){return!t||t.length<1?[]:b(t,25).map(i=>H(r,i,e))}function H(r,t,e){return Object.assign({},e,{[r]:t,params:Object.assign(Object.assign({},e.params),{[r]:t})})}function J(r,t){return a(r,t).catch(e=>({errors:[e]}))}function V(r){let t=r.filter(i=>i.notAdded).reduce((i,m)=>i.concat(m.notAdded),[]),e=r.filter(i=>i.errors).reduce((i,m)=>i.concat(m.errors),[]),o={notAdded:t};return e.length>0&&(o.errors=e),o}function B(r){let{id:t,users:e}=r,o=`${n(r)}/community/groups/${t}/removeUsers`,i=c=>{let d=Object.assign(Object.assign({},r),{users:c,params:{users:c}});return a(o,d).catch(l=>({errors:[l]}))},m=b(e,25).map(c=>i(c));return Promise.all(m).then(c=>{let d=f=>c.filter(g=>g[f]).reduce((g,w)=>g.concat(w[f]),[]),l=d("errors"),s={notRemoved:d("notRemoved")};return l.length?Object.assign(Object.assign({},s),{errors:l}):s})}function _t(r){let t=`${n(r)}/community/createGroup`;return r.params=Object.assign(Object.assign({},r.params),r.group),a(t,r)}function Jt(r){let t=`${n(r)}/community/groups/${r.id}/protect`;return a(t,r)}function Vt(r){let t=`${n(r)}/community/groups/${r.id}/unprotect`;return a(t,r)}function Xt(r){let t=`${n(r)}/community/groups/${r.id}/delete`,e=Object.assign({},r);return a(t,e)}function qt(r){return $(r,"group")}function re(r){return $(r,"groupContent")}function ne(r){let t=`${n(r)}/community/groups/${r.group.id}/update`;return r.params=Object.assign(Object.assign({},r.params),r.group),a(t,r)}function C(r){let t=`${n(r)}/community/groups/${r.id}/updateUsers`,e={authentication:r.authentication,params:{}};return r.newMemberType==="admin"?e.params.admins=r.users:e.params.users=r.users,a(t,e)}async function y(r){var t;if(r.username)return encodeURIComponent(r.username);if(!((t=r.authentication)===null||t===void 0)&&t.username)return encodeURIComponent(r.authentication.username);if(r.authentication)return r.authentication.getUsername().then(encodeURIComponent)}async function I(r){let t,e={httpMethod:"GET"};if(typeof r=="string")t=`https://www.arcgis.com/sharing/rest/community/users/${r}`;else{let o=await y(r);t=`${n(r)}/community/users/${o}`,e=Object.assign(Object.assign({},r),e)}return a(t,e)}async function Qe(r){let t=await r.authentication.getUsername(),e=A(r,t);return k(r,t)?D(e,r):S(r).then(o=>{if(o)return D(e,r);throw Error(`This item can not be shared by ${t}. They are neither the item owner nor an organization admin.`)})}function D(r,t){return t.params=Object.assign({org:!1,everyone:!1},t.params),t.access==="private"&&(t.params.groups=" "),t.access==="org"&&(t.params.org=!0),t.access==="public"&&(t.params.account=!0,t.params.everyone=!0),a(r,t)}function G(r){let t={q:`id: ${r.id} AND group: ${r.groupId}`,start:1,num:10,sortField:"title",authentication:r.authentication,httpMethod:"POST"};return N(t).then(e=>{let o=!1;if(e.total>0)return o=e.results.some(i=>i.id===r.id),o})}async function io(r){return G(r).then(async t=>{if(t)return{itemId:r.id,shortcut:!0,notSharedWith:[]};let{owner:e,confirmItemControl:o}=r,i=await r.authentication.getUsername(),m=e||i;if(m!==i){let c=!1,d=!1;return Promise.all([I({username:i,authentication:r.authentication}),I({username:m,authentication:r.authentication}),P(r)]).then(([l,s,f])=>{let g=!!o;return c=l.role==="org_admin"&&!l.roleId,d=l.orgId!==s.orgId,L(l,g,f,c,s,r)}).then(l=>{let[{revert:s}={promise:Promise.resolve({notAdded:[]}),revert:f=>Promise.resolve(f)}]=l;return Promise.all(l.map(({promise:f})=>f)).then(()=>W(r,c,d)).then(f=>s(f))})}return W(r)}).then(t=>{if(t.notSharedWith.length)throw Error(`Item ${r.id} could not be shared to group ${r.groupId}.`);return t})}function L(r,t,e,o,i,m){let c=[];if(m.groupId!==r.favGroupId){if(t){if(!o)throw Error(`This item can not be shared to shared editing group ${m.groupId} by ${r.username} as they not the item owner or org admin.`);c.push(R(r,r,!1,`Error adding ${r.username} as member to edit group ${m.groupId}. Consequently item ${m.id} was not shared to the group.`,m),R(r,i,!0,e==="none"?`Error adding user ${i.username} to edit group ${m.groupId}. Consequently item ${m.id} was not shared to the group.`:`Error promoting user ${i.username} to admin in edit group ${m.groupId}. Consequently item ${m.id} was not shared to the group.`,m))}else if(o)c.push(R(r,r,!1,`Error adding ${r.username} as member to view group ${m.groupId}. Consequently item ${m.id} was not shared to the group.`,m));else if(e==="none")throw new Error(`This item can not be shared by ${r.username} as they are not a member of the specified group ${m.groupId}.`)}return c}async function W(r,t=!1,e=!1){let o=await r.authentication.getUsername(),i=r.owner||o,m=`${n(r)}/content/items/${r.id}/share`;return(i===o||t&&!e)&&(m=`${n(r)}/content/users/${i}/items/${r.id}/share`),r.params={groups:r.groupId,confirmItemControl:r.confirmItemControl},a(m,r)}function R(r,t,e,o,i){let m=t.groups||[],c=m.find(s=>s.id===i.groupId);if(r.orgId!==t.orgId)throw Error(`User ${t.username} is not a member of the same org as ${r.username}. Consequently they can not be added added to group ${i.groupId} nor can item ${i.id} be shared to the group.`);if(!c&&m.length>511)throw Error(`User ${t.username} already has 512 groups, and can not be added to group ${i.groupId}. Consequently item ${i.id} can not be shared to the group.`);let d,l;if(c)e&&c.userMembership.memberType==="member"?(d=C({id:i.groupId,users:[t.username],newMemberType:"admin",authentication:i.authentication}).then(s=>{let f=s.results.reduce((g,w)=>(w.success||g.push(w.username),g),[]);return Promise.resolve({notAdded:f})}).catch(()=>({notAdded:[t.username]})),l=s=>C({id:i.groupId,users:[t.username],newMemberType:"member",authentication:i.authentication}).then(()=>s).catch(()=>s)):(d=Promise.resolve({notAdded:[]}),l=s=>Promise.resolve(s));else{let s=e?"admins":"users";d=_({id:i.groupId,[s]:[t.username],authentication:i.authentication}).then(f=>{if(f.errors&&f.errors.length)throw f.errors[0];return f}).catch(()=>({notAdded:[t.username]})),l=f=>B({id:i.groupId,users:[t.username],authentication:i.authentication}).then(()=>f)}return{promise:d.then(s=>{if(s.notAdded.length)throw new Error(o);return s}),revert:l}}function ho(r){return G(r).then(async t=>{if(!t)return Promise.resolve({itemId:r.id,shortcut:!0,notUnsharedFrom:[]});let{owner:e}=r,o=await r.authentication.getUsername();return Promise.all([P(r),I({username:o,authentication:r.authentication})]).then(([i,m])=>{let d=(e||o)===o,l=m.role==="org_admin"&&!m.roleId;if(!d&&!l&&["admin","owner"].indexOf(i)<0)throw Error(`This item can not be unshared from group ${r.groupId} by ${o} as they not the item owner, an org admin, group admin or group owner.`);return Q(r)}).then(i=>{if(i.notUnsharedFrom.length)throw Error(`Item ${r.id} could not be unshared to group ${r.groupId}`);return i})})}async function Q(r){let t=await r.authentication.getUsername(),e=r.owner||t,o=`${n(r)}/content/items/${r.id}/unshare`;return e===t&&(o=`${n(r)}/content/users/${e}/items/${r.id}/unshare`),r.params={groups:r.groupId},a(o,r)}function Uo(r){return K(null,r)}function K(r,t){let e=r||"self",o=`${n(t)}/portals/${e}`,i=Object.assign({httpMethod:"GET"},t);return a(o,i)}export{n as a,u as b,Y as c,jr as d,vr as e,Rr as f,Er as g,Wr as h,z as i,Yr as j,ar as k,ir as l,mr as m,cr as n,Zr as o,Or as p,M as q,et as r,dr as s,hr as t,pr as u,x as v,N as w,B as x,_t as y,Jt as z,Vt as A,Xt as B,qt as C,re as D,ne as E,I as F,Qe as G,io as H,ho as I,Uo as J,K,br as L};
@@ -1,4 +1,4 @@
1
1
  /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
2
  See https://js.arcgis.com/1.2/esri/copyright.txt for details.
3
- v1.2.0-next.35 */
3
+ v1.2.0-next.37 */
4
4
  function s(n,r){return Object.keys(n).reduce(function(i,t){return i[t]=r(n[t],t,n),i},{})}function o(n,r,e){if(e=e||"",Array.isArray(n))return n.map(u);return n&&c(n)&&!a(n)&&!x(n)&&!p(n)?Object.assign({},n,s(n,u)):r(n,e);function u(i,t){let f=""+(e?e+"."+t:t);return o(i,r,f)}}function l(n){return typeof n=="string"||n instanceof String}function a(n){return n instanceof Date}function p(n){return typeof n=="function"}function c(n){return typeof n=="object"}function x(n){return n instanceof RegExp}export{o as a,l as b,c,x as d};
@@ -1,4 +1,4 @@
1
1
  /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
2
  See https://js.arcgis.com/1.2/esri/copyright.txt for details.
3
- v1.2.0-next.35 */
4
- import{b as t,c as e}from"./CN56TZC4.js";var r=["hub:channel:create","hub:channel:edit"],p={type:"object",properties:{name:{type:"string"},blockWords:{type:"string",format:"blockWords"},publicConfigs:{type:"array",items:{type:"object",properties:{key:{type:"string"},entityId:{type:"string"},entityType:{type:"string"},roles:{type:"object",properties:{anonymous:{type:"object",properties:{value:{type:"string",enum:[t,e.channelRead],default:t},id:{type:"string"}}},authenticated:{type:"object",properties:{value:{type:"string",enum:[t,e.channelRead,e.channelReadWrite],default:t},id:{type:"string"}}}}}}}},orgConfigs:{type:"array",items:{type:"object",properties:{key:{type:"string"},entityId:{type:"string"},entityType:{type:"string"},roles:{type:"object",properties:{member:{type:"object",properties:{value:{type:"string",enum:[t,e.channelRead,e.channelReadWrite],default:t},id:{type:"string"}}},admin:{type:"object",properties:{value:{type:"string",enum:[e.channelOwner],default:e.channelOwner},id:{type:"string"}}}}}}}},groupConfigs:{type:"array",items:{type:"object",properties:{key:{type:"string"},entityId:{type:"string"},entityType:{type:"string"},roles:{type:"object",properties:{member:{type:"object",properties:{value:{type:"string",enum:[t,e.channelRead,e.channelReadWrite],default:t},id:{type:"string"}}},admin:{type:"object",properties:{value:{type:"string",enum:[t,e.channelRead,e.channelReadWrite,e.channelManage],default:t},id:{type:"string"}}}}}}}},userConfigs:{type:"array",items:{type:"object",properties:{key:{type:"string"},entityId:{type:"string"},entityType:{type:"string"},roles:{type:"object",properties:{user:{type:"object",properties:{value:{type:"string",enum:[t,e.channelRead,e.channelReadWrite],default:t},id:{type:"string"}}}}}}}},allowAsAnonymous:{type:"boolean",default:!1}},required:["name"]};export{r as a,p as b};
3
+ v1.2.0-next.37 */
4
+ import{b as t,c as e}from"./MKGO4FB3.js";var r=["hub:channel:create","hub:channel:edit"],p={type:"object",properties:{name:{type:"string"},blockWords:{type:"string",format:"blockWords"},publicConfigs:{type:"array",items:{type:"object",properties:{key:{type:"string"},entityId:{type:"string"},entityType:{type:"string"},roles:{type:"object",properties:{anonymous:{type:"object",properties:{value:{type:"string",enum:[t,e.channelRead],default:t},id:{type:"string"}}},authenticated:{type:"object",properties:{value:{type:"string",enum:[t,e.channelRead,e.channelReadWrite],default:t},id:{type:"string"}}}}}}}},orgConfigs:{type:"array",items:{type:"object",properties:{key:{type:"string"},entityId:{type:"string"},entityType:{type:"string"},roles:{type:"object",properties:{member:{type:"object",properties:{value:{type:"string",enum:[t,e.channelRead,e.channelReadWrite],default:t},id:{type:"string"}}},admin:{type:"object",properties:{value:{type:"string",enum:[e.channelOwner],default:e.channelOwner},id:{type:"string"}}}}}}}},groupConfigs:{type:"array",items:{type:"object",properties:{key:{type:"string"},entityId:{type:"string"},entityType:{type:"string"},roles:{type:"object",properties:{member:{type:"object",properties:{value:{type:"string",enum:[t,e.channelRead,e.channelReadWrite],default:t},id:{type:"string"}}},admin:{type:"object",properties:{value:{type:"string",enum:[t,e.channelRead,e.channelReadWrite,e.channelManage],default:t},id:{type:"string"}}}}}}}},userConfigs:{type:"array",items:{type:"object",properties:{key:{type:"string"},entityId:{type:"string"},entityType:{type:"string"},roles:{type:"object",properties:{user:{type:"object",properties:{value:{type:"string",enum:[t,e.channelRead,e.channelReadWrite],default:t},id:{type:"string"}}}}}}}},allowAsAnonymous:{type:"boolean",default:!1}},required:["name"]};export{r as a,p as b};
@@ -1,4 +1,4 @@
1
1
  /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
2
  See https://js.arcgis.com/1.2/esri/copyright.txt for details.
3
- v1.2.0-next.35 */
4
- import{e,f as t}from"./4JD2T6JR.js";import"./6UZSVHNV.js";var n={type:"object",properties:{selectionMode:{type:"string",enum:["dynamic","manual"],default:"dynamic"},entityIds:{type:"array",items:{type:"string"},default:[]},eventIds:{type:"array",items:{type:"string"},default:[]},corners:{type:"string",enum:["square","round"],default:"square"},shadow:{type:"string",enum:["none","low","medium","heavy"],default:"none"},showAdditionalInfo:{type:"boolean",default:!0},access:{type:"array",items:{type:"string",enum:["private","org","public"]},default:[]},tags:e,categories:t,titleHeading:{type:"string",enum:["h1","h2","h3","h4","h5","h6"],default:"h4"},openIn:{type:"string",enum:["same","new"],default:"same"},layout:{type:"string",enum:["list","map","calendar"],default:"list"}}};export{n as EventGalleryCardSchema};
3
+ v1.2.0-next.37 */
4
+ import{e,f as t}from"./ZPJJ3H5I.js";import"./NAEBOEYF.js";var n={type:"object",properties:{selectionMode:{type:"string",enum:["dynamic","manual"],default:"dynamic"},entityIds:{type:"array",items:{type:"string"},default:[]},eventIds:{type:"array",items:{type:"string"},default:[]},corners:{type:"string",enum:["square","round"],default:"square"},shadow:{type:"string",enum:["none","low","medium","heavy"],default:"none"},showAdditionalInfo:{type:"boolean",default:!0},access:{type:"array",items:{type:"string",enum:["private","org","public"]},default:[]},tags:e,categories:t,titleHeading:{type:"string",enum:["h1","h2","h3","h4","h5","h6"],default:"h4"},openIn:{type:"string",enum:["same","new"],default:"same"},layout:{type:"string",enum:["list","map","calendar"],default:"list"}}};export{n as EventGalleryCardSchema};
@@ -1,4 +1,4 @@
1
1
  /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
2
  See https://js.arcgis.com/1.2/esri/copyright.txt for details.
3
- v1.2.0-next.35 */
4
- import"./6UZSVHNV.js";var t={type:"object",required:[],properties:{entityId:{type:"array",items:{type:"string"},maxItems:1},callToActionText:{type:"string"},callToActionAlign:{enum:["start","center","end"],default:"center",type:"string"},buttonText:{type:"string",default:"Follow"},unfollowButtonText:{type:"string",default:"Unfollow"},buttonAlign:{enum:["start","center","end"],default:"center",type:"string"},buttonStyle:{type:"string",enum:["solid","outline-fill"],default:"solid"}}};export{t as FollowSchema};
3
+ v1.2.0-next.37 */
4
+ import"./NAEBOEYF.js";var t={type:"object",required:[],properties:{entityId:{type:"array",items:{type:"string"},maxItems:1},callToActionText:{type:"string"},callToActionAlign:{enum:["start","center","end"],default:"center",type:"string"},buttonText:{type:"string",default:"Follow"},unfollowButtonText:{type:"string",default:"Unfollow"},buttonAlign:{enum:["start","center","end"],default:"center",type:"string"},buttonStyle:{type:"string",enum:["solid","outline-fill"],default:"solid"}}};export{t as FollowSchema};
@@ -1,4 +1,4 @@
1
1
  /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
2
  See https://js.arcgis.com/1.2/esri/copyright.txt for details.
3
- v1.2.0-next.35 */
4
- import{a as F}from"./MPODIKYY.js";import{a as Y}from"./AAXE4NNV.js";import{a as w}from"./E4DP6L26.js";import{a as J}from"./GWNEUXVW.js";import{a as W,b as H}from"./66IIONNC.js";import{b as h,c as E}from"./APZG4DQ2.js";import"./WXEDRX6B.js";import{d as N,g as B,h as V,i as X}from"./CJ2LQ2KZ.js";import{m as u,p as T}from"./JIP3YG24.js";import"./QGM6TJLI.js";import"./QW6SMLEJ.js";import{b as S,d as C,f as R}from"./6EDB6GK3.js";import"./ZE3S7KFP.js";import{i as j}from"./PGVJ7TAF.js";import"./66NEFBOE.js";import{a as m,c as M,e as P,i as l}from"./SDSPTQ4P.js";import"./TOVO7FLD.js";import"./IWI73FFP.js";import"./EBGWAP5Z.js";import{a as A,b as O}from"./2SG2PXGL.js";import{s as L}from"./I2OMO5AF.js";import"./6W4SZKHC.js";import"./46X2JXUZ.js";import{a as f}from"./TSVPTY5X.js";import"./LBVSC6V5.js";import"./CN56TZC4.js";import{b as g}from"./UY3VZJPX.js";import"./6UZSVHNV.js";function z(e,o=!1){let{id:i,properties:r}=e,t=r?.slug;return t?S(o?R(t,i):t):i}var y;(function(e){e.BETWEEN="between",e.IS_EXACTLY="isExactly",e.LIKE="like"})(y||(y={}));var d;(function(e){e.visible="visible",e.hidden="hidden",e.featured="featured"})(d||(d={}));function G(e,o){var i;let r=e._slug;delete e._slug;let t=m(e);return t.orgUrlKey=e.orgUrlKey?e.orgUrlKey:o.urlKey||"",t.extent=(i=e.location)===null||i===void 0?void 0:i.extent,r?t.slug=C(r,t.orgUrlKey):t.slug="",t}function Q(e,o){let i=Object.assign(Object.assign({},o),e),r=Object.keys(o);return Object.keys(i).reduce((n,s)=>(r.includes(s)||n.push(s),n),[]).forEach(n=>{delete i[n]}),i}function Z(e,o){let i;return o.authentication&&(i=o.authentication.token),{self:j(e.id,o),siteRelative:T(e.type,z(e),e.typeKeywords),siteRelativeEntityType:T(e.type),workspaceRelative:J(e.type,e.id),thumbnail:u(e,o,i)}}var I="Hub Project",q={catalog:{schemaVersion:0},name:"",permissions:[],schemaVersion:1,status:g.notStarted,tags:[],typeKeywords:[I],view:{contacts:[],featuredContentIds:[],showMap:!0,metricDisplays:[]},features:A},ee={item:{type:I,title:"",description:"",snippet:"",tags:[],typeKeywords:[I],properties:{slug:"",schemaVersion:1}},data:{display:"about",permissions:[],catalog:{schemaVersion:0},status:g.notStarted,view:{contacts:[],featuredContentIds:[],showMap:!0,metricDisplays:[]}}};function te(e,o){return Z(e,o)}function K(e,o,i){var r,t;let n;return i.authentication&&(n=i.authentication.token),o=H(e.item,o),o.thumbnailUrl=u(e.item,i,n),o.view=Object.assign(Object.assign({},e.data.view),{featuredImageUrl:(r=e.data.view)===null||r===void 0?void 0:r.featuredImageUrl}),o.catalog=Y(o.catalog||{}),o.features=Q(((t=e.data.settings)===null||t===void 0?void 0:t.features)||{},O),o.links=te(e.item,i),o}function b(){let e=W();return e.push({entityKey:"status",storeKey:"data.status"}),e.push({entityKey:"catalog",storeKey:"data.catalog"}),e.push({entityKey:"content",storeKey:"data.content"}),e.push({entityKey:"events",storeKey:"data.events"}),e.push({entityKey:"permissions",storeKey:"data.permissions"}),e.push({entityKey:"features",storeKey:"data.settings.features"}),e.push({entityKey:"location",storeKey:"item.properties.location"}),e.push({entityKey:"metrics",storeKey:"item.properties.metrics"}),e}function ie(e={displayType:"stat-card",metricId:void 0},o,i){let{value:r,valueType:t,dynamicMetric:n}=e,s=F(e,["value","valueType","dynamicMetric"]),{layerId:a,itemId:c,field:p,statistic:_,serviceUrl:oe,fieldType:se,sourceLink:x,sourceTitle:k,allowExpressionSet:D,expressionSet:$,legacyWhere:U}=n||{},{entityInfo:ne,metricName:ae}=i||{},ce={source:e.type==="dynamic"?{type:"service-query",serviceUrl:oe,layerId:a,field:p,statistic:_,where:U||pe(D?$:[])}:{type:"static-value",value:r,valueType:t},name:ae||o,entityInfo:ne||{id:void 0,name:void 0,type:void 0},id:o};delete s.itemId;let me=Object.assign(Object.assign({},s),{displayType:s.displayType||"stat-card",visibility:s.visibility||d.hidden,metricId:o,fieldType:se,itemId:c,expressionSet:$,allowExpressionSet:D,statistic:_,sourceLink:e.type==="dynamic"&&x?x:s.sourceLink,sourceTitle:e.type==="dynamic"&&k?k:s.sourceTitle,allowLink:e.type==="dynamic"?s.allowDynamicLink:s.allowLink,type:e.type});return{metric:ce,displayConfig:me}}function pe(e=[]){let o=e.map(i=>{let{field:r,values:t,relationship:n}=i,s=c=>c.replace&&c.replace(/(['])/g,"$1$1");if(!t||!t.length||!r||!r.name)return!1;let a;switch(r.type){case"esriFieldTypeString":a=n===y.LIKE?`${r.name} like '%${t[0]}%'`:`(${r.name} IN (${t.map(c=>`'${s(c)}'`).join(", ")}))`;break;case"esriFieldTypeDate":typeof t[0]=="string"&&(a=`${r.name} >= timestamp '${s(t[0])} 00:00:00'`),typeof t[1]=="string"&&(a=`${r.name} <= timestamp '${s(t[1])} 23:59:59'`),typeof t[0]=="string"&&typeof t[1]=="string"&&(a=`${r.name} >= timestamp '${s(t[0])} 00:00:00' AND ${r.name} <= timestamp '${s(t[1])} 23:59:59'`);break;default:l(t[0])||(a=`(${r.name}) >= ${t[0]}`),l(t[1])||(a=`(${r.name}) <= ${t[1]}`),!l(t[0])&&!l(t[1])&&(a=`(${r.name}) >= ${t[0]} AND (${r.name}) <= ${t[1]}`);break}return a}).filter(Boolean).join(" AND ")||"1=1";return encodeURIComponent(o)}function v(e,o){let i=e.filter(r=>!r.startsWith("status|"));return i.push(`status|${o}`),i}function re(e,o,i){let r=m(e),t=o.id,n=f(r,"metrics",[]),s=n.findIndex(p=>p.id===t),a=f(r,"view.metricDisplays",[]),c=a.findIndex(p=>p.metricId===t);return s>-1?n[s]=o:n.push(o),c>-1?a[c]=i:a.push(i),r.view.metricDisplays=a,r.metrics=n,r}async function ct(e,o){let i=Object.assign(Object.assign({},q),e);i.slug||(i.slug=N(i.name,i.orgUrlKey)),await w(i,o),i.typeKeywords=v(i.typeKeywords,i.status),i.typeKeywords=h(i.typeKeywords,i.isDiscussable);let r=new E(b()),t=r.entityToStore(i,m(ee));t=await V(t,o);let n=r.storeToEntity(t,{});return n=K(t,n,o),n}function mt(e,o){var i;let r=e._metric;delete e._groups,delete e._thumbnail,(i=e.view)===null||i===void 0||delete i.featuredImage,delete e._metric,delete e._groups;let t=G(e,o);if(r&&Object.keys(r).length){let n=r.metricId||M(P(`${r.cardTitle}_`)),{metric:s,displayConfig:a}=ie(r,n,{metricName:r.cardTitle});t=re(t,s,a)}return t}async function pt(e,o){await w(e,o),e.typeKeywords=v(e.typeKeywords,e.status),e.typeKeywords=h(e.typeKeywords,e.isDiscussable);let i=await B(e.id,o),r=new E(b()),t=r.entityToStore(e,i),n=await X(t,o),s=r.storeToEntity(n,e);return s=K(i,s,o),s}async function lt(e,o){let i=Object.assign(Object.assign({},o),{id:e});await L(i)}export{ct as createProject,lt as deleteProject,mt as editorToProject,pt as updateProject};
3
+ v1.2.0-next.37 */
4
+ import{a as F}from"./TENPACT4.js";import{a as Y}from"./SDCYJLL6.js";import{a as w}from"./WSPGBA5V.js";import{a as J}from"./L5MQY34Z.js";import{a as W,b as H}from"./TBUT4K52.js";import{b as h,c as E}from"./K3SBDFS5.js";import"./GHHGZTF2.js";import{d as N,g as B,h as V,i as X}from"./YGWIZXL6.js";import{m as u,p as T}from"./YZR4IOOG.js";import"./3BQPEIW4.js";import"./WVD743FV.js";import{b as S,d as C,f as R}from"./OSXEN5JP.js";import"./YTAA5GHS.js";import{i as j}from"./LASDKRI4.js";import"./YAX3KOMD.js";import{a as m,c as M,e as P,i as l}from"./A3NNJFSP.js";import"./5TVCMZSS.js";import"./TDLHGHAT.js";import"./RCCXKNQ4.js";import{a as A,b as O}from"./UVQ562IF.js";import{s as L}from"./HSNKQLTD.js";import"./DTQRFAUA.js";import"./PM2UKFMR.js";import{a as f}from"./LSSZKYSS.js";import"./SOHBYYBW.js";import"./MKGO4FB3.js";import{b as g}from"./PTGWJCD4.js";import"./NAEBOEYF.js";function z(e,o=!1){let{id:i,properties:r}=e,t=r?.slug;return t?S(o?R(t,i):t):i}var y;(function(e){e.BETWEEN="between",e.IS_EXACTLY="isExactly",e.LIKE="like"})(y||(y={}));var d;(function(e){e.visible="visible",e.hidden="hidden",e.featured="featured"})(d||(d={}));function G(e,o){var i;let r=e._slug;delete e._slug;let t=m(e);return t.orgUrlKey=e.orgUrlKey?e.orgUrlKey:o.urlKey||"",t.extent=(i=e.location)===null||i===void 0?void 0:i.extent,r?t.slug=C(r,t.orgUrlKey):t.slug="",t}function Q(e,o){let i=Object.assign(Object.assign({},o),e),r=Object.keys(o);return Object.keys(i).reduce((n,s)=>(r.includes(s)||n.push(s),n),[]).forEach(n=>{delete i[n]}),i}function Z(e,o){let i;return o.authentication&&(i=o.authentication.token),{self:j(e.id,o),siteRelative:T(e.type,z(e),e.typeKeywords),siteRelativeEntityType:T(e.type),workspaceRelative:J(e.type,e.id),thumbnail:u(e,o,i)}}var I="Hub Project",q={catalog:{schemaVersion:0},name:"",permissions:[],schemaVersion:1,status:g.notStarted,tags:[],typeKeywords:[I],view:{contacts:[],featuredContentIds:[],showMap:!0,metricDisplays:[]},features:A},ee={item:{type:I,title:"",description:"",snippet:"",tags:[],typeKeywords:[I],properties:{slug:"",schemaVersion:1}},data:{display:"about",permissions:[],catalog:{schemaVersion:0},status:g.notStarted,view:{contacts:[],featuredContentIds:[],showMap:!0,metricDisplays:[]}}};function te(e,o){return Z(e,o)}function K(e,o,i){var r,t;let n;return i.authentication&&(n=i.authentication.token),o=H(e.item,o),o.thumbnailUrl=u(e.item,i,n),o.view=Object.assign(Object.assign({},e.data.view),{featuredImageUrl:(r=e.data.view)===null||r===void 0?void 0:r.featuredImageUrl}),o.catalog=Y(o.catalog||{}),o.features=Q(((t=e.data.settings)===null||t===void 0?void 0:t.features)||{},O),o.links=te(e.item,i),o}function b(){let e=W();return e.push({entityKey:"status",storeKey:"data.status"}),e.push({entityKey:"catalog",storeKey:"data.catalog"}),e.push({entityKey:"content",storeKey:"data.content"}),e.push({entityKey:"events",storeKey:"data.events"}),e.push({entityKey:"permissions",storeKey:"data.permissions"}),e.push({entityKey:"features",storeKey:"data.settings.features"}),e.push({entityKey:"location",storeKey:"item.properties.location"}),e.push({entityKey:"metrics",storeKey:"item.properties.metrics"}),e}function ie(e={displayType:"stat-card",metricId:void 0},o,i){let{value:r,valueType:t,dynamicMetric:n}=e,s=F(e,["value","valueType","dynamicMetric"]),{layerId:a,itemId:c,field:p,statistic:_,serviceUrl:oe,fieldType:se,sourceLink:x,sourceTitle:k,allowExpressionSet:D,expressionSet:$,legacyWhere:U}=n||{},{entityInfo:ne,metricName:ae}=i||{},ce={source:e.type==="dynamic"?{type:"service-query",serviceUrl:oe,layerId:a,field:p,statistic:_,where:U||pe(D?$:[])}:{type:"static-value",value:r,valueType:t},name:ae||o,entityInfo:ne||{id:void 0,name:void 0,type:void 0},id:o};delete s.itemId;let me=Object.assign(Object.assign({},s),{displayType:s.displayType||"stat-card",visibility:s.visibility||d.hidden,metricId:o,fieldType:se,itemId:c,expressionSet:$,allowExpressionSet:D,statistic:_,sourceLink:e.type==="dynamic"&&x?x:s.sourceLink,sourceTitle:e.type==="dynamic"&&k?k:s.sourceTitle,allowLink:e.type==="dynamic"?s.allowDynamicLink:s.allowLink,type:e.type});return{metric:ce,displayConfig:me}}function pe(e=[]){let o=e.map(i=>{let{field:r,values:t,relationship:n}=i,s=c=>c.replace&&c.replace(/(['])/g,"$1$1");if(!t||!t.length||!r||!r.name)return!1;let a;switch(r.type){case"esriFieldTypeString":a=n===y.LIKE?`${r.name} like '%${t[0]}%'`:`(${r.name} IN (${t.map(c=>`'${s(c)}'`).join(", ")}))`;break;case"esriFieldTypeDate":typeof t[0]=="string"&&(a=`${r.name} >= timestamp '${s(t[0])} 00:00:00'`),typeof t[1]=="string"&&(a=`${r.name} <= timestamp '${s(t[1])} 23:59:59'`),typeof t[0]=="string"&&typeof t[1]=="string"&&(a=`${r.name} >= timestamp '${s(t[0])} 00:00:00' AND ${r.name} <= timestamp '${s(t[1])} 23:59:59'`);break;default:l(t[0])||(a=`(${r.name}) >= ${t[0]}`),l(t[1])||(a=`(${r.name}) <= ${t[1]}`),!l(t[0])&&!l(t[1])&&(a=`(${r.name}) >= ${t[0]} AND (${r.name}) <= ${t[1]}`);break}return a}).filter(Boolean).join(" AND ")||"1=1";return encodeURIComponent(o)}function v(e,o){let i=e.filter(r=>!r.startsWith("status|"));return i.push(`status|${o}`),i}function re(e,o,i){let r=m(e),t=o.id,n=f(r,"metrics",[]),s=n.findIndex(p=>p.id===t),a=f(r,"view.metricDisplays",[]),c=a.findIndex(p=>p.metricId===t);return s>-1?n[s]=o:n.push(o),c>-1?a[c]=i:a.push(i),r.view.metricDisplays=a,r.metrics=n,r}async function ct(e,o){let i=Object.assign(Object.assign({},q),e);i.slug||(i.slug=N(i.name,i.orgUrlKey)),await w(i,o),i.typeKeywords=v(i.typeKeywords,i.status),i.typeKeywords=h(i.typeKeywords,i.isDiscussable);let r=new E(b()),t=r.entityToStore(i,m(ee));t=await V(t,o);let n=r.storeToEntity(t,{});return n=K(t,n,o),n}function mt(e,o){var i;let r=e._metric;delete e._groups,delete e._thumbnail,(i=e.view)===null||i===void 0||delete i.featuredImage,delete e._metric,delete e._groups;let t=G(e,o);if(r&&Object.keys(r).length){let n=r.metricId||M(P(`${r.cardTitle}_`)),{metric:s,displayConfig:a}=ie(r,n,{metricName:r.cardTitle});t=re(t,s,a)}return t}async function pt(e,o){await w(e,o),e.typeKeywords=v(e.typeKeywords,e.status),e.typeKeywords=h(e.typeKeywords,e.isDiscussable);let i=await B(e.id,o),r=new E(b()),t=r.entityToStore(e,i),n=await X(t,o),s=r.storeToEntity(n,e);return s=K(i,s,o),s}async function lt(e,o){let i=Object.assign(Object.assign({},o),{id:e});await L(i)}export{ct as createProject,lt as deleteProject,mt as editorToProject,pt as updateProject};