chunk-GZBNC76D.js 62 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014
  1. import {
  2. n2 as n
  3. } from "./chunk-2Z2TG5CU.js";
  4. import {
  5. t
  6. } from "./chunk-U2XHEJM7.js";
  7. import {
  8. s2 as s
  9. } from "./chunk-E5O6P5I2.js";
  10. // node_modules/@esri/arcgis-html-sanitizer/dist/esm/index.js
  11. var isPlainObject = function(value) {
  12. if (typeof value !== "object" || value === null) {
  13. return false;
  14. }
  15. if (Object.prototype.toString.call(value) !== "[object Object]") {
  16. return false;
  17. }
  18. var proto = Object.getPrototypeOf(value);
  19. if (proto === null) {
  20. return true;
  21. }
  22. while (Object.getPrototypeOf(proto) !== null) {
  23. proto = Object.getPrototypeOf(proto);
  24. }
  25. return Object.getPrototypeOf(value) === proto;
  26. };
  27. var lib$1 = { exports: {} };
  28. var _default$1 = {};
  29. var lib = { exports: {} };
  30. var _default = {};
  31. function getDefaultWhiteList$1() {
  32. var whiteList = {};
  33. whiteList["align-content"] = false;
  34. whiteList["align-items"] = false;
  35. whiteList["align-self"] = false;
  36. whiteList["alignment-adjust"] = false;
  37. whiteList["alignment-baseline"] = false;
  38. whiteList["all"] = false;
  39. whiteList["anchor-point"] = false;
  40. whiteList["animation"] = false;
  41. whiteList["animation-delay"] = false;
  42. whiteList["animation-direction"] = false;
  43. whiteList["animation-duration"] = false;
  44. whiteList["animation-fill-mode"] = false;
  45. whiteList["animation-iteration-count"] = false;
  46. whiteList["animation-name"] = false;
  47. whiteList["animation-play-state"] = false;
  48. whiteList["animation-timing-function"] = false;
  49. whiteList["azimuth"] = false;
  50. whiteList["backface-visibility"] = false;
  51. whiteList["background"] = true;
  52. whiteList["background-attachment"] = true;
  53. whiteList["background-clip"] = true;
  54. whiteList["background-color"] = true;
  55. whiteList["background-image"] = true;
  56. whiteList["background-origin"] = true;
  57. whiteList["background-position"] = true;
  58. whiteList["background-repeat"] = true;
  59. whiteList["background-size"] = true;
  60. whiteList["baseline-shift"] = false;
  61. whiteList["binding"] = false;
  62. whiteList["bleed"] = false;
  63. whiteList["bookmark-label"] = false;
  64. whiteList["bookmark-level"] = false;
  65. whiteList["bookmark-state"] = false;
  66. whiteList["border"] = true;
  67. whiteList["border-bottom"] = true;
  68. whiteList["border-bottom-color"] = true;
  69. whiteList["border-bottom-left-radius"] = true;
  70. whiteList["border-bottom-right-radius"] = true;
  71. whiteList["border-bottom-style"] = true;
  72. whiteList["border-bottom-width"] = true;
  73. whiteList["border-collapse"] = true;
  74. whiteList["border-color"] = true;
  75. whiteList["border-image"] = true;
  76. whiteList["border-image-outset"] = true;
  77. whiteList["border-image-repeat"] = true;
  78. whiteList["border-image-slice"] = true;
  79. whiteList["border-image-source"] = true;
  80. whiteList["border-image-width"] = true;
  81. whiteList["border-left"] = true;
  82. whiteList["border-left-color"] = true;
  83. whiteList["border-left-style"] = true;
  84. whiteList["border-left-width"] = true;
  85. whiteList["border-radius"] = true;
  86. whiteList["border-right"] = true;
  87. whiteList["border-right-color"] = true;
  88. whiteList["border-right-style"] = true;
  89. whiteList["border-right-width"] = true;
  90. whiteList["border-spacing"] = true;
  91. whiteList["border-style"] = true;
  92. whiteList["border-top"] = true;
  93. whiteList["border-top-color"] = true;
  94. whiteList["border-top-left-radius"] = true;
  95. whiteList["border-top-right-radius"] = true;
  96. whiteList["border-top-style"] = true;
  97. whiteList["border-top-width"] = true;
  98. whiteList["border-width"] = true;
  99. whiteList["bottom"] = false;
  100. whiteList["box-decoration-break"] = true;
  101. whiteList["box-shadow"] = true;
  102. whiteList["box-sizing"] = true;
  103. whiteList["box-snap"] = true;
  104. whiteList["box-suppress"] = true;
  105. whiteList["break-after"] = true;
  106. whiteList["break-before"] = true;
  107. whiteList["break-inside"] = true;
  108. whiteList["caption-side"] = false;
  109. whiteList["chains"] = false;
  110. whiteList["clear"] = true;
  111. whiteList["clip"] = false;
  112. whiteList["clip-path"] = false;
  113. whiteList["clip-rule"] = false;
  114. whiteList["color"] = true;
  115. whiteList["color-interpolation-filters"] = true;
  116. whiteList["column-count"] = false;
  117. whiteList["column-fill"] = false;
  118. whiteList["column-gap"] = false;
  119. whiteList["column-rule"] = false;
  120. whiteList["column-rule-color"] = false;
  121. whiteList["column-rule-style"] = false;
  122. whiteList["column-rule-width"] = false;
  123. whiteList["column-span"] = false;
  124. whiteList["column-width"] = false;
  125. whiteList["columns"] = false;
  126. whiteList["contain"] = false;
  127. whiteList["content"] = false;
  128. whiteList["counter-increment"] = false;
  129. whiteList["counter-reset"] = false;
  130. whiteList["counter-set"] = false;
  131. whiteList["crop"] = false;
  132. whiteList["cue"] = false;
  133. whiteList["cue-after"] = false;
  134. whiteList["cue-before"] = false;
  135. whiteList["cursor"] = false;
  136. whiteList["direction"] = false;
  137. whiteList["display"] = true;
  138. whiteList["display-inside"] = true;
  139. whiteList["display-list"] = true;
  140. whiteList["display-outside"] = true;
  141. whiteList["dominant-baseline"] = false;
  142. whiteList["elevation"] = false;
  143. whiteList["empty-cells"] = false;
  144. whiteList["filter"] = false;
  145. whiteList["flex"] = false;
  146. whiteList["flex-basis"] = false;
  147. whiteList["flex-direction"] = false;
  148. whiteList["flex-flow"] = false;
  149. whiteList["flex-grow"] = false;
  150. whiteList["flex-shrink"] = false;
  151. whiteList["flex-wrap"] = false;
  152. whiteList["float"] = false;
  153. whiteList["float-offset"] = false;
  154. whiteList["flood-color"] = false;
  155. whiteList["flood-opacity"] = false;
  156. whiteList["flow-from"] = false;
  157. whiteList["flow-into"] = false;
  158. whiteList["font"] = true;
  159. whiteList["font-family"] = true;
  160. whiteList["font-feature-settings"] = true;
  161. whiteList["font-kerning"] = true;
  162. whiteList["font-language-override"] = true;
  163. whiteList["font-size"] = true;
  164. whiteList["font-size-adjust"] = true;
  165. whiteList["font-stretch"] = true;
  166. whiteList["font-style"] = true;
  167. whiteList["font-synthesis"] = true;
  168. whiteList["font-variant"] = true;
  169. whiteList["font-variant-alternates"] = true;
  170. whiteList["font-variant-caps"] = true;
  171. whiteList["font-variant-east-asian"] = true;
  172. whiteList["font-variant-ligatures"] = true;
  173. whiteList["font-variant-numeric"] = true;
  174. whiteList["font-variant-position"] = true;
  175. whiteList["font-weight"] = true;
  176. whiteList["grid"] = false;
  177. whiteList["grid-area"] = false;
  178. whiteList["grid-auto-columns"] = false;
  179. whiteList["grid-auto-flow"] = false;
  180. whiteList["grid-auto-rows"] = false;
  181. whiteList["grid-column"] = false;
  182. whiteList["grid-column-end"] = false;
  183. whiteList["grid-column-start"] = false;
  184. whiteList["grid-row"] = false;
  185. whiteList["grid-row-end"] = false;
  186. whiteList["grid-row-start"] = false;
  187. whiteList["grid-template"] = false;
  188. whiteList["grid-template-areas"] = false;
  189. whiteList["grid-template-columns"] = false;
  190. whiteList["grid-template-rows"] = false;
  191. whiteList["hanging-punctuation"] = false;
  192. whiteList["height"] = true;
  193. whiteList["hyphens"] = false;
  194. whiteList["icon"] = false;
  195. whiteList["image-orientation"] = false;
  196. whiteList["image-resolution"] = false;
  197. whiteList["ime-mode"] = false;
  198. whiteList["initial-letters"] = false;
  199. whiteList["inline-box-align"] = false;
  200. whiteList["justify-content"] = false;
  201. whiteList["justify-items"] = false;
  202. whiteList["justify-self"] = false;
  203. whiteList["left"] = false;
  204. whiteList["letter-spacing"] = true;
  205. whiteList["lighting-color"] = true;
  206. whiteList["line-box-contain"] = false;
  207. whiteList["line-break"] = false;
  208. whiteList["line-grid"] = false;
  209. whiteList["line-height"] = false;
  210. whiteList["line-snap"] = false;
  211. whiteList["line-stacking"] = false;
  212. whiteList["line-stacking-ruby"] = false;
  213. whiteList["line-stacking-shift"] = false;
  214. whiteList["line-stacking-strategy"] = false;
  215. whiteList["list-style"] = true;
  216. whiteList["list-style-image"] = true;
  217. whiteList["list-style-position"] = true;
  218. whiteList["list-style-type"] = true;
  219. whiteList["margin"] = true;
  220. whiteList["margin-bottom"] = true;
  221. whiteList["margin-left"] = true;
  222. whiteList["margin-right"] = true;
  223. whiteList["margin-top"] = true;
  224. whiteList["marker-offset"] = false;
  225. whiteList["marker-side"] = false;
  226. whiteList["marks"] = false;
  227. whiteList["mask"] = false;
  228. whiteList["mask-box"] = false;
  229. whiteList["mask-box-outset"] = false;
  230. whiteList["mask-box-repeat"] = false;
  231. whiteList["mask-box-slice"] = false;
  232. whiteList["mask-box-source"] = false;
  233. whiteList["mask-box-width"] = false;
  234. whiteList["mask-clip"] = false;
  235. whiteList["mask-image"] = false;
  236. whiteList["mask-origin"] = false;
  237. whiteList["mask-position"] = false;
  238. whiteList["mask-repeat"] = false;
  239. whiteList["mask-size"] = false;
  240. whiteList["mask-source-type"] = false;
  241. whiteList["mask-type"] = false;
  242. whiteList["max-height"] = true;
  243. whiteList["max-lines"] = false;
  244. whiteList["max-width"] = true;
  245. whiteList["min-height"] = true;
  246. whiteList["min-width"] = true;
  247. whiteList["move-to"] = false;
  248. whiteList["nav-down"] = false;
  249. whiteList["nav-index"] = false;
  250. whiteList["nav-left"] = false;
  251. whiteList["nav-right"] = false;
  252. whiteList["nav-up"] = false;
  253. whiteList["object-fit"] = false;
  254. whiteList["object-position"] = false;
  255. whiteList["opacity"] = false;
  256. whiteList["order"] = false;
  257. whiteList["orphans"] = false;
  258. whiteList["outline"] = false;
  259. whiteList["outline-color"] = false;
  260. whiteList["outline-offset"] = false;
  261. whiteList["outline-style"] = false;
  262. whiteList["outline-width"] = false;
  263. whiteList["overflow"] = false;
  264. whiteList["overflow-wrap"] = false;
  265. whiteList["overflow-x"] = false;
  266. whiteList["overflow-y"] = false;
  267. whiteList["padding"] = true;
  268. whiteList["padding-bottom"] = true;
  269. whiteList["padding-left"] = true;
  270. whiteList["padding-right"] = true;
  271. whiteList["padding-top"] = true;
  272. whiteList["page"] = false;
  273. whiteList["page-break-after"] = false;
  274. whiteList["page-break-before"] = false;
  275. whiteList["page-break-inside"] = false;
  276. whiteList["page-policy"] = false;
  277. whiteList["pause"] = false;
  278. whiteList["pause-after"] = false;
  279. whiteList["pause-before"] = false;
  280. whiteList["perspective"] = false;
  281. whiteList["perspective-origin"] = false;
  282. whiteList["pitch"] = false;
  283. whiteList["pitch-range"] = false;
  284. whiteList["play-during"] = false;
  285. whiteList["position"] = false;
  286. whiteList["presentation-level"] = false;
  287. whiteList["quotes"] = false;
  288. whiteList["region-fragment"] = false;
  289. whiteList["resize"] = false;
  290. whiteList["rest"] = false;
  291. whiteList["rest-after"] = false;
  292. whiteList["rest-before"] = false;
  293. whiteList["richness"] = false;
  294. whiteList["right"] = false;
  295. whiteList["rotation"] = false;
  296. whiteList["rotation-point"] = false;
  297. whiteList["ruby-align"] = false;
  298. whiteList["ruby-merge"] = false;
  299. whiteList["ruby-position"] = false;
  300. whiteList["shape-image-threshold"] = false;
  301. whiteList["shape-outside"] = false;
  302. whiteList["shape-margin"] = false;
  303. whiteList["size"] = false;
  304. whiteList["speak"] = false;
  305. whiteList["speak-as"] = false;
  306. whiteList["speak-header"] = false;
  307. whiteList["speak-numeral"] = false;
  308. whiteList["speak-punctuation"] = false;
  309. whiteList["speech-rate"] = false;
  310. whiteList["stress"] = false;
  311. whiteList["string-set"] = false;
  312. whiteList["tab-size"] = false;
  313. whiteList["table-layout"] = false;
  314. whiteList["text-align"] = true;
  315. whiteList["text-align-last"] = true;
  316. whiteList["text-combine-upright"] = true;
  317. whiteList["text-decoration"] = true;
  318. whiteList["text-decoration-color"] = true;
  319. whiteList["text-decoration-line"] = true;
  320. whiteList["text-decoration-skip"] = true;
  321. whiteList["text-decoration-style"] = true;
  322. whiteList["text-emphasis"] = true;
  323. whiteList["text-emphasis-color"] = true;
  324. whiteList["text-emphasis-position"] = true;
  325. whiteList["text-emphasis-style"] = true;
  326. whiteList["text-height"] = true;
  327. whiteList["text-indent"] = true;
  328. whiteList["text-justify"] = true;
  329. whiteList["text-orientation"] = true;
  330. whiteList["text-overflow"] = true;
  331. whiteList["text-shadow"] = true;
  332. whiteList["text-space-collapse"] = true;
  333. whiteList["text-transform"] = true;
  334. whiteList["text-underline-position"] = true;
  335. whiteList["text-wrap"] = true;
  336. whiteList["top"] = false;
  337. whiteList["transform"] = false;
  338. whiteList["transform-origin"] = false;
  339. whiteList["transform-style"] = false;
  340. whiteList["transition"] = false;
  341. whiteList["transition-delay"] = false;
  342. whiteList["transition-duration"] = false;
  343. whiteList["transition-property"] = false;
  344. whiteList["transition-timing-function"] = false;
  345. whiteList["unicode-bidi"] = false;
  346. whiteList["vertical-align"] = false;
  347. whiteList["visibility"] = false;
  348. whiteList["voice-balance"] = false;
  349. whiteList["voice-duration"] = false;
  350. whiteList["voice-family"] = false;
  351. whiteList["voice-pitch"] = false;
  352. whiteList["voice-range"] = false;
  353. whiteList["voice-rate"] = false;
  354. whiteList["voice-stress"] = false;
  355. whiteList["voice-volume"] = false;
  356. whiteList["volume"] = false;
  357. whiteList["white-space"] = false;
  358. whiteList["widows"] = false;
  359. whiteList["width"] = true;
  360. whiteList["will-change"] = false;
  361. whiteList["word-break"] = true;
  362. whiteList["word-spacing"] = true;
  363. whiteList["word-wrap"] = true;
  364. whiteList["wrap-flow"] = false;
  365. whiteList["wrap-through"] = false;
  366. whiteList["writing-mode"] = false;
  367. whiteList["z-index"] = false;
  368. return whiteList;
  369. }
  370. function onAttr(name, value, options) {
  371. }
  372. function onIgnoreAttr(name, value, options) {
  373. }
  374. var REGEXP_URL_JAVASCRIPT = /javascript\s*\:/img;
  375. function safeAttrValue$1(name, value) {
  376. if (REGEXP_URL_JAVASCRIPT.test(value))
  377. return "";
  378. return value;
  379. }
  380. _default.whiteList = getDefaultWhiteList$1();
  381. _default.getDefaultWhiteList = getDefaultWhiteList$1;
  382. _default.onAttr = onAttr;
  383. _default.onIgnoreAttr = onIgnoreAttr;
  384. _default.safeAttrValue = safeAttrValue$1;
  385. var util$1 = {
  386. indexOf: function(arr, item) {
  387. var i4, j;
  388. if (Array.prototype.indexOf) {
  389. return arr.indexOf(item);
  390. }
  391. for (i4 = 0, j = arr.length; i4 < j; i4++) {
  392. if (arr[i4] === item) {
  393. return i4;
  394. }
  395. }
  396. return -1;
  397. },
  398. forEach: function(arr, fn, scope) {
  399. var i4, j;
  400. if (Array.prototype.forEach) {
  401. return arr.forEach(fn, scope);
  402. }
  403. for (i4 = 0, j = arr.length; i4 < j; i4++) {
  404. fn.call(scope, arr[i4], i4, arr);
  405. }
  406. },
  407. trim: function(str) {
  408. if (String.prototype.trim) {
  409. return str.trim();
  410. }
  411. return str.replace(/(^\s*)|(\s*$)/g, "");
  412. },
  413. trimRight: function(str) {
  414. if (String.prototype.trimRight) {
  415. return str.trimRight();
  416. }
  417. return str.replace(/(\s*$)/g, "");
  418. }
  419. };
  420. var _$3 = util$1;
  421. function parseStyle$1(css2, onAttr2) {
  422. css2 = _$3.trimRight(css2);
  423. if (css2[css2.length - 1] !== ";")
  424. css2 += ";";
  425. var cssLength = css2.length;
  426. var isParenthesisOpen = false;
  427. var lastPos = 0;
  428. var i4 = 0;
  429. var retCSS = "";
  430. function addNewAttr() {
  431. if (!isParenthesisOpen) {
  432. var source = _$3.trim(css2.slice(lastPos, i4));
  433. var j2 = source.indexOf(":");
  434. if (j2 !== -1) {
  435. var name = _$3.trim(source.slice(0, j2));
  436. var value = _$3.trim(source.slice(j2 + 1));
  437. if (name) {
  438. var ret = onAttr2(lastPos, retCSS.length, name, value, source);
  439. if (ret)
  440. retCSS += ret + "; ";
  441. }
  442. }
  443. }
  444. lastPos = i4 + 1;
  445. }
  446. for (; i4 < cssLength; i4++) {
  447. var c5 = css2[i4];
  448. if (c5 === "/" && css2[i4 + 1] === "*") {
  449. var j = css2.indexOf("*/", i4 + 2);
  450. if (j === -1)
  451. break;
  452. i4 = j + 1;
  453. lastPos = i4 + 1;
  454. isParenthesisOpen = false;
  455. } else if (c5 === "(") {
  456. isParenthesisOpen = true;
  457. } else if (c5 === ")") {
  458. isParenthesisOpen = false;
  459. } else if (c5 === ";") {
  460. if (isParenthesisOpen)
  461. ;
  462. else {
  463. addNewAttr();
  464. }
  465. } else if (c5 === "\n") {
  466. addNewAttr();
  467. }
  468. }
  469. return _$3.trim(retCSS);
  470. }
  471. var parser$2 = parseStyle$1;
  472. var DEFAULT$1 = _default;
  473. var parseStyle = parser$2;
  474. function isNull$1(obj) {
  475. return obj === void 0 || obj === null;
  476. }
  477. function shallowCopyObject$1(obj) {
  478. var ret = {};
  479. for (var i4 in obj) {
  480. ret[i4] = obj[i4];
  481. }
  482. return ret;
  483. }
  484. function FilterCSS$2(options) {
  485. options = shallowCopyObject$1(options || {});
  486. options.whiteList = options.whiteList || DEFAULT$1.whiteList;
  487. options.onAttr = options.onAttr || DEFAULT$1.onAttr;
  488. options.onIgnoreAttr = options.onIgnoreAttr || DEFAULT$1.onIgnoreAttr;
  489. options.safeAttrValue = options.safeAttrValue || DEFAULT$1.safeAttrValue;
  490. this.options = options;
  491. }
  492. FilterCSS$2.prototype.process = function(css2) {
  493. css2 = css2 || "";
  494. css2 = css2.toString();
  495. if (!css2)
  496. return "";
  497. var me = this;
  498. var options = me.options;
  499. var whiteList = options.whiteList;
  500. var onAttr2 = options.onAttr;
  501. var onIgnoreAttr2 = options.onIgnoreAttr;
  502. var safeAttrValue2 = options.safeAttrValue;
  503. var retCSS = parseStyle(css2, function(sourcePosition, position, name, value, source) {
  504. var check = whiteList[name];
  505. var isWhite = false;
  506. if (check === true)
  507. isWhite = check;
  508. else if (typeof check === "function")
  509. isWhite = check(value);
  510. else if (check instanceof RegExp)
  511. isWhite = check.test(value);
  512. if (isWhite !== true)
  513. isWhite = false;
  514. value = safeAttrValue2(name, value);
  515. if (!value)
  516. return;
  517. var opts = {
  518. position,
  519. sourcePosition,
  520. source,
  521. isWhite
  522. };
  523. if (isWhite) {
  524. var ret = onAttr2(name, value, opts);
  525. if (isNull$1(ret)) {
  526. return name + ":" + value;
  527. } else {
  528. return ret;
  529. }
  530. } else {
  531. var ret = onIgnoreAttr2(name, value, opts);
  532. if (!isNull$1(ret)) {
  533. return ret;
  534. }
  535. }
  536. });
  537. return retCSS;
  538. };
  539. var css = FilterCSS$2;
  540. (function(module, exports) {
  541. var DEFAULT2 = _default;
  542. var FilterCSS2 = css;
  543. function filterCSS(html, options) {
  544. var xss2 = new FilterCSS2(options);
  545. return xss2.process(html);
  546. }
  547. exports = module.exports = filterCSS;
  548. exports.FilterCSS = FilterCSS2;
  549. for (var i4 in DEFAULT2)
  550. exports[i4] = DEFAULT2[i4];
  551. })(lib, lib.exports);
  552. var util = {
  553. indexOf: function(arr, item) {
  554. var i4, j;
  555. if (Array.prototype.indexOf) {
  556. return arr.indexOf(item);
  557. }
  558. for (i4 = 0, j = arr.length; i4 < j; i4++) {
  559. if (arr[i4] === item) {
  560. return i4;
  561. }
  562. }
  563. return -1;
  564. },
  565. forEach: function(arr, fn, scope) {
  566. var i4, j;
  567. if (Array.prototype.forEach) {
  568. return arr.forEach(fn, scope);
  569. }
  570. for (i4 = 0, j = arr.length; i4 < j; i4++) {
  571. fn.call(scope, arr[i4], i4, arr);
  572. }
  573. },
  574. trim: function(str) {
  575. if (String.prototype.trim) {
  576. return str.trim();
  577. }
  578. return str.replace(/(^\s*)|(\s*$)/g, "");
  579. },
  580. spaceIndex: function(str) {
  581. var reg = /\s|\n|\t/;
  582. var match = reg.exec(str);
  583. return match ? match.index : -1;
  584. }
  585. };
  586. var FilterCSS$1 = lib.exports.FilterCSS;
  587. var getDefaultCSSWhiteList = lib.exports.getDefaultWhiteList;
  588. var _$2 = util;
  589. function getDefaultWhiteList() {
  590. return {
  591. a: ["target", "href", "title"],
  592. abbr: ["title"],
  593. address: [],
  594. area: ["shape", "coords", "href", "alt"],
  595. article: [],
  596. aside: [],
  597. audio: [
  598. "autoplay",
  599. "controls",
  600. "crossorigin",
  601. "loop",
  602. "muted",
  603. "preload",
  604. "src"
  605. ],
  606. b: [],
  607. bdi: ["dir"],
  608. bdo: ["dir"],
  609. big: [],
  610. blockquote: ["cite"],
  611. br: [],
  612. caption: [],
  613. center: [],
  614. cite: [],
  615. code: [],
  616. col: ["align", "valign", "span", "width"],
  617. colgroup: ["align", "valign", "span", "width"],
  618. dd: [],
  619. del: ["datetime"],
  620. details: ["open"],
  621. div: [],
  622. dl: [],
  623. dt: [],
  624. em: [],
  625. figcaption: [],
  626. figure: [],
  627. font: ["color", "size", "face"],
  628. footer: [],
  629. h1: [],
  630. h2: [],
  631. h3: [],
  632. h4: [],
  633. h5: [],
  634. h6: [],
  635. header: [],
  636. hr: [],
  637. i: [],
  638. img: ["src", "alt", "title", "width", "height"],
  639. ins: ["datetime"],
  640. li: [],
  641. mark: [],
  642. nav: [],
  643. ol: [],
  644. p: [],
  645. pre: [],
  646. s: [],
  647. section: [],
  648. small: [],
  649. span: [],
  650. sub: [],
  651. summary: [],
  652. sup: [],
  653. strong: [],
  654. strike: [],
  655. table: ["width", "border", "align", "valign"],
  656. tbody: ["align", "valign"],
  657. td: ["width", "rowspan", "colspan", "align", "valign"],
  658. tfoot: ["align", "valign"],
  659. th: ["width", "rowspan", "colspan", "align", "valign"],
  660. thead: ["align", "valign"],
  661. tr: ["rowspan", "align", "valign"],
  662. tt: [],
  663. u: [],
  664. ul: [],
  665. video: [
  666. "autoplay",
  667. "controls",
  668. "crossorigin",
  669. "loop",
  670. "muted",
  671. "playsinline",
  672. "poster",
  673. "preload",
  674. "src",
  675. "height",
  676. "width"
  677. ]
  678. };
  679. }
  680. var defaultCSSFilter = new FilterCSS$1();
  681. function onTag(tag, html, options) {
  682. }
  683. function onIgnoreTag(tag, html, options) {
  684. }
  685. function onTagAttr(tag, name, value) {
  686. }
  687. function onIgnoreTagAttr(tag, name, value) {
  688. }
  689. function escapeHtml(html) {
  690. return html.replace(REGEXP_LT, "&lt;").replace(REGEXP_GT, "&gt;");
  691. }
  692. function safeAttrValue(tag, name, value, cssFilter) {
  693. value = friendlyAttrValue(value);
  694. if (name === "href" || name === "src") {
  695. value = _$2.trim(value);
  696. if (value === "#")
  697. return "#";
  698. if (!(value.substr(0, 7) === "http://" || value.substr(0, 8) === "https://" || value.substr(0, 7) === "mailto:" || value.substr(0, 4) === "tel:" || value.substr(0, 11) === "data:image/" || value.substr(0, 6) === "ftp://" || value.substr(0, 2) === "./" || value.substr(0, 3) === "../" || value[0] === "#" || value[0] === "/")) {
  699. return "";
  700. }
  701. } else if (name === "background") {
  702. REGEXP_DEFAULT_ON_TAG_ATTR_4.lastIndex = 0;
  703. if (REGEXP_DEFAULT_ON_TAG_ATTR_4.test(value)) {
  704. return "";
  705. }
  706. } else if (name === "style") {
  707. REGEXP_DEFAULT_ON_TAG_ATTR_7.lastIndex = 0;
  708. if (REGEXP_DEFAULT_ON_TAG_ATTR_7.test(value)) {
  709. return "";
  710. }
  711. REGEXP_DEFAULT_ON_TAG_ATTR_8.lastIndex = 0;
  712. if (REGEXP_DEFAULT_ON_TAG_ATTR_8.test(value)) {
  713. REGEXP_DEFAULT_ON_TAG_ATTR_4.lastIndex = 0;
  714. if (REGEXP_DEFAULT_ON_TAG_ATTR_4.test(value)) {
  715. return "";
  716. }
  717. }
  718. if (cssFilter !== false) {
  719. cssFilter = cssFilter || defaultCSSFilter;
  720. value = cssFilter.process(value);
  721. }
  722. }
  723. value = escapeAttrValue(value);
  724. return value;
  725. }
  726. var REGEXP_LT = /</g;
  727. var REGEXP_GT = />/g;
  728. var REGEXP_QUOTE = /"/g;
  729. var REGEXP_QUOTE_2 = /&quot;/g;
  730. var REGEXP_ATTR_VALUE_1 = /&#([a-zA-Z0-9]*);?/gim;
  731. var REGEXP_ATTR_VALUE_COLON = /&colon;?/gim;
  732. var REGEXP_ATTR_VALUE_NEWLINE = /&newline;?/gim;
  733. var REGEXP_DEFAULT_ON_TAG_ATTR_4 = /((j\s*a\s*v\s*a|v\s*b|l\s*i\s*v\s*e)\s*s\s*c\s*r\s*i\s*p\s*t\s*|m\s*o\s*c\s*h\s*a):/gi;
  734. var REGEXP_DEFAULT_ON_TAG_ATTR_7 = /e\s*x\s*p\s*r\s*e\s*s\s*s\s*i\s*o\s*n\s*\(.*/gi;
  735. var REGEXP_DEFAULT_ON_TAG_ATTR_8 = /u\s*r\s*l\s*\(.*/gi;
  736. function escapeQuote(str) {
  737. return str.replace(REGEXP_QUOTE, "&quot;");
  738. }
  739. function unescapeQuote(str) {
  740. return str.replace(REGEXP_QUOTE_2, '"');
  741. }
  742. function escapeHtmlEntities(str) {
  743. return str.replace(REGEXP_ATTR_VALUE_1, function replaceUnicode(str2, code) {
  744. return code[0] === "x" || code[0] === "X" ? String.fromCharCode(parseInt(code.substr(1), 16)) : String.fromCharCode(parseInt(code, 10));
  745. });
  746. }
  747. function escapeDangerHtml5Entities(str) {
  748. return str.replace(REGEXP_ATTR_VALUE_COLON, ":").replace(REGEXP_ATTR_VALUE_NEWLINE, " ");
  749. }
  750. function clearNonPrintableCharacter(str) {
  751. var str2 = "";
  752. for (var i4 = 0, len = str.length; i4 < len; i4++) {
  753. str2 += str.charCodeAt(i4) < 32 ? " " : str.charAt(i4);
  754. }
  755. return _$2.trim(str2);
  756. }
  757. function friendlyAttrValue(str) {
  758. str = unescapeQuote(str);
  759. str = escapeHtmlEntities(str);
  760. str = escapeDangerHtml5Entities(str);
  761. str = clearNonPrintableCharacter(str);
  762. return str;
  763. }
  764. function escapeAttrValue(str) {
  765. str = escapeQuote(str);
  766. str = escapeHtml(str);
  767. return str;
  768. }
  769. function onIgnoreTagStripAll() {
  770. return "";
  771. }
  772. function StripTagBody(tags, next) {
  773. if (typeof next !== "function") {
  774. next = function() {
  775. };
  776. }
  777. var isRemoveAllTag = !Array.isArray(tags);
  778. function isRemoveTag(tag) {
  779. if (isRemoveAllTag)
  780. return true;
  781. return _$2.indexOf(tags, tag) !== -1;
  782. }
  783. var removeList = [];
  784. var posStart = false;
  785. return {
  786. onIgnoreTag: function(tag, html, options) {
  787. if (isRemoveTag(tag)) {
  788. if (options.isClosing) {
  789. var ret = "[/removed]";
  790. var end = options.position + ret.length;
  791. removeList.push([
  792. posStart !== false ? posStart : options.position,
  793. end
  794. ]);
  795. posStart = false;
  796. return ret;
  797. } else {
  798. if (!posStart) {
  799. posStart = options.position;
  800. }
  801. return "[removed]";
  802. }
  803. } else {
  804. return next(tag, html, options);
  805. }
  806. },
  807. remove: function(html) {
  808. var rethtml = "";
  809. var lastPos = 0;
  810. _$2.forEach(removeList, function(pos) {
  811. rethtml += html.slice(lastPos, pos[0]);
  812. lastPos = pos[1];
  813. });
  814. rethtml += html.slice(lastPos);
  815. return rethtml;
  816. }
  817. };
  818. }
  819. function stripCommentTag(html) {
  820. var retHtml = "";
  821. var lastPos = 0;
  822. while (lastPos < html.length) {
  823. var i4 = html.indexOf("<!--", lastPos);
  824. if (i4 === -1) {
  825. retHtml += html.slice(lastPos);
  826. break;
  827. }
  828. retHtml += html.slice(lastPos, i4);
  829. var j = html.indexOf("-->", i4);
  830. if (j === -1) {
  831. break;
  832. }
  833. lastPos = j + 3;
  834. }
  835. return retHtml;
  836. }
  837. function stripBlankChar(html) {
  838. var chars = html.split("");
  839. chars = chars.filter(function(char) {
  840. var c5 = char.charCodeAt(0);
  841. if (c5 === 127)
  842. return false;
  843. if (c5 <= 31) {
  844. if (c5 === 10 || c5 === 13)
  845. return true;
  846. return false;
  847. }
  848. return true;
  849. });
  850. return chars.join("");
  851. }
  852. _default$1.whiteList = getDefaultWhiteList();
  853. _default$1.getDefaultWhiteList = getDefaultWhiteList;
  854. _default$1.onTag = onTag;
  855. _default$1.onIgnoreTag = onIgnoreTag;
  856. _default$1.onTagAttr = onTagAttr;
  857. _default$1.onIgnoreTagAttr = onIgnoreTagAttr;
  858. _default$1.safeAttrValue = safeAttrValue;
  859. _default$1.escapeHtml = escapeHtml;
  860. _default$1.escapeQuote = escapeQuote;
  861. _default$1.unescapeQuote = unescapeQuote;
  862. _default$1.escapeHtmlEntities = escapeHtmlEntities;
  863. _default$1.escapeDangerHtml5Entities = escapeDangerHtml5Entities;
  864. _default$1.clearNonPrintableCharacter = clearNonPrintableCharacter;
  865. _default$1.friendlyAttrValue = friendlyAttrValue;
  866. _default$1.escapeAttrValue = escapeAttrValue;
  867. _default$1.onIgnoreTagStripAll = onIgnoreTagStripAll;
  868. _default$1.StripTagBody = StripTagBody;
  869. _default$1.stripCommentTag = stripCommentTag;
  870. _default$1.stripBlankChar = stripBlankChar;
  871. _default$1.cssFilter = defaultCSSFilter;
  872. _default$1.getDefaultCSSWhiteList = getDefaultCSSWhiteList;
  873. var parser$1 = {};
  874. var _$1 = util;
  875. function getTagName(html) {
  876. var i4 = _$1.spaceIndex(html);
  877. var tagName;
  878. if (i4 === -1) {
  879. tagName = html.slice(1, -1);
  880. } else {
  881. tagName = html.slice(1, i4 + 1);
  882. }
  883. tagName = _$1.trim(tagName).toLowerCase();
  884. if (tagName.slice(0, 1) === "/")
  885. tagName = tagName.slice(1);
  886. if (tagName.slice(-1) === "/")
  887. tagName = tagName.slice(0, -1);
  888. return tagName;
  889. }
  890. function isClosing(html) {
  891. return html.slice(0, 2) === "</";
  892. }
  893. function parseTag$1(html, onTag2, escapeHtml2) {
  894. var rethtml = "";
  895. var lastPos = 0;
  896. var tagStart = false;
  897. var quoteStart = false;
  898. var currentPos = 0;
  899. var len = html.length;
  900. var currentTagName = "";
  901. var currentHtml = "";
  902. chariterator:
  903. for (currentPos = 0; currentPos < len; currentPos++) {
  904. var c5 = html.charAt(currentPos);
  905. if (tagStart === false) {
  906. if (c5 === "<") {
  907. tagStart = currentPos;
  908. continue;
  909. }
  910. } else {
  911. if (quoteStart === false) {
  912. if (c5 === "<") {
  913. rethtml += escapeHtml2(html.slice(lastPos, currentPos));
  914. tagStart = currentPos;
  915. lastPos = currentPos;
  916. continue;
  917. }
  918. if (c5 === ">") {
  919. rethtml += escapeHtml2(html.slice(lastPos, tagStart));
  920. currentHtml = html.slice(tagStart, currentPos + 1);
  921. currentTagName = getTagName(currentHtml);
  922. rethtml += onTag2(
  923. tagStart,
  924. rethtml.length,
  925. currentTagName,
  926. currentHtml,
  927. isClosing(currentHtml)
  928. );
  929. lastPos = currentPos + 1;
  930. tagStart = false;
  931. continue;
  932. }
  933. if (c5 === '"' || c5 === "'") {
  934. var i4 = 1;
  935. var ic = html.charAt(currentPos - i4);
  936. while (ic.trim() === "" || ic === "=") {
  937. if (ic === "=") {
  938. quoteStart = c5;
  939. continue chariterator;
  940. }
  941. ic = html.charAt(currentPos - ++i4);
  942. }
  943. }
  944. } else {
  945. if (c5 === quoteStart) {
  946. quoteStart = false;
  947. continue;
  948. }
  949. }
  950. }
  951. }
  952. if (lastPos < html.length) {
  953. rethtml += escapeHtml2(html.substr(lastPos));
  954. }
  955. return rethtml;
  956. }
  957. var REGEXP_ILLEGAL_ATTR_NAME = /[^a-zA-Z0-9\\_:.-]/gim;
  958. function parseAttr$1(html, onAttr2) {
  959. var lastPos = 0;
  960. var lastMarkPos = 0;
  961. var retAttrs = [];
  962. var tmpName = false;
  963. var len = html.length;
  964. function addAttr(name, value) {
  965. name = _$1.trim(name);
  966. name = name.replace(REGEXP_ILLEGAL_ATTR_NAME, "").toLowerCase();
  967. if (name.length < 1)
  968. return;
  969. var ret = onAttr2(name, value || "");
  970. if (ret)
  971. retAttrs.push(ret);
  972. }
  973. for (var i4 = 0; i4 < len; i4++) {
  974. var c5 = html.charAt(i4);
  975. var v3, j;
  976. if (tmpName === false && c5 === "=") {
  977. tmpName = html.slice(lastPos, i4);
  978. lastPos = i4 + 1;
  979. lastMarkPos = html.charAt(lastPos) === '"' || html.charAt(lastPos) === "'" ? lastPos : findNextQuotationMark(html, i4 + 1);
  980. continue;
  981. }
  982. if (tmpName !== false) {
  983. if (i4 === lastMarkPos) {
  984. j = html.indexOf(c5, i4 + 1);
  985. if (j === -1) {
  986. break;
  987. } else {
  988. v3 = _$1.trim(html.slice(lastMarkPos + 1, j));
  989. addAttr(tmpName, v3);
  990. tmpName = false;
  991. i4 = j;
  992. lastPos = i4 + 1;
  993. continue;
  994. }
  995. }
  996. }
  997. if (/\s|\n|\t/.test(c5)) {
  998. html = html.replace(/\s|\n|\t/g, " ");
  999. if (tmpName === false) {
  1000. j = findNextEqual(html, i4);
  1001. if (j === -1) {
  1002. v3 = _$1.trim(html.slice(lastPos, i4));
  1003. addAttr(v3);
  1004. tmpName = false;
  1005. lastPos = i4 + 1;
  1006. continue;
  1007. } else {
  1008. i4 = j - 1;
  1009. continue;
  1010. }
  1011. } else {
  1012. j = findBeforeEqual(html, i4 - 1);
  1013. if (j === -1) {
  1014. v3 = _$1.trim(html.slice(lastPos, i4));
  1015. v3 = stripQuoteWrap(v3);
  1016. addAttr(tmpName, v3);
  1017. tmpName = false;
  1018. lastPos = i4 + 1;
  1019. continue;
  1020. } else {
  1021. continue;
  1022. }
  1023. }
  1024. }
  1025. }
  1026. if (lastPos < html.length) {
  1027. if (tmpName === false) {
  1028. addAttr(html.slice(lastPos));
  1029. } else {
  1030. addAttr(tmpName, stripQuoteWrap(_$1.trim(html.slice(lastPos))));
  1031. }
  1032. }
  1033. return _$1.trim(retAttrs.join(" "));
  1034. }
  1035. function findNextEqual(str, i4) {
  1036. for (; i4 < str.length; i4++) {
  1037. var c5 = str[i4];
  1038. if (c5 === " ")
  1039. continue;
  1040. if (c5 === "=")
  1041. return i4;
  1042. return -1;
  1043. }
  1044. }
  1045. function findNextQuotationMark(str, i4) {
  1046. for (; i4 < str.length; i4++) {
  1047. var c5 = str[i4];
  1048. if (c5 === " ")
  1049. continue;
  1050. if (c5 === "'" || c5 === '"')
  1051. return i4;
  1052. return -1;
  1053. }
  1054. }
  1055. function findBeforeEqual(str, i4) {
  1056. for (; i4 > 0; i4--) {
  1057. var c5 = str[i4];
  1058. if (c5 === " ")
  1059. continue;
  1060. if (c5 === "=")
  1061. return i4;
  1062. return -1;
  1063. }
  1064. }
  1065. function isQuoteWrapString(text) {
  1066. if (text[0] === '"' && text[text.length - 1] === '"' || text[0] === "'" && text[text.length - 1] === "'") {
  1067. return true;
  1068. } else {
  1069. return false;
  1070. }
  1071. }
  1072. function stripQuoteWrap(text) {
  1073. if (isQuoteWrapString(text)) {
  1074. return text.substr(1, text.length - 2);
  1075. } else {
  1076. return text;
  1077. }
  1078. }
  1079. parser$1.parseTag = parseTag$1;
  1080. parser$1.parseAttr = parseAttr$1;
  1081. var FilterCSS = lib.exports.FilterCSS;
  1082. var DEFAULT = _default$1;
  1083. var parser = parser$1;
  1084. var parseTag = parser.parseTag;
  1085. var parseAttr = parser.parseAttr;
  1086. var _ = util;
  1087. function isNull(obj) {
  1088. return obj === void 0 || obj === null;
  1089. }
  1090. function getAttrs(html) {
  1091. var i4 = _.spaceIndex(html);
  1092. if (i4 === -1) {
  1093. return {
  1094. html: "",
  1095. closing: html[html.length - 2] === "/"
  1096. };
  1097. }
  1098. html = _.trim(html.slice(i4 + 1, -1));
  1099. var isClosing2 = html[html.length - 1] === "/";
  1100. if (isClosing2)
  1101. html = _.trim(html.slice(0, -1));
  1102. return {
  1103. html,
  1104. closing: isClosing2
  1105. };
  1106. }
  1107. function shallowCopyObject(obj) {
  1108. var ret = {};
  1109. for (var i4 in obj) {
  1110. ret[i4] = obj[i4];
  1111. }
  1112. return ret;
  1113. }
  1114. function keysToLowerCase(obj) {
  1115. var ret = {};
  1116. for (var i4 in obj) {
  1117. if (Array.isArray(obj[i4])) {
  1118. ret[i4.toLowerCase()] = obj[i4].map(function(item) {
  1119. return item.toLowerCase();
  1120. });
  1121. } else {
  1122. ret[i4.toLowerCase()] = obj[i4];
  1123. }
  1124. }
  1125. return ret;
  1126. }
  1127. function FilterXSS(options) {
  1128. options = shallowCopyObject(options || {});
  1129. if (options.stripIgnoreTag) {
  1130. if (options.onIgnoreTag) {
  1131. console.error(
  1132. 'Notes: cannot use these two options "stripIgnoreTag" and "onIgnoreTag" at the same time'
  1133. );
  1134. }
  1135. options.onIgnoreTag = DEFAULT.onIgnoreTagStripAll;
  1136. }
  1137. if (options.whiteList || options.allowList) {
  1138. options.whiteList = keysToLowerCase(options.whiteList || options.allowList);
  1139. } else {
  1140. options.whiteList = DEFAULT.whiteList;
  1141. }
  1142. options.onTag = options.onTag || DEFAULT.onTag;
  1143. options.onTagAttr = options.onTagAttr || DEFAULT.onTagAttr;
  1144. options.onIgnoreTag = options.onIgnoreTag || DEFAULT.onIgnoreTag;
  1145. options.onIgnoreTagAttr = options.onIgnoreTagAttr || DEFAULT.onIgnoreTagAttr;
  1146. options.safeAttrValue = options.safeAttrValue || DEFAULT.safeAttrValue;
  1147. options.escapeHtml = options.escapeHtml || DEFAULT.escapeHtml;
  1148. this.options = options;
  1149. if (options.css === false) {
  1150. this.cssFilter = false;
  1151. } else {
  1152. options.css = options.css || {};
  1153. this.cssFilter = new FilterCSS(options.css);
  1154. }
  1155. }
  1156. FilterXSS.prototype.process = function(html) {
  1157. html = html || "";
  1158. html = html.toString();
  1159. if (!html)
  1160. return "";
  1161. var me = this;
  1162. var options = me.options;
  1163. var whiteList = options.whiteList;
  1164. var onTag2 = options.onTag;
  1165. var onIgnoreTag2 = options.onIgnoreTag;
  1166. var onTagAttr2 = options.onTagAttr;
  1167. var onIgnoreTagAttr2 = options.onIgnoreTagAttr;
  1168. var safeAttrValue2 = options.safeAttrValue;
  1169. var escapeHtml2 = options.escapeHtml;
  1170. var cssFilter = me.cssFilter;
  1171. if (options.stripBlankChar) {
  1172. html = DEFAULT.stripBlankChar(html);
  1173. }
  1174. if (!options.allowCommentTag) {
  1175. html = DEFAULT.stripCommentTag(html);
  1176. }
  1177. var stripIgnoreTagBody = false;
  1178. if (options.stripIgnoreTagBody) {
  1179. stripIgnoreTagBody = DEFAULT.StripTagBody(
  1180. options.stripIgnoreTagBody,
  1181. onIgnoreTag2
  1182. );
  1183. onIgnoreTag2 = stripIgnoreTagBody.onIgnoreTag;
  1184. }
  1185. var retHtml = parseTag(
  1186. html,
  1187. function(sourcePosition, position, tag, html2, isClosing2) {
  1188. var info = {
  1189. sourcePosition,
  1190. position,
  1191. isClosing: isClosing2,
  1192. isWhite: Object.prototype.hasOwnProperty.call(whiteList, tag)
  1193. };
  1194. var ret = onTag2(tag, html2, info);
  1195. if (!isNull(ret))
  1196. return ret;
  1197. if (info.isWhite) {
  1198. if (info.isClosing) {
  1199. return "</" + tag + ">";
  1200. }
  1201. var attrs = getAttrs(html2);
  1202. var whiteAttrList = whiteList[tag];
  1203. var attrsHtml = parseAttr(attrs.html, function(name, value) {
  1204. var isWhiteAttr = _.indexOf(whiteAttrList, name) !== -1;
  1205. var ret2 = onTagAttr2(tag, name, value, isWhiteAttr);
  1206. if (!isNull(ret2))
  1207. return ret2;
  1208. if (isWhiteAttr) {
  1209. value = safeAttrValue2(tag, name, value, cssFilter);
  1210. if (value) {
  1211. return name + '="' + value + '"';
  1212. } else {
  1213. return name;
  1214. }
  1215. } else {
  1216. ret2 = onIgnoreTagAttr2(tag, name, value, isWhiteAttr);
  1217. if (!isNull(ret2))
  1218. return ret2;
  1219. return;
  1220. }
  1221. });
  1222. html2 = "<" + tag;
  1223. if (attrsHtml)
  1224. html2 += " " + attrsHtml;
  1225. if (attrs.closing)
  1226. html2 += " /";
  1227. html2 += ">";
  1228. return html2;
  1229. } else {
  1230. ret = onIgnoreTag2(tag, html2, info);
  1231. if (!isNull(ret))
  1232. return ret;
  1233. return escapeHtml2(html2);
  1234. }
  1235. },
  1236. escapeHtml2
  1237. );
  1238. if (stripIgnoreTagBody) {
  1239. retHtml = stripIgnoreTagBody.remove(retHtml);
  1240. }
  1241. return retHtml;
  1242. };
  1243. var xss = FilterXSS;
  1244. (function(module, exports) {
  1245. var DEFAULT2 = _default$1;
  1246. var parser2 = parser$1;
  1247. var FilterXSS2 = xss;
  1248. function filterXSS(html, options) {
  1249. var xss2 = new FilterXSS2(options);
  1250. return xss2.process(html);
  1251. }
  1252. exports = module.exports = filterXSS;
  1253. exports.filterXSS = filterXSS;
  1254. exports.FilterXSS = FilterXSS2;
  1255. (function() {
  1256. for (var i4 in DEFAULT2) {
  1257. exports[i4] = DEFAULT2[i4];
  1258. }
  1259. for (var j in parser2) {
  1260. exports[j] = parser2[j];
  1261. }
  1262. })();
  1263. function isWorkerEnv() {
  1264. return typeof self !== "undefined" && typeof DedicatedWorkerGlobalScope !== "undefined" && self instanceof DedicatedWorkerGlobalScope;
  1265. }
  1266. if (isWorkerEnv()) {
  1267. self.filterXSS = module.exports;
  1268. }
  1269. })(lib$1, lib$1.exports);
  1270. var Sanitizer = function() {
  1271. function Sanitizer2(filterOptions, extendDefaults) {
  1272. var _this = this;
  1273. this.arcgisWhiteList = {
  1274. a: ["href", "style", "target"],
  1275. abbr: ["title"],
  1276. audio: ["autoplay", "controls", "loop", "muted", "preload"],
  1277. b: [],
  1278. br: [],
  1279. dd: ["style"],
  1280. div: ["align", "style"],
  1281. dl: ["style"],
  1282. dt: ["style"],
  1283. em: [],
  1284. figcaption: ["style"],
  1285. figure: ["style"],
  1286. font: ["color", "face", "size", "style"],
  1287. h1: ["style"],
  1288. h2: ["style"],
  1289. h3: ["style"],
  1290. h4: ["style"],
  1291. h5: ["style"],
  1292. h6: ["style"],
  1293. hr: [],
  1294. i: [],
  1295. img: ["alt", "border", "height", "src", "style", "width"],
  1296. li: [],
  1297. ol: [],
  1298. p: ["style"],
  1299. source: ["media", "src", "type"],
  1300. span: ["style"],
  1301. strong: [],
  1302. sub: ["style"],
  1303. sup: ["style"],
  1304. table: ["border", "cellpadding", "cellspacing", "height", "style", "width"],
  1305. tbody: [],
  1306. tr: ["align", "height", "style", "valign"],
  1307. td: [
  1308. "align",
  1309. "colspan",
  1310. "height",
  1311. "nowrap",
  1312. "rowspan",
  1313. "style",
  1314. "valign",
  1315. "width"
  1316. ],
  1317. th: [
  1318. "align",
  1319. "colspan",
  1320. "height",
  1321. "nowrap",
  1322. "rowspan",
  1323. "style",
  1324. "valign",
  1325. "width"
  1326. ],
  1327. u: [],
  1328. ul: [],
  1329. video: [
  1330. "autoplay",
  1331. "controls",
  1332. "height",
  1333. "loop",
  1334. "muted",
  1335. "poster",
  1336. "preload",
  1337. "width"
  1338. ]
  1339. };
  1340. this.allowedProtocols = [
  1341. "http",
  1342. "https",
  1343. "mailto",
  1344. "iform",
  1345. "tel",
  1346. "flow",
  1347. "lfmobile",
  1348. "arcgis-navigator",
  1349. "arcgis-appstudio-player",
  1350. "arcgis-survey123",
  1351. "arcgis-collector",
  1352. "arcgis-workforce",
  1353. "arcgis-explorer",
  1354. "arcgis-trek2there",
  1355. "arcgis-quickcapture",
  1356. "mspbi",
  1357. "comgooglemaps",
  1358. "pdfefile",
  1359. "pdfehttp",
  1360. "pdfehttps",
  1361. "boxapp",
  1362. "boxemm",
  1363. "awb",
  1364. "awbs",
  1365. "gropen",
  1366. "radarscope"
  1367. ];
  1368. this.arcgisFilterOptions = {
  1369. allowCommentTag: true,
  1370. safeAttrValue: function(tag, name, value, cssFilter) {
  1371. if (tag === "a" && name === "href" || (tag === "img" || tag === "source") && name === "src") {
  1372. return _this.sanitizeUrl(value);
  1373. }
  1374. return lib$1.exports.safeAttrValue(tag, name, value, cssFilter);
  1375. }
  1376. };
  1377. this._entityMap = {
  1378. "&": "&#x38;",
  1379. "<": "&#x3C;",
  1380. ">": "&#x3E;",
  1381. '"': "&#x22;",
  1382. "'": "&#x27;",
  1383. "/": "&#x2F;"
  1384. };
  1385. var xssFilterOptions;
  1386. if (filterOptions && !extendDefaults) {
  1387. xssFilterOptions = filterOptions;
  1388. } else if (filterOptions && extendDefaults) {
  1389. xssFilterOptions = Object.create(this.arcgisFilterOptions);
  1390. Object.keys(filterOptions).forEach(function(key) {
  1391. if (key === "whiteList") {
  1392. xssFilterOptions.whiteList = _this._extendObjectOfArrays([
  1393. _this.arcgisWhiteList,
  1394. filterOptions.whiteList || {}
  1395. ]);
  1396. } else {
  1397. xssFilterOptions[key] = filterOptions[key];
  1398. }
  1399. });
  1400. } else {
  1401. xssFilterOptions = Object.create(this.arcgisFilterOptions);
  1402. xssFilterOptions.whiteList = this.arcgisWhiteList;
  1403. }
  1404. this.xssFilterOptions = xssFilterOptions;
  1405. this._xssFilter = new lib$1.exports.FilterXSS(xssFilterOptions);
  1406. }
  1407. Sanitizer2.prototype.sanitize = function(value, options) {
  1408. if (options === void 0) {
  1409. options = {};
  1410. }
  1411. switch (typeof value) {
  1412. case "number":
  1413. if (isNaN(value) || !isFinite(value)) {
  1414. return null;
  1415. }
  1416. return value;
  1417. case "boolean":
  1418. return value;
  1419. case "string":
  1420. return this._xssFilter.process(value);
  1421. case "object":
  1422. return this._iterateOverObject(value, options);
  1423. default:
  1424. if (options.allowUndefined && typeof value === "undefined") {
  1425. return;
  1426. }
  1427. return null;
  1428. }
  1429. };
  1430. Sanitizer2.prototype.sanitizeUrl = function(value, options) {
  1431. var _a = (options !== null && options !== void 0 ? options : {}).isProtocolRequired, isProtocolRequired = _a === void 0 ? true : _a;
  1432. var protocol = this._trim(value.substring(0, value.indexOf(":")));
  1433. var isRootUrl = value === "/";
  1434. var isUrlFragment = /^#/.test(value);
  1435. var isValidProtocol = protocol && this.allowedProtocols.indexOf(protocol.toLowerCase()) > -1;
  1436. if (isRootUrl || isUrlFragment || isValidProtocol) {
  1437. return lib$1.exports.escapeAttrValue(value);
  1438. }
  1439. if (!protocol && !isProtocolRequired) {
  1440. return lib$1.exports.escapeAttrValue("https://".concat(value));
  1441. }
  1442. return "";
  1443. };
  1444. Sanitizer2.prototype.sanitizeHTMLAttribute = function(tag, attribute, value, cssFilter) {
  1445. if (typeof this.xssFilterOptions.safeAttrValue === "function") {
  1446. return this.xssFilterOptions.safeAttrValue(
  1447. tag,
  1448. attribute,
  1449. value,
  1450. cssFilter
  1451. );
  1452. }
  1453. return lib$1.exports.safeAttrValue(tag, attribute, value, cssFilter);
  1454. };
  1455. Sanitizer2.prototype.validate = function(value, options) {
  1456. if (options === void 0) {
  1457. options = {};
  1458. }
  1459. var sanitized = this.sanitize(value, options);
  1460. return {
  1461. isValid: value === sanitized,
  1462. sanitized
  1463. };
  1464. };
  1465. Sanitizer2.prototype.encodeHTML = function(value) {
  1466. var _this = this;
  1467. return String(value).replace(/[&<>"'\/]/g, function(s5) {
  1468. return _this._entityMap[s5];
  1469. });
  1470. };
  1471. Sanitizer2.prototype.encodeAttrValue = function(value) {
  1472. var alphanumericRE = /^[a-zA-Z0-9]$/;
  1473. return String(value).replace(/[\x00-\xFF]/g, function(c5, idx) {
  1474. return !alphanumericRE.test(c5) ? "&#x".concat(Number(value.charCodeAt(idx)).toString(16), ";") : c5;
  1475. });
  1476. };
  1477. Sanitizer2.prototype._extendObjectOfArrays = function(objects) {
  1478. var finalObj = {};
  1479. objects.forEach(function(obj) {
  1480. Object.keys(obj).forEach(function(key) {
  1481. if (Array.isArray(obj[key]) && Array.isArray(finalObj[key])) {
  1482. finalObj[key] = finalObj[key].concat(obj[key]);
  1483. } else {
  1484. finalObj[key] = obj[key];
  1485. }
  1486. });
  1487. });
  1488. return finalObj;
  1489. };
  1490. Sanitizer2.prototype._iterateOverObject = function(obj, options) {
  1491. var _this = this;
  1492. if (options === void 0) {
  1493. options = {};
  1494. }
  1495. try {
  1496. var hasChanged_1 = false;
  1497. var changedObj = void 0;
  1498. if (Array.isArray(obj)) {
  1499. changedObj = obj.reduce(function(prev, value) {
  1500. var validation = _this.validate(value, options);
  1501. if (validation.isValid) {
  1502. return prev.concat([value]);
  1503. } else {
  1504. hasChanged_1 = true;
  1505. return prev.concat([validation.sanitized]);
  1506. }
  1507. }, []);
  1508. } else if (!isPlainObject(obj)) {
  1509. if (options.allowUndefined && typeof obj === "undefined") {
  1510. return;
  1511. }
  1512. return null;
  1513. } else {
  1514. var keys = Object.keys(obj);
  1515. changedObj = keys.reduce(function(prev, key) {
  1516. var value = obj[key];
  1517. var validation = _this.validate(value, options);
  1518. if (validation.isValid) {
  1519. prev[key] = value;
  1520. } else {
  1521. hasChanged_1 = true;
  1522. prev[key] = validation.sanitized;
  1523. }
  1524. return prev;
  1525. }, {});
  1526. }
  1527. if (hasChanged_1) {
  1528. return changedObj;
  1529. }
  1530. return obj;
  1531. } catch (err) {
  1532. return null;
  1533. }
  1534. };
  1535. Sanitizer2.prototype._trim = function(val) {
  1536. return String.prototype.trim ? val.trim() : val.replace(/(^\s*)|(\s*$)/g, "");
  1537. };
  1538. return Sanitizer2;
  1539. }();
  1540. // node_modules/@arcgis/core/widgets/support/vnodeCache.js
  1541. var n2 = /* @__PURE__ */ new Map();
  1542. function t2() {
  1543. n2.clear();
  1544. }
  1545. function e(t7) {
  1546. return n2.get(t7);
  1547. }
  1548. function c(t7, e3) {
  1549. n2.set(t7, e3);
  1550. }
  1551. function o(t7) {
  1552. n2.delete(t7);
  1553. }
  1554. // node_modules/@arcgis/core/widgets/support/widgetUtils.js
  1555. var o2;
  1556. var s2;
  1557. var a = function(e3) {
  1558. if ("WebkitTransition" in e3.style)
  1559. o2 = "webkitTransitionEnd", s2 = "webkitAnimationEnd";
  1560. else {
  1561. if (!("transition" in e3.style))
  1562. throw new Error("Your browser is not supported!");
  1563. o2 = "transitionend", s2 = "animationend";
  1564. }
  1565. };
  1566. var c2 = function(e3) {
  1567. o2 || a(e3);
  1568. };
  1569. var l = function(e3, t7) {
  1570. return void 0 === t7 && (t7 = e3 + "-active"), function(n8) {
  1571. c2(n8);
  1572. var r3 = false, i4 = function(a4) {
  1573. r3 || (r3 = true, n8.removeEventListener(o2, i4), n8.removeEventListener(s2, i4), n8.classList.remove(e3), n8.classList.remove(t7));
  1574. };
  1575. n8.classList.add(e3), n8.addEventListener(o2, i4), n8.addEventListener(s2, i4), requestAnimationFrame(function() {
  1576. n8.classList.add(t7);
  1577. });
  1578. };
  1579. };
  1580. var d = function(e3, t7) {
  1581. return void 0 === t7 && (t7 = e3 + "-active"), function(n8, r3) {
  1582. c2(n8);
  1583. var i4 = false, a4 = function(e4) {
  1584. i4 || (i4 = true, n8.removeEventListener(o2, a4), n8.removeEventListener(s2, a4), r3());
  1585. };
  1586. n8.classList.add(e3), n8.addEventListener(o2, a4), n8.addEventListener(s2, a4), requestAnimationFrame(function() {
  1587. n8.classList.add(t7);
  1588. });
  1589. };
  1590. };
  1591. var u = s.getLogger("esri.widgets.support.widgetUtils");
  1592. function p(e3) {
  1593. const n8 = t.acquire();
  1594. for (let t7 = 0; t7 < arguments.length; t7++) {
  1595. const e4 = arguments[t7], r4 = typeof e4;
  1596. if ("string" === r4)
  1597. n8.push(e4);
  1598. else if (Array.isArray(e4))
  1599. n8.push.apply(n8, e4);
  1600. else if ("object" === r4)
  1601. for (const t8 in e4)
  1602. e4[t8] && n8.push(t8);
  1603. }
  1604. const r3 = n8.join(" ");
  1605. return t.release(n8), r3;
  1606. }
  1607. var g = (() => {
  1608. const e3 = /* @__PURE__ */ new Map(), t7 = new ResizeObserver((t8) => {
  1609. var _a;
  1610. t2();
  1611. for (const n8 of t8)
  1612. (_a = e3.get(n8.target)) == null ? void 0 : _a(n8);
  1613. });
  1614. return (r3, i4, o7) => (e3.has(r3) && u.error("Already observing element", r3), e3.set(r3, i4), t7.observe(r3, o7), n(() => {
  1615. t7.unobserve(r3), e3.delete(r3);
  1616. }));
  1617. })();
  1618. function f(e3) {
  1619. const t7 = e3 == null ? void 0 : e3.closest("[dir]");
  1620. return null !== t7 && t7 instanceof HTMLElement && "rtl" === t7.dir || "rtl" === document.dir;
  1621. }
  1622. function h(e3) {
  1623. const t7 = "data-node-ref";
  1624. this[e3.getAttribute(t7)] = null;
  1625. }
  1626. function v(e3) {
  1627. const t7 = "data-node-ref";
  1628. this[e3.getAttribute(t7)] = e3;
  1629. }
  1630. function w(e3, t7) {
  1631. return ("enter" === e3 ? l : d)(t7);
  1632. }
  1633. var L = ["dd", "dl", "dt", "h1", "h2", "h3", "h4", "h5", "h6", "sub", "sup", ...["animate", "animatetransform", "circle", "clippath", "defs", "ellipse", "g", "image", "line", "lineargradient", "marker", "mask", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "svg", "switch", "symbol", "text", "textpath", "tspan", "use"]];
  1634. var b = L.reduce((e3, t7) => (e3[t7] = [], e3), {});
  1635. var y = ["align", "alink", "alt", "bgcolor", "border", "cellpadding", "cellspacing", "class", "color", "cols", "colspan", "coords", "d", "dir", "face", "height", "hspace", "ismap", "lang", "marginheight", "marginwidth", "multiple", "nohref", "noresize", "noshade", "nowrap", "ref", "rel", "rev", "rows", "rowspan", "scrolling", "shape", "span", "summary", "tabindex", "title", "usemap", "valign", "value", "vlink", "vspace", "width"];
  1636. var E = new Sanitizer({ whiteList: b, onTagAttr: (e3, t7, n8) => {
  1637. const r3 = `${t7}="${n8}"`;
  1638. if (y.includes(t7))
  1639. return r3;
  1640. }, stripIgnoreTag: true, stripIgnoreTagBody: ["script", "style"] }, true);
  1641. function k(e3) {
  1642. return "Enter" === e3 || " " === e3;
  1643. }
  1644. // node_modules/@arcgis/core/libs/maquette/projection.js
  1645. var t3 = "http://www.w3.org/";
  1646. var r = `${t3}2000/svg`;
  1647. var o3 = `${t3}1999/xlink`;
  1648. var i;
  1649. var l2 = [];
  1650. var n3 = (e3, t7) => {
  1651. let r3 = {};
  1652. return Object.keys(e3).forEach((t8) => {
  1653. r3[t8] = e3[t8];
  1654. }), t7 && Object.keys(t7).forEach((e4) => {
  1655. r3[e4] = t7[e4];
  1656. }), r3;
  1657. };
  1658. var s3 = (e3, t7) => e3.vnodeSelector === t7.vnodeSelector && (e3.properties && t7.properties ? e3.properties.key === t7.properties.key && e3.properties.bind === t7.properties.bind : !e3.properties && !t7.properties);
  1659. var p2 = (e3) => {
  1660. if ("string" != typeof e3)
  1661. throw new Error("Style values must be strings");
  1662. };
  1663. var d2 = (e3, t7, r3) => {
  1664. if ("" !== t7.vnodeSelector) {
  1665. for (let o7 = r3; o7 < e3.length; o7++)
  1666. if (s3(e3[o7], t7))
  1667. return o7;
  1668. }
  1669. return -1;
  1670. };
  1671. var a2 = (e3, t7, r3, o7) => {
  1672. let i4 = e3[t7];
  1673. if ("" === i4.vnodeSelector)
  1674. return;
  1675. let l3 = i4.properties;
  1676. if (!(l3 ? void 0 === l3.key ? l3.bind : l3.key : void 0)) {
  1677. for (let n8 = 0; n8 < e3.length; n8++)
  1678. if (n8 !== t7) {
  1679. let t8 = e3[n8];
  1680. if (s3(t8, i4))
  1681. throw new Error(`${r3.vnodeSelector} had a ${i4.vnodeSelector} child ${"added" === o7 ? o7 : "removed"}, but there is now more than one. You must add unique key properties to make them distinguishable.`);
  1682. }
  1683. }
  1684. };
  1685. var f2 = (e3) => {
  1686. if (e3.properties) {
  1687. let t7 = e3.properties.enterAnimation;
  1688. t7 && t7(e3.domNode, e3.properties);
  1689. }
  1690. };
  1691. var c3 = [];
  1692. var u2 = false;
  1693. var h2 = (e3) => {
  1694. (e3.children || []).forEach(h2), e3.properties && e3.properties.afterRemoved && e3.properties.afterRemoved.apply(e3.properties.bind || e3.properties, [e3.domNode]);
  1695. };
  1696. var m = () => {
  1697. u2 = false, c3.forEach(h2), c3.length = 0;
  1698. };
  1699. var v2 = (e3) => {
  1700. c3.push(e3), u2 || (u2 = true, "undefined" != typeof window && "requestIdleCallback" in window ? window.requestIdleCallback(m, { timeout: 16 }) : setTimeout(m, 16));
  1701. };
  1702. var y2 = (e3) => {
  1703. let t7 = e3.domNode;
  1704. if (e3.properties) {
  1705. let r3 = e3.properties.exitAnimation;
  1706. if (r3) {
  1707. t7.style.pointerEvents = "none";
  1708. let o7 = () => {
  1709. t7.parentNode && (t7.parentNode.removeChild(t7), v2(e3));
  1710. };
  1711. return void r3(t7, o7, e3.properties);
  1712. }
  1713. }
  1714. t7.parentNode && (t7.parentNode.removeChild(t7), v2(e3));
  1715. };
  1716. var g2 = (t7, i4, l3) => {
  1717. if (!i4)
  1718. return;
  1719. let n8 = l3.eventHandlerInterceptor, s5 = Object.keys(i4), d6 = s5.length;
  1720. for (let a4 = 0; a4 < d6; a4++) {
  1721. let d7 = s5[a4], f3 = i4[d7];
  1722. if ("className" === d7)
  1723. throw new Error('Property "className" is not supported, use "class".');
  1724. if ("class" === d7)
  1725. x(t7, f3, true);
  1726. else if ("classes" === d7) {
  1727. let e3 = Object.keys(f3), r3 = e3.length;
  1728. for (let o7 = 0; o7 < r3; o7++) {
  1729. let r4 = e3[o7];
  1730. f3[r4] && t7.classList.add(r4);
  1731. }
  1732. } else if ("styles" === d7) {
  1733. let e3 = Object.keys(f3), r3 = e3.length;
  1734. for (let o7 = 0; o7 < r3; o7++) {
  1735. let r4 = e3[o7], i5 = f3[r4];
  1736. i5 && (p2(i5), l3.styleApplyer(t7, r4, i5));
  1737. }
  1738. } else if ("key" !== d7 && null != f3) {
  1739. let s6 = typeof f3;
  1740. "function" === s6 ? (0 === d7.lastIndexOf("on", 0) && (n8 && (f3 = n8(d7, f3, t7, i4)), "oninput" === d7 && function() {
  1741. let e3 = f3;
  1742. f3 = function(t8) {
  1743. e3.apply(this, [t8]), t8.target["oninput-value"] = t8.target.value;
  1744. };
  1745. }()), t7[d7] = f3) : l3.namespace === r ? "href" === d7 ? t7.setAttributeNS(o3, d7, f3) : t7.setAttribute(d7, f3) : "string" === s6 && "value" !== d7 ? "innerHTML" === d7 ? t7[d7] = E.sanitize(f3) : t7.setAttribute(d7, f3) : t7[d7] = f3;
  1746. }
  1747. }
  1748. };
  1749. var b2 = (e3, t7, r3) => {
  1750. if (t7)
  1751. for (let o7 of t7)
  1752. w2(o7, e3, void 0, r3);
  1753. };
  1754. var N = (e3, t7, r3) => {
  1755. b2(e3, t7.children, r3), t7.text && (e3.textContent = t7.text), g2(e3, t7.properties, r3), t7.properties && t7.properties.afterCreate && t7.properties.afterCreate.apply(t7.properties.bind || t7.properties, [e3, r3, t7.vnodeSelector, t7.properties, t7.children]);
  1756. };
  1757. var w2 = (e3, t7, o7, i4) => {
  1758. let l3, s5 = 0, p4 = e3.vnodeSelector, d6 = t7.ownerDocument;
  1759. if ("" === p4)
  1760. l3 = e3.domNode = d6.createTextNode(e3.text), void 0 !== o7 ? t7.insertBefore(l3, o7) : t7.appendChild(l3);
  1761. else {
  1762. for (let a4 = 0; a4 <= p4.length; ++a4) {
  1763. let f3 = p4.charAt(a4);
  1764. if (a4 === p4.length || "." === f3 || "#" === f3) {
  1765. let f4 = p4.charAt(s5 - 1), c5 = p4.slice(s5, a4);
  1766. "." === f4 ? l3.classList.add(c5) : "#" === f4 ? l3.id = c5 : ("svg" === c5 && (i4 = n3(i4, { namespace: r })), void 0 !== i4.namespace ? l3 = e3.domNode = d6.createElementNS(i4.namespace, c5) : (l3 = e3.domNode = e3.domNode || d6.createElement(c5), "input" === c5 && e3.properties && void 0 !== e3.properties.type && l3.setAttribute("type", e3.properties.type)), void 0 !== o7 ? t7.insertBefore(l3, o7) : l3.parentNode !== t7 && t7.appendChild(l3)), s5 = a4 + 1;
  1767. }
  1768. }
  1769. N(l3, e3, i4);
  1770. }
  1771. };
  1772. var x = (e3, t7, r3) => {
  1773. t7 && t7.split(" ").forEach((t8) => {
  1774. t8 && e3.classList.toggle(t8, r3);
  1775. });
  1776. };
  1777. var k2 = (t7, i4, l3, n8) => {
  1778. if (!l3)
  1779. return;
  1780. let s5 = false, d6 = Object.keys(l3), a4 = d6.length;
  1781. for (let f3 = 0; f3 < a4; f3++) {
  1782. let a5 = d6[f3], c5 = l3[a5], u3 = i4[a5];
  1783. if ("class" === a5)
  1784. u3 !== c5 && (x(t7, u3, false), x(t7, c5, true));
  1785. else if ("classes" === a5) {
  1786. let e3 = t7.classList, r3 = Object.keys(c5), o7 = r3.length;
  1787. for (let t8 = 0; t8 < o7; t8++) {
  1788. let o8 = r3[t8], i5 = !!c5[o8];
  1789. i5 !== !!u3[o8] && (s5 = true, i5 ? e3.add(o8) : e3.remove(o8));
  1790. }
  1791. } else if ("styles" === a5) {
  1792. let e3 = Object.keys(c5), r3 = e3.length;
  1793. for (let o7 = 0; o7 < r3; o7++) {
  1794. let r4 = e3[o7], i5 = c5[r4];
  1795. i5 !== u3[r4] && (s5 = true, i5 ? (p2(i5), n8.styleApplyer(t7, r4, i5)) : n8.styleApplyer(t7, r4, ""));
  1796. }
  1797. } else if (c5 || "string" != typeof u3 || (c5 = ""), "value" === a5) {
  1798. let e3 = t7[a5];
  1799. e3 !== c5 && (t7["oninput-value"] ? e3 === t7["oninput-value"] : c5 !== u3) && (t7[a5] = c5, t7["oninput-value"] = void 0), c5 !== u3 && (s5 = true);
  1800. } else if (c5 !== u3) {
  1801. let i5 = typeof c5;
  1802. "function" === i5 && n8.eventHandlerInterceptor || (n8.namespace === r ? "href" === a5 ? t7.setAttributeNS(o3, a5, c5) : t7.setAttribute(a5, c5) : "string" === i5 ? "innerHTML" === a5 ? t7[a5] = E.sanitize(c5) : "role" === a5 && "" === c5 ? t7.removeAttribute(a5) : t7.setAttribute(a5, c5) : t7[a5] !== c5 && (t7[a5] = c5), s5 = true);
  1803. }
  1804. }
  1805. return s5;
  1806. };
  1807. var A = (e3, t7, r3, o7, n8) => {
  1808. if (r3 === o7)
  1809. return false;
  1810. o7 = o7 || l2;
  1811. let p4, c5 = (r3 = r3 || l2).length, u3 = o7.length, h3 = 0, m2 = 0, v3 = false;
  1812. for (; m2 < u3; ) {
  1813. let l3 = h3 < c5 ? r3[h3] : void 0, u4 = o7[m2];
  1814. if (void 0 !== l3 && s3(l3, u4))
  1815. v3 = i(l3, u4, n8) || v3, h3++;
  1816. else {
  1817. let l4 = d2(r3, u4, h3 + 1);
  1818. if (l4 >= 0) {
  1819. for (p4 = h3; p4 < l4; p4++)
  1820. y2(r3[p4]), a2(r3, p4, e3, "removed");
  1821. v3 = i(r3[l4], u4, n8) || v3, h3 = l4 + 1;
  1822. } else
  1823. w2(u4, t7, h3 < c5 ? r3[h3].domNode : void 0, n8), f2(u4), a2(o7, m2, e3, "added");
  1824. }
  1825. m2++;
  1826. }
  1827. if (c5 > h3)
  1828. for (p4 = h3; p4 < c5; p4++)
  1829. y2(r3[p4]), a2(r3, p4, e3, "removed");
  1830. return v3;
  1831. };
  1832. i = (e3, t7, o7) => {
  1833. let i4 = e3.domNode, l3 = false;
  1834. if (e3 === t7)
  1835. return false;
  1836. let s5 = false;
  1837. if ("" === t7.vnodeSelector) {
  1838. if (t7.text !== e3.text) {
  1839. let e4 = i4.ownerDocument.createTextNode(t7.text);
  1840. return i4.parentNode.replaceChild(e4, i4), t7.domNode = e4, l3 = true, l3;
  1841. }
  1842. t7.domNode = i4;
  1843. } else
  1844. 0 === t7.vnodeSelector.lastIndexOf("svg", 0) && (o7 = n3(o7, { namespace: r })), e3.text !== t7.text && (s5 = true, void 0 === t7.text ? i4.removeChild(i4.firstChild) : i4.textContent = t7.text), t7.domNode = i4, s5 = A(t7, i4, e3.children, t7.children, o7) || s5, s5 = k2(i4, e3.properties, t7.properties, o7) || s5, t7.properties && t7.properties.afterUpdate && t7.properties.afterUpdate.apply(t7.properties.bind || t7.properties, [i4, o7, t7.vnodeSelector, t7.properties, t7.children]);
  1845. return s5 && t7.properties && t7.properties.updateAnimation && t7.properties.updateAnimation(i4, t7.properties, e3.properties), l3;
  1846. };
  1847. var S = (e3, t7) => ({ getLastRender: () => e3, update: (r3) => {
  1848. if (e3.vnodeSelector !== r3.vnodeSelector)
  1849. throw new Error("The selector for the root VNode may not be changed. (consider using dom.merge and add one extra level to the virtual DOM)");
  1850. let o7 = e3;
  1851. e3 = r3, i(o7, r3, t7);
  1852. }, domNode: e3.domNode });
  1853. // node_modules/@arcgis/core/libs/maquette/dom.js
  1854. var p3 = { namespace: void 0, performanceLogger: () => {
  1855. }, eventHandlerInterceptor: void 0, styleApplyer: (e3, r3, o7) => {
  1856. "-" === r3.charAt(0) ? e3.style.setProperty(r3, o7) : e3.style[r3] = o7;
  1857. } };
  1858. var d3 = (r3) => n3(p3, r3);
  1859. var n4 = { create: (e3, t7) => (t7 = d3(t7), w2(e3, document.createElement("div"), void 0, t7), S(e3, t7)), append: (e3, t7, p4) => (p4 = d3(p4), w2(t7, e3, void 0, p4), S(t7, p4)), insertBefore: (e3, t7, p4) => (p4 = d3(p4), w2(t7, e3.parentNode, e3, p4), S(t7, p4)), merge: (e3, r3, p4) => (p4 = d3(p4), r3.domNode = e3, N(e3, r3, p4), S(r3, p4)), replace: (e3, t7, p4) => (p4 = d3(p4), w2(t7, e3.parentNode, e3, p4), e3.parentNode.removeChild(e3), S(t7, p4)) };
  1860. // node_modules/@arcgis/core/libs/maquette/projector.js
  1861. var t4;
  1862. var n5 = (e3, r3) => {
  1863. let t7 = [];
  1864. for (; e3 && e3 !== r3; )
  1865. t7.push(e3), e3 = e3.parentNode;
  1866. return t7;
  1867. };
  1868. t4 = Array.prototype.find ? (e3, r3) => e3.find(r3) : (e3, r3) => e3.filter(r3)[0];
  1869. var o4 = (e3, r3) => {
  1870. let n8 = e3;
  1871. return r3.forEach((e4) => {
  1872. n8 = n8 && n8.children ? t4(n8.children, (r4) => r4.domNode === e4) : void 0;
  1873. }), n8;
  1874. };
  1875. var d4 = (e3, r3, t7) => {
  1876. let d6 = function(d7) {
  1877. t7("domEvent", d7);
  1878. let i4 = r3(), p4 = n5(d7.currentTarget, i4.domNode);
  1879. p4.reverse();
  1880. let l3, a4 = o4(i4.getLastRender(), p4);
  1881. return e3.scheduleRender(), a4 && (l3 = a4.properties[`on${d7.type}`].apply(a4.properties.bind || this, arguments)), t7("domEventProcessed", d7), l3;
  1882. };
  1883. return (e4, r4, t8, n8) => d6;
  1884. };
  1885. var i2 = (t7) => {
  1886. let n8, o7, i4 = d3(t7), p4 = i4.performanceLogger, l3 = true, a4 = false, s5 = [], c5 = [], u3 = (e3, r3, t8) => {
  1887. let o8, l4 = () => o8;
  1888. i4.eventHandlerInterceptor = d4(n8, l4, p4), o8 = e3(r3, t8(), i4), s5.push(o8), c5.push(t8);
  1889. }, f3 = () => {
  1890. if (o7 = void 0, l3) {
  1891. l3 = false, p4("renderStart", void 0);
  1892. for (let e3 = 0; e3 < s5.length; e3++) {
  1893. let r3 = c5[e3]();
  1894. p4("rendered", void 0), s5[e3].update(r3), p4("patched", void 0);
  1895. }
  1896. p4("renderDone", void 0), l3 = true;
  1897. }
  1898. };
  1899. return n8 = { renderNow: f3, scheduleRender: () => {
  1900. o7 || a4 || (o7 = requestAnimationFrame(f3));
  1901. }, stop: () => {
  1902. o7 && (cancelAnimationFrame(o7), o7 = void 0), a4 = true;
  1903. }, resume: () => {
  1904. a4 = false, l3 = true, n8.scheduleRender();
  1905. }, append: (e3, t8) => {
  1906. u3(n4.append, e3, t8);
  1907. }, insertBefore: (e3, t8) => {
  1908. u3(n4.insertBefore, e3, t8);
  1909. }, merge: (e3, t8) => {
  1910. u3(n4.merge, e3, t8);
  1911. }, replace: (e3, t8) => {
  1912. u3(n4.replace, e3, t8);
  1913. }, detach: (e3) => {
  1914. for (let r3 = 0; r3 < c5.length; r3++)
  1915. if (c5[r3] === e3)
  1916. return c5.splice(r3, 1), s5.splice(r3, 1)[0];
  1917. throw new Error("renderFunction was not found");
  1918. } }, n8;
  1919. };
  1920. // node_modules/@arcgis/core/widgets/support/jsxWidgetSupport.js
  1921. var t5 = Symbol("widget");
  1922. var r2 = [];
  1923. var n6 = {};
  1924. var o5 = /* @__PURE__ */ new WeakMap();
  1925. function i3(e3, t7) {
  1926. let o7 = t7.children;
  1927. if (o7 && o7.length)
  1928. for (let r3 = 0; r3 < o7.length; ++r3)
  1929. o7[r3] = i3(e3, o7[r3]);
  1930. else
  1931. o7 = r2;
  1932. const l3 = t7.vnodeSelector;
  1933. if (a3(l3)) {
  1934. const r3 = t7.properties || n6, i4 = r3.key || l3;
  1935. return { vnodeSelector: "div", properties: { key: i4, afterCreate: d5, afterUpdate: c4, afterRemoved: s4, parentWidget: e3, widgetConstructor: l3, widgetProperties: { ...r3, key: i4, children: o7 } }, children: void 0, text: void 0, domNode: null };
  1936. }
  1937. return t7;
  1938. }
  1939. function d5(t7, r3, n8, { parentWidget: i4, widgetConstructor: d6, widgetProperties: c5 }) {
  1940. var _a;
  1941. const a4 = new d6(c5);
  1942. a4.container = t7, o5.set(t7, a4), (_a = a4.afterCreate) == null ? void 0 : _a.call(a4, a4, t7), i4._internalHandles.add(n(() => s4(t7)));
  1943. }
  1944. function c4(e3, t7, r3, { widgetProperties: n8 }) {
  1945. var _a;
  1946. const i4 = o5.get(e3);
  1947. i4 && (i4.set(n8), (_a = i4.afterUpdate) == null ? void 0 : _a.call(i4, i4, e3));
  1948. }
  1949. function s4(e3) {
  1950. const t7 = o5.get(e3);
  1951. t7 && (t7.destroy(), o5.delete(e3));
  1952. }
  1953. function a3(e3) {
  1954. return "function" == typeof e3 && e3[t5];
  1955. }
  1956. // node_modules/@arcgis/core/widgets/support/jsxFactory.js
  1957. var e2 = function(r3) {
  1958. return { vnodeSelector: "", properties: void 0, children: void 0, text: r3.toString(), domNode: null };
  1959. };
  1960. var o6 = function(r3, t7) {
  1961. for (var n8 = 0, i4 = r3.length; n8 < i4; n8++) {
  1962. var d6 = r3[n8];
  1963. Array.isArray(d6) ? o6(d6, t7) : null != d6 && false !== d6 && (d6.hasOwnProperty("vnodeSelector") || (d6 = e2(d6)), t7.push(d6));
  1964. }
  1965. };
  1966. var t6 = function(r3, e3) {
  1967. for (var t7 = [], n8 = 2; n8 < arguments.length; n8++)
  1968. t7[n8 - 2] = arguments[n8];
  1969. if (1 === t7.length && "string" == typeof t7[0])
  1970. return { vnodeSelector: r3, properties: e3 || void 0, children: void 0, text: t7[0], domNode: null };
  1971. var i4 = [];
  1972. return o6(t7, i4), { vnodeSelector: r3, properties: e3 || void 0, children: i4, text: void 0, domNode: null };
  1973. };
  1974. function n7(e3, o7, ...n8) {
  1975. return "function" != typeof e3 || a3(e3) ? t6(e3, o7, ...n8) : e3(o7, ...n8);
  1976. }
  1977. export {
  1978. t2 as t,
  1979. e,
  1980. c,
  1981. o,
  1982. p,
  1983. f,
  1984. h,
  1985. v,
  1986. w,
  1987. k,
  1988. n4 as n,
  1989. i2 as i,
  1990. t5 as t2,
  1991. i3 as i2,
  1992. a3 as a,
  1993. n7 as n2
  1994. };
  1995. /*!
  1996. * @esri/arcgis-html-sanitizer - v3.0.1 - Tue Nov 15 2022 09:46:54 GMT-0800 (Pacific Standard Time)
  1997. * Copyright (c) 2022 - Environmental Systems Research Institute, Inc.
  1998. * Apache-2.0
  1999. *
  2000. * js-xss
  2001. * Copyright (c) 2012-2018 Zongmin Lei(雷宗民) <leizongmin@gmail.com>
  2002. * http://ucdok.com
  2003. * MIT License, see https://github.com/leizongmin/js-xss/blob/master/LICENSE for details
  2004. */
  2005. //# sourceMappingURL=chunk-GZBNC76D.js.map