@elementspanel/panel 0.0.0-stage → 1.0.0

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 (139) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +6 -2
  3. package/app.js +2640 -0
  4. package/app.js.map +1 -0
  5. package/bin/panel.cjs +2 -0
  6. package/package.json +107 -4
  7. package/public/assets/AppDialog.vue_vue_type_style_index_0_lang-8b56f871.js +2 -0
  8. package/public/assets/AppDialog.vue_vue_type_style_index_0_lang-8b56f871.js.map +1 -0
  9. package/public/assets/CardPanel-a704f146.js +2 -0
  10. package/public/assets/CardPanel-a704f146.js.map +1 -0
  11. package/public/assets/DesktopDialog-081410ca.js +2 -0
  12. package/public/assets/DesktopDialog-081410ca.js.map +1 -0
  13. package/public/assets/Loading.vue_vue_type_script_setup_true_lang-9e79de95.js +2 -0
  14. package/public/assets/Loading.vue_vue_type_script_setup_true_lang-9e79de95.js.map +1 -0
  15. package/public/assets/PageToolbar-5ca1a069.js +2 -0
  16. package/public/assets/PageToolbar-5ca1a069.js.map +1 -0
  17. package/public/assets/_elements-sdk_cordis-b0b88a2c.js +2 -0
  18. package/public/assets/_elements-sdk_cordis-b0b88a2c.js.map +1 -0
  19. package/public/assets/_elements-sdk_cordis-e3bebc89.js +9 -0
  20. package/public/assets/_elements-sdk_cordis-e3bebc89.js.map +1 -0
  21. package/public/assets/_elements-sdk_cosmokit-e4842f5c.js +2 -0
  22. package/public/assets/_elements-sdk_cosmokit-e4842f5c.js.map +1 -0
  23. package/public/assets/_elements-sdk_pinia-fc8ba898.js +6 -0
  24. package/public/assets/_elements-sdk_pinia-fc8ba898.js.map +1 -0
  25. package/public/assets/_elements-sdk_vue-b86b0db6.js +2 -0
  26. package/public/assets/_elements-sdk_vue-b86b0db6.js.map +1 -0
  27. package/public/assets/_elements-sdk_vue-i18n-64f8e172.js +2 -0
  28. package/public/assets/_elements-sdk_vue-i18n-64f8e172.js.map +1 -0
  29. package/public/assets/_elements-sdk_vue-router-a62f518d.js +2 -0
  30. package/public/assets/_elements-sdk_vue-router-a62f518d.js.map +1 -0
  31. package/public/assets/_plugin-vue_export-helper-c27b6911.js +2 -0
  32. package/public/assets/_plugin-vue_export-helper-c27b6911.js.map +1 -0
  33. package/public/assets/chartjs-1e331dfb.js +19 -0
  34. package/public/assets/chartjs-1e331dfb.js.map +1 -0
  35. package/public/assets/codemirror-1b74112a.js +29 -0
  36. package/public/assets/codemirror-1b74112a.js.map +1 -0
  37. package/public/assets/const-01673e6b.js +38 -0
  38. package/public/assets/const-01673e6b.js.map +1 -0
  39. package/public/assets/const-cfe7ddfe.js +2 -0
  40. package/public/assets/const-cfe7ddfe.js.map +1 -0
  41. package/public/assets/context-b16af9cc.js +2 -0
  42. package/public/assets/context-b16af9cc.js.map +1 -0
  43. package/public/assets/copy-4d64fc1f.js +2 -0
  44. package/public/assets/copy-4d64fc1f.js.map +1 -0
  45. package/public/assets/core-b6992169.js +2 -0
  46. package/public/assets/core-b6992169.js.map +1 -0
  47. package/public/assets/daemon_connection_error-9eb654cc.png +0 -0
  48. package/public/assets/dayjs.min-25183c0a.js +2 -0
  49. package/public/assets/dayjs.min-25183c0a.js.map +1 -0
  50. package/public/assets/desktopNotice-2c886f6b.js +2 -0
  51. package/public/assets/desktopNotice-2c886f6b.js.map +1 -0
  52. package/public/assets/dom-ff483262.js +2 -0
  53. package/public/assets/dom-ff483262.js.map +1 -0
  54. package/public/assets/htmlparser2-bcb8f9db.js +3 -0
  55. package/public/assets/htmlparser2-bcb8f9db.js.map +1 -0
  56. package/public/assets/i18n-fe0f1ee7.js +2 -0
  57. package/public/assets/i18n-fe0f1ee7.js.map +1 -0
  58. package/public/assets/index-76b0df52.js +2 -0
  59. package/public/assets/index-76b0df52.js.map +1 -0
  60. package/public/assets/index-c684efbd.js +2 -0
  61. package/public/assets/index-c684efbd.js.map +1 -0
  62. package/public/assets/index-e3f35709.js +2 -0
  63. package/public/assets/index-e3f35709.js.map +1 -0
  64. package/public/assets/instance-26cca4c8.js +2 -0
  65. package/public/assets/instance-26cca4c8.js.map +1 -0
  66. package/public/assets/instance_contract-0115efe5.js +2 -0
  67. package/public/assets/instance_contract-0115efe5.js.map +1 -0
  68. package/public/assets/lodash-001e4f93.js +28 -0
  69. package/public/assets/lodash-001e4f93.js.map +1 -0
  70. package/public/assets/logo-9e2a668b.svg +15 -0
  71. package/public/assets/logo_b-35ccadda.svg +8 -0
  72. package/public/assets/materialdesignicons-webfont-0b183104.eot +0 -0
  73. package/public/assets/materialdesignicons-webfont-61e8aba5.ttf +0 -0
  74. package/public/assets/materialdesignicons-webfont-662fefa8.woff2 +0 -0
  75. package/public/assets/materialdesignicons-webfont-a5928a0d.woff +0 -0
  76. package/public/assets/msl-logo-699c8076.png +0 -0
  77. package/public/assets/nodes-402cdcbd.js +2 -0
  78. package/public/assets/nodes-402cdcbd.js.map +1 -0
  79. package/public/assets/plugin_contract-691cd37a.js +2 -0
  80. package/public/assets/plugin_contract-691cd37a.js.map +1 -0
  81. package/public/assets/preload-helper-a4192956.js +2 -0
  82. package/public/assets/preload-helper-a4192956.js.map +1 -0
  83. package/public/assets/protocol-97f7bab7.js +2 -0
  84. package/public/assets/protocol-97f7bab7.js.map +1 -0
  85. package/public/assets/randId-ed0b95b7.js +2 -0
  86. package/public/assets/randId-ed0b95b7.js.map +1 -0
  87. package/public/assets/router-0f7d4714.js +3 -0
  88. package/public/assets/router-0f7d4714.js.map +1 -0
  89. package/public/assets/safe-87846d89.js +89 -0
  90. package/public/assets/safe-87846d89.js.map +1 -0
  91. package/public/assets/sdk-01dda668.js +2 -0
  92. package/public/assets/sdk-01dda668.js.map +1 -0
  93. package/public/assets/shared-f2e37690.js +2 -0
  94. package/public/assets/shared-f2e37690.js.map +1 -0
  95. package/public/assets/useAppConfigStore-289073ec.js +2 -0
  96. package/public/assets/useAppConfigStore-289073ec.js.map +1 -0
  97. package/public/assets/useAppRouters-5f58db32.js +2 -0
  98. package/public/assets/useAppRouters-5f58db32.js.map +1 -0
  99. package/public/assets/useAppStateStore-a644582a.js +2 -0
  100. package/public/assets/useAppStateStore-a644582a.js.map +1 -0
  101. package/public/assets/useAppToolsStore-3a911226.js +2 -0
  102. package/public/assets/useAppToolsStore-3a911226.js.map +1 -0
  103. package/public/assets/useDefineApi-ead2616e.js +7 -0
  104. package/public/assets/useDefineApi-ead2616e.js.map +1 -0
  105. package/public/assets/useInstanceActionAvailability-dec16c10.js +2 -0
  106. package/public/assets/useInstanceActionAvailability-dec16c10.js.map +1 -0
  107. package/public/assets/useKeyboardEvents-dba9d5ca.js +2 -0
  108. package/public/assets/useKeyboardEvents-dba9d5ca.js.map +1 -0
  109. package/public/assets/useMountComponent-dd1fcfea.js +2 -0
  110. package/public/assets/useMountComponent-dd1fcfea.js.map +1 -0
  111. package/public/assets/useOverviewChart-119bda3b.js +2 -0
  112. package/public/assets/useOverviewChart-119bda3b.js.map +1 -0
  113. package/public/assets/useOverviewInfo-a149d634.js +2 -0
  114. package/public/assets/useOverviewInfo-a149d634.js.map +1 -0
  115. package/public/assets/usePolling-f2f09d27.js +2 -0
  116. package/public/assets/usePolling-f2f09d27.js.map +1 -0
  117. package/public/assets/useScreen-e3715e1f.js +2 -0
  118. package/public/assets/useScreen-e3715e1f.js.map +1 -0
  119. package/public/assets/useSocketIo-bc0a62c2.js +2 -0
  120. package/public/assets/useSocketIo-bc0a62c2.js.map +1 -0
  121. package/public/assets/useThemeSwitch-6ff90248.js +2 -0
  122. package/public/assets/useThemeSwitch-6ff90248.js.map +1 -0
  123. package/public/assets/vue-2433bd89.js +64 -0
  124. package/public/assets/vue-2433bd89.js.map +1 -0
  125. package/public/assets/vue-4c6a2976.css +1 -0
  126. package/public/assets/vuetifyModal-49cb95ba.js +2 -0
  127. package/public/assets/vuetifyModal-49cb95ba.js.map +1 -0
  128. package/public/assets/xterm-62ba073f.js +67 -0
  129. package/public/assets/xterm-62ba073f.js.map +1 -0
  130. package/public/favicon.ico +0 -0
  131. package/public/index.html +207 -0
  132. package/public/robots.txt +2 -0
  133. package/public/stats.html +4950 -0
  134. package/runtime/cli.cjs +305 -0
  135. package/runtime/daemon-tools.cjs +113 -0
  136. package/runtime/npm-plugins.cjs +176 -0
  137. package/runtime/plugin-resolution.cjs +123 -0
  138. package/runtime/shared-dependencies.cjs +35 -0
  139. package/runtime/worker.cjs +25 -0
@@ -0,0 +1,15 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg id="uuid-2245ba2b-2b3d-467b-8b10-c885a2f26c5c" data-name="正式" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 988.03 988.03">
3
+ <defs>
4
+ <style>
5
+ .uuid-3db2d717-3a8f-405d-a743-c2abc8a7cd85 {
6
+ fill: #fff;
7
+ }
8
+ </style>
9
+ </defs>
10
+ <g>
11
+ <path class="uuid-3db2d717-3a8f-405d-a743-c2abc8a7cd85" d="M704.32,521.34l65.14-37.61v-148.74s-275.44-159.03-275.44-159.03l-275.44,159.03v318.05l211.38,122.04v-78.44l-139.81-80.72-3.64-2.1v-25.66l3.64-2.1,196.59-113.5v-78.44l-189.31,109.3-10.92,6.3v-135.51l3.64-2.1,200.23-115.6,3.64-2.1,3.64,2.1,200.23,115.6,3.64,2.1v70.3l-3.64,2.1-15.15,8.75c-55.09,31.8-101.02,77.73-132.82,132.82-31.8,55.09-48.62,117.83-48.62,181.44v38.25l67.93-39.22v-13.33c0-96.22,51.76-185.87,135.09-233.98Z"/>
12
+ <path class="uuid-3db2d717-3a8f-405d-a743-c2abc8a7cd85" d="M769.46,558.28l-23.22,13.68-.07.04-.07.04c-31.94,17.92-61.07,46.16-82.03,79.51-16.56,26.36-27.13,54.67-29.96,79.64l135.34-78.14v-94.76Z"/>
13
+ </g>
14
+ <path class="uuid-3db2d717-3a8f-405d-a743-c2abc8a7cd85" d="M79.02,254.42v479.2l415,239.6,415-239.6V254.42L494.02,14.82,79.02,254.42ZM837.44,291.54l3.64,2.1v400.76l-3.64,2.1-339.79,196.18-3.64,2.1-3.64-2.1-339.79-196.18-3.64-2.1v-400.76l3.64-2.1L490.38,95.36l3.64-2.1,3.64,2.1,339.79,196.18Z"/>
15
+ </svg>
@@ -0,0 +1,8 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg id="uuid-066daa2d-6a15-4912-9a55-e6aad2d5968c" data-name="正式" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 988.03 988.03">
3
+ <g>
4
+ <path d="M494.02,814.85h0l81.07-46.8h0v-17.23c0-92.31,49.24-177.6,129.18-223.75l67.6-39.03v-.16h0v-154.27l-277.85-160.41h0s-277.85,160.41-277.85,160.41v320.83l222.04,128.2v-93.61l-140.98-81.39v-16.96l196.78-113.61v-93.61l-196.78,113.61v-116.65l196.78-113.61,196.78,113.61v60.83l-14.89,8.6c-112.55,64.98-181.89,185.07-181.89,315.04v49.98Z"/>
5
+ <path d="M771.86,654.43v-109.77l-33.61,19.79c-69.17,38.82-114.46,117.55-114.46,175.47l148.06-85.49Z"/>
6
+ </g>
7
+ <path d="M494.02,108.42l333.93,192.8v385.59l-333.93,192.8-333.93-192.8v-385.59L494.02,108.42h0ZM494.02,14.82L79.02,254.42v479.2l415,239.6,415-239.6V254.42L494.02,14.82h0Z"/>
8
+ </svg>
@@ -0,0 +1,2 @@
1
+ import{u as i}from"./context-b16af9cc.js";import{t}from"./i18n-fe0f1ee7.js";function d(){const o=i("node");if(!o)throw new Error('Panel frontend plugin "node" is not loaded.');return o.api}const a=()=>d().remoteNodeList();function c(o,r,e){if(!o)return t("TXT_CODE_aa373641");const n=r?"":t("TXT_CODE_836addb9");return e?`${e} - ${o} ${n}`:`${o} ${n}`}export{c,a as r};
2
+ //# sourceMappingURL=nodes-402cdcbd.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nodes-402cdcbd.js","sources":["../../../panel/plugins/console/src/services/apis/node.ts","../../../panel/plugins/console/src/tools/nodes.ts"],"sourcesContent":["import { usePluginService } from \"@/plugin/context\";\nimport type { Ref } from \"vue\";\nimport type { NodeStatus } from \"@/types\";\n\nexport interface NodeApiResult<T> {\n isLoading: Ref<boolean>;\n state: Ref<T | undefined>;\n isReady: Ref<boolean>;\n execute: (config?: any) => Promise<Ref<T | undefined>>;\n}\n\nexport interface NodePluginApi {\n remoteNodeList: () => NodeApiResult<NodeStatus[]>;\n editNode: () => NodeApiResult<any>;\n addNode: () => NodeApiResult<any>;\n deleteNode: () => NodeApiResult<any>;\n connectNode: () => NodeApiResult<any>;\n}\n\nfunction resolveNodeApi(): NodePluginApi {\n const node = usePluginService<{ api: NodePluginApi }>(\"node\");\n if (!node) {\n throw new Error('Panel frontend plugin \"node\" is not loaded.');\n }\n return node.api;\n}\n\nexport const remoteNodeList = () => resolveNodeApi().remoteNodeList();\nexport const editNode = () => resolveNodeApi().editNode();\nexport const addNode = () => resolveNodeApi().addNode();\nexport const deleteNode = () => resolveNodeApi().deleteNode();\nexport const connectNode = () => resolveNodeApi().connectNode();\n","import { t } from \"@/lang/i18n\";\n\nexport function computeNodeName(ip: string, available: boolean, remark?: string) {\n if (!ip) return t(\"TXT_CODE_aa373641\");\n const online = available ? \"\" : t(\"TXT_CODE_836addb9\");\n return remark ? `${remark} - ${ip} ${online}` : `${ip} ${online}`;\n}\n"],"names":["resolveNodeApi","node","usePluginService","remoteNodeList","computeNodeName","ip","available","remark","online"],"mappings":"4EAmBA,SAASA,GAAgC,CACjC,MAAAC,EAAOC,EAAyC,MAAM,EAC5D,GAAI,CAACD,EACG,MAAA,IAAI,MAAM,6CAA6C,EAE/D,OAAOA,EAAK,GACd,CAEO,MAAME,EAAiB,IAAMH,EAAe,EAAE,eAAe,ECzBpD,SAAAI,EAAgBC,EAAYC,EAAoBC,EAAiB,CAC/E,GAAI,CAACF,EAAI,OAAO,EAAE,mBAAmB,EACrC,MAAMG,EAASF,EAAY,GAAK,EAAE,mBAAmB,EAC9C,OAAAC,EAAS,GAAGA,CAAM,MAAMF,CAAE,IAAIG,CAAM,GAAK,GAAGH,CAAE,IAAIG,CAAM,EACjE"}
@@ -0,0 +1,2 @@
1
+ const I=1,P="1.0.0";function b(d){if(d===void 0)return;if(!d||typeof d!="object"||Array.isArray(d))throw new Error("Invalid ElementsPanel plugin compatibility metadata.");const n=d;if(n.api!==1||n.sdk!==void 0&&n.sdk!==1)throw new Error(`Unsupported ElementsPanel plugin API/SDK: ${JSON.stringify(d)}`)}function v(d,n){const c=[...d].sort(n.compare),h=new Map(c.map(e=>[n.id(e),e])),p=new Map(c.map(e=>[n.id(e),[...new Set(n.dependencies(e)||[])].filter(Boolean)])),r=new Map;for(const e of c){const i=n.id(e),t=p.get(i).filter(s=>!h.has(s));t.length&&r.set(i,{type:"missing-dependency",dependencies:t,message:`Missing frontend plugin dependencies: ${t.join(", ")}`})}const y=()=>{let e=!1;for(const i of c){const t=n.id(i);if(r.has(t))continue;const s=p.get(t).filter(a=>r.has(a));s.length&&(r.set(t,{type:"dependency-unavailable",dependencies:s,message:`Frontend plugin dependencies are unavailable: ${s.join(", ")}`}),e=!0)}return e};for(;y(););const o=c.filter(e=>!r.has(n.id(e))),w=new Set(o.map(n.id)),l=new Map(o.map(e=>[n.id(e),0])),g=new Map;for(const e of o){const i=n.id(e);for(const t of p.get(i)){if(!w.has(t))continue;l.set(i,l.get(i)+1);const s=g.get(t)||[];s.push(e),g.set(t,s)}}const f=o.filter(e=>l.get(n.id(e))===0);f.sort(n.compare);const u=[];for(;f.length;){const e=f.shift(),i=n.id(e);u.push(e);for(const t of g.get(i)||[]){const s=n.id(t),a=l.get(s)-1;l.set(s,a),a===0&&(f.push(t),f.sort(n.compare))}}const m=o.filter(e=>!u.includes(e));if(m.length){const e=new Set(m.map(n.id));for(const i of m){const t=n.id(i),s=p.get(t).filter(a=>e.has(a));r.set(t,{type:"dependency-cycle",dependencies:s,message:`Frontend plugin dependency cycle: ${[t,...s].join(" -> ")}`})}}return{ordered:u,issues:r}}function S(){let d=Promise.resolve();return n=>{const c=d.then(n);return d=c.catch(()=>{}),c}}export{I as P,P as a,S as c,v as r,b as v};
2
+ //# sourceMappingURL=plugin_contract-691cd37a.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin_contract-691cd37a.js","sources":["../../../common/src/plugin_contract.ts"],"sourcesContent":["/** Versioned contract shared by the host, plugin compiler and package registry. */\nexport const PLUGIN_API_VERSION = 1;\nexport const PLUGIN_SDK_VERSION = \"1.0.0\";\n\nexport interface PluginCompatibility {\n api: number;\n sdk?: number;\n}\n\n/** Omitted metadata denotes a legacy package. Unknown versions never execute. */\nexport function validatePluginCompatibility(value: unknown): void {\n if (value === undefined) return;\n if (!value || typeof value !== \"object\" || Array.isArray(value))\n throw new Error(\"Invalid ElementsPanel plugin compatibility metadata.\");\n const contract = value as PluginCompatibility;\n if (contract.api !== PLUGIN_API_VERSION || (contract.sdk !== undefined && contract.sdk !== 1))\n throw new Error(`Unsupported ElementsPanel plugin API/SDK: ${JSON.stringify(value)}`);\n}\n\nexport type PluginState =\n | \"disabled\"\n | \"pending\"\n | \"loading\"\n | \"active\"\n | \"failed\"\n | \"unloading\"\n | \"restart-required\";\nexport interface PluginChangeResult {\n saved: boolean;\n application: \"applied\" | \"pending\" | \"failed\" | \"restart-required\";\n error?: string;\n}\n\nexport interface PluginDependencyIssue {\n type: \"missing-dependency\" | \"dependency-cycle\" | \"dependency-unavailable\";\n dependencies: readonly string[];\n message: string;\n}\n\nexport interface PluginDependencyOrder<T> {\n ordered: T[];\n issues: Map<string, PluginDependencyIssue>;\n}\n\n/**\n * Stable topological ordering shared by plugin hosts.\n *\n * Invalid nodes are kept out of `ordered`: direct missing dependencies are\n * reported first, then anything depending on an invalid node, and finally\n * cycles (plus nodes blocked behind a cycle). Independent nodes retain the\n * caller's priority/id comparator.\n */\nexport function resolvePluginDependencyOrder<T>(\n items: readonly T[],\n options: {\n id(item: T): string;\n dependencies(item: T): readonly string[] | undefined;\n compare(a: T, b: T): number;\n }\n): PluginDependencyOrder<T> {\n const sorted = [...items].sort(options.compare);\n const byId = new Map(sorted.map((item) => [options.id(item), item]));\n const dependencies = new Map(\n sorted.map((item) => [\n options.id(item),\n [...new Set(options.dependencies(item) || [])].filter(Boolean)\n ])\n );\n const issues = new Map<string, PluginDependencyIssue>();\n\n for (const item of sorted) {\n const id = options.id(item);\n const missing = dependencies.get(id)!.filter((dependency) => !byId.has(dependency));\n if (!missing.length) continue;\n issues.set(id, {\n type: \"missing-dependency\",\n dependencies: missing,\n message: `Missing frontend plugin dependencies: ${missing.join(\", \")}`\n });\n }\n\n const markUnavailable = () => {\n let changed = false;\n for (const item of sorted) {\n const id = options.id(item);\n if (issues.has(id)) continue;\n const unavailable = dependencies.get(id)!.filter((dependency) => issues.has(dependency));\n if (!unavailable.length) continue;\n issues.set(id, {\n type: \"dependency-unavailable\",\n dependencies: unavailable,\n message: `Frontend plugin dependencies are unavailable: ${unavailable.join(\", \")}`\n });\n changed = true;\n }\n return changed;\n };\n while (markUnavailable()) {\n // Propagate direct graph failures before sorting the remaining nodes.\n }\n\n const candidates = sorted.filter((item) => !issues.has(options.id(item)));\n const candidateIds = new Set(candidates.map(options.id));\n const indegree = new Map(candidates.map((item) => [options.id(item), 0]));\n const dependents = new Map<string, T[]>();\n for (const item of candidates) {\n const id = options.id(item);\n for (const dependency of dependencies.get(id)!) {\n if (!candidateIds.has(dependency)) continue;\n indegree.set(id, indegree.get(id)! + 1);\n const bucket = dependents.get(dependency) || [];\n bucket.push(item);\n dependents.set(dependency, bucket);\n }\n }\n\n const ready = candidates.filter((item) => indegree.get(options.id(item)) === 0);\n ready.sort(options.compare);\n const ordered: T[] = [];\n while (ready.length) {\n const item = ready.shift()!;\n const id = options.id(item);\n ordered.push(item);\n for (const dependent of dependents.get(id) || []) {\n const dependentId = options.id(dependent);\n const next = indegree.get(dependentId)! - 1;\n indegree.set(dependentId, next);\n if (next === 0) {\n ready.push(dependent);\n ready.sort(options.compare);\n }\n }\n }\n\n const unresolved = candidates.filter((item) => !ordered.includes(item));\n if (unresolved.length) {\n const unresolvedIds = new Set(unresolved.map(options.id));\n for (const item of unresolved) {\n const id = options.id(item);\n const blockedBy = dependencies.get(id)!.filter((dependency) => unresolvedIds.has(dependency));\n issues.set(id, {\n type: \"dependency-cycle\",\n dependencies: blockedBy,\n message: `Frontend plugin dependency cycle: ${[id, ...blockedBy].join(\" -> \")}`\n });\n }\n }\n\n return { ordered, issues };\n}\n\n/** A queue survives failures, so a failed change cannot block subsequent repairs. */\nexport function createPluginQueue() {\n let tail: Promise<unknown> = Promise.resolve();\n return <T>(operation: () => Promise<T>): Promise<T> => {\n const next = tail.then(operation);\n tail = next.catch(() => undefined);\n return next;\n };\n}\n\nexport interface PluginSettingField {\n key?: string;\n type: string;\n title?: string;\n min?: number;\n max?: number;\n required?: boolean;\n options?: Array<{ value: unknown }>;\n fields?: PluginSettingField[];\n maxItems?: number;\n}\n\n/** Validate the form contract on the server before invoking plugin-owned validation. */\nexport function validatePluginSettings(\n fields: readonly PluginSettingField[],\n values: unknown\n): asserts values is Record<string, unknown> {\n if (!values || typeof values !== \"object\" || Array.isArray(values))\n throw new Error(\"Invalid plugin settings.\");\n const input = values as Record<string, unknown>;\n for (const field of fields) {\n if (!field.key || field.type === \"link\") continue;\n const value = input[field.key];\n if (value === undefined || value === null) {\n if (field.required) throw new Error(`${field.title || field.key}: required`);\n continue;\n }\n if (field.type === \"list\") {\n if (!Array.isArray(value) || value.length > (field.maxItems ?? 100))\n throw new Error(`${field.title || field.key}: invalid list`);\n for (const item of value) validatePluginSettings(field.fields || [], item);\n continue;\n }\n const valid =\n field.type === \"number\"\n ? typeof value === \"number\" &&\n Number.isFinite(value) &&\n (field.min === undefined || value >= field.min) &&\n (field.max === undefined || value <= field.max)\n : field.type === \"boolean\"\n ? typeof value === \"boolean\"\n : field.type === \"select\"\n ? field.options?.some((option) => option.value === value)\n : typeof value === \"string\";\n if (!valid) throw new Error(`${field.title || field.key}: invalid value`);\n }\n}\n"],"names":["PLUGIN_API_VERSION","PLUGIN_SDK_VERSION","validatePluginCompatibility","value","contract","resolvePluginDependencyOrder","items","options","sorted","byId","item","dependencies","issues","id","missing","dependency","markUnavailable","changed","unavailable","candidates","candidateIds","indegree","dependents","bucket","ready","ordered","dependent","dependentId","next","unresolved","unresolvedIds","blockedBy","createPluginQueue","tail","operation"],"mappings":"AACO,MAAMA,EAAqB,EACrBC,EAAqB,QAQ3B,SAASC,EAA4BC,EAAsB,CAChE,GAAIA,IAAU,OAAW,OACzB,GAAI,CAACA,GAAS,OAAOA,GAAU,UAAY,MAAM,QAAQA,CAAK,EACtD,MAAA,IAAI,MAAM,sDAAsD,EACxE,MAAMC,EAAWD,EACjB,GAAIC,EAAS,MAAQ,GAAuBA,EAAS,MAAQ,QAAaA,EAAS,MAAQ,EACzF,MAAM,IAAI,MAAM,6CAA6C,KAAK,UAAUD,CAAK,CAAC,EAAE,CACxF,CAmCgB,SAAAE,EACdC,EACAC,EAK0B,CAC1B,MAAMC,EAAS,CAAC,GAAGF,CAAK,EAAE,KAAKC,EAAQ,OAAO,EACxCE,EAAO,IAAI,IAAID,EAAO,IAAKE,GAAS,CAACH,EAAQ,GAAGG,CAAI,EAAGA,CAAI,CAAC,CAAC,EAC7DC,EAAe,IAAI,IACvBH,EAAO,IAAKE,GAAS,CACnBH,EAAQ,GAAGG,CAAI,EACf,CAAC,GAAG,IAAI,IAAIH,EAAQ,aAAaG,CAAI,GAAK,EAAE,CAAC,EAAE,OAAO,OAAO,CAAA,CAC9D,CAAA,EAEGE,MAAa,IAEnB,UAAWF,KAAQF,EAAQ,CACnB,MAAAK,EAAKN,EAAQ,GAAGG,CAAI,EACpBI,EAAUH,EAAa,IAAIE,CAAE,EAAG,OAAQE,GAAe,CAACN,EAAK,IAAIM,CAAU,CAAC,EAC7ED,EAAQ,QACbF,EAAO,IAAIC,EAAI,CACb,KAAM,qBACN,aAAcC,EACd,QAAS,yCAAyCA,EAAQ,KAAK,IAAI,CAAC,EAAA,CACrE,CACH,CAEA,MAAME,EAAkB,IAAM,CAC5B,IAAIC,EAAU,GACd,UAAWP,KAAQF,EAAQ,CACnB,MAAAK,EAAKN,EAAQ,GAAGG,CAAI,EACtB,GAAAE,EAAO,IAAIC,CAAE,EAAG,SACd,MAAAK,EAAcP,EAAa,IAAIE,CAAE,EAAG,OAAQE,GAAeH,EAAO,IAAIG,CAAU,CAAC,EAClFG,EAAY,SACjBN,EAAO,IAAIC,EAAI,CACb,KAAM,yBACN,aAAcK,EACd,QAAS,iDAAiDA,EAAY,KAAK,IAAI,CAAC,EAAA,CACjF,EACSD,EAAA,GACZ,CACO,OAAAA,CAAA,EAET,KAAOD,KAAmB,CAI1B,MAAMG,EAAaX,EAAO,OAAQE,GAAS,CAACE,EAAO,IAAIL,EAAQ,GAAGG,CAAI,CAAC,CAAC,EAClEU,EAAe,IAAI,IAAID,EAAW,IAAIZ,EAAQ,EAAE,CAAC,EACjDc,EAAW,IAAI,IAAIF,EAAW,IAAKT,GAAS,CAACH,EAAQ,GAAGG,CAAI,EAAG,CAAC,CAAC,CAAC,EAClEY,MAAiB,IACvB,UAAWZ,KAAQS,EAAY,CACvB,MAAAN,EAAKN,EAAQ,GAAGG,CAAI,EAC1B,UAAWK,KAAcJ,EAAa,IAAIE,CAAE,EAAI,CAC1C,GAAA,CAACO,EAAa,IAAIL,CAAU,EAAG,SACnCM,EAAS,IAAIR,EAAIQ,EAAS,IAAIR,CAAE,EAAK,CAAC,EACtC,MAAMU,EAASD,EAAW,IAAIP,CAAU,GAAK,CAAA,EAC7CQ,EAAO,KAAKb,CAAI,EACLY,EAAA,IAAIP,EAAYQ,CAAM,CACnC,CACF,CAEA,MAAMC,EAAQL,EAAW,OAAQT,GAASW,EAAS,IAAId,EAAQ,GAAGG,CAAI,CAAC,IAAM,CAAC,EACxEc,EAAA,KAAKjB,EAAQ,OAAO,EAC1B,MAAMkB,EAAe,CAAA,EACrB,KAAOD,EAAM,QAAQ,CACb,MAAAd,EAAOc,EAAM,QACbX,EAAKN,EAAQ,GAAGG,CAAI,EAC1Be,EAAQ,KAAKf,CAAI,EACjB,UAAWgB,KAAaJ,EAAW,IAAIT,CAAE,GAAK,CAAA,EAAI,CAC1C,MAAAc,EAAcpB,EAAQ,GAAGmB,CAAS,EAClCE,EAAOP,EAAS,IAAIM,CAAW,EAAK,EACjCN,EAAA,IAAIM,EAAaC,CAAI,EAC1BA,IAAS,IACXJ,EAAM,KAAKE,CAAS,EACdF,EAAA,KAAKjB,EAAQ,OAAO,EAE9B,CACF,CAEM,MAAAsB,EAAaV,EAAW,OAAQT,GAAS,CAACe,EAAQ,SAASf,CAAI,CAAC,EACtE,GAAImB,EAAW,OAAQ,CACrB,MAAMC,EAAgB,IAAI,IAAID,EAAW,IAAItB,EAAQ,EAAE,CAAC,EACxD,UAAWG,KAAQmB,EAAY,CACvB,MAAAhB,EAAKN,EAAQ,GAAGG,CAAI,EACpBqB,EAAYpB,EAAa,IAAIE,CAAE,EAAG,OAAQE,GAAee,EAAc,IAAIf,CAAU,CAAC,EAC5FH,EAAO,IAAIC,EAAI,CACb,KAAM,mBACN,aAAckB,EACd,QAAS,qCAAqC,CAAClB,EAAI,GAAGkB,CAAS,EAAE,KAAK,MAAM,CAAC,EAAA,CAC9E,CACH,CACF,CAEO,MAAA,CAAE,QAAAN,EAAS,OAAAb,EACpB,CAGO,SAASoB,GAAoB,CAC9B,IAAAC,EAAyB,QAAQ,UACrC,OAAWC,GAA4C,CAC/C,MAAAN,EAAOK,EAAK,KAAKC,CAAS,EACzB,OAAAD,EAAAL,EAAK,MAAM,IAAM,EAAS,EAC1BA,CAAA,CAEX"}
@@ -0,0 +1,2 @@
1
+ const h="modulepreload",d=function(l,s){return new URL(l,s).href},u={},v=function(s,i,c){if(!i||i.length===0)return s();const a=document.getElementsByTagName("link");return Promise.all(i.map(e=>{if(e=d(e,c),e in u)return;u[e]=!0;const t=e.endsWith(".css"),f=t?'[rel="stylesheet"]':"";if(!!c)for(let r=a.length-1;r>=0;r--){const o=a[r];if(o.href===e&&(!t||o.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${e}"]${f}`))return;const n=document.createElement("link");if(n.rel=t?"stylesheet":h,t||(n.as="script",n.crossOrigin=""),n.href=e,document.head.appendChild(n),t)return new Promise((r,o)=>{n.addEventListener("load",r),n.addEventListener("error",()=>o(new Error(`Unable to preload CSS for ${e}`)))})})).then(()=>s()).catch(e=>{const t=new Event("vite:preloadError",{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e})};export{v as _};
2
+ //# sourceMappingURL=preload-helper-a4192956.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"preload-helper-a4192956.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ function c(e,s){return e.endsWith(s)?e.slice(0,e.length-s.length):e}function h(e){const s=window.location;let t=s.host;s.port===""&&(s.protocol==="http:"&&(t=`${t}:80`),s.protocol==="https:"&&(t=`${t}:443`));const o=e.find(i=>i.from.addr===t&&c(i.from.prefix,"/")===c(s.pathname,"/"));if(o)return o.to}function w(e,s){let t=`${window.location.protocol}//`;const o=e.toLocaleLowerCase();s==="http"&&(o.indexOf("ws://")===0?t="http://":o.indexOf("wss://")===0?t="https://":o.indexOf("http://")===0?t="http://":o.indexOf("https://")===0||t==="https://"?t="https://":t="http://"),s==="ws"&&(o.indexOf("http://")===0?t="ws://":o.indexOf("https://")===0?t="wss://":o.indexOf("ws://")===0?t="ws://":o.indexOf("wss://")===0||t==="https://"?t="wss://":t="ws://"),e=r(p(e));let i=null,l=null;if(e.split(":").length===2){if(l=e.split(":")[0],i=parseInt(e.split(":")[1].split("/")[0]),isNaN(i))throw new Error(`The address ${e} failed to resolve, the port is incorrect`)}else l=e;let n=null;e.indexOf("/")!=-1&&(n=e.slice(e.indexOf("/")));const f=l.toLocaleLowerCase();return f.indexOf("localhost")===0||f.indexOf("127.0.0.")===0?e=`${t}${window.location.hostname}${i?`:${i}`:""}${n??""}`:e=`${t}${l}${i?`:${i}`:""}${n??""}`,e}function r(e){return e.toLocaleLowerCase().indexOf("ws://")===0?`${e.slice(5)}`:e.toLocaleLowerCase().indexOf("wss://")===0?`${e.slice(6)}`:e}function p(e){return e.toLocaleLowerCase().indexOf("http://")===0?`${e.slice(7)}`:e.toLocaleLowerCase().indexOf("https://")===0?`${e.slice(8)}`:e}export{h as m,w as p,c as r};
2
+ //# sourceMappingURL=protocol-97f7bab7.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"protocol-97f7bab7.js","sources":["../../../panel/plugins/console/src/tools/string.ts","../../../panel/plugins/console/src/tools/protocol.ts"],"sourcesContent":["export function removeTrail(origin: string, trail: string) {\n if (origin.endsWith(trail)) {\n return origin.slice(0, origin.length - trail.length);\n } else {\n return origin;\n }\n}\n","import { removeTrail } from \"./string\";\n\nexport function parseIp(ip: string) {\n if (ip.toLowerCase() === \"localhost\" || ip === \"127.0.0.1\") {\n return window.location.hostname;\n }\n return ip;\n}\n\nexport type RemoteMappingEntry = {\n from: {\n addr: string;\n prefix: string;\n };\n to: {\n addr: string;\n prefix: string;\n };\n};\n\nexport function mapDaemonAddress(remoteMappings: RemoteMappingEntry[]) {\n const loc = window.location;\n let addr = loc.host;\n if (loc.port === \"\") {\n if (loc.protocol === \"http:\") addr = `${addr}:80`;\n if (loc.protocol === \"https:\") addr = `${addr}:443`;\n }\n const match = remoteMappings.find(\n (entry) =>\n entry.from.addr === addr &&\n removeTrail(entry.from.prefix, \"/\") === removeTrail(loc.pathname, \"/\")\n );\n if (!match) return undefined;\n return match.to;\n}\n\nexport function parseForwardAddress(addr: string, require: \"http\" | \"ws\") {\n // save its protocol header\n //ws://127.0.0.1:25565\n let protocol = `${window.location.protocol}//`;\n const addrProtocolString = addr.toLocaleLowerCase();\n if (require === \"http\") {\n if (addrProtocolString.indexOf(\"ws://\") === 0) protocol = \"http://\";\n else if (addrProtocolString.indexOf(\"wss://\") === 0) protocol = \"https://\";\n else if (addrProtocolString.indexOf(\"http://\") === 0) protocol = \"http://\";\n else if (addrProtocolString.indexOf(\"https://\") === 0) protocol = \"https://\";\n else if (protocol === \"https://\") protocol = \"https://\";\n else protocol = \"http://\";\n }\n if (require === \"ws\") {\n if (addrProtocolString.indexOf(\"http://\") === 0) protocol = \"ws://\";\n else if (addrProtocolString.indexOf(\"https://\") === 0) protocol = \"wss://\";\n else if (addrProtocolString.indexOf(\"ws://\") === 0) protocol = \"ws://\";\n else if (addrProtocolString.indexOf(\"wss://\") === 0) protocol = \"wss://\";\n else if (protocol === \"https://\") protocol = \"wss://\";\n else protocol = \"ws://\";\n }\n\n // remove potentially redundant headers\n addr = deleteWebsocketHeader(deleteHttpHeader(addr));\n\n // port and ip are separated\n let daemonPort = null;\n let onlyAddr = null;\n if (addr.split(\":\").length === 2) {\n onlyAddr = addr.split(\":\")[0];\n daemonPort = parseInt(addr.split(\":\")[1].split(\"/\")[0]);\n if (isNaN(daemonPort))\n throw new Error(`The address ${addr} failed to resolve, the port is incorrect`);\n } else {\n onlyAddr = addr;\n }\n\n let path = null;\n if (addr.indexOf(\"/\") != -1) {\n path = addr.slice(addr.indexOf(\"/\"));\n }\n\n // Reassemble the address based on the separated port and ip\n const checkAddr = onlyAddr.toLocaleLowerCase();\n if (checkAddr.indexOf(\"localhost\") === 0 || checkAddr.indexOf(\"127.0.0.\") === 0) {\n addr = `${protocol}${window.location.hostname}${daemonPort ? `:${daemonPort}` : \"\"}${\n path ?? \"\"\n }`;\n } else {\n addr = `${protocol}${onlyAddr}${daemonPort ? `:${daemonPort}` : \"\"}${path ?? \"\"}`;\n }\n return addr;\n}\n\n// The ws address on the Daemon side is converted into an http address\nexport function daemonWsAddressToHttp(wsAddr = \"\") {\n if (wsAddr.toLocaleLowerCase().indexOf(\"ws://\") === 0) {\n return `http://${wsAddr.slice(5)}`;\n } else if (wsAddr.toLocaleLowerCase().indexOf(\"wss://\") === 0) {\n return `https://${wsAddr.slice(6)}`;\n }\n return wsAddr;\n}\n\nexport function deleteWebsocketHeader(wsAddr: string) {\n if (wsAddr.toLocaleLowerCase().indexOf(\"ws://\") === 0) {\n return `${wsAddr.slice(5)}`;\n } else if (wsAddr.toLocaleLowerCase().indexOf(\"wss://\") === 0) {\n return `${wsAddr.slice(6)}`;\n }\n return wsAddr;\n}\n\nexport function deleteHttpHeader(addr: string) {\n if (addr.toLocaleLowerCase().indexOf(\"http://\") === 0) {\n return `${addr.slice(7)}`;\n } else if (addr.toLocaleLowerCase().indexOf(\"https://\") === 0) {\n return `${addr.slice(8)}`;\n }\n return addr;\n}\n\n// The ws address on the Daemon side is converted to the local ws address\nexport function daemonWsAddressToWs(wsAddr = \"\") {\n if (\n wsAddr.toLocaleLowerCase().indexOf(\"ws://\") !== 0 &&\n wsAddr.toLocaleLowerCase().indexOf(\"wss://\") !== 0\n ) {\n return `ws://${wsAddr}`;\n }\n return wsAddr;\n}\n"],"names":["removeTrail","origin","trail","mapDaemonAddress","remoteMappings","loc","addr","match","entry","parseForwardAddress","require","protocol","addrProtocolString","deleteWebsocketHeader","deleteHttpHeader","daemonPort","onlyAddr","path","checkAddr","wsAddr"],"mappings":"AAAgB,SAAAA,EAAYC,EAAgBC,EAAe,CACrD,OAAAD,EAAO,SAASC,CAAK,EAChBD,EAAO,MAAM,EAAGA,EAAO,OAASC,EAAM,MAAM,EAE5CD,CAEX,CCcO,SAASE,EAAiBC,EAAsC,CACrE,MAAMC,EAAM,OAAO,SACnB,IAAIC,EAAOD,EAAI,KACXA,EAAI,OAAS,KACXA,EAAI,WAAa,UAASC,EAAO,GAAGA,CAAI,OACxCD,EAAI,WAAa,WAAUC,EAAO,GAAGA,CAAI,SAE/C,MAAMC,EAAQH,EAAe,KAC1BI,GACCA,EAAM,KAAK,OAASF,GACpBN,EAAYQ,EAAM,KAAK,OAAQ,GAAG,IAAMR,EAAYK,EAAI,SAAU,GAAG,CAAA,EAEzE,GAAKE,EACL,OAAOA,EAAM,EACf,CAEgB,SAAAE,EAAoBH,EAAcI,EAAwB,CAGxE,IAAIC,EAAW,GAAG,OAAO,SAAS,QAAQ,KACpC,MAAAC,EAAqBN,EAAK,oBAC5BI,IAAY,SACVE,EAAmB,QAAQ,OAAO,IAAM,EAAcD,EAAA,UACjDC,EAAmB,QAAQ,QAAQ,IAAM,EAAcD,EAAA,WACvDC,EAAmB,QAAQ,SAAS,IAAM,EAAcD,EAAA,UACxDC,EAAmB,QAAQ,UAAU,IAAM,GAC3CD,IAAa,WAD4CA,EAAA,WAElDA,EAAA,WAEdD,IAAY,OACVE,EAAmB,QAAQ,SAAS,IAAM,EAAcD,EAAA,QACnDC,EAAmB,QAAQ,UAAU,IAAM,EAAcD,EAAA,SACzDC,EAAmB,QAAQ,OAAO,IAAM,EAAcD,EAAA,QACtDC,EAAmB,QAAQ,QAAQ,IAAM,GACzCD,IAAa,WAD0CA,EAAA,SAEhDA,EAAA,SAIXL,EAAAO,EAAsBC,EAAiBR,CAAI,CAAC,EAGnD,IAAIS,EAAa,KACbC,EAAW,KACf,GAAIV,EAAK,MAAM,GAAG,EAAE,SAAW,GAG7B,GAFAU,EAAWV,EAAK,MAAM,GAAG,EAAE,CAAC,EACfS,EAAA,SAAST,EAAK,MAAM,GAAG,EAAE,CAAC,EAAE,MAAM,GAAG,EAAE,CAAC,CAAC,EAClD,MAAMS,CAAU,EAClB,MAAM,IAAI,MAAM,eAAeT,CAAI,2CAA2C,OAErEU,EAAAV,EAGb,IAAIW,EAAO,KACPX,EAAK,QAAQ,GAAG,GAAK,KACvBW,EAAOX,EAAK,MAAMA,EAAK,QAAQ,GAAG,CAAC,GAI/B,MAAAY,EAAYF,EAAS,oBACvB,OAAAE,EAAU,QAAQ,WAAW,IAAM,GAAKA,EAAU,QAAQ,UAAU,IAAM,EAC5EZ,EAAO,GAAGK,CAAQ,GAAG,OAAO,SAAS,QAAQ,GAAGI,EAAa,IAAIA,CAAU,GAAK,EAAE,GAChFE,GAAQ,EACV,GAEAX,EAAO,GAAGK,CAAQ,GAAGK,CAAQ,GAAGD,EAAa,IAAIA,CAAU,GAAK,EAAE,GAAGE,GAAQ,EAAE,GAE1EX,CACT,CAYO,SAASO,EAAsBM,EAAgB,CACpD,OAAIA,EAAO,kBAAkB,EAAE,QAAQ,OAAO,IAAM,EAC3C,GAAGA,EAAO,MAAM,CAAC,CAAC,GAChBA,EAAO,kBAAA,EAAoB,QAAQ,QAAQ,IAAM,EACnD,GAAGA,EAAO,MAAM,CAAC,CAAC,GAEpBA,CACT,CAEO,SAASL,EAAiBR,EAAc,CAC7C,OAAIA,EAAK,kBAAkB,EAAE,QAAQ,SAAS,IAAM,EAC3C,GAAGA,EAAK,MAAM,CAAC,CAAC,GACdA,EAAK,kBAAA,EAAoB,QAAQ,UAAU,IAAM,EACnD,GAAGA,EAAK,MAAM,CAAC,CAAC,GAElBA,CACT"}
@@ -0,0 +1,2 @@
1
+ var d,a=new Uint8Array(16);function f(){if(!d&&(d=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!d))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return d(a)}const i=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function g(t){return typeof t=="string"&&i.test(t)}var e=[];for(var s=0;s<256;++s)e.push((s+256).toString(16).substr(1));function p(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=(e[t[n+0]]+e[t[n+1]]+e[t[n+2]]+e[t[n+3]]+"-"+e[t[n+4]]+e[t[n+5]]+"-"+e[t[n+6]]+e[t[n+7]]+"-"+e[t[n+8]]+e[t[n+9]]+"-"+e[t[n+10]]+e[t[n+11]]+e[t[n+12]]+e[t[n+13]]+e[t[n+14]]+e[t[n+15]]).toLowerCase();if(!g(o))throw TypeError("Stringified UUID is invalid");return o}function m(t,n,o){t=t||{};var u=t.random||(t.rng||f)();if(u[6]=u[6]&15|64,u[8]=u[8]&63|128,n){o=o||0;for(var r=0;r<16;++r)n[o+r]=u[r];return n}return p(u)}function y(){return m()}export{y as g,m as v};
2
+ //# sourceMappingURL=randId-ed0b95b7.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"randId-ed0b95b7.js","sources":["../../../panel/node_modules/uuid/dist/esm-browser/rng.js","../../../panel/node_modules/uuid/dist/esm-browser/regex.js","../../../panel/node_modules/uuid/dist/esm-browser/validate.js","../../../panel/node_modules/uuid/dist/esm-browser/stringify.js","../../../panel/node_modules/uuid/dist/esm-browser/v4.js","../../../panel/plugins/console/src/tools/randId.ts"],"sourcesContent":["// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\nvar getRandomValues;\nvar rnds8 = new Uint8Array(16);\nexport default function rng() {\n // lazy load so that environments that need to polyfill have a chance to do so\n if (!getRandomValues) {\n // getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation. Also,\n // find the complete implementation of crypto (msCrypto) on IE11.\n getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto);\n\n if (!getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n }\n\n return getRandomValues(rnds8);\n}","export default /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;","import REGEX from './regex.js';\n\nfunction validate(uuid) {\n return typeof uuid === 'string' && REGEX.test(uuid);\n}\n\nexport default validate;","import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nvar byteToHex = [];\n\nfor (var i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).substr(1));\n}\n\nfunction stringify(arr) {\n var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n var uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nexport default stringify;","import rng from './rng.js';\nimport stringify from './stringify.js';\n\nfunction v4(options, buf, offset) {\n options = options || {};\n var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return stringify(rnds);\n}\n\nexport default v4;","import { v4 } from \"uuid\";\n\nexport function generateRandomString(len = 16) {\n const characters = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\";\n let randomString = \"\";\n\n for (let i = 0; i < len; i++) {\n const randomIndex = Math.floor(Math.random() * characters.length);\n randomString += characters.charAt(randomIndex);\n }\n\n return randomString;\n}\nexport function getRandomId() {\n return v4();\n}\n"],"names":["getRandomValues","rnds8","rng","REGEX","validate","uuid","byteToHex","i","stringify","arr","offset","v4","options","buf","rnds","getRandomId"],"mappings":"AAGA,IAAIA,EACAC,EAAQ,IAAI,WAAW,EAAE,EACd,SAASC,GAAM,CAE5B,GAAI,CAACF,IAGHA,EAAkB,OAAO,OAAW,KAAe,OAAO,iBAAmB,OAAO,gBAAgB,KAAK,MAAM,GAAK,OAAO,SAAa,KAAe,OAAO,SAAS,iBAAoB,YAAc,SAAS,gBAAgB,KAAK,QAAQ,EAE3O,CAACA,GACH,MAAM,IAAI,MAAM,0GAA0G,EAI9H,OAAOA,EAAgBC,CAAK,CAC9B,CClBA,MAAAE,EAAe,sHCEf,SAASC,EAASC,EAAM,CACtB,OAAO,OAAOA,GAAS,UAAYF,EAAM,KAAKE,CAAI,CACpD,CCEA,IAAIC,EAAY,CAAA,EAEhB,QAASC,EAAI,EAAGA,EAAI,IAAK,EAAEA,EACzBD,EAAU,MAAMC,EAAI,KAAO,SAAS,EAAE,EAAE,OAAO,CAAC,CAAC,EAGnD,SAASC,EAAUC,EAAK,CACtB,IAAIC,EAAS,UAAU,OAAS,GAAK,UAAU,CAAC,IAAM,OAAY,UAAU,CAAC,EAAI,EAG7EL,GAAQC,EAAUG,EAAIC,EAAS,CAAC,CAAC,EAAIJ,EAAUG,EAAIC,EAAS,CAAC,CAAC,EAAIJ,EAAUG,EAAIC,EAAS,CAAC,CAAC,EAAIJ,EAAUG,EAAIC,EAAS,CAAC,CAAC,EAAI,IAAMJ,EAAUG,EAAIC,EAAS,CAAC,CAAC,EAAIJ,EAAUG,EAAIC,EAAS,CAAC,CAAC,EAAI,IAAMJ,EAAUG,EAAIC,EAAS,CAAC,CAAC,EAAIJ,EAAUG,EAAIC,EAAS,CAAC,CAAC,EAAI,IAAMJ,EAAUG,EAAIC,EAAS,CAAC,CAAC,EAAIJ,EAAUG,EAAIC,EAAS,CAAC,CAAC,EAAI,IAAMJ,EAAUG,EAAIC,EAAS,EAAE,CAAC,EAAIJ,EAAUG,EAAIC,EAAS,EAAE,CAAC,EAAIJ,EAAUG,EAAIC,EAAS,EAAE,CAAC,EAAIJ,EAAUG,EAAIC,EAAS,EAAE,CAAC,EAAIJ,EAAUG,EAAIC,EAAS,EAAE,CAAC,EAAIJ,EAAUG,EAAIC,EAAS,EAAE,CAAC,GAAG,cAMzf,GAAI,CAACN,EAASC,CAAI,EAChB,MAAM,UAAU,6BAA6B,EAG/C,OAAOA,CACT,CCxBA,SAASM,EAAGC,EAASC,EAAKH,EAAQ,CAChCE,EAAUA,GAAW,GACrB,IAAIE,EAAOF,EAAQ,SAAWA,EAAQ,KAAOV,KAK7C,GAHAY,EAAK,CAAC,EAAIA,EAAK,CAAC,EAAI,GAAO,GAC3BA,EAAK,CAAC,EAAIA,EAAK,CAAC,EAAI,GAAO,IAEvBD,EAAK,CACPH,EAASA,GAAU,EAEnB,QAASH,EAAI,EAAGA,EAAI,GAAI,EAAEA,EACxBM,EAAIH,EAASH,CAAC,EAAIO,EAAKP,CAAC,EAG1B,OAAOM,CACR,CAED,OAAOL,EAAUM,CAAI,CACvB,CCRO,SAASC,GAAc,CAC5B,OAAOJ,EAAG,CACZ","x_google_ignoreList":[0,1,2,3,4]}
@@ -0,0 +1,3 @@
1
+ import{u as T}from"./useAppStateStore-a644582a.js";import{bW as b,bY as w}from"./vue-2433bd89.js";class P{constructor(){this.element=null,this.timer=null,this.progress=0,this.isDone=!1,this.hideTimeout=null,this.init()}init(){if(!(typeof document>"u")){if(document.getElementById("top-progress-bar")){this.element=document.getElementById("top-progress-bar");return}this.element=document.createElement("div"),this.element.id="top-progress-bar",document.body.appendChild(this.element)}}start(){this.element||this.init(),this.isDone=!1,this.progress=0,this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=null),this.element&&(this.element.classList.add("active"),this.element.style.width="0%",this.element.style.opacity="1"),this.inc()}inc(){if(this.isDone)return;this.timer&&clearTimeout(this.timer);let s=0;this.progress>=0&&this.progress<.2?s=.1:this.progress>=.2&&this.progress<.5?s=.04:this.progress>=.5&&this.progress<.8?s=.02:this.progress>=.8&&this.progress<.99&&(s=.005),this.progress+=s,this.progress>.994&&(this.progress=.994),this.element&&(this.element.style.width=`${this.progress*100}%`),this.timer=window.setTimeout(()=>{this.inc()},200)}done(){this.isDone=!0,this.timer&&(clearTimeout(this.timer),this.timer=null),this.element&&(this.element.style.width="100%",this.hideTimeout=window.setTimeout(()=>{this.element&&(this.element.style.opacity="0",this.element.classList.remove("active"),setTimeout(()=>{this.element&&!this.element.classList.contains("active")&&(this.element.style.width="0%")},400))},1e3))}}const u=new P;var v=(e=>(e[e.ADMIN=10]="ADMIN",e[e.USER=1]="USER",e[e.GUEST=0]="GUEST",e))(v||{});const I=[],h=b({history:w(),routes:I});h.beforeEach(async(e,s,t)=>{var m,a,l;u.start();const{state:o,updateUserInfo:c,isAdmin:f,authEnabled:p}=T(),d=p.value,i=((m=o.userInfo)==null?void 0:m.permission)??0,n=Number(e.meta.permission??0),g=h.currentRoute.value.path.trim(),r=e.path.trim();if(console.info("Router Changed:",g,"->",r,`
2
+ MyPermission:`,i,"toPagePermission:",n),(a=e.meta)!=null&&a.redirect){if(typeof e.meta.redirect=="function"){const y=o.userInfo;return t(e.meta.redirect(y,e,s))}return t(e.meta.redirect)}if(r==="/sso/callback")try{return await c(),t(f.value?"/":"/customer")}catch{return t("/login")}if(r.startsWith("/sso/")||e.meta.public===!0||["/login","/404"].includes(r))return t();if(!e.name)return t("/404");if(d&&!((l=o.userInfo)!=null&&l.token))return t("/login");if(n>i&&i!==10)return t("/customer");n<=i?t():t("/404")});h.afterEach(()=>{u.done()});export{v as R,h as r};
3
+ //# sourceMappingURL=router-0f7d4714.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"router-0f7d4714.js","sources":["../../../panel/plugins/console/src/services/TopProgressBar.ts","../../../panel/plugins/console/src/config/router.ts"],"sourcesContent":["class TopProgressBar {\n private element: HTMLElement | null = null;\n private timer: number | null = null;\n private progress: number = 0;\n private isDone: boolean = false;\n private hideTimeout: number | null = null;\n\n constructor() {\n this.init();\n }\n\n private init() {\n if (typeof document === \"undefined\") return;\n\n if (document.getElementById(\"top-progress-bar\")) {\n this.element = document.getElementById(\"top-progress-bar\");\n return;\n }\n\n this.element = document.createElement(\"div\");\n this.element.id = \"top-progress-bar\";\n document.body.appendChild(this.element);\n }\n\n start() {\n if (!this.element) this.init();\n\n this.isDone = false;\n this.progress = 0;\n\n if (this.hideTimeout) {\n clearTimeout(this.hideTimeout);\n this.hideTimeout = null;\n }\n\n if (this.element) {\n this.element.classList.add(\"active\");\n this.element.style.width = \"0%\";\n this.element.style.opacity = \"1\";\n }\n\n this.inc();\n }\n\n private inc() {\n if (this.isDone) return;\n\n if (this.timer) {\n clearTimeout(this.timer);\n }\n\n let amount = 0;\n if (this.progress >= 0 && this.progress < 0.2) {\n amount = 0.1;\n } else if (this.progress >= 0.2 && this.progress < 0.5) {\n amount = 0.04;\n } else if (this.progress >= 0.5 && this.progress < 0.8) {\n amount = 0.02;\n } else if (this.progress >= 0.8 && this.progress < 0.99) {\n amount = 0.005;\n }\n\n this.progress += amount;\n\n if (this.progress > 0.994) {\n this.progress = 0.994;\n }\n\n if (this.element) {\n this.element.style.width = `${this.progress * 100}%`;\n }\n\n this.timer = window.setTimeout(() => {\n this.inc();\n }, 200);\n }\n\n done() {\n this.isDone = true;\n if (this.timer) {\n clearTimeout(this.timer);\n this.timer = null;\n }\n\n if (this.element) {\n this.element.style.width = \"100%\";\n\n this.hideTimeout = window.setTimeout(() => {\n if (this.element) {\n this.element.style.opacity = \"0\";\n this.element.classList.remove(\"active\");\n\n setTimeout(() => {\n if (this.element && !this.element.classList.contains(\"active\")) {\n this.element.style.width = \"0%\";\n }\n }, 400);\n }\n }, 1000);\n }\n }\n}\n\nexport const topProgressBar = new TopProgressBar();\n","import { topProgressBar } from \"@/services/TopProgressBar\";\nimport { useAppStateStore } from \"@/stores/useAppStateStore\";\nimport type { LoginUserInfo } from \"@/types/user\";\nimport type { Component } from \"vue\";\nimport {\n createRouter,\n createWebHashHistory,\n type RouteLocationNormalized,\n type RouteRecordRaw\n} from \"vue-router\";\n\nexport interface RouterMetaInfo {\n icon?: Component | string;\n mainMenu?: boolean;\n permission?: number;\n redirect?:\n | string\n | ((userInfo: LoginUserInfo | undefined,\n to: RouteLocationNormalized,\n from: RouteLocationNormalized\n ) => string);\n customClass?: string[];\n condition?: () => boolean;\n public?: boolean;\n immersive?: boolean;\n breadcrumbs?: Array<{\n name: string;\n path: string;\n mainMenu?: boolean;\n permission: number;\n }>;\n}\n\nexport interface RouterConfig {\n path: string;\n name: string;\n component?: any;\n children?: RouterConfig[];\n meta: RouterMetaInfo;\n redirect?:\n | string\n | ((\n userInfo: LoginUserInfo,\n to: RouteLocationNormalized,\n from: RouteLocationNormalized\n ) => string);\n}\n\nexport enum ROLE {\n // eslint-disable-next-line no-unused-vars\n ADMIN = 10,\n // eslint-disable-next-line no-unused-vars\n USER = 1,\n // eslint-disable-next-line no-unused-vars\n GUEST = 0\n}\n\n// The base routes belong to the `console` plugin. Keeping the router itself in\n// core lets every plugin register routes before the Vue app is mounted.\nconst originRouterConfig: RouterConfig[] = [];\n\nconst router = createRouter({\n history: createWebHashHistory(),\n routes: originRouterConfig as RouteRecordRaw[]\n});\n\nrouter.beforeEach(async (to, from, next) => {\n topProgressBar.start();\n const { state, updateUserInfo, isAdmin, authEnabled } = useAppStateStore();\n\n // Without the user plugin every visitor is an anonymous administrator.\n const requiresLogin = authEnabled.value;\n const userPermission = state.userInfo?.permission ?? 0;\n const toPagePermission = Number(to.meta.permission ?? 0);\n const fromRoutePath = router.currentRoute.value.path.trim();\n const toRoutePath = to.path.trim();\n console.info(\n \"Router Changed:\",\n fromRoutePath,\n \"->\",\n toRoutePath,\n \"\\nMyPermission:\",\n userPermission,\n \"toPagePermission:\",\n toPagePermission\n );\n\n if (to.meta?.redirect) {\n if (typeof to.meta.redirect === \"function\") {\n const userInfo = state.userInfo;\n return next(to.meta.redirect(userInfo, to, from));\n }\n return next(to.meta.redirect as string);\n }\n\n if (toRoutePath === \"/sso/callback\") {\n try {\n await updateUserInfo();\n return next(isAdmin.value ? \"/\" : \"/customer\");\n } catch {\n return next(\"/login\");\n }\n }\n\n if (\n toRoutePath.startsWith(\"/sso/\") ||\n to.meta.public === true ||\n [\"/login\", \"/404\"].includes(toRoutePath)\n ) {\n return next();\n }\n\n if (!to.name) return next(\"/404\");\n\n if (requiresLogin && !state.userInfo?.token) return next(\"/login\");\n\n if (toPagePermission > userPermission && userPermission !== ROLE.ADMIN) {\n return next(\"/customer\");\n }\n\n if (toPagePermission <= userPermission) {\n next();\n } else {\n next(\"/404\");\n }\n});\n\nrouter.afterEach(() => {\n topProgressBar.done();\n});\n\nexport { originRouterConfig, router };\n"],"names":["TopProgressBar","amount","topProgressBar","ROLE","originRouterConfig","router","createRouter","createWebHashHistory","to","from","next","state","updateUserInfo","isAdmin","authEnabled","useAppStateStore","requiresLogin","userPermission","_a","toPagePermission","fromRoutePath","toRoutePath","_b","userInfo","_c"],"mappings":"kGAAA,MAAMA,CAAe,CAOjB,aAAc,CANd,KAAQ,QAA8B,KACtC,KAAQ,MAAuB,KAC/B,KAAQ,SAAmB,EAC3B,KAAQ,OAAkB,GAC1B,KAAQ,YAA6B,KAGjC,KAAK,KAAK,CACd,CAEQ,MAAO,CACX,GAAI,SAAO,SAAa,KAEpB,IAAA,SAAS,eAAe,kBAAkB,EAAG,CACxC,KAAA,QAAU,SAAS,eAAe,kBAAkB,EACzD,MACJ,CAEK,KAAA,QAAU,SAAS,cAAc,KAAK,EAC3C,KAAK,QAAQ,GAAK,mBACT,SAAA,KAAK,YAAY,KAAK,OAAO,EAC1C,CAEA,OAAQ,CACC,KAAK,SAAS,KAAK,KAAK,EAE7B,KAAK,OAAS,GACd,KAAK,SAAW,EAEZ,KAAK,cACL,aAAa,KAAK,WAAW,EAC7B,KAAK,YAAc,MAGnB,KAAK,UACA,KAAA,QAAQ,UAAU,IAAI,QAAQ,EAC9B,KAAA,QAAQ,MAAM,MAAQ,KACtB,KAAA,QAAQ,MAAM,QAAU,KAGjC,KAAK,IAAI,CACb,CAEQ,KAAM,CACV,GAAI,KAAK,OAAQ,OAEb,KAAK,OACL,aAAa,KAAK,KAAK,EAG3B,IAAIC,EAAS,EACT,KAAK,UAAY,GAAK,KAAK,SAAW,GAC7BA,EAAA,GACF,KAAK,UAAY,IAAO,KAAK,SAAW,GACtCA,EAAA,IACF,KAAK,UAAY,IAAO,KAAK,SAAW,GACtCA,EAAA,IACF,KAAK,UAAY,IAAO,KAAK,SAAW,MACtCA,EAAA,MAGb,KAAK,UAAYA,EAEb,KAAK,SAAW,OAChB,KAAK,SAAW,MAGhB,KAAK,UACL,KAAK,QAAQ,MAAM,MAAQ,GAAG,KAAK,SAAW,GAAG,KAGhD,KAAA,MAAQ,OAAO,WAAW,IAAM,CACjC,KAAK,IAAI,GACV,GAAG,CACV,CAEA,MAAO,CACH,KAAK,OAAS,GACV,KAAK,QACL,aAAa,KAAK,KAAK,EACvB,KAAK,MAAQ,MAGb,KAAK,UACA,KAAA,QAAQ,MAAM,MAAQ,OAEtB,KAAA,YAAc,OAAO,WAAW,IAAM,CACnC,KAAK,UACA,KAAA,QAAQ,MAAM,QAAU,IACxB,KAAA,QAAQ,UAAU,OAAO,QAAQ,EAEtC,WAAW,IAAM,CACT,KAAK,SAAW,CAAC,KAAK,QAAQ,UAAU,SAAS,QAAQ,IACpD,KAAA,QAAQ,MAAM,MAAQ,OAEhC,GAAG,IAEX,GAAI,EAEf,CACJ,CAEa,MAAAC,EAAiB,IAAIF,ECvDtB,IAAAG,GAAAA,IAEVA,EAAAA,EAAA,MAAQ,EAAR,EAAA,QAEAA,EAAAA,EAAA,KAAO,CAAP,EAAA,OAEAA,EAAAA,EAAA,MAAQ,CAAR,EAAA,QANUA,IAAAA,GAAA,CAAA,CAAA,EAWZ,MAAMC,EAAqC,CAAA,EAErCC,EAASC,EAAa,CAC1B,QAASC,EAAqB,EAC9B,OAAQH,CACV,CAAC,EAEDC,EAAO,WAAW,MAAOG,EAAIC,EAAMC,IAAS,WAC1CR,EAAe,MAAM,EACrB,KAAM,CAAE,MAAAS,EAAO,eAAAC,EAAgB,QAAAC,EAAS,YAAAC,CAAA,EAAgBC,IAGlDC,EAAgBF,EAAY,MAC5BG,IAAiBC,EAAAP,EAAM,WAAN,YAAAO,EAAgB,aAAc,EAC/CC,EAAmB,OAAOX,EAAG,KAAK,YAAc,CAAC,EACjDY,EAAgBf,EAAO,aAAa,MAAM,KAAK,OAC/CgB,EAAcb,EAAG,KAAK,KAAK,EAY7B,GAXI,QAAA,KACN,kBACAY,EACA,KACAC,EACA;AAAA,eACAJ,EACA,oBACAE,CAAA,GAGEG,EAAAd,EAAG,OAAH,MAAAc,EAAS,SAAU,CACrB,GAAI,OAAOd,EAAG,KAAK,UAAa,WAAY,CAC1C,MAAMe,EAAWZ,EAAM,SACvB,OAAOD,EAAKF,EAAG,KAAK,SAASe,EAAUf,EAAIC,CAAI,CAAC,CAClD,CACO,OAAAC,EAAKF,EAAG,KAAK,QAAkB,CACxC,CAEA,GAAIa,IAAgB,gBACd,GAAA,CACF,aAAMT,EAAe,EACdF,EAAKG,EAAQ,MAAQ,IAAM,WAAW,CAAA,MACvC,CACN,OAAOH,EAAK,QAAQ,CACtB,CAGF,GACEW,EAAY,WAAW,OAAO,GAC9Bb,EAAG,KAAK,SAAW,IACnB,CAAC,SAAU,MAAM,EAAE,SAASa,CAAW,EAEvC,OAAOX,EAAK,EAGd,GAAI,CAACF,EAAG,KAAM,OAAOE,EAAK,MAAM,EAE5B,GAAAM,GAAiB,GAACQ,EAAAb,EAAM,WAAN,MAAAa,EAAgB,OAAO,OAAOd,EAAK,QAAQ,EAE7D,GAAAS,EAAmBF,GAAkBA,IAAmB,GAC1D,OAAOP,EAAK,WAAW,EAGrBS,GAAoBF,EACjBP,IAELA,EAAK,MAAM,CAEf,CAAC,EAEDL,EAAO,UAAU,IAAM,CACrBH,EAAe,KAAK,CACtB,CAAC"}
@@ -0,0 +1,89 @@
1
+ var ln=Object.defineProperty;var on=(s,e,t)=>e in s?ln(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t;var A=(s,e,t)=>(on(s,typeof e!="symbol"?e+"":e,t),t),an=(s,e,t)=>{if(!e.has(s))throw TypeError("Cannot "+t)};var tt=(s,e,t)=>{if(e.has(s))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(s):e.set(s,t)};var Ce=(s,e,t)=>(an(s,e,"access private method"),t);import{c as un,g as cn,l as hn}from"./htmlparser2-bcb8f9db.js";import{r as V}from"./_elements-sdk_cordis-e3bebc89.js";function $t(){return{async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!1,headerPrefix:"",highlight:null,hooks:null,langPrefix:"language-",mangle:!1,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}let oe=$t();function wr(s){oe=s}const yr=/[&<>"']/,fn=new RegExp(yr.source,"g"),xr=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,pn=new RegExp(xr.source,"g"),dn={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Bt=s=>dn[s];function j(s,e){if(e){if(yr.test(s))return s.replace(fn,Bt)}else if(xr.test(s))return s.replace(pn,Bt);return s}const gn=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function br(s){return s.replace(gn,(e,t)=>(t=t.toLowerCase(),t==="colon"?":":t.charAt(0)==="#"?t.charAt(1)==="x"?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""))}const mn=/(^|[^\[])\^/g;function E(s,e){s=typeof s=="string"?s:s.source,e=e||"";const t={replace:(r,n)=>(n=typeof n=="object"&&"source"in n?n.source:n,n=n.replace(mn,"$1"),s=s.replace(r,n),t),getRegex:()=>new RegExp(s,e)};return t}const wn=/[^\w:]/g,yn=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function jt(s,e,t){if(s){let r;try{r=decodeURIComponent(br(t)).replace(wn,"").toLowerCase()}catch{return null}if(r.indexOf("javascript:")===0||r.indexOf("vbscript:")===0||r.indexOf("data:")===0)return null}e&&!yn.test(t)&&(t=Sn(e,t));try{t=encodeURI(t).replace(/%25/g,"%")}catch{return null}return t}const Ae={},xn=/^[^:]+:\/*[^/]*$/,bn=/^([^:]+:)[\s\S]*$/,kn=/^([^:]+:\/*[^/]*)[\s\S]*$/;function Sn(s,e){Ae[" "+s]||(xn.test(s)?Ae[" "+s]=s+"/":Ae[" "+s]=Ue(s,"/",!0)),s=Ae[" "+s];const t=s.indexOf(":")===-1;return e.substring(0,2)==="//"?t?e:s.replace(bn,"$1")+e:e.charAt(0)==="/"?t?e:s.replace(kn,"$1")+e:s+e}const Ne={exec:()=>null};function Nt(s,e){const t=s.replace(/\|/g,(i,l,a)=>{let o=!1,h=l;for(;--h>=0&&a[h]==="\\";)o=!o;return o?"|":" |"}),r=t.split(/ \|/);let n=0;if(r[0].trim()||r.shift(),r.length>0&&!r[r.length-1].trim()&&r.pop(),e)if(r.length>e)r.splice(e);else for(;r.length<e;)r.push("");for(;n<r.length;n++)r[n]=r[n].trim().replace(/\\\|/g,"|");return r}function Ue(s,e,t){const r=s.length;if(r===0)return"";let n=0;for(;n<r;){const i=s.charAt(r-n-1);if(i===e&&!t)n++;else if(i!==e&&t)n++;else break}return s.slice(0,r-n)}function $n(s,e){if(s.indexOf(e[1])===-1)return-1;const t=s.length;let r=0,n=0;for(;n<t;n++)if(s[n]==="\\")n++;else if(s[n]===e[0])r++;else if(s[n]===e[1]&&(r--,r<0))return n;return-1}function vn(s,e){!s||s.silent||(e&&console.warn("marked(): callback is deprecated since version 5.0.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/using_pro#async"),(s.sanitize||s.sanitizer)&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options"),(s.highlight||s.langPrefix!=="language-")&&console.warn("marked(): highlight and langPrefix parameters are deprecated since version 5.0.0, should not be used and will be removed in the future. Instead use https://www.npmjs.com/package/marked-highlight."),s.mangle&&console.warn("marked(): mangle parameter is enabled by default, but is deprecated since version 5.0.0, and will be removed in the future. To clear this warning, install https://www.npmjs.com/package/marked-mangle, or disable by setting `{mangle: false}`."),s.baseUrl&&console.warn("marked(): baseUrl parameter is deprecated since version 5.0.0, should not be used and will be removed in the future. Instead use https://www.npmjs.com/package/marked-base-url."),s.smartypants&&console.warn("marked(): smartypants parameter is deprecated since version 5.0.0, should not be used and will be removed in the future. Instead use https://www.npmjs.com/package/marked-smartypants."),s.xhtml&&console.warn("marked(): xhtml parameter is deprecated since version 5.0.0, should not be used and will be removed in the future. Instead use https://www.npmjs.com/package/marked-xhtml."),(s.headerIds||s.headerPrefix)&&console.warn("marked(): headerIds and headerPrefix parameters enabled by default, but are deprecated since version 5.0.0, and will be removed in the future. To clear this warning, install https://www.npmjs.com/package/marked-gfm-heading-id, or disable by setting `{headerIds: false}`."))}function Dt(s,e,t,r){const n=e.href,i=e.title?j(e.title):null,l=s[1].replace(/\\([\[\]])/g,"$1");if(s[0].charAt(0)!=="!"){r.state.inLink=!0;const a={type:"link",raw:t,href:n,title:i,text:l,tokens:r.inlineTokens(l)};return r.state.inLink=!1,a}return{type:"image",raw:t,href:n,title:i,text:j(l)}}function Rn(s,e){const t=s.match(/^(\s+)(?:```)/);if(t===null)return e;const r=t[1];return e.split(`
2
+ `).map(n=>{const i=n.match(/^\s+/);if(i===null)return n;const[l]=i;return l.length>=r.length?n.slice(r.length):n}).join(`
3
+ `)}class De{constructor(e){A(this,"options");A(this,"rules");A(this,"lexer");this.options=e||oe}space(e){const t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const r=t[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?r:Ue(r,`
4
+ `)}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const r=t[0],n=Rn(r,t[3]||"");return{type:"code",raw:r,lang:t[2]?t[2].trim().replace(this.rules.inline._escapes,"$1"):t[2],text:n}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let r=t[2].trim();if(/#$/.test(r)){const n=Ue(r,"#");(this.options.pedantic||!n||/ $/.test(n))&&(r=n.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:t[0]}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){const r=t[0].replace(/^ *>[ \t]?/gm,""),n=this.lexer.state.top;this.lexer.state.top=!0;const i=this.lexer.blockTokens(r);return this.lexer.state.top=n,{type:"blockquote",raw:t[0],tokens:i,text:r}}}list(e){let t=this.rules.block.list.exec(e);if(t){let r,n,i,l,a,o,h,c,p,f,u,k,y=t[1].trim();const g=y.length>1,$={type:"list",raw:"",ordered:g,start:g?+y.slice(0,-1):"",loose:!1,items:[]};y=g?`\\d{1,9}\\${y.slice(-1)}`:`\\${y}`,this.options.pedantic&&(y=g?y:"[*+-]");const C=new RegExp(`^( {0,3}${y})((?:[ ][^\\n]*)?(?:\\n|$))`);for(;e&&(k=!1,!(!(t=C.exec(e))||this.rules.block.hr.test(e)));){if(r=t[0],e=e.substring(r.length),c=t[2].split(`
5
+ `,1)[0].replace(/^\t+/,R=>" ".repeat(3*R.length)),p=e.split(`
6
+ `,1)[0],this.options.pedantic?(l=2,u=c.trimLeft()):(l=t[2].search(/[^ ]/),l=l>4?1:l,u=c.slice(l),l+=t[1].length),o=!1,!c&&/^ *$/.test(p)&&(r+=p+`
7
+ `,e=e.substring(p.length+1),k=!0),!k){const R=new RegExp(`^ {0,${Math.min(3,l-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),_=new RegExp(`^ {0,${Math.min(3,l-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),L=new RegExp(`^ {0,${Math.min(3,l-1)}}(?:\`\`\`|~~~)`),B=new RegExp(`^ {0,${Math.min(3,l-1)}}#`);for(;e&&(f=e.split(`
8
+ `,1)[0],p=f,this.options.pedantic&&(p=p.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),!(L.test(p)||B.test(p)||R.test(p)||_.test(e)));){if(p.search(/[^ ]/)>=l||!p.trim())u+=`
9
+ `+p.slice(l);else{if(o||c.search(/[^ ]/)>=4||L.test(c)||B.test(c)||_.test(c))break;u+=`
10
+ `+p}!o&&!p.trim()&&(o=!0),r+=f+`
11
+ `,e=e.substring(f.length+1),c=p.slice(l)}}$.loose||(h?$.loose=!0:/\n *\n *$/.test(r)&&(h=!0)),this.options.gfm&&(n=/^\[[ xX]\] /.exec(u),n&&(i=n[0]!=="[ ] ",u=u.replace(/^\[[ xX]\] +/,""))),$.items.push({type:"list_item",raw:r,task:!!n,checked:i,loose:!1,text:u}),$.raw+=r}$.items[$.items.length-1].raw=r.trimRight(),$.items[$.items.length-1].text=u.trimRight(),$.raw=$.raw.trimRight();const M=$.items.length;for(a=0;a<M;a++)if(this.lexer.state.top=!1,$.items[a].tokens=this.lexer.blockTokens($.items[a].text,[]),!$.loose){const R=$.items[a].tokens.filter(L=>L.type==="space"),_=R.length>0&&R.some(L=>/\n.*\n/.test(L.raw));$.loose=_}if($.loose)for(a=0;a<M;a++)$.items[a].loose=!0;return $}}html(e){const t=this.rules.block.html.exec(e);if(t){const r={type:"html",block:!0,raw:t[0],pre:!this.options.sanitizer&&(t[1]==="pre"||t[1]==="script"||t[1]==="style"),text:t[0]};if(this.options.sanitize){const n=this.options.sanitizer?this.options.sanitizer(t[0]):j(t[0]),i=r;i.type="paragraph",i.text=n,i.tokens=this.lexer.inline(n)}return r}}def(e){const t=this.rules.block.def.exec(e);if(t){const r=t[1].toLowerCase().replace(/\s+/g," "),n=t[2]?t[2].replace(/^<(.*)>$/,"$1").replace(this.rules.inline._escapes,"$1"):"",i=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline._escapes,"$1"):t[3];return{type:"def",tag:r,raw:t[0],href:n,title:i}}}table(e){const t=this.rules.block.table.exec(e);if(t){const r={type:"table",raw:t[0],header:Nt(t[1]).map(n=>({text:n})),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,"").split(`
12
+ `):[]};if(r.header.length===r.align.length){let n=r.align.length,i,l,a,o;for(i=0;i<n;i++)/^ *-+: *$/.test(r.align[i])?r.align[i]="right":/^ *:-+: *$/.test(r.align[i])?r.align[i]="center":/^ *:-+ *$/.test(r.align[i])?r.align[i]="left":r.align[i]=null;for(n=r.rows.length,i=0;i<n;i++)r.rows[i]=Nt(r.rows[i],r.header.length).map(h=>({text:h}));for(n=r.header.length,l=0;l<n;l++)r.header[l].tokens=this.lexer.inline(r.header[l].text);for(n=r.rows.length,l=0;l<n;l++)for(o=r.rows[l],a=0;a<o.length;a++)o[a].tokens=this.lexer.inline(o[a].text);return r}}}lheading(e){const t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:t[2].charAt(0)==="="?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){const t=this.rules.block.paragraph.exec(e);if(t){const r=t[1].charAt(t[1].length-1)===`
13
+ `?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:r,tokens:this.lexer.inline(r)}}}text(e){const t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:j(t[1])}}tag(e){const t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&/^<a /i.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(t[0]):j(t[0]):t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const r=t[2].trim();if(!this.options.pedantic&&/^</.test(r)){if(!/>$/.test(r))return;const l=Ue(r.slice(0,-1),"\\");if((r.length-l.length)%2===0)return}else{const l=$n(t[2],"()");if(l>-1){const o=(t[0].indexOf("!")===0?5:4)+t[1].length+l;t[2]=t[2].substring(0,l),t[0]=t[0].substring(0,o).trim(),t[3]=""}}let n=t[2],i="";if(this.options.pedantic){const l=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(n);l&&(n=l[1],i=l[3])}else i=t[3]?t[3].slice(1,-1):"";return n=n.trim(),/^</.test(n)&&(this.options.pedantic&&!/>$/.test(r)?n=n.slice(1):n=n.slice(1,-1)),Dt(t,{href:n&&n.replace(this.rules.inline._escapes,"$1"),title:i&&i.replace(this.rules.inline._escapes,"$1")},t[0],this.lexer)}}reflink(e,t){let r;if((r=this.rules.inline.reflink.exec(e))||(r=this.rules.inline.nolink.exec(e))){let n=(r[2]||r[1]).replace(/\s+/g," ");if(n=t[n.toLowerCase()],!n){const i=r[0].charAt(0);return{type:"text",raw:i,text:i}}return Dt(r,n,r[0],this.lexer)}}emStrong(e,t,r=""){let n=this.rules.inline.emStrong.lDelim.exec(e);if(!n||n[3]&&r.match(/[\p{L}\p{N}]/u))return;if(!(n[1]||n[2]||"")||!r||this.rules.inline.punctuation.exec(r)){const l=[...n[0]].length-1;let a,o,h=l,c=0;const p=n[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(p.lastIndex=0,t=t.slice(-1*e.length+l);(n=p.exec(t))!=null;){if(a=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!a)continue;if(o=[...a].length,n[3]||n[4]){h+=o;continue}else if((n[5]||n[6])&&l%3&&!((l+o)%3)){c+=o;continue}if(h-=o,h>0)continue;o=Math.min(o,o+h+c);const f=[...e].slice(0,l+n.index+o+1).join("");if(Math.min(l,o)%2){const k=f.slice(1,-1);return{type:"em",raw:f,text:k,tokens:this.lexer.inlineTokens(k)}}const u=f.slice(2,-2);return{type:"strong",raw:f,text:u,tokens:this.lexer.inlineTokens(u)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let r=t[2].replace(/\n/g," ");const n=/[^ ]/.test(r),i=/^ /.test(r)&&/ $/.test(r);return n&&i&&(r=r.substring(1,r.length-1)),r=j(r,!0),{type:"codespan",raw:t[0],text:r}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e,t){const r=this.rules.inline.autolink.exec(e);if(r){let n,i;return r[2]==="@"?(n=j(this.options.mangle?t(r[1]):r[1]),i="mailto:"+n):(n=j(r[1]),i=n),{type:"link",raw:r[0],text:n,href:i,tokens:[{type:"text",raw:n,text:n}]}}}url(e,t){let r;if(r=this.rules.inline.url.exec(e)){let n,i;if(r[2]==="@")n=j(this.options.mangle?t(r[0]):r[0]),i="mailto:"+n;else{let l;do l=r[0],r[0]=this.rules.inline._backpedal.exec(r[0])[0];while(l!==r[0]);n=j(r[0]),r[1]==="www."?i="http://"+r[0]:i=r[0]}return{type:"link",raw:r[0],text:n,href:i,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(e,t){const r=this.rules.inline.text.exec(e);if(r){let n;return this.lexer.state.inRawBlock?n=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(r[0]):j(r[0]):r[0]:n=j(this.options.smartypants?t(r[0]):r[0]),{type:"text",raw:r[0],text:n}}}}const b={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:Ne,lheading:/^((?:(?!^bull ).|\n(?!\n|bull ))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/};b._label=/(?!\s*\])(?:\\.|[^\[\]\\])+/;b._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/;b.def=E(b.def).replace("label",b._label).replace("title",b._title).getRegex();b.bullet=/(?:[*+-]|\d{1,9}[.)])/;b.listItemStart=E(/^( *)(bull) */).replace("bull",b.bullet).getRegex();b.list=E(b.list).replace(/bull/g,b.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+b.def.source+")").getRegex();b._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul";b._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/;b.html=E(b.html,"i").replace("comment",b._comment).replace("tag",b._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex();b.lheading=E(b.lheading).replace(/bull/g,b.bullet).getRegex();b.paragraph=E(b._paragraph).replace("hr",b.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",b._tag).getRegex();b.blockquote=E(b.blockquote).replace("paragraph",b.paragraph).getRegex();b.normal={...b};b.gfm={...b.normal,table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"};b.gfm.table=E(b.gfm.table).replace("hr",b.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",b._tag).getRegex();b.gfm.paragraph=E(b._paragraph).replace("hr",b.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",b.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",b._tag).getRegex();b.pedantic={...b.normal,html:E(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",b._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Ne,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:E(b.normal._paragraph).replace("hr",b.hr).replace("heading",` *#{1,6} *[^
14
+ ]`).replace("lheading",b.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()};const w={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:Ne,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,rDelimAst:/^[^_*]*?__[^_*]*?\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\*)[punct](\*+)(?=[\s]|$)|[^punct\s](\*+)(?!\*)(?=[punct\s]|$)|(?!\*)[punct\s](\*+)(?=[^punct\s])|[\s](\*+)(?!\*)(?=[punct])|(?!\*)[punct](\*+)(?!\*)(?=[punct])|[^punct\s](\*+)(?=[^punct\s])/,rDelimUnd:/^[^_*]*?\*\*[^_*]*?_[^_*]*?(?=\*\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\s]|$)|[^punct\s](_+)(?!_)(?=[punct\s]|$)|(?!_)[punct\s](_+)(?=[^punct\s])|[\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:Ne,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^((?![*_])[\spunctuation])/};w._punctuation="\\p{P}$+<=>`^|~";w.punctuation=E(w.punctuation,"u").replace(/punctuation/g,w._punctuation).getRegex();w.blockSkip=/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g;w.anyPunctuation=/\\[punct]/g;w._escapes=/\\([punct])/g;w._comment=E(b._comment).replace("(?:-->|$)","-->").getRegex();w.emStrong.lDelim=E(w.emStrong.lDelim,"u").replace(/punct/g,w._punctuation).getRegex();w.emStrong.rDelimAst=E(w.emStrong.rDelimAst,"gu").replace(/punct/g,w._punctuation).getRegex();w.emStrong.rDelimUnd=E(w.emStrong.rDelimUnd,"gu").replace(/punct/g,w._punctuation).getRegex();w.anyPunctuation=E(w.anyPunctuation,"gu").replace(/punct/g,w._punctuation).getRegex();w._escapes=E(w._escapes,"gu").replace(/punct/g,w._punctuation).getRegex();w._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/;w._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/;w.autolink=E(w.autolink).replace("scheme",w._scheme).replace("email",w._email).getRegex();w._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/;w.tag=E(w.tag).replace("comment",w._comment).replace("attribute",w._attribute).getRegex();w._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/;w._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/;w._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/;w.link=E(w.link).replace("label",w._label).replace("href",w._href).replace("title",w._title).getRegex();w.reflink=E(w.reflink).replace("label",w._label).replace("ref",b._label).getRegex();w.nolink=E(w.nolink).replace("ref",b._label).getRegex();w.reflinkSearch=E(w.reflinkSearch,"g").replace("reflink",w.reflink).replace("nolink",w.nolink).getRegex();w.normal={...w};w.pedantic={...w.normal,strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:E(/^!?\[(label)\]\((.*?)\)/).replace("label",w._label).getRegex(),reflink:E(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",w._label).getRegex()};w.gfm={...w.normal,escape:E(w.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/};w.gfm.url=E(w.gfm.url,"i").replace("email",w.gfm._extended_email).getRegex();w.breaks={...w.gfm,br:E(w.br).replace("{2,}","*").getRegex(),text:E(w.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()};function Cn(s){return s.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…")}function Ft(s){let e="",t,r;const n=s.length;for(t=0;t<n;t++)r=s.charCodeAt(t),Math.random()>.5&&(r="x"+r.toString(16)),e+="&#"+r+";";return e}class J{constructor(e){A(this,"tokens");A(this,"options");A(this,"state");A(this,"tokenizer");A(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=e||oe,this.options.tokenizer=this.options.tokenizer||new De,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const t={block:b.normal,inline:w.normal};this.options.pedantic?(t.block=b.pedantic,t.inline=w.pedantic):this.options.gfm&&(t.block=b.gfm,this.options.breaks?t.inline=w.breaks:t.inline=w.gfm),this.tokenizer.rules=t}static get rules(){return{block:b,inline:w}}static lex(e,t){return new J(t).lex(e)}static lexInline(e,t){return new J(t).inlineTokens(e)}lex(e){e=e.replace(/\r\n|\r/g,`
15
+ `),this.blockTokens(e,this.tokens);let t;for(;t=this.inlineQueue.shift();)this.inlineTokens(t.src,t.tokens);return this.tokens}blockTokens(e,t=[]){this.options.pedantic?e=e.replace(/\t/g," ").replace(/^ +$/gm,""):e=e.replace(/^( *)(\t+)/gm,(a,o,h)=>o+" ".repeat(h.length));let r,n,i,l;for(;e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(a=>(r=a.call({lexer:this},e,t))?(e=e.substring(r.raw.length),t.push(r),!0):!1))){if(r=this.tokenizer.space(e)){e=e.substring(r.raw.length),r.raw.length===1&&t.length>0?t[t.length-1].raw+=`
16
+ `:t.push(r);continue}if(r=this.tokenizer.code(e)){e=e.substring(r.raw.length),n=t[t.length-1],n&&(n.type==="paragraph"||n.type==="text")?(n.raw+=`
17
+ `+r.raw,n.text+=`
18
+ `+r.text,this.inlineQueue[this.inlineQueue.length-1].src=n.text):t.push(r);continue}if(r=this.tokenizer.fences(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.heading(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.hr(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.blockquote(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.list(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.html(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.def(e)){e=e.substring(r.raw.length),n=t[t.length-1],n&&(n.type==="paragraph"||n.type==="text")?(n.raw+=`
19
+ `+r.raw,n.text+=`
20
+ `+r.raw,this.inlineQueue[this.inlineQueue.length-1].src=n.text):this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title});continue}if(r=this.tokenizer.table(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.lheading(e)){e=e.substring(r.raw.length),t.push(r);continue}if(i=e,this.options.extensions&&this.options.extensions.startBlock){let a=1/0;const o=e.slice(1);let h;this.options.extensions.startBlock.forEach(c=>{h=c.call({lexer:this},o),typeof h=="number"&&h>=0&&(a=Math.min(a,h))}),a<1/0&&a>=0&&(i=e.substring(0,a+1))}if(this.state.top&&(r=this.tokenizer.paragraph(i))){n=t[t.length-1],l&&n.type==="paragraph"?(n.raw+=`
21
+ `+r.raw,n.text+=`
22
+ `+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=n.text):t.push(r),l=i.length!==e.length,e=e.substring(r.raw.length);continue}if(r=this.tokenizer.text(e)){e=e.substring(r.raw.length),n=t[t.length-1],n&&n.type==="text"?(n.raw+=`
23
+ `+r.raw,n.text+=`
24
+ `+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=n.text):t.push(r);continue}if(e){const a="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(a);break}else throw new Error(a)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){let r,n,i,l=e,a,o,h;if(this.tokens.links){const c=Object.keys(this.tokens.links);if(c.length>0)for(;(a=this.tokenizer.rules.inline.reflinkSearch.exec(l))!=null;)c.includes(a[0].slice(a[0].lastIndexOf("[")+1,-1))&&(l=l.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(a=this.tokenizer.rules.inline.blockSkip.exec(l))!=null;)l=l.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(a=this.tokenizer.rules.inline.anyPunctuation.exec(l))!=null;)l=l.slice(0,a.index)+"++"+l.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;e;)if(o||(h=""),o=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(c=>(r=c.call({lexer:this},e,t))?(e=e.substring(r.raw.length),t.push(r),!0):!1))){if(r=this.tokenizer.escape(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.tag(e)){e=e.substring(r.raw.length),n=t[t.length-1],n&&r.type==="text"&&n.type==="text"?(n.raw+=r.raw,n.text+=r.text):t.push(r);continue}if(r=this.tokenizer.link(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(r.raw.length),n=t[t.length-1],n&&r.type==="text"&&n.type==="text"?(n.raw+=r.raw,n.text+=r.text):t.push(r);continue}if(r=this.tokenizer.emStrong(e,l,h)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.codespan(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.br(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.del(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.autolink(e,Ft)){e=e.substring(r.raw.length),t.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(e,Ft))){e=e.substring(r.raw.length),t.push(r);continue}if(i=e,this.options.extensions&&this.options.extensions.startInline){let c=1/0;const p=e.slice(1);let f;this.options.extensions.startInline.forEach(u=>{f=u.call({lexer:this},p),typeof f=="number"&&f>=0&&(c=Math.min(c,f))}),c<1/0&&c>=0&&(i=e.substring(0,c+1))}if(r=this.tokenizer.inlineText(i,Cn)){e=e.substring(r.raw.length),r.raw.slice(-1)!=="_"&&(h=r.raw.slice(-1)),o=!0,n=t[t.length-1],n&&n.type==="text"?(n.raw+=r.raw,n.text+=r.text):t.push(r);continue}if(e){const c="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return t}}class Fe{constructor(e){A(this,"options");this.options=e||oe}code(e,t,r){const n=(t||"").match(/\S*/)[0];if(this.options.highlight){const i=this.options.highlight(e,n);i!=null&&i!==e&&(r=!0,e=i)}return e=e.replace(/\n$/,"")+`
25
+ `,n?'<pre><code class="'+this.options.langPrefix+j(n)+'">'+(r?e:j(e,!0))+`</code></pre>
26
+ `:"<pre><code>"+(r?e:j(e,!0))+`</code></pre>
27
+ `}blockquote(e){return`<blockquote>
28
+ ${e}</blockquote>
29
+ `}html(e,t){return e}heading(e,t,r,n){if(this.options.headerIds){const i=this.options.headerPrefix+n.slug(r);return`<h${t} id="${i}">${e}</h${t}>
30
+ `}return`<h${t}>${e}</h${t}>
31
+ `}hr(){return this.options.xhtml?`<hr/>
32
+ `:`<hr>
33
+ `}list(e,t,r){const n=t?"ol":"ul",i=t&&r!==1?' start="'+r+'"':"";return"<"+n+i+`>
34
+ `+e+"</"+n+`>
35
+ `}listitem(e,t,r){return`<li>${e}</li>
36
+ `}checkbox(e){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "}paragraph(e){return`<p>${e}</p>
37
+ `}table(e,t){return t&&(t=`<tbody>${t}</tbody>`),`<table>
38
+ <thead>
39
+ `+e+`</thead>
40
+ `+t+`</table>
41
+ `}tablerow(e){return`<tr>
42
+ ${e}</tr>
43
+ `}tablecell(e,t){const r=t.header?"th":"td";return(t.align?`<${r} align="${t.align}">`:`<${r}>`)+e+`</${r}>
44
+ `}strong(e){return`<strong>${e}</strong>`}em(e){return`<em>${e}</em>`}codespan(e){return`<code>${e}</code>`}br(){return this.options.xhtml?"<br/>":"<br>"}del(e){return`<del>${e}</del>`}link(e,t,r){if(e=jt(this.options.sanitize,this.options.baseUrl,e),e===null)return r;let n='<a href="'+e+'"';return t&&(n+=' title="'+t+'"'),n+=">"+r+"</a>",n}image(e,t,r){if(e=jt(this.options.sanitize,this.options.baseUrl,e),e===null)return r;let n=`<img src="${e}" alt="${r}"`;return t&&(n+=` title="${t}"`),n+=this.options.xhtml?"/>":">",n}text(e){return e}}class vt{strong(e){return e}em(e){return e}codespan(e){return e}del(e){return e}html(e){return e}text(e){return e}link(e,t,r){return""+r}image(e,t,r){return""+r}br(){return""}}class Rt{constructor(){A(this,"seen");this.seen={}}serialize(e){return e.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")}getNextSafeSlug(e,t){let r=e,n=0;if(this.seen.hasOwnProperty(r)){n=this.seen[e];do n++,r=e+"-"+n;while(this.seen.hasOwnProperty(r))}return t||(this.seen[e]=n,this.seen[r]=0),r}slug(e,t={}){const r=this.serialize(e);return this.getNextSafeSlug(r,t.dryrun)}}class Y{constructor(e){A(this,"options");A(this,"renderer");A(this,"textRenderer");A(this,"slugger");this.options=e||oe,this.options.renderer=this.options.renderer||new Fe,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new vt,this.slugger=new Rt}static parse(e,t){return new Y(t).parse(e)}static parseInline(e,t){return new Y(t).parseInline(e)}parse(e,t=!0){let r="",n,i,l,a,o,h,c,p,f,u,k,y,g,$,C,M,R,_,L;const B=e.length;for(n=0;n<B;n++){if(u=e[n],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[u.type]&&(L=this.options.extensions.renderers[u.type].call({parser:this},u),L!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(u.type))){r+=L||"";continue}switch(u.type){case"space":continue;case"hr":{r+=this.renderer.hr();continue}case"heading":{r+=this.renderer.heading(this.parseInline(u.tokens),u.depth,br(this.parseInline(u.tokens,this.textRenderer)),this.slugger);continue}case"code":{r+=this.renderer.code(u.text,u.lang,!!u.escaped);continue}case"table":{for(p="",c="",a=u.header.length,i=0;i<a;i++)c+=this.renderer.tablecell(this.parseInline(u.header[i].tokens),{header:!0,align:u.align[i]});for(p+=this.renderer.tablerow(c),f="",a=u.rows.length,i=0;i<a;i++){for(h=u.rows[i],c="",o=h.length,l=0;l<o;l++)c+=this.renderer.tablecell(this.parseInline(h[l].tokens),{header:!1,align:u.align[l]});f+=this.renderer.tablerow(c)}r+=this.renderer.table(p,f);continue}case"blockquote":{f=this.parse(u.tokens),r+=this.renderer.blockquote(f);continue}case"list":{for(k=u.ordered,y=u.start,g=u.loose,a=u.items.length,f="",i=0;i<a;i++)C=u.items[i],M=C.checked,R=C.task,$="",C.task&&(_=this.renderer.checkbox(!!M),g?C.tokens.length>0&&C.tokens[0].type==="paragraph"?(C.tokens[0].text=_+" "+C.tokens[0].text,C.tokens[0].tokens&&C.tokens[0].tokens.length>0&&C.tokens[0].tokens[0].type==="text"&&(C.tokens[0].tokens[0].text=_+" "+C.tokens[0].tokens[0].text)):C.tokens.unshift({type:"text",text:_}):$+=_),$+=this.parse(C.tokens,g),f+=this.renderer.listitem($,R,!!M);r+=this.renderer.list(f,k,y);continue}case"html":{r+=this.renderer.html(u.text,u.block);continue}case"paragraph":{r+=this.renderer.paragraph(this.parseInline(u.tokens));continue}case"text":{for(f=u.tokens?this.parseInline(u.tokens):u.text;n+1<B&&e[n+1].type==="text";)u=e[++n],f+=`
45
+ `+(u.tokens?this.parseInline(u.tokens):u.text);r+=t?this.renderer.paragraph(f):f;continue}default:{const N='Token with "'+u.type+'" type was not found.';if(this.options.silent)return console.error(N),"";throw new Error(N)}}}return r}parseInline(e,t){t=t||this.renderer;let r="",n,i,l;const a=e.length;for(n=0;n<a;n++){if(i=e[n],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[i.type]&&(l=this.options.extensions.renderers[i.type].call({parser:this},i),l!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(i.type))){r+=l||"";continue}switch(i.type){case"escape":{r+=t.text(i.text);break}case"html":{r+=t.html(i.text);break}case"link":{r+=t.link(i.href,i.title,this.parseInline(i.tokens,t));break}case"image":{r+=t.image(i.href,i.title,i.text);break}case"strong":{r+=t.strong(this.parseInline(i.tokens,t));break}case"em":{r+=t.em(this.parseInline(i.tokens,t));break}case"codespan":{r+=t.codespan(i.text);break}case"br":{r+=t.br();break}case"del":{r+=t.del(this.parseInline(i.tokens,t));break}case"text":{r+=t.text(i.text);break}default:{const o='Token with "'+i.type+'" type was not found.';if(this.options.silent)return console.error(o),"";throw new Error(o)}}}return r}}class ye{constructor(e){A(this,"options");this.options=e||oe}preprocess(e){return e}postprocess(e){return e}}A(ye,"passThroughHooks",new Set(["preprocess","postprocess"]));var ve,lt,Ve,kr;class An{constructor(...e){tt(this,ve);tt(this,Ve);A(this,"defaults",$t());A(this,"options",this.setOptions);A(this,"parse",Ce(this,ve,lt).call(this,J.lex,Y.parse));A(this,"parseInline",Ce(this,ve,lt).call(this,J.lexInline,Y.parseInline));A(this,"Parser",Y);A(this,"parser",Y.parse);A(this,"Renderer",Fe);A(this,"TextRenderer",vt);A(this,"Lexer",J);A(this,"lexer",J.lex);A(this,"Tokenizer",De);A(this,"Slugger",Rt);A(this,"Hooks",ye);this.use(...e)}walkTokens(e,t){let r=[];for(const n of e)switch(r=r.concat(t.call(this,n)),n.type){case"table":{for(const i of n.header)r=r.concat(this.walkTokens(i.tokens,t));for(const i of n.rows)for(const l of i)r=r.concat(this.walkTokens(l.tokens,t));break}case"list":{r=r.concat(this.walkTokens(n.items,t));break}default:this.defaults.extensions&&this.defaults.extensions.childTokens&&this.defaults.extensions.childTokens[n.type]?this.defaults.extensions.childTokens[n.type].forEach(i=>{r=r.concat(this.walkTokens(n[i],t))}):n.tokens&&(r=r.concat(this.walkTokens(n.tokens,t)))}return r}use(...e){const t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(r=>{const n={...r};if(n.async=this.defaults.async||n.async||!1,r.extensions&&(r.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if("renderer"in i){const l=t.renderers[i.name];l?t.renderers[i.name]=function(...a){let o=i.renderer.apply(this,a);return o===!1&&(o=l.apply(this,a)),o}:t.renderers[i.name]=i.renderer}if("tokenizer"in i){if(!i.level||i.level!=="block"&&i.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");t[i.level]?t[i.level].unshift(i.tokenizer):t[i.level]=[i.tokenizer],i.start&&(i.level==="block"?t.startBlock?t.startBlock.push(i.start):t.startBlock=[i.start]:i.level==="inline"&&(t.startInline?t.startInline.push(i.start):t.startInline=[i.start]))}"childTokens"in i&&i.childTokens&&(t.childTokens[i.name]=i.childTokens)}),n.extensions=t),r.renderer){const i=this.defaults.renderer||new Fe(this.defaults);for(const l in r.renderer){const a=r.renderer[l],o=l,h=i[o];i[o]=(...c)=>{let p=a.apply(i,c);return p===!1&&(p=h.apply(i,c)),p||""}}n.renderer=i}if(r.tokenizer){const i=this.defaults.tokenizer||new De(this.defaults);for(const l in r.tokenizer){const a=r.tokenizer[l],o=l,h=i[o];i[o]=(...c)=>{let p=a.apply(i,c);return p===!1&&(p=h.apply(i,c)),p}}n.tokenizer=i}if(r.hooks){const i=this.defaults.hooks||new ye;for(const l in r.hooks){const a=r.hooks[l],o=l,h=i[o];ye.passThroughHooks.has(l)?i[o]=c=>{if(this.defaults.async)return Promise.resolve(a.call(i,c)).then(f=>h.call(i,f));const p=a.call(i,c);return h.call(i,p)}:i[o]=(...c)=>{let p=a.apply(i,c);return p===!1&&(p=h.apply(i,c)),p}}n.hooks=i}if(r.walkTokens){const i=this.defaults.walkTokens;n.walkTokens=function(l){let a=[];return a.push(r.walkTokens.call(this,l)),i&&(a=a.concat(i.call(this,l))),a}}this.defaults={...this.defaults,...n}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}}ve=new WeakSet,lt=function(e,t){return(r,n,i)=>{typeof n=="function"&&(i=n,n=null);const l={...n},a={...this.defaults,...l},o=Ce(this,Ve,kr).call(this,!!a.silent,!!a.async,i);if(typeof r>"u"||r===null)return o(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return o(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(vn(a,i),a.hooks&&(a.hooks.options=a),i){const h=a.highlight;let c;try{a.hooks&&(r=a.hooks.preprocess(r)),c=e(r,a)}catch(u){return o(u)}const p=u=>{let k;if(!u)try{a.walkTokens&&this.walkTokens(c,a.walkTokens),k=t(c,a),a.hooks&&(k=a.hooks.postprocess(k))}catch(y){u=y}return a.highlight=h,u?o(u):i(null,k)};if(!h||h.length<3||(delete a.highlight,!c.length))return p();let f=0;this.walkTokens(c,u=>{u.type==="code"&&(f++,setTimeout(()=>{h(u.text,u.lang,(k,y)=>{if(k)return p(k);y!=null&&y!==u.text&&(u.text=y,u.escaped=!0),f--,f===0&&p()})},0))}),f===0&&p();return}if(a.async)return Promise.resolve(a.hooks?a.hooks.preprocess(r):r).then(h=>e(h,a)).then(h=>a.walkTokens?Promise.all(this.walkTokens(h,a.walkTokens)).then(()=>h):h).then(h=>t(h,a)).then(h=>a.hooks?a.hooks.postprocess(h):h).catch(o);try{a.hooks&&(r=a.hooks.preprocess(r));const h=e(r,a);a.walkTokens&&this.walkTokens(h,a.walkTokens);let c=t(h,a);return a.hooks&&(c=a.hooks.postprocess(c)),c}catch(h){return o(h)}}},Ve=new WeakSet,kr=function(e,t,r){return n=>{if(n.message+=`
46
+ Please report this to https://github.com/markedjs/marked.`,e){const i="<p>An error occurred:</p><pre>"+j(n.message+"",!0)+"</pre>";if(t)return Promise.resolve(i);if(r){r(null,i);return}return i}if(t)return Promise.reject(n);if(r){r(n);return}throw n}};const le=new An;function O(s,e,t){return le.parse(s,e,t)}O.options=O.setOptions=function(s){return le.setOptions(s),O.defaults=le.defaults,wr(O.defaults),O};O.getDefaults=$t;O.defaults=oe;O.use=function(...s){return le.use(...s),O.defaults=le.defaults,wr(O.defaults),O};O.walkTokens=function(s,e){return le.walkTokens(s,e)};O.parseInline=le.parseInline;O.Parser=Y;O.parser=Y.parse;O.Renderer=Fe;O.TextRenderer=vt;O.Lexer=J;O.lexer=J.lex;O.Tokenizer=De;O.Slugger=Rt;O.Hooks=ye;O.parse=O;O.options;O.setOptions;O.use;O.walkTokens;O.parseInline;const On=O;Y.parse;J.lex;var En=s=>{if(typeof s!="string")throw new TypeError("Expected a string");return s.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")},Ct={};Object.defineProperty(Ct,"__esModule",{value:!0});/*!
47
+ * is-plain-object <https://github.com/jonschlinkert/is-plain-object>
48
+ *
49
+ * Copyright (c) 2014-2017, Jon Schlinkert.
50
+ * Released under the MIT License.
51
+ */function Wt(s){return Object.prototype.toString.call(s)==="[object Object]"}function _n(s){var e,t;return Wt(s)===!1?!1:(e=s.constructor,e===void 0?!0:(t=e.prototype,!(Wt(t)===!1||t.hasOwnProperty("isPrototypeOf")===!1)))}Ct.isPlainObject=_n;var Tn=function(e){return In(e)&&!zn(e)};function In(s){return!!s&&typeof s=="object"}function zn(s){var e=Object.prototype.toString.call(s);return e==="[object RegExp]"||e==="[object Date]"||Ln(s)}var Pn=typeof Symbol=="function"&&Symbol.for,Mn=Pn?Symbol.for("react.element"):60103;function Ln(s){return s.$$typeof===Mn}function Un(s){return Array.isArray(s)?[]:{}}function xe(s,e){return e.clone!==!1&&e.isMergeableObject(s)?ue(Un(s),s,e):s}function Bn(s,e,t){return s.concat(e).map(function(r){return xe(r,t)})}function jn(s,e){if(!e.customMerge)return ue;var t=e.customMerge(s);return typeof t=="function"?t:ue}function Nn(s){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(s).filter(function(e){return Object.propertyIsEnumerable.call(s,e)}):[]}function Ht(s){return Object.keys(s).concat(Nn(s))}function Sr(s,e){try{return e in s}catch{return!1}}function Dn(s,e){return Sr(s,e)&&!(Object.hasOwnProperty.call(s,e)&&Object.propertyIsEnumerable.call(s,e))}function Fn(s,e,t){var r={};return t.isMergeableObject(s)&&Ht(s).forEach(function(n){r[n]=xe(s[n],t)}),Ht(e).forEach(function(n){Dn(s,n)||(Sr(s,n)&&t.isMergeableObject(e[n])?r[n]=jn(n,t)(s[n],e[n],t):r[n]=xe(e[n],t))}),r}function ue(s,e,t){t=t||{},t.arrayMerge=t.arrayMerge||Bn,t.isMergeableObject=t.isMergeableObject||Tn,t.cloneUnlessOtherwiseSpecified=xe;var r=Array.isArray(e),n=Array.isArray(s),i=r===n;return i?r?t.arrayMerge(s,e,t):Fn(s,e,t):xe(e,t)}ue.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(r,n){return ue(r,n,t)},{})};var Wn=ue,Hn=Wn,$r={exports:{}};(function(s){(function(e,t){s.exports?s.exports=t():e.parseSrcset=t()})(un,function(){return function(e){function t(R){return R===" "||R===" "||R===`
52
+ `||R==="\f"||R==="\r"}function r(R){var _,L=R.exec(e.substring(g));if(L)return _=L[0],g+=_.length,_}for(var n=e.length,i=/^[ \t\n\r\u000c]+/,l=/^[, \t\n\r\u000c]+/,a=/^[^ \t\n\r\u000c]+/,o=/[,]+$/,h=/^\d+$/,c=/^-?(?:[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/,p,f,u,k,y,g=0,$=[];;){if(r(l),g>=n)return $;p=r(a),f=[],p.slice(-1)===","?(p=p.replace(o,""),M()):C()}function C(){for(r(i),u="",k="in descriptor";;){if(y=e.charAt(g),k==="in descriptor")if(t(y))u&&(f.push(u),u="",k="after descriptor");else if(y===","){g+=1,u&&f.push(u),M();return}else if(y==="(")u=u+y,k="in parens";else if(y===""){u&&f.push(u),M();return}else u=u+y;else if(k==="in parens")if(y===")")u=u+y,k="in descriptor";else if(y===""){f.push(u),M();return}else u=u+y;else if(k==="after descriptor"&&!t(y))if(y===""){M();return}else k="in descriptor",g-=1;g+=1}}function M(){var R=!1,_,L,B,N,D={},W,K,te,ie,ae;for(N=0;N<f.length;N++)W=f[N],K=W[W.length-1],te=W.substring(0,W.length-1),ie=parseInt(te,10),ae=parseFloat(te),h.test(te)&&K==="w"?((_||L)&&(R=!0),ie===0?R=!0:_=ie):c.test(te)&&K==="x"?((_||L||B)&&(R=!0),ae<0?R=!0:L=ae):h.test(te)&&K==="h"?((B||L)&&(R=!0),ie===0?R=!0:B=ie):R=!0;R?console&&console.log&&console.log("Invalid srcset descriptor found in '"+e+"' at '"+W+"'."):(D.url=p,_&&(D.w=_),L&&(D.d=L),B&&(D.h=B),$.push(D))}}})})($r);var qn=$r.exports,At={exports:{}},S=String,vr=function(){return{isColorSupported:!1,reset:S,bold:S,dim:S,italic:S,underline:S,inverse:S,hidden:S,strikethrough:S,black:S,red:S,green:S,yellow:S,blue:S,magenta:S,cyan:S,white:S,gray:S,bgBlack:S,bgRed:S,bgGreen:S,bgYellow:S,bgBlue:S,bgMagenta:S,bgCyan:S,bgWhite:S,blackBright:S,redBright:S,greenBright:S,yellowBright:S,blueBright:S,magentaBright:S,cyanBright:S,whiteBright:S,bgBlackBright:S,bgRedBright:S,bgGreenBright:S,bgYellowBright:S,bgBlueBright:S,bgMagentaBright:S,bgCyanBright:S,bgWhiteBright:S}};At.exports=vr();At.exports.createColors=vr;var Zn=At.exports;let qt=Zn,Zt=V,ot=class Rr extends Error{constructor(e,t,r,n,i,l){super(e),this.name="CssSyntaxError",this.reason=e,i&&(this.file=i),n&&(this.source=n),l&&(this.plugin=l),typeof t<"u"&&typeof r<"u"&&(typeof t=="number"?(this.line=t,this.column=r):(this.line=t.line,this.column=t.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,Rr)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;e==null&&(e=qt.isColorSupported);let r=c=>c,n=c=>c,i=c=>c;if(e){let{bold:c,gray:p,red:f}=qt.createColors(!0);n=u=>c(f(u)),r=u=>p(u),Zt&&(i=u=>Zt(u))}let l=t.split(/\r?\n/),a=Math.max(this.line-3,0),o=Math.min(this.line+2,l.length),h=String(o).length;return l.slice(a,o).map((c,p)=>{let f=a+1+p,u=" "+(" "+f).slice(-h)+" | ";if(f===this.line){if(c.length>160){let y=20,g=Math.max(0,this.column-y),$=Math.max(this.column+y,this.endColumn+y),C=c.slice(g,$),M=r(u.replace(/\d/g," "))+c.slice(0,Math.min(this.column-1,y-1)).replace(/[^\t]/g," ");return n(">")+r(u)+i(C)+`
53
+ `+M+n("^")}let k=r(u.replace(/\d/g," "))+c.slice(0,this.column-1).replace(/[^\t]/g," ");return n(">")+r(u)+i(c)+`
54
+ `+k+n("^")}return" "+r(u)+i(c)}).join(`
55
+ `)}toString(){let e=this.showSourceCode();return e&&(e=`
56
+
57
+ `+e+`
58
+ `),this.name+": "+this.message+e}};var Ot=ot;ot.default=ot;const Gn=/(<)(\/?style\b)/gi,Vn=/(<)(!--)/g,Qn=/[\t\n\f\r "#'()/;[\\\]{}]/;function G(s){return typeof s!="string"||!s.includes("<")?s:s.replace(Gn,"\\3c $2").replace(Vn,"\\3c $2")}const Gt={after:`
59
+ `,beforeClose:`
60
+ `,beforeComment:`
61
+ `,beforeDecl:`
62
+ `,beforeOpen:" ",beforeRule:`
63
+ `,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function Jn(s){return s[0].toUpperCase()+s.slice(1)}function Vt(s,e){let t="@"+e.name,r=e.params?s.rawValue(e,"params"):"",n=e.raws.afterName;return typeof n>"u"?n=r?" ":"":n===""&&r&&!Qn.test(r[0])&&(n=" "),t+n+r}function Yn(s){if(!s.prop.startsWith("--"))return!1;let e=s.raws.before;return typeof e>"u"||!/\S$/.test(e)}function Cr(s,e,t){let r=t.nodes,n=r.length-1;for(;n>0&&r[n].type==="comment";)n-=1;let i=s.raw(t,"semicolon"),l=t.type==="document";for(let a=r.length-1;a>=0;a--){let o=r[a],h=n!==a||i;!h&&a<r.length-1&&(o.type==="atrule"&&!o.nodes||o.type==="decl"&&Yn(o))&&(h=!0),e.push({document:l,node:o,semicolon:h})}}function Qt(s,e,t,r){let n=s.raw(t,"between","beforeOpen");s.builder(G(r+n)+"{",t,"start");let i=t.nodes&&t.nodes.length,l=()=>{let a=i?s.raw(t,"after"):s.raw(t,"after","emptyBody");a&&s.builder(G(a)),s.builder("}",t,"end"),t.type==="rule"&&t.raws.ownSemicolon&&s.builder(G(t.raws.ownSemicolon),t,"end")};i?(e.push(l),Cr(s,e,t)):l()}let at=class Ar{constructor(e){this.builder=e}atrule(e,t){let r=Vt(this,e);if(e.nodes)this.block(e,r);else{let n=(e.raws.between||"")+(t?";":"");this.builder(G(r+n),e)}}beforeAfter(e,t){let r;e.type==="decl"?r=this.raw(e,null,"beforeDecl"):e.type==="comment"?r=this.raw(e,null,"beforeComment"):t==="before"?r=this.raw(e,null,"beforeRule"):r=this.raw(e,null,"beforeClose");let n=e.parent,i=0;for(;n&&n.type!=="root";)i+=1,n=n.parent;if(r.includes(`
64
+ `)){let l=this.raw(e,null,"indent");if(l.length)for(let a=0;a<i;a++)r+=l}return r}block(e,t){let r=this.raw(e,"between","beforeOpen");this.builder(G(t+r)+"{",e,"start");let n;e.nodes&&e.nodes.length?(this.body(e),n=this.raw(e,"after")):n=this.raw(e,"after","emptyBody"),n&&this.builder(G(n)),this.builder("}",e,"end")}body(e){let t=Ar.prototype,r=["atrule","block","body","rule","stringify"].every(i=>this[i]===t[i]),n=[];for(Cr(this,n,e);n.length>0;){let i=n.pop();if(typeof i=="function"){i();continue}let l=i.node,a=this.raw(l,"before");a&&this.builder(i.document?a:G(a)),r&&l.type==="rule"?Qt(this,n,l,this.rawValue(l,"selector")):r&&l.type==="atrule"&&l.nodes?Qt(this,n,l,Vt(this,l)):this.stringify(l,i.semicolon)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder(G("/*"+t+e.text+r+"*/"),e)}decl(e,t){let r=e.raws,n=this.raw(e,"between","colon"),i=e.prop+n+this.rawValue(e,"value");e.important&&(i+=r.important||" !important"),t&&(i+=";"),this.builder(G(i),e)}document(e){this.body(e)}raw(e,t,r){let n;if(r||(r=t),t&&(n=e.raws[t],typeof n<"u"))return n;let i=e.parent;if(r==="before"&&(!i||i.type==="root"&&i.first===e||i&&i.type==="document"))return"";if(!i)return Gt[r];let l=e.root(),a=l.rawCache||(l.rawCache={});if(typeof a[r]<"u")return a[r];if(r==="before"||r==="after")return this.beforeAfter(e,r);{let o="raw"+Jn(r);this[o]?n=this[o](l,e):l.walk(h=>{if(n=h.raws[t],typeof n<"u")return!1})}return typeof n>"u"&&(n=Gt[r]),a[r]=n,n}rawBeforeClose(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length>0&&typeof r.raws.after<"u")return t=r.raws.after,t.includes(`
65
+ `)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let r;return e.walkComments(n=>{if(typeof n.raws.before<"u")return r=n.raws.before,r.includes(`
66
+ `)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(t,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,t){let r;return e.walkDecls(n=>{if(typeof n.raws.before<"u")return r=n.raws.before,r.includes(`
67
+ `)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(t,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(e){let t;return e.walk(r=>{if(r.type!=="decl"&&(t=r.raws.between,typeof t<"u"))return!1}),t}rawBeforeRule(e){let t;return e.walk(r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&typeof r.raws.before<"u")return t=r.raws.before,t.includes(`
68
+ `)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(r=>{if(typeof r.raws.between<"u")return t=r.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length===0&&(t=r.raws.after,typeof t<"u"))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(r=>{let n=r.parent;if(n&&n!==e&&n.parent&&n.parent===e&&typeof r.raws.before<"u"){let i=r.raws.before.split(`
69
+ `);return t=i[i.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length&&r.last.type==="decl"&&(t=r.raws.semicolon,typeof t<"u"))return!1}),t}rawValue(e,t){let r=e[t],n=e.raws[t];return n&&n.value===r?n.raw:r}root(e){if(e.source&&e.source.input.hasBOM&&this.builder("\uFEFF",e,"start"),this.body(e),e.raws.after){let t=e.raws.after,r=e.parent&&e.parent.type==="document";this.builder(r?t:G(t))}}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(G(e.raws.ownSemicolon),e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};var Or=at;at.default=at;let Kn=Or;function ut(s,e){new Kn(e).stringify(s)}var Qe=ut;ut.default=ut;var pe={};pe.isClean=Symbol("isClean");pe.my=Symbol("my");let Xn=Ot,ei=Or,ti=Qe,{isClean:de,my:ri}=pe;function ni(s,e){let t=new s.constructor,r=[[s,t,e]];for(;r.length>0;){let[n,i,l]=r.pop();for(let a in n){if(!Object.prototype.hasOwnProperty.call(n,a)||a==="proxyCache")continue;let o=n[a],h=typeof o;if(a==="parent"&&h==="object")l&&(i[a]=l);else if(a==="source")i[a]=o;else if(Array.isArray(o)){let c=[];i[a]=c;for(let p of o){let f=new p.constructor;c.push(f),r.push([p,f,i])}}else{if(h==="object"&&o!==null){let c=new o.constructor;r.push([o,c,void 0]),o=c}i[a]=o}}}return t}function Q(s,e){if(e&&typeof e.offset<"u")return e.offset;let t=1,r=1,n=0;for(let i=0;i<s.length;i++){if(r===e.line&&t===e.column){n=i;break}s[i]===`
70
+ `?(t=1,r+=1):t+=1}return n}let ct=class ht{get proxyOf(){return this}constructor(e={}){this.raws={},this[de]=!1,this[ri]=!0;for(let t of Object.keys(e))if(t!=="__proto__")if(t==="nodes"){this.nodes=[];for(let r of e[t])typeof r.clone=="function"&&r.parent?this.append(r.clone()):this.append(r)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=ni(this);for(let r in e)t[r]=e[r];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:r,start:n}=this.rangeBy(t);return this.source.input.error(e,{column:n.column,line:n.line},{column:r.column,line:r.line},t)}return new Xn(e)}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:t==="root"?()=>e.root().toProxy():e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="prop"||t==="value"||t==="name"||t==="params"||t==="important"||t==="text")&&e.markDirty()),!0}}}markClean(){this[de]=!0}markDirty(){if(this[de]){this[de]=!1;let e=this;for(;e=e.parent;)e[de]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e={}){let t="document"in this.source.input?this.source.input.document:this.source.input.css,r={column:this.source.start.column,line:this.source.start.line,offset:Q(t,this.source.start)};if(e.index)r=this.positionInside(e.index);else if(e.word){let i=t.slice(Q(t,this.source.start),Q(t,this.source.end)).indexOf(e.word);i!==-1&&(r=this.positionInside(i))}return r}positionInside(e){let t=this.source.start.column,r=this.source.start.line,n="document"in this.source.input?this.source.input.document:this.source.input.css,i=Q(n,this.source.start),l=i+e;for(let a=i;a<l;a++)n[a]===`
71
+ `?(t=1,r+=1):t+=1;return{column:t,line:r,offset:l}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e={}){let t="document"in this.source.input?this.source.input.document:this.source.input.css,r={column:this.source.start.column,line:this.source.start.line,offset:Q(t,this.source.start)},n=this.source.end?{column:this.source.end.column+1,line:this.source.end.line,offset:typeof this.source.end.offset=="number"?this.source.end.offset:Q(t,this.source.end)+1}:{column:r.column+1,line:r.line,offset:r.offset+1};if(e.word){let l=t.slice(Q(t,this.source.start),Q(t,this.source.end)).indexOf(e.word);l!==-1&&(r=this.positionInside(l),n=this.positionInside(l+e.word.length))}else e.start?r={column:e.start.column,line:e.start.line,offset:Q(t,e.start)}:typeof e.index=="number"&&(r=this.positionInside(e.index)),e.end?n={column:e.end.column,line:e.end.line,offset:Q(t,e.end)}:typeof e.endIndex=="number"?n=this.positionInside(e.endIndex):typeof e.index=="number"&&(n=this.positionInside(e.index+1));return(n.line<r.line||n.line===r.line&&n.column<=r.column)&&(n={column:r.column+1,line:r.line,offset:r.offset+1}),{end:n,start:r}}raw(e,t){return new ei().raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,r=!1;for(let n of e)n===this?r=!0:r?(this.parent.insertAfter(t,n),t=n):this.parent.insertBefore(t,n);r||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,t){let r=t==null;t=t||new Map;let n=[],i=[[this,n,0]];for(let a=0;a<i.length;a++){let[o,h,c]=i[a],p={};h[c]=p;for(let f in o){if(!Object.prototype.hasOwnProperty.call(o,f)||f==="parent"||f==="proxyCache")continue;let u=o[f];if(Array.isArray(u)){let k=[];p[f]=k;for(let y=0;y<u.length;y++){let g=u[y];typeof g=="object"&&g.toJSON?g.toJSON===ht.prototype.toJSON?i.push([g,k,y]):k[y]=g.toJSON(null,t):k[y]=g}}else if(typeof u=="object"&&u.toJSON)u.toJSON===ht.prototype.toJSON?i.push([u,p,f]):p[f]=u.toJSON(null,t);else if(f==="source"){if(u==null)continue;let k=t.get(u.input);k==null&&(k=t.size,t.set(u.input,k)),p[f]={end:u.end,inputId:k,start:u.start}}else p[f]=u}}let l=n[0];return r&&(l.inputs=[...t.keys()].map(a=>a.toJSON())),l}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=ti){e.stringify&&(e=e.stringify);let t="";return e(this,r=>{t+=r}),t}warn(e,t,r={}){let n={node:this};for(let i in r)n[i]=r[i];return e.warn(t,n)}};var Je=ct;ct.default=ct;let ii=Je,ft=class extends ii{constructor(e){super(e),this.type="comment"}};var Ye=ft;ft.default=ft;let si=Je,pt=class extends si{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(e){e&&typeof e.value<"u"&&typeof e.value!="string"&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}};var Ke=pt;pt.default=pt;let Er=Ye,_r=Ke,Jt=Je,{isClean:Tr,my:Ir}=pe,Et,zr,Pr,_t;function li(s){let e=s.slice();for(;e.length>0;){let t=e.pop();if(delete t.source,t.nodes){t.nodes=t.nodes.slice();for(let r of t.nodes)e.push(r)}}return s.slice()}function oi(s){let e=[s];for(;e.length>0;){let t=e.pop();if(t[Tr]=!1,t.proxyOf.nodes)for(let r of t.proxyOf.nodes)e.push(r)}}let re=class dt extends Jt{get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}append(...e){for(let t of e){let r=this.normalize(t,this.last);for(let n of r)this.proxyOf.nodes.push(n)}return this.markDirty(),this}cleanRaws(e){let t=[this];for(;t.length>0;){let r=t.pop();if(r!==this&&r.cleanRaws!==dt.prototype.cleanRaws){r.cleanRaws(e);continue}if(Jt.prototype.cleanRaws.call(r,e),r.nodes)for(let n of r.nodes)t.push(n)}}each(e){if(!this.proxyOf.nodes)return;let t=this.getIterator(),r,n;for(;this.indexes[t]<this.proxyOf.nodes.length&&(r=this.indexes[t],n=e(this.proxyOf.nodes[r],r),n!==!1);)this.indexes[t]+=1;return delete this.indexes[t],n}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:e[t]?t==="each"||typeof t=="string"&&t.startsWith("walk")?(...r)=>e[t](...r.map(n=>typeof n=="function"?(i,l)=>n(i.toProxy(),l):n)):t==="every"||t==="some"?r=>e[t]((n,...i)=>r(n.toProxy(),...i)):t==="root"?()=>e.root().toProxy():t==="nodes"?e.nodes.map(r=>r.toProxy()):t==="first"||t==="last"?e[t].toProxy():e[t]:e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="name"||t==="params"||t==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r=this.index(e),n=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let l of n)this.proxyOf.nodes.splice(r+1,0,l);let i;for(let l in this.indexes)i=this.indexes[l],r<i&&(this.indexes[l]=i+n.length);return this.markDirty(),this}insertBefore(e,t){let r=this.index(e),n=r===0?"prepend":!1,i=this.normalize(t,this.proxyOf.nodes[r],n).reverse();r=this.index(e);for(let a of i)this.proxyOf.nodes.splice(r,0,a);let l;for(let a in this.indexes)l=this.indexes[a],r<=l&&(this.indexes[a]=l+i.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=li(zr(e).nodes);else if(typeof e>"u")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let n of e)n.parent&&n.parent.removeChild(n,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let n of e)n.parent&&n.parent.removeChild(n,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value>"u")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new _r(e)]}else if(e.selector||e.selectors)e=[new _t(e)];else if(e.name)e=[new Et(e)];else if(e.text)e=[new Er(e)];else throw new Error("Unknown node type in node creation");return e.map(n=>(n[Ir]||dt.rebuild(n),n=n.proxyOf,n.parent&&n.parent.removeChild(n),n[Tr]&&oi(n),n.raws||(n.raws={}),typeof n.raws.before>"u"&&t&&typeof t.raws.before<"u"&&(n.raws.before=t.raws.before.replace(/\S/g,"")),n.parent=this.proxyOf,n))}prepend(...e){e=e.reverse();for(let t of e){let r=this.normalize(t,this.first,"prepend").reverse();for(let n of r)this.proxyOf.nodes.unshift(n);for(let n in this.indexes)this.indexes[n]=this.indexes[n]+r.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let t;for(let r in this.indexes)t=this.indexes[r],t>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls(n=>{t.props&&!t.props.includes(n.prop)||t.fast&&!n.value.includes(t.fast)||(n.value=n.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){if(!this.proxyOf.nodes)return;let t=[{iterator:this.getIterator(),node:this.proxyOf}];for(;t.length>0;){let{iterator:r,node:n}=t[t.length-1],i=n.indexes[r];if(i>=n.proxyOf.nodes.length){delete n.indexes[r],t.pop();let o=t[t.length-1];o&&(o.node.indexes[o.iterator]+=1);continue}let l=n.proxyOf.nodes[i],a;try{a=e(l,i)}catch(o){throw l.addToError(o)}if(a===!1){for(let o of t)delete o.node.indexes[o.iterator];return!1}l.walk&&l.proxyOf.nodes?t.push({iterator:l.getIterator(),node:l}):n.indexes[r]+=1}}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,n)=>{if(r.type==="atrule"&&e.test(r.name))return t(r,n)}):this.walk((r,n)=>{if(r.type==="atrule"&&r.name===e)return t(r,n)}):(t=e,this.walk((r,n)=>{if(r.type==="atrule")return t(r,n)}))}walkComments(e){return this.walk((t,r)=>{if(t.type==="comment")return e(t,r)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((r,n)=>{if(r.type==="decl"&&e.test(r.prop))return t(r,n)}):this.walk((r,n)=>{if(r.type==="decl"&&r.prop===e)return t(r,n)}):(t=e,this.walk((r,n)=>{if(r.type==="decl")return t(r,n)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,n)=>{if(r.type==="rule"&&e.test(r.selector))return t(r,n)}):this.walk((r,n)=>{if(r.type==="rule"&&r.selector===e)return t(r,n)}):(t=e,this.walk((r,n)=>{if(r.type==="rule")return t(r,n)}))}};re.registerParse=s=>{zr=s};re.registerRule=s=>{_t=s};re.registerAtRule=s=>{Et=s};re.registerRoot=s=>{Pr=s};var ne=re;re.default=re;re.rebuild=s=>{let e=[s];for(;e.length>0;){let t=e.pop();if(t.type==="atrule"?Object.setPrototypeOf(t,Et.prototype):t.type==="rule"?Object.setPrototypeOf(t,_t.prototype):t.type==="decl"?Object.setPrototypeOf(t,_r.prototype):t.type==="comment"?Object.setPrototypeOf(t,Er.prototype):t.type==="root"&&Object.setPrototypeOf(t,Pr.prototype),t[Ir]=!0,t.nodes)for(let r of t.nodes)e.push(r)}};let Mr=ne,We=class extends Mr{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};var Tt=We;We.default=We;Mr.registerAtRule(We);let ai=ne,Lr,Ur,be=class extends ai{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new Lr(new Ur,this,e).stringify()}};be.registerLazyResult=s=>{Lr=s};be.registerProcessor=s=>{Ur=s};var It=be;be.default=be;let ui="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",ci=(s,e=21)=>(t=e)=>{let r="",n=t|0;for(;n-- >0;)r+=s[Math.random()*s.length|0];return r},hi=(s=21)=>{let e="",t=s|0;for(;t-- >0;)e+=ui[Math.random()*64|0];return e};var fi={nanoid:hi,customAlphabet:ci};let{existsSync:pi,readFileSync:di,realpathSync:gi}=V,{dirname:Oe,isAbsolute:mi,join:wi,relative:yi,sep:xi}=V,{SourceMapConsumer:Yt,SourceMapGenerator:Kt}=V;function Xt(s){try{return gi(s)}catch{return s}}function bi(s){return Buffer?Buffer.from(s,"base64").toString():window.atob(s)}let gt=class{constructor(e,t){if(t.map===!1)return;t.unsafeMap&&(this.unsafeMap=!0),this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,n=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=Oe(this.mapFile)),n&&(this.text=n)}consumer(){return this.consumerCache||(this.consumerCache=new Yt(this.json||this.text)),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,r=/^data:application\/json;base64,/,n=/^data:application\/json;charset=utf-?8,/,i=/^data:application\/json,/,l=e.match(n)||e.match(i);if(l)return decodeURIComponent(e.substr(l[0].length));let a=e.match(t)||e.match(r);if(a)return bi(e.substr(a[0].length));let o=e.slice(22);throw o=o.slice(0,o.indexOf(",")),new Error("Unsupported source map encoding "+o)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return typeof e!="object"?!1:typeof e.mappings=="string"||typeof e._mappings=="string"||Array.isArray(e.sections)}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/g);if(!t)return;let r=e.lastIndexOf(t.pop()),n=e.indexOf("*/",r);r>-1&&n>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,n)))}loadFile(e,t,r){if(!r&&!this.unsafeMap){if(!/\.map$/i.test(e)||!t)return;let n=yi(Xt(Oe(t)),Xt(e));if(n===".."||n.startsWith(".."+xi)||mi(n))return}if(this.root=Oe(e),pi(e))return this.mapFile=e,di(e,"utf-8").toString().trim()}loadMap(e,t){if(t===!1)return!1;if(t){if(typeof t=="string")return t;if(typeof t=="function"){let r=t(e);if(r){let n=this.loadFile(r,e,!0);if(!n)throw new Error("Unable to load previous source map: "+r.toString());return n}}else{if(t instanceof Yt)return Kt.fromSourceMap(t).toString();if(t instanceof Kt)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let r=this.annotation;e&&(r=wi(Oe(e),r));let n=this.loadFile(r,e,!1);if(n)try{this.json=JSON.parse(n.replace(/^\)]}'[^\n]*\n/,""))}catch{return}return n}}}startWith(e,t){return e?e.substr(0,t.length)===t:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var Br=gt;gt.default=gt;let{nanoid:ki}=fi,{isAbsolute:mt,resolve:wt}=V,{SourceMapConsumer:Si,SourceMapGenerator:$i}=V,{fileURLToPath:er,pathToFileURL:Ee}=V,tr=Ot,vi=Br,rt=V,nt=Symbol("lineToIndexCache"),Ri=!!(Si&&$i),rr=!!(wt&&mt);function nr(s){if(s[nt])return s[nt];let e=s.css.split(`
72
+ `),t=new Array(e.length),r=0;for(let n=0,i=e.length;n<i;n++)t[n]=r,r+=e[n].length+1;return s[nt]=t,t}let He=class{get from(){return this.file||this.id}constructor(e,t={}){if(e===null||typeof e>"u"||typeof e=="object"&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]==="\uFEFF"||this.css[0]==="￾"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,t.document&&(this.document=t.document.toString()),t.from&&(!rr||/^\w+:\/\//.test(t.from)||mt(t.from)?this.file=t.from:this.file=wt(t.from)),rr&&Ri){let r=new vi(this.css,t);if(r.text){this.map=r;let n=r.consumer().file;!this.file&&n&&(this.file=this.mapResolve(n))}}this.file||(this.id="<input css "+ki(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,n={}){let i,l,a,o,h;if(t&&typeof t=="object"){let p=t,f=r;if(typeof p.offset=="number"){o=p.offset;let u=this.fromOffset(o);t=u.line,r=u.col}else t=p.line,r=p.column,o=this.fromLineAndColumn(t,r);if(typeof f.offset=="number"){a=f.offset;let u=this.fromOffset(a);l=u.line,i=u.col}else l=f.line,i=f.column,a=this.fromLineAndColumn(f.line,f.column)}else if(r)o=this.fromLineAndColumn(t,r);else{o=t;let p=this.fromOffset(o);t=p.line,r=p.col}let c=this.origin(t,r,l,i);return c?h=new tr(e,c.endLine===void 0?c.line:{column:c.column,line:c.line},c.endLine===void 0?c.column:{column:c.endColumn,line:c.endLine},c.source,c.file,n.plugin):h=new tr(e,l===void 0?t:{column:r,line:t},l===void 0?r:{column:i,line:l},this.css,this.file,n.plugin),h.input={column:r,endColumn:i,endLine:l,endOffset:a,line:t,offset:o,source:this.css},this.file&&(Ee&&(h.input.url=Ee(this.file).toString()),h.input.file=this.file),h}fromLineAndColumn(e,t){return nr(this)[e-1]+t-1}fromOffset(e){let t=nr(this),r=t[t.length-1],n=0;if(e>=r)n=t.length-1;else{let i=t.length-2,l;for(;n<i;)if(l=n+(i-n>>1),e<t[l])i=l-1;else if(e>=t[l+1])n=l+1;else{n=l;break}}return{col:e-t[n]+1,line:n+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:wt(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,n){if(!this.map)return!1;let i=this.map.consumer(),l=i.originalPositionFor({column:t-1,line:e});if(!l.source)return!1;let a;if(typeof r=="number"){let p=i.originalPositionFor({column:n-1,line:r});p.source&&(a=p)}let o;mt(l.source)?o=Ee(l.source):o=new URL(l.source,this.map.consumer().sourceRoot||Ee(this.map.mapFile));let h={column:l.column+1,endColumn:a&&a.column+1,endLine:a&&a.line,line:l.line,url:o.toString()};if(o.protocol==="file:")if(er)h.file=er(o);else throw new Error("file: protocol is not available in this PostCSS build");let c=i.sourceContentFor(l.source);return c&&(h.source=c),h}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])this[t]!=null&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}};var Xe=He;He.default=He;rt&&rt.registerInput&&rt.registerInput(He);let jr=ne,Nr,Dr,ce=class extends jr{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let n=new Set;for(let l of Array.isArray(e)?e:[e])l&&typeof l=="object"&&!l.parent&&l.raws&&typeof l.raws.before<"u"&&n.add(l.raws);let i=super.normalize(e);if(t){if(r==="prepend")this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let l of i)n.has(l.raws)||(l.raws.before=t.raws.before)}return i}removeChild(e,t){let r=this.index(e);return!t&&r===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new Nr(new Dr,this,e).stringify()}};ce.registerLazyResult=s=>{Nr=s};ce.registerProcessor=s=>{Dr=s};var Re=ce;ce.default=ce;jr.registerRoot(ce);let ke={comma(s){return ke.split(s,[","],!0)},space(s){let e=[" ",`
73
+ `," "];return ke.split(s,e)},split(s,e,t){if(typeof s!="string")return[];let r=[],n="",i=!1,l=0,a=!1,o="",h=!1;for(let p of s)if(h?h=!1:p==="\\"?h=!0:a?p===o&&(a=!1):p==='"'||p==="'"?(a=!0,o=p):p==="("?l+=1:p===")"?l>0&&(l-=1):l===0&&e.includes(p)&&(i=!0),i){let f=n.trim();(t||f!=="")&&r.push(f),n="",i=!1}else n+=p;let c=n.trim();return(t||c!=="")&&r.push(c),r}};var Fr=ke;ke.default=ke;let Wr=ne,Ci=Fr,qe=class extends Wr{get selectors(){return Ci.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}};var zt=qe;qe.default=qe;Wr.registerRule(qe);let Ai=Tt,Oi=Ye,Ei=Ke,_i=Xe,Ti=Br,Ii=Re,zi=zt;function ir(s,e){return s.inputs?s.inputs.map(t=>{let r={...t,__proto__:_i.prototype};return r.map&&(r.map={...r.map,__proto__:Ti.prototype}),r}):e}function Pi(s,e,t){let r={...s};if(delete r.inputs,delete r.nodes,r.source){let{inputId:i,...l}=r.source;r.source=l,i!=null&&(r.source.input=e[i])}let n;if(r.type==="root")n=new Ii(r);else if(r.type==="decl")n=new Ei(r);else if(r.type==="rule")n=new zi(r);else if(r.type==="comment")n=new Oi(r);else if(r.type==="atrule")n=new Ai(r);else throw new Error("Unknown node type: "+s.type);if(t){n.nodes=t;for(let i of t)i.parent=n}return n}function Ze(s,e){if(Array.isArray(s))return s.map(n=>Ze(n));let t,r=[{childIndex:0,children:[],inputs:ir(s,e),json:s}];for(;r.length>0;){let n=r[r.length-1],i=n.json.nodes;if(i&&n.childIndex<i.length){let a=i[n.childIndex];n.childIndex+=1,r.push({childIndex:0,children:[],inputs:ir(a,n.inputs),json:a});continue}r.pop();let l=Pi(n.json,n.inputs,i?n.children:void 0);r.length>0?r[r.length-1].children.push(l):t=l}return t}var Mi=Ze;Ze.default=Ze;let{dirname:Be,relative:Hr,resolve:qr,sep:Zr}=V,{SourceMapConsumer:Gr,SourceMapGenerator:je}=V,{pathToFileURL:sr}=V,Li=Xe,Ui=!!(Gr&&je),Bi=!!(Be&&qr&&Hr&&Zr),ji=class{constructor(e,t,r,n){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=n,this.originalCSS=n,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;this.isInline()?e="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?e=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?e=this.mapOpts.annotation(this.opts.to,this.root):e=this.outputFile()+".map";let t=`
74
+ `;this.css.includes(`\r
75
+ `)&&(t=`\r
76
+ `),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),r=e.root||Be(e.file),n;this.mapOpts.sourcesContent===!1?(n=new Gr(e.text),n.sourcesContent&&(n.sourcesContent=null)):n=e.consumer(),this.map.applySourceMap(n,t,this.toUrl(this.path(r)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1){if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],e.type==="comment"&&e.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(t)}else if(this.css){let e="/*# sourceMappingURL=",t;for(;(t=this.css.lastIndexOf(e))!==-1;){let r=this.css.indexOf("*/",t+e.length);if(r===-1)break;for(;t>0&&this.css[t-1]===`
77
+ `;)t--;this.css=this.css.slice(0,t)+this.css.slice(r+2)}}}}generate(){if(this.clearAnnotation(),Bi&&Ui&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=je.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new je({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new je({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,t=1,r="<no source>",n={generated:{column:0,line:0},original:{column:0,line:0},source:""},i,l;this.stringify(this.root,(a,o,h)=>{if(this.css+=a,o&&h!=="end"&&(n.generated.line=e,n.generated.column=t-1,o.source&&o.source.start?(n.source=this.sourcePath(o),n.original.line=o.source.start.line,n.original.column=o.source.start.column-1,this.map.addMapping(n)):(n.source=r,n.original.line=1,n.original.column=0,this.map.addMapping(n))),l=a.match(/\n/g),l?(e+=l.length,i=a.lastIndexOf(`
78
+ `),t=a.length-i):t+=a.length,o&&h!=="start"){let c=o.parent||{raws:{}};(!(o.type==="decl"||o.type==="atrule"&&!o.nodes)||o!==c.last||c.raws.semicolon)&&(o.source&&o.source.end?(n.source=this.sourcePath(o),n.original.line=o.source.end.line,n.original.column=o.source.end.column-1,n.generated.line=e,n.generated.column=t-2,this.map.addMapping(n)):(n.source=r,n.original.line=1,n.original.column=0,n.generated.line=e,n.generated.column=t-1,this.map.addMapping(n)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e<"u"&&e!==!0?!1:this.previous().length?this.previous().some(t=>t.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(e=>e.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let r=this.opts.to?Be(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=Be(qr(r,this.mapOpts.annotation)));let n=Hr(r,e);return this.memoizedPaths.set(e,n),n}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new Li(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let n=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(n,t.source.input.css)}}});else if(this.css){let t=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(t,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(sr){let r=sr(e).toString();return this.memoizedFileURLs.set(e,r),r}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;Zr==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};var Vr=ji;const it="'".charCodeAt(0),lr='"'.charCodeAt(0),_e="\\".charCodeAt(0),or="/".charCodeAt(0),Te=`
79
+ `.charCodeAt(0),ge=" ".charCodeAt(0),Ie="\f".charCodeAt(0),ze=" ".charCodeAt(0),Pe="\r".charCodeAt(0),Ni="[".charCodeAt(0),Di="]".charCodeAt(0),Fi="(".charCodeAt(0),Wi=")".charCodeAt(0),Hi="{".charCodeAt(0),qi="}".charCodeAt(0),Zi=";".charCodeAt(0),Gi="*".charCodeAt(0),Vi=":".charCodeAt(0),Qi="@".charCodeAt(0),Me=/[\t\n\f\r "#'()/;[\\\]{}]/g,Le=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Ji=/.[\r\n"'(/\\]/,ar=/[\da-f]/i;var Yi=function(e,t={}){let r=e.css.valueOf(),n=t.ignoreErrors,i,l,a,o,h,c,p,f,u,k,y=r.length,g=0,$=[],C=[],M=-1;function R(){return g}function _(D){throw e.error("Unclosed "+D,g)}function L(){return C.length===0&&g>=y}function B(D){if(C.length)return C.pop();if(g>=y)return;let W=D?D.ignoreUnclosed:!1;switch(i=r.charCodeAt(g),i){case Te:case ge:case ze:case Pe:case Ie:{o=g;do o+=1,i=r.charCodeAt(o);while(i===ge||i===Te||i===ze||i===Pe||i===Ie);c=["space",r.slice(g,o)],g=o-1;break}case Ni:case Di:case Hi:case qi:case Vi:case Zi:case Wi:{let K=String.fromCharCode(i);c=[K,K,g];break}case Fi:{if(k=$.length?$.pop()[1]:"",u=r.charCodeAt(g+1),k==="url"&&u!==it&&u!==lr&&u!==ge&&u!==Te&&u!==ze&&u!==Ie&&u!==Pe){o=g;do{if(p=!1,o=r.indexOf(")",o+1),o===-1)if(n||W){o=g;break}else _("bracket");for(f=o;r.charCodeAt(f-1)===_e;)f-=1,p=!p}while(p);c=["brackets",r.slice(g,o+1),g,o],g=o}else g<=M?c=["(","(",g]:(o=r.indexOf(")",g+1),l=r.slice(g,o+1),o===-1||Ji.test(l)?(M=o===-1?y:o,c=["(","(",g]):(c=["brackets",l,g,o],g=o));break}case it:case lr:{h=i===it?"'":'"',o=g;do{if(p=!1,o=r.indexOf(h,o+1),o===-1)if(n||W){o=g+1;break}else _("string");for(f=o;r.charCodeAt(f-1)===_e;)f-=1,p=!p}while(p);c=["string",r.slice(g,o+1),g,o],g=o;break}case Qi:{Me.lastIndex=g+1,Me.test(r),Me.lastIndex===0?o=r.length-1:o=Me.lastIndex-2,c=["at-word",r.slice(g,o+1),g,o],g=o;break}case _e:{for(o=g,a=!0;r.charCodeAt(o+1)===_e;)o+=1,a=!a;if(i=r.charCodeAt(o+1),a&&i!==or&&i!==ge&&i!==Te&&i!==ze&&i!==Pe&&i!==Ie&&(o+=1,ar.test(r.charAt(o)))){for(;ar.test(r.charAt(o+1));)o+=1;r.charCodeAt(o+1)===ge&&(o+=1)}c=["word",r.slice(g,o+1),g,o],g=o;break}default:{i===or&&r.charCodeAt(g+1)===Gi?(o=r.indexOf("*/",g+2)+1,o===0&&(n||W?o=r.length:_("comment")),c=["comment",r.slice(g,o+1),g,o],g=o):(Le.lastIndex=g+1,Le.test(r),Le.lastIndex===0?o=r.length-1:o=Le.lastIndex-2,c=["word",r.slice(g,o+1),g,o],$.push(c),g=o);break}}return g++,c}function N(D){C.push(D)}return{back:N,endOfFile:L,nextToken:B,position:R}};let Ki=Tt,Xi=Ye,es=Ke,ts=Re,ur=zt,rs=Yi;const cr={empty:!0,space:!0};function ns(s){for(let e=s.length-1;e>=0;e--){let t=s[e],r=t[3]||t[2];if(r)return r}}function st(s,e,t){let r="";for(let n=e;n<t;n++)r+=s[n][1];return r}let is=class{constructor(e){this.input=e,this.root=new ts,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t=new Ki;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let r,n,i,l=!1,a=!1,o=[],h=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),r=e[0],r==="("||r==="["?h.push(r==="("?")":"]"):r==="{"&&h.length>0?h.push("}"):r===h[h.length-1]&&h.pop(),h.length===0)if(r===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){a=!0;break}else if(r==="}"){if(o.length>0){for(i=o.length-1,n=o[i];n&&n[0]==="space";)n=o[--i];n&&(t.source.end=this.getPosition(n[3]||n[2]),t.source.end.offset++)}this.end(e);break}else o.push(e);else o.push(e);if(this.tokenizer.endOfFile()){l=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(o),o.length?(t.raws.afterName=this.spacesAndCommentsFromStart(o),this.raw(t,"params",o),l&&(e=o[o.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between="")):(t.raws.afterName="",t.params=""),a&&(t.nodes=[],this.current=t)}checkMissedSemicolon(e){let t=this.colon(e);if(t===!1)return;let r=0,n;for(let i=t-1;i>=0&&(n=e[i],!(n[0]!=="space"&&(r+=1,r===2)));i--);throw this.input.error("Missed semicolon",n[0]==="word"?n[3]+1:n[2])}colon(e){let t=0,r,n,i;for(let[l,a]of e.entries()){if(n=a,i=n[0],i==="("&&(t+=1),i===")"&&(t-=1),t===0&&i===":")if(!r)this.doubleColon(n);else{if(r[0]==="word"&&r[1]==="progid")continue;return l}r=n}return!1}comment(e){let t=new Xi;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let r=e[1].slice(2,-2);if(!r.trim())t.text="",t.raws.left=r,t.raws.right="";else{let n=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=n[2],t.raws.left=n[1],t.raws.right=n[3]}}createTokenizer(){this.tokenizer=rs(this.input)}decl(e,t){let r=new es;this.init(r,e[0][2]);let n=e[e.length-1];n[0]===";"&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(n[3]||n[2]||ns(e)),r.source.end.offset++;let i=0;for(;e[i][0]!=="word";)i===e.length-1&&this.unknownWord([e[i]]),i++;r.raws.before+=st(e,0,i),r.source.start=this.getPosition(e[i][2]);let l=i;for(;i<e.length;){let f=e[i][0];if(f===":"||f==="space"||f==="comment")break;i++}r.prop=st(e,l,i);let a=i,o;for(;i<e.length&&(o=e[i],i++,o[0]!==":");)o[0]==="word"&&/\w/.test(o[1])&&this.unknownWord([o]);r.raws.between=st(e,a,i),(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let h=i;for(;i<e.length;){let f=e[i][0];if(f!=="space"&&f!=="comment")break;i++}let c=e.slice(h,i);e=e.slice(i),this.precheckMissedSemicolon(e);for(let f=e.length-1;f>=0;f--){if(o=e[f],o[1].toLowerCase()==="!important"){r.important=!0;let u=this.stringFrom(e,f);u=this.spacesFromEnd(e)+u,u!==" !important"&&(r.raws.important=u);break}else if(o[1].toLowerCase()==="important"){let u=e.slice(0),k="";for(let y=f;y>0;y--){let g=u[y][0];if(k.trim().startsWith("!")&&g!=="space")break;k=u.pop()[1]+k}k.trim().startsWith("!")&&(r.important=!0,r.raws.important=k,e=u)}if(o[0]!=="space"&&o[0]!=="comment")break}e.some(f=>f[0]!=="space"&&f[0]!=="comment")&&(r.raws.between+=c.map(f=>f[1]).join(""),c=[]),this.raw(r,"value",c.concat(e),t),r.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new ur;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let t=this.current.nodes[this.current.nodes.length-1];t&&t.type==="rule"&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="",t.source.end=this.getPosition(e[2]),t.source.end.offset++)}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=!1)}other(e){let t=!1,r=null,n=!1,i=null,l=[],a=e[1].startsWith("--"),o=[],h=e;for(;h;){if(r=h[0],o.push(h),r==="("||r==="[")i||(i=h),l.push(r==="("?")":"]");else if(a&&n&&r==="{")i||(i=h),l.push("}");else if(l.length===0)if(r===";")if(n){this.decl(o,a);return}else break;else if(r==="{"){this.rule(o);return}else if(r==="}"){this.tokenizer.back(o.pop()),t=!0;break}else r===":"&&(n=!0);else r===l[l.length-1]&&(l.pop(),l.length===0&&(i=null));h=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),l.length>0&&this.unclosedBracket(i),t&&n){if(!a)for(;o.length&&(h=o[o.length-1][0],!(h!=="space"&&h!=="comment"));)this.tokenizer.back(o.pop());this.decl(o,a)}else this.unknownWord(o)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,t,r,n){let i,l,a=r.length,o="",h=!0,c,p;for(let f=0;f<a;f+=1)i=r[f],l=i[0],l==="space"&&f===a-1&&!n?h=!1:l==="comment"?(p=r[f-1]?r[f-1][0]:"empty",c=r[f+1]?r[f+1][0]:"empty",!cr[p]&&!cr[c]?o.slice(-1)===","?h=!1:o+=i[1]:h=!1):o+=i[1];if(!h){let f=r.reduce((u,k)=>u+k[1],"");e.raws[t]={raw:f,value:o}}e[t]=o}rule(e){e.pop();let t=new ur;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],!(t!=="space"&&t!=="comment"));)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&(t=e[0][0],!(t!=="space"&&t!=="comment"));)r+=e.shift()[1];return r}spacesFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],t==="space");)r=e.pop()[1]+r;return r}stringFrom(e,t){let r="";for(let n=t;n<e.length;n++)r+=e[n][1];return e.splice(t,e.length-t),r}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word "+e[0][1],{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}};var ss=is;let ls=ne,os=Xe,as=ss;function Ge(s,e){let t=new os(s,e),r=new as(t);try{r.parse()}catch(n){throw n}return r.root}var Pt=Ge;Ge.default=Ge;ls.registerParse(Ge);let us=ne,{my:cs}=pe,yt=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){t.node[cs]||us.rebuild(t.node);let r=t.node.rangeBy(t);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(let r in t)this[r]=t[r]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};var Qr=yt;yt.default=yt;let hs=Qr,xt=class{get content(){return this.css}constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css="",this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let r=new hs(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}};var Mt=xt;xt.default=xt;let fs=ne,ps=It,ds=Vr,gs=Pt,hr=Mt,ms=Re,ws=Qe,{isClean:Z,my:ys}=pe;const xs={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},bs={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},ks={Once:!0,postcssPlugin:!0,prepare:!0},he=0;function me(s){return typeof s=="object"&&typeof s.then=="function"}function bt(s){let e=!1,t=xs[s.type];return s.type==="decl"?e=s.prop.toLowerCase():s.type==="atrule"&&(e=s.name.toLowerCase()),e&&s.append?[t,t+"-"+e,he,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:s.append?[t,he,t+"Exit"]:[t,t+"Exit"]}function fr(s){let e;return s.type==="document"?e=["Document",he,"DocumentExit"]:s.type==="root"?e=["Root",he,"RootExit"]:e=bt(s),{eventIndex:0,events:e,iterator:0,node:s,visitorIndex:0,visitors:[]}}function pr(s){let e=[s];for(;e.length>0;){let t=e.pop();if(t[Z]=!1,t.nodes)for(let r of t.nodes)e.push(r)}return s}let kt={},fe=class Jr{get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}constructor(e,t,r){this.stringified=!1,this.processed=!1;let n;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))n=pr(t);else if(t instanceof Jr||t instanceof hr)n=pr(t.root),t.map&&(typeof r.map>"u"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=t.map);else{let i=gs;r.syntax&&(i=r.syntax.parse),r.parser&&(i=r.parser),i.parse&&(i=i.parse);try{n=i(t,r)}catch(l){this.processed=!0,this.error=l}n&&!n[ys]&&fs.rebuild(n)}this.result=new hr(e,n,r),this.helpers={...kt,postcss:kt,result:this.result},this.plugins=this.processor.plugins.map(i=>typeof i=="object"&&i.prepare?{...i,...i.prepare(this.result)}:i)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin?(e.plugin=r.postcssPlugin,e.setMessage()):r.postcssVersion}catch(n){console&&console.error&&console.error(n)}return e}prepareVisitors(){this.listeners={};let e=(t,r,n)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([t,n])};for(let t of this.plugins)if(typeof t=="object")for(let r in t){if(!bs[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!ks[r])if(typeof t[r]=="object")for(let n in t[r])n==="*"?e(t,r,t[r][n]):e(t,r+"-"+n.toLowerCase(),t[r][n]);else typeof t[r]=="function"&&e(t,r,t[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],r=this.runOnRoot(t);if(me(r))try{await r}catch(n){throw this.handleError(n)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Z];){e[Z]=!0;let t=[fr(e)];for(;t.length>0;){let r=this.visitTick(t);if(me(r))try{await r}catch(n){let i=t[t.length-1].node;throw this.handleError(n,i)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let n=e.nodes.map(i=>r(i,this.helpers));await Promise.all(n)}else await r(e,this.helpers)}catch(n){throw this.handleError(n)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let t=this.result.root.nodes.map(r=>e.Once(r,this.helpers));return me(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=ws;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let r=this.result.root.source;if(e.map===void 0&&!(r&&r.input&&r.input.map)){let l="";return t(this.result.root,a=>{l+=a}),this.result.css=l,this.result}let i=new ds(t,this.result.root,this.result.opts).generate();return this.result.css=i[0],this.result.map=i[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){let t=this.runOnRoot(e);if(me(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Z];)e[Z]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,n]of e){this.result.lastPlugin=r;let i;try{i=n(t,this.helpers)}catch(l){throw this.handleError(l,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(me(i))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:n}=t;if(r.type!=="root"&&r.type!=="document"&&!r.parent){e.pop();return}if(n.length>0&&t.visitorIndex<n.length){let[l,a]=n[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===n.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=l;try{return a(r.toProxy(),this.helpers)}catch(o){throw this.handleError(o,r)}}if(t.iterator!==0){let l=t.iterator;t.descending&&(t.descending=!1,r.indexes[l]+=1);let a;for(;a=r.nodes[r.indexes[l]];){if(!a[Z]){a[Z]=!0,t.descending=!0,e.push(fr(a));return}r.indexes[l]+=1}t.iterator=0,delete r.indexes[l]}let i=t.events;for(;t.eventIndex<i.length;){let l=i[t.eventIndex];if(t.eventIndex+=1,l===he){r.nodes&&r.nodes.length&&(r[Z]=!0,t.iterator=r.getIterator());return}else if(this.listeners[l]){t.visitors=this.listeners[l];return}}e.pop()}walkSync(e){e[Z]=!0;let t=[{eventIndex:0,events:bt(e),iterator:0,node:e}];for(;t.length>0;){let r=t[t.length-1],n=r.node;if(r.iterator!==0){let i=r.iterator;r.descending&&(r.descending=!1,n.indexes[i]+=1);let l,a=!1;for(;l=n.nodes[n.indexes[i]];){if(!l[Z]){l[Z]=!0,r.descending=!0,t.push({eventIndex:0,events:bt(l),iterator:0,node:l}),a=!0;break}n.indexes[i]+=1}if(a)continue;r.iterator=0,delete n.indexes[i]}if(r.eventIndex<r.events.length){let i=r.events[r.eventIndex];if(r.eventIndex+=1,i===he)n.nodes&&n.nodes.length&&(r.iterator=n.getIterator());else{let l=this.listeners[i];l&&this.visitSync(l,n.toProxy())&&t.pop()}continue}t.pop()}}warnings(){return this.sync().warnings()}};fe.registerPostcss=s=>{kt=s};var Yr=fe;fe.default=fe;ms.registerLazyResult(fe);ps.registerLazyResult(fe);let Ss=Vr,$s=Pt,vs=Mt,Rs=Qe,St=class{get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=$s;try{e=t(this._css,this._opts)}catch(r){this.error=r}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(e,t,r){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let n=Rs;this.result=new vs(this._processor,void 0,this._opts),this.result.css=t;let i=this;Object.defineProperty(this.result,"root",{get(){return i.root}});let l=new Ss(n,void 0,this._opts,t);if(l.isMap()){let[a,o]=l.generate();a&&(this.result.css=a),o&&(this.result.map=o)}else l.clearAnnotation(),this.result.css=l.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}};var Cs=St;St.default=St;let As=It,Os=Yr,Es=Cs,_s=Re,Se=class{constructor(e=[]){this.version="8.5.28",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(r.postcss===!0?r=r():r.postcss&&(r=r.postcss),typeof r=="object"&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if(typeof r=="object"&&r.postcssPlugin)t.push(r);else if(typeof r=="function")t.push(r);else if(!(typeof r=="object"&&(r.parse||r.stringify)))throw new Error(r+" is not a PostCSS plugin");return t}process(e,t={}){return!this.plugins.length&&!t.parser&&!t.stringifier&&!t.syntax?new Es(this,e,t):new Os(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var Ts=Se;Se.default=Se;_s.registerProcessor(Se);As.registerProcessor(Se);let Kr=Tt,Xr=Ye,Is=ne,zs=Ot,en=Ke,tn=It,Ps=Mi,Ms=Xe,Ls=Yr,Us=Fr,Bs=Je,js=Pt,Lt=Ts,Ns=Mt,rn=Re,nn=zt,Ds=Qe,Fs=Qr;function z(...s){return s.length===1&&Array.isArray(s[0])&&(s=s[0]),new Lt(s)}z.plugin=function(e,t){let r=!1;function n(...l){console&&console.warn&&!r&&(r=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
80
+ https://evilmartians.com/chronicles/postcss-8-plugin-migration`),{}.LANG&&{}.LANG.startsWith("zh")&&console.warn(e+`: 里面 postcss.plugin 被弃用. 迁移指南:
81
+ https://www.w3ctech.com/topic/2226`));let a=t(...l);return a.postcssPlugin=e,a.postcssVersion=new Lt().version,a}let i;return Object.defineProperty(n,"postcss",{get(){return i||(i=n()),i}}),n.process=function(l,a,o){return z([n(o)]).process(l,a)},n};z.stringify=Ds;z.parse=js;z.fromJSON=Ps;z.list=Us;z.comment=s=>new Xr(s);z.atRule=s=>new Kr(s);z.decl=s=>new en(s);z.rule=s=>new nn(s);z.root=s=>new rn(s);z.document=s=>new tn(s);z.CssSyntaxError=zs;z.Declaration=en;z.Container=Is;z.Processor=Lt;z.Document=tn;z.Comment=Xr;z.Warning=Fs;z.AtRule=Kr;z.Result=Ns;z.Input=Ms;z.Rule=nn;z.Root=rn;z.Node=Bs;Ls.registerPostcss(z);var Ws=z;z.default=z;const Hs=hn,dr=En,{isPlainObject:qs}=Ct,gr=Hn,Zs=qn,{parse:Gs}=Ws,Vs=["img","audio","video","picture","svg","object","map","iframe","embed"],Qs=["script","style"];function we(s,e){s&&Object.keys(s).forEach(function(t){e(s[t],t)})}function ee(s,e){return{}.hasOwnProperty.call(s,e)}function mr(s,e){const t=[];return we(s,function(r){e(r)&&t.push(r)}),t}function Js(s){for(const e in s)if(ee(s,e))return!1;return!0}function Ys(s){return s.map(function(e){if(!e.url)throw new Error("URL missing");return e.url+(e.w?` ${e.w}w`:"")+(e.h?` ${e.h}h`:"")+(e.d?` ${e.d}x`:"")}).join(", ")}var Ks=$e;const Xs=/^[^\0\t\n\f\r /<=>]+$/;function $e(s,e,t){if(s==null)return"";typeof s=="number"&&(s=s.toString());let r="",n="";function i(d,x){const m=this;this.tag=d,this.attribs=x||{},this.tagPosition=r.length,this.text="",this.mediaChildren=[],this.updateParentNodeText=function(){if(g.length){const v=g[g.length-1];v.text+=m.text}},this.updateParentNodeMediaChildren=function(){g.length&&Vs.includes(this.tag)&&g[g.length-1].mediaChildren.push(this.tag)}}e=Object.assign({},$e.defaults,e),e.parser=Object.assign({},el,e.parser);const l=function(d){return e.allowedTags===!1||(e.allowedTags||[]).indexOf(d)>-1};Qs.forEach(function(d){l(d)&&!e.allowVulnerableTags&&console.warn(`
82
+
83
+ ⚠️ Your \`allowedTags\` option includes, \`${d}\`, which is inherently
84
+ vulnerable to XSS attacks. Please remove it from \`allowedTags\`.
85
+ Or, to disable this warning, add the \`allowVulnerableTags\` option
86
+ and ensure you are accounting for this risk.
87
+
88
+ `)});const a=e.nonTextTags||["script","style","textarea","option"];let o,h;e.allowedAttributes&&(o={},h={},we(e.allowedAttributes,function(d,x){o[x]=[];const m=[];d.forEach(function(v){typeof v=="string"&&v.indexOf("*")>=0?m.push(dr(v).replace(/\\\*/g,".*")):o[x].push(v)}),m.length&&(h[x]=new RegExp("^("+m.join("|")+")$"))}));const c={},p={},f={};we(e.allowedClasses,function(d,x){if(o&&(ee(o,x)||(o[x]=[]),o[x].push("class")),c[x]=d,Array.isArray(d)){const m=[];c[x]=[],f[x]=[],d.forEach(function(v){typeof v=="string"&&v.indexOf("*")>=0?m.push(dr(v).replace(/\\\*/g,".*")):v instanceof RegExp?f[x].push(v):c[x].push(v)}),m.length&&(p[x]=new RegExp("^("+m.join("|")+")$"))}});const u={};let k;we(e.transformTags,function(d,x){let m;typeof d=="function"?m=d:typeof d=="string"&&(m=$e.simpleTransform(d)),x==="*"?k=m:u[x]=m});let y,g,$,C,M,R,_=!1;B();const L=new Hs.Parser({onopentag:function(d,x){if(e.enforceHtmlBoundary&&d==="html"&&B(),M){R++;return}const m=new i(d,x);g.push(m);let v=!1;const H=!!m.text;let F;if(ee(u,d)&&(F=u[d](d,x),m.attribs=x=F.attribs,F.text!==void 0&&(m.innerText=F.text),d!==F.tagName&&(m.name=d=F.tagName,C[y]=F.tagName)),k&&(F=k(d,x),m.attribs=x=F.attribs,d!==F.tagName&&(m.name=d=F.tagName,C[y]=F.tagName)),(!l(d)||e.disallowedTagsMode==="recursiveEscape"&&!Js($)||e.nestingLimit!=null&&y>=e.nestingLimit)&&(v=!0,$[y]=!0,e.disallowedTagsMode==="discard"&&a.indexOf(d)!==-1&&(M=!0,R=1),$[y]=!0),y++,v){if(e.disallowedTagsMode==="discard")return;n=r,r=""}r+="<"+d,d==="script"&&(e.allowedScriptHostnames||e.allowedScriptDomains)&&(m.innerText=""),(!o||ee(o,d)||o["*"])&&we(x,function(U,P){if(!Xs.test(P)){delete m.attribs[P];return}if(U===""&&!e.allowedEmptyAttributes.includes(P)&&(e.nonBooleanAttributes.includes(P)||e.nonBooleanAttributes.includes("*"))){delete m.attribs[P];return}let et=!1;if(!o||ee(o,d)&&o[d].indexOf(P)!==-1||o["*"]&&o["*"].indexOf(P)!==-1||ee(h,d)&&h[d].test(P)||h["*"]&&h["*"].test(P))et=!0;else if(o&&o[d]){for(const T of o[d])if(qs(T)&&T.name&&T.name===P){et=!0;let I="";if(T.multiple===!0){const se=U.split(" ");for(const X of se)T.values.indexOf(X)!==-1&&(I===""?I=X:I+=" "+X)}else T.values.indexOf(U)>=0&&(I=U);U=I}}if(et){if(e.allowedSchemesAppliedToAttributes.indexOf(P)!==-1&&D(d,U)){delete m.attribs[P];return}if(d==="script"&&P==="src"){let T=!0;try{const I=W(U);if(e.allowedScriptHostnames||e.allowedScriptDomains){const se=(e.allowedScriptHostnames||[]).find(function(q){return q===I.url.hostname}),X=(e.allowedScriptDomains||[]).find(function(q){return I.url.hostname===q||I.url.hostname.endsWith(`.${q}`)});T=se||X}}catch{T=!1}if(!T){delete m.attribs[P];return}}if(d==="iframe"&&P==="src"){let T=!0;try{const I=W(U);if(I.isRelativeUrl)T=ee(e,"allowIframeRelativeUrls")?e.allowIframeRelativeUrls:!e.allowedIframeHostnames&&!e.allowedIframeDomains;else if(e.allowedIframeHostnames||e.allowedIframeDomains){const se=(e.allowedIframeHostnames||[]).find(function(q){return q===I.url.hostname}),X=(e.allowedIframeDomains||[]).find(function(q){return I.url.hostname===q||I.url.hostname.endsWith(`.${q}`)});T=se||X}}catch{T=!1}if(!T){delete m.attribs[P];return}}if(P==="srcset")try{let T=Zs(U);if(T.forEach(function(I){D("srcset",I.url)&&(I.evil=!0)}),T=mr(T,function(I){return!I.evil}),T.length)U=Ys(mr(T,function(I){return!I.evil})),m.attribs[P]=U;else{delete m.attribs[P];return}}catch{delete m.attribs[P];return}if(P==="class"){const T=c[d],I=c["*"],se=p[d],X=f[d],q=p["*"],Ut=[se,q].concat(X).filter(function(sn){return sn});if(T&&I?U=ae(U,gr(T,I),Ut):U=ae(U,T||I,Ut),!U.length){delete m.attribs[P];return}}if(P==="style"){if(e.parseStyleAttributes)try{const T=Gs(d+" {"+U+"}",{map:!1}),I=K(T,e.allowedStyles);if(U=te(I),U.length===0){delete m.attribs[P];return}}catch{typeof window<"u"&&console.warn('Failed to parse "'+d+" {"+U+`}", If you're running this in a browser, we recommend to disable style parsing: options.parseStyleAttributes: false, since this only works in a node environment due to a postcss dependency, More info: https://github.com/apostrophecms/sanitize-html/issues/547`),delete m.attribs[P];return}else if(e.allowedStyles)throw new Error("allowedStyles option cannot be used together with parseStyleAttributes: false.")}r+=" "+P,U&&U.length?r+='="'+N(U,!0)+'"':e.allowedEmptyAttributes.includes(P)&&(r+='=""')}else delete m.attribs[P]}),e.selfClosing.indexOf(d)!==-1?r+=" />":(r+=">",m.innerText&&!H&&!e.textFilter&&(r+=N(m.innerText),_=!0)),v&&(r=n+N(r),n="")},ontext:function(d){if(M)return;const x=g[g.length-1];let m;if(x&&(m=x.tag,d=x.innerText!==void 0?x.innerText:d),e.disallowedTagsMode==="discard"&&(m==="script"||m==="style"))r+=d;else{const v=N(d,!1);e.textFilter&&!_?r+=e.textFilter(v,m):_||(r+=v)}if(g.length){const v=g[g.length-1];v.text+=d}},onclosetag:function(d,x){if(M)if(R--,!R)M=!1;else return;const m=g.pop();if(!m)return;if(m.tag!==d){g.push(m);return}M=e.enforceHtmlBoundary?d==="html":!1,y--;const v=$[y];if(v){if(delete $[y],e.disallowedTagsMode==="discard"){m.updateParentNodeText();return}n=r,r=""}if(C[y]&&(d=C[y],delete C[y]),e.exclusiveFilter&&e.exclusiveFilter(m)){r=r.substr(0,m.tagPosition);return}if(m.updateParentNodeMediaChildren(),m.updateParentNodeText(),e.selfClosing.indexOf(d)!==-1||x&&!l(d)&&["escape","recursiveEscape"].indexOf(e.disallowedTagsMode)>=0){v&&(r=n,n="");return}r+="</"+d+">",v&&(r=n+N(r),n=""),_=!1}},e.parser);return L.write(s),L.end(),r;function B(){r="",y=0,g=[],$={},C={},M=!1,R=0}function N(d,x){return typeof d!="string"&&(d=d+""),e.parser.decodeEntities&&(d=d.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),x&&(d=d.replace(/"/g,"&quot;"))),d=d.replace(/&(?![a-zA-Z0-9#]{1,20};)/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),x&&(d=d.replace(/"/g,"&quot;")),d}function D(d,x){for(x=x.replace(/[\x00-\x20]+/g,"");;){const H=x.indexOf("<!--");if(H===-1)break;const F=x.indexOf("-->",H+4);if(F===-1)break;x=x.substring(0,H)+x.substring(F+3)}const m=x.match(/^([a-zA-Z][a-zA-Z0-9.\-+]*):/);if(!m)return x.match(/^[/\\]{2}/)?!e.allowProtocolRelative:!1;const v=m[1].toLowerCase();return ee(e.allowedSchemesByTag,d)?e.allowedSchemesByTag[d].indexOf(v)===-1:!e.allowedSchemes||e.allowedSchemes.indexOf(v)===-1}function W(d){if(d=d.replace(/^(\w+:)?\s*[\\/]\s*[\\/]/,"$1//"),d.startsWith("relative:"))throw new Error("relative: exploit attempt");let x="relative://relative-site";for(let H=0;H<100;H++)x+=`/${H}`;const m=new URL(d,x);return{isRelativeUrl:m&&m.hostname==="relative-site"&&m.protocol==="relative:",url:m}}function K(d,x){if(!x)return d;const m=d.nodes[0];let v;return x[m.selector]&&x["*"]?v=gr(x[m.selector],x["*"]):v=x[m.selector]||x["*"],v&&(d.nodes[0].nodes=m.nodes.reduce(ie(v),[])),d}function te(d){return d.nodes[0].nodes.reduce(function(x,m){return x.push(`${m.prop}:${m.value}${m.important?" !important":""}`),x},[]).join(";")}function ie(d){return function(x,m){return ee(d,m.prop)&&d[m.prop].some(function(H){return H.test(m.value)})&&x.push(m),x}}function ae(d,x,m){return x?(d=d.split(/\s+/),d.filter(function(v){return x.indexOf(v)!==-1||m.some(function(H){return H.test(v)})}).join(" ")):d}}const el={decodeEntities:!0};$e.defaults={allowedTags:["address","article","aside","footer","header","h1","h2","h3","h4","h5","h6","hgroup","main","nav","section","blockquote","dd","div","dl","dt","figcaption","figure","hr","li","main","ol","p","pre","ul","a","abbr","b","bdi","bdo","br","cite","code","data","dfn","em","i","kbd","mark","q","rb","rp","rt","rtc","ruby","s","samp","small","span","strong","sub","sup","time","u","var","wbr","caption","col","colgroup","table","tbody","td","tfoot","th","thead","tr"],nonBooleanAttributes:["abbr","accept","accept-charset","accesskey","action","allow","alt","as","autocapitalize","autocomplete","blocking","charset","cite","class","color","cols","colspan","content","contenteditable","coords","crossorigin","data","datetime","decoding","dir","dirname","download","draggable","enctype","enterkeyhint","fetchpriority","for","form","formaction","formenctype","formmethod","formtarget","headers","height","hidden","high","href","hreflang","http-equiv","id","imagesizes","imagesrcset","inputmode","integrity","is","itemid","itemprop","itemref","itemtype","kind","label","lang","list","loading","low","max","maxlength","media","method","min","minlength","name","nonce","optimum","pattern","ping","placeholder","popover","popovertarget","popovertargetaction","poster","preload","referrerpolicy","rel","rows","rowspan","sandbox","scope","shape","size","sizes","slot","span","spellcheck","src","srcdoc","srclang","srcset","start","step","style","tabindex","target","title","translate","type","usemap","value","width","wrap","onauxclick","onafterprint","onbeforematch","onbeforeprint","onbeforeunload","onbeforetoggle","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextlost","oncontextmenu","oncontextrestored","oncopy","oncuechange","oncut","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","onformdata","onhashchange","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onlanguagechange","onload","onloadeddata","onloadedmetadata","onloadstart","onmessage","onmessageerror","onmousedown","onmouseenter","onmouseleave","onmousemove","onmouseout","onmouseover","onmouseup","onoffline","ononline","onpagehide","onpageshow","onpaste","onpause","onplay","onplaying","onpopstate","onprogress","onratechange","onreset","onresize","onrejectionhandled","onscroll","onscrollend","onsecuritypolicyviolation","onseeked","onseeking","onselect","onslotchange","onstalled","onstorage","onsubmit","onsuspend","ontimeupdate","ontoggle","onunhandledrejection","onunload","onvolumechange","onwaiting","onwheel"],disallowedTagsMode:"discard",allowedAttributes:{a:["href","name","target"],img:["src","srcset","alt","title","width","height","loading"]},allowedEmptyAttributes:["alt"],selfClosing:["img","br","hr","area","base","basefont","input","link","meta"],allowedSchemes:["http","https","ftp","mailto","tel"],allowedSchemesByTag:{},allowedSchemesAppliedToAttributes:["href","src","cite"],allowProtocolRelative:!0,enforceHtmlBoundary:!1,parseStyleAttributes:!0};$e.simpleTransform=function(s,e,t){return t=t===void 0?!0:t,e=e||{},function(r,n){let i;if(t)for(i in e)n[i]=e[i];else n=e;return{tagName:s,attribs:n}}};const tl=cn(Ks);function xl(s){const e=On(s);return tl(e,{allowedTags:["h1","h2","h3","h4","h5","h6","b","i","em","strong","a","p","table","thead","ul","ol","li","img","pre","blockquote","tbody","tr","th","td","hr","br","code","font"],allowedAttributes:{a:["href","target"],img:["height","width","src","alt"]}})}export{xl as m};
89
+ //# sourceMappingURL=safe-87846d89.js.map