@epa-wg/custom-element-dist 0.0.1

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 (284) hide show
  1. package/.editorconfig +11 -0
  2. package/.gitignore +26 -0
  3. package/.idea/codeStyles/codeStyleConfig.xml +5 -0
  4. package/.idea/compiler.xml +6 -0
  5. package/.idea/custom-element-dist.iml +13 -0
  6. package/.idea/inspectionProfiles/Project_Default.xml +6 -0
  7. package/.idea/misc.xml +6 -0
  8. package/.idea/modules.xml +8 -0
  9. package/.idea/vcs.xml +6 -0
  10. package/.storybook/main.ts +21 -0
  11. package/.storybook/preview.ts +17 -0
  12. package/.vscode/settings.json +24 -0
  13. package/LICENSE +201 -0
  14. package/README.md +32 -0
  15. package/bin/build.sh +8 -0
  16. package/bin/clean.sh +5 -0
  17. package/bin/postinstall.sh +17 -0
  18. package/bin/start.sh +2 -0
  19. package/coverage/base.css +224 -0
  20. package/coverage/block-navigation.js +87 -0
  21. package/coverage/coverage-final.json +16 -0
  22. package/coverage/favicon.png +0 -0
  23. package/coverage/index.html +161 -0
  24. package/coverage/prettify.css +1 -0
  25. package/coverage/prettify.js +2 -0
  26. package/coverage/sort-arrow-sprite.png +0 -0
  27. package/coverage/sorter.js +196 -0
  28. package/coverage/src/coverage.svg +10 -0
  29. package/coverage/src/custom-element/coverage.svg +10 -0
  30. package/coverage/src/custom-element/custom-element.js/coverage.svg +10 -0
  31. package/coverage/src/custom-element/custom-element.js.html +2149 -0
  32. package/coverage/src/custom-element/http-request.js/coverage.svg +10 -0
  33. package/coverage/src/custom-element/http-request.js.html +352 -0
  34. package/coverage/src/custom-element/index.html +161 -0
  35. package/coverage/src/custom-element/local-storage.js/coverage.svg +10 -0
  36. package/coverage/src/custom-element/local-storage.js.html +346 -0
  37. package/coverage/src/custom-element/location-element.js/coverage.svg +10 -0
  38. package/coverage/src/custom-element/location-element.js.html +343 -0
  39. package/coverage/src/index.html +116 -0
  40. package/coverage/src/mocks/coverage.svg +10 -0
  41. package/coverage/src/mocks/handlers.ts/coverage.svg +10 -0
  42. package/coverage/src/mocks/handlers.ts.html +172 -0
  43. package/coverage/src/mocks/index.html +116 -0
  44. package/coverage/src/stories/attributes.stories.ts/coverage.svg +10 -0
  45. package/coverage/src/stories/attributes.stories.ts.html +481 -0
  46. package/coverage/src/stories/coverage.svg +10 -0
  47. package/coverage/src/stories/css.stories.ts/coverage.svg +10 -0
  48. package/coverage/src/stories/css.stories.ts.html +397 -0
  49. package/coverage/src/stories/dom-merge.stories.ts/coverage.svg +10 -0
  50. package/coverage/src/stories/dom-merge.stories.ts.html +424 -0
  51. package/coverage/src/stories/external-template.stories.ts/coverage.svg +10 -0
  52. package/coverage/src/stories/external-template.stories.ts.html +820 -0
  53. package/coverage/src/stories/http-request.stories.ts/coverage.svg +10 -0
  54. package/coverage/src/stories/http-request.stories.ts.html +817 -0
  55. package/coverage/src/stories/index.html +236 -0
  56. package/coverage/src/stories/local-storage.stories.ts/coverage.svg +10 -0
  57. package/coverage/src/stories/local-storage.stories.ts.html +1249 -0
  58. package/coverage/src/stories/location-element.stories.ts/coverage.svg +10 -0
  59. package/coverage/src/stories/location-element.stories.ts.html +484 -0
  60. package/coverage/src/stories/renderPlay.ts/coverage.svg +10 -0
  61. package/coverage/src/stories/renderPlay.ts.html +151 -0
  62. package/coverage/src/stories/slice-events.stories.ts/coverage.svg +10 -0
  63. package/coverage/src/stories/slice-events.stories.ts.html +436 -0
  64. package/coverage/src/sum.ts/coverage.svg +10 -0
  65. package/coverage/src/sum.ts.html +94 -0
  66. package/dist/confused.svg +37 -0
  67. package/dist/custom-element-B4v-KaIh.cjs +53 -0
  68. package/dist/custom-element-_g0GTup2.js +436 -0
  69. package/dist/custom-element-bundle.cjs +1 -0
  70. package/dist/custom-element-bundle.js +31 -0
  71. package/dist/embed-1.html +3 -0
  72. package/dist/html-template.html +126 -0
  73. package/dist/html-template.xhtml +45 -0
  74. package/dist/html-template.xml +45 -0
  75. package/dist/http-request-BOvP4KTl.js +56 -0
  76. package/dist/http-request-DPrY7mGh.cjs +1 -0
  77. package/dist/local-storage-Boafngui.cjs +1 -0
  78. package/dist/local-storage-BqDEu2kF.js +59 -0
  79. package/dist/location-element-2m0gWq_d.cjs +1 -0
  80. package/dist/location-element-nA_wsqBt.js +49 -0
  81. package/dist/mockServiceWorker.js +284 -0
  82. package/dist/tree.xsl +33 -0
  83. package/dist/vite.svg +1 -0
  84. package/index.html +17 -0
  85. package/package.json +97 -0
  86. package/public/confused.svg +37 -0
  87. package/public/embed-1.html +3 -0
  88. package/public/html-template.html +126 -0
  89. package/public/html-template.xhtml +45 -0
  90. package/public/html-template.xml +45 -0
  91. package/public/mockServiceWorker.js +284 -0
  92. package/public/tree.xsl +33 -0
  93. package/public/vite.svg +1 -0
  94. package/src/assets/lit.svg +1 -0
  95. package/src/custom-element/custom-element.d.ts +36 -0
  96. package/src/custom-element/custom-element.js +688 -0
  97. package/src/custom-element/demo/a.html +63 -0
  98. package/src/custom-element/demo/confused.svg +37 -0
  99. package/src/custom-element/demo/data-slices.html +184 -0
  100. package/src/custom-element/demo/dce-social-preview.png +0 -0
  101. package/src/custom-element/demo/demo.css +22 -0
  102. package/src/custom-element/demo/dom-merge.html +123 -0
  103. package/src/custom-element/demo/embed-1.html +3 -0
  104. package/src/custom-element/demo/external-template.html +179 -0
  105. package/src/custom-element/demo/hex-grid-dce.html +183 -0
  106. package/src/custom-element/demo/hex-grid-transform.png +0 -0
  107. package/src/custom-element/demo/hex-grid.html +66 -0
  108. package/src/custom-element/demo/html-template.html +126 -0
  109. package/src/custom-element/demo/html-template.xhtml +45 -0
  110. package/src/custom-element/demo/html-template.xml +45 -0
  111. package/src/custom-element/demo/http-request.html +143 -0
  112. package/src/custom-element/demo/local-storage.html +218 -0
  113. package/src/custom-element/demo/location-element.html +155 -0
  114. package/src/custom-element/demo/logo.png +0 -0
  115. package/src/custom-element/demo/parameters.html +70 -0
  116. package/src/custom-element/demo/s.xml +14 -0
  117. package/src/custom-element/demo/s.xslt +76 -0
  118. package/src/custom-element/demo/scoped-css.html +169 -0
  119. package/src/custom-element/demo/ss.html +57 -0
  120. package/src/custom-element/demo/table.xml +25 -0
  121. package/src/custom-element/demo/table.xsl +293 -0
  122. package/src/custom-element/demo/template.xsl +46 -0
  123. package/src/custom-element/demo/tree.xml +25 -0
  124. package/src/custom-element/demo/tree.xsl +33 -0
  125. package/src/custom-element/demo/wc-square.svg +1 -0
  126. package/src/custom-element/demo/xhtml-template.xhtml +45 -0
  127. package/src/custom-element/demo/z.html +62 -0
  128. package/src/custom-element/demo/z.xml +60 -0
  129. package/src/custom-element/http-request.js +89 -0
  130. package/src/custom-element/ide/IDE.md +31 -0
  131. package/src/custom-element/ide/customData-dce.json +112 -0
  132. package/src/custom-element/ide/customData-xsl.json +1018 -0
  133. package/src/custom-element/ide/web-types-dce.json +111 -0
  134. package/src/custom-element/ide/web-types-xsl.json +867 -0
  135. package/src/custom-element/index.html +168 -0
  136. package/src/custom-element/index.js +7 -0
  137. package/src/custom-element/local-storage.js +87 -0
  138. package/src/custom-element/location-element.js +87 -0
  139. package/src/custom-element.test.ts +10 -0
  140. package/src/index.css +38 -0
  141. package/src/mocks/handlers.ts +29 -0
  142. package/src/mocks/pokemons.mock.ts +13 -0
  143. package/src/stories/Configure.mdx +364 -0
  144. package/src/stories/assets/accessibility.png +0 -0
  145. package/src/stories/assets/accessibility.svg +5 -0
  146. package/src/stories/assets/addon-library.png +0 -0
  147. package/src/stories/assets/assets.png +0 -0
  148. package/src/stories/assets/avif-test-image.avif +0 -0
  149. package/src/stories/assets/context.png +0 -0
  150. package/src/stories/assets/discord.svg +15 -0
  151. package/src/stories/assets/docs.png +0 -0
  152. package/src/stories/assets/figma-plugin.png +0 -0
  153. package/src/stories/assets/github.svg +3 -0
  154. package/src/stories/assets/share.png +0 -0
  155. package/src/stories/assets/styling.png +0 -0
  156. package/src/stories/assets/testing.png +0 -0
  157. package/src/stories/assets/theming.png +0 -0
  158. package/src/stories/assets/tutorials.svg +12 -0
  159. package/src/stories/assets/youtube.svg +4 -0
  160. package/src/stories/attributes.stories.ts +132 -0
  161. package/src/stories/attributes.test.ts +14 -0
  162. package/src/stories/css.stories.ts +104 -0
  163. package/src/stories/css.test.ts +12 -0
  164. package/src/stories/dom-merge.stories.ts +113 -0
  165. package/src/stories/dom-merge.test.ts +12 -0
  166. package/src/stories/external-template.stories.ts +245 -0
  167. package/src/stories/external-template.test.ts +12 -0
  168. package/src/stories/http-request.stories.ts +244 -0
  169. package/src/stories/http-request.test.ts +29 -0
  170. package/src/stories/local-storage.stories.ts +388 -0
  171. package/src/stories/local-storage.test.ts +12 -0
  172. package/src/stories/location-element.stories.ts +133 -0
  173. package/src/stories/location-element.test.ts +14 -0
  174. package/src/stories/renderPlay.ts +22 -0
  175. package/src/stories/slice-events.stories.ts +117 -0
  176. package/src/stories/slice-events.test.ts +12 -0
  177. package/src/sum.test.ts +6 -0
  178. package/src/sum.ts +4 -0
  179. package/src/vite-env.d.ts +1 -0
  180. package/storybook-static/assets/Color-RQJUDNI5-C4yZhNbM.js +1 -0
  181. package/storybook-static/assets/Configure-C7d36rng.js +173 -0
  182. package/storybook-static/assets/DocsRenderer-K4EAMTCU-BLMupvSb.js +2 -0
  183. package/storybook-static/assets/WithTooltip-Y7J54OF7-BAQSPSFk.js +1 -0
  184. package/storybook-static/assets/accessibility-W_h2acOZ.png +0 -0
  185. package/storybook-static/assets/addon-library-BWUCAmyN.png +0 -0
  186. package/storybook-static/assets/attributes.stories-ZB0RTY1d.js +151 -0
  187. package/storybook-static/assets/context-C0qIqeS4.png +0 -0
  188. package/storybook-static/assets/css.stories-CLSX-Xxd.js +86 -0
  189. package/storybook-static/assets/custom-element-BLZZ00dz.js +53 -0
  190. package/storybook-static/assets/docs---vsFbMi.png +0 -0
  191. package/storybook-static/assets/dom-merge.stories-CgHZUABU.js +138 -0
  192. package/storybook-static/assets/entry-preview-CQqNFx4W.js +8 -0
  193. package/storybook-static/assets/entry-preview-docs-CWgqLfd3.js +2 -0
  194. package/storybook-static/assets/external-template.stories-DtSLMxvg.js +316 -0
  195. package/storybook-static/assets/figma-plugin-CH2hELiO.png +0 -0
  196. package/storybook-static/assets/formatter-B5HCVTEV-tKeEfJA9.js +58 -0
  197. package/storybook-static/assets/http-request.stories-CUzlXO89.js +300 -0
  198. package/storybook-static/assets/iframe-gCvlWuoC.js +2 -0
  199. package/storybook-static/assets/index-CBQwM6ST.js +508 -0
  200. package/storybook-static/assets/index-CDavW7r9.js +193 -0
  201. package/storybook-static/assets/index-CQA5dlr6.js +13 -0
  202. package/storybook-static/assets/index-Cc7K62zD.js +3 -0
  203. package/storybook-static/assets/index-DgaNIR0t.js +1 -0
  204. package/storybook-static/assets/index-Dkj0J1ds.js +1 -0
  205. package/storybook-static/assets/index-DnEJ_bKa.js +1 -0
  206. package/storybook-static/assets/index-DrFu-skq.js +6 -0
  207. package/storybook-static/assets/lit-element-B4_0akdT.js +19 -0
  208. package/storybook-static/assets/local-storage.stories-BkO6djDz.js +415 -0
  209. package/storybook-static/assets/location-element.stories-DCIOUd0D.js +108 -0
  210. package/storybook-static/assets/preview-B4GcaC1c.js +1 -0
  211. package/storybook-static/assets/preview-B63p-W8V.js +20 -0
  212. package/storybook-static/assets/preview-BAz7FMXc.js +396 -0
  213. package/storybook-static/assets/preview-BDY5ThwJ.js +1 -0
  214. package/storybook-static/assets/preview-C6t8KBFr.js +1 -0
  215. package/storybook-static/assets/preview-CYD85dwb.js +7 -0
  216. package/storybook-static/assets/preview-CkgAD_DE.js +2 -0
  217. package/storybook-static/assets/preview-D8LadFCz.js +48 -0
  218. package/storybook-static/assets/preview-DNpCpRPf.js +1 -0
  219. package/storybook-static/assets/preview-PxUn-cIn.js +1 -0
  220. package/storybook-static/assets/share-DGA-UcQf.png +0 -0
  221. package/storybook-static/assets/slice-events.stories-DXKjXI37.js +115 -0
  222. package/storybook-static/assets/styling-Bk6zjRzU.png +0 -0
  223. package/storybook-static/assets/syntaxhighlighter-JOJW2KGS-C04pIVD3.js +1 -0
  224. package/storybook-static/assets/testing-cbzR9l9r.png +0 -0
  225. package/storybook-static/assets/theming-D6WJLNoW.png +0 -0
  226. package/storybook-static/assets/tiny-invariant-BxWVcicq.js +1 -0
  227. package/storybook-static/confused.svg +37 -0
  228. package/storybook-static/embed-1.html +3 -0
  229. package/storybook-static/favicon.svg +7 -0
  230. package/storybook-static/html-template.html +126 -0
  231. package/storybook-static/html-template.xhtml +45 -0
  232. package/storybook-static/html-template.xml +45 -0
  233. package/storybook-static/iframe.html +492 -0
  234. package/storybook-static/index.html +163 -0
  235. package/storybook-static/index.json +1 -0
  236. package/storybook-static/mockServiceWorker.js +284 -0
  237. package/storybook-static/project.json +1 -0
  238. package/storybook-static/sb-addons/chromatic-com-storybook-9/manager-bundle.js +327 -0
  239. package/storybook-static/sb-addons/chromatic-com-storybook-9/manager-bundle.js.LEGAL.txt +40 -0
  240. package/storybook-static/sb-addons/essentials-actions-3/manager-bundle.js +3 -0
  241. package/storybook-static/sb-addons/essentials-actions-3/manager-bundle.js.LEGAL.txt +0 -0
  242. package/storybook-static/sb-addons/essentials-backgrounds-4/manager-bundle.js +12 -0
  243. package/storybook-static/sb-addons/essentials-backgrounds-4/manager-bundle.js.LEGAL.txt +0 -0
  244. package/storybook-static/sb-addons/essentials-controls-2/manager-bundle.js +60 -0
  245. package/storybook-static/sb-addons/essentials-controls-2/manager-bundle.js.LEGAL.txt +18 -0
  246. package/storybook-static/sb-addons/essentials-measure-7/manager-bundle.js +3 -0
  247. package/storybook-static/sb-addons/essentials-measure-7/manager-bundle.js.LEGAL.txt +0 -0
  248. package/storybook-static/sb-addons/essentials-outline-8/manager-bundle.js +3 -0
  249. package/storybook-static/sb-addons/essentials-outline-8/manager-bundle.js.LEGAL.txt +0 -0
  250. package/storybook-static/sb-addons/essentials-toolbars-6/manager-bundle.js +3 -0
  251. package/storybook-static/sb-addons/essentials-toolbars-6/manager-bundle.js.LEGAL.txt +0 -0
  252. package/storybook-static/sb-addons/essentials-viewport-5/manager-bundle.js +3 -0
  253. package/storybook-static/sb-addons/essentials-viewport-5/manager-bundle.js.LEGAL.txt +0 -0
  254. package/storybook-static/sb-addons/interactions-10/manager-bundle.js +33 -0
  255. package/storybook-static/sb-addons/interactions-10/manager-bundle.js.LEGAL.txt +0 -0
  256. package/storybook-static/sb-addons/links-1/manager-bundle.js +3 -0
  257. package/storybook-static/sb-addons/links-1/manager-bundle.js.LEGAL.txt +0 -0
  258. package/storybook-static/sb-addons/storybook-core-server-presets-0/common-manager-bundle.js +3 -0
  259. package/storybook-static/sb-addons/storybook-core-server-presets-0/common-manager-bundle.js.LEGAL.txt +0 -0
  260. package/storybook-static/sb-common-assets/fonts.css +31 -0
  261. package/storybook-static/sb-common-assets/nunito-sans-bold-italic.woff2 +0 -0
  262. package/storybook-static/sb-common-assets/nunito-sans-bold.woff2 +0 -0
  263. package/storybook-static/sb-common-assets/nunito-sans-italic.woff2 +0 -0
  264. package/storybook-static/sb-common-assets/nunito-sans-regular.woff2 +0 -0
  265. package/storybook-static/sb-manager/WithTooltip-Y7J54OF7-CEHQ77YF.js +1 -0
  266. package/storybook-static/sb-manager/chunk-E3WK6ZOZ.js +234 -0
  267. package/storybook-static/sb-manager/chunk-E6ABNH5R.js +183 -0
  268. package/storybook-static/sb-manager/chunk-FEE35O7J.js +9 -0
  269. package/storybook-static/sb-manager/chunk-S4VOIVUE.js +347 -0
  270. package/storybook-static/sb-manager/chunk-XCO5HRLK.js +6 -0
  271. package/storybook-static/sb-manager/chunk-XP3HGWTR.js +1 -0
  272. package/storybook-static/sb-manager/formatter-B5HCVTEV-7DCBOGO6.js +58 -0
  273. package/storybook-static/sb-manager/globals-module-info.js +1 -0
  274. package/storybook-static/sb-manager/globals-runtime.js +1 -0
  275. package/storybook-static/sb-manager/globals.js +1 -0
  276. package/storybook-static/sb-manager/index.js +1 -0
  277. package/storybook-static/sb-manager/runtime.js +1 -0
  278. package/storybook-static/sb-manager/syntaxhighlighter-JOJW2KGS-VF6EEVPI.js +1 -0
  279. package/storybook-static/sb-preview/globals.js +1 -0
  280. package/storybook-static/sb-preview/runtime.js +139 -0
  281. package/storybook-static/tree.xsl +33 -0
  282. package/storybook-static/vite.svg +1 -0
  283. package/tsconfig.json +25 -0
  284. package/vite.config.js +55 -0
@@ -0,0 +1,94 @@
1
+
2
+ <!doctype html>
3
+ <html lang="en">
4
+
5
+ <head>
6
+ <title>Code coverage report for src/sum.ts</title>
7
+ <meta charset="utf-8" />
8
+ <link rel="stylesheet" href="../prettify.css" />
9
+ <link rel="stylesheet" href="../base.css" />
10
+ <link rel="shortcut icon" type="image/x-icon" href="../favicon.png" />
11
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
12
+ <style type='text/css'>
13
+ .coverage-summary .sorter {
14
+ background-image: url(../sort-arrow-sprite.png);
15
+ }
16
+ </style>
17
+ </head>
18
+
19
+ <body>
20
+ <div class='wrapper'>
21
+ <div class='pad1'>
22
+ <h1><a href="../index.html">All files</a> / <a href="index.html">src</a> sum.ts</h1>
23
+ <div class='clearfix'>
24
+
25
+ <div class='fl pad1y space-right2'>
26
+ <span class="strong">100% </span>
27
+ <span class="quiet">Statements</span>
28
+ <span class='fraction'>1/1</span>
29
+ </div>
30
+
31
+
32
+ <div class='fl pad1y space-right2'>
33
+ <span class="strong">100% </span>
34
+ <span class="quiet">Branches</span>
35
+ <span class='fraction'>0/0</span>
36
+ </div>
37
+
38
+
39
+ <div class='fl pad1y space-right2'>
40
+ <span class="strong">100% </span>
41
+ <span class="quiet">Functions</span>
42
+ <span class='fraction'>1/1</span>
43
+ </div>
44
+
45
+
46
+ <div class='fl pad1y space-right2'>
47
+ <span class="strong">100% </span>
48
+ <span class="quiet">Lines</span>
49
+ <span class='fraction'>1/1</span>
50
+ </div>
51
+
52
+
53
+ </div>
54
+ <p class="quiet">
55
+ Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
56
+ </p>
57
+ <template id="filterTemplate">
58
+ <div class="quiet">
59
+ Filter:
60
+ <input type="search" id="fileSearch">
61
+ </div>
62
+ </template>
63
+ </div>
64
+ <div class='status-line high'></div>
65
+ <pre><table class="coverage">
66
+ <tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
67
+ <a name='L2'></a><a href='#L2'>2</a>
68
+ <a name='L3'></a><a href='#L3'>3</a>
69
+ <a name='L4'></a><a href='#L4'>4</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral">&nbsp;</span>
70
+ <span class="cline-any cline-neutral">&nbsp;</span>
71
+ <span class="cline-any cline-yes">1x</span>
72
+ <span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">// sum.js
73
+ export function sum(a: number, b: number) {
74
+ return a + b
75
+ }</pre></td></tr></table></pre>
76
+
77
+ <div class='push'></div><!-- for sticky footer -->
78
+ </div><!-- /wrapper -->
79
+ <div class='footer quiet pad2 space-top1 center small'>
80
+ Code coverage generated by
81
+ <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
82
+ at 2024-05-13T05:26:38.578Z
83
+ </div>
84
+ <script src="../prettify.js"></script>
85
+ <script>
86
+ window.onload = function () {
87
+ prettyPrint();
88
+ };
89
+ </script>
90
+ <script src="../sorter.js"></script>
91
+ <script src="../block-navigation.js"></script>
92
+ </body>
93
+ </html>
94
+
@@ -0,0 +1,37 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="48" height="48" version="1.0">
3
+ <defs>
4
+ <linearGradient id="d">
5
+ <stop offset="0"/>
6
+ <stop offset=".5"/>
7
+ <stop offset=".80000001" stop-opacity=".46666667"/>
8
+ <stop offset="1" stop-opacity="0"/>
9
+ </linearGradient>
10
+ <linearGradient id="a">
11
+ <stop offset="0" stop-color="#fb0"/>
12
+ <stop offset=".5" stop-color="#e29d00"/>
13
+ <stop offset="1" stop-color="#fb0"/>
14
+ </linearGradient>
15
+ <linearGradient id="c">
16
+ <stop offset="0"/>
17
+ <stop offset="1" stop-opacity="0"/>
18
+ </linearGradient>
19
+ <linearGradient id="b">
20
+ <stop offset="0" stop-color="#ffc"/>
21
+ <stop offset=".5" stop-color="#fff965"/>
22
+ <stop offset="1" stop-color="#fc3"/>
23
+ </linearGradient>
24
+ <linearGradient xlink:href="#a" id="i" x1="8.0350637" x2="42.788235" y1="32.372219" y2="32.372219" gradientUnits="userSpaceOnUse" spreadMethod="pad"/>
25
+ <radialGradient xlink:href="#b" id="f" cx="17.986637" cy="16.545853" r="23.978155" fx="17.986637" fy="16.545853" gradientUnits="userSpaceOnUse"/>
26
+ <radialGradient xlink:href="#c" id="e" cx="53.309223" cy="94.956306" r="63.252911" fx="53.309223" fy="94.956306" gradientTransform="matrix(1 0 0 .34935 0 61.7838)" gradientUnits="userSpaceOnUse"/>
27
+ <radialGradient xlink:href="#d" id="g" cx="18.71347" cy="21.759708" r="1.8644418" fx="18.71347" fy="21.759708" gradientTransform="matrix(1 0 0 1.77778 0 -16.92422)" gradientUnits="userSpaceOnUse"/>
28
+ </defs>
29
+ <path fill="url(#e)" d="M116.56213 94.956306a63.252911 22.097088 0 1 1-126.5058174 0 63.252911 22.097088 0 1 1 126.5058174 0z" opacity=".53200001" transform="matrix(.3162 0 0 .33941 6.936944 8.132618)"/>
30
+ <path fill="url(#f)" stroke="#fb0" stroke-width="1.43869453" d="M47.094418 23.83131a23.478155 23.478155 0 1 1-46.9563107 0 23.478155 23.478155 0 1 1 46.9563107 0z" transform="translate(4.30185 4.122792) scale(.83409)"/>
31
+ <path id="h" fill="#fff" fill-opacity="1" fill-rule="nonzero" stroke="#fc0" stroke-dasharray="none" stroke-dashoffset="0" stroke-linejoin="miter" stroke-miterlimit="4" stroke-opacity="1" stroke-width="1" d="M21.682767 18.5142a3.9360437 6.9743929 0 1 1-7.872088 0 3.9360437 6.9743929 0 1 1 7.872088 0z" opacity="1" transform="matrix(1.01507 0 0 1.00354 -.0090285 .916405)"/>
32
+ <path id="j" fill="url(#g)" fill-opacity="1" fill-rule="nonzero" stroke="none" stroke-dasharray="none" stroke-dashoffset="0" stroke-linejoin="miter" stroke-miterlimit="4" stroke-opacity="1" stroke-width="1" d="M20.577912 21.759708a1.8644418 3.314563 0 1 1-3.728883 0 1.8644418 3.314563 0 1 1 3.728883 0z" opacity="1" transform="translate(-.138107 .535104)"/>
33
+ <use xlink:href="#h" width="48" height="48" transform="translate(12.50001 -4.4e-7)"/>
34
+ <path fill="none" stroke="url(#i)" stroke-linecap="round" stroke-width="1.97319973" d="M9.0216636 35.899178c4.7689724-7.457767 10.9544424-9.489956 17.3095664-3.728884 5.404329 4.899155 11.190398 4.350365 15.470406-.656007"/>
35
+ <path fill="none" stroke="#e2ac00" stroke-linecap="round" stroke-width="1.17813516" d="M15.504748 34.21319c3.012147-3.243177 6.693658.87012 6.693658.87012" opacity=".8"/>
36
+ <use xlink:href="#j" width="48" height="48" transform="translate(10.78418 -5)"/>
37
+ </svg>
@@ -0,0 +1,53 @@
1
+ "use strict";const P="http://www.w3.org/1999/XSL/Transform",I="http://www.w3.org/1999/xhtml",ne="http://exslt.org/common",h=(e,l)=>e.getAttribute?.(l),X=e=>e.nodeType===3,ae=e=>typeof e=="string",re=e=>e&&typeof e.nodeType=="number",N=(e,l="",t=document)=>(s=>(l&&s.append(w(t.ownerDocument||t,l)),s))((t.ownerDocument||t).createElement(e)),w=(e,l)=>(e.ownerDocument||e).createTextNode(l),F=e=>{for(;e.firstChild;)e.firstChild.remove();return e},R=e=>(e.getAttributeNames().map(l=>e.removeAttribute(l)),F(e)),oe=e=>(e?.setAttribute("xmlns:xsl",P),e),ie=e=>(e?.setAttribute("xmlns:xhtml",I),oe(e)),_=(e,l)=>{const t=e.ownerDocument.createElementNS(e.namespaceURI,l);for(let s of e.attributes)t.setAttribute(s.name,s.value);for(;e.firstChild;)t.append(e.firstChild);return t};function S(e){return new DOMParser().parseFromString(e,"application/xml")}function $(e){return new XMLSerializer().serializeToString(e)}function j(e,l,t,s){const n=p=>e.ownerDocument.createElement(p),f=((p,b,u)=>(b.append(u=n(p)),u))(l,e);return[...t].forEach(p=>f.append(s(p))),f}function ce(e){return e.slot||(e.setAttribute||(e=N("span",e.textContent.replaceAll(`
2
+ `,""))),e.setAttribute("slot","")),e}function D(e,l,t){const s=typeof e;if(s==="function")debugger;if(s==="string")return N(l,e,t);if(s==="number")return N(l,""+e,t);if(e instanceof Array){const r=N("array");return e.map(f=>r.append(D(f,l,t))),r}const n=N(l,"",t);for(let r in e)re(e[r])||typeof e[r]=="function"||e[r]instanceof Window||(typeof e[r]!="object"?n.setAttribute(r,e[r]):n.append(D(e[r],r,t)));return n}function U(e){if(C(e,"*",l=>[...l.childNodes].filter(t=>t.nodeType===3).forEach(t=>{if(t.parentNode.localName==="style")return;const s=t.data.matchAll(/{([^}]*)}/g);if(s){let n=0,r=p=>w(t,p||""),f=[];if([...s].forEach(p=>{p.index>n&&f.push(r(p.input.substring(n,p.index)));const b=e.querySelector("value-of").cloneNode();b.setAttribute("select",p[1]),f.push(b),n=p.index+p[0].length}),n<t.data.length&&f.push(r(t.data.substring(n,t.data.length))),f.length){for(let p of f)l.insertBefore(p,t);l.removeChild(t)}}})),"all"in e){let l=1;for(let t of e.all)t.setAttribute&&!t.tagName.startsWith("xsl:")&&t.setAttribute("data-dce-id",""+l++)}return e}function B(e,l="xsl:stylesheet"){if(e.tagName===l||e.documentElement?.tagName===l)return U(e);const t=S(`<xsl:stylesheet version="1.0" xmlns:xsl="${P}" xmlns:xhtml="${I}" xmlns:exsl="${ne}" exclude-result-prefixes="exsl" >
3
+ <xsl:output method="xml" />
4
+ <xsl:template match="/"><dce-root xmlns="${I}"><xsl:apply-templates select="*"/></dce-root></xsl:template>
5
+ <xsl:template match="*[name()='template']"><xsl:apply-templates mode="sanitize" select="*|text()"/></xsl:template>
6
+ <xsl:template match="*"><xsl:apply-templates mode="sanitize" select="*|text()"/></xsl:template>
7
+ <xsl:template match="*[name()='svg']|*[name()='math']"><xsl:apply-templates mode="sanitize" select="."/></xsl:template>
8
+ <xsl:template mode="sanitize" match="*[count(text())=1 and count(*)=0]"><xsl:copy><xsl:apply-templates mode="sanitize" select="@*"/><xsl:value-of select="text()"></xsl:value-of></xsl:copy></xsl:template>
9
+ <xsl:template mode="sanitize" match="xhtml:*[count(text())=1 and count(*)=0]"><xsl:element name="{local-name()}"><xsl:apply-templates mode="sanitize" select="@*"/><xsl:value-of select="text()"></xsl:value-of></xsl:element></xsl:template>
10
+ <xsl:template mode="sanitize" match="*|@*"><xsl:copy><xsl:apply-templates mode="sanitize" select="*|@*|text()"/></xsl:copy></xsl:template>
11
+ <xsl:template mode="sanitize" match="text()[normalize-space(.) = '']"/>
12
+ <xsl:template mode="sanitize" match="text()"><dce-text><xsl:copy/></dce-text></xsl:template>
13
+ <xsl:template mode="sanitize" match="xsl:value-of|*[name()='slot']"><dce-text><xsl:copy><xsl:apply-templates mode="sanitize" select="*|@*|text()"/></xsl:copy></dce-text></xsl:template>
14
+ <xsl:template mode="sanitize" match="xhtml:*"><xsl:element name="{local-name()}"><xsl:apply-templates mode="sanitize" select="*|@*|text()"/></xsl:element></xsl:template>
15
+ </xsl:stylesheet>`),s=new XSLTProcessor,n=(a=>{C(a,"script",g=>g.remove());const i=a.content??a.firstElementChild?.content??a.body??a;te.forEach(g=>C(i,g,x=>se(x,i)));const E=a.firstElementChild?.content||a.content,v=g=>{const x=S("<xhtml/>"),T=x.importNode(g,!0);return x.replaceChild(T,x.documentElement),ie(T)};if(E){const g=N("div");return[...E.childNodes].map(x=>g.append(x.cloneNode(!0))),v(g)}return v(a.documentElement||a.body||a)})(e),r=S(`<xsl:stylesheet version="1.0"
16
+ xmlns:xsl="${P}"
17
+ xmlns:xhtml="${I}"
18
+ xmlns:dce="urn:schemas-epa-wg:dce"
19
+ xmlns:exsl="http://exslt.org/common"
20
+ exclude-result-prefixes="exsl"
21
+ >
22
+ <xsl:template match="ignore">
23
+ <xsl:choose>
24
+ <xsl:when test="//attr">{//attr}</xsl:when>
25
+ <xsl:otherwise>{def}</xsl:otherwise>
26
+ </xsl:choose><xsl:value-of select="."></xsl:value-of></xsl:template>
27
+ <xsl:template mode="payload" match="attributes"></xsl:template>
28
+ <xsl:template match="/">
29
+ <xsl:apply-templates mode="payload" select="/datadom/attributes"/>
30
+ </xsl:template>
31
+ <xsl:template name="slot" >
32
+ <xsl:param name="slotname" />
33
+ <xsl:param name="defaultvalue" />
34
+ <xsl:choose>
35
+ <xsl:when test="//payload/*[@slot=$slotname]">
36
+ <xsl:copy-of select="//payload/*[@slot=$slotname]"/>
37
+ </xsl:when>
38
+ <xsl:otherwise>
39
+ <xsl:copy-of select="$defaultvalue"/>
40
+ </xsl:otherwise>
41
+ </xsl:choose>
42
+ </xsl:template>
43
+ <xsl:variable name="js-injected-body">
44
+ <xsl:call-template name="slot" >
45
+ <xsl:with-param name="slotname" select="''"/>
46
+ <xsl:with-param name="defaultvalue"/>
47
+ </xsl:call-template>
48
+ </xsl:variable>
49
+ </xsl:stylesheet>`);s.importStylesheet(t);const f=s.transformToFragment(n,document),p=(a,i)=>a.querySelector(i),b=p(r,'template[mode="payload"]');if(!f)return console.error("transformation error",{xml:n.outerHTML,xsl:$(t)});const u=[];[...f.querySelectorAll("dce-root>attribute")].forEach(a=>{const i=_(a,"xsl:param"),E=h(a,"name");b.append(i);let v=h(i,"select")?.split("??");v||(v=["//"+E,`'${i.textContent}'`],R(i),i.setAttribute("name",E));let g;if(v?.length>1){i.removeAttribute("select");const x=p(r,'template[match="ignore"]>choose').cloneNode(!0);R(x.firstElementChild).append(w(x,"{"+v[0]+"}")),R(x.lastElementChild).append(w(x,"{"+v[1]+"}")),x.firstElementChild.setAttribute("test",v[0]),i.append(x),g=x.cloneNode(!0)}else g=_(a,"xsl:value-of");g.removeAttribute("name"),a.append(g),a.removeAttribute("select"),u.push(i)}),[...f.querySelectorAll("[value]")].filter(a=>a.getAttribute("value").match(/\{(.*)\?\?(.*)\}/g)).forEach(a=>{const i=h(a,"value");i&&a.setAttribute("value",ee(i))});for(const a of f.childNodes)b.append(r.importNode(a,!0));[...b.querySelectorAll("template")].forEach(a=>b.ownerDocument.documentElement.append(a));const L=p(r,'call-template[name="slot"]'),d=a=>{const i=L.cloneNode(!0),E=h(a,"name")||"";E&&i.firstElementChild.setAttribute("select",`'${E}'`);for(let v of a.childNodes)i.lastElementChild.append(v);return i};C(b,"slot",a=>a.parentNode.replaceChild(d(a),a));const c=U(r);return c.params=u,c}async function W(e){return await new Promise((t,s)=>{const n=new XMLHttpRequest;n.open("GET",e),n.responseType="document",n.onload=()=>{n.readyState===n.DONE&&n.status===200&&t(n.responseXML||N("div",n.responseText)),s(n.statusText)},n.addEventListener("error",r=>s(r)),n.send()})}function G(e,l,t=!1){if(e===l)return!0;if(typeof e!="object"||e===null||typeof l!="object"||l===null||Object.keys(e).length!==Object.keys(l).length)return t;for(let s in e)if(!(s in l)||!G(e[s],l[s]))return t;return!0}const Y=(e,l)=>l.split("|").map(t=>t.trim()).map(t=>{if(t.includes("/")){const s=[],n=e.ownerDocument.evaluate(t,e);for(let r;r=n.iterateNext();)s.push(r);return s}return[...e.childNodes].find(s=>s.localName===t)||N(t)}).flat();function J(e,l,t,s){Y(e,l).map(n=>{const r=e.ownerDocument,f=t.sliceEventSource,p=t.sliceElement,b=()=>[...n.childNodes].filter(u=>u.nodeType===3||u.localName==="value").map(u=>u.remove());if(f.getAttributeNames().map(u=>n.setAttribute(u,h(f,u))),[...n.childNodes].filter(u=>u.localName==="event").map(u=>u.remove()),t.type==="init"&&b(),n.append(D(t,"event",r)),p.hasAttribute("slice-value")){f.value===void 0?n.removeAttribute("value"):n.setAttribute("value",f.value);const u=k(h(p,"slice-value"),n);b(),n.append(w(r,u))}else{const u=f.value??h(p,"value");b(),u==null?[...n.childNodes].filter(A=>A.localName!=="event").map(A=>A.remove()):ae(u)?n.append(w(r,u)):n.append(D(u,"value",n.ownerDocument))}})}function C(e,l,t){e.querySelectorAll&&[...e.querySelectorAll(l)].forEach(t)}const K=(e,l)=>(t=>e===t?null:t&&(t.querySelector(l)||K(t,l)))(e.getRootNode()),me=async(e,l)=>{if(!e||!e.trim())return[l];if(e.startsWith("#"))return(t=>{if(!t)return[];const s=t.querySelectorAll(e);if(s.length)return[...s];const n=t.getRootNode();return n===t?[]:K(n)})(l.parentElement);try{const t=await W(e),s=new URL(e,location).hash;if(s){const n=t.querySelectorAll(s);return n.length?[...n]:[l]}return[t]}catch{return[l]}};function Q(e,l){if(X(e)){if(!X(l))debugger;return}for(let t of e.attributes)t.namespaceURI?l.setAttributeNS(t.namespaceURI,t.name,t.value):l.setAttribute(t.name,t.value),t.name==="value"&&(l.value=t.value)}function M(e,l=0){const t={};for(const s of e.childNodes){const n=h(s,"data-dce-id")||s.dceId||0;if(!t[n])n?t[n]=1:(t[n]=s.dceId=++l,s.setAttribute&&s.setAttribute("data-dce-id",s.dceId));else{const r=s.dceId=n+"-"+t[n]++;s.setAttribute&&s.setAttribute("data-dce-id",r)}s.childNodes.length&&M(s)}}function H(e,l){if(!l.length)return F(e);const t={};for(let s of e.childNodes)t[s.dceId],X(s)?(s.data.trim(),t[s.dceId||0]=s):t[h(s,"data-dce-id")||0]=s;for(let s of[...l]){const n=h(s,"data-dce-id")||s.dceId,r=t[n];r?(X(s)?r.nodeValue!==s.nodeValue&&(r.nodeValue=s.nodeValue):(Q(s,r),(r.childNodes.length||s.childNodes.length)&&H(r,s.childNodes)),delete t[n]):e.append(s)}for(let s of Object.values(t))s.remove()}function Z(e,l){return e.hasAttribute(l)||e.setAttribute(l,crypto.randomUUID()),e.getAttribute(l)}const ee=e=>[...e?.matchAll(/([^{}]*)(\{)([^}]+)}([^{}]*)/g)].map(t=>`${t[1]}{${q(t[3])}}${t[4]}`).join(""),q=e=>{if(!e.trim())return e;const l=e.split("??"),t=l.shift(),s=q(l.join("??"));return l.length?`concat( ${t} , substring( ${s} , (1+string-length( ${s} )) * string-length( ${t} ) ) )`:e},k=(e,l)=>{e=q(e);const t=l.ownerDocument.evaluate(e,l);switch(t.resultType){case XPathResult.NUMBER_TYPE:return t.numberValue;case XPathResult.STRING_TYPE:return t.stringValue}let s="";for(let n;n=t.iterateNext();)s+=n.textContent;return s},te="stylesheet,transform,import,include,strip-space,preserve-space,output,key,decimal-format,namespace-alias,template,value-of,copy-of,number,apply-templates,apply-imports,for-each,sort,if,choose,when,otherwise,attribute-set,call-template,with-param,variable,param,text,processing-instruction,element,attribute,comment,copy,message,fallback".split(","),se=(e,l)=>{const t=N("xsl:"+e.localName);for(let s of e.attributes)t.setAttribute(s.name,s.value);for(;e.firstChild;)t.append(e.firstChild);if(e.parentElement)e.parentElement.replaceChild(t,e);else{const s=e.parentElement||l,n=[...s.childNodes];n.forEach((r,f)=>{r===e&&(n[f]=t)}),s.replaceChildren(...n)}};class le extends HTMLElement{static observedAttributes=["src","tag","hidden"];async connectedCallback(){const l=await me(h(this,"src"),this),t=h(this,"tag"),s=t||"dce-"+crypto.randomUUID();for(const d of l)C(d.templateNode||d.content||d,"style",c=>{const a=c.closest("slot"),i=a?`slot[name="${a.name}"]`:"";c.innerHTML=`${s} ${i}{${c.innerHTML}}`,this.append(c)});const n=l.map(d=>B(d)),r=n.map((d,c)=>(c=new XSLTProcessor,c.importStylesheet(d),c));Object.defineProperty(this,"xsltString",{get:()=>n.map(d=>$(d)).join(`
50
+ `)});const f=this,p=[...this.templateNode.querySelectorAll("[slice]")],b=p.map(d=>h(d,"slice")).filter(d=>!d.includes("/")).filter((d,c,a)=>a.indexOf(d)===c),u=n.reduce((d,c)=>(c.params&&d.push(...c.params),d),[]);class A extends HTMLElement{static get observedAttributes(){return u.map(c=>h(c,"name"))}#e=0;connectedCallback(){let c=this.childNodes;if(this.firstElementChild?.tagName==="TEMPLATE"){const m=this.firstElementChild;m.remove(),c=m.content.childNodes;for(const o of[...m.content.childNodes])if(o.localName==="style"){const y=Z(this,"data-dce-style");o.innerHTML=`${s}[data-dce-style="${y}"]{${o.innerHTML}}`,m.insertAdjacentElement("beforebegin",o)}else o.nodeType===1?m.insertAdjacentElement("beforebegin",o):o.nodeType===3&&m.insertAdjacentText("beforebegin",o.data)}const a=S("<datadom/>").documentElement,i=(m,o="")=>(y=>(o&&y.append(w(a,o)),y))(a.ownerDocument.createElement(m));j(a,"payload",c,ce),this.innerHTML="",j(a,"attributes",this.attributes,m=>i(m.nodeName,m.value)),j(a,"dataset",Object.keys(this.dataset),m=>i(m,this.dataset[m]));const E=j(a,"slice",b,m=>i(m,"")),v=m=>k(m,E);this.xml=a;const g=[],x=()=>{const m={};for(let o;o=g.pop();){const y=h(o.sliceElement,"slice");m[y]||(J(E,y,o),m[y]=o)}Object.keys(m).length!==0&&O()};let T;this.onSlice=m=>{m.stopPropagation?.(),m.sliceEventSource=m.currentTarget||m.target,g.push(m),T||(T=setTimeout(()=>{x(),T=0},10))};const O=this.transform=()=>{if(this.#e)debugger;this.#e=1,r.map((o,y)=>{const z=o.transformToFragment(a.ownerDocument,document);return z||console.error(`XSLT transformation error. xsl:
51
+ `,$(n[y]),`
52
+ xml:
53
+ `,$(a)),z}).map(o=>{o&&(M(o),H(this,o.childNodes))}),A.observedAttributes.map(o=>{let y=h(this.firstElementChild,o);y!==h(this,o)&&(this.setAttribute(o,y),this.#t(o,y))}),C(this,"[slice]",o=>{if(!o.dceInitialized){o.dceInitialized=1;const y=h(o,"slice-event");(y||"change").split(" ").forEach(z=>(o.localName==="slice"?o.parentElement:o).addEventListener(z,V=>{V.sliceElement=o,this.onSlice(V)})),(!y||y.includes("init"))&&(o.hasAttribute("slice-value")||o.hasAttribute("value")||o.value?this.onSlice({type:"init",target:o,sliceElement:o}):o.value=v(h(o,"slice")))}}),this.#e=0};O(),x()}#t(c,a){let i=this.xml.querySelector(`attributes>${c}`);i?R(i).append(w(i,a)):(i=N(c,a,this.xml),this.xml.querySelector("attributes").append(i))}attributeChangedCallback(c,a,i){!this.xml||this.#e||(this.#t(c,i),this.transform())}get dce(){return f}}const L=d=>{window.customElements.get(d)!==A&&window.customElements.define(d,A)};if(t)L(t);else{const d=s;this.setAttribute("tag",d),L(d);const c=document.createElement(d);this.getAttributeNames().forEach(a=>c.setAttribute(a,this.getAttribute(a))),c.append(...[...this.childNodes].filter(a=>a.localName!=="style")),this.append(c)}}get templateNode(){return this.firstElementChild?.tagName==="TEMPLATE"?this.firstElementChild.content:this}get dce(){return this}get xslt(){return S(this.xsltString)}}window.customElements.define("custom-element",le);exports.CustomElement=le;exports.assureSlices=Y;exports.assureUID=Z;exports.assureUnique=M;exports.createXsltFromDom=B;exports.deepEqual=G;exports.evalCurly=ee;exports.event2slice=J;exports.merge=H;exports.mergeAttr=Q;exports.obj2node=D;exports.tagUid=U;exports.toXsl=se;exports.xPath=k;exports.xPathDefaults=q;exports.xhrTemplate=W;exports.xml2dom=S;exports.xmlString=$;exports.xslTags=te;
@@ -0,0 +1,436 @@
1
+ const q = "http://www.w3.org/1999/XSL/Transform", z = "http://www.w3.org/1999/xhtml", W = "http://exslt.org/common", h = (e, l) => e.getAttribute?.(l), I = (e) => e.nodeType === 3, G = (e) => typeof e == "string", Y = (e) => e && typeof e.nodeType == "number", E = (e, l = "", t = document) => ((s) => (l && s.append(w(t.ownerDocument || t, l)), s))((t.ownerDocument || t).createElement(e)), w = (e, l) => (e.ownerDocument || e).createTextNode(l), O = (e) => {
2
+ for (; e.firstChild; )
3
+ e.firstChild.remove();
4
+ return e;
5
+ }, j = (e) => (e.getAttributeNames().map((l) => e.removeAttribute(l)), O(e)), J = (e) => (e?.setAttribute("xmlns:xsl", q), e), K = (e) => (e?.setAttribute("xmlns:xhtml", z), J(e)), k = (e, l) => {
6
+ const t = e.ownerDocument.createElementNS(e.namespaceURI, l);
7
+ for (let s of e.attributes)
8
+ t.setAttribute(s.name, s.value);
9
+ for (; e.firstChild; )
10
+ t.append(e.firstChild);
11
+ return t;
12
+ };
13
+ function C(e) {
14
+ return new DOMParser().parseFromString(e, "application/xml");
15
+ }
16
+ function R(e) {
17
+ return new XMLSerializer().serializeToString(e);
18
+ }
19
+ function D(e, l, t, s) {
20
+ const n = (p) => e.ownerDocument.createElement(p), f = ((p, y, u) => (y.append(u = n(p)), u))(l, e);
21
+ return [...t].forEach((p) => f.append(s(p))), f;
22
+ }
23
+ function Q(e) {
24
+ return e.slot || (e.setAttribute || (e = E("span", e.textContent.replaceAll(`
25
+ `, ""))), e.setAttribute("slot", "")), e;
26
+ }
27
+ function X(e, l, t) {
28
+ const s = typeof e;
29
+ if (s === "function")
30
+ debugger;
31
+ if (s === "string")
32
+ return E(l, e, t);
33
+ if (s === "number")
34
+ return E(l, "" + e, t);
35
+ if (e instanceof Array) {
36
+ const r = E("array");
37
+ return e.map((f) => r.append(X(f, l, t))), r;
38
+ }
39
+ const n = E(l, "", t);
40
+ for (let r in e)
41
+ Y(e[r]) || typeof e[r] == "function" || e[r] instanceof Window || (typeof e[r] != "object" ? n.setAttribute(r, e[r]) : n.append(X(e[r], r, t)));
42
+ return n;
43
+ }
44
+ function H(e) {
45
+ if (S(e, "*", (l) => [...l.childNodes].filter((t) => t.nodeType === 3).forEach((t) => {
46
+ if (t.parentNode.localName === "style")
47
+ return;
48
+ const s = t.data.matchAll(/{([^}]*)}/g);
49
+ if (s) {
50
+ let n = 0, r = (p) => w(t, p || ""), f = [];
51
+ if ([...s].forEach((p) => {
52
+ p.index > n && f.push(r(p.input.substring(n, p.index)));
53
+ const y = e.querySelector("value-of").cloneNode();
54
+ y.setAttribute("select", p[1]), f.push(y), n = p.index + p[0].length;
55
+ }), n < t.data.length && f.push(r(t.data.substring(n, t.data.length))), f.length) {
56
+ for (let p of f)
57
+ l.insertBefore(p, t);
58
+ l.removeChild(t);
59
+ }
60
+ }
61
+ })), "all" in e) {
62
+ let l = 1;
63
+ for (let t of e.all)
64
+ t.setAttribute && !t.tagName.startsWith("xsl:") && t.setAttribute("data-dce-id", "" + l++);
65
+ }
66
+ return e;
67
+ }
68
+ function Z(e, l = "xsl:stylesheet") {
69
+ if (e.tagName === l || e.documentElement?.tagName === l)
70
+ return H(e);
71
+ const t = C(`<xsl:stylesheet version="1.0" xmlns:xsl="${q}" xmlns:xhtml="${z}" xmlns:exsl="${W}" exclude-result-prefixes="exsl" >
72
+ <xsl:output method="xml" />
73
+ <xsl:template match="/"><dce-root xmlns="${z}"><xsl:apply-templates select="*"/></dce-root></xsl:template>
74
+ <xsl:template match="*[name()='template']"><xsl:apply-templates mode="sanitize" select="*|text()"/></xsl:template>
75
+ <xsl:template match="*"><xsl:apply-templates mode="sanitize" select="*|text()"/></xsl:template>
76
+ <xsl:template match="*[name()='svg']|*[name()='math']"><xsl:apply-templates mode="sanitize" select="."/></xsl:template>
77
+ <xsl:template mode="sanitize" match="*[count(text())=1 and count(*)=0]"><xsl:copy><xsl:apply-templates mode="sanitize" select="@*"/><xsl:value-of select="text()"></xsl:value-of></xsl:copy></xsl:template>
78
+ <xsl:template mode="sanitize" match="xhtml:*[count(text())=1 and count(*)=0]"><xsl:element name="{local-name()}"><xsl:apply-templates mode="sanitize" select="@*"/><xsl:value-of select="text()"></xsl:value-of></xsl:element></xsl:template>
79
+ <xsl:template mode="sanitize" match="*|@*"><xsl:copy><xsl:apply-templates mode="sanitize" select="*|@*|text()"/></xsl:copy></xsl:template>
80
+ <xsl:template mode="sanitize" match="text()[normalize-space(.) = '']"/>
81
+ <xsl:template mode="sanitize" match="text()"><dce-text><xsl:copy/></dce-text></xsl:template>
82
+ <xsl:template mode="sanitize" match="xsl:value-of|*[name()='slot']"><dce-text><xsl:copy><xsl:apply-templates mode="sanitize" select="*|@*|text()"/></xsl:copy></dce-text></xsl:template>
83
+ <xsl:template mode="sanitize" match="xhtml:*"><xsl:element name="{local-name()}"><xsl:apply-templates mode="sanitize" select="*|@*|text()"/></xsl:element></xsl:template>
84
+ </xsl:stylesheet>`), s = new XSLTProcessor(), n = ((a) => {
85
+ S(a, "script", (g) => g.remove());
86
+ const i = a.content ?? a.firstElementChild?.content ?? a.body ?? a;
87
+ ie.forEach((g) => S(i, g, (x) => ce(x, i)));
88
+ const N = a.firstElementChild?.content || a.content, v = (g) => {
89
+ const x = C("<xhtml/>"), T = x.importNode(g, !0);
90
+ return x.replaceChild(T, x.documentElement), K(T);
91
+ };
92
+ if (N) {
93
+ const g = E("div");
94
+ return [...N.childNodes].map((x) => g.append(x.cloneNode(!0))), v(g);
95
+ }
96
+ return v(a.documentElement || a.body || a);
97
+ })(e), r = C(
98
+ `<xsl:stylesheet version="1.0"
99
+ xmlns:xsl="${q}"
100
+ xmlns:xhtml="${z}"
101
+ xmlns:dce="urn:schemas-epa-wg:dce"
102
+ xmlns:exsl="http://exslt.org/common"
103
+ exclude-result-prefixes="exsl"
104
+ >
105
+ <xsl:template match="ignore">
106
+ <xsl:choose>
107
+ <xsl:when test="//attr">{//attr}</xsl:when>
108
+ <xsl:otherwise>{def}</xsl:otherwise>
109
+ </xsl:choose><xsl:value-of select="."></xsl:value-of></xsl:template>
110
+ <xsl:template mode="payload" match="attributes"></xsl:template>
111
+ <xsl:template match="/">
112
+ <xsl:apply-templates mode="payload" select="/datadom/attributes"/>
113
+ </xsl:template>
114
+ <xsl:template name="slot" >
115
+ <xsl:param name="slotname" />
116
+ <xsl:param name="defaultvalue" />
117
+ <xsl:choose>
118
+ <xsl:when test="//payload/*[@slot=$slotname]">
119
+ <xsl:copy-of select="//payload/*[@slot=$slotname]"/>
120
+ </xsl:when>
121
+ <xsl:otherwise>
122
+ <xsl:copy-of select="$defaultvalue"/>
123
+ </xsl:otherwise>
124
+ </xsl:choose>
125
+ </xsl:template>
126
+ <xsl:variable name="js-injected-body">
127
+ <xsl:call-template name="slot" >
128
+ <xsl:with-param name="slotname" select="''"/>
129
+ <xsl:with-param name="defaultvalue"/>
130
+ </xsl:call-template>
131
+ </xsl:variable>
132
+ </xsl:stylesheet>`
133
+ );
134
+ s.importStylesheet(t);
135
+ const f = s.transformToFragment(n, document), p = (a, i) => a.querySelector(i), y = p(r, 'template[mode="payload"]');
136
+ if (!f)
137
+ return console.error("transformation error", { xml: n.outerHTML, xsl: R(t) });
138
+ const u = [];
139
+ [...f.querySelectorAll("dce-root>attribute")].forEach((a) => {
140
+ const i = k(a, "xsl:param"), N = h(a, "name");
141
+ y.append(i);
142
+ let v = h(i, "select")?.split("??");
143
+ v || (v = ["//" + N, `'${i.textContent}'`], j(i), i.setAttribute("name", N));
144
+ let g;
145
+ if (v?.length > 1) {
146
+ i.removeAttribute("select");
147
+ const x = p(r, 'template[match="ignore"]>choose').cloneNode(!0);
148
+ j(x.firstElementChild).append(w(x, "{" + v[0] + "}")), j(x.lastElementChild).append(w(x, "{" + v[1] + "}")), x.firstElementChild.setAttribute("test", v[0]), i.append(x), g = x.cloneNode(!0);
149
+ } else
150
+ g = k(a, "xsl:value-of");
151
+ g.removeAttribute("name"), a.append(g), a.removeAttribute("select"), u.push(i);
152
+ }), [...f.querySelectorAll("[value]")].filter((a) => a.getAttribute("value").match(/\{(.*)\?\?(.*)\}/g)).forEach((a) => {
153
+ const i = h(a, "value");
154
+ i && a.setAttribute("value", oe(i));
155
+ });
156
+ for (const a of f.childNodes)
157
+ y.append(r.importNode(a, !0));
158
+ [...y.querySelectorAll("template")].forEach((a) => y.ownerDocument.documentElement.append(a));
159
+ const $ = p(r, 'call-template[name="slot"]'), d = (a) => {
160
+ const i = $.cloneNode(!0), N = h(a, "name") || "";
161
+ N && i.firstElementChild.setAttribute("select", `'${N}'`);
162
+ for (let v of a.childNodes)
163
+ i.lastElementChild.append(v);
164
+ return i;
165
+ };
166
+ S(y, "slot", (a) => a.parentNode.replaceChild(d(a), a));
167
+ const c = H(r);
168
+ return c.params = u, c;
169
+ }
170
+ async function ee(e) {
171
+ return await new Promise((t, s) => {
172
+ const n = new XMLHttpRequest();
173
+ n.open("GET", e), n.responseType = "document", n.onload = () => {
174
+ n.readyState === n.DONE && n.status === 200 && t(n.responseXML || E("div", n.responseText)), s(n.statusText);
175
+ }, n.addEventListener("error", (r) => s(r)), n.send();
176
+ });
177
+ }
178
+ function te(e, l, t = !1) {
179
+ if (e === l)
180
+ return !0;
181
+ if (typeof e != "object" || e === null || typeof l != "object" || l === null || Object.keys(e).length !== Object.keys(l).length)
182
+ return t;
183
+ for (let s in e)
184
+ if (!(s in l) || !te(e[s], l[s]))
185
+ return t;
186
+ return !0;
187
+ }
188
+ const se = (e, l) => l.split("|").map((t) => t.trim()).map((t) => {
189
+ if (t.includes("/")) {
190
+ const s = [], n = e.ownerDocument.evaluate(t, e);
191
+ for (let r; r = n.iterateNext(); )
192
+ s.push(r);
193
+ return s;
194
+ }
195
+ return [...e.childNodes].find((s) => s.localName === t) || E(t);
196
+ }).flat();
197
+ function le(e, l, t, s) {
198
+ se(e, l).map((n) => {
199
+ const r = e.ownerDocument, f = t.sliceEventSource, p = t.sliceElement, y = () => [...n.childNodes].filter((u) => u.nodeType === 3 || u.localName === "value").map((u) => u.remove());
200
+ if (f.getAttributeNames().map((u) => n.setAttribute(u, h(f, u))), [...n.childNodes].filter((u) => u.localName === "event").map((u) => u.remove()), t.type === "init" && y(), n.append(X(t, "event", r)), p.hasAttribute("slice-value")) {
201
+ f.value === void 0 ? n.removeAttribute("value") : n.setAttribute("value", f.value);
202
+ const u = B(h(p, "slice-value"), n);
203
+ y(), n.append(w(r, u));
204
+ } else {
205
+ const u = f.value ?? h(p, "value");
206
+ y(), u == null ? [...n.childNodes].filter((A) => A.localName !== "event").map((A) => A.remove()) : G(u) ? n.append(w(r, u)) : n.append(X(u, "value", n.ownerDocument));
207
+ }
208
+ });
209
+ }
210
+ function S(e, l, t) {
211
+ e.querySelectorAll && [...e.querySelectorAll(l)].forEach(t);
212
+ }
213
+ const V = (e, l) => ((t) => e === t ? null : t && (t.querySelector(l) || V(t, l)))(e.getRootNode()), ne = async (e, l) => {
214
+ if (!e || !e.trim())
215
+ return [l];
216
+ if (e.startsWith("#"))
217
+ return ((t) => {
218
+ if (!t)
219
+ return [];
220
+ const s = t.querySelectorAll(e);
221
+ if (s.length)
222
+ return [...s];
223
+ const n = t.getRootNode();
224
+ return n === t ? [] : V(n);
225
+ })(l.parentElement);
226
+ try {
227
+ const t = await ee(e), s = new URL(e, location).hash;
228
+ if (s) {
229
+ const n = t.querySelectorAll(s);
230
+ return n.length ? [...n] : [l];
231
+ }
232
+ return [t];
233
+ } catch {
234
+ return [l];
235
+ }
236
+ };
237
+ function ae(e, l) {
238
+ if (I(e)) {
239
+ if (!I(l))
240
+ debugger;
241
+ return;
242
+ }
243
+ for (let t of e.attributes)
244
+ t.namespaceURI ? l.setAttributeNS(t.namespaceURI, t.name, t.value) : l.setAttribute(t.name, t.value), t.name === "value" && (l.value = t.value);
245
+ }
246
+ function _(e, l = 0) {
247
+ const t = {};
248
+ for (const s of e.childNodes) {
249
+ const n = h(s, "data-dce-id") || s.dceId || 0;
250
+ if (!t[n])
251
+ n ? t[n] = 1 : (t[n] = s.dceId = ++l, s.setAttribute && s.setAttribute("data-dce-id", s.dceId));
252
+ else {
253
+ const r = s.dceId = n + "-" + t[n]++;
254
+ s.setAttribute && s.setAttribute("data-dce-id", r);
255
+ }
256
+ s.childNodes.length && _(s);
257
+ }
258
+ }
259
+ function F(e, l) {
260
+ if (!l.length)
261
+ return O(e);
262
+ const t = {};
263
+ for (let s of e.childNodes)
264
+ t[s.dceId], I(s) ? (s.data.trim(), t[s.dceId || 0] = s) : t[h(s, "data-dce-id") || 0] = s;
265
+ for (let s of [...l]) {
266
+ const n = h(s, "data-dce-id") || s.dceId, r = t[n];
267
+ r ? (I(s) ? r.nodeValue !== s.nodeValue && (r.nodeValue = s.nodeValue) : (ae(s, r), (r.childNodes.length || s.childNodes.length) && F(r, s.childNodes)), delete t[n]) : e.append(s);
268
+ }
269
+ for (let s of Object.values(t))
270
+ s.remove();
271
+ }
272
+ function re(e, l) {
273
+ return e.hasAttribute(l) || e.setAttribute(l, crypto.randomUUID()), e.getAttribute(l);
274
+ }
275
+ const oe = (e) => [...e?.matchAll(/([^{}]*)(\{)([^}]+)}([^{}]*)/g)].map((t) => `${t[1]}{${M(t[3])}}${t[4]}`).join(""), M = (e) => {
276
+ if (!e.trim())
277
+ return e;
278
+ const l = e.split("??"), t = l.shift(), s = M(l.join("??"));
279
+ return l.length ? `concat( ${t} , substring( ${s} , (1+string-length( ${s} )) * string-length( ${t} ) ) )` : e;
280
+ }, B = (e, l) => {
281
+ e = M(e);
282
+ const t = l.ownerDocument.evaluate(e, l);
283
+ switch (t.resultType) {
284
+ case XPathResult.NUMBER_TYPE:
285
+ return t.numberValue;
286
+ case XPathResult.STRING_TYPE:
287
+ return t.stringValue;
288
+ }
289
+ let s = "";
290
+ for (let n; n = t.iterateNext(); )
291
+ s += n.textContent;
292
+ return s;
293
+ }, ie = "stylesheet,transform,import,include,strip-space,preserve-space,output,key,decimal-format,namespace-alias,template,value-of,copy-of,number,apply-templates,apply-imports,for-each,sort,if,choose,when,otherwise,attribute-set,call-template,with-param,variable,param,text,processing-instruction,element,attribute,comment,copy,message,fallback".split(","), ce = (e, l) => {
294
+ const t = E("xsl:" + e.localName);
295
+ for (let s of e.attributes)
296
+ t.setAttribute(s.name, s.value);
297
+ for (; e.firstChild; )
298
+ t.append(e.firstChild);
299
+ if (e.parentElement)
300
+ e.parentElement.replaceChild(t, e);
301
+ else {
302
+ const s = e.parentElement || l, n = [...s.childNodes];
303
+ n.forEach((r, f) => {
304
+ r === e && (n[f] = t);
305
+ }), s.replaceChildren(...n);
306
+ }
307
+ };
308
+ class me extends HTMLElement {
309
+ static observedAttributes = ["src", "tag", "hidden"];
310
+ async connectedCallback() {
311
+ const l = await ne(h(this, "src"), this), t = h(this, "tag"), s = t || "dce-" + crypto.randomUUID();
312
+ for (const d of l)
313
+ S(d.templateNode || d.content || d, "style", (c) => {
314
+ const a = c.closest("slot"), i = a ? `slot[name="${a.name}"]` : "";
315
+ c.innerHTML = `${s} ${i}{${c.innerHTML}}`, this.append(c);
316
+ });
317
+ const n = l.map((d) => Z(d)), r = n.map((d, c) => (c = new XSLTProcessor(), c.importStylesheet(d), c));
318
+ Object.defineProperty(this, "xsltString", { get: () => n.map((d) => R(d)).join(`
319
+ `) });
320
+ const f = this, p = [...this.templateNode.querySelectorAll("[slice]")], y = p.map((d) => h(d, "slice")).filter((d) => !d.includes("/")).filter((d, c, a) => a.indexOf(d) === c), u = n.reduce((d, c) => (c.params && d.push(...c.params), d), []);
321
+ class A extends HTMLElement {
322
+ static get observedAttributes() {
323
+ return u.map((c) => h(c, "name"));
324
+ }
325
+ #e = 0;
326
+ connectedCallback() {
327
+ let c = this.childNodes;
328
+ if (this.firstElementChild?.tagName === "TEMPLATE") {
329
+ const m = this.firstElementChild;
330
+ m.remove(), c = m.content.childNodes;
331
+ for (const o of [...m.content.childNodes])
332
+ if (o.localName === "style") {
333
+ const b = re(this, "data-dce-style");
334
+ o.innerHTML = `${s}[data-dce-style="${b}"]{${o.innerHTML}}`, m.insertAdjacentElement("beforebegin", o);
335
+ } else
336
+ o.nodeType === 1 ? m.insertAdjacentElement("beforebegin", o) : o.nodeType === 3 && m.insertAdjacentText("beforebegin", o.data);
337
+ }
338
+ const a = C("<datadom/>").documentElement, i = (m, o = "") => ((b) => (o && b.append(w(a, o)), b))(a.ownerDocument.createElement(m));
339
+ D(a, "payload", c, Q), this.innerHTML = "", D(a, "attributes", this.attributes, (m) => i(m.nodeName, m.value)), D(a, "dataset", Object.keys(this.dataset), (m) => i(m, this.dataset[m]));
340
+ const N = D(a, "slice", y, (m) => i(m, "")), v = (m) => B(m, N);
341
+ this.xml = a;
342
+ const g = [], x = () => {
343
+ const m = {};
344
+ for (let o; o = g.pop(); ) {
345
+ const b = h(o.sliceElement, "slice");
346
+ m[b] || (le(N, b, o), m[b] = o);
347
+ }
348
+ Object.keys(m).length !== 0 && P();
349
+ };
350
+ let T;
351
+ this.onSlice = (m) => {
352
+ m.stopPropagation?.(), m.sliceEventSource = m.currentTarget || m.target, g.push(m), T || (T = setTimeout(() => {
353
+ x(), T = 0;
354
+ }, 10));
355
+ };
356
+ const P = this.transform = () => {
357
+ if (this.#e)
358
+ debugger;
359
+ this.#e = 1, r.map((o, b) => {
360
+ const L = o.transformToFragment(a.ownerDocument, document);
361
+ return L || console.error(`XSLT transformation error. xsl:
362
+ `, R(n[b]), `
363
+ xml:
364
+ `, R(a)), L;
365
+ }).map((o) => {
366
+ o && (_(o), F(this, o.childNodes));
367
+ }), A.observedAttributes.map((o) => {
368
+ let b = h(this.firstElementChild, o);
369
+ b !== h(this, o) && (this.setAttribute(o, b), this.#t(o, b));
370
+ }), S(this, "[slice]", (o) => {
371
+ if (!o.dceInitialized) {
372
+ o.dceInitialized = 1;
373
+ const b = h(o, "slice-event");
374
+ (b || "change").split(" ").forEach((L) => (o.localName === "slice" ? o.parentElement : o).addEventListener(L, (U) => {
375
+ U.sliceElement = o, this.onSlice(U);
376
+ })), (!b || b.includes("init")) && (o.hasAttribute("slice-value") || o.hasAttribute("value") || o.value ? this.onSlice({ type: "init", target: o, sliceElement: o }) : o.value = v(h(o, "slice")));
377
+ }
378
+ }), this.#e = 0;
379
+ };
380
+ P(), x();
381
+ }
382
+ #t(c, a) {
383
+ let i = this.xml.querySelector(`attributes>${c}`);
384
+ i ? j(i).append(w(i, a)) : (i = E(c, a, this.xml), this.xml.querySelector("attributes").append(i));
385
+ }
386
+ attributeChangedCallback(c, a, i) {
387
+ !this.xml || this.#e || (this.#t(c, i), this.transform());
388
+ }
389
+ get dce() {
390
+ return f;
391
+ }
392
+ }
393
+ const $ = (d) => {
394
+ window.customElements.get(d) !== A && window.customElements.define(d, A);
395
+ };
396
+ if (t)
397
+ $(t);
398
+ else {
399
+ const d = s;
400
+ this.setAttribute("tag", d), $(d);
401
+ const c = document.createElement(d);
402
+ this.getAttributeNames().forEach((a) => c.setAttribute(a, this.getAttribute(a))), c.append(...[...this.childNodes].filter((a) => a.localName !== "style")), this.append(c);
403
+ }
404
+ }
405
+ get templateNode() {
406
+ return this.firstElementChild?.tagName === "TEMPLATE" ? this.firstElementChild.content : this;
407
+ }
408
+ get dce() {
409
+ return this;
410
+ }
411
+ get xslt() {
412
+ return C(this.xsltString);
413
+ }
414
+ }
415
+ window.customElements.define("custom-element", me);
416
+ export {
417
+ me as C,
418
+ R as a,
419
+ ee as b,
420
+ Z as c,
421
+ te as d,
422
+ se as e,
423
+ le as f,
424
+ _ as g,
425
+ F as h,
426
+ re as i,
427
+ oe as j,
428
+ M as k,
429
+ B as l,
430
+ ae as m,
431
+ ie as n,
432
+ X as o,
433
+ ce as p,
434
+ H as t,
435
+ C as x
436
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./custom-element-B4v-KaIh.cjs"),l=require("./http-request-DPrY7mGh.cjs"),t=require("./local-storage-Boafngui.cjs"),a=require("./location-element-2m0gWq_d.cjs");exports.CustomElement=e.CustomElement;exports.assureSlices=e.assureSlices;exports.assureUID=e.assureUID;exports.assureUnique=e.assureUnique;exports.createXsltFromDom=e.createXsltFromDom;exports.deepEqual=e.deepEqual;exports.default=e.CustomElement;exports.evalCurly=e.evalCurly;exports.event2slice=e.event2slice;exports.merge=e.merge;exports.mergeAttr=e.mergeAttr;exports.obj2node=e.obj2node;exports.tagUid=e.tagUid;exports.toXsl=e.toXsl;exports.xPath=e.xPath;exports.xPathDefaults=e.xPathDefaults;exports.xhrTemplate=e.xhrTemplate;exports.xml2dom=e.xml2dom;exports.xmlString=e.xmlString;exports.xslTags=e.xslTags;exports.HttpRequestElement=l.HttpRequestElement;exports.LocalStorageElement=t.LocalStorageElement;exports.localStorageSetItem=t.localStorageSetItem;exports.LocationElement=a.LocationElement;