@hcu-lab.me/mcp-device 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 (261) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +51 -0
  3. package/dist/bootstrap.d.ts +1 -0
  4. package/dist/bootstrap.js +22 -0
  5. package/dist/command-manager.d.ts +8 -0
  6. package/dist/command-manager.js +241 -0
  7. package/dist/config-field-definitions.d.ts +41 -0
  8. package/dist/config-field-definitions.js +37 -0
  9. package/dist/config-manager.d.ts +102 -0
  10. package/dist/config-manager.js +291 -0
  11. package/dist/config.d.ts +6 -0
  12. package/dist/config.js +10 -0
  13. package/dist/custom-stdio.d.ts +51 -0
  14. package/dist/custom-stdio.js +358 -0
  15. package/dist/data/official-app-ca.pem +12 -0
  16. package/dist/data/onboarding-prompts.json +70 -0
  17. package/dist/device/device-state.d.ts +13 -0
  18. package/dist/device/device-state.js +100 -0
  19. package/dist/device/device-status.d.ts +81 -0
  20. package/dist/device/device-status.js +156 -0
  21. package/dist/device/device.d.ts +16 -0
  22. package/dist/device/device.js +190 -0
  23. package/dist/device/execution-engine.d.ts +144 -0
  24. package/dist/device/execution-engine.js +195 -0
  25. package/dist/device/gateway-channel.d.ts +48 -0
  26. package/dist/device/gateway-channel.js +384 -0
  27. package/dist/device/gateway-config.d.ts +40 -0
  28. package/dist/device/gateway-config.js +207 -0
  29. package/dist/device/gateway-identity.d.ts +35 -0
  30. package/dist/device/gateway-identity.js +178 -0
  31. package/dist/device/gateway-pairing.d.ts +25 -0
  32. package/dist/device/gateway-pairing.js +105 -0
  33. package/dist/device/gateway-secure-transport.d.ts +25 -0
  34. package/dist/device/gateway-secure-transport.js +117 -0
  35. package/dist/device/gateway-tool-adapter.d.ts +17 -0
  36. package/dist/device/gateway-tool-adapter.js +284 -0
  37. package/dist/device/gateway-url-policy.d.ts +3 -0
  38. package/dist/device/gateway-url-policy.js +43 -0
  39. package/dist/device/linux-service.d.ts +70 -0
  40. package/dist/device/linux-service.js +268 -0
  41. package/dist/device/official-trust.d.ts +7 -0
  42. package/dist/device/official-trust.js +49 -0
  43. package/dist/device/project-inspection.d.ts +1 -0
  44. package/dist/device/project-inspection.js +180 -0
  45. package/dist/device/runtime-owner.d.ts +41 -0
  46. package/dist/device/runtime-owner.js +177 -0
  47. package/dist/device/windows-dpapi.d.ts +11 -0
  48. package/dist/device/windows-dpapi.js +67 -0
  49. package/dist/device/windows-service.d.ts +56 -0
  50. package/dist/device/windows-service.js +238 -0
  51. package/dist/error-handlers.d.ts +7 -0
  52. package/dist/error-handlers.js +15 -0
  53. package/dist/handlers/edit-search-handlers.d.ts +6 -0
  54. package/dist/handlers/edit-search-handlers.js +6 -0
  55. package/dist/handlers/filesystem-handlers.d.ts +38 -0
  56. package/dist/handlers/filesystem-handlers.js +440 -0
  57. package/dist/handlers/history-handlers.d.ts +12 -0
  58. package/dist/handlers/history-handlers.js +67 -0
  59. package/dist/handlers/index.d.ts +6 -0
  60. package/dist/handlers/index.js +7 -0
  61. package/dist/handlers/process-handlers.d.ts +9 -0
  62. package/dist/handlers/process-handlers.js +15 -0
  63. package/dist/handlers/search-handlers.d.ts +17 -0
  64. package/dist/handlers/search-handlers.js +224 -0
  65. package/dist/handlers/terminal-handlers.d.ts +21 -0
  66. package/dist/handlers/terminal-handlers.js +35 -0
  67. package/dist/index.d.ts +2 -0
  68. package/dist/index.js +138 -0
  69. package/dist/mcp-device.d.ts +2 -0
  70. package/dist/mcp-device.js +7 -0
  71. package/dist/npm-scripts/remote.d.ts +3 -0
  72. package/dist/npm-scripts/remote.js +314 -0
  73. package/dist/search-manager.d.ts +147 -0
  74. package/dist/search-manager.js +828 -0
  75. package/dist/server.d.ts +46 -0
  76. package/dist/server.js +1563 -0
  77. package/dist/terminal-manager.d.ts +104 -0
  78. package/dist/terminal-manager.js +635 -0
  79. package/dist/tools/config.d.ts +96 -0
  80. package/dist/tools/config.js +260 -0
  81. package/dist/tools/edit.d.ts +38 -0
  82. package/dist/tools/edit.js +435 -0
  83. package/dist/tools/feedback.d.ts +8 -0
  84. package/dist/tools/feedback.js +132 -0
  85. package/dist/tools/filesystem.d.ts +79 -0
  86. package/dist/tools/filesystem.js +947 -0
  87. package/dist/tools/fuzzySearch.d.ts +12 -0
  88. package/dist/tools/fuzzySearch.js +74 -0
  89. package/dist/tools/fuzzySearchCore.d.ts +52 -0
  90. package/dist/tools/fuzzySearchCore.js +125 -0
  91. package/dist/tools/improved-process-tools.d.ts +24 -0
  92. package/dist/tools/improved-process-tools.js +627 -0
  93. package/dist/tools/mime-types.d.ts +3 -0
  94. package/dist/tools/mime-types.js +28 -0
  95. package/dist/tools/pdf/extract-images.d.ts +34 -0
  96. package/dist/tools/pdf/extract-images.js +132 -0
  97. package/dist/tools/pdf/index.d.ts +6 -0
  98. package/dist/tools/pdf/index.js +3 -0
  99. package/dist/tools/pdf/lib/pdf2md.d.ts +36 -0
  100. package/dist/tools/pdf/lib/pdf2md.js +76 -0
  101. package/dist/tools/pdf/manipulations.d.ts +13 -0
  102. package/dist/tools/pdf/manipulations.js +99 -0
  103. package/dist/tools/pdf/markdown.d.ts +26 -0
  104. package/dist/tools/pdf/markdown.js +275 -0
  105. package/dist/tools/pdf/utils.d.ts +12 -0
  106. package/dist/tools/pdf/utils.js +34 -0
  107. package/dist/tools/process.d.ts +3 -0
  108. package/dist/tools/process.js +56 -0
  109. package/dist/tools/prompts.d.ts +28 -0
  110. package/dist/tools/prompts.js +259 -0
  111. package/dist/tools/schemas.d.ts +454 -0
  112. package/dist/tools/schemas.js +242 -0
  113. package/dist/tools/usage.d.ts +5 -0
  114. package/dist/tools/usage.js +24 -0
  115. package/dist/types.d.ts +83 -0
  116. package/dist/types.js +1 -0
  117. package/dist/ui/config-editor/config-editor-runtime.js +150 -0
  118. package/dist/ui/config-editor/index.html +13 -0
  119. package/dist/ui/config-editor/src/app.d.ts +43 -0
  120. package/dist/ui/config-editor/src/app.js +831 -0
  121. package/dist/ui/config-editor/src/array-modal.d.ts +19 -0
  122. package/dist/ui/config-editor/src/array-modal.js +185 -0
  123. package/dist/ui/config-editor/src/main.d.ts +1 -0
  124. package/dist/ui/config-editor/src/main.js +2 -0
  125. package/dist/ui/config-editor/styles.css +587 -0
  126. package/dist/ui/contracts.d.ts +14 -0
  127. package/dist/ui/contracts.js +21 -0
  128. package/dist/ui/file-preview/index.html +16 -0
  129. package/dist/ui/file-preview/preview-runtime.js +469 -0
  130. package/dist/ui/file-preview/shared/preview-file-types.d.ts +5 -0
  131. package/dist/ui/file-preview/shared/preview-file-types.js +59 -0
  132. package/dist/ui/file-preview/src/app.d.ts +4 -0
  133. package/dist/ui/file-preview/src/app.js +680 -0
  134. package/dist/ui/file-preview/src/components/code-viewer.d.ts +6 -0
  135. package/dist/ui/file-preview/src/components/code-viewer.js +73 -0
  136. package/dist/ui/file-preview/src/components/highlighting.d.ts +2 -0
  137. package/dist/ui/file-preview/src/components/highlighting.js +54 -0
  138. package/dist/ui/file-preview/src/components/html-renderer.d.ts +5 -0
  139. package/dist/ui/file-preview/src/components/html-renderer.js +47 -0
  140. package/dist/ui/file-preview/src/components/markdown-renderer.d.ts +1 -0
  141. package/dist/ui/file-preview/src/components/markdown-renderer.js +59 -0
  142. package/dist/ui/file-preview/src/directory-controller.d.ts +8 -0
  143. package/dist/ui/file-preview/src/directory-controller.js +240 -0
  144. package/dist/ui/file-preview/src/document-layout.d.ts +20 -0
  145. package/dist/ui/file-preview/src/document-layout.js +109 -0
  146. package/dist/ui/file-preview/src/document-outline.d.ts +17 -0
  147. package/dist/ui/file-preview/src/document-outline.js +97 -0
  148. package/dist/ui/file-preview/src/document-workspace.d.ts +19 -0
  149. package/dist/ui/file-preview/src/document-workspace.js +33 -0
  150. package/dist/ui/file-preview/src/file-type-handlers.d.ts +10 -0
  151. package/dist/ui/file-preview/src/file-type-handlers.js +109 -0
  152. package/dist/ui/file-preview/src/host/external-actions.d.ts +8 -0
  153. package/dist/ui/file-preview/src/host/external-actions.js +55 -0
  154. package/dist/ui/file-preview/src/host/selection-context.d.ts +9 -0
  155. package/dist/ui/file-preview/src/host/selection-context.js +106 -0
  156. package/dist/ui/file-preview/src/image-preview.d.ts +3 -0
  157. package/dist/ui/file-preview/src/image-preview.js +21 -0
  158. package/dist/ui/file-preview/src/main.d.ts +1 -0
  159. package/dist/ui/file-preview/src/main.js +5 -0
  160. package/dist/ui/file-preview/src/markdown/conflict-dialog.d.ts +40 -0
  161. package/dist/ui/file-preview/src/markdown/conflict-dialog.js +163 -0
  162. package/dist/ui/file-preview/src/markdown/controller.d.ts +44 -0
  163. package/dist/ui/file-preview/src/markdown/controller.js +1043 -0
  164. package/dist/ui/file-preview/src/markdown/editor.d.ts +131 -0
  165. package/dist/ui/file-preview/src/markdown/editor.js +1479 -0
  166. package/dist/ui/file-preview/src/markdown/linking.d.ts +16 -0
  167. package/dist/ui/file-preview/src/markdown/linking.js +228 -0
  168. package/dist/ui/file-preview/src/markdown/outline.d.ts +2 -0
  169. package/dist/ui/file-preview/src/markdown/outline.js +16 -0
  170. package/dist/ui/file-preview/src/markdown/parser.d.ts +30 -0
  171. package/dist/ui/file-preview/src/markdown/parser.js +38 -0
  172. package/dist/ui/file-preview/src/markdown/preview.d.ts +1 -0
  173. package/dist/ui/file-preview/src/markdown/preview.js +20 -0
  174. package/dist/ui/file-preview/src/markdown/slugify.d.ts +3 -0
  175. package/dist/ui/file-preview/src/markdown/slugify.js +31 -0
  176. package/dist/ui/file-preview/src/markdown/utils.d.ts +1 -0
  177. package/dist/ui/file-preview/src/markdown/utils.js +15 -0
  178. package/dist/ui/file-preview/src/model.d.ts +35 -0
  179. package/dist/ui/file-preview/src/model.js +1 -0
  180. package/dist/ui/file-preview/src/panel-actions.d.ts +17 -0
  181. package/dist/ui/file-preview/src/panel-actions.js +182 -0
  182. package/dist/ui/file-preview/src/path-utils.d.ts +6 -0
  183. package/dist/ui/file-preview/src/path-utils.js +64 -0
  184. package/dist/ui/file-preview/src/payload-utils.d.ts +11 -0
  185. package/dist/ui/file-preview/src/payload-utils.js +119 -0
  186. package/dist/ui/file-preview/src/types.d.ts +1 -0
  187. package/dist/ui/file-preview/src/types.js +1 -0
  188. package/dist/ui/file-preview/styles.css +1631 -0
  189. package/dist/ui/resources.d.ts +28 -0
  190. package/dist/ui/resources.js +86 -0
  191. package/dist/ui/shared/compact-row.d.ts +11 -0
  192. package/dist/ui/shared/compact-row.js +18 -0
  193. package/dist/ui/shared/escape-html.d.ts +4 -0
  194. package/dist/ui/shared/escape-html.js +11 -0
  195. package/dist/ui/shared/host-context.d.ts +15 -0
  196. package/dist/ui/shared/host-context.js +51 -0
  197. package/dist/ui/shared/tool-bridge.d.ts +30 -0
  198. package/dist/ui/shared/tool-bridge.js +137 -0
  199. package/dist/ui/shared/tool-shell.d.ts +25 -0
  200. package/dist/ui/shared/tool-shell.js +107 -0
  201. package/dist/ui/shared/ui-event-tracker.d.ts +9 -0
  202. package/dist/ui/shared/ui-event-tracker.js +27 -0
  203. package/dist/ui/shared/widget-state.d.ts +33 -0
  204. package/dist/ui/shared/widget-state.js +158 -0
  205. package/dist/utils/ab-test.d.ts +12 -0
  206. package/dist/utils/ab-test.js +104 -0
  207. package/dist/utils/capture.d.ts +35 -0
  208. package/dist/utils/capture.js +481 -0
  209. package/dist/utils/dockerPrompt.d.ts +17 -0
  210. package/dist/utils/dockerPrompt.js +53 -0
  211. package/dist/utils/feature-flags.d.ts +59 -0
  212. package/dist/utils/feature-flags.js +215 -0
  213. package/dist/utils/files/base.d.ts +173 -0
  214. package/dist/utils/files/base.js +5 -0
  215. package/dist/utils/files/binary.d.ts +21 -0
  216. package/dist/utils/files/binary.js +65 -0
  217. package/dist/utils/files/docx.d.ts +47 -0
  218. package/dist/utils/files/docx.js +679 -0
  219. package/dist/utils/files/excel.d.ts +24 -0
  220. package/dist/utils/files/excel.js +437 -0
  221. package/dist/utils/files/factory.d.ts +41 -0
  222. package/dist/utils/files/factory.js +113 -0
  223. package/dist/utils/files/image.d.ts +21 -0
  224. package/dist/utils/files/image.js +78 -0
  225. package/dist/utils/files/index.d.ts +10 -0
  226. package/dist/utils/files/index.js +13 -0
  227. package/dist/utils/files/pdf.d.ts +32 -0
  228. package/dist/utils/files/pdf.js +142 -0
  229. package/dist/utils/files/text.d.ts +63 -0
  230. package/dist/utils/files/text.js +370 -0
  231. package/dist/utils/fuzzySearchLogger.d.ts +30 -0
  232. package/dist/utils/fuzzySearchLogger.js +126 -0
  233. package/dist/utils/lineEndingHandler.d.ts +21 -0
  234. package/dist/utils/lineEndingHandler.js +77 -0
  235. package/dist/utils/logger.d.ts +32 -0
  236. package/dist/utils/logger.js +72 -0
  237. package/dist/utils/mcp-ui-ab-test.d.ts +13 -0
  238. package/dist/utils/mcp-ui-ab-test.js +62 -0
  239. package/dist/utils/open-browser.d.ts +9 -0
  240. package/dist/utils/open-browser.js +42 -0
  241. package/dist/utils/process-detection.d.ts +23 -0
  242. package/dist/utils/process-detection.js +150 -0
  243. package/dist/utils/ripgrep-resolver.d.ts +9 -0
  244. package/dist/utils/ripgrep-resolver.js +74 -0
  245. package/dist/utils/system-info.d.ts +71 -0
  246. package/dist/utils/system-info.js +712 -0
  247. package/dist/utils/toolHistory.d.ts +86 -0
  248. package/dist/utils/toolHistory.js +257 -0
  249. package/dist/utils/trackTools.d.ts +6 -0
  250. package/dist/utils/trackTools.js +54 -0
  251. package/dist/utils/unsupportedParams.d.ts +24 -0
  252. package/dist/utils/unsupportedParams.js +66 -0
  253. package/dist/utils/usageTracker.d.ts +133 -0
  254. package/dist/utils/usageTracker.js +477 -0
  255. package/dist/utils/welcome-onboarding.d.ts +11 -0
  256. package/dist/utils/welcome-onboarding.js +99 -0
  257. package/dist/utils/withTimeout.d.ts +28 -0
  258. package/dist/utils/withTimeout.js +85 -0
  259. package/dist/version.d.ts +1 -0
  260. package/dist/version.js +1 -0
  261. package/package.json +131 -0
@@ -0,0 +1,469 @@
1
+ "use strict";(()=>{var q3=Object.create;var yl=Object.defineProperty;var W3=Object.getOwnPropertyDescriptor;var V3=Object.getOwnPropertyNames;var K3=Object.getPrototypeOf,J3=Object.prototype.hasOwnProperty;var G3=(e,t,n)=>t in e?yl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var dy=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Wi=(e,t)=>{for(var n in t)yl(e,n,{get:t[n],enumerable:!0})},X3=(e,t,n,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of V3(t))!J3.call(e,r)&&r!==n&&yl(e,r,{get:()=>t[r],enumerable:!(i=W3(t,r))||i.enumerable});return e};var fy=(e,t,n)=>(n=e!=null?q3(K3(e)):{},X3(t||!e||!e.__esModule?yl(n,"default",{value:e,enumerable:!0}):n,e));var At=(e,t,n)=>G3(e,typeof t!="symbol"?t+"":t,n);var dC=dy((bte,cC)=>{function Y$(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw new Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw new Error("set is read-only")}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach(t=>{let n=e[t],i=typeof n;(i==="object"||i==="function")&&!Object.isFrozen(n)&&Y$(n)}),e}var sc=class{constructor(t){t.data===void 0&&(t.data={}),this.data=t.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}};function Q$(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function Ar(e,...t){let n=Object.create(null);for(let i in e)n[i]=e[i];return t.forEach(function(i){for(let r in i)n[r]=i[r]}),n}var y9="</span>",W$=e=>!!e.scope,k9=(e,{prefix:t})=>{if(e.startsWith("language:"))return e.replace("language:","language-");if(e.includes(".")){let n=e.split(".");return[`${t}${n.shift()}`,...n.map((i,r)=>`${i}${"_".repeat(r+1)}`)].join(" ")}return`${t}${e}`},qm=class{constructor(t,n){this.buffer="",this.classPrefix=n.classPrefix,t.walk(this)}addText(t){this.buffer+=Q$(t)}openNode(t){if(!W$(t))return;let n=k9(t.scope,{prefix:this.classPrefix});this.span(n)}closeNode(t){W$(t)&&(this.buffer+=y9)}value(){return this.buffer}span(t){this.buffer+=`<span class="${t}">`}},V$=(e={})=>{let t={children:[]};return Object.assign(t,e),t},Wm=class e{constructor(){this.rootNode=V$(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(t){this.top.children.push(t)}openNode(t){let n=V$({scope:t});this.add(n),this.stack.push(n)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(t){return this.constructor._walk(t,this.rootNode)}static _walk(t,n){return typeof n=="string"?t.addText(n):n.children&&(t.openNode(n),n.children.forEach(i=>this._walk(t,i)),t.closeNode(n)),t}static _collapse(t){typeof t!="string"&&t.children&&(t.children.every(n=>typeof n=="string")?t.children=[t.children.join("")]:t.children.forEach(n=>{e._collapse(n)}))}},Vm=class extends Wm{constructor(t){super(),this.options=t}addText(t){t!==""&&this.add(t)}startScope(t){this.openNode(t)}endScope(){this.closeNode()}__addSublanguage(t,n){let i=t.root;n&&(i.scope=`language:${n}`),this.add(i)}toHTML(){return new qm(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}};function ua(e){return e?typeof e=="string"?e:e.source:null}function eC(e){return ui("(?=",e,")")}function x9(e){return ui("(?:",e,")*")}function _9(e){return ui("(?:",e,")?")}function ui(...e){return e.map(n=>ua(n)).join("")}function w9(e){let t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function Jm(...e){return"("+(w9(e).capture?"":"?:")+e.map(i=>ua(i)).join("|")+")"}function tC(e){return new RegExp(e.toString()+"|").exec("").length-1}function S9(e,t){let n=e&&e.exec(t);return n&&n.index===0}var E9=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function Gm(e,{joinWith:t}){let n=0;return e.map(i=>{n+=1;let r=n,o=ua(i),s="";for(;o.length>0;){let a=E9.exec(o);if(!a){s+=o;break}s+=o.substring(0,a.index),o=o.substring(a.index+a[0].length),a[0][0]==="\\"&&a[1]?s+="\\"+String(Number(a[1])+r):(s+=a[0],a[0]==="("&&n++)}return s}).map(i=>`(${i})`).join(t)}var $9=/\b\B/,nC="[a-zA-Z]\\w*",Xm="[a-zA-Z_]\\w*",rC="\\b\\d+(\\.\\d+)?",iC="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",oC="\\b(0b[01]+)",C9="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",T9=(e={})=>{let t=/^#![ ]*\//;return e.binary&&(e.begin=ui(t,/.*\b/,e.binary,/\b.*/)),Ar({scope:"meta",begin:t,end:/$/,relevance:0,"on:begin":(n,i)=>{n.index!==0&&i.ignoreMatch()}},e)},ca={begin:"\\\\[\\s\\S]",relevance:0},I9={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[ca]},A9={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[ca]},M9={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},lc=function(e,t,n={}){let i=Ar({scope:"comment",begin:e,end:t,contains:[]},n);i.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});let r=Jm("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return i.contains.push({begin:ui(/[ ]+/,"(",r,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),i},z9=lc("//","$"),D9=lc("/\\*","\\*/"),N9=lc("#","$"),O9={scope:"number",begin:rC,relevance:0},R9={scope:"number",begin:iC,relevance:0},P9={scope:"number",begin:oC,relevance:0},L9={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[ca,{begin:/\[/,end:/\]/,relevance:0,contains:[ca]}]},F9={scope:"title",begin:nC,relevance:0},B9={scope:"title",begin:Xm,relevance:0},U9={begin:"\\.\\s*"+Xm,relevance:0},j9=function(e){return Object.assign(e,{"on:begin":(t,n)=>{n.data._beginMatch=t[1]},"on:end":(t,n)=>{n.data._beginMatch!==t[1]&&n.ignoreMatch()}})},oc=Object.freeze({__proto__:null,APOS_STRING_MODE:I9,BACKSLASH_ESCAPE:ca,BINARY_NUMBER_MODE:P9,BINARY_NUMBER_RE:oC,COMMENT:lc,C_BLOCK_COMMENT_MODE:D9,C_LINE_COMMENT_MODE:z9,C_NUMBER_MODE:R9,C_NUMBER_RE:iC,END_SAME_AS_BEGIN:j9,HASH_COMMENT_MODE:N9,IDENT_RE:nC,MATCH_NOTHING_RE:$9,METHOD_GUARD:U9,NUMBER_MODE:O9,NUMBER_RE:rC,PHRASAL_WORDS_MODE:M9,QUOTE_STRING_MODE:A9,REGEXP_MODE:L9,RE_STARTERS_RE:C9,SHEBANG:T9,TITLE_MODE:F9,UNDERSCORE_IDENT_RE:Xm,UNDERSCORE_TITLE_MODE:B9});function Z9(e,t){e.input[e.index-1]==="."&&t.ignoreMatch()}function H9(e,t){e.className!==void 0&&(e.scope=e.className,delete e.className)}function q9(e,t){t&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=Z9,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,e.relevance===void 0&&(e.relevance=0))}function W9(e,t){Array.isArray(e.illegal)&&(e.illegal=Jm(...e.illegal))}function V9(e,t){if(e.match){if(e.begin||e.end)throw new Error("begin & end are not supported with match");e.begin=e.match,delete e.match}}function K9(e,t){e.relevance===void 0&&(e.relevance=1)}var J9=(e,t)=>{if(!e.beforeMatch)return;if(e.starts)throw new Error("beforeMatch cannot be used with starts");let n=Object.assign({},e);Object.keys(e).forEach(i=>{delete e[i]}),e.keywords=n.keywords,e.begin=ui(n.beforeMatch,eC(n.begin)),e.starts={relevance:0,contains:[Object.assign(n,{endsParent:!0})]},e.relevance=0,delete n.beforeMatch},G9=["of","and","for","in","not","or","if","then","parent","list","value"],X9="keyword";function sC(e,t,n=X9){let i=Object.create(null);return typeof e=="string"?r(n,e.split(" ")):Array.isArray(e)?r(n,e):Object.keys(e).forEach(function(o){Object.assign(i,sC(e[o],t,o))}),i;function r(o,s){t&&(s=s.map(a=>a.toLowerCase())),s.forEach(function(a){let l=a.split("|");i[l[0]]=[o,Y9(l[0],l[1])]})}}function Y9(e,t){return t?Number(t):Q9(e)?0:1}function Q9(e){return G9.includes(e.toLowerCase())}var K$={},li=e=>{console.error(e)},J$=(e,...t)=>{console.log(`WARN: ${e}`,...t)},ho=(e,t)=>{K$[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),K$[`${e}/${t}`]=!0)},ac=new Error;function aC(e,t,{key:n}){let i=0,r=e[n],o={},s={};for(let a=1;a<=t.length;a++)s[a+i]=r[a],o[a+i]=!0,i+=tC(t[a-1]);e[n]=s,e[n]._emit=o,e[n]._multi=!0}function e5(e){if(Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw li("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),ac;if(typeof e.beginScope!="object"||e.beginScope===null)throw li("beginScope must be object"),ac;aC(e,e.begin,{key:"beginScope"}),e.begin=Gm(e.begin,{joinWith:""})}}function t5(e){if(Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw li("skip, excludeEnd, returnEnd not compatible with endScope: {}"),ac;if(typeof e.endScope!="object"||e.endScope===null)throw li("endScope must be object"),ac;aC(e,e.end,{key:"endScope"}),e.end=Gm(e.end,{joinWith:""})}}function n5(e){e.scope&&typeof e.scope=="object"&&e.scope!==null&&(e.beginScope=e.scope,delete e.scope)}function r5(e){n5(e),typeof e.beginScope=="string"&&(e.beginScope={_wrap:e.beginScope}),typeof e.endScope=="string"&&(e.endScope={_wrap:e.endScope}),e5(e),t5(e)}function i5(e){function t(s,a){return new RegExp(ua(s),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(a?"g":""))}class n{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(a,l){l.position=this.position++,this.matchIndexes[this.matchAt]=l,this.regexes.push([l,a]),this.matchAt+=tC(a)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);let a=this.regexes.map(l=>l[1]);this.matcherRe=t(Gm(a,{joinWith:"|"}),!0),this.lastIndex=0}exec(a){this.matcherRe.lastIndex=this.lastIndex;let l=this.matcherRe.exec(a);if(!l)return null;let u=l.findIndex((d,f)=>f>0&&d!==void 0),c=this.matchIndexes[u];return l.splice(0,u),Object.assign(l,c)}}class i{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(a){if(this.multiRegexes[a])return this.multiRegexes[a];let l=new n;return this.rules.slice(a).forEach(([u,c])=>l.addRule(u,c)),l.compile(),this.multiRegexes[a]=l,l}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(a,l){this.rules.push([a,l]),l.type==="begin"&&this.count++}exec(a){let l=this.getMatcher(this.regexIndex);l.lastIndex=this.lastIndex;let u=l.exec(a);if(this.resumingScanAtSamePosition()&&!(u&&u.index===this.lastIndex)){let c=this.getMatcher(0);c.lastIndex=this.lastIndex+1,u=c.exec(a)}return u&&(this.regexIndex+=u.position+1,this.regexIndex===this.count&&this.considerAll()),u}}function r(s){let a=new i;return s.contains.forEach(l=>a.addRule(l.begin,{rule:l,type:"begin"})),s.terminatorEnd&&a.addRule(s.terminatorEnd,{type:"end"}),s.illegal&&a.addRule(s.illegal,{type:"illegal"}),a}function o(s,a){let l=s;if(s.isCompiled)return l;[H9,V9,r5,J9].forEach(c=>c(s,a)),e.compilerExtensions.forEach(c=>c(s,a)),s.__beforeBegin=null,[q9,W9,K9].forEach(c=>c(s,a)),s.isCompiled=!0;let u=null;return typeof s.keywords=="object"&&s.keywords.$pattern&&(s.keywords=Object.assign({},s.keywords),u=s.keywords.$pattern,delete s.keywords.$pattern),u=u||/\w+/,s.keywords&&(s.keywords=sC(s.keywords,e.case_insensitive)),l.keywordPatternRe=t(u,!0),a&&(s.begin||(s.begin=/\B|\b/),l.beginRe=t(l.begin),!s.end&&!s.endsWithParent&&(s.end=/\B|\b/),s.end&&(l.endRe=t(l.end)),l.terminatorEnd=ua(l.end)||"",s.endsWithParent&&a.terminatorEnd&&(l.terminatorEnd+=(s.end?"|":"")+a.terminatorEnd)),s.illegal&&(l.illegalRe=t(s.illegal)),s.contains||(s.contains=[]),s.contains=[].concat(...s.contains.map(function(c){return o5(c==="self"?s:c)})),s.contains.forEach(function(c){o(c,l)}),s.starts&&o(s.starts,a),l.matcher=r(l),l}if(e.compilerExtensions||(e.compilerExtensions=[]),e.contains&&e.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=Ar(e.classNameAliases||{}),o(e)}function lC(e){return e?e.endsWithParent||lC(e.starts):!1}function o5(e){return e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map(function(t){return Ar(e,{variants:null},t)})),e.cachedVariants?e.cachedVariants:lC(e)?Ar(e,{starts:e.starts?Ar(e.starts):null}):Object.isFrozen(e)?Ar(e):e}var s5="11.11.1",Km=class extends Error{constructor(t,n){super(t),this.name="HTMLInjectionError",this.html=n}},Hm=Q$,G$=Ar,X$=Symbol("nomatch"),a5=7,uC=function(e){let t=Object.create(null),n=Object.create(null),i=[],r=!0,o="Could not find the language '{}', did you forget to load/include a language module?",s={disableAutodetect:!0,name:"Plain text",contains:[]},a={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:Vm};function l(I){return a.noHighlightRe.test(I)}function u(I){let W=I.className+" ";W+=I.parentNode?I.parentNode.className:"";let Z=a.languageDetectRe.exec(W);if(Z){let ee=M(Z[1]);return ee||(J$(o.replace("{}",Z[1])),J$("Falling back to no-highlight mode for this block.",I)),ee?Z[1]:"no-highlight"}return W.split(/\s+/).find(ee=>l(ee)||M(ee))}function c(I,W,Z){let ee="",ue="";typeof W=="object"?(ee=I,Z=W.ignoreIllegals,ue=W.language):(ho("10.7.0","highlight(lang, code, ...args) has been deprecated."),ho("10.7.0",`Please use highlight(code, options) instead.
2
+ https://github.com/highlightjs/highlight.js/issues/2277`),ue=I,ee=W),Z===void 0&&(Z=!0);let _={code:ee,language:ue};Me("before:highlight",_);let S=_.result?_.result:d(_.language,_.code,Z);return S.code=_.code,Me("after:highlight",S),S}function d(I,W,Z,ee){let ue=Object.create(null);function _(E,N){return E.keywords[N]}function S(){if(!ie.keywords){ot.addText(ze);return}let E=0;ie.keywordPatternRe.lastIndex=0;let N=ie.keywordPatternRe.exec(ze),U="";for(;N;){U+=ze.substring(E,N.index);let oe=Xe.case_insensitive?N[0].toLowerCase():N[0],xe=_(ie,oe);if(xe){let[st,On]=xe;if(ot.addText(U),U="",ue[oe]=(ue[oe]||0)+1,ue[oe]<=a5&&(Gr+=On),st.startsWith("_"))U+=N[0];else{let Xr=Xe.classNameAliases[st]||st;ne(N[0],Xr)}}else U+=N[0];E=ie.keywordPatternRe.lastIndex,N=ie.keywordPatternRe.exec(ze)}U+=ze.substring(E),ot.addText(U)}function O(){if(ze==="")return;let E=null;if(typeof ie.subLanguage=="string"){if(!t[ie.subLanguage]){ot.addText(ze);return}E=d(ie.subLanguage,ze,!0,ss[ie.subLanguage]),ss[ie.subLanguage]=E._top}else E=p(ze,ie.subLanguage.length?ie.subLanguage:null);ie.relevance>0&&(Gr+=E.relevance),ot.__addSublanguage(E._emitter,E.language)}function L(){ie.subLanguage!=null?O():S(),ze=""}function ne(E,N){E!==""&&(ot.startScope(N),ot.addText(E),ot.endScope())}function Y(E,N){let U=1,oe=N.length-1;for(;U<=oe;){if(!E._emit[U]){U++;continue}let xe=Xe.classNameAliases[E[U]]||E[U],st=N[U];xe?ne(st,xe):(ze=st,S(),ze=""),U++}}function Ee(E,N){return E.scope&&typeof E.scope=="string"&&ot.openNode(Xe.classNameAliases[E.scope]||E.scope),E.beginScope&&(E.beginScope._wrap?(ne(ze,Xe.classNameAliases[E.beginScope._wrap]||E.beginScope._wrap),ze=""):E.beginScope._multi&&(Y(E.beginScope,N),ze="")),ie=Object.create(E,{parent:{value:ie}}),ie}function dt(E,N,U){let oe=S9(E.endRe,U);if(oe){if(E["on:end"]){let xe=new sc(E);E["on:end"](N,xe),xe.isMatchIgnored&&(oe=!1)}if(oe){for(;E.endsParent&&E.parent;)E=E.parent;return E}}if(E.endsWithParent)return dt(E.parent,N,U)}function ve(E){return ie.matcher.regexIndex===0?(ze+=E[0],1):(qi=!0,0)}function Oe(E){let N=E[0],U=E.rule,oe=new sc(U),xe=[U.__beforeBegin,U["on:begin"]];for(let st of xe)if(st&&(st(E,oe),oe.isMatchIgnored))return ve(N);return U.skip?ze+=N:(U.excludeBegin&&(ze+=N),L(),!U.returnBegin&&!U.excludeBegin&&(ze=N)),Ee(U,E),U.returnBegin?0:N.length}function kt(E){let N=E[0],U=W.substring(E.index),oe=dt(ie,E,U);if(!oe)return X$;let xe=ie;ie.endScope&&ie.endScope._wrap?(L(),ne(N,ie.endScope._wrap)):ie.endScope&&ie.endScope._multi?(L(),Y(ie.endScope,E)):xe.skip?ze+=N:(xe.returnEnd||xe.excludeEnd||(ze+=N),L(),xe.excludeEnd&&(ze=N));do ie.scope&&ot.closeNode(),!ie.skip&&!ie.subLanguage&&(Gr+=ie.relevance),ie=ie.parent;while(ie!==oe.parent);return oe.starts&&Ee(oe.starts,E),xe.returnEnd?0:N.length}function It(){let E=[];for(let N=ie;N!==Xe;N=N.parent)N.scope&&E.unshift(N.scope);E.forEach(N=>ot.openNode(N))}let Ge={};function De(E,N){let U=N&&N[0];if(ze+=E,U==null)return L(),0;if(Ge.type==="begin"&&N.type==="end"&&Ge.index===N.index&&U===""){if(ze+=W.slice(N.index,N.index+1),!r){let oe=new Error(`0 width match regex (${I})`);throw oe.languageName=I,oe.badRule=Ge.rule,oe}return 1}if(Ge=N,N.type==="begin")return Oe(N);if(N.type==="illegal"&&!Z){let oe=new Error('Illegal lexeme "'+U+'" for mode "'+(ie.scope||"<unnamed>")+'"');throw oe.mode=ie,oe}else if(N.type==="end"){let oe=kt(N);if(oe!==X$)return oe}if(N.type==="illegal"&&U==="")return ze+=`
3
+ `,1;if(Hi>1e5&&Hi>N.index*3)throw new Error("potential infinite loop, way more iterations than matches");return ze+=U,U.length}let Xe=M(I);if(!Xe)throw li(o.replace("{}",I)),new Error('Unknown language: "'+I+'"');let Zi=i5(Xe),Dn="",ie=ee||Zi,ss={},ot=new a.__emitter(a);It();let ze="",Gr=0,Nn=0,Hi=0,qi=!1;try{if(Xe.__emitTokens)Xe.__emitTokens(W,ot);else{for(ie.matcher.considerAll();;){Hi++,qi?qi=!1:ie.matcher.considerAll(),ie.matcher.lastIndex=Nn;let E=ie.matcher.exec(W);if(!E)break;let N=W.substring(Nn,E.index),U=De(N,E);Nn=E.index+U}De(W.substring(Nn))}return ot.finalize(),Dn=ot.toHTML(),{language:I,value:Dn,relevance:Gr,illegal:!1,_emitter:ot,_top:ie}}catch(E){if(E.message&&E.message.includes("Illegal"))return{language:I,value:Hm(W),illegal:!0,relevance:0,_illegalBy:{message:E.message,index:Nn,context:W.slice(Nn-100,Nn+100),mode:E.mode,resultSoFar:Dn},_emitter:ot};if(r)return{language:I,value:Hm(W),illegal:!1,relevance:0,errorRaised:E,_emitter:ot,_top:ie};throw E}}function f(I){let W={value:Hm(I),illegal:!1,relevance:0,_top:s,_emitter:new a.__emitter(a)};return W._emitter.addText(I),W}function p(I,W){W=W||a.languages||Object.keys(t);let Z=f(I),ee=W.filter(M).filter(me).map(L=>d(L,I,!1));ee.unshift(Z);let ue=ee.sort((L,ne)=>{if(L.relevance!==ne.relevance)return ne.relevance-L.relevance;if(L.language&&ne.language){if(M(L.language).supersetOf===ne.language)return 1;if(M(ne.language).supersetOf===L.language)return-1}return 0}),[_,S]=ue,O=_;return O.secondBest=S,O}function h(I,W,Z){let ee=W&&n[W]||Z;I.classList.add("hljs"),I.classList.add(`language-${ee}`)}function m(I){let W=null,Z=u(I);if(l(Z))return;if(Me("before:highlightElement",{el:I,language:Z}),I.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",I);return}if(I.children.length>0&&(a.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(I)),a.throwUnescapedHTML))throw new Km("One of your code blocks includes unescaped HTML.",I.innerHTML);W=I;let ee=W.textContent,ue=Z?c(ee,{language:Z,ignoreIllegals:!0}):p(ee);I.innerHTML=ue.value,I.dataset.highlighted="yes",h(I,Z,ue.language),I.result={language:ue.language,re:ue.relevance,relevance:ue.relevance},ue.secondBest&&(I.secondBest={language:ue.secondBest.language,relevance:ue.secondBest.relevance}),Me("after:highlightElement",{el:I,result:ue,text:ee})}function g(I){a=G$(a,I)}let b=()=>{x(),ho("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function v(){x(),ho("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let y=!1;function x(){function I(){x()}if(document.readyState==="loading"){y||window.addEventListener("DOMContentLoaded",I,!1),y=!0;return}document.querySelectorAll(a.cssSelector).forEach(m)}function C(I,W){let Z=null;try{Z=W(e)}catch(ee){if(li("Language definition for '{}' could not be registered.".replace("{}",I)),r)li(ee);else throw ee;Z=s}Z.name||(Z.name=I),t[I]=Z,Z.rawDefinition=W.bind(null,e),Z.aliases&&V(Z.aliases,{languageName:I})}function A(I){delete t[I];for(let W of Object.keys(n))n[W]===I&&delete n[W]}function D(){return Object.keys(t)}function M(I){return I=(I||"").toLowerCase(),t[I]||t[n[I]]}function V(I,{languageName:W}){typeof I=="string"&&(I=[I]),I.forEach(Z=>{n[Z.toLowerCase()]=W})}function me(I){let W=M(I);return W&&!W.disableAutodetect}function et(I){I["before:highlightBlock"]&&!I["before:highlightElement"]&&(I["before:highlightElement"]=W=>{I["before:highlightBlock"](Object.assign({block:W.el},W))}),I["after:highlightBlock"]&&!I["after:highlightElement"]&&(I["after:highlightElement"]=W=>{I["after:highlightBlock"](Object.assign({block:W.el},W))})}function it(I){et(I),i.push(I)}function je(I){let W=i.indexOf(I);W!==-1&&i.splice(W,1)}function Me(I,W){let Z=I;i.forEach(function(ee){ee[Z]&&ee[Z](W)})}function se(I){return ho("10.7.0","highlightBlock will be removed entirely in v12.0"),ho("10.7.0","Please use highlightElement now."),m(I)}Object.assign(e,{highlight:c,highlightAuto:p,highlightAll:x,highlightElement:m,highlightBlock:se,configure:g,initHighlighting:b,initHighlightingOnLoad:v,registerLanguage:C,unregisterLanguage:A,listLanguages:D,getLanguage:M,registerAliases:V,autoDetection:me,inherit:G$,addPlugin:it,removePlugin:je}),e.debugMode=function(){r=!1},e.safeMode=function(){r=!0},e.versionString=s5,e.regex={concat:ui,lookahead:eC,either:Jm,optional:_9,anyNumberOfTimes:x9};for(let I in oc)typeof oc[I]=="object"&&Y$(oc[I]);return Object.assign(e,oc),e},mo=uC({});mo.newInstance=()=>uC({});cC.exports=mo;mo.HighlightJS=mo;mo.default=mo});var M4=dy((Ule,A4)=>{var Bv=!0,T4=!1,I4=!1;A4.exports=function(e,t){t&&(Bv=!t.enabled,T4=!!t.label,I4=!!t.labelAfter),e.core.ruler.after("inline","github-task-lists",function(n){for(var i=n.tokens,r=2;r<i.length;r++)rV(i,r)&&(iV(i[r],n.Token),C4(i[r-2],"class","task-list-item"+(Bv?"":" enabled")),C4(i[nV(i,r-2)],"class","contains-task-list"))})};function C4(e,t,n){var i=e.attrIndex(t),r=[t,n];i<0?e.attrPush(r):e.attrs[i]=r}function nV(e,t){for(var n=e[t].level-1,i=t-1;i>=0;i--)if(e[i].level===n)return i;return-1}function rV(e,t){return uV(e[t])&&cV(e[t-1])&&dV(e[t-2])&&fV(e[t])}function iV(e,t){if(e.children.unshift(oV(e,t)),e.children[1].content=e.children[1].content.slice(3),e.content=e.content.slice(3),T4)if(I4){e.children.pop();var n="task-item-"+Math.ceil(Math.random()*(1e4*1e3)-1e3);e.children[0].content=e.children[0].content.slice(0,-1)+' id="'+n+'">',e.children.push(lV(e.content,n,t))}else e.children.unshift(sV(t)),e.children.push(aV(t))}function oV(e,t){var n=new t("html_inline","",0),i=Bv?' disabled="" ':"";return e.content.indexOf("[ ] ")===0?n.content='<input class="task-list-item-checkbox"'+i+'type="checkbox">':(e.content.indexOf("[x] ")===0||e.content.indexOf("[X] ")===0)&&(n.content='<input class="task-list-item-checkbox" checked=""'+i+'type="checkbox">'),n}function sV(e){var t=new e("html_inline","",0);return t.content="<label>",t}function aV(e){var t=new e("html_inline","",0);return t.content="</label>",t}function lV(e,t,n){var i=new n("html_inline","",0);return i.content='<label class="task-list-item-label" for="'+t+'">'+e+"</label>",i.attrs=[{for:t}],i}function uV(e){return e.type==="inline"}function cV(e){return e.type==="paragraph_open"}function dV(e){return e.type==="list_item_open"}function fV(e){return e.content.indexOf("[ ] ")===0||e.content.indexOf("[x] ")===0||e.content.indexOf("[X] ")===0}});var mJ=Object.freeze({status:"aborted"});function T(e,t,n){function i(a,l){var u;Object.defineProperty(a,"_zod",{value:a._zod??{},enumerable:!1}),(u=a._zod).traits??(u.traits=new Set),a._zod.traits.add(e),t(a,l);for(let c in s.prototype)c in a||Object.defineProperty(a,c,{value:s.prototype[c].bind(a)});a._zod.constr=s,a._zod.def=l}let r=n?.Parent??Object;class o extends r{}Object.defineProperty(o,"name",{value:e});function s(a){var l;let u=n?.Parent?new o:this;i(u,a),(l=u._zod).deferred??(l.deferred=[]);for(let c of u._zod.deferred)c();return u}return Object.defineProperty(s,"init",{value:i}),Object.defineProperty(s,Symbol.hasInstance,{value:a=>n?.Parent&&a instanceof n.Parent?!0:a?._zod?.traits?.has(e)}),Object.defineProperty(s,"name",{value:e}),s}var Gn=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},kl={};function on(e){return e&&Object.assign(kl,e),kl}var $e={};Wi($e,{BIGINT_FORMAT_RANGES:()=>hy,Class:()=>Rf,NUMBER_FORMAT_RANGES:()=>Hf,aborted:()=>Qr,allowsEval:()=>Uf,assert:()=>nD,assertEqual:()=>Y3,assertIs:()=>eD,assertNever:()=>tD,assertNotEqual:()=>Q3,assignProp:()=>Bf,cached:()=>us,captureStackTrace:()=>_l,cleanEnum:()=>mD,cleanRegex:()=>ds,clone:()=>Rn,createTransparentProxy:()=>lD,defineLazy:()=>Fe,esc:()=>Yr,escapeRegex:()=>wr,extend:()=>dD,finalizeIssue:()=>wn,floatSafeRemainder:()=>Ff,getElementAtPath:()=>rD,getEnumValues:()=>Pf,getLengthableOrigin:()=>fs,getParsedType:()=>aD,getSizableOrigin:()=>my,isObject:()=>Vi,isPlainObject:()=>Ki,issue:()=>qf,joinValues:()=>xl,jsonStringifyReplacer:()=>Lf,merge:()=>fD,normalizeParams:()=>Q,nullish:()=>cs,numKeys:()=>sD,omit:()=>cD,optionalKeys:()=>Zf,partial:()=>pD,pick:()=>uD,prefixIssues:()=>Pn,primitiveTypes:()=>py,promiseAllObject:()=>iD,propertyKeyTypes:()=>jf,randomString:()=>oD,required:()=>hD,stringifyPrimitive:()=>wl,unwrapMessage:()=>ls});function Y3(e){return e}function Q3(e){return e}function eD(e){}function tD(e){throw new Error}function nD(e){}function Pf(e){let t=Object.values(e).filter(i=>typeof i=="number");return Object.entries(e).filter(([i,r])=>t.indexOf(+i)===-1).map(([i,r])=>r)}function xl(e,t="|"){return e.map(n=>wl(n)).join(t)}function Lf(e,t){return typeof t=="bigint"?t.toString():t}function us(e){return{get value(){{let n=e();return Object.defineProperty(this,"value",{value:n}),n}throw new Error("cached value already set")}}}function cs(e){return e==null}function ds(e){let t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function Ff(e,t){let n=(e.toString().split(".")[1]||"").length,i=(t.toString().split(".")[1]||"").length,r=n>i?n:i,o=Number.parseInt(e.toFixed(r).replace(".","")),s=Number.parseInt(t.toFixed(r).replace(".",""));return o%s/10**r}function Fe(e,t,n){Object.defineProperty(e,t,{get(){{let r=n();return e[t]=r,r}throw new Error("cached value already set")},set(r){Object.defineProperty(e,t,{value:r})},configurable:!0})}function Bf(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function rD(e,t){return t?t.reduce((n,i)=>n?.[i],e):e}function iD(e){let t=Object.keys(e),n=t.map(i=>e[i]);return Promise.all(n).then(i=>{let r={};for(let o=0;o<t.length;o++)r[t[o]]=i[o];return r})}function oD(e=10){let t="abcdefghijklmnopqrstuvwxyz",n="";for(let i=0;i<e;i++)n+=t[Math.floor(Math.random()*t.length)];return n}function Yr(e){return JSON.stringify(e)}var _l=Error.captureStackTrace?Error.captureStackTrace:(...e)=>{};function Vi(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var Uf=us(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function Ki(e){if(Vi(e)===!1)return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(Vi(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function sD(e){let t=0;for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t++;return t}var aD=e=>{let t=typeof e;switch(t){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(e)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(e)?"array":e===null?"null":e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?"promise":typeof Map<"u"&&e instanceof Map?"map":typeof Set<"u"&&e instanceof Set?"set":typeof Date<"u"&&e instanceof Date?"date":typeof File<"u"&&e instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${t}`)}},jf=new Set(["string","number","symbol"]),py=new Set(["string","number","bigint","boolean","symbol","undefined"]);function wr(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Rn(e,t,n){let i=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(i._zod.parent=e),i}function Q(e){let t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function lD(e){let t;return new Proxy({},{get(n,i,r){return t??(t=e()),Reflect.get(t,i,r)},set(n,i,r,o){return t??(t=e()),Reflect.set(t,i,r,o)},has(n,i){return t??(t=e()),Reflect.has(t,i)},deleteProperty(n,i){return t??(t=e()),Reflect.deleteProperty(t,i)},ownKeys(n){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(n,i){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,i)},defineProperty(n,i,r){return t??(t=e()),Reflect.defineProperty(t,i,r)}})}function wl(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function Zf(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}var Hf={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},hy={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function uD(e,t){let n={},i=e._zod.def;for(let r in t){if(!(r in i.shape))throw new Error(`Unrecognized key: "${r}"`);t[r]&&(n[r]=i.shape[r])}return Rn(e,{...e._zod.def,shape:n,checks:[]})}function cD(e,t){let n={...e._zod.def.shape},i=e._zod.def;for(let r in t){if(!(r in i.shape))throw new Error(`Unrecognized key: "${r}"`);t[r]&&delete n[r]}return Rn(e,{...e._zod.def,shape:n,checks:[]})}function dD(e,t){if(!Ki(t))throw new Error("Invalid input to extend: expected a plain object");let n={...e._zod.def,get shape(){let i={...e._zod.def.shape,...t};return Bf(this,"shape",i),i},checks:[]};return Rn(e,n)}function fD(e,t){return Rn(e,{...e._zod.def,get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return Bf(this,"shape",n),n},catchall:t._zod.def.catchall,checks:[]})}function pD(e,t,n){let i=t._zod.def.shape,r={...i};if(n)for(let o in n){if(!(o in i))throw new Error(`Unrecognized key: "${o}"`);n[o]&&(r[o]=e?new e({type:"optional",innerType:i[o]}):i[o])}else for(let o in i)r[o]=e?new e({type:"optional",innerType:i[o]}):i[o];return Rn(t,{...t._zod.def,shape:r,checks:[]})}function hD(e,t,n){let i=t._zod.def.shape,r={...i};if(n)for(let o in n){if(!(o in r))throw new Error(`Unrecognized key: "${o}"`);n[o]&&(r[o]=new e({type:"nonoptional",innerType:i[o]}))}else for(let o in i)r[o]=new e({type:"nonoptional",innerType:i[o]});return Rn(t,{...t._zod.def,shape:r,checks:[]})}function Qr(e,t=0){for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function Pn(e,t){return t.map(n=>{var i;return(i=n).path??(i.path=[]),n.path.unshift(e),n})}function ls(e){return typeof e=="string"?e:e?.message}function wn(e,t,n){let i={...e,path:e.path??[]};if(!e.message){let r=ls(e.inst?._zod.def?.error?.(e))??ls(t?.error?.(e))??ls(n.customError?.(e))??ls(n.localeError?.(e))??"Invalid input";i.message=r}return delete i.inst,delete i.continue,t?.reportInput||delete i.input,i}function my(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function fs(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function qf(...e){let[t,n,i]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:i}:{...t}}function mD(e){return Object.entries(e).filter(([t,n])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}var Rf=class{constructor(...t){}};var gy=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),Object.defineProperty(e,"message",{get(){return JSON.stringify(t,Lf,2)},enumerable:!0}),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Sl=T("$ZodError",gy),Wf=T("$ZodError",gy,{Parent:Error});function by(e,t=n=>n.message){let n={},i=[];for(let r of e.issues)r.path.length>0?(n[r.path[0]]=n[r.path[0]]||[],n[r.path[0]].push(t(r))):i.push(t(r));return{formErrors:i,fieldErrors:n}}function vy(e,t){let n=t||function(o){return o.message},i={_errors:[]},r=o=>{for(let s of o.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(a=>r({issues:a}));else if(s.code==="invalid_key")r({issues:s.issues});else if(s.code==="invalid_element")r({issues:s.issues});else if(s.path.length===0)i._errors.push(n(s));else{let a=i,l=0;for(;l<s.path.length;){let u=s.path[l];l===s.path.length-1?(a[u]=a[u]||{_errors:[]},a[u]._errors.push(n(s))):a[u]=a[u]||{_errors:[]},a=a[u],l++}}};return r(e),i}var yy=e=>(t,n,i,r)=>{let o=i?Object.assign(i,{async:!1}):{async:!1},s=t._zod.run({value:n,issues:[]},o);if(s instanceof Promise)throw new Gn;if(s.issues.length){let a=new(r?.Err??e)(s.issues.map(l=>wn(l,o,on())));throw _l(a,r?.callee),a}return s.value};var ky=e=>async(t,n,i,r)=>{let o=i?Object.assign(i,{async:!0}):{async:!0},s=t._zod.run({value:n,issues:[]},o);if(s instanceof Promise&&(s=await s),s.issues.length){let a=new(r?.Err??e)(s.issues.map(l=>wn(l,o,on())));throw _l(a,r?.callee),a}return s.value};var Vf=e=>(t,n,i)=>{let r=i?{...i,async:!1}:{async:!1},o=t._zod.run({value:n,issues:[]},r);if(o instanceof Promise)throw new Gn;return o.issues.length?{success:!1,error:new(e??Sl)(o.issues.map(s=>wn(s,r,on())))}:{success:!0,data:o.value}},ps=Vf(Wf),Kf=e=>async(t,n,i)=>{let r=i?Object.assign(i,{async:!0}):{async:!0},o=t._zod.run({value:n,issues:[]},r);return o instanceof Promise&&(o=await o),o.issues.length?{success:!1,error:new e(o.issues.map(s=>wn(s,r,on())))}:{success:!0,data:o.value}},El=Kf(Wf);var xy=/^[cC][^\s-]{8,}$/,_y=/^[0-9a-z]+$/,wy=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Sy=/^[0-9a-vA-V]{20}$/,Ey=/^[A-Za-z0-9]{27}$/,$y=/^[a-zA-Z0-9_-]{21}$/,Cy=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/;var Ty=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Jf=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$/;var Iy=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/;var bD="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Ay(){return new RegExp(bD,"u")}var My=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,zy=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})$/,Dy=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Ny=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Oy=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Gf=/^[A-Za-z0-9_-]*$/,Ry=/^([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+$/;var Py=/^\+(?:[0-9]){6,14}[0-9]$/,Ly="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",Fy=new RegExp(`^${Ly}$`);function By(e){let t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Uy(e){return new RegExp(`^${By(e)}$`)}function jy(e){let t=By({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-]\\d{2}:\\d{2})");let i=`${t}(?:${n.join("|")})`;return new RegExp(`^${Ly}T(?:${i})$`)}var Zy=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)};var Hy=/^\d+$/,qy=/^-?\d+(?:\.\d+)?/i,Wy=/true|false/i,Vy=/null/i;var Ky=/^[^A-Z]*$/,Jy=/^[^a-z]*$/;var Mt=T("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Gy={number:"number",bigint:"bigint",object:"date"},Yf=T("$ZodCheckLessThan",(e,t)=>{Mt.init(e,t);let n=Gy[typeof t.value];e._zod.onattach.push(i=>{let r=i._zod.bag,o=(t.inclusive?r.maximum:r.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<o&&(t.inclusive?r.maximum=t.value:r.exclusiveMaximum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value<=t.value:i.value<t.value)||i.issues.push({origin:n,code:"too_big",maximum:t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Qf=T("$ZodCheckGreaterThan",(e,t)=>{Mt.init(e,t);let n=Gy[typeof t.value];e._zod.onattach.push(i=>{let r=i._zod.bag,o=(t.inclusive?r.minimum:r.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>o&&(t.inclusive?r.minimum=t.value:r.exclusiveMinimum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value>=t.value:i.value>t.value)||i.issues.push({origin:n,code:"too_small",minimum:t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Xy=T("$ZodCheckMultipleOf",(e,t)=>{Mt.init(e,t),e._zod.onattach.push(n=>{var i;(i=n._zod.bag).multipleOf??(i.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%t.value===BigInt(0):Ff(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),Yy=T("$ZodCheckNumberFormat",(e,t)=>{Mt.init(e,t),t.format=t.format||"float64";let n=t.format?.includes("int"),i=n?"int":"number",[r,o]=Hf[t.format];e._zod.onattach.push(s=>{let a=s._zod.bag;a.format=t.format,a.minimum=r,a.maximum=o,n&&(a.pattern=Hy)}),e._zod.check=s=>{let a=s.value;if(n){if(!Number.isInteger(a)){s.issues.push({expected:i,format:t.format,code:"invalid_type",input:a,inst:e});return}if(!Number.isSafeInteger(a)){a>0?s.issues.push({input:a,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,continue:!t.abort}):s.issues.push({input:a,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,continue:!t.abort});return}}a<r&&s.issues.push({origin:"number",input:a,code:"too_small",minimum:r,inclusive:!0,inst:e,continue:!t.abort}),a>o&&s.issues.push({origin:"number",input:a,code:"too_big",maximum:o,inst:e})}});var Qy=T("$ZodCheckMaxLength",(e,t)=>{var n;Mt.init(e,t),(n=e._zod.def).when??(n.when=i=>{let r=i.value;return!cs(r)&&r.length!==void 0}),e._zod.onattach.push(i=>{let r=i._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<r&&(i._zod.bag.maximum=t.maximum)}),e._zod.check=i=>{let r=i.value;if(r.length<=t.maximum)return;let s=fs(r);i.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),e1=T("$ZodCheckMinLength",(e,t)=>{var n;Mt.init(e,t),(n=e._zod.def).when??(n.when=i=>{let r=i.value;return!cs(r)&&r.length!==void 0}),e._zod.onattach.push(i=>{let r=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>r&&(i._zod.bag.minimum=t.minimum)}),e._zod.check=i=>{let r=i.value;if(r.length>=t.minimum)return;let s=fs(r);i.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),t1=T("$ZodCheckLengthEquals",(e,t)=>{var n;Mt.init(e,t),(n=e._zod.def).when??(n.when=i=>{let r=i.value;return!cs(r)&&r.length!==void 0}),e._zod.onattach.push(i=>{let r=i._zod.bag;r.minimum=t.length,r.maximum=t.length,r.length=t.length}),e._zod.check=i=>{let r=i.value,o=r.length;if(o===t.length)return;let s=fs(r),a=o>t.length;i.issues.push({origin:s,...a?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:i.value,inst:e,continue:!t.abort})}}),hs=T("$ZodCheckStringFormat",(e,t)=>{var n,i;Mt.init(e,t),e._zod.onattach.push(r=>{let o=r._zod.bag;o.format=t.format,t.pattern&&(o.patterns??(o.patterns=new Set),o.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:t.format,input:r.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(i=e._zod).check??(i.check=()=>{})}),n1=T("$ZodCheckRegex",(e,t)=>{hs.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),r1=T("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Ky),hs.init(e,t)}),i1=T("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=Jy),hs.init(e,t)}),o1=T("$ZodCheckIncludes",(e,t)=>{Mt.init(e,t);let n=wr(t.includes),i=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=i,e._zod.onattach.push(r=>{let o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(i)}),e._zod.check=r=>{r.value.includes(t.includes,t.position)||r.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:r.value,inst:e,continue:!t.abort})}}),s1=T("$ZodCheckStartsWith",(e,t)=>{Mt.init(e,t);let n=new RegExp(`^${wr(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(i=>{let r=i._zod.bag;r.patterns??(r.patterns=new Set),r.patterns.add(n)}),e._zod.check=i=>{i.value.startsWith(t.prefix)||i.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:i.value,inst:e,continue:!t.abort})}}),a1=T("$ZodCheckEndsWith",(e,t)=>{Mt.init(e,t);let n=new RegExp(`.*${wr(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(i=>{let r=i._zod.bag;r.patterns??(r.patterns=new Set),r.patterns.add(n)}),e._zod.check=i=>{i.value.endsWith(t.suffix)||i.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:i.value,inst:e,continue:!t.abort})}});var l1=T("$ZodCheckOverwrite",(e,t)=>{Mt.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});var $l=class{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}let i=t.split(`
4
+ `).filter(s=>s),r=Math.min(...i.map(s=>s.length-s.trimStart().length)),o=i.map(s=>s.slice(r)).map(s=>" ".repeat(this.indent*2)+s);for(let s of o)this.content.push(s)}compile(){let t=Function,n=this?.args,r=[...(this?.content??[""]).map(o=>` ${o}`)];return new t(...n,r.join(`
5
+ `))}};var c1={major:4,minor:0,patch:0};var Be=T("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=c1;let i=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&i.unshift(e);for(let r of i)for(let o of r._zod.onattach)o(e);if(i.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let r=(o,s,a)=>{let l=Qr(o),u;for(let c of s){if(c._zod.def.when){if(!c._zod.def.when(o))continue}else if(l)continue;let d=o.issues.length,f=c._zod.check(o);if(f instanceof Promise&&a?.async===!1)throw new Gn;if(u||f instanceof Promise)u=(u??Promise.resolve()).then(async()=>{await f,o.issues.length!==d&&(l||(l=Qr(o,d)))});else{if(o.issues.length===d)continue;l||(l=Qr(o,d))}}return u?u.then(()=>o):o};e._zod.run=(o,s)=>{let a=e._zod.parse(o,s);if(a instanceof Promise){if(s.async===!1)throw new Gn;return a.then(l=>r(l,i,s))}return r(a,i,s)}}e["~standard"]={validate:r=>{try{let o=ps(e,r);return o.success?{value:o.data}:{issues:o.error?.issues}}catch{return El(e,r).then(s=>s.success?{value:s.data}:{issues:s.error?.issues})}},vendor:"zod",version:1}}),Tl=T("$ZodString",(e,t)=>{Be.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Zy(e._zod.bag),e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),Ze=T("$ZodStringFormat",(e,t)=>{hs.init(e,t),Tl.init(e,t)}),k1=T("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Ty),Ze.init(e,t)}),x1=T("$ZodUUID",(e,t)=>{if(t.version){let i={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(i===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=Jf(i))}else t.pattern??(t.pattern=Jf());Ze.init(e,t)}),_1=T("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=Iy),Ze.init(e,t)}),w1=T("$ZodURL",(e,t)=>{Ze.init(e,t),e._zod.check=n=>{try{let i=n.value,r=new URL(i),o=r.href;t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(r.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:Ry.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(r.protocol.endsWith(":")?r.protocol.slice(0,-1):r.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),!i.endsWith("/")&&o.endsWith("/")?n.value=o.slice(0,-1):n.value=o;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),S1=T("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=Ay()),Ze.init(e,t)}),E1=T("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=$y),Ze.init(e,t)}),$1=T("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=xy),Ze.init(e,t)}),C1=T("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=_y),Ze.init(e,t)}),T1=T("$ZodULID",(e,t)=>{t.pattern??(t.pattern=wy),Ze.init(e,t)}),I1=T("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Sy),Ze.init(e,t)}),A1=T("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Ey),Ze.init(e,t)}),M1=T("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=jy(t)),Ze.init(e,t)}),z1=T("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=Fy),Ze.init(e,t)}),D1=T("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=Uy(t)),Ze.init(e,t)}),N1=T("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Cy),Ze.init(e,t)}),O1=T("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=My),Ze.init(e,t),e._zod.onattach.push(n=>{let i=n._zod.bag;i.format="ipv4"})}),R1=T("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=zy),Ze.init(e,t),e._zod.onattach.push(n=>{let i=n._zod.bag;i.format="ipv6"}),e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),P1=T("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=Dy),Ze.init(e,t)}),L1=T("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=Ny),Ze.init(e,t),e._zod.check=n=>{let[i,r]=n.value.split("/");try{if(!r)throw new Error;let o=Number(r);if(`${o}`!==r)throw new Error;if(o<0||o>128)throw new Error;new URL(`http://[${i}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function F1(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}var B1=T("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Oy),Ze.init(e,t),e._zod.onattach.push(n=>{n._zod.bag.contentEncoding="base64"}),e._zod.check=n=>{F1(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function vD(e){if(!Gf.test(e))return!1;let t=e.replace(/[-_]/g,i=>i==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return F1(n)}var U1=T("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=Gf),Ze.init(e,t),e._zod.onattach.push(n=>{n._zod.bag.contentEncoding="base64url"}),e._zod.check=n=>{vD(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),j1=T("$ZodE164",(e,t)=>{t.pattern??(t.pattern=Py),Ze.init(e,t)});function yD(e,t=null){try{let n=e.split(".");if(n.length!==3)return!1;let[i]=n;if(!i)return!1;let r=JSON.parse(atob(i));return!("typ"in r&&r?.typ!=="JWT"||!r.alg||t&&(!("alg"in r)||r.alg!==t))}catch{return!1}}var Z1=T("$ZodJWT",(e,t)=>{Ze.init(e,t),e._zod.check=n=>{yD(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}});var tp=T("$ZodNumber",(e,t)=>{Be.init(e,t),e._zod.pattern=e._zod.bag.pattern??qy,e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let r=n.value;if(typeof r=="number"&&!Number.isNaN(r)&&Number.isFinite(r))return n;let o=typeof r=="number"?Number.isNaN(r)?"NaN":Number.isFinite(r)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:r,inst:e,...o?{received:o}:{}}),n}}),H1=T("$ZodNumber",(e,t)=>{Yy.init(e,t),tp.init(e,t)}),q1=T("$ZodBoolean",(e,t)=>{Be.init(e,t),e._zod.pattern=Wy,e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=!!n.value}catch{}let r=n.value;return typeof r=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:r,inst:e}),n}});var W1=T("$ZodNull",(e,t)=>{Be.init(e,t),e._zod.pattern=Vy,e._zod.values=new Set([null]),e._zod.parse=(n,i)=>{let r=n.value;return r===null||n.issues.push({expected:"null",code:"invalid_type",input:r,inst:e}),n}});var V1=T("$ZodUnknown",(e,t)=>{Be.init(e,t),e._zod.parse=n=>n}),K1=T("$ZodNever",(e,t)=>{Be.init(e,t),e._zod.parse=(n,i)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)});function d1(e,t,n){e.issues.length&&t.issues.push(...Pn(n,e.issues)),t.value[n]=e.value}var J1=T("$ZodArray",(e,t)=>{Be.init(e,t),e._zod.parse=(n,i)=>{let r=n.value;if(!Array.isArray(r))return n.issues.push({expected:"array",code:"invalid_type",input:r,inst:e}),n;n.value=Array(r.length);let o=[];for(let s=0;s<r.length;s++){let a=r[s],l=t.element._zod.run({value:a,issues:[]},i);l instanceof Promise?o.push(l.then(u=>d1(u,n,s))):d1(l,n,s)}return o.length?Promise.all(o).then(()=>n):n}});function Cl(e,t,n){e.issues.length&&t.issues.push(...Pn(n,e.issues)),t.value[n]=e.value}function f1(e,t,n,i){e.issues.length?i[n]===void 0?n in i?t.value[n]=void 0:t.value[n]=e.value:t.issues.push(...Pn(n,e.issues)):e.value===void 0?n in i&&(t.value[n]=void 0):t.value[n]=e.value}var G1=T("$ZodObject",(e,t)=>{Be.init(e,t);let n=us(()=>{let d=Object.keys(t.shape);for(let p of d)if(!(t.shape[p]instanceof Be))throw new Error(`Invalid element at key "${p}": expected a Zod schema`);let f=Zf(t.shape);return{shape:t.shape,keys:d,keySet:new Set(d),numKeys:d.length,optionalKeys:new Set(f)}});Fe(e._zod,"propValues",()=>{let d=t.shape,f={};for(let p in d){let h=d[p]._zod;if(h.values){f[p]??(f[p]=new Set);for(let m of h.values)f[p].add(m)}}return f});let i=d=>{let f=new $l(["shape","payload","ctx"]),p=n.value,h=v=>{let y=Yr(v);return`shape[${y}]._zod.run({ value: input[${y}], issues: [] }, ctx)`};f.write("const input = payload.value;");let m=Object.create(null),g=0;for(let v of p.keys)m[v]=`key_${g++}`;f.write("const newResult = {}");for(let v of p.keys)if(p.optionalKeys.has(v)){let y=m[v];f.write(`const ${y} = ${h(v)};`);let x=Yr(v);f.write(`
6
+ if (${y}.issues.length) {
7
+ if (input[${x}] === undefined) {
8
+ if (${x} in input) {
9
+ newResult[${x}] = undefined;
10
+ }
11
+ } else {
12
+ payload.issues = payload.issues.concat(
13
+ ${y}.issues.map((iss) => ({
14
+ ...iss,
15
+ path: iss.path ? [${x}, ...iss.path] : [${x}],
16
+ }))
17
+ );
18
+ }
19
+ } else if (${y}.value === undefined) {
20
+ if (${x} in input) newResult[${x}] = undefined;
21
+ } else {
22
+ newResult[${x}] = ${y}.value;
23
+ }
24
+ `)}else{let y=m[v];f.write(`const ${y} = ${h(v)};`),f.write(`
25
+ if (${y}.issues.length) payload.issues = payload.issues.concat(${y}.issues.map(iss => ({
26
+ ...iss,
27
+ path: iss.path ? [${Yr(v)}, ...iss.path] : [${Yr(v)}]
28
+ })));`),f.write(`newResult[${Yr(v)}] = ${y}.value`)}f.write("payload.value = newResult;"),f.write("return payload;");let b=f.compile();return(v,y)=>b(d,v,y)},r,o=Vi,s=!kl.jitless,l=s&&Uf.value,u=t.catchall,c;e._zod.parse=(d,f)=>{c??(c=n.value);let p=d.value;if(!o(p))return d.issues.push({expected:"object",code:"invalid_type",input:p,inst:e}),d;let h=[];if(s&&l&&f?.async===!1&&f.jitless!==!0)r||(r=i(t.shape)),d=r(d,f);else{d.value={};let y=c.shape;for(let x of c.keys){let C=y[x],A=C._zod.run({value:p[x],issues:[]},f),D=C._zod.optin==="optional"&&C._zod.optout==="optional";A instanceof Promise?h.push(A.then(M=>D?f1(M,d,x,p):Cl(M,d,x))):D?f1(A,d,x,p):Cl(A,d,x)}}if(!u)return h.length?Promise.all(h).then(()=>d):d;let m=[],g=c.keySet,b=u._zod,v=b.def.type;for(let y of Object.keys(p)){if(g.has(y))continue;if(v==="never"){m.push(y);continue}let x=b.run({value:p[y],issues:[]},f);x instanceof Promise?h.push(x.then(C=>Cl(C,d,y))):Cl(x,d,y)}return m.length&&d.issues.push({code:"unrecognized_keys",keys:m,input:p,inst:e}),h.length?Promise.all(h).then(()=>d):d}});function p1(e,t,n,i){for(let r of e)if(r.issues.length===0)return t.value=r.value,t;return t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(r=>r.issues.map(o=>wn(o,i,on())))}),t}var np=T("$ZodUnion",(e,t)=>{Be.init(e,t),Fe(e._zod,"optin",()=>t.options.some(n=>n._zod.optin==="optional")?"optional":void 0),Fe(e._zod,"optout",()=>t.options.some(n=>n._zod.optout==="optional")?"optional":void 0),Fe(e._zod,"values",()=>{if(t.options.every(n=>n._zod.values))return new Set(t.options.flatMap(n=>Array.from(n._zod.values)))}),Fe(e._zod,"pattern",()=>{if(t.options.every(n=>n._zod.pattern)){let n=t.options.map(i=>i._zod.pattern);return new RegExp(`^(${n.map(i=>ds(i.source)).join("|")})$`)}}),e._zod.parse=(n,i)=>{let r=!1,o=[];for(let s of t.options){let a=s._zod.run({value:n.value,issues:[]},i);if(a instanceof Promise)o.push(a),r=!0;else{if(a.issues.length===0)return a;o.push(a)}}return r?Promise.all(o).then(s=>p1(s,n,e,i)):p1(o,n,e,i)}}),X1=T("$ZodDiscriminatedUnion",(e,t)=>{np.init(e,t);let n=e._zod.parse;Fe(e._zod,"propValues",()=>{let r={};for(let o of t.options){let s=o._zod.propValues;if(!s||Object.keys(s).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(o)}"`);for(let[a,l]of Object.entries(s)){r[a]||(r[a]=new Set);for(let u of l)r[a].add(u)}}return r});let i=us(()=>{let r=t.options,o=new Map;for(let s of r){let a=s._zod.propValues[t.discriminator];if(!a||a.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(s)}"`);for(let l of a){if(o.has(l))throw new Error(`Duplicate discriminator value "${String(l)}"`);o.set(l,s)}}return o});e._zod.parse=(r,o)=>{let s=r.value;if(!Vi(s))return r.issues.push({code:"invalid_type",expected:"object",input:s,inst:e}),r;let a=i.value.get(s?.[t.discriminator]);return a?a._zod.run(r,o):t.unionFallback?n(r,o):(r.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",input:s,path:[t.discriminator],inst:e}),r)}}),Y1=T("$ZodIntersection",(e,t)=>{Be.init(e,t),e._zod.parse=(n,i)=>{let r=n.value,o=t.left._zod.run({value:r,issues:[]},i),s=t.right._zod.run({value:r,issues:[]},i);return o instanceof Promise||s instanceof Promise?Promise.all([o,s]).then(([l,u])=>h1(n,l,u)):h1(n,o,s)}});function ep(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Ki(e)&&Ki(t)){let n=Object.keys(t),i=Object.keys(e).filter(o=>n.indexOf(o)!==-1),r={...e,...t};for(let o of i){let s=ep(e[o],t[o]);if(!s.valid)return{valid:!1,mergeErrorPath:[o,...s.mergeErrorPath]};r[o]=s.data}return{valid:!0,data:r}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let i=0;i<e.length;i++){let r=e[i],o=t[i],s=ep(r,o);if(!s.valid)return{valid:!1,mergeErrorPath:[i,...s.mergeErrorPath]};n.push(s.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function h1(e,t,n){if(t.issues.length&&e.issues.push(...t.issues),n.issues.length&&e.issues.push(...n.issues),Qr(e))return e;let i=ep(t.value,n.value);if(!i.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(i.mergeErrorPath)}`);return e.value=i.data,e}var Q1=T("$ZodRecord",(e,t)=>{Be.init(e,t),e._zod.parse=(n,i)=>{let r=n.value;if(!Ki(r))return n.issues.push({expected:"record",code:"invalid_type",input:r,inst:e}),n;let o=[];if(t.keyType._zod.values){let s=t.keyType._zod.values;n.value={};for(let l of s)if(typeof l=="string"||typeof l=="number"||typeof l=="symbol"){let u=t.valueType._zod.run({value:r[l],issues:[]},i);u instanceof Promise?o.push(u.then(c=>{c.issues.length&&n.issues.push(...Pn(l,c.issues)),n.value[l]=c.value})):(u.issues.length&&n.issues.push(...Pn(l,u.issues)),n.value[l]=u.value)}let a;for(let l in r)s.has(l)||(a=a??[],a.push(l));a&&a.length>0&&n.issues.push({code:"unrecognized_keys",input:r,inst:e,keys:a})}else{n.value={};for(let s of Reflect.ownKeys(r)){if(s==="__proto__")continue;let a=t.keyType._zod.run({value:s,issues:[]},i);if(a instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(a.issues.length){n.issues.push({origin:"record",code:"invalid_key",issues:a.issues.map(u=>wn(u,i,on())),input:s,path:[s],inst:e}),n.value[a.value]=a.value;continue}let l=t.valueType._zod.run({value:r[s],issues:[]},i);l instanceof Promise?o.push(l.then(u=>{u.issues.length&&n.issues.push(...Pn(s,u.issues)),n.value[a.value]=u.value})):(l.issues.length&&n.issues.push(...Pn(s,l.issues)),n.value[a.value]=l.value)}}return o.length?Promise.all(o).then(()=>n):n}});var ek=T("$ZodEnum",(e,t)=>{Be.init(e,t);let n=Pf(t.entries);e._zod.values=new Set(n),e._zod.pattern=new RegExp(`^(${n.filter(i=>jf.has(typeof i)).map(i=>typeof i=="string"?wr(i):i.toString()).join("|")})$`),e._zod.parse=(i,r)=>{let o=i.value;return e._zod.values.has(o)||i.issues.push({code:"invalid_value",values:n,input:o,inst:e}),i}}),tk=T("$ZodLiteral",(e,t)=>{Be.init(e,t),e._zod.values=new Set(t.values),e._zod.pattern=new RegExp(`^(${t.values.map(n=>typeof n=="string"?wr(n):n?n.toString():String(n)).join("|")})$`),e._zod.parse=(n,i)=>{let r=n.value;return e._zod.values.has(r)||n.issues.push({code:"invalid_value",values:t.values,input:r,inst:e}),n}});var nk=T("$ZodTransform",(e,t)=>{Be.init(e,t),e._zod.parse=(n,i)=>{let r=t.transform(n.value,n);if(i.async)return(r instanceof Promise?r:Promise.resolve(r)).then(s=>(n.value=s,n));if(r instanceof Promise)throw new Gn;return n.value=r,n}}),rk=T("$ZodOptional",(e,t)=>{Be.init(e,t),e._zod.optin="optional",e._zod.optout="optional",Fe(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Fe(e._zod,"pattern",()=>{let n=t.innerType._zod.pattern;return n?new RegExp(`^(${ds(n.source)})?$`):void 0}),e._zod.parse=(n,i)=>t.innerType._zod.optin==="optional"?t.innerType._zod.run(n,i):n.value===void 0?n:t.innerType._zod.run(n,i)}),ik=T("$ZodNullable",(e,t)=>{Be.init(e,t),Fe(e._zod,"optin",()=>t.innerType._zod.optin),Fe(e._zod,"optout",()=>t.innerType._zod.optout),Fe(e._zod,"pattern",()=>{let n=t.innerType._zod.pattern;return n?new RegExp(`^(${ds(n.source)}|null)$`):void 0}),Fe(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,i)=>n.value===null?n:t.innerType._zod.run(n,i)}),ok=T("$ZodDefault",(e,t)=>{Be.init(e,t),e._zod.optin="optional",Fe(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,i)=>{if(n.value===void 0)return n.value=t.defaultValue,n;let r=t.innerType._zod.run(n,i);return r instanceof Promise?r.then(o=>m1(o,t)):m1(r,t)}});function m1(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var sk=T("$ZodPrefault",(e,t)=>{Be.init(e,t),e._zod.optin="optional",Fe(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,i)=>(n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,i))}),ak=T("$ZodNonOptional",(e,t)=>{Be.init(e,t),Fe(e._zod,"values",()=>{let n=t.innerType._zod.values;return n?new Set([...n].filter(i=>i!==void 0)):void 0}),e._zod.parse=(n,i)=>{let r=t.innerType._zod.run(n,i);return r instanceof Promise?r.then(o=>g1(o,e)):g1(r,e)}});function g1(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}var lk=T("$ZodCatch",(e,t)=>{Be.init(e,t),e._zod.optin="optional",Fe(e._zod,"optout",()=>t.innerType._zod.optout),Fe(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,i)=>{let r=t.innerType._zod.run(n,i);return r instanceof Promise?r.then(o=>(n.value=o.value,o.issues.length&&(n.value=t.catchValue({...n,error:{issues:o.issues.map(s=>wn(s,i,on()))},input:n.value}),n.issues=[]),n)):(n.value=r.value,r.issues.length&&(n.value=t.catchValue({...n,error:{issues:r.issues.map(o=>wn(o,i,on()))},input:n.value}),n.issues=[]),n)}});var uk=T("$ZodPipe",(e,t)=>{Be.init(e,t),Fe(e._zod,"values",()=>t.in._zod.values),Fe(e._zod,"optin",()=>t.in._zod.optin),Fe(e._zod,"optout",()=>t.out._zod.optout),e._zod.parse=(n,i)=>{let r=t.in._zod.run(n,i);return r instanceof Promise?r.then(o=>b1(o,t,i)):b1(r,t,i)}});function b1(e,t,n){return Qr(e)?e:t.out._zod.run({value:e.value,issues:e.issues},n)}var ck=T("$ZodReadonly",(e,t)=>{Be.init(e,t),Fe(e._zod,"propValues",()=>t.innerType._zod.propValues),Fe(e._zod,"values",()=>t.innerType._zod.values),Fe(e._zod,"optin",()=>t.innerType._zod.optin),Fe(e._zod,"optout",()=>t.innerType._zod.optout),e._zod.parse=(n,i)=>{let r=t.innerType._zod.run(n,i);return r instanceof Promise?r.then(v1):v1(r)}});function v1(e){return e.value=Object.freeze(e.value),e}var dk=T("$ZodCustom",(e,t)=>{Mt.init(e,t),Be.init(e,t),e._zod.parse=(n,i)=>n,e._zod.check=n=>{let i=n.value,r=t.fn(i);if(r instanceof Promise)return r.then(o=>y1(o,n,i,e));y1(r,n,i,e)}});function y1(e,t,n,i){if(!e){let r={code:"custom",input:n,inst:i,path:[...i._zod.def.path??[]],continue:!i._zod.def.abort};i._zod.def.params&&(r.params=i._zod.def.params),t.issues.push(qf(r))}}var kD=e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"number";case"object":{if(Array.isArray(e))return"array";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},xD=()=>{let e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"}};function t(i){return e[i]??null}let n={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"};return i=>{switch(i.code){case"invalid_type":return`Invalid input: expected ${i.expected}, received ${kD(i.input)}`;case"invalid_value":return i.values.length===1?`Invalid input: expected ${wl(i.values[0])}`:`Invalid option: expected one of ${xl(i.values,"|")}`;case"too_big":{let r=i.inclusive?"<=":"<",o=t(i.origin);return o?`Too big: expected ${i.origin??"value"} to have ${r}${i.maximum.toString()} ${o.unit??"elements"}`:`Too big: expected ${i.origin??"value"} to be ${r}${i.maximum.toString()}`}case"too_small":{let r=i.inclusive?">=":">",o=t(i.origin);return o?`Too small: expected ${i.origin} to have ${r}${i.minimum.toString()} ${o.unit}`:`Too small: expected ${i.origin} to be ${r}${i.minimum.toString()}`}case"invalid_format":{let r=i;return r.format==="starts_with"?`Invalid string: must start with "${r.prefix}"`:r.format==="ends_with"?`Invalid string: must end with "${r.suffix}"`:r.format==="includes"?`Invalid string: must include "${r.includes}"`:r.format==="regex"?`Invalid string: must match pattern ${r.pattern}`:`Invalid ${n[r.format]??i.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${i.divisor}`;case"unrecognized_keys":return`Unrecognized key${i.keys.length>1?"s":""}: ${xl(i.keys,", ")}`;case"invalid_key":return`Invalid key in ${i.origin}`;case"invalid_union":return"Invalid input";case"invalid_element":return`Invalid value in ${i.origin}`;default:return"Invalid input"}}};function fk(){return{localeError:xD()}}var rp=class{constructor(){this._map=new Map,this._idmap=new Map}add(t,...n){let i=n[0];if(this._map.set(t,i),i&&typeof i=="object"&&"id"in i){if(this._idmap.has(i.id))throw new Error(`ID ${i.id} already exists in the registry`);this._idmap.set(i.id,t)}return this}clear(){return this._map=new Map,this._idmap=new Map,this}remove(t){let n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){let n=t._zod.parent;if(n){let i={...this.get(n)??{}};return delete i.id,{...i,...this._map.get(t)}}return this._map.get(t)}has(t){return this._map.has(t)}};function _D(){return new rp}var ms=_D();function pk(e,t){return new e({type:"string",...Q(t)})}function hk(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...Q(t)})}function ip(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...Q(t)})}function mk(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...Q(t)})}function gk(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...Q(t)})}function bk(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...Q(t)})}function vk(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...Q(t)})}function yk(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...Q(t)})}function kk(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...Q(t)})}function xk(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...Q(t)})}function _k(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...Q(t)})}function wk(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...Q(t)})}function Sk(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...Q(t)})}function Ek(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...Q(t)})}function $k(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...Q(t)})}function Ck(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...Q(t)})}function Tk(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...Q(t)})}function Ik(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...Q(t)})}function Ak(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...Q(t)})}function Mk(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...Q(t)})}function zk(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...Q(t)})}function Dk(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...Q(t)})}function Nk(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...Q(t)})}function Ok(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...Q(t)})}function Rk(e,t){return new e({type:"string",format:"date",check:"string_format",...Q(t)})}function Pk(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...Q(t)})}function Lk(e,t){return new e({type:"string",format:"duration",check:"string_format",...Q(t)})}function Fk(e,t){return new e({type:"number",checks:[],...Q(t)})}function Bk(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...Q(t)})}function Uk(e,t){return new e({type:"boolean",...Q(t)})}function jk(e,t){return new e({type:"null",...Q(t)})}function Zk(e){return new e({type:"unknown"})}function Hk(e,t){return new e({type:"never",...Q(t)})}function Il(e,t){return new Yf({check:"less_than",...Q(t),value:e,inclusive:!1})}function gs(e,t){return new Yf({check:"less_than",...Q(t),value:e,inclusive:!0})}function Al(e,t){return new Qf({check:"greater_than",...Q(t),value:e,inclusive:!1})}function bs(e,t){return new Qf({check:"greater_than",...Q(t),value:e,inclusive:!0})}function Ml(e,t){return new Xy({check:"multiple_of",...Q(t),value:e})}function zl(e,t){return new Qy({check:"max_length",...Q(t),maximum:e})}function Ji(e,t){return new e1({check:"min_length",...Q(t),minimum:e})}function Dl(e,t){return new t1({check:"length_equals",...Q(t),length:e})}function op(e,t){return new n1({check:"string_format",format:"regex",...Q(t),pattern:e})}function sp(e){return new r1({check:"string_format",format:"lowercase",...Q(e)})}function ap(e){return new i1({check:"string_format",format:"uppercase",...Q(e)})}function lp(e,t){return new o1({check:"string_format",format:"includes",...Q(t),includes:e})}function up(e,t){return new s1({check:"string_format",format:"starts_with",...Q(t),prefix:e})}function cp(e,t){return new a1({check:"string_format",format:"ends_with",...Q(t),suffix:e})}function ei(e){return new l1({check:"overwrite",tx:e})}function dp(e){return ei(t=>t.normalize(e))}function fp(){return ei(e=>e.trim())}function pp(){return ei(e=>e.toLowerCase())}function hp(){return ei(e=>e.toUpperCase())}function qk(e,t,n){return new e({type:"array",element:t,...Q(n)})}function Wk(e,t,n){let i=Q(n);return i.abort??(i.abort=!0),new e({type:"custom",check:"custom",fn:t,...i})}function Vk(e,t,n){return new e({type:"custom",check:"custom",fn:t,...Q(n)})}function Nl(e){return!!e._zod}function Ol(e,t){return Nl(e)?ps(e,t):e.safeParse(t)}function Kk(e){if(!e)return;let t;if(Nl(e)?t=e._zod?.def?.shape:t=e.shape,!!t){if(typeof t=="function")try{return t()}catch{return}return t}}function Jk(e){if(Nl(e)){let o=e._zod?.def;if(o){if(o.value!==void 0)return o.value;if(Array.isArray(o.values)&&o.values.length>0)return o.values[0]}}let n=e._def;if(n){if(n.value!==void 0)return n.value;if(Array.isArray(n.values)&&n.values.length>0)return n.values[0]}let i=e.value;if(i!==void 0)return i}var ys={};Wi(ys,{ZodISODate:()=>Xk,ZodISODateTime:()=>Gk,ZodISODuration:()=>Qk,ZodISOTime:()=>Yk,date:()=>gp,datetime:()=>mp,duration:()=>vp,time:()=>bp});var Gk=T("ZodISODateTime",(e,t)=>{M1.init(e,t),We.init(e,t)});function mp(e){return Ok(Gk,e)}var Xk=T("ZodISODate",(e,t)=>{z1.init(e,t),We.init(e,t)});function gp(e){return Rk(Xk,e)}var Yk=T("ZodISOTime",(e,t)=>{D1.init(e,t),We.init(e,t)});function bp(e){return Pk(Yk,e)}var Qk=T("ZodISODuration",(e,t)=>{N1.init(e,t),We.init(e,t)});function vp(e){return Lk(Qk,e)}var ex=(e,t)=>{Sl.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>vy(e,n)},flatten:{value:n=>by(e,n)},addIssue:{value:n=>e.issues.push(n)},addIssues:{value:n=>e.issues.push(...n)},isEmpty:{get(){return e.issues.length===0}}})},lG=T("ZodError",ex),ks=T("ZodError",ex,{Parent:Error});var tx=yy(ks),nx=ky(ks),rx=Vf(ks),ix=Kf(ks);var Ye=T("ZodType",(e,t)=>(Be.init(e,t),e.def=t,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone({...t,checks:[...t.checks??[],...n.map(i=>typeof i=="function"?{_zod:{check:i,def:{check:"custom"},onattach:[]}}:i)]}),e.clone=(n,i)=>Rn(e,n,i),e.brand=()=>e,e.register=((n,i)=>(n.add(e,i),e)),e.parse=(n,i)=>tx(e,n,i,{callee:e.parse}),e.safeParse=(n,i)=>rx(e,n,i),e.parseAsync=async(n,i)=>nx(e,n,i,{callee:e.parseAsync}),e.safeParseAsync=async(n,i)=>ix(e,n,i),e.spa=e.safeParseAsync,e.refine=(n,i)=>e.check(yN(n,i)),e.superRefine=n=>e.check(kN(n)),e.overwrite=n=>e.check(ei(n)),e.optional=()=>Ke(e),e.nullable=()=>ax(e),e.nullish=()=>Ke(ax(e)),e.nonoptional=n=>fN(e,n),e.array=()=>ke(e),e.or=n=>He([e,n]),e.and=n=>Pl(e,n),e.transform=n=>kp(e,px(n)),e.default=n=>uN(e,n),e.prefault=n=>dN(e,n),e.catch=n=>hN(e,n),e.pipe=n=>kp(e,n),e.readonly=()=>bN(e),e.describe=n=>{let i=e.clone();return ms.add(i,{description:n}),i},Object.defineProperty(e,"description",{get(){return ms.get(e)?.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return ms.get(e);let i=e.clone();return ms.add(i,n[0]),i},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),lx=T("_ZodString",(e,t)=>{Tl.init(e,t),Ye.init(e,t);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...i)=>e.check(op(...i)),e.includes=(...i)=>e.check(lp(...i)),e.startsWith=(...i)=>e.check(up(...i)),e.endsWith=(...i)=>e.check(cp(...i)),e.min=(...i)=>e.check(Ji(...i)),e.max=(...i)=>e.check(zl(...i)),e.length=(...i)=>e.check(Dl(...i)),e.nonempty=(...i)=>e.check(Ji(1,...i)),e.lowercase=i=>e.check(sp(i)),e.uppercase=i=>e.check(ap(i)),e.trim=()=>e.check(fp()),e.normalize=(...i)=>e.check(dp(...i)),e.toLowerCase=()=>e.check(pp()),e.toUpperCase=()=>e.check(hp())}),MD=T("ZodString",(e,t)=>{Tl.init(e,t),lx.init(e,t),e.email=n=>e.check(hk(zD,n)),e.url=n=>e.check(yk(DD,n)),e.jwt=n=>e.check(Nk(KD,n)),e.emoji=n=>e.check(kk(ND,n)),e.guid=n=>e.check(ip(ox,n)),e.uuid=n=>e.check(mk(Rl,n)),e.uuidv4=n=>e.check(gk(Rl,n)),e.uuidv6=n=>e.check(bk(Rl,n)),e.uuidv7=n=>e.check(vk(Rl,n)),e.nanoid=n=>e.check(xk(OD,n)),e.guid=n=>e.check(ip(ox,n)),e.cuid=n=>e.check(_k(RD,n)),e.cuid2=n=>e.check(wk(PD,n)),e.ulid=n=>e.check(Sk(LD,n)),e.base64=n=>e.check(Mk(qD,n)),e.base64url=n=>e.check(zk(WD,n)),e.xid=n=>e.check(Ek(FD,n)),e.ksuid=n=>e.check($k(BD,n)),e.ipv4=n=>e.check(Ck(UD,n)),e.ipv6=n=>e.check(Tk(jD,n)),e.cidrv4=n=>e.check(Ik(ZD,n)),e.cidrv6=n=>e.check(Ak(HD,n)),e.e164=n=>e.check(Dk(VD,n)),e.datetime=n=>e.check(mp(n)),e.date=n=>e.check(gp(n)),e.time=n=>e.check(bp(n)),e.duration=n=>e.check(vp(n))});function $(e){return pk(MD,e)}var We=T("ZodStringFormat",(e,t)=>{Ze.init(e,t),lx.init(e,t)}),zD=T("ZodEmail",(e,t)=>{_1.init(e,t),We.init(e,t)});var ox=T("ZodGUID",(e,t)=>{k1.init(e,t),We.init(e,t)});var Rl=T("ZodUUID",(e,t)=>{x1.init(e,t),We.init(e,t)});var DD=T("ZodURL",(e,t)=>{w1.init(e,t),We.init(e,t)});var ND=T("ZodEmoji",(e,t)=>{S1.init(e,t),We.init(e,t)});var OD=T("ZodNanoID",(e,t)=>{E1.init(e,t),We.init(e,t)});var RD=T("ZodCUID",(e,t)=>{$1.init(e,t),We.init(e,t)});var PD=T("ZodCUID2",(e,t)=>{C1.init(e,t),We.init(e,t)});var LD=T("ZodULID",(e,t)=>{T1.init(e,t),We.init(e,t)});var FD=T("ZodXID",(e,t)=>{I1.init(e,t),We.init(e,t)});var BD=T("ZodKSUID",(e,t)=>{A1.init(e,t),We.init(e,t)});var UD=T("ZodIPv4",(e,t)=>{O1.init(e,t),We.init(e,t)});var jD=T("ZodIPv6",(e,t)=>{R1.init(e,t),We.init(e,t)});var ZD=T("ZodCIDRv4",(e,t)=>{P1.init(e,t),We.init(e,t)});var HD=T("ZodCIDRv6",(e,t)=>{L1.init(e,t),We.init(e,t)});var qD=T("ZodBase64",(e,t)=>{B1.init(e,t),We.init(e,t)});var WD=T("ZodBase64URL",(e,t)=>{U1.init(e,t),We.init(e,t)});var VD=T("ZodE164",(e,t)=>{j1.init(e,t),We.init(e,t)});var KD=T("ZodJWT",(e,t)=>{Z1.init(e,t),We.init(e,t)});var ux=T("ZodNumber",(e,t)=>{tp.init(e,t),Ye.init(e,t),e.gt=(i,r)=>e.check(Al(i,r)),e.gte=(i,r)=>e.check(bs(i,r)),e.min=(i,r)=>e.check(bs(i,r)),e.lt=(i,r)=>e.check(Il(i,r)),e.lte=(i,r)=>e.check(gs(i,r)),e.max=(i,r)=>e.check(gs(i,r)),e.int=i=>e.check(sx(i)),e.safe=i=>e.check(sx(i)),e.positive=i=>e.check(Al(0,i)),e.nonnegative=i=>e.check(bs(0,i)),e.negative=i=>e.check(Il(0,i)),e.nonpositive=i=>e.check(gs(0,i)),e.multipleOf=(i,r)=>e.check(Ml(i,r)),e.step=(i,r)=>e.check(Ml(i,r)),e.finite=()=>e;let n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function Ie(e){return Fk(ux,e)}var JD=T("ZodNumberFormat",(e,t)=>{H1.init(e,t),ux.init(e,t)});function sx(e){return Bk(JD,e)}var GD=T("ZodBoolean",(e,t)=>{q1.init(e,t),Ye.init(e,t)});function ht(e){return Uk(GD,e)}var XD=T("ZodNull",(e,t)=>{W1.init(e,t),Ye.init(e,t)});function cx(e){return jk(XD,e)}var YD=T("ZodUnknown",(e,t)=>{V1.init(e,t),Ye.init(e,t)});function Ve(){return Zk(YD)}var QD=T("ZodNever",(e,t)=>{K1.init(e,t),Ye.init(e,t)});function eN(e){return Hk(QD,e)}var tN=T("ZodArray",(e,t)=>{J1.init(e,t),Ye.init(e,t),e.element=t.element,e.min=(n,i)=>e.check(Ji(n,i)),e.nonempty=n=>e.check(Ji(1,n)),e.max=(n,i)=>e.check(zl(n,i)),e.length=(n,i)=>e.check(Dl(n,i)),e.unwrap=()=>e.element});function ke(e,t){return qk(tN,e,t)}var dx=T("ZodObject",(e,t)=>{G1.init(e,t),Ye.init(e,t),$e.defineLazy(e,"shape",()=>t.shape),e.keyof=()=>qt(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Ve()}),e.loose=()=>e.clone({...e._zod.def,catchall:Ve()}),e.strict=()=>e.clone({...e._zod.def,catchall:eN()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>$e.extend(e,n),e.merge=n=>$e.merge(e,n),e.pick=n=>$e.pick(e,n),e.omit=n=>$e.omit(e,n),e.partial=(...n)=>$e.partial(hx,e,n[0]),e.required=(...n)=>$e.required(mx,e,n[0])});function H(e,t){let n={type:"object",get shape(){return $e.assignProp(this,"shape",{...e}),this.shape},...$e.normalizeParams(t)};return new dx(n)}function Ft(e,t){return new dx({type:"object",get shape(){return $e.assignProp(this,"shape",{...e}),this.shape},catchall:Ve(),...$e.normalizeParams(t)})}var fx=T("ZodUnion",(e,t)=>{np.init(e,t),Ye.init(e,t),e.options=t.options});function He(e,t){return new fx({type:"union",options:e,...$e.normalizeParams(t)})}var nN=T("ZodDiscriminatedUnion",(e,t)=>{fx.init(e,t),X1.init(e,t)});function xp(e,t,n){return new nN({type:"union",options:t,discriminator:e,...$e.normalizeParams(n)})}var rN=T("ZodIntersection",(e,t)=>{Y1.init(e,t),Ye.init(e,t)});function Pl(e,t){return new rN({type:"intersection",left:e,right:t})}var iN=T("ZodRecord",(e,t)=>{Q1.init(e,t),Ye.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType});function Ue(e,t,n){return new iN({type:"record",keyType:e,valueType:t,...$e.normalizeParams(n)})}var yp=T("ZodEnum",(e,t)=>{ek.init(e,t),Ye.init(e,t),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(i,r)=>{let o={};for(let s of i)if(n.has(s))o[s]=t.entries[s];else throw new Error(`Key ${s} not found in enum`);return new yp({...t,checks:[],...$e.normalizeParams(r),entries:o})},e.exclude=(i,r)=>{let o={...t.entries};for(let s of i)if(n.has(s))delete o[s];else throw new Error(`Key ${s} not found in enum`);return new yp({...t,checks:[],...$e.normalizeParams(r),entries:o})}});function qt(e,t){let n=Array.isArray(e)?Object.fromEntries(e.map(i=>[i,i])):e;return new yp({type:"enum",entries:n,...$e.normalizeParams(t)})}var oN=T("ZodLiteral",(e,t)=>{tk.init(e,t),Ye.init(e,t),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function J(e,t){return new oN({type:"literal",values:Array.isArray(e)?e:[e],...$e.normalizeParams(t)})}var sN=T("ZodTransform",(e,t)=>{nk.init(e,t),Ye.init(e,t),e._zod.parse=(n,i)=>{n.addIssue=o=>{if(typeof o=="string")n.issues.push($e.issue(o,n.value,t));else{let s=o;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=n.value),s.inst??(s.inst=e),s.continue??(s.continue=!0),n.issues.push($e.issue(s))}};let r=t.transform(n.value,n);return r instanceof Promise?r.then(o=>(n.value=o,n)):(n.value=r,n)}});function px(e){return new sN({type:"transform",transform:e})}var hx=T("ZodOptional",(e,t)=>{rk.init(e,t),Ye.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Ke(e){return new hx({type:"optional",innerType:e})}var aN=T("ZodNullable",(e,t)=>{ik.init(e,t),Ye.init(e,t),e.unwrap=()=>e._zod.def.innerType});function ax(e){return new aN({type:"nullable",innerType:e})}var lN=T("ZodDefault",(e,t)=>{ok.init(e,t),Ye.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function uN(e,t){return new lN({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():t}})}var cN=T("ZodPrefault",(e,t)=>{sk.init(e,t),Ye.init(e,t),e.unwrap=()=>e._zod.def.innerType});function dN(e,t){return new cN({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():t}})}var mx=T("ZodNonOptional",(e,t)=>{ak.init(e,t),Ye.init(e,t),e.unwrap=()=>e._zod.def.innerType});function fN(e,t){return new mx({type:"nonoptional",innerType:e,...$e.normalizeParams(t)})}var pN=T("ZodCatch",(e,t)=>{lk.init(e,t),Ye.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function hN(e,t){return new pN({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}var mN=T("ZodPipe",(e,t)=>{uk.init(e,t),Ye.init(e,t),e.in=t.in,e.out=t.out});function kp(e,t){return new mN({type:"pipe",in:e,out:t})}var gN=T("ZodReadonly",(e,t)=>{ck.init(e,t),Ye.init(e,t)});function bN(e){return new gN({type:"readonly",innerType:e})}var gx=T("ZodCustom",(e,t)=>{dk.init(e,t),Ye.init(e,t)});function vN(e){let t=new Mt({check:"custom"});return t._zod.check=e,t}function bx(e,t){return Wk(gx,e??(()=>!0),t)}function yN(e,t={}){return Vk(gx,e,t)}function kN(e){let t=vN(n=>(n.addIssue=i=>{if(typeof i=="string")n.issues.push($e.issue(i,n.value,t._zod.def));else{let r=i;r.fatal&&(r.continue=!1),r.code??(r.code="custom"),r.input??(r.input=n.value),r.inst??(r.inst=t),r.continue??(r.continue=!t._zod.def.abort),n.issues.push($e.issue(r))}},e(n.value,n)));return t}function _p(e,t){return kp(px(e),t)}on(fk());var Sr="io.modelcontextprotocol/related-task",Fl="2.0",ft=bx(e=>e!==null&&(typeof e=="object"||typeof e=="function")),vx=He([$(),Ie().int()]),yx=$(),tX=Ft({ttl:Ie().optional(),pollInterval:Ie().optional()}),xN=H({ttl:Ie().optional()}),_N=H({taskId:$()}),Sp=Ft({progressToken:vx.optional(),[Sr]:_N.optional()}),Xt=H({_meta:Sp.optional()}),xs=Xt.extend({task:xN.optional()}),kx=e=>xs.safeParse(e).success,xt=H({method:$(),params:Xt.loose().optional()}),sn=H({_meta:Sp.optional()}),an=H({method:$(),params:sn.loose().optional()}),_t=Ft({_meta:Sp.optional()}),Xi=He([$(),Ie().int()]),xx=H({jsonrpc:J(Fl),id:Xi,...xt.shape}).strict(),Ep=e=>xx.safeParse(e).success,_x=H({jsonrpc:J(Fl),...an.shape}).strict(),wx=e=>_x.safeParse(e).success,$p=H({jsonrpc:J(Fl),id:Xi,result:_t}).strict(),_s=e=>$p.safeParse(e).success;var Ae;(function(e){e[e.ConnectionClosed=-32e3]="ConnectionClosed",e[e.RequestTimeout=-32001]="RequestTimeout",e[e.ParseError=-32700]="ParseError",e[e.InvalidRequest=-32600]="InvalidRequest",e[e.MethodNotFound=-32601]="MethodNotFound",e[e.InvalidParams=-32602]="InvalidParams",e[e.InternalError=-32603]="InternalError",e[e.UrlElicitationRequired=-32042]="UrlElicitationRequired"})(Ae||(Ae={}));var Cp=H({jsonrpc:J(Fl),id:Xi.optional(),error:H({code:Ie().int(),message:$(),data:Ve().optional()})}).strict();var Sx=e=>Cp.safeParse(e).success;var Ex=He([xx,_x,$p,Cp]),nX=He([$p,Cp]),Bl=_t.strict(),wN=sn.extend({requestId:Xi.optional(),reason:$().optional()}),Ul=an.extend({method:J("notifications/cancelled"),params:wN}),SN=H({src:$(),mimeType:$().optional(),sizes:ke($()).optional(),theme:qt(["light","dark"]).optional()}),ws=H({icons:ke(SN).optional()}),Gi=H({name:$(),title:$().optional()}),Ss=Gi.extend({...Gi.shape,...ws.shape,version:$(),websiteUrl:$().optional(),description:$().optional()}),EN=Pl(H({applyDefaults:ht().optional()}),Ue($(),Ve())),$N=_p(e=>e&&typeof e=="object"&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,Pl(H({form:EN.optional(),url:ft.optional()}),Ue($(),Ve()).optional())),CN=Ft({list:ft.optional(),cancel:ft.optional(),requests:Ft({sampling:Ft({createMessage:ft.optional()}).optional(),elicitation:Ft({create:ft.optional()}).optional()}).optional()}),TN=Ft({list:ft.optional(),cancel:ft.optional(),requests:Ft({tools:Ft({call:ft.optional()}).optional()}).optional()}),IN=H({experimental:Ue($(),ft).optional(),sampling:H({context:ft.optional(),tools:ft.optional()}).optional(),elicitation:$N.optional(),roots:H({listChanged:ht().optional()}).optional(),tasks:CN.optional(),extensions:Ue($(),ft).optional()}),AN=Xt.extend({protocolVersion:$(),capabilities:IN,clientInfo:Ss}),MN=xt.extend({method:J("initialize"),params:AN});var zN=H({experimental:Ue($(),ft).optional(),logging:ft.optional(),completions:ft.optional(),prompts:H({listChanged:ht().optional()}).optional(),resources:H({subscribe:ht().optional(),listChanged:ht().optional()}).optional(),tools:H({listChanged:ht().optional()}).optional(),tasks:TN.optional(),extensions:Ue($(),ft).optional()}),DN=_t.extend({protocolVersion:$(),capabilities:zN,serverInfo:Ss,instructions:$().optional()}),NN=an.extend({method:J("notifications/initialized"),params:sn.optional()});var Yi=xt.extend({method:J("ping"),params:Xt.optional()}),ON=H({progress:Ie(),total:Ke(Ie()),message:Ke($())}),RN=H({...sn.shape,...ON.shape,progressToken:vx}),jl=an.extend({method:J("notifications/progress"),params:RN}),PN=Xt.extend({cursor:yx.optional()}),Es=xt.extend({params:PN.optional()}),$s=_t.extend({nextCursor:yx.optional()}),LN=qt(["working","input_required","completed","failed","cancelled"]),Cs=H({taskId:$(),status:LN,ttl:He([Ie(),cx()]),createdAt:$(),lastUpdatedAt:$(),pollInterval:Ke(Ie()),statusMessage:Ke($())}),Zl=_t.extend({task:Cs}),FN=sn.merge(Cs),Ts=an.extend({method:J("notifications/tasks/status"),params:FN}),Hl=xt.extend({method:J("tasks/get"),params:Xt.extend({taskId:$()})}),ql=_t.merge(Cs),Wl=xt.extend({method:J("tasks/result"),params:Xt.extend({taskId:$()})}),rX=_t.loose(),Vl=Es.extend({method:J("tasks/list")}),Kl=$s.extend({tasks:ke(Cs)}),Jl=xt.extend({method:J("tasks/cancel"),params:Xt.extend({taskId:$()})}),$x=_t.merge(Cs),Cx=H({uri:$(),mimeType:Ke($()),_meta:Ue($(),Ve()).optional()}),Tx=Cx.extend({text:$()}),Tp=$().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:"Invalid Base64 string"}),Ix=Cx.extend({blob:Tp}),Is=qt(["user","assistant"]),Qi=H({audience:ke(Is).optional(),priority:Ie().min(0).max(1).optional(),lastModified:ys.datetime({offset:!0}).optional()}),Ax=H({...Gi.shape,...ws.shape,uri:$(),description:Ke($()),mimeType:Ke($()),size:Ke(Ie()),annotations:Qi.optional(),_meta:Ke(Ft({}))}),BN=H({...Gi.shape,...ws.shape,uriTemplate:$(),description:Ke($()),mimeType:Ke($()),annotations:Qi.optional(),_meta:Ke(Ft({}))}),UN=Es.extend({method:J("resources/list")}),jN=$s.extend({resources:ke(Ax)}),ZN=Es.extend({method:J("resources/templates/list")}),HN=$s.extend({resourceTemplates:ke(BN)}),Ip=Xt.extend({uri:$()}),qN=Ip,WN=xt.extend({method:J("resources/read"),params:qN}),VN=_t.extend({contents:ke(He([Tx,Ix]))}),KN=an.extend({method:J("notifications/resources/list_changed"),params:sn.optional()}),JN=Ip,GN=xt.extend({method:J("resources/subscribe"),params:JN}),XN=Ip,YN=xt.extend({method:J("resources/unsubscribe"),params:XN}),QN=sn.extend({uri:$()}),eO=an.extend({method:J("notifications/resources/updated"),params:QN}),tO=H({name:$(),description:Ke($()),required:Ke(ht())}),nO=H({...Gi.shape,...ws.shape,description:Ke($()),arguments:Ke(ke(tO)),_meta:Ke(Ft({}))}),rO=Es.extend({method:J("prompts/list")}),iO=$s.extend({prompts:ke(nO)}),oO=Xt.extend({name:$(),arguments:Ue($(),$()).optional()}),sO=xt.extend({method:J("prompts/get"),params:oO}),Ap=H({type:J("text"),text:$(),annotations:Qi.optional(),_meta:Ue($(),Ve()).optional()}),Mp=H({type:J("image"),data:Tp,mimeType:$(),annotations:Qi.optional(),_meta:Ue($(),Ve()).optional()}),zp=H({type:J("audio"),data:Tp,mimeType:$(),annotations:Qi.optional(),_meta:Ue($(),Ve()).optional()}),aO=H({type:J("tool_use"),name:$(),id:$(),input:Ue($(),Ve()),_meta:Ue($(),Ve()).optional()}),lO=H({type:J("resource"),resource:He([Tx,Ix]),annotations:Qi.optional(),_meta:Ue($(),Ve()).optional()}),uO=Ax.extend({type:J("resource_link")}),eo=He([Ap,Mp,zp,uO,lO]),cO=H({role:Is,content:eo}),dO=_t.extend({description:$().optional(),messages:ke(cO)}),fO=an.extend({method:J("notifications/prompts/list_changed"),params:sn.optional()}),pO=H({title:$().optional(),readOnlyHint:ht().optional(),destructiveHint:ht().optional(),idempotentHint:ht().optional(),openWorldHint:ht().optional()}),hO=H({taskSupport:qt(["required","optional","forbidden"]).optional()}),Gl=H({...Gi.shape,...ws.shape,description:$().optional(),inputSchema:H({type:J("object"),properties:Ue($(),ft).optional(),required:ke($()).optional()}).catchall(Ve()),outputSchema:H({type:J("object"),properties:Ue($(),ft).optional(),required:ke($()).optional()}).catchall(Ve()).optional(),annotations:pO.optional(),execution:hO.optional(),_meta:Ue($(),Ve()).optional()}),Dp=Es.extend({method:J("tools/list")}),mO=$s.extend({tools:ke(Gl)}),to=_t.extend({content:ke(eo).default([]),structuredContent:Ue($(),Ve()).optional(),isError:ht().optional()}),iX=to.or(_t.extend({toolResult:Ve()})),gO=xs.extend({name:$(),arguments:Ue($(),Ve()).optional()}),Np=xt.extend({method:J("tools/call"),params:gO}),bO=an.extend({method:J("notifications/tools/list_changed"),params:sn.optional()}),oX=H({autoRefresh:ht().default(!0),debounceMs:Ie().int().nonnegative().default(300)}),Mx=qt(["debug","info","notice","warning","error","critical","alert","emergency"]),vO=Xt.extend({level:Mx}),yO=xt.extend({method:J("logging/setLevel"),params:vO}),kO=sn.extend({level:Mx,logger:$().optional(),data:Ve()}),xO=an.extend({method:J("notifications/message"),params:kO}),_O=H({name:$().optional()}),wO=H({hints:ke(_O).optional(),costPriority:Ie().min(0).max(1).optional(),speedPriority:Ie().min(0).max(1).optional(),intelligencePriority:Ie().min(0).max(1).optional()}),SO=H({mode:qt(["auto","required","none"]).optional()}),EO=H({type:J("tool_result"),toolUseId:$().describe("The unique identifier for the corresponding tool call."),content:ke(eo).default([]),structuredContent:H({}).loose().optional(),isError:ht().optional(),_meta:Ue($(),Ve()).optional()}),$O=xp("type",[Ap,Mp,zp]),Ll=xp("type",[Ap,Mp,zp,aO,EO]),CO=H({role:Is,content:He([Ll,ke(Ll)]),_meta:Ue($(),Ve()).optional()}),TO=xs.extend({messages:ke(CO),modelPreferences:wO.optional(),systemPrompt:$().optional(),includeContext:qt(["none","thisServer","allServers"]).optional(),temperature:Ie().optional(),maxTokens:Ie().int(),stopSequences:ke($()).optional(),metadata:ft.optional(),tools:ke(Gl).optional(),toolChoice:SO.optional()}),IO=xt.extend({method:J("sampling/createMessage"),params:TO}),AO=_t.extend({model:$(),stopReason:Ke(qt(["endTurn","stopSequence","maxTokens"]).or($())),role:Is,content:$O}),MO=_t.extend({model:$(),stopReason:Ke(qt(["endTurn","stopSequence","maxTokens","toolUse"]).or($())),role:Is,content:He([Ll,ke(Ll)])}),zO=H({type:J("boolean"),title:$().optional(),description:$().optional(),default:ht().optional()}),DO=H({type:J("string"),title:$().optional(),description:$().optional(),minLength:Ie().optional(),maxLength:Ie().optional(),format:qt(["email","uri","date","date-time"]).optional(),default:$().optional()}),NO=H({type:qt(["number","integer"]),title:$().optional(),description:$().optional(),minimum:Ie().optional(),maximum:Ie().optional(),default:Ie().optional()}),OO=H({type:J("string"),title:$().optional(),description:$().optional(),enum:ke($()),default:$().optional()}),RO=H({type:J("string"),title:$().optional(),description:$().optional(),oneOf:ke(H({const:$(),title:$()})),default:$().optional()}),PO=H({type:J("string"),title:$().optional(),description:$().optional(),enum:ke($()),enumNames:ke($()).optional(),default:$().optional()}),LO=He([OO,RO]),FO=H({type:J("array"),title:$().optional(),description:$().optional(),minItems:Ie().optional(),maxItems:Ie().optional(),items:H({type:J("string"),enum:ke($())}),default:ke($()).optional()}),BO=H({type:J("array"),title:$().optional(),description:$().optional(),minItems:Ie().optional(),maxItems:Ie().optional(),items:H({anyOf:ke(H({const:$(),title:$()}))}),default:ke($()).optional()}),UO=He([FO,BO]),jO=He([PO,LO,UO]),ZO=He([jO,zO,DO,NO]),HO=xs.extend({mode:J("form").optional(),message:$(),requestedSchema:H({type:J("object"),properties:Ue($(),ZO),required:ke($()).optional()})}),qO=xs.extend({mode:J("url"),message:$(),elicitationId:$(),url:$().url()}),WO=He([HO,qO]),VO=xt.extend({method:J("elicitation/create"),params:WO}),KO=sn.extend({elicitationId:$()}),JO=an.extend({method:J("notifications/elicitation/complete"),params:KO}),GO=_t.extend({action:qt(["accept","decline","cancel"]),content:_p(e=>e===null?void 0:e,Ue($(),He([$(),Ie(),ht(),ke($())])).optional())}),XO=H({type:J("ref/resource"),uri:$()});var YO=H({type:J("ref/prompt"),name:$()}),QO=Xt.extend({ref:He([YO,XO]),argument:H({name:$(),value:$()}),context:H({arguments:Ue($(),$()).optional()}).optional()}),eR=xt.extend({method:J("completion/complete"),params:QO});var tR=_t.extend({completion:Ft({values:ke($()).max(100),total:Ke(Ie().int()),hasMore:Ke(ht())})}),nR=H({uri:$().startsWith("file://"),name:$().optional(),_meta:Ue($(),Ve()).optional()}),rR=xt.extend({method:J("roots/list"),params:Xt.optional()}),iR=_t.extend({roots:ke(nR)}),oR=an.extend({method:J("notifications/roots/list_changed"),params:sn.optional()}),sX=He([Yi,MN,eR,yO,sO,rO,UN,ZN,WN,GN,YN,Np,Dp,Hl,Wl,Vl,Jl]),aX=He([Ul,jl,NN,oR,Ts]),lX=He([Bl,AO,MO,GO,iR,ql,Kl,Zl]),uX=He([Yi,IO,VO,rR,Hl,Wl,Vl,Jl]),cX=He([Ul,jl,xO,eO,KN,bO,fO,Ts,JO]),dX=He([Bl,DN,tR,dO,iO,jN,HN,VN,to,mO,ql,Kl,Zl]),_e=class e extends Error{constructor(t,n,i){super(`MCP error ${t}: ${n}`),this.code=t,this.data=i,this.name="McpError"}static fromError(t,n,i){if(t===Ae.UrlElicitationRequired&&i){let r=i;if(r.elicitations)return new wp(r.elicitations,n)}return new e(t,n,i)}},wp=class extends _e{constructor(t,n=`URL elicitation${t.length>1?"s":""} required`){super(Ae.UrlElicitationRequired,n,{elicitations:t})}get elicitations(){return this.data?.elicitations??[]}};function Er(e){return e==="completed"||e==="failed"||e==="cancelled"}var HX=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function Op(e){let n=Kk(e)?.method;if(!n)throw new Error("Schema is missing a method literal");let i=Jk(n);if(typeof i!="string")throw new Error("Schema method literal must be a string");return i}function Rp(e,t){let n=Ol(e,t);if(!n.success)throw n.error;return n.data}var dR=6e4,Xl=class{constructor(t){this._options=t,this._requestMessageId=0,this._requestHandlers=new Map,this._requestHandlerAbortControllers=new Map,this._notificationHandlers=new Map,this._responseHandlers=new Map,this._progressHandlers=new Map,this._timeoutInfo=new Map,this._pendingDebouncedNotifications=new Set,this._taskProgressTokens=new Map,this._requestResolvers=new Map,this.setNotificationHandler(Ul,n=>{this._oncancel(n)}),this.setNotificationHandler(jl,n=>{this._onprogress(n)}),this.setRequestHandler(Yi,n=>({})),this._taskStore=t?.taskStore,this._taskMessageQueue=t?.taskMessageQueue,this._taskStore&&(this.setRequestHandler(Hl,async(n,i)=>{let r=await this._taskStore.getTask(n.params.taskId,i.sessionId);if(!r)throw new _e(Ae.InvalidParams,"Failed to retrieve task: Task not found");return{...r}}),this.setRequestHandler(Wl,async(n,i)=>{let r=async()=>{let o=n.params.taskId;if(this._taskMessageQueue){let a;for(;a=await this._taskMessageQueue.dequeue(o,i.sessionId);){if(a.type==="response"||a.type==="error"){let l=a.message,u=l.id,c=this._requestResolvers.get(u);if(c)if(this._requestResolvers.delete(u),a.type==="response")c(l);else{let d=l,f=new _e(d.error.code,d.error.message,d.error.data);c(f)}else{let d=a.type==="response"?"Response":"Error";this._onerror(new Error(`${d} handler missing for request ${u}`))}continue}await this._transport?.send(a.message,{relatedRequestId:i.requestId})}}let s=await this._taskStore.getTask(o,i.sessionId);if(!s)throw new _e(Ae.InvalidParams,`Task not found: ${o}`);if(!Er(s.status))return await this._waitForTaskUpdate(o,i.signal),await r();if(Er(s.status)){let a=await this._taskStore.getTaskResult(o,i.sessionId);return this._clearTaskQueue(o),{...a,_meta:{...a._meta,[Sr]:{taskId:o}}}}return await r()};return await r()}),this.setRequestHandler(Vl,async(n,i)=>{try{let{tasks:r,nextCursor:o}=await this._taskStore.listTasks(n.params?.cursor,i.sessionId);return{tasks:r,nextCursor:o,_meta:{}}}catch(r){throw new _e(Ae.InvalidParams,`Failed to list tasks: ${r instanceof Error?r.message:String(r)}`)}}),this.setRequestHandler(Jl,async(n,i)=>{try{let r=await this._taskStore.getTask(n.params.taskId,i.sessionId);if(!r)throw new _e(Ae.InvalidParams,`Task not found: ${n.params.taskId}`);if(Er(r.status))throw new _e(Ae.InvalidParams,`Cannot cancel task in terminal status: ${r.status}`);await this._taskStore.updateTaskStatus(n.params.taskId,"cancelled","Client cancelled task execution.",i.sessionId),this._clearTaskQueue(n.params.taskId);let o=await this._taskStore.getTask(n.params.taskId,i.sessionId);if(!o)throw new _e(Ae.InvalidParams,`Task not found after cancellation: ${n.params.taskId}`);return{_meta:{},...o}}catch(r){throw r instanceof _e?r:new _e(Ae.InvalidRequest,`Failed to cancel task: ${r instanceof Error?r.message:String(r)}`)}}))}async _oncancel(t){if(!t.params.requestId)return;this._requestHandlerAbortControllers.get(t.params.requestId)?.abort(t.params.reason)}_setupTimeout(t,n,i,r,o=!1){this._timeoutInfo.set(t,{timeoutId:setTimeout(r,n),startTime:Date.now(),timeout:n,maxTotalTimeout:i,resetTimeoutOnProgress:o,onTimeout:r})}_resetTimeout(t){let n=this._timeoutInfo.get(t);if(!n)return!1;let i=Date.now()-n.startTime;if(n.maxTotalTimeout&&i>=n.maxTotalTimeout)throw this._timeoutInfo.delete(t),_e.fromError(Ae.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:n.maxTotalTimeout,totalElapsed:i});return clearTimeout(n.timeoutId),n.timeoutId=setTimeout(n.onTimeout,n.timeout),!0}_cleanupTimeout(t){let n=this._timeoutInfo.get(t);n&&(clearTimeout(n.timeoutId),this._timeoutInfo.delete(t))}async connect(t){if(this._transport)throw new Error("Already connected to a transport. Call close() before connecting to a new transport, or use a separate Protocol instance per connection.");this._transport=t;let n=this.transport?.onclose;this._transport.onclose=()=>{n?.(),this._onclose()};let i=this.transport?.onerror;this._transport.onerror=o=>{i?.(o),this._onerror(o)};let r=this._transport?.onmessage;this._transport.onmessage=(o,s)=>{r?.(o,s),_s(o)||Sx(o)?this._onresponse(o):Ep(o)?this._onrequest(o,s):wx(o)?this._onnotification(o):this._onerror(new Error(`Unknown message type: ${JSON.stringify(o)}`))},await this._transport.start()}_onclose(){let t=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._taskProgressTokens.clear(),this._pendingDebouncedNotifications.clear();for(let i of this._timeoutInfo.values())clearTimeout(i.timeoutId);this._timeoutInfo.clear();for(let i of this._requestHandlerAbortControllers.values())i.abort();this._requestHandlerAbortControllers.clear();let n=_e.fromError(Ae.ConnectionClosed,"Connection closed");this._transport=void 0,this.onclose?.();for(let i of t.values())i(n)}_onerror(t){this.onerror?.(t)}_onnotification(t){let n=this._notificationHandlers.get(t.method)??this.fallbackNotificationHandler;n!==void 0&&Promise.resolve().then(()=>n(t)).catch(i=>this._onerror(new Error(`Uncaught error in notification handler: ${i}`)))}_onrequest(t,n){let i=this._requestHandlers.get(t.method)??this.fallbackRequestHandler,r=this._transport,o=t.params?._meta?.[Sr]?.taskId;if(i===void 0){let c={jsonrpc:"2.0",id:t.id,error:{code:Ae.MethodNotFound,message:"Method not found"}};o&&this._taskMessageQueue?this._enqueueTaskMessage(o,{type:"error",message:c,timestamp:Date.now()},r?.sessionId).catch(d=>this._onerror(new Error(`Failed to enqueue error response: ${d}`))):r?.send(c).catch(d=>this._onerror(new Error(`Failed to send an error response: ${d}`)));return}let s=new AbortController;this._requestHandlerAbortControllers.set(t.id,s);let a=kx(t.params)?t.params.task:void 0,l=this._taskStore?this.requestTaskStore(t,r?.sessionId):void 0,u={signal:s.signal,sessionId:r?.sessionId,_meta:t.params?._meta,sendNotification:async c=>{if(s.signal.aborted)return;let d={relatedRequestId:t.id};o&&(d.relatedTask={taskId:o}),await this.notification(c,d)},sendRequest:async(c,d,f)=>{if(s.signal.aborted)throw new _e(Ae.ConnectionClosed,"Request was cancelled");let p={...f,relatedRequestId:t.id};o&&!p.relatedTask&&(p.relatedTask={taskId:o});let h=p.relatedTask?.taskId??o;return h&&l&&await l.updateTaskStatus(h,"input_required"),await this.request(c,d,p)},authInfo:n?.authInfo,requestId:t.id,requestInfo:n?.requestInfo,taskId:o,taskStore:l,taskRequestedTtl:a?.ttl,closeSSEStream:n?.closeSSEStream,closeStandaloneSSEStream:n?.closeStandaloneSSEStream};Promise.resolve().then(()=>{a&&this.assertTaskHandlerCapability(t.method)}).then(()=>i(t,u)).then(async c=>{if(s.signal.aborted)return;let d={result:c,jsonrpc:"2.0",id:t.id};o&&this._taskMessageQueue?await this._enqueueTaskMessage(o,{type:"response",message:d,timestamp:Date.now()},r?.sessionId):await r?.send(d)},async c=>{if(s.signal.aborted)return;let d={jsonrpc:"2.0",id:t.id,error:{code:Number.isSafeInteger(c.code)?c.code:Ae.InternalError,message:c.message??"Internal error",...c.data!==void 0&&{data:c.data}}};o&&this._taskMessageQueue?await this._enqueueTaskMessage(o,{type:"error",message:d,timestamp:Date.now()},r?.sessionId):await r?.send(d)}).catch(c=>this._onerror(new Error(`Failed to send response: ${c}`))).finally(()=>{this._requestHandlerAbortControllers.get(t.id)===s&&this._requestHandlerAbortControllers.delete(t.id)})}_onprogress(t){let{progressToken:n,...i}=t.params,r=Number(n),o=this._progressHandlers.get(r);if(!o){this._onerror(new Error(`Received a progress notification for an unknown token: ${JSON.stringify(t)}`));return}let s=this._responseHandlers.get(r),a=this._timeoutInfo.get(r);if(a&&s&&a.resetTimeoutOnProgress)try{this._resetTimeout(r)}catch(l){this._responseHandlers.delete(r),this._progressHandlers.delete(r),this._cleanupTimeout(r),s(l);return}o(i)}_onresponse(t){let n=Number(t.id),i=this._requestResolvers.get(n);if(i){if(this._requestResolvers.delete(n),_s(t))i(t);else{let s=new _e(t.error.code,t.error.message,t.error.data);i(s)}return}let r=this._responseHandlers.get(n);if(r===void 0){this._onerror(new Error(`Received a response for an unknown message ID: ${JSON.stringify(t)}`));return}this._responseHandlers.delete(n),this._cleanupTimeout(n);let o=!1;if(_s(t)&&t.result&&typeof t.result=="object"){let s=t.result;if(s.task&&typeof s.task=="object"){let a=s.task;typeof a.taskId=="string"&&(o=!0,this._taskProgressTokens.set(a.taskId,n))}}if(o||this._progressHandlers.delete(n),_s(t))r(t);else{let s=_e.fromError(t.error.code,t.error.message,t.error.data);r(s)}}get transport(){return this._transport}async close(){await this._transport?.close()}async*requestStream(t,n,i){let{task:r}=i??{};if(!r){try{yield{type:"result",result:await this.request(t,n,i)}}catch(s){yield{type:"error",error:s instanceof _e?s:new _e(Ae.InternalError,String(s))}}return}let o;try{let s=await this.request(t,Zl,i);if(s.task)o=s.task.taskId,yield{type:"taskCreated",task:s.task};else throw new _e(Ae.InternalError,"Task creation did not return a task");for(;;){let a=await this.getTask({taskId:o},i);if(yield{type:"taskStatus",task:a},Er(a.status)){a.status==="completed"?yield{type:"result",result:await this.getTaskResult({taskId:o},n,i)}:a.status==="failed"?yield{type:"error",error:new _e(Ae.InternalError,`Task ${o} failed`)}:a.status==="cancelled"&&(yield{type:"error",error:new _e(Ae.InternalError,`Task ${o} was cancelled`)});return}if(a.status==="input_required"){yield{type:"result",result:await this.getTaskResult({taskId:o},n,i)};return}let l=a.pollInterval??this._options?.defaultTaskPollInterval??1e3;await new Promise(u=>setTimeout(u,l)),i?.signal?.throwIfAborted()}}catch(s){yield{type:"error",error:s instanceof _e?s:new _e(Ae.InternalError,String(s))}}}request(t,n,i){let{relatedRequestId:r,resumptionToken:o,onresumptiontoken:s,task:a,relatedTask:l}=i??{};return new Promise((u,c)=>{let d=v=>{c(v)};if(!this._transport){d(new Error("Not connected"));return}if(this._options?.enforceStrictCapabilities===!0)try{this.assertCapabilityForMethod(t.method),a&&this.assertTaskCapability(t.method)}catch(v){d(v);return}i?.signal?.throwIfAborted();let f=this._requestMessageId++,p={...t,jsonrpc:"2.0",id:f};i?.onprogress&&(this._progressHandlers.set(f,i.onprogress),p.params={...t.params,_meta:{...t.params?._meta||{},progressToken:f}}),a&&(p.params={...p.params,task:a}),l&&(p.params={...p.params,_meta:{...p.params?._meta||{},[Sr]:l}});let h=v=>{this._responseHandlers.delete(f),this._progressHandlers.delete(f),this._cleanupTimeout(f),this._transport?.send({jsonrpc:"2.0",method:"notifications/cancelled",params:{requestId:f,reason:String(v)}},{relatedRequestId:r,resumptionToken:o,onresumptiontoken:s}).catch(x=>this._onerror(new Error(`Failed to send cancellation: ${x}`)));let y=v instanceof _e?v:new _e(Ae.RequestTimeout,String(v));c(y)};this._responseHandlers.set(f,v=>{if(!i?.signal?.aborted){if(v instanceof Error)return c(v);try{let y=Ol(n,v.result);y.success?u(y.data):c(y.error)}catch(y){c(y)}}}),i?.signal?.addEventListener("abort",()=>{h(i?.signal?.reason)});let m=i?.timeout??dR,g=()=>h(_e.fromError(Ae.RequestTimeout,"Request timed out",{timeout:m}));this._setupTimeout(f,m,i?.maxTotalTimeout,g,i?.resetTimeoutOnProgress??!1);let b=l?.taskId;if(b){let v=y=>{let x=this._responseHandlers.get(f);x?x(y):this._onerror(new Error(`Response handler missing for side-channeled request ${f}`))};this._requestResolvers.set(f,v),this._enqueueTaskMessage(b,{type:"request",message:p,timestamp:Date.now()}).catch(y=>{this._cleanupTimeout(f),c(y)})}else this._transport.send(p,{relatedRequestId:r,resumptionToken:o,onresumptiontoken:s}).catch(v=>{this._cleanupTimeout(f),c(v)})})}async getTask(t,n){return this.request({method:"tasks/get",params:t},ql,n)}async getTaskResult(t,n,i){return this.request({method:"tasks/result",params:t},n,i)}async listTasks(t,n){return this.request({method:"tasks/list",params:t},Kl,n)}async cancelTask(t,n){return this.request({method:"tasks/cancel",params:t},$x,n)}async notification(t,n){if(!this._transport)throw new Error("Not connected");this.assertNotificationCapability(t.method);let i=n?.relatedTask?.taskId;if(i){let a={...t,jsonrpc:"2.0",params:{...t.params,_meta:{...t.params?._meta||{},[Sr]:n.relatedTask}}};await this._enqueueTaskMessage(i,{type:"notification",message:a,timestamp:Date.now()});return}if((this._options?.debouncedNotificationMethods??[]).includes(t.method)&&!t.params&&!n?.relatedRequestId&&!n?.relatedTask){if(this._pendingDebouncedNotifications.has(t.method))return;this._pendingDebouncedNotifications.add(t.method),Promise.resolve().then(()=>{if(this._pendingDebouncedNotifications.delete(t.method),!this._transport)return;let a={...t,jsonrpc:"2.0"};n?.relatedTask&&(a={...a,params:{...a.params,_meta:{...a.params?._meta||{},[Sr]:n.relatedTask}}}),this._transport?.send(a,n).catch(l=>this._onerror(l))});return}let s={...t,jsonrpc:"2.0"};n?.relatedTask&&(s={...s,params:{...s.params,_meta:{...s.params?._meta||{},[Sr]:n.relatedTask}}}),await this._transport.send(s,n)}setRequestHandler(t,n){let i=Op(t);this.assertRequestHandlerCapability(i),this._requestHandlers.set(i,(r,o)=>{let s=Rp(t,r);return Promise.resolve(n(s,o))})}removeRequestHandler(t){this._requestHandlers.delete(t)}assertCanSetRequestHandler(t){if(this._requestHandlers.has(t))throw new Error(`A request handler for ${t} already exists, which would be overridden`)}setNotificationHandler(t,n){let i=Op(t);this._notificationHandlers.set(i,r=>{let o=Rp(t,r);return Promise.resolve(n(o))})}removeNotificationHandler(t){this._notificationHandlers.delete(t)}_cleanupTaskProgressHandler(t){let n=this._taskProgressTokens.get(t);n!==void 0&&(this._progressHandlers.delete(n),this._taskProgressTokens.delete(t))}async _enqueueTaskMessage(t,n,i){if(!this._taskStore||!this._taskMessageQueue)throw new Error("Cannot enqueue task message: taskStore and taskMessageQueue are not configured");let r=this._options?.maxTaskQueueSize;await this._taskMessageQueue.enqueue(t,n,i,r)}async _clearTaskQueue(t,n){if(this._taskMessageQueue){let i=await this._taskMessageQueue.dequeueAll(t,n);for(let r of i)if(r.type==="request"&&Ep(r.message)){let o=r.message.id,s=this._requestResolvers.get(o);s?(s(new _e(Ae.InternalError,"Task cancelled or completed")),this._requestResolvers.delete(o)):this._onerror(new Error(`Resolver missing for request ${o} during task ${t} cleanup`))}}}async _waitForTaskUpdate(t,n){let i=this._options?.defaultTaskPollInterval??1e3;try{let r=await this._taskStore?.getTask(t);r?.pollInterval&&(i=r.pollInterval)}catch{}return new Promise((r,o)=>{if(n.aborted){o(new _e(Ae.InvalidRequest,"Request cancelled"));return}let s=setTimeout(r,i);n.addEventListener("abort",()=>{clearTimeout(s),o(new _e(Ae.InvalidRequest,"Request cancelled"))},{once:!0})})}requestTaskStore(t,n){let i=this._taskStore;if(!i)throw new Error("No task store configured");return{createTask:async r=>{if(!t)throw new Error("No request provided");return await i.createTask(r,t.id,{method:t.method,params:t.params},n)},getTask:async r=>{let o=await i.getTask(r,n);if(!o)throw new _e(Ae.InvalidParams,"Failed to retrieve task: Task not found");return o},storeTaskResult:async(r,o,s)=>{await i.storeTaskResult(r,o,s,n);let a=await i.getTask(r,n);if(a){let l=Ts.parse({method:"notifications/tasks/status",params:a});await this.notification(l),Er(a.status)&&this._cleanupTaskProgressHandler(r)}},getTaskResult:r=>i.getTaskResult(r,n),updateTaskStatus:async(r,o,s)=>{let a=await i.getTask(r,n);if(!a)throw new _e(Ae.InvalidParams,`Task "${r}" not found - it may have been cleaned up`);if(Er(a.status))throw new _e(Ae.InvalidParams,`Cannot update task "${r}" from terminal status "${a.status}" to "${o}". Terminal states (completed, failed, cancelled) cannot transition to other states.`);await i.updateTaskStatus(r,o,s,n);let l=await i.getTask(r,n);if(l){let u=Ts.parse({method:"notifications/tasks/status",params:l});await this.notification(u),Er(l.status)&&this._cleanupTaskProgressHandler(r)}},listTasks:r=>i.listTasks(r,n)}}};var fR=Object.defineProperty,er=(e,t)=>{for(var n in t)fR(e,n,{get:t[n],enumerable:!0,configurable:!0,set:i=>t[n]=()=>i})},Pp=class{constructor(t=window.parent,n){At(this,"eventTarget");At(this,"eventSource");At(this,"messageListener");At(this,"onclose");At(this,"onerror");At(this,"onmessage");At(this,"sessionId");At(this,"setProtocolVersion");this.eventTarget=t,this.eventSource=n,this.messageListener=i=>{if(n&&i.source!==this.eventSource){console.debug("Ignoring message from unknown source",i);return}let r=Ex.safeParse(i.data);r.success?(console.debug("Parsed message",r.data),this.onmessage?.(r.data)):(console.error("Failed to parse message",r.error.message,i),this.onerror?.(Error("Invalid JSON-RPC message received: "+r.error.message)))}}async start(){window.addEventListener("message",this.messageListener)}async send(t,n){console.debug("Sending message",t),this.eventTarget.postMessage(t,"*")}async close(){window.removeEventListener("message",this.messageListener),this.onclose?.()}},pR="2026-01-26";var k={};er(k,{xor:()=>d$,xid:()=>N2,void:()=>o$,uuidv7:()=>$2,uuidv6:()=>E2,uuidv4:()=>S2,uuid:()=>w2,util:()=>ge,url:()=>C2,uppercase:()=>xu,unknown:()=>ii,union:()=>Xu,undefined:()=>r$,ulid:()=>D2,uint64:()=>t$,uint32:()=>Y2,tuple:()=>pm,trim:()=>Cu,treeifyError:()=>d_,transform:()=>Qu,toUpperCase:()=>Iu,toLowerCase:()=>Tu,toJSONSchema:()=>t2,templateLiteral:()=>S$,symbol:()=>n$,superRefine:()=>Bm,success:()=>x$,stringbool:()=>M$,stringFormat:()=>q2,string:()=>cu,strictObject:()=>u$,startsWith:()=>wu,slugify:()=>Au,size:()=>Ks,setErrorMap:()=>z8,set:()=>g$,safeParseAsync:()=>f2,safeParse:()=>d2,safeEncodeAsync:()=>y2,safeEncode:()=>b2,safeDecodeAsync:()=>k2,safeDecode:()=>v2,registry:()=>bh,regexes:()=>si,regex:()=>yu,refine:()=>Fm,record:()=>hm,readonly:()=>Dm,property:()=>jh,promise:()=>E$,prettifyError:()=>p_,preprocess:()=>D$,prefault:()=>$m,positive:()=>Lh,pipe:()=>Ps,partialRecord:()=>p$,parseAsync:()=>c2,parse:()=>u2,overwrite:()=>nr,optional:()=>Os,object:()=>l$,number:()=>Xh,nullish:()=>k$,nullable:()=>Rs,null:()=>nm,normalize:()=>$u,nonpositive:()=>Bh,nonoptional:()=>Cm,nonnegative:()=>Uh,never:()=>Ju,negative:()=>Fh,nativeEnum:()=>b$,nanoid:()=>A2,nan:()=>_$,multipleOf:()=>so,minSize:()=>Tr,minLength:()=>ri,mime:()=>Eu,meta:()=>I$,maxSize:()=>fo,maxLength:()=>Js,map:()=>m$,mac:()=>P2,lte:()=>un,lt:()=>$r,lowercase:()=>ku,looseRecord:()=>h$,looseObject:()=>c$,locales:()=>gh,literal:()=>v$,length:()=>Gs,lazy:()=>Rm,ksuid:()=>O2,keyof:()=>a$,jwt:()=>H2,json:()=>z$,iso:()=>qh,ipv6:()=>L2,ipv4:()=>R2,intersection:()=>dm,int64:()=>e$,int32:()=>X2,int:()=>du,instanceof:()=>A$,includes:()=>_u,httpUrl:()=>T2,hostname:()=>W2,hex:()=>V2,hash:()=>K2,guid:()=>_2,gte:()=>Wt,gt:()=>Cr,globalRegistry:()=>ln,getErrorMap:()=>D8,function:()=>fu,fromJSONSchema:()=>P8,formatError:()=>Gp,float64:()=>G2,float32:()=>J2,flattenError:()=>Jp,file:()=>y$,exactOptional:()=>xm,enum:()=>Yu,endsWith:()=>Su,encodeAsync:()=>m2,encode:()=>p2,emoji:()=>I2,email:()=>x2,e164:()=>Z2,discriminatedUnion:()=>f$,describe:()=>T$,decodeAsync:()=>g2,decode:()=>h2,date:()=>s$,custom:()=>C$,cuid2:()=>z2,cuid:()=>M2,core:()=>Xx,config:()=>Dt,coerce:()=>O$,codec:()=>w$,clone:()=>dn,cidrv6:()=>B2,cidrv4:()=>F2,check:()=>$$,catch:()=>Am,boolean:()=>Yh,bigint:()=>Q2,base64url:()=>j2,base64:()=>U2,array:()=>ra,any:()=>i$,_function:()=>fu,_default:()=>Sm,_ZodString:()=>Mu,ZodXor:()=>lm,ZodXID:()=>Lu,ZodVoid:()=>sm,ZodUnknown:()=>im,ZodUnion:()=>oa,ZodUndefined:()=>em,ZodUUID:()=>Ln,ZodURL:()=>Qs,ZodULID:()=>Pu,ZodType:()=>ce,ZodTuple:()=>fm,ZodTransform:()=>ym,ZodTemplateLiteral:()=>Nm,ZodSymbol:()=>Qh,ZodSuccess:()=>Tm,ZodStringFormat:()=>Pe,ZodString:()=>Ys,ZodSet:()=>gm,ZodRecord:()=>sa,ZodRealError:()=>Qt,ZodReadonly:()=>zm,ZodPromise:()=>Pm,ZodPrefault:()=>Em,ZodPipe:()=>nc,ZodOptional:()=>ec,ZodObject:()=>ia,ZodNumberFormat:()=>ai,ZodNumber:()=>ea,ZodNullable:()=>_m,ZodNull:()=>tm,ZodNonOptional:()=>tc,ZodNever:()=>om,ZodNanoID:()=>Nu,ZodNaN:()=>Mm,ZodMap:()=>mm,ZodMAC:()=>Gh,ZodLiteral:()=>bm,ZodLazy:()=>Om,ZodKSUID:()=>Fu,ZodJWT:()=>Vu,ZodIssueCode:()=>M8,ZodIntersection:()=>cm,ZodISOTime:()=>Kh,ZodISODuration:()=>Jh,ZodISODateTime:()=>Wh,ZodISODate:()=>Vh,ZodIPv6:()=>Uu,ZodIPv4:()=>Bu,ZodGUID:()=>Ns,ZodFunction:()=>Lm,ZodFirstPartyTypeKind:()=>qp,ZodFile:()=>vm,ZodExactOptional:()=>km,ZodError:()=>A8,ZodEnum:()=>co,ZodEmoji:()=>Du,ZodEmail:()=>zu,ZodE164:()=>Wu,ZodDiscriminatedUnion:()=>um,ZodDefault:()=>wm,ZodDate:()=>Gu,ZodCustomStringFormat:()=>po,ZodCustom:()=>aa,ZodCodec:()=>rc,ZodCatch:()=>Im,ZodCUID2:()=>Ru,ZodCUID:()=>Ou,ZodCIDRv6:()=>Zu,ZodCIDRv4:()=>ju,ZodBoolean:()=>ta,ZodBigIntFormat:()=>Ku,ZodBigInt:()=>na,ZodBase64URL:()=>qu,ZodBase64:()=>Hu,ZodArray:()=>am,ZodAny:()=>rm,TimePrecision:()=>NS,NEVER:()=>Yx,$output:()=>IS,$input:()=>AS,$brand:()=>Qx});var Xx={};er(Xx,{version:()=>fw,util:()=>ge,treeifyError:()=>d_,toJSONSchema:()=>t2,toDotPath:()=>f_,safeParseAsync:()=>m_,safeParse:()=>h_,safeEncodeAsync:()=>qR,safeEncode:()=>ZR,safeDecodeAsync:()=>WR,safeDecode:()=>HR,registry:()=>bh,regexes:()=>si,process:()=>Ne,prettifyError:()=>p_,parseAsync:()=>Up,parse:()=>Bp,meta:()=>mE,locales:()=>gh,isValidJWT:()=>Pw,isValidBase64URL:()=>Nw,isValidBase64:()=>uh,initializeContext:()=>ao,globalRegistry:()=>ln,globalConfig:()=>nu,formatError:()=>Gp,flattenError:()=>Jp,finalize:()=>uo,extractDefs:()=>lo,encodeAsync:()=>UR,encode:()=>FR,describe:()=>hE,decodeAsync:()=>jR,decode:()=>BR,createToJSONSchemaMethod:()=>bE,createStandardJSONSchemaMethod:()=>Ds,config:()=>Dt,clone:()=>dn,_xor:()=>s8,_xid:()=>Th,_void:()=>iE,_uuidv7:()=>_h,_uuidv6:()=>xh,_uuidv4:()=>kh,_uuid:()=>yh,_url:()=>vu,_uppercase:()=>xu,_unknown:()=>nE,_union:()=>o8,_undefined:()=>QS,_ulid:()=>Ch,_uint64:()=>XS,_uint32:()=>qS,_tuple:()=>u8,_trim:()=>Cu,_transform:()=>g8,_toUpperCase:()=>Iu,_toLowerCase:()=>Tu,_templateLiteral:()=>E8,_symbol:()=>YS,_superRefine:()=>fE,_success:()=>x8,_stringbool:()=>gE,_stringFormat:()=>Xs,_string:()=>MS,_startsWith:()=>wu,_slugify:()=>Au,_size:()=>Ks,_set:()=>f8,_safeParseAsync:()=>Zs,_safeParse:()=>js,_safeEncodeAsync:()=>rh,_safeEncode:()=>th,_safeDecodeAsync:()=>ih,_safeDecode:()=>nh,_regex:()=>yu,_refine:()=>dE,_record:()=>c8,_readonly:()=>S8,_property:()=>jh,_promise:()=>C8,_positive:()=>Lh,_pipe:()=>w8,_parseAsync:()=>Us,_parse:()=>Bs,_overwrite:()=>nr,_optional:()=>b8,_number:()=>FS,_nullable:()=>v8,_null:()=>eE,_normalize:()=>$u,_nonpositive:()=>Bh,_nonoptional:()=>k8,_nonnegative:()=>Uh,_never:()=>rE,_negative:()=>Fh,_nativeEnum:()=>h8,_nanoid:()=>Sh,_nan:()=>aE,_multipleOf:()=>so,_minSize:()=>Tr,_minLength:()=>ri,_min:()=>Wt,_mime:()=>Eu,_maxSize:()=>fo,_maxLength:()=>Js,_max:()=>un,_map:()=>d8,_mac:()=>DS,_lte:()=>un,_lt:()=>$r,_lowercase:()=>ku,_literal:()=>m8,_length:()=>Gs,_lazy:()=>$8,_ksuid:()=>Ih,_jwt:()=>Ph,_isoTime:()=>PS,_isoDuration:()=>LS,_isoDateTime:()=>OS,_isoDate:()=>RS,_ipv6:()=>Mh,_ipv4:()=>Ah,_intersection:()=>l8,_int64:()=>GS,_int32:()=>HS,_int:()=>US,_includes:()=>_u,_guid:()=>uu,_gte:()=>Wt,_gt:()=>Cr,_float64:()=>ZS,_float32:()=>jS,_file:()=>uE,_enum:()=>p8,_endsWith:()=>Su,_encodeAsync:()=>Qp,_encode:()=>Xp,_emoji:()=>wh,_email:()=>vh,_e164:()=>Rh,_discriminatedUnion:()=>a8,_default:()=>y8,_decodeAsync:()=>eh,_decode:()=>Yp,_date:()=>oE,_custom:()=>cE,_cuid2:()=>$h,_cuid:()=>Eh,_coercedString:()=>zS,_coercedNumber:()=>BS,_coercedDate:()=>sE,_coercedBoolean:()=>VS,_coercedBigint:()=>JS,_cidrv6:()=>Dh,_cidrv4:()=>zh,_check:()=>pE,_catch:()=>_8,_boolean:()=>WS,_bigint:()=>KS,_base64url:()=>Oh,_base64:()=>Nh,_array:()=>lE,_any:()=>tE,TimePrecision:()=>NS,NEVER:()=>Yx,JSONSchemaGenerator:()=>Hp,JSONSchema:()=>I8,Doc:()=>su,$output:()=>IS,$input:()=>AS,$constructor:()=>w,$brand:()=>Qx,$ZodXor:()=>tS,$ZodXID:()=>_w,$ZodVoid:()=>Kw,$ZodUnknown:()=>Ww,$ZodUnion:()=>bu,$ZodUndefined:()=>Zw,$ZodUUID:()=>hw,$ZodURL:()=>gw,$ZodULID:()=>xw,$ZodType:()=>le,$ZodTuple:()=>ph,$ZodTransform:()=>cS,$ZodTemplateLiteral:()=>xS,$ZodSymbol:()=>jw,$ZodSuccess:()=>gS,$ZodStringFormat:()=>Re,$ZodString:()=>Vs,$ZodSet:()=>sS,$ZodRegistry:()=>lu,$ZodRecord:()=>iS,$ZodRealError:()=>Yt,$ZodReadonly:()=>kS,$ZodPromise:()=>wS,$ZodPrefault:()=>hS,$ZodPipe:()=>yS,$ZodOptional:()=>hh,$ZodObjectJIT:()=>eS,$ZodObject:()=>Qw,$ZodNumberFormat:()=>Bw,$ZodNumber:()=>ch,$ZodNullable:()=>fS,$ZodNull:()=>Hw,$ZodNonOptional:()=>mS,$ZodNever:()=>Vw,$ZodNanoID:()=>vw,$ZodNaN:()=>vS,$ZodMap:()=>oS,$ZodMAC:()=>Aw,$ZodLiteral:()=>lS,$ZodLazy:()=>SS,$ZodKSUID:()=>ww,$ZodJWT:()=>Lw,$ZodIntersection:()=>rS,$ZodISOTime:()=>$w,$ZodISODuration:()=>Cw,$ZodISODateTime:()=>Sw,$ZodISODate:()=>Ew,$ZodIPv6:()=>Iw,$ZodIPv4:()=>Tw,$ZodGUID:()=>pw,$ZodFunction:()=>_S,$ZodFile:()=>uS,$ZodExactOptional:()=>dS,$ZodError:()=>Kp,$ZodEnum:()=>aS,$ZodEncodeError:()=>ro,$ZodEmoji:()=>bw,$ZodEmail:()=>mw,$ZodE164:()=>Rw,$ZodDiscriminatedUnion:()=>nS,$ZodDefault:()=>pS,$ZodDate:()=>Jw,$ZodCustomStringFormat:()=>Fw,$ZodCustom:()=>ES,$ZodCodec:()=>mh,$ZodCheckUpperCase:()=>ow,$ZodCheckStringFormat:()=>Ws,$ZodCheckStartsWith:()=>aw,$ZodCheckSizeEquals:()=>Q_,$ZodCheckRegex:()=>rw,$ZodCheckProperty:()=>uw,$ZodCheckOverwrite:()=>dw,$ZodCheckNumberFormat:()=>J_,$ZodCheckMultipleOf:()=>K_,$ZodCheckMinSize:()=>Y_,$ZodCheckMinLength:()=>tw,$ZodCheckMimeType:()=>cw,$ZodCheckMaxSize:()=>X_,$ZodCheckMaxLength:()=>ew,$ZodCheckLowerCase:()=>iw,$ZodCheckLessThan:()=>ah,$ZodCheckLengthEquals:()=>nw,$ZodCheckIncludes:()=>sw,$ZodCheckGreaterThan:()=>lh,$ZodCheckEndsWith:()=>lw,$ZodCheckBigIntFormat:()=>G_,$ZodCheck:()=>Je,$ZodCatch:()=>bS,$ZodCUID2:()=>kw,$ZodCUID:()=>yw,$ZodCIDRv6:()=>zw,$ZodCIDRv4:()=>Mw,$ZodBoolean:()=>dh,$ZodBigIntFormat:()=>Uw,$ZodBigInt:()=>fh,$ZodBase64URL:()=>Ow,$ZodBase64:()=>Dw,$ZodAsyncError:()=>Yn,$ZodArray:()=>Gw,$ZodAny:()=>qw});var Yx=Object.freeze({status:"aborted"});function w(e,t,n){function i(a,l){if(a._zod||Object.defineProperty(a,"_zod",{value:{def:l,constr:s,traits:new Set},enumerable:!1}),a._zod.traits.has(e))return;a._zod.traits.add(e),t(a,l);let u=s.prototype,c=Object.keys(u);for(let d=0;d<c.length;d++){let f=c[d];f in a||(a[f]=u[f].bind(a))}}let r=n?.Parent??Object;class o extends r{}Object.defineProperty(o,"name",{value:e});function s(a){var l;let u=n?.Parent?new o:this;i(u,a),(l=u._zod).deferred??(l.deferred=[]);for(let c of u._zod.deferred)c();return u}return Object.defineProperty(s,"init",{value:i}),Object.defineProperty(s,Symbol.hasInstance,{value:a=>n?.Parent&&a instanceof n.Parent?!0:a?._zod?.traits?.has(e)}),Object.defineProperty(s,"name",{value:e}),s}var Qx=Symbol("zod_brand"),Yn=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},ro=class extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}},nu={};function Dt(e){return e&&Object.assign(nu,e),nu}var ge={};er(ge,{unwrapMessage:()=>zs,uint8ArrayToHex:()=>LR,uint8ArrayToBase64url:()=>RR,uint8ArrayToBase64:()=>u_,stringifyPrimitive:()=>te,slugify:()=>t_,shallowClone:()=>r_,safeExtend:()=>AR,required:()=>DR,randomString:()=>wR,propertyKeyTypes:()=>iu,promiseAllObject:()=>_R,primitiveTypes:()=>i_,prefixIssues:()=>Sn,pick:()=>CR,partial:()=>zR,parsedType:()=>re,optionalKeys:()=>o_,omit:()=>TR,objectClone:()=>yR,numKeys:()=>SR,nullish:()=>oi,normalizeParams:()=>F,mergeDefs:()=>tr,merge:()=>MR,jsonStringifyReplacer:()=>ru,joinValues:()=>R,issue:()=>ou,isPlainObject:()=>ni,isObject:()=>io,hexToUint8Array:()=>PR,getSizableOrigin:()=>mu,getParsedType:()=>ER,getLengthableOrigin:()=>gu,getEnumValues:()=>Wp,getElementAtPath:()=>xR,floatSafeRemainder:()=>e_,finalizeIssue:()=>cn,extend:()=>IR,escapeRegex:()=>Qn,esc:()=>Lp,defineLazy:()=>pe,createTransparentProxy:()=>$R,cloneDef:()=>kR,clone:()=>dn,cleanRegex:()=>hu,cleanEnum:()=>NR,captureStackTrace:()=>Vp,cached:()=>Fs,base64urlToUint8Array:()=>OR,base64ToUint8Array:()=>l_,assignProp:()=>Ir,assertNotEqual:()=>mR,assertNever:()=>bR,assertIs:()=>gR,assertEqual:()=>hR,assert:()=>vR,allowsEval:()=>n_,aborted:()=>ti,NUMBER_FORMAT_RANGES:()=>s_,Class:()=>Fp,BIGINT_FORMAT_RANGES:()=>a_});function hR(e){return e}function mR(e){return e}function gR(e){}function bR(e){throw Error("Unexpected value in exhaustive check")}function vR(e){}function Wp(e){let t=Object.values(e).filter(n=>typeof n=="number");return Object.entries(e).filter(([n,i])=>t.indexOf(+n)===-1).map(([n,i])=>i)}function R(e,t="|"){return e.map(n=>te(n)).join(t)}function ru(e,t){return typeof t=="bigint"?t.toString():t}function Fs(e){return{get value(){{let t=e();return Object.defineProperty(this,"value",{value:t}),t}throw Error("cached value already set")}}}function oi(e){return e==null}function hu(e){let t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function e_(e,t){let n=(e.toString().split(".")[1]||"").length,i=t.toString(),r=(i.split(".")[1]||"").length;if(r===0&&/\d?e-\d?/.test(i)){let l=i.match(/\d?e-(\d?)/);l?.[1]&&(r=Number.parseInt(l[1]))}let o=n>r?n:r,s=Number.parseInt(e.toFixed(o).replace(".","")),a=Number.parseInt(t.toFixed(o).replace(".",""));return s%a/10**o}var zx=Symbol("evaluating");function pe(e,t,n){let i;Object.defineProperty(e,t,{get(){if(i!==zx)return i===void 0&&(i=zx,i=n()),i},set(r){Object.defineProperty(e,t,{value:r})},configurable:!0})}function yR(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function Ir(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function tr(...e){let t={};for(let n of e){let i=Object.getOwnPropertyDescriptors(n);Object.assign(t,i)}return Object.defineProperties({},t)}function kR(e){return tr(e._zod.def)}function xR(e,t){return t?t.reduce((n,i)=>n?.[i],e):e}function _R(e){let t=Object.keys(e),n=t.map(i=>e[i]);return Promise.all(n).then(i=>{let r={};for(let o=0;o<t.length;o++)r[t[o]]=i[o];return r})}function wR(e=10){let t="";for(let n=0;n<e;n++)t+="abcdefghijklmnopqrstuvwxyz"[Math.floor(Math.random()*26)];return t}function Lp(e){return JSON.stringify(e)}function t_(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var Vp="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function io(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var n_=Fs(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch{return!1}});function ni(e){if(io(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let n=t.prototype;return!(io(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function r_(e){return ni(e)?{...e}:Array.isArray(e)?[...e]:e}function SR(e){let t=0;for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t++;return t}var ER=e=>{let t=typeof e;switch(t){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(e)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(e)?"array":e===null?"null":e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?"promise":typeof Map<"u"&&e instanceof Map?"map":typeof Set<"u"&&e instanceof Set?"set":typeof Date<"u"&&e instanceof Date?"date":typeof File<"u"&&e instanceof File?"file":"object";default:throw Error(`Unknown data type: ${t}`)}},iu=new Set(["string","number","symbol"]),i_=new Set(["string","number","bigint","boolean","symbol","undefined"]);function Qn(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function dn(e,t,n){let i=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(i._zod.parent=e),i}function F(e){let t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function $R(e){let t;return new Proxy({},{get(n,i,r){return t??(t=e()),Reflect.get(t,i,r)},set(n,i,r,o){return t??(t=e()),Reflect.set(t,i,r,o)},has(n,i){return t??(t=e()),Reflect.has(t,i)},deleteProperty(n,i){return t??(t=e()),Reflect.deleteProperty(t,i)},ownKeys(n){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(n,i){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,i)},defineProperty(n,i,r){return t??(t=e()),Reflect.defineProperty(t,i,r)}})}function te(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function o_(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}var s_={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},a_={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function CR(e,t){let n=e._zod.def,i=n.checks;if(i&&i.length>0)throw Error(".pick() cannot be used on object schemas containing refinements");let r=tr(e._zod.def,{get shape(){let o={};for(let s in t){if(!(s in n.shape))throw Error(`Unrecognized key: "${s}"`);t[s]&&(o[s]=n.shape[s])}return Ir(this,"shape",o),o},checks:[]});return dn(e,r)}function TR(e,t){let n=e._zod.def,i=n.checks;if(i&&i.length>0)throw Error(".omit() cannot be used on object schemas containing refinements");let r=tr(e._zod.def,{get shape(){let o={...e._zod.def.shape};for(let s in t){if(!(s in n.shape))throw Error(`Unrecognized key: "${s}"`);t[s]&&delete o[s]}return Ir(this,"shape",o),o},checks:[]});return dn(e,r)}function IR(e,t){if(!ni(t))throw Error("Invalid input to extend: expected a plain object");let n=e._zod.def.checks;if(n&&n.length>0){let r=e._zod.def.shape;for(let o in t)if(Object.getOwnPropertyDescriptor(r,o)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let i=tr(e._zod.def,{get shape(){let r={...e._zod.def.shape,...t};return Ir(this,"shape",r),r}});return dn(e,i)}function AR(e,t){if(!ni(t))throw Error("Invalid input to safeExtend: expected a plain object");let n=tr(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t};return Ir(this,"shape",i),i}});return dn(e,n)}function MR(e,t){let n=tr(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t._zod.def.shape};return Ir(this,"shape",i),i},get catchall(){return t._zod.def.catchall},checks:[]});return dn(e,n)}function zR(e,t,n){let i=t._zod.def.checks;if(i&&i.length>0)throw Error(".partial() cannot be used on object schemas containing refinements");let r=tr(t._zod.def,{get shape(){let o=t._zod.def.shape,s={...o};if(n)for(let a in n){if(!(a in o))throw Error(`Unrecognized key: "${a}"`);n[a]&&(s[a]=e?new e({type:"optional",innerType:o[a]}):o[a])}else for(let a in o)s[a]=e?new e({type:"optional",innerType:o[a]}):o[a];return Ir(this,"shape",s),s},checks:[]});return dn(t,r)}function DR(e,t,n){let i=tr(t._zod.def,{get shape(){let r=t._zod.def.shape,o={...r};if(n)for(let s in n){if(!(s in o))throw Error(`Unrecognized key: "${s}"`);n[s]&&(o[s]=new e({type:"nonoptional",innerType:r[s]}))}else for(let s in r)o[s]=new e({type:"nonoptional",innerType:r[s]});return Ir(this,"shape",o),o}});return dn(t,i)}function ti(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function Sn(e,t){return t.map(n=>{var i;return(i=n).path??(i.path=[]),n.path.unshift(e),n})}function zs(e){return typeof e=="string"?e:e?.message}function cn(e,t,n){let i={...e,path:e.path??[]};if(!e.message){let r=zs(e.inst?._zod.def?.error?.(e))??zs(t?.error?.(e))??zs(n.customError?.(e))??zs(n.localeError?.(e))??"Invalid input";i.message=r}return delete i.inst,delete i.continue,!t?.reportInput&&delete i.input,i}function mu(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function gu(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function re(e){let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(e===null)return"null";if(Array.isArray(e))return"array";let n=e;if(n&&Object.getPrototypeOf(n)!==Object.prototype&&"constructor"in n&&n.constructor)return n.constructor.name}}return t}function ou(...e){let[t,n,i]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:i}:{...t}}function NR(e){return Object.entries(e).filter(([t,n])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function l_(e){let t=atob(e),n=new Uint8Array(t.length);for(let i=0;i<t.length;i++)n[i]=t.charCodeAt(i);return n}function u_(e){let t="";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t)}function OR(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),n="=".repeat((4-t.length%4)%4);return l_(t+n)}function RR(e){return u_(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function PR(e){let t=e.replace(/^0x/,"");if(t.length%2!==0)throw Error("Invalid hex string length");let n=new Uint8Array(t.length/2);for(let i=0;i<t.length;i+=2)n[i/2]=Number.parseInt(t.slice(i,i+2),16);return n}function LR(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}var Fp=class{constructor(...t){}},c_=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,ru,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Kp=w("$ZodError",c_),Yt=w("$ZodError",c_,{Parent:Error});function Jp(e,t=n=>n.message){let n={},i=[];for(let r of e.issues)r.path.length>0?(n[r.path[0]]=n[r.path[0]]||[],n[r.path[0]].push(t(r))):i.push(t(r));return{formErrors:i,fieldErrors:n}}function Gp(e,t=n=>n.message){let n={_errors:[]},i=r=>{for(let o of r.issues)if(o.code==="invalid_union"&&o.errors.length)o.errors.map(s=>i({issues:s}));else if(o.code==="invalid_key")i({issues:o.issues});else if(o.code==="invalid_element")i({issues:o.issues});else if(o.path.length===0)n._errors.push(t(o));else{let s=n,a=0;for(;a<o.path.length;){let l=o.path[a];a!==o.path.length-1?s[l]=s[l]||{_errors:[]}:(s[l]=s[l]||{_errors:[]},s[l]._errors.push(t(o))),s=s[l],a++}}};return i(e),n}function d_(e,t=n=>n.message){let n={errors:[]},i=(r,o=[])=>{var s,a;for(let l of r.issues)if(l.code==="invalid_union"&&l.errors.length)l.errors.map(u=>i({issues:u},l.path));else if(l.code==="invalid_key")i({issues:l.issues},l.path);else if(l.code==="invalid_element")i({issues:l.issues},l.path);else{let u=[...o,...l.path];if(u.length===0){n.errors.push(t(l));continue}let c=n,d=0;for(;d<u.length;){let f=u[d],p=d===u.length-1;typeof f=="string"?(c.properties??(c.properties={}),(s=c.properties)[f]??(s[f]={errors:[]}),c=c.properties[f]):(c.items??(c.items=[]),(a=c.items)[f]??(a[f]={errors:[]}),c=c.items[f]),p&&c.errors.push(t(l)),d++}}};return i(e),n}function f_(e){let t=[],n=e.map(i=>typeof i=="object"?i.key:i);for(let i of n)typeof i=="number"?t.push(`[${i}]`):typeof i=="symbol"?t.push(`[${JSON.stringify(String(i))}]`):/[^\w$]/.test(i)?t.push(`[${JSON.stringify(i)}]`):(t.length&&t.push("."),t.push(i));return t.join("")}function p_(e){let t=[],n=[...e.issues].sort((i,r)=>(i.path??[]).length-(r.path??[]).length);for(let i of n)t.push(`\u2716 ${i.message}`),i.path?.length&&t.push(` \u2192 at ${f_(i.path)}`);return t.join(`
29
+ `)}var Bs=e=>(t,n,i,r)=>{let o=i?Object.assign(i,{async:!1}):{async:!1},s=t._zod.run({value:n,issues:[]},o);if(s instanceof Promise)throw new Yn;if(s.issues.length){let a=new(r?.Err??e)(s.issues.map(l=>cn(l,o,Dt())));throw Vp(a,r?.callee),a}return s.value},Bp=Bs(Yt),Us=e=>async(t,n,i,r)=>{let o=i?Object.assign(i,{async:!0}):{async:!0},s=t._zod.run({value:n,issues:[]},o);if(s instanceof Promise&&(s=await s),s.issues.length){let a=new(r?.Err??e)(s.issues.map(l=>cn(l,o,Dt())));throw Vp(a,r?.callee),a}return s.value},Up=Us(Yt),js=e=>(t,n,i)=>{let r=i?{...i,async:!1}:{async:!1},o=t._zod.run({value:n,issues:[]},r);if(o instanceof Promise)throw new Yn;return o.issues.length?{success:!1,error:new(e??Kp)(o.issues.map(s=>cn(s,r,Dt())))}:{success:!0,data:o.value}},h_=js(Yt),Zs=e=>async(t,n,i)=>{let r=i?Object.assign(i,{async:!0}):{async:!0},o=t._zod.run({value:n,issues:[]},r);return o instanceof Promise&&(o=await o),o.issues.length?{success:!1,error:new e(o.issues.map(s=>cn(s,r,Dt())))}:{success:!0,data:o.value}},m_=Zs(Yt),Xp=e=>(t,n,i)=>{let r=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return Bs(e)(t,n,r)},FR=Xp(Yt),Yp=e=>(t,n,i)=>Bs(e)(t,n,i),BR=Yp(Yt),Qp=e=>async(t,n,i)=>{let r=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return Us(e)(t,n,r)},UR=Qp(Yt),eh=e=>async(t,n,i)=>Us(e)(t,n,i),jR=eh(Yt),th=e=>(t,n,i)=>{let r=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return js(e)(t,n,r)},ZR=th(Yt),nh=e=>(t,n,i)=>js(e)(t,n,i),HR=nh(Yt),rh=e=>async(t,n,i)=>{let r=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return Zs(e)(t,n,r)},qR=rh(Yt),ih=e=>async(t,n,i)=>Zs(e)(t,n,i),WR=ih(Yt),si={};er(si,{xid:()=>y_,uuid7:()=>GR,uuid6:()=>JR,uuid4:()=>KR,uuid:()=>oo,uppercase:()=>W_,unicodeEmail:()=>E_,undefined:()=>H_,ulid:()=>v_,time:()=>P_,string:()=>F_,sha512_hex:()=>bP,sha512_base64url:()=>yP,sha512_base64:()=>vP,sha384_hex:()=>hP,sha384_base64url:()=>gP,sha384_base64:()=>mP,sha256_hex:()=>dP,sha256_base64url:()=>pP,sha256_base64:()=>fP,sha1_hex:()=>lP,sha1_base64url:()=>cP,sha1_base64:()=>uP,rfc5322Email:()=>YR,number:()=>sh,null:()=>Z_,nanoid:()=>x_,md5_hex:()=>oP,md5_base64url:()=>aP,md5_base64:()=>sP,mac:()=>I_,lowercase:()=>q_,ksuid:()=>k_,ipv6:()=>T_,ipv4:()=>C_,integer:()=>U_,idnEmail:()=>QR,html5Email:()=>XR,hostname:()=>nP,hex:()=>iP,guid:()=>w_,extendedDuration:()=>VR,emoji:()=>$_,email:()=>S_,e164:()=>D_,duration:()=>__,domain:()=>rP,datetime:()=>L_,date:()=>O_,cuid2:()=>b_,cuid:()=>g_,cidrv6:()=>M_,cidrv4:()=>A_,browserEmail:()=>eP,boolean:()=>j_,bigint:()=>B_,base64url:()=>oh,base64:()=>z_});var g_=/^[cC][^\s-]{8,}$/,b_=/^[0-9a-z]+$/,v_=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,y_=/^[0-9a-vA-V]{20}$/,k_=/^[A-Za-z0-9]{27}$/,x_=/^[a-zA-Z0-9_-]{21}$/,__=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,VR=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,w_=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,oo=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,KR=oo(4),JR=oo(6),GR=oo(7),S_=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,XR=/^[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])?)*$/,YR=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,E_=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,QR=E_,eP=/^[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])?)*$/,tP="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function $_(){return new RegExp(tP,"u")}var C_=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,T_=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,I_=e=>{let t=Qn(e??":");return new RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},A_=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,M_=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,z_=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,oh=/^[A-Za-z0-9_-]*$/,nP=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,rP=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,D_=/^\+[1-9]\d{6,14}$/,N_="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",O_=new RegExp(`^${N_}$`);function R_(e){return typeof e.precision=="number"?e.precision===-1?"(?:[01]\\d|2[0-3]):[0-5]\\d":e.precision===0?"(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d":`(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{${e.precision}}`:"(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?"}function P_(e){return new RegExp(`^${R_(e)}$`)}function L_(e){let t=R_({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let i=`${t}(?:${n.join("|")})`;return new RegExp(`^${N_}T(?:${i})$`)}var F_=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},B_=/^-?\d+n?$/,U_=/^-?\d+$/,sh=/^-?\d+(?:\.\d+)?$/,j_=/^(?:true|false)$/i,Z_=/^null$/i,H_=/^undefined$/i,q_=/^[^A-Z]*$/,W_=/^[^a-z]*$/,iP=/^[0-9a-fA-F]*$/;function Hs(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function qs(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var oP=/^[0-9a-fA-F]{32}$/,sP=Hs(22,"=="),aP=qs(22),lP=/^[0-9a-fA-F]{40}$/,uP=Hs(27,"="),cP=qs(27),dP=/^[0-9a-fA-F]{64}$/,fP=Hs(43,"="),pP=qs(43),hP=/^[0-9a-fA-F]{96}$/,mP=Hs(64,""),gP=qs(64),bP=/^[0-9a-fA-F]{128}$/,vP=Hs(86,"=="),yP=qs(86),Je=w("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),V_={number:"number",bigint:"bigint",object:"date"},ah=w("$ZodCheckLessThan",(e,t)=>{Je.init(e,t);let n=V_[typeof t.value];e._zod.onattach.push(i=>{let r=i._zod.bag,o=(t.inclusive?r.maximum:r.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<o&&(t.inclusive?r.maximum=t.value:r.exclusiveMaximum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value<=t.value:i.value<t.value)||i.issues.push({origin:n,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),lh=w("$ZodCheckGreaterThan",(e,t)=>{Je.init(e,t);let n=V_[typeof t.value];e._zod.onattach.push(i=>{let r=i._zod.bag,o=(t.inclusive?r.minimum:r.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>o&&(t.inclusive?r.minimum=t.value:r.exclusiveMinimum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value>=t.value:i.value>t.value)||i.issues.push({origin:n,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),K_=w("$ZodCheckMultipleOf",(e,t)=>{Je.init(e,t),e._zod.onattach.push(n=>{var i;(i=n._zod.bag).multipleOf??(i.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%t.value===BigInt(0):e_(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),J_=w("$ZodCheckNumberFormat",(e,t)=>{Je.init(e,t),t.format=t.format||"float64";let n=t.format?.includes("int"),i=n?"int":"number",[r,o]=s_[t.format];e._zod.onattach.push(s=>{let a=s._zod.bag;a.format=t.format,a.minimum=r,a.maximum=o,n&&(a.pattern=U_)}),e._zod.check=s=>{let a=s.value;if(n){if(!Number.isInteger(a)){s.issues.push({expected:i,format:t.format,code:"invalid_type",continue:!1,input:a,inst:e});return}if(!Number.isSafeInteger(a)){a>0?s.issues.push({input:a,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!t.abort}):s.issues.push({input:a,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!t.abort});return}}a<r&&s.issues.push({origin:"number",input:a,code:"too_small",minimum:r,inclusive:!0,inst:e,continue:!t.abort}),a>o&&s.issues.push({origin:"number",input:a,code:"too_big",maximum:o,inclusive:!0,inst:e,continue:!t.abort})}}),G_=w("$ZodCheckBigIntFormat",(e,t)=>{Je.init(e,t);let[n,i]=a_[t.format];e._zod.onattach.push(r=>{let o=r._zod.bag;o.format=t.format,o.minimum=n,o.maximum=i}),e._zod.check=r=>{let o=r.value;o<n&&r.issues.push({origin:"bigint",input:o,code:"too_small",minimum:n,inclusive:!0,inst:e,continue:!t.abort}),o>i&&r.issues.push({origin:"bigint",input:o,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),X_=w("$ZodCheckMaxSize",(e,t)=>{var n;Je.init(e,t),(n=e._zod.def).when??(n.when=i=>{let r=i.value;return!oi(r)&&r.size!==void 0}),e._zod.onattach.push(i=>{let r=i._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<r&&(i._zod.bag.maximum=t.maximum)}),e._zod.check=i=>{let r=i.value;r.size<=t.maximum||i.issues.push({origin:mu(r),code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Y_=w("$ZodCheckMinSize",(e,t)=>{var n;Je.init(e,t),(n=e._zod.def).when??(n.when=i=>{let r=i.value;return!oi(r)&&r.size!==void 0}),e._zod.onattach.push(i=>{let r=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>r&&(i._zod.bag.minimum=t.minimum)}),e._zod.check=i=>{let r=i.value;r.size>=t.minimum||i.issues.push({origin:mu(r),code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Q_=w("$ZodCheckSizeEquals",(e,t)=>{var n;Je.init(e,t),(n=e._zod.def).when??(n.when=i=>{let r=i.value;return!oi(r)&&r.size!==void 0}),e._zod.onattach.push(i=>{let r=i._zod.bag;r.minimum=t.size,r.maximum=t.size,r.size=t.size}),e._zod.check=i=>{let r=i.value,o=r.size;if(o===t.size)return;let s=o>t.size;i.issues.push({origin:mu(r),...s?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:!0,exact:!0,input:i.value,inst:e,continue:!t.abort})}}),ew=w("$ZodCheckMaxLength",(e,t)=>{var n;Je.init(e,t),(n=e._zod.def).when??(n.when=i=>{let r=i.value;return!oi(r)&&r.length!==void 0}),e._zod.onattach.push(i=>{let r=i._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<r&&(i._zod.bag.maximum=t.maximum)}),e._zod.check=i=>{let r=i.value;if(r.length<=t.maximum)return;let o=gu(r);i.issues.push({origin:o,code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),tw=w("$ZodCheckMinLength",(e,t)=>{var n;Je.init(e,t),(n=e._zod.def).when??(n.when=i=>{let r=i.value;return!oi(r)&&r.length!==void 0}),e._zod.onattach.push(i=>{let r=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>r&&(i._zod.bag.minimum=t.minimum)}),e._zod.check=i=>{let r=i.value;if(r.length>=t.minimum)return;let o=gu(r);i.issues.push({origin:o,code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),nw=w("$ZodCheckLengthEquals",(e,t)=>{var n;Je.init(e,t),(n=e._zod.def).when??(n.when=i=>{let r=i.value;return!oi(r)&&r.length!==void 0}),e._zod.onattach.push(i=>{let r=i._zod.bag;r.minimum=t.length,r.maximum=t.length,r.length=t.length}),e._zod.check=i=>{let r=i.value,o=r.length;if(o===t.length)return;let s=gu(r),a=o>t.length;i.issues.push({origin:s,...a?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:i.value,inst:e,continue:!t.abort})}}),Ws=w("$ZodCheckStringFormat",(e,t)=>{var n,i;Je.init(e,t),e._zod.onattach.push(r=>{let o=r._zod.bag;o.format=t.format,t.pattern&&(o.patterns??(o.patterns=new Set),o.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:t.format,input:r.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(i=e._zod).check??(i.check=()=>{})}),rw=w("$ZodCheckRegex",(e,t)=>{Ws.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),iw=w("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=q_),Ws.init(e,t)}),ow=w("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=W_),Ws.init(e,t)}),sw=w("$ZodCheckIncludes",(e,t)=>{Je.init(e,t);let n=Qn(t.includes),i=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=i,e._zod.onattach.push(r=>{let o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(i)}),e._zod.check=r=>{r.value.includes(t.includes,t.position)||r.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:r.value,inst:e,continue:!t.abort})}}),aw=w("$ZodCheckStartsWith",(e,t)=>{Je.init(e,t);let n=new RegExp(`^${Qn(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(i=>{let r=i._zod.bag;r.patterns??(r.patterns=new Set),r.patterns.add(n)}),e._zod.check=i=>{i.value.startsWith(t.prefix)||i.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:i.value,inst:e,continue:!t.abort})}}),lw=w("$ZodCheckEndsWith",(e,t)=>{Je.init(e,t);let n=new RegExp(`.*${Qn(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(i=>{let r=i._zod.bag;r.patterns??(r.patterns=new Set),r.patterns.add(n)}),e._zod.check=i=>{i.value.endsWith(t.suffix)||i.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:i.value,inst:e,continue:!t.abort})}});function Dx(e,t,n){e.issues.length&&t.issues.push(...Sn(n,e.issues))}var uw=w("$ZodCheckProperty",(e,t)=>{Je.init(e,t),e._zod.check=n=>{let i=t.schema._zod.run({value:n.value[t.property],issues:[]},{});if(i instanceof Promise)return i.then(r=>Dx(r,n,t.property));Dx(i,n,t.property)}}),cw=w("$ZodCheckMimeType",(e,t)=>{Je.init(e,t);let n=new Set(t.mime);e._zod.onattach.push(i=>{i._zod.bag.mime=t.mime}),e._zod.check=i=>{n.has(i.value.type)||i.issues.push({code:"invalid_value",values:t.mime,input:i.value.type,inst:e,continue:!t.abort})}}),dw=w("$ZodCheckOverwrite",(e,t)=>{Je.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}}),su=class{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}let n=t.split(`
30
+ `).filter(o=>o),i=Math.min(...n.map(o=>o.length-o.trimStart().length)),r=n.map(o=>o.slice(i)).map(o=>" ".repeat(this.indent*2)+o);for(let o of r)this.content.push(o)}compile(){let t=Function,n=this?.args,i=[...(this?.content??[""]).map(r=>` ${r}`)];return new t(...n,i.join(`
31
+ `))}},fw={major:4,minor:3,patch:5},le=w("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=fw;let i=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&i.unshift(e);for(let r of i)for(let o of r._zod.onattach)o(e);if(i.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let r=(s,a,l)=>{let u=ti(s),c;for(let d of a){if(d._zod.def.when){if(!d._zod.def.when(s))continue}else if(u)continue;let f=s.issues.length,p=d._zod.check(s);if(p instanceof Promise&&l?.async===!1)throw new Yn;if(c||p instanceof Promise)c=(c??Promise.resolve()).then(async()=>{await p,s.issues.length!==f&&(u||(u=ti(s,f)))});else{if(s.issues.length===f)continue;u||(u=ti(s,f))}}return c?c.then(()=>s):s},o=(s,a,l)=>{if(ti(s))return s.aborted=!0,s;let u=r(a,i,l);if(u instanceof Promise){if(l.async===!1)throw new Yn;return u.then(c=>e._zod.parse(c,l))}return e._zod.parse(u,l)};e._zod.run=(s,a)=>{if(a.skipChecks)return e._zod.parse(s,a);if(a.direction==="backward"){let u=e._zod.parse({value:s.value,issues:[]},{...a,skipChecks:!0});return u instanceof Promise?u.then(c=>o(c,s,a)):o(u,s,a)}let l=e._zod.parse(s,a);if(l instanceof Promise){if(a.async===!1)throw new Yn;return l.then(u=>r(u,i,a))}return r(l,i,a)}}pe(e,"~standard",()=>({validate:r=>{try{let o=h_(e,r);return o.success?{value:o.data}:{issues:o.error?.issues}}catch{return m_(e,r).then(s=>s.success?{value:s.data}:{issues:s.error?.issues})}},vendor:"zod",version:1}))}),Vs=w("$ZodString",(e,t)=>{le.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??F_(e._zod.bag),e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),Re=w("$ZodStringFormat",(e,t)=>{Ws.init(e,t),Vs.init(e,t)}),pw=w("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=w_),Re.init(e,t)}),hw=w("$ZodUUID",(e,t)=>{if(t.version){let n={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(n===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=oo(n))}else t.pattern??(t.pattern=oo());Re.init(e,t)}),mw=w("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=S_),Re.init(e,t)}),gw=w("$ZodURL",(e,t)=>{Re.init(e,t),e._zod.check=n=>{try{let i=n.value.trim(),r=new URL(i);t.hostname&&(t.hostname.lastIndex=0,!t.hostname.test(r.hostname)&&n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,!t.protocol.test(r.protocol.endsWith(":")?r.protocol.slice(0,-1):r.protocol)&&n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=r.href:n.value=i;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),bw=w("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=$_()),Re.init(e,t)}),vw=w("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=x_),Re.init(e,t)}),yw=w("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=g_),Re.init(e,t)}),kw=w("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=b_),Re.init(e,t)}),xw=w("$ZodULID",(e,t)=>{t.pattern??(t.pattern=v_),Re.init(e,t)}),_w=w("$ZodXID",(e,t)=>{t.pattern??(t.pattern=y_),Re.init(e,t)}),ww=w("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=k_),Re.init(e,t)}),Sw=w("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=L_(t)),Re.init(e,t)}),Ew=w("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=O_),Re.init(e,t)}),$w=w("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=P_(t)),Re.init(e,t)}),Cw=w("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=__),Re.init(e,t)}),Tw=w("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=C_),Re.init(e,t),e._zod.bag.format="ipv4"}),Iw=w("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=T_),Re.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),Aw=w("$ZodMAC",(e,t)=>{t.pattern??(t.pattern=I_(t.delimiter)),Re.init(e,t),e._zod.bag.format="mac"}),Mw=w("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=A_),Re.init(e,t)}),zw=w("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=M_),Re.init(e,t),e._zod.check=n=>{let i=n.value.split("/");try{if(i.length!==2)throw Error();let[r,o]=i;if(!o)throw Error();let s=Number(o);if(`${s}`!==o||s<0||s>128)throw Error();new URL(`http://[${r}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function uh(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}var Dw=w("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=z_),Re.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{uh(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function Nw(e){if(!oh.test(e))return!1;let t=e.replace(/[-_]/g,i=>i==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return uh(n)}var Ow=w("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=oh),Re.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{Nw(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),Rw=w("$ZodE164",(e,t)=>{t.pattern??(t.pattern=D_),Re.init(e,t)});function Pw(e,t=null){try{let n=e.split(".");if(n.length!==3)return!1;let[i]=n;if(!i)return!1;let r=JSON.parse(atob(i));return!("typ"in r&&r?.typ!=="JWT"||!r.alg||t&&(!("alg"in r)||r.alg!==t))}catch{return!1}}var Lw=w("$ZodJWT",(e,t)=>{Re.init(e,t),e._zod.check=n=>{Pw(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),Fw=w("$ZodCustomStringFormat",(e,t)=>{Re.init(e,t),e._zod.check=n=>{t.fn(n.value)||n.issues.push({code:"invalid_format",format:t.format,input:n.value,inst:e,continue:!t.abort})}}),ch=w("$ZodNumber",(e,t)=>{le.init(e,t),e._zod.pattern=e._zod.bag.pattern??sh,e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let r=n.value;if(typeof r=="number"&&!Number.isNaN(r)&&Number.isFinite(r))return n;let o=typeof r=="number"?Number.isNaN(r)?"NaN":Number.isFinite(r)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:r,inst:e,...o?{received:o}:{}}),n}}),Bw=w("$ZodNumberFormat",(e,t)=>{J_.init(e,t),ch.init(e,t)}),dh=w("$ZodBoolean",(e,t)=>{le.init(e,t),e._zod.pattern=j_,e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=!!n.value}catch{}let r=n.value;return typeof r=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:r,inst:e}),n}}),fh=w("$ZodBigInt",(e,t)=>{le.init(e,t),e._zod.pattern=B_,e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=BigInt(n.value)}catch{}return typeof n.value=="bigint"||n.issues.push({expected:"bigint",code:"invalid_type",input:n.value,inst:e}),n}}),Uw=w("$ZodBigIntFormat",(e,t)=>{G_.init(e,t),fh.init(e,t)}),jw=w("$ZodSymbol",(e,t)=>{le.init(e,t),e._zod.parse=(n,i)=>{let r=n.value;return typeof r=="symbol"||n.issues.push({expected:"symbol",code:"invalid_type",input:r,inst:e}),n}}),Zw=w("$ZodUndefined",(e,t)=>{le.init(e,t),e._zod.pattern=H_,e._zod.values=new Set([void 0]),e._zod.optin="optional",e._zod.optout="optional",e._zod.parse=(n,i)=>{let r=n.value;return typeof r>"u"||n.issues.push({expected:"undefined",code:"invalid_type",input:r,inst:e}),n}}),Hw=w("$ZodNull",(e,t)=>{le.init(e,t),e._zod.pattern=Z_,e._zod.values=new Set([null]),e._zod.parse=(n,i)=>{let r=n.value;return r===null||n.issues.push({expected:"null",code:"invalid_type",input:r,inst:e}),n}}),qw=w("$ZodAny",(e,t)=>{le.init(e,t),e._zod.parse=n=>n}),Ww=w("$ZodUnknown",(e,t)=>{le.init(e,t),e._zod.parse=n=>n}),Vw=w("$ZodNever",(e,t)=>{le.init(e,t),e._zod.parse=(n,i)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)}),Kw=w("$ZodVoid",(e,t)=>{le.init(e,t),e._zod.parse=(n,i)=>{let r=n.value;return typeof r>"u"||n.issues.push({expected:"void",code:"invalid_type",input:r,inst:e}),n}}),Jw=w("$ZodDate",(e,t)=>{le.init(e,t),e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=new Date(n.value)}catch{}let r=n.value,o=r instanceof Date;return o&&!Number.isNaN(r.getTime())||n.issues.push({expected:"date",code:"invalid_type",input:r,...o?{received:"Invalid Date"}:{},inst:e}),n}});function Nx(e,t,n){e.issues.length&&t.issues.push(...Sn(n,e.issues)),t.value[n]=e.value}var Gw=w("$ZodArray",(e,t)=>{le.init(e,t),e._zod.parse=(n,i)=>{let r=n.value;if(!Array.isArray(r))return n.issues.push({expected:"array",code:"invalid_type",input:r,inst:e}),n;n.value=Array(r.length);let o=[];for(let s=0;s<r.length;s++){let a=r[s],l=t.element._zod.run({value:a,issues:[]},i);l instanceof Promise?o.push(l.then(u=>Nx(u,n,s))):Nx(l,n,s)}return o.length?Promise.all(o).then(()=>n):n}});function au(e,t,n,i,r){if(e.issues.length){if(r&&!(n in i))return;t.issues.push(...Sn(n,e.issues))}e.value===void 0?n in i&&(t.value[n]=void 0):t.value[n]=e.value}function Xw(e){let t=Object.keys(e.shape);for(let i of t)if(!e.shape?.[i]?._zod?.traits?.has("$ZodType"))throw Error(`Invalid element at key "${i}": expected a Zod schema`);let n=o_(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function Yw(e,t,n,i,r,o){let s=[],a=r.keySet,l=r.catchall._zod,u=l.def.type,c=l.optout==="optional";for(let d in t){if(a.has(d))continue;if(u==="never"){s.push(d);continue}let f=l.run({value:t[d],issues:[]},i);f instanceof Promise?e.push(f.then(p=>au(p,n,d,t,c))):au(f,n,d,t,c)}return s.length&&n.issues.push({code:"unrecognized_keys",keys:s,input:t,inst:o}),e.length?Promise.all(e).then(()=>n):n}var Qw=w("$ZodObject",(e,t)=>{if(le.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){let s=t.shape;Object.defineProperty(t,"shape",{get:()=>{let a={...s};return Object.defineProperty(t,"shape",{value:a}),a}})}let n=Fs(()=>Xw(t));pe(e._zod,"propValues",()=>{let s=t.shape,a={};for(let l in s){let u=s[l]._zod;if(u.values){a[l]??(a[l]=new Set);for(let c of u.values)a[l].add(c)}}return a});let i=io,r=t.catchall,o;e._zod.parse=(s,a)=>{o??(o=n.value);let l=s.value;if(!i(l))return s.issues.push({expected:"object",code:"invalid_type",input:l,inst:e}),s;s.value={};let u=[],c=o.shape;for(let d of o.keys){let f=c[d],p=f._zod.optout==="optional",h=f._zod.run({value:l[d],issues:[]},a);h instanceof Promise?u.push(h.then(m=>au(m,s,d,l,p))):au(h,s,d,l,p)}return r?Yw(u,l,s,a,n.value,e):u.length?Promise.all(u).then(()=>s):s}}),eS=w("$ZodObjectJIT",(e,t)=>{Qw.init(e,t);let n=e._zod.parse,i=Fs(()=>Xw(t)),r=d=>{let f=new su(["shape","payload","ctx"]),p=i.value,h=v=>{let y=Lp(v);return`shape[${y}]._zod.run({ value: input[${y}], issues: [] }, ctx)`};f.write("const input = payload.value;");let m=Object.create(null),g=0;for(let v of p.keys)m[v]=`key_${g++}`;f.write("const newResult = {};");for(let v of p.keys){let y=m[v],x=Lp(v),C=d[v]?._zod?.optout==="optional";f.write(`const ${y} = ${h(v)};`),C?f.write(`
32
+ if (${y}.issues.length) {
33
+ if (${x} in input) {
34
+ payload.issues = payload.issues.concat(${y}.issues.map(iss => ({
35
+ ...iss,
36
+ path: iss.path ? [${x}, ...iss.path] : [${x}]
37
+ })));
38
+ }
39
+ }
40
+
41
+ if (${y}.value === undefined) {
42
+ if (${x} in input) {
43
+ newResult[${x}] = undefined;
44
+ }
45
+ } else {
46
+ newResult[${x}] = ${y}.value;
47
+ }
48
+
49
+ `):f.write(`
50
+ if (${y}.issues.length) {
51
+ payload.issues = payload.issues.concat(${y}.issues.map(iss => ({
52
+ ...iss,
53
+ path: iss.path ? [${x}, ...iss.path] : [${x}]
54
+ })));
55
+ }
56
+
57
+ if (${y}.value === undefined) {
58
+ if (${x} in input) {
59
+ newResult[${x}] = undefined;
60
+ }
61
+ } else {
62
+ newResult[${x}] = ${y}.value;
63
+ }
64
+
65
+ `)}f.write("payload.value = newResult;"),f.write("return payload;");let b=f.compile();return(v,y)=>b(d,v,y)},o,s=io,a=!nu.jitless,l=a&&n_.value,u=t.catchall,c;e._zod.parse=(d,f)=>{c??(c=i.value);let p=d.value;return s(p)?a&&l&&f?.async===!1&&f.jitless!==!0?(o||(o=r(t.shape)),d=o(d,f),u?Yw([],p,d,f,c,e):d):n(d,f):(d.issues.push({expected:"object",code:"invalid_type",input:p,inst:e}),d)}});function Ox(e,t,n,i){for(let o of e)if(o.issues.length===0)return t.value=o.value,t;let r=e.filter(o=>!ti(o));return r.length===1?(t.value=r[0].value,r[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(o=>o.issues.map(s=>cn(s,i,Dt())))}),t)}var bu=w("$ZodUnion",(e,t)=>{le.init(e,t),pe(e._zod,"optin",()=>t.options.some(r=>r._zod.optin==="optional")?"optional":void 0),pe(e._zod,"optout",()=>t.options.some(r=>r._zod.optout==="optional")?"optional":void 0),pe(e._zod,"values",()=>{if(t.options.every(r=>r._zod.values))return new Set(t.options.flatMap(r=>Array.from(r._zod.values)))}),pe(e._zod,"pattern",()=>{if(t.options.every(r=>r._zod.pattern)){let r=t.options.map(o=>o._zod.pattern);return new RegExp(`^(${r.map(o=>hu(o.source)).join("|")})$`)}});let n=t.options.length===1,i=t.options[0]._zod.run;e._zod.parse=(r,o)=>{if(n)return i(r,o);let s=!1,a=[];for(let l of t.options){let u=l._zod.run({value:r.value,issues:[]},o);if(u instanceof Promise)a.push(u),s=!0;else{if(u.issues.length===0)return u;a.push(u)}}return s?Promise.all(a).then(l=>Ox(l,r,e,o)):Ox(a,r,e,o)}});function Rx(e,t,n,i){let r=e.filter(o=>o.issues.length===0);return r.length===1?(t.value=r[0].value,t):(r.length===0?t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(o=>o.issues.map(s=>cn(s,i,Dt())))}):t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:[],inclusive:!1}),t)}var tS=w("$ZodXor",(e,t)=>{bu.init(e,t),t.inclusive=!1;let n=t.options.length===1,i=t.options[0]._zod.run;e._zod.parse=(r,o)=>{if(n)return i(r,o);let s=!1,a=[];for(let l of t.options){let u=l._zod.run({value:r.value,issues:[]},o);u instanceof Promise?(a.push(u),s=!0):a.push(u)}return s?Promise.all(a).then(l=>Rx(l,r,e,o)):Rx(a,r,e,o)}}),nS=w("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,bu.init(e,t);let n=e._zod.parse;pe(e._zod,"propValues",()=>{let r={};for(let o of t.options){let s=o._zod.propValues;if(!s||Object.keys(s).length===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(o)}"`);for(let[a,l]of Object.entries(s)){r[a]||(r[a]=new Set);for(let u of l)r[a].add(u)}}return r});let i=Fs(()=>{let r=t.options,o=new Map;for(let s of r){let a=s._zod.propValues?.[t.discriminator];if(!a||a.size===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(s)}"`);for(let l of a){if(o.has(l))throw Error(`Duplicate discriminator value "${String(l)}"`);o.set(l,s)}}return o});e._zod.parse=(r,o)=>{let s=r.value;if(!io(s))return r.issues.push({code:"invalid_type",expected:"object",input:s,inst:e}),r;let a=i.value.get(s?.[t.discriminator]);return a?a._zod.run(r,o):t.unionFallback?n(r,o):(r.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:s,path:[t.discriminator],inst:e}),r)}}),rS=w("$ZodIntersection",(e,t)=>{le.init(e,t),e._zod.parse=(n,i)=>{let r=n.value,o=t.left._zod.run({value:r,issues:[]},i),s=t.right._zod.run({value:r,issues:[]},i);return o instanceof Promise||s instanceof Promise?Promise.all([o,s]).then(([a,l])=>Px(n,a,l)):Px(n,o,s)}});function jp(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(ni(e)&&ni(t)){let n=Object.keys(t),i=Object.keys(e).filter(o=>n.indexOf(o)!==-1),r={...e,...t};for(let o of i){let s=jp(e[o],t[o]);if(!s.valid)return{valid:!1,mergeErrorPath:[o,...s.mergeErrorPath]};r[o]=s.data}return{valid:!0,data:r}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let i=0;i<e.length;i++){let r=e[i],o=t[i],s=jp(r,o);if(!s.valid)return{valid:!1,mergeErrorPath:[i,...s.mergeErrorPath]};n.push(s.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function Px(e,t,n){let i=new Map,r;for(let a of t.issues)if(a.code==="unrecognized_keys"){r??(r=a);for(let l of a.keys)i.has(l)||i.set(l,{}),i.get(l).l=!0}else e.issues.push(a);for(let a of n.issues)if(a.code==="unrecognized_keys")for(let l of a.keys)i.has(l)||i.set(l,{}),i.get(l).r=!0;else e.issues.push(a);let o=[...i].filter(([,a])=>a.l&&a.r).map(([a])=>a);if(o.length&&r&&e.issues.push({...r,keys:o}),ti(e))return e;let s=jp(t.value,n.value);if(!s.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(s.mergeErrorPath)}`);return e.value=s.data,e}var ph=w("$ZodTuple",(e,t)=>{le.init(e,t);let n=t.items;e._zod.parse=(i,r)=>{let o=i.value;if(!Array.isArray(o))return i.issues.push({input:o,inst:e,expected:"tuple",code:"invalid_type"}),i;i.value=[];let s=[],a=[...n].reverse().findIndex(c=>c._zod.optin!=="optional"),l=a===-1?0:n.length-a;if(!t.rest){let c=o.length>n.length,d=o.length<l-1;if(c||d)return i.issues.push({...c?{code:"too_big",maximum:n.length,inclusive:!0}:{code:"too_small",minimum:n.length},input:o,inst:e,origin:"array"}),i}let u=-1;for(let c of n){if(u++,u>=o.length&&u>=l)continue;let d=c._zod.run({value:o[u],issues:[]},r);d instanceof Promise?s.push(d.then(f=>Yl(f,i,u))):Yl(d,i,u)}if(t.rest){let c=o.slice(n.length);for(let d of c){u++;let f=t.rest._zod.run({value:d,issues:[]},r);f instanceof Promise?s.push(f.then(p=>Yl(p,i,u))):Yl(f,i,u)}}return s.length?Promise.all(s).then(()=>i):i}});function Yl(e,t,n){e.issues.length&&t.issues.push(...Sn(n,e.issues)),t.value[n]=e.value}var iS=w("$ZodRecord",(e,t)=>{le.init(e,t),e._zod.parse=(n,i)=>{let r=n.value;if(!ni(r))return n.issues.push({expected:"record",code:"invalid_type",input:r,inst:e}),n;let o=[],s=t.keyType._zod.values;if(s){n.value={};let a=new Set;for(let u of s)if(typeof u=="string"||typeof u=="number"||typeof u=="symbol"){a.add(typeof u=="number"?u.toString():u);let c=t.valueType._zod.run({value:r[u],issues:[]},i);c instanceof Promise?o.push(c.then(d=>{d.issues.length&&n.issues.push(...Sn(u,d.issues)),n.value[u]=d.value})):(c.issues.length&&n.issues.push(...Sn(u,c.issues)),n.value[u]=c.value)}let l;for(let u in r)a.has(u)||(l=l??[],l.push(u));l&&l.length>0&&n.issues.push({code:"unrecognized_keys",input:r,inst:e,keys:l})}else{n.value={};for(let a of Reflect.ownKeys(r)){if(a==="__proto__")continue;let l=t.keyType._zod.run({value:a,issues:[]},i);if(l instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(typeof a=="string"&&sh.test(a)&&l.issues.length&&l.issues.some(c=>c.code==="invalid_type"&&c.expected==="number")){let c=t.keyType._zod.run({value:Number(a),issues:[]},i);if(c instanceof Promise)throw Error("Async schemas not supported in object keys currently");c.issues.length===0&&(l=c)}if(l.issues.length){t.mode==="loose"?n.value[a]=r[a]:n.issues.push({code:"invalid_key",origin:"record",issues:l.issues.map(c=>cn(c,i,Dt())),input:a,path:[a],inst:e});continue}let u=t.valueType._zod.run({value:r[a],issues:[]},i);u instanceof Promise?o.push(u.then(c=>{c.issues.length&&n.issues.push(...Sn(a,c.issues)),n.value[l.value]=c.value})):(u.issues.length&&n.issues.push(...Sn(a,u.issues)),n.value[l.value]=u.value)}}return o.length?Promise.all(o).then(()=>n):n}}),oS=w("$ZodMap",(e,t)=>{le.init(e,t),e._zod.parse=(n,i)=>{let r=n.value;if(!(r instanceof Map))return n.issues.push({expected:"map",code:"invalid_type",input:r,inst:e}),n;let o=[];n.value=new Map;for(let[s,a]of r){let l=t.keyType._zod.run({value:s,issues:[]},i),u=t.valueType._zod.run({value:a,issues:[]},i);l instanceof Promise||u instanceof Promise?o.push(Promise.all([l,u]).then(([c,d])=>{Lx(c,d,n,s,r,e,i)})):Lx(l,u,n,s,r,e,i)}return o.length?Promise.all(o).then(()=>n):n}});function Lx(e,t,n,i,r,o,s){e.issues.length&&(iu.has(typeof i)?n.issues.push(...Sn(i,e.issues)):n.issues.push({code:"invalid_key",origin:"map",input:r,inst:o,issues:e.issues.map(a=>cn(a,s,Dt()))})),t.issues.length&&(iu.has(typeof i)?n.issues.push(...Sn(i,t.issues)):n.issues.push({origin:"map",code:"invalid_element",input:r,inst:o,key:i,issues:t.issues.map(a=>cn(a,s,Dt()))})),n.value.set(e.value,t.value)}var sS=w("$ZodSet",(e,t)=>{le.init(e,t),e._zod.parse=(n,i)=>{let r=n.value;if(!(r instanceof Set))return n.issues.push({input:r,inst:e,expected:"set",code:"invalid_type"}),n;let o=[];n.value=new Set;for(let s of r){let a=t.valueType._zod.run({value:s,issues:[]},i);a instanceof Promise?o.push(a.then(l=>Fx(l,n))):Fx(a,n)}return o.length?Promise.all(o).then(()=>n):n}});function Fx(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}var aS=w("$ZodEnum",(e,t)=>{le.init(e,t);let n=Wp(t.entries),i=new Set(n);e._zod.values=i,e._zod.pattern=new RegExp(`^(${n.filter(r=>iu.has(typeof r)).map(r=>typeof r=="string"?Qn(r):r.toString()).join("|")})$`),e._zod.parse=(r,o)=>{let s=r.value;return i.has(s)||r.issues.push({code:"invalid_value",values:n,input:s,inst:e}),r}}),lS=w("$ZodLiteral",(e,t)=>{if(le.init(e,t),t.values.length===0)throw Error("Cannot create literal schema with no valid values");let n=new Set(t.values);e._zod.values=n,e._zod.pattern=new RegExp(`^(${t.values.map(i=>typeof i=="string"?Qn(i):i?Qn(i.toString()):String(i)).join("|")})$`),e._zod.parse=(i,r)=>{let o=i.value;return n.has(o)||i.issues.push({code:"invalid_value",values:t.values,input:o,inst:e}),i}}),uS=w("$ZodFile",(e,t)=>{le.init(e,t),e._zod.parse=(n,i)=>{let r=n.value;return r instanceof File||n.issues.push({expected:"file",code:"invalid_type",input:r,inst:e}),n}}),cS=w("$ZodTransform",(e,t)=>{le.init(e,t),e._zod.parse=(n,i)=>{if(i.direction==="backward")throw new ro(e.constructor.name);let r=t.transform(n.value,n);if(i.async)return(r instanceof Promise?r:Promise.resolve(r)).then(o=>(n.value=o,n));if(r instanceof Promise)throw new Yn;return n.value=r,n}});function Bx(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}var hh=w("$ZodOptional",(e,t)=>{le.init(e,t),e._zod.optin="optional",e._zod.optout="optional",pe(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),pe(e._zod,"pattern",()=>{let n=t.innerType._zod.pattern;return n?new RegExp(`^(${hu(n.source)})?$`):void 0}),e._zod.parse=(n,i)=>{if(t.innerType._zod.optin==="optional"){let r=t.innerType._zod.run(n,i);return r instanceof Promise?r.then(o=>Bx(o,n.value)):Bx(r,n.value)}return n.value===void 0?n:t.innerType._zod.run(n,i)}}),dS=w("$ZodExactOptional",(e,t)=>{hh.init(e,t),pe(e._zod,"values",()=>t.innerType._zod.values),pe(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,i)=>t.innerType._zod.run(n,i)}),fS=w("$ZodNullable",(e,t)=>{le.init(e,t),pe(e._zod,"optin",()=>t.innerType._zod.optin),pe(e._zod,"optout",()=>t.innerType._zod.optout),pe(e._zod,"pattern",()=>{let n=t.innerType._zod.pattern;return n?new RegExp(`^(${hu(n.source)}|null)$`):void 0}),pe(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,i)=>n.value===null?n:t.innerType._zod.run(n,i)}),pS=w("$ZodDefault",(e,t)=>{le.init(e,t),e._zod.optin="optional",pe(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,i)=>{if(i.direction==="backward")return t.innerType._zod.run(n,i);if(n.value===void 0)return n.value=t.defaultValue,n;let r=t.innerType._zod.run(n,i);return r instanceof Promise?r.then(o=>Ux(o,t)):Ux(r,t)}});function Ux(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var hS=w("$ZodPrefault",(e,t)=>{le.init(e,t),e._zod.optin="optional",pe(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,i)=>(i.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,i))}),mS=w("$ZodNonOptional",(e,t)=>{le.init(e,t),pe(e._zod,"values",()=>{let n=t.innerType._zod.values;return n?new Set([...n].filter(i=>i!==void 0)):void 0}),e._zod.parse=(n,i)=>{let r=t.innerType._zod.run(n,i);return r instanceof Promise?r.then(o=>jx(o,e)):jx(r,e)}});function jx(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}var gS=w("$ZodSuccess",(e,t)=>{le.init(e,t),e._zod.parse=(n,i)=>{if(i.direction==="backward")throw new ro("ZodSuccess");let r=t.innerType._zod.run(n,i);return r instanceof Promise?r.then(o=>(n.value=o.issues.length===0,n)):(n.value=r.issues.length===0,n)}}),bS=w("$ZodCatch",(e,t)=>{le.init(e,t),pe(e._zod,"optin",()=>t.innerType._zod.optin),pe(e._zod,"optout",()=>t.innerType._zod.optout),pe(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,i)=>{if(i.direction==="backward")return t.innerType._zod.run(n,i);let r=t.innerType._zod.run(n,i);return r instanceof Promise?r.then(o=>(n.value=o.value,o.issues.length&&(n.value=t.catchValue({...n,error:{issues:o.issues.map(s=>cn(s,i,Dt()))},input:n.value}),n.issues=[]),n)):(n.value=r.value,r.issues.length&&(n.value=t.catchValue({...n,error:{issues:r.issues.map(o=>cn(o,i,Dt()))},input:n.value}),n.issues=[]),n)}}),vS=w("$ZodNaN",(e,t)=>{le.init(e,t),e._zod.parse=(n,i)=>((typeof n.value!="number"||!Number.isNaN(n.value))&&n.issues.push({input:n.value,inst:e,expected:"nan",code:"invalid_type"}),n)}),yS=w("$ZodPipe",(e,t)=>{le.init(e,t),pe(e._zod,"values",()=>t.in._zod.values),pe(e._zod,"optin",()=>t.in._zod.optin),pe(e._zod,"optout",()=>t.out._zod.optout),pe(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,i)=>{if(i.direction==="backward"){let o=t.out._zod.run(n,i);return o instanceof Promise?o.then(s=>Ql(s,t.in,i)):Ql(o,t.in,i)}let r=t.in._zod.run(n,i);return r instanceof Promise?r.then(o=>Ql(o,t.out,i)):Ql(r,t.out,i)}});function Ql(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}var mh=w("$ZodCodec",(e,t)=>{le.init(e,t),pe(e._zod,"values",()=>t.in._zod.values),pe(e._zod,"optin",()=>t.in._zod.optin),pe(e._zod,"optout",()=>t.out._zod.optout),pe(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,i)=>{if((i.direction||"forward")==="forward"){let r=t.in._zod.run(n,i);return r instanceof Promise?r.then(o=>eu(o,t,i)):eu(r,t,i)}else{let r=t.out._zod.run(n,i);return r instanceof Promise?r.then(o=>eu(o,t,i)):eu(r,t,i)}}});function eu(e,t,n){if(e.issues.length)return e.aborted=!0,e;if((n.direction||"forward")==="forward"){let i=t.transform(e.value,e);return i instanceof Promise?i.then(r=>tu(e,r,t.out,n)):tu(e,i,t.out,n)}else{let i=t.reverseTransform(e.value,e);return i instanceof Promise?i.then(r=>tu(e,r,t.in,n)):tu(e,i,t.in,n)}}function tu(e,t,n,i){return e.issues.length?(e.aborted=!0,e):n._zod.run({value:t,issues:e.issues},i)}var kS=w("$ZodReadonly",(e,t)=>{le.init(e,t),pe(e._zod,"propValues",()=>t.innerType._zod.propValues),pe(e._zod,"values",()=>t.innerType._zod.values),pe(e._zod,"optin",()=>t.innerType?._zod?.optin),pe(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(n,i)=>{if(i.direction==="backward")return t.innerType._zod.run(n,i);let r=t.innerType._zod.run(n,i);return r instanceof Promise?r.then(Zx):Zx(r)}});function Zx(e){return e.value=Object.freeze(e.value),e}var xS=w("$ZodTemplateLiteral",(e,t)=>{le.init(e,t);let n=[];for(let i of t.parts)if(typeof i=="object"&&i!==null){if(!i._zod.pattern)throw Error(`Invalid template literal part, no pattern found: ${[...i._zod.traits].shift()}`);let r=i._zod.pattern instanceof RegExp?i._zod.pattern.source:i._zod.pattern;if(!r)throw Error(`Invalid template literal part: ${i._zod.traits}`);let o=r.startsWith("^")?1:0,s=r.endsWith("$")?r.length-1:r.length;n.push(r.slice(o,s))}else if(i===null||i_.has(typeof i))n.push(Qn(`${i}`));else throw Error(`Invalid template literal part: ${i}`);e._zod.pattern=new RegExp(`^${n.join("")}$`),e._zod.parse=(i,r)=>typeof i.value!="string"?(i.issues.push({input:i.value,inst:e,expected:"string",code:"invalid_type"}),i):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(i.value)||i.issues.push({input:i.value,inst:e,code:"invalid_format",format:t.format??"template_literal",pattern:e._zod.pattern.source}),i)}),_S=w("$ZodFunction",(e,t)=>(le.init(e,t),e._def=t,e._zod.def=t,e.implement=n=>{if(typeof n!="function")throw Error("implement() must be called with a function");return function(...i){let r=e._def.input?Bp(e._def.input,i):i,o=Reflect.apply(n,this,r);return e._def.output?Bp(e._def.output,o):o}},e.implementAsync=n=>{if(typeof n!="function")throw Error("implementAsync() must be called with a function");return async function(...i){let r=e._def.input?await Up(e._def.input,i):i,o=await Reflect.apply(n,this,r);return e._def.output?await Up(e._def.output,o):o}},e._zod.parse=(n,i)=>typeof n.value!="function"?(n.issues.push({code:"invalid_type",expected:"function",input:n.value,inst:e}),n):(e._def.output&&e._def.output._zod.def.type==="promise"?n.value=e.implementAsync(n.value):n.value=e.implement(n.value),n),e.input=(...n)=>{let i=e.constructor;return Array.isArray(n[0])?new i({type:"function",input:new ph({type:"tuple",items:n[0],rest:n[1]}),output:e._def.output}):new i({type:"function",input:n[0],output:e._def.output})},e.output=n=>new e.constructor({type:"function",input:e._def.input,output:n}),e)),wS=w("$ZodPromise",(e,t)=>{le.init(e,t),e._zod.parse=(n,i)=>Promise.resolve(n.value).then(r=>t.innerType._zod.run({value:r,issues:[]},i))}),SS=w("$ZodLazy",(e,t)=>{le.init(e,t),pe(e._zod,"innerType",()=>t.getter()),pe(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),pe(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),pe(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),pe(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(n,i)=>e._zod.innerType._zod.run(n,i)}),ES=w("$ZodCustom",(e,t)=>{Je.init(e,t),le.init(e,t),e._zod.parse=(n,i)=>n,e._zod.check=n=>{let i=n.value,r=t.fn(i);if(r instanceof Promise)return r.then(o=>Hx(o,n,i,e));Hx(r,n,i,e)}});function Hx(e,t,n,i){if(!e){let r={code:"custom",input:n,inst:i,path:[...i._zod.def.path??[]],continue:!i._zod.def.abort};i._zod.def.params&&(r.params=i._zod.def.params),t.issues.push(ou(r))}}var gh={};er(gh,{zhTW:()=>n8,zhCN:()=>e8,yo:()=>i8,vi:()=>YL,uz:()=>GL,ur:()=>KL,uk:()=>TS,ua:()=>WL,tr:()=>HL,th:()=>jL,ta:()=>BL,sv:()=>LL,sl:()=>RL,ru:()=>NL,pt:()=>zL,ps:()=>TL,pl:()=>AL,ota:()=>$L,no:()=>SL,nl:()=>_L,ms:()=>kL,mk:()=>vL,lt:()=>gL,ko:()=>hL,km:()=>CS,kh:()=>fL,ka:()=>cL,ja:()=>lL,it:()=>sL,is:()=>iL,id:()=>nL,hy:()=>eL,hu:()=>YP,he:()=>GP,frCA:()=>KP,fr:()=>WP,fi:()=>HP,fa:()=>jP,es:()=>BP,eo:()=>LP,en:()=>$S,de:()=>OP,da:()=>DP,cs:()=>MP,ca:()=>IP,bg:()=>CP,be:()=>EP,az:()=>wP,ar:()=>xP});var kP=()=>{let e={string:{unit:"\u062D\u0631\u0641",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},file:{unit:"\u0628\u0627\u064A\u062A",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},array:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},set:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"}};function t(r){return e[r]??null}let n={regex:"\u0645\u062F\u062E\u0644",email:"\u0628\u0631\u064A\u062F \u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A",url:"\u0631\u0627\u0628\u0637",emoji:"\u0625\u064A\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u064A\u062E \u0648\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",date:"\u062A\u0627\u0631\u064A\u062E \u0628\u0645\u0639\u064A\u0627\u0631 ISO",time:"\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",duration:"\u0645\u062F\u0629 \u0628\u0645\u0639\u064A\u0627\u0631 ISO",ipv4:"\u0639\u0646\u0648\u0627\u0646 IPv4",ipv6:"\u0639\u0646\u0648\u0627\u0646 IPv6",cidrv4:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv4",cidrv6:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv6",base64:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64-encoded",base64url:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64url-encoded",json_string:"\u0646\u064E\u0635 \u0639\u0644\u0649 \u0647\u064A\u0626\u0629 JSON",e164:"\u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0628\u0645\u0639\u064A\u0627\u0631 E.164",jwt:"JWT",template_literal:"\u0645\u062F\u062E\u0644"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=re(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 instanceof ${r.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${a}`:`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${o}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${a}`}case"invalid_value":return r.values.length===1?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${te(r.values[0])}`:`\u0627\u062E\u062A\u064A\u0627\u0631 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062A\u0648\u0642\u0639 \u0627\u0646\u062A\u0642\u0627\u0621 \u0623\u062D\u062F \u0647\u0630\u0647 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A: ${R(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=t(r.origin);return s?` \u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${r.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${o} ${r.maximum.toString()} ${s.unit??"\u0639\u0646\u0635\u0631"}`:`\u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${r.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${o} ${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=t(r.origin);return s?`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${r.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${o} ${r.minimum.toString()} ${s.unit}`:`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${r.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${o} ${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0628\u062F\u0623 \u0628\u0640 "${r.prefix}"`:o.format==="ends_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0646\u062A\u0647\u064A \u0628\u0640 "${o.suffix}"`:o.format==="includes"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u062A\u0636\u0645\u0651\u064E\u0646 "${o.includes}"`:o.format==="regex"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0637\u0627\u0628\u0642 \u0627\u0644\u0646\u0645\u0637 ${o.pattern}`:`${n[o.format]??r.format} \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644`}case"not_multiple_of":return`\u0631\u0642\u0645 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0643\u0648\u0646 \u0645\u0646 \u0645\u0636\u0627\u0639\u0641\u0627\u062A ${r.divisor}`;case"unrecognized_keys":return`\u0645\u0639\u0631\u0641${r.keys.length>1?"\u0627\u062A":""} \u063A\u0631\u064A\u0628${r.keys.length>1?"\u0629":""}: ${R(r.keys,"\u060C ")}`;case"invalid_key":return`\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${r.origin}`;case"invalid_union":return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644";case"invalid_element":return`\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${r.origin}`;default:return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"}}};function xP(){return{localeError:kP()}}var _P=()=>{let e={string:{unit:"simvol",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"element",verb:"olmal\u0131d\u0131r"},set:{unit:"element",verb:"olmal\u0131d\u0131r"}};function t(r){return e[r]??null}let n={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=re(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n instanceof ${r.expected}, daxil olan ${a}`:`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${o}, daxil olan ${a}`}case"invalid_value":return r.values.length===1?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${te(r.values[0])}`:`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${R(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=t(r.origin);return s?`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${r.origin??"d\u0259y\u0259r"} ${o}${r.maximum.toString()} ${s.unit??"element"}`:`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${r.origin??"d\u0259y\u0259r"} ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=t(r.origin);return s?`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${r.origin} ${o}${r.minimum.toString()} ${s.unit}`:`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${r.origin} ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Yanl\u0131\u015F m\u0259tn: "${o.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`:o.format==="ends_with"?`Yanl\u0131\u015F m\u0259tn: "${o.suffix}" il\u0259 bitm\u0259lidir`:o.format==="includes"?`Yanl\u0131\u015F m\u0259tn: "${o.includes}" daxil olmal\u0131d\u0131r`:o.format==="regex"?`Yanl\u0131\u015F m\u0259tn: ${o.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`:`Yanl\u0131\u015F ${n[o.format]??r.format}`}case"not_multiple_of":return`Yanl\u0131\u015F \u0259d\u0259d: ${r.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`;case"unrecognized_keys":return`Tan\u0131nmayan a\xE7ar${r.keys.length>1?"lar":""}: ${R(r.keys,", ")}`;case"invalid_key":return`${r.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`;case"invalid_union":return"Yanl\u0131\u015F d\u0259y\u0259r";case"invalid_element":return`${r.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`;default:return"Yanl\u0131\u015F d\u0259y\u0259r"}}};function wP(){return{localeError:_P()}}function qx(e,t,n,i){let r=Math.abs(e),o=r%10,s=r%100;return s>=11&&s<=19?i:o===1?t:o>=2&&o<=4?n:i}var SP=()=>{let e={string:{unit:{one:"\u0441\u0456\u043C\u0432\u0430\u043B",few:"\u0441\u0456\u043C\u0432\u0430\u043B\u044B",many:"\u0441\u0456\u043C\u0432\u0430\u043B\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u044B",many:"\u0431\u0430\u0439\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"}};function t(r){return e[r]??null}let n={regex:"\u0443\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0430\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0456 \u0447\u0430\u0441",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0447\u0430\u0441",duration:"ISO \u043F\u0440\u0430\u0446\u044F\u0433\u043B\u0430\u0441\u0446\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0430\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0430\u0441",cidrv4:"IPv4 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",base64:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64",base64url:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64url",json_string:"JSON \u0440\u0430\u0434\u043E\u043A",e164:"\u043D\u0443\u043C\u0430\u0440 E.164",jwt:"JWT",template_literal:"\u0443\u0432\u043E\u0434"},i={nan:"NaN",number:"\u043B\u0456\u043A",array:"\u043C\u0430\u0441\u0456\u045E"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=re(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F instanceof ${r.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${a}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${o}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${a}`}case"invalid_value":return r.values.length===1?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F ${te(r.values[0])}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0432\u0430\u0440\u044B\u044F\u043D\u0442: \u0447\u0430\u043A\u0430\u045E\u0441\u044F \u0430\u0434\u0437\u0456\u043D \u0437 ${R(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=t(r.origin);if(s){let a=Number(r.maximum),l=qx(a,s.unit.one,s.unit.few,s.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${s.verb} ${o}${r.maximum.toString()} ${l}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=t(r.origin);if(s){let a=Number(r.minimum),l=qx(a,s.unit.one,s.unit.few,s.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${r.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${s.verb} ${o}${r.minimum.toString()} ${l}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${r.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u043F\u0430\u0447\u044B\u043D\u0430\u0446\u0446\u0430 \u0437 "${o.prefix}"`:o.format==="ends_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u0430\u043A\u0430\u043D\u0447\u0432\u0430\u0446\u0446\u0430 \u043D\u0430 "${o.suffix}"`:o.format==="includes"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u043C\u044F\u0448\u0447\u0430\u0446\u044C "${o.includes}"`:o.format==="regex"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0430\u0434\u043F\u0430\u0432\u044F\u0434\u0430\u0446\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${o.pattern}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${n[o.format]??r.format}`}case"not_multiple_of":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043B\u0456\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0431\u044B\u0446\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${r.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${r.keys.length>1?"\u043A\u043B\u044E\u0447\u044B":"\u043A\u043B\u044E\u0447"}: ${R(r.keys,", ")}`;case"invalid_key":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${r.origin}`;case"invalid_union":return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434";case"invalid_element":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u0430\u0435 \u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435 \u045E ${r.origin}`;default:return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434"}}};function EP(){return{localeError:SP()}}var $P=()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},file:{unit:"\u0431\u0430\u0439\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"}};function t(r){return e[r]??null}let n={regex:"\u0432\u0445\u043E\u0434",email:"\u0438\u043C\u0435\u0439\u043B \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0436\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u043F\u0440\u043E\u0434\u044A\u043B\u0436\u0438\u0442\u0435\u043B\u043D\u043E\u0441\u0442",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"base64-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",base64url:"base64url-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",json_string:"JSON \u043D\u0438\u0437",e164:"E.164 \u043D\u043E\u043C\u0435\u0440",jwt:"JWT",template_literal:"\u0432\u0445\u043E\u0434"},i={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=re(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D instanceof ${r.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${a}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${o}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${a}`}case"invalid_value":return r.values.length===1?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${te(r.values[0])}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u043E\u043F\u0446\u0438\u044F: \u043E\u0447\u0430\u043A\u0432\u0430\u043D\u043E \u0435\u0434\u043D\u043E \u043E\u0442 ${R(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=t(r.origin);return s?`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${r.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${o}${r.maximum.toString()} ${s.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430"}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${r.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0431\u044A\u0434\u0435 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=t(r.origin);return s?`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${r.origin} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${o}${r.minimum.toString()} ${s.unit}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${r.origin} \u0434\u0430 \u0431\u044A\u0434\u0435 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;if(o.format==="starts_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u0432\u0430 \u0441 "${o.prefix}"`;if(o.format==="ends_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u0432\u044A\u0440\u0448\u0432\u0430 \u0441 "${o.suffix}"`;if(o.format==="includes")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0432\u043A\u043B\u044E\u0447\u0432\u0430 "${o.includes}"`;if(o.format==="regex")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0441\u044A\u0432\u043F\u0430\u0434\u0430 \u0441 ${o.pattern}`;let s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D";return o.format==="emoji"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),o.format==="datetime"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),o.format==="date"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),o.format==="time"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),o.format==="duration"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),`${s} ${n[o.format]??r.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E \u0447\u0438\u0441\u043B\u043E: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043A\u0440\u0430\u0442\u043D\u043E \u043D\u0430 ${r.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0437\u043F\u043E\u0437\u043D\u0430\u0442${r.keys.length>1?"\u0438":""} \u043A\u043B\u044E\u0447${r.keys.length>1?"\u043E\u0432\u0435":""}: ${R(r.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043A\u043B\u044E\u0447 \u0432 ${r.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434";case"invalid_element":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442 \u0432 ${r.origin}`;default:return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434"}}};function CP(){return{localeError:$P()}}var TP=()=>{let e={string:{unit:"car\xE0cters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function t(r){return e[r]??null}let n={regex:"entrada",email:"adre\xE7a electr\xF2nica",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adre\xE7a IPv4",ipv6:"adre\xE7a IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=re(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`Tipus inv\xE0lid: s'esperava instanceof ${r.expected}, s'ha rebut ${a}`:`Tipus inv\xE0lid: s'esperava ${o}, s'ha rebut ${a}`}case"invalid_value":return r.values.length===1?`Valor inv\xE0lid: s'esperava ${te(r.values[0])}`:`Opci\xF3 inv\xE0lida: s'esperava una de ${R(r.values," o ")}`;case"too_big":{let o=r.inclusive?"com a m\xE0xim":"menys de",s=t(r.origin);return s?`Massa gran: s'esperava que ${r.origin??"el valor"} contingu\xE9s ${o} ${r.maximum.toString()} ${s.unit??"elements"}`:`Massa gran: s'esperava que ${r.origin??"el valor"} fos ${o} ${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?"com a m\xEDnim":"m\xE9s de",s=t(r.origin);return s?`Massa petit: s'esperava que ${r.origin} contingu\xE9s ${o} ${r.minimum.toString()} ${s.unit}`:`Massa petit: s'esperava que ${r.origin} fos ${o} ${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Format inv\xE0lid: ha de comen\xE7ar amb "${o.prefix}"`:o.format==="ends_with"?`Format inv\xE0lid: ha d'acabar amb "${o.suffix}"`:o.format==="includes"?`Format inv\xE0lid: ha d'incloure "${o.includes}"`:o.format==="regex"?`Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${o.pattern}`:`Format inv\xE0lid per a ${n[o.format]??r.format}`}case"not_multiple_of":return`N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${r.divisor}`;case"unrecognized_keys":return`Clau${r.keys.length>1?"s":""} no reconeguda${r.keys.length>1?"s":""}: ${R(r.keys,", ")}`;case"invalid_key":return`Clau inv\xE0lida a ${r.origin}`;case"invalid_union":return"Entrada inv\xE0lida";case"invalid_element":return`Element inv\xE0lid a ${r.origin}`;default:return"Entrada inv\xE0lida"}}};function IP(){return{localeError:TP()}}var AP=()=>{let e={string:{unit:"znak\u016F",verb:"m\xEDt"},file:{unit:"bajt\u016F",verb:"m\xEDt"},array:{unit:"prvk\u016F",verb:"m\xEDt"},set:{unit:"prvk\u016F",verb:"m\xEDt"}};function t(r){return e[r]??null}let n={regex:"regul\xE1rn\xED v\xFDraz",email:"e-mailov\xE1 adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"datum a \u010Das ve form\xE1tu ISO",date:"datum ve form\xE1tu ISO",time:"\u010Das ve form\xE1tu ISO",duration:"doba trv\xE1n\xED ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64",base64url:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64url",json_string:"\u0159et\u011Bzec ve form\xE1tu JSON",e164:"\u010D\xEDslo E.164",jwt:"JWT",template_literal:"vstup"},i={nan:"NaN",number:"\u010D\xEDslo",string:"\u0159et\u011Bzec",function:"funkce",array:"pole"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=re(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no instanceof ${r.expected}, obdr\u017Eeno ${a}`:`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${o}, obdr\u017Eeno ${a}`}case"invalid_value":return r.values.length===1?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${te(r.values[0])}`:`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${R(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=t(r.origin);return s?`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${r.origin??"hodnota"} mus\xED m\xEDt ${o}${r.maximum.toString()} ${s.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${r.origin??"hodnota"} mus\xED b\xFDt ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=t(r.origin);return s?`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${r.origin??"hodnota"} mus\xED m\xEDt ${o}${r.minimum.toString()} ${s.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${r.origin??"hodnota"} mus\xED b\xFDt ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${o.prefix}"`:o.format==="ends_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${o.suffix}"`:o.format==="includes"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${o.includes}"`:o.format==="regex"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${o.pattern}`:`Neplatn\xFD form\xE1t ${n[o.format]??r.format}`}case"not_multiple_of":return`Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${r.divisor}`;case"unrecognized_keys":return`Nezn\xE1m\xE9 kl\xED\u010De: ${R(r.keys,", ")}`;case"invalid_key":return`Neplatn\xFD kl\xED\u010D v ${r.origin}`;case"invalid_union":return"Neplatn\xFD vstup";case"invalid_element":return`Neplatn\xE1 hodnota v ${r.origin}`;default:return"Neplatn\xFD vstup"}}};function MP(){return{localeError:AP()}}var zP=()=>{let e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}};function t(r){return e[r]??null}let n={regex:"input",email:"e-mailadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkesl\xE6t",date:"ISO-dato",time:"ISO-klokkesl\xE6t",duration:"ISO-varighed",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},i={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"s\xE6t",file:"fil"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=re(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`Ugyldigt input: forventede instanceof ${r.expected}, fik ${a}`:`Ugyldigt input: forventede ${o}, fik ${a}`}case"invalid_value":return r.values.length===1?`Ugyldig v\xE6rdi: forventede ${te(r.values[0])}`:`Ugyldigt valg: forventede en af f\xF8lgende ${R(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=t(r.origin),a=i[r.origin]??r.origin;return s?`For stor: forventede ${a??"value"} ${s.verb} ${o} ${r.maximum.toString()} ${s.unit??"elementer"}`:`For stor: forventede ${a??"value"} havde ${o} ${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=t(r.origin),a=i[r.origin]??r.origin;return s?`For lille: forventede ${a} ${s.verb} ${o} ${r.minimum.toString()} ${s.unit}`:`For lille: forventede ${a} havde ${o} ${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Ugyldig streng: skal starte med "${o.prefix}"`:o.format==="ends_with"?`Ugyldig streng: skal ende med "${o.suffix}"`:o.format==="includes"?`Ugyldig streng: skal indeholde "${o.includes}"`:o.format==="regex"?`Ugyldig streng: skal matche m\xF8nsteret ${o.pattern}`:`Ugyldig ${n[o.format]??r.format}`}case"not_multiple_of":return`Ugyldigt tal: skal v\xE6re deleligt med ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"Ukendte n\xF8gler":"Ukendt n\xF8gle"}: ${R(r.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8gle i ${r.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig v\xE6rdi i ${r.origin}`;default:return"Ugyldigt input"}}};function DP(){return{localeError:zP()}}var NP=()=>{let e={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function t(r){return e[r]??null}let n={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"},i={nan:"NaN",number:"Zahl",array:"Array"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=re(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`Ung\xFCltige Eingabe: erwartet instanceof ${r.expected}, erhalten ${a}`:`Ung\xFCltige Eingabe: erwartet ${o}, erhalten ${a}`}case"invalid_value":return r.values.length===1?`Ung\xFCltige Eingabe: erwartet ${te(r.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${R(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=t(r.origin);return s?`Zu gro\xDF: erwartet, dass ${r.origin??"Wert"} ${o}${r.maximum.toString()} ${s.unit??"Elemente"} hat`:`Zu gro\xDF: erwartet, dass ${r.origin??"Wert"} ${o}${r.maximum.toString()} ist`}case"too_small":{let o=r.inclusive?">=":">",s=t(r.origin);return s?`Zu klein: erwartet, dass ${r.origin} ${o}${r.minimum.toString()} ${s.unit} hat`:`Zu klein: erwartet, dass ${r.origin} ${o}${r.minimum.toString()} ist`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Ung\xFCltiger String: muss mit "${o.prefix}" beginnen`:o.format==="ends_with"?`Ung\xFCltiger String: muss mit "${o.suffix}" enden`:o.format==="includes"?`Ung\xFCltiger String: muss "${o.includes}" enthalten`:o.format==="regex"?`Ung\xFCltiger String: muss dem Muster ${o.pattern} entsprechen`:`Ung\xFCltig: ${n[o.format]??r.format}`}case"not_multiple_of":return`Ung\xFCltige Zahl: muss ein Vielfaches von ${r.divisor} sein`;case"unrecognized_keys":return`${r.keys.length>1?"Unbekannte Schl\xFCssel":"Unbekannter Schl\xFCssel"}: ${R(r.keys,", ")}`;case"invalid_key":return`Ung\xFCltiger Schl\xFCssel in ${r.origin}`;case"invalid_union":return"Ung\xFCltige Eingabe";case"invalid_element":return`Ung\xFCltiger Wert in ${r.origin}`;default:return"Ung\xFCltige Eingabe"}}};function OP(){return{localeError:NP()}}var RP=()=>{let e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function t(r){return e[r]??null}let n={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=re(r.input),a=i[s]??s;return`Invalid input: expected ${o}, received ${a}`}case"invalid_value":return r.values.length===1?`Invalid input: expected ${te(r.values[0])}`:`Invalid option: expected one of ${R(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=t(r.origin);return s?`Too big: expected ${r.origin??"value"} to have ${o}${r.maximum.toString()} ${s.unit??"elements"}`:`Too big: expected ${r.origin??"value"} to be ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=t(r.origin);return s?`Too small: expected ${r.origin} to have ${o}${r.minimum.toString()} ${s.unit}`:`Too small: expected ${r.origin} to be ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Invalid string: must start with "${o.prefix}"`:o.format==="ends_with"?`Invalid string: must end with "${o.suffix}"`:o.format==="includes"?`Invalid string: must include "${o.includes}"`:o.format==="regex"?`Invalid string: must match pattern ${o.pattern}`:`Invalid ${n[o.format]??r.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${r.divisor}`;case"unrecognized_keys":return`Unrecognized key${r.keys.length>1?"s":""}: ${R(r.keys,", ")}`;case"invalid_key":return`Invalid key in ${r.origin}`;case"invalid_union":return"Invalid input";case"invalid_element":return`Invalid value in ${r.origin}`;default:return"Invalid input"}}};function $S(){return{localeError:RP()}}var PP=()=>{let e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function t(r){return e[r]??null}let n={regex:"enigo",email:"retadreso",url:"URL",emoji:"emo\u011Dio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-da\u016Dro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",jwt:"JWT",template_literal:"enigo"},i={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=re(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`Nevalida enigo: atendi\u011Dis instanceof ${r.expected}, ricevi\u011Dis ${a}`:`Nevalida enigo: atendi\u011Dis ${o}, ricevi\u011Dis ${a}`}case"invalid_value":return r.values.length===1?`Nevalida enigo: atendi\u011Dis ${te(r.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${R(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=t(r.origin);return s?`Tro granda: atendi\u011Dis ke ${r.origin??"valoro"} havu ${o}${r.maximum.toString()} ${s.unit??"elementojn"}`:`Tro granda: atendi\u011Dis ke ${r.origin??"valoro"} havu ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=t(r.origin);return s?`Tro malgranda: atendi\u011Dis ke ${r.origin} havu ${o}${r.minimum.toString()} ${s.unit}`:`Tro malgranda: atendi\u011Dis ke ${r.origin} estu ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Nevalida karaktraro: devas komenci\u011Di per "${o.prefix}"`:o.format==="ends_with"?`Nevalida karaktraro: devas fini\u011Di per "${o.suffix}"`:o.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${o.includes}"`:o.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${o.pattern}`:`Nevalida ${n[o.format]??r.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${r.divisor}`;case"unrecognized_keys":return`Nekonata${r.keys.length>1?"j":""} \u015Dlosilo${r.keys.length>1?"j":""}: ${R(r.keys,", ")}`;case"invalid_key":return`Nevalida \u015Dlosilo en ${r.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${r.origin}`;default:return"Nevalida enigo"}}};function LP(){return{localeError:PP()}}var FP=()=>{let e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function t(r){return e[r]??null}let n={regex:"entrada",email:"direcci\xF3n de correo electr\xF3nico",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duraci\xF3n ISO",ipv4:"direcci\xF3n IPv4",ipv6:"direcci\xF3n IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},i={nan:"NaN",string:"texto",number:"n\xFAmero",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"n\xFAmero grande",symbol:"s\xEDmbolo",undefined:"indefinido",null:"nulo",function:"funci\xF3n",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeraci\xF3n",union:"uni\xF3n",literal:"literal",promise:"promesa",void:"vac\xEDo",never:"nunca",unknown:"desconocido",any:"cualquiera"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=re(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`Entrada inv\xE1lida: se esperaba instanceof ${r.expected}, recibido ${a}`:`Entrada inv\xE1lida: se esperaba ${o}, recibido ${a}`}case"invalid_value":return r.values.length===1?`Entrada inv\xE1lida: se esperaba ${te(r.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${R(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=t(r.origin),a=i[r.origin]??r.origin;return s?`Demasiado grande: se esperaba que ${a??"valor"} tuviera ${o}${r.maximum.toString()} ${s.unit??"elementos"}`:`Demasiado grande: se esperaba que ${a??"valor"} fuera ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=t(r.origin),a=i[r.origin]??r.origin;return s?`Demasiado peque\xF1o: se esperaba que ${a} tuviera ${o}${r.minimum.toString()} ${s.unit}`:`Demasiado peque\xF1o: se esperaba que ${a} fuera ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Cadena inv\xE1lida: debe comenzar con "${o.prefix}"`:o.format==="ends_with"?`Cadena inv\xE1lida: debe terminar en "${o.suffix}"`:o.format==="includes"?`Cadena inv\xE1lida: debe incluir "${o.includes}"`:o.format==="regex"?`Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${o.pattern}`:`Inv\xE1lido ${n[o.format]??r.format}`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${r.divisor}`;case"unrecognized_keys":return`Llave${r.keys.length>1?"s":""} desconocida${r.keys.length>1?"s":""}: ${R(r.keys,", ")}`;case"invalid_key":return`Llave inv\xE1lida en ${i[r.origin]??r.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido en ${i[r.origin]??r.origin}`;default:return"Entrada inv\xE1lida"}}};function BP(){return{localeError:FP()}}var UP=()=>{let e={string:{unit:"\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},file:{unit:"\u0628\u0627\u06CC\u062A",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},array:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},set:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"}};function t(r){return e[r]??null}let n={regex:"\u0648\u0631\u0648\u062F\u06CC",email:"\u0622\u062F\u0631\u0633 \u0627\u06CC\u0645\u06CC\u0644",url:"URL",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u06CC\u062E \u0648 \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",date:"\u062A\u0627\u0631\u06CC\u062E \u0627\u06CC\u0632\u0648",time:"\u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",duration:"\u0645\u062F\u062A \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",ipv4:"IPv4 \u0622\u062F\u0631\u0633",ipv6:"IPv6 \u0622\u062F\u0631\u0633",cidrv4:"IPv4 \u062F\u0627\u0645\u0646\u0647",cidrv6:"IPv6 \u062F\u0627\u0645\u0646\u0647",base64:"base64-encoded \u0631\u0634\u062A\u0647",base64url:"base64url-encoded \u0631\u0634\u062A\u0647",json_string:"JSON \u0631\u0634\u062A\u0647",e164:"E.164 \u0639\u062F\u062F",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u06CC"},i={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0622\u0631\u0627\u06CC\u0647"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=re(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A instanceof ${r.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${a} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`:`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${o} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${a} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`}case"invalid_value":return r.values.length===1?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${te(r.values[0])} \u0645\u06CC\u200C\u0628\u0648\u062F`:`\u06AF\u0632\u06CC\u0646\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A \u06CC\u06A9\u06CC \u0627\u0632 ${R(r.values,"|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;case"too_big":{let o=r.inclusive?"<=":"<",s=t(r.origin);return s?`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${r.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${o}${r.maximum.toString()} ${s.unit??"\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${r.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${o}${r.maximum.toString()} \u0628\u0627\u0634\u062F`}case"too_small":{let o=r.inclusive?">=":">",s=t(r.origin);return s?`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${r.origin} \u0628\u0627\u06CC\u062F ${o}${r.minimum.toString()} ${s.unit} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${r.origin} \u0628\u0627\u06CC\u062F ${o}${r.minimum.toString()} \u0628\u0627\u0634\u062F`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${o.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`:o.format==="ends_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${o.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`:o.format==="includes"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${o.includes}" \u0628\u0627\u0634\u062F`:o.format==="regex"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${o.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`:`${n[o.format]??r.format} \u0646\u0627\u0645\u0639\u062A\u0628\u0631`}case"not_multiple_of":return`\u0639\u062F\u062F \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0645\u0636\u0631\u0628 ${r.divisor} \u0628\u0627\u0634\u062F`;case"unrecognized_keys":return`\u06A9\u0644\u06CC\u062F${r.keys.length>1?"\u0647\u0627\u06CC":""} \u0646\u0627\u0634\u0646\u0627\u0633: ${R(r.keys,", ")}`;case"invalid_key":return`\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${r.origin}`;case"invalid_union":return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631";case"invalid_element":return`\u0645\u0642\u062F\u0627\u0631 \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u062F\u0631 ${r.origin}`;default:return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631"}}};function jP(){return{localeError:UP()}}var ZP=()=>{let e={string:{unit:"merkki\xE4",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"p\xE4iv\xE4m\xE4\xE4r\xE4n"}};function t(r){return e[r]??null}let n={regex:"s\xE4\xE4nn\xF6llinen lauseke",email:"s\xE4hk\xF6postiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-p\xE4iv\xE4m\xE4\xE4r\xE4",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=re(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`Virheellinen tyyppi: odotettiin instanceof ${r.expected}, oli ${a}`:`Virheellinen tyyppi: odotettiin ${o}, oli ${a}`}case"invalid_value":return r.values.length===1?`Virheellinen sy\xF6te: t\xE4ytyy olla ${te(r.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${R(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=t(r.origin);return s?`Liian suuri: ${s.subject} t\xE4ytyy olla ${o}${r.maximum.toString()} ${s.unit}`.trim():`Liian suuri: arvon t\xE4ytyy olla ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=t(r.origin);return s?`Liian pieni: ${s.subject} t\xE4ytyy olla ${o}${r.minimum.toString()} ${s.unit}`.trim():`Liian pieni: arvon t\xE4ytyy olla ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Virheellinen sy\xF6te: t\xE4ytyy alkaa "${o.prefix}"`:o.format==="ends_with"?`Virheellinen sy\xF6te: t\xE4ytyy loppua "${o.suffix}"`:o.format==="includes"?`Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${o.includes}"`:o.format==="regex"?`Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${o.pattern}`:`Virheellinen ${n[o.format]??r.format}`}case"not_multiple_of":return`Virheellinen luku: t\xE4ytyy olla luvun ${r.divisor} monikerta`;case"unrecognized_keys":return`${r.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${R(r.keys,", ")}`;case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen sy\xF6te"}}};function HP(){return{localeError:ZP()}}var qP=()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(r){return e[r]??null}let n={regex:"entr\xE9e",email:"adresse e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},i={nan:"NaN",number:"nombre",array:"tableau"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=re(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`Entr\xE9e invalide : instanceof ${r.expected} attendu, ${a} re\xE7u`:`Entr\xE9e invalide : ${o} attendu, ${a} re\xE7u`}case"invalid_value":return r.values.length===1?`Entr\xE9e invalide : ${te(r.values[0])} attendu`:`Option invalide : une valeur parmi ${R(r.values,"|")} attendue`;case"too_big":{let o=r.inclusive?"<=":"<",s=t(r.origin);return s?`Trop grand : ${r.origin??"valeur"} doit ${s.verb} ${o}${r.maximum.toString()} ${s.unit??"\xE9l\xE9ment(s)"}`:`Trop grand : ${r.origin??"valeur"} doit \xEAtre ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=t(r.origin);return s?`Trop petit : ${r.origin} doit ${s.verb} ${o}${r.minimum.toString()} ${s.unit}`:`Trop petit : ${r.origin} doit \xEAtre ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${o.prefix}"`:o.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${o.suffix}"`:o.format==="includes"?`Cha\xEEne invalide : doit inclure "${o.includes}"`:o.format==="regex"?`Cha\xEEne invalide : doit correspondre au mod\xE8le ${o.pattern}`:`${n[o.format]??r.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${r.divisor}`;case"unrecognized_keys":return`Cl\xE9${r.keys.length>1?"s":""} non reconnue${r.keys.length>1?"s":""} : ${R(r.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${r.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${r.origin}`;default:return"Entr\xE9e invalide"}}};function WP(){return{localeError:qP()}}var VP=()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(r){return e[r]??null}let n={regex:"entr\xE9e",email:"adresse courriel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=re(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`Entr\xE9e invalide : attendu instanceof ${r.expected}, re\xE7u ${a}`:`Entr\xE9e invalide : attendu ${o}, re\xE7u ${a}`}case"invalid_value":return r.values.length===1?`Entr\xE9e invalide : attendu ${te(r.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${R(r.values,"|")}`;case"too_big":{let o=r.inclusive?"\u2264":"<",s=t(r.origin);return s?`Trop grand : attendu que ${r.origin??"la valeur"} ait ${o}${r.maximum.toString()} ${s.unit}`:`Trop grand : attendu que ${r.origin??"la valeur"} soit ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?"\u2265":">",s=t(r.origin);return s?`Trop petit : attendu que ${r.origin} ait ${o}${r.minimum.toString()} ${s.unit}`:`Trop petit : attendu que ${r.origin} soit ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${o.prefix}"`:o.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${o.suffix}"`:o.format==="includes"?`Cha\xEEne invalide : doit inclure "${o.includes}"`:o.format==="regex"?`Cha\xEEne invalide : doit correspondre au motif ${o.pattern}`:`${n[o.format]??r.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${r.divisor}`;case"unrecognized_keys":return`Cl\xE9${r.keys.length>1?"s":""} non reconnue${r.keys.length>1?"s":""} : ${R(r.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${r.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${r.origin}`;default:return"Entr\xE9e invalide"}}};function KP(){return{localeError:VP()}}var JP=()=>{let e={string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA",gender:"f"},number:{label:"\u05DE\u05E1\u05E4\u05E8",gender:"m"},boolean:{label:"\u05E2\u05E8\u05DA \u05D1\u05D5\u05DC\u05D9\u05D0\u05E0\u05D9",gender:"m"},bigint:{label:"BigInt",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA",gender:"m"},array:{label:"\u05DE\u05E2\u05E8\u05DA",gender:"m"},object:{label:"\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8",gender:"m"},null:{label:"\u05E2\u05E8\u05DA \u05E8\u05D9\u05E7 (null)",gender:"m"},undefined:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05DE\u05D5\u05D2\u05D3\u05E8 (undefined)",gender:"m"},symbol:{label:"\u05E1\u05D9\u05DE\u05D1\u05D5\u05DC (Symbol)",gender:"m"},function:{label:"\u05E4\u05D5\u05E0\u05E7\u05E6\u05D9\u05D4",gender:"f"},map:{label:"\u05DE\u05E4\u05D4 (Map)",gender:"f"},set:{label:"\u05E7\u05D1\u05D5\u05E6\u05D4 (Set)",gender:"f"},file:{label:"\u05E7\u05D5\u05D1\u05E5",gender:"m"},promise:{label:"Promise",gender:"m"},NaN:{label:"NaN",gender:"m"},unknown:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05D9\u05D3\u05D5\u05E2",gender:"m"},value:{label:"\u05E2\u05E8\u05DA",gender:"m"}},t={string:{unit:"\u05EA\u05D5\u05D5\u05D9\u05DD",shortLabel:"\u05E7\u05E6\u05E8",longLabel:"\u05D0\u05E8\u05D5\u05DA"},file:{unit:"\u05D1\u05D9\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},array:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},set:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},number:{unit:"",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"}},n=u=>u?e[u]:void 0,i=u=>{let c=n(u);return c?c.label:u??e.unknown.label},r=u=>`\u05D4${i(u)}`,o=u=>(n(u)?.gender??"m")==="f"?"\u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05D9\u05D5\u05EA":"\u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA",s=u=>u?t[u]??null:null,a={regex:{label:"\u05E7\u05DC\u05D8",gender:"m"},email:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC",gender:"f"},url:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05E8\u05E9\u05EA",gender:"f"},emoji:{label:"\u05D0\u05D9\u05DE\u05D5\u05D2'\u05D9",gender:"m"},uuid:{label:"UUID",gender:"m"},nanoid:{label:"nanoid",gender:"m"},guid:{label:"GUID",gender:"m"},cuid:{label:"cuid",gender:"m"},cuid2:{label:"cuid2",gender:"m"},ulid:{label:"ULID",gender:"m"},xid:{label:"XID",gender:"m"},ksuid:{label:"KSUID",gender:"m"},datetime:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA \u05D5\u05D6\u05DE\u05DF ISO",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA ISO",gender:"m"},time:{label:"\u05D6\u05DE\u05DF ISO",gender:"m"},duration:{label:"\u05DE\u05E9\u05DA \u05D6\u05DE\u05DF ISO",gender:"m"},ipv4:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv4",gender:"f"},ipv6:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv6",gender:"f"},cidrv4:{label:"\u05D8\u05D5\u05D5\u05D7 IPv4",gender:"m"},cidrv6:{label:"\u05D8\u05D5\u05D5\u05D7 IPv6",gender:"m"},base64:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64",gender:"f"},base64url:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64 \u05DC\u05DB\u05EA\u05D5\u05D1\u05D5\u05EA \u05E8\u05E9\u05EA",gender:"f"},json_string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA JSON",gender:"f"},e164:{label:"\u05DE\u05E1\u05E4\u05E8 E.164",gender:"m"},jwt:{label:"JWT",gender:"m"},ends_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},includes:{label:"\u05E7\u05DC\u05D8",gender:"m"},lowercase:{label:"\u05E7\u05DC\u05D8",gender:"m"},starts_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},uppercase:{label:"\u05E7\u05DC\u05D8",gender:"m"}},l={nan:"NaN"};return u=>{switch(u.code){case"invalid_type":{let c=u.expected,d=l[c??""]??i(c),f=re(u.input),p=l[f]??e[f]?.label??f;return/^[A-Z]/.test(u.expected)?`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA instanceof ${u.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${p}`:`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${d}, \u05D4\u05EA\u05E7\u05D1\u05DC ${p}`}case"invalid_value":{if(u.values.length===1)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05E2\u05E8\u05DA \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA ${te(u.values[0])}`;let c=u.values.map(f=>te(f));if(u.values.length===2)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${c[0]} \u05D0\u05D5 ${c[1]}`;let d=c[c.length-1];return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${c.slice(0,-1).join(", ")} \u05D0\u05D5 ${d}`}case"too_big":{let c=s(u.origin),d=r(u.origin??"value");if(u.origin==="string")return`${c?.longLabel??"\u05D0\u05E8\u05D5\u05DA"} \u05DE\u05D3\u05D9: ${d} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${u.maximum.toString()} ${c?.unit??""} ${u.inclusive?"\u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA":"\u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8"}`.trim();if(u.origin==="number"){let h=u.inclusive?`\u05E7\u05D8\u05DF \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${u.maximum}`:`\u05E7\u05D8\u05DF \u05DE-${u.maximum}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${d} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${h}`}if(u.origin==="array"||u.origin==="set"){let h=u.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA",m=u.inclusive?`${u.maximum} ${c?.unit??""} \u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA`:`\u05E4\u05D7\u05D5\u05EA \u05DE-${u.maximum} ${c?.unit??""}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${d} ${h} \u05DC\u05D4\u05DB\u05D9\u05DC ${m}`.trim()}let f=u.inclusive?"<=":"<",p=o(u.origin??"value");return c?.unit?`${c.longLabel} \u05DE\u05D3\u05D9: ${d} ${p} ${f}${u.maximum.toString()} ${c.unit}`:`${c?.longLabel??"\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${d} ${p} ${f}${u.maximum.toString()}`}case"too_small":{let c=s(u.origin),d=r(u.origin??"value");if(u.origin==="string")return`${c?.shortLabel??"\u05E7\u05E6\u05E8"} \u05DE\u05D3\u05D9: ${d} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${u.minimum.toString()} ${c?.unit??""} ${u.inclusive?"\u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8":"\u05DC\u05E4\u05D7\u05D5\u05EA"}`.trim();if(u.origin==="number"){let h=u.inclusive?`\u05D2\u05D3\u05D5\u05DC \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${u.minimum}`:`\u05D2\u05D3\u05D5\u05DC \u05DE-${u.minimum}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${d} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${h}`}if(u.origin==="array"||u.origin==="set"){let h=u.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA";if(u.minimum===1&&u.inclusive){let g=(u.origin==="set","\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3");return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${d} ${h} \u05DC\u05D4\u05DB\u05D9\u05DC ${g}`}let m=u.inclusive?`${u.minimum} ${c?.unit??""} \u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8`:`\u05D9\u05D5\u05EA\u05E8 \u05DE-${u.minimum} ${c?.unit??""}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${d} ${h} \u05DC\u05D4\u05DB\u05D9\u05DC ${m}`.trim()}let f=u.inclusive?">=":">",p=o(u.origin??"value");return c?.unit?`${c.shortLabel} \u05DE\u05D3\u05D9: ${d} ${p} ${f}${u.minimum.toString()} ${c.unit}`:`${c?.shortLabel??"\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${d} ${p} ${f}${u.minimum.toString()}`}case"invalid_format":{let c=u;if(c.format==="starts_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1 "${c.prefix}"`;if(c.format==="ends_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${c.suffix}"`;if(c.format==="includes")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${c.includes}"`;if(c.format==="regex")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D0\u05D9\u05DD \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA ${c.pattern}`;let d=a[c.format],f=d?.label??c.format,p=(d?.gender??"m")==="f"?"\u05EA\u05E7\u05D9\u05E0\u05D4":"\u05EA\u05E7\u05D9\u05DF";return`${f} \u05DC\u05D0 ${p}`}case"not_multiple_of":return`\u05DE\u05E1\u05E4\u05E8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA \u05DE\u05DB\u05E4\u05DC\u05D4 \u05E9\u05DC ${u.divisor}`;case"unrecognized_keys":return`\u05DE\u05E4\u05EA\u05D7${u.keys.length>1?"\u05D5\u05EA":""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${u.keys.length>1?"\u05D9\u05DD":"\u05D4"}: ${R(u.keys,", ")}`;case"invalid_key":return"\u05E9\u05D3\u05D4 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8";case"invalid_union":return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF";case"invalid_element":return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${r(u.origin??"array")}`;default:return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"}}};function GP(){return{localeError:JP()}}var XP=()=>{let e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function t(r){return e[r]??null}let n={regex:"bemenet",email:"email c\xEDm",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO id\u0151b\xE9lyeg",date:"ISO d\xE1tum",time:"ISO id\u0151",duration:"ISO id\u0151intervallum",ipv4:"IPv4 c\xEDm",ipv6:"IPv6 c\xEDm",cidrv4:"IPv4 tartom\xE1ny",cidrv6:"IPv6 tartom\xE1ny",base64:"base64-k\xF3dolt string",base64url:"base64url-k\xF3dolt string",json_string:"JSON string",e164:"E.164 sz\xE1m",jwt:"JWT",template_literal:"bemenet"},i={nan:"NaN",number:"sz\xE1m",array:"t\xF6mb"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=re(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${r.expected}, a kapott \xE9rt\xE9k ${a}`:`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${o}, a kapott \xE9rt\xE9k ${a}`}case"invalid_value":return r.values.length===1?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${te(r.values[0])}`:`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${R(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=t(r.origin);return s?`T\xFAl nagy: ${r.origin??"\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${o}${r.maximum.toString()} ${s.unit??"elem"}`:`T\xFAl nagy: a bemeneti \xE9rt\xE9k ${r.origin??"\xE9rt\xE9k"} t\xFAl nagy: ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=t(r.origin);return s?`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${r.origin} m\xE9rete t\xFAl kicsi ${o}${r.minimum.toString()} ${s.unit}`:`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${r.origin} t\xFAl kicsi ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\xC9rv\xE9nytelen string: "${o.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`:o.format==="ends_with"?`\xC9rv\xE9nytelen string: "${o.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`:o.format==="includes"?`\xC9rv\xE9nytelen string: "${o.includes}" \xE9rt\xE9ket kell tartalmaznia`:o.format==="regex"?`\xC9rv\xE9nytelen string: ${o.pattern} mint\xE1nak kell megfelelnie`:`\xC9rv\xE9nytelen ${n[o.format]??r.format}`}case"not_multiple_of":return`\xC9rv\xE9nytelen sz\xE1m: ${r.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${r.keys.length>1?"s":""}: ${R(r.keys,", ")}`;case"invalid_key":return`\xC9rv\xE9nytelen kulcs ${r.origin}`;case"invalid_union":return"\xC9rv\xE9nytelen bemenet";case"invalid_element":return`\xC9rv\xE9nytelen \xE9rt\xE9k: ${r.origin}`;default:return"\xC9rv\xE9nytelen bemenet"}}};function YP(){return{localeError:XP()}}function Wx(e,t,n){return Math.abs(e)===1?t:n}function no(e){if(!e)return"";let t=["\u0561","\u0565","\u0568","\u056B","\u0578","\u0578\u0582","\u0585"],n=e[e.length-1];return e+(t.includes(n)?"\u0576":"\u0568")}var QP=()=>{let e={string:{unit:{one:"\u0576\u0577\u0561\u0576",many:"\u0576\u0577\u0561\u0576\u0576\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},file:{unit:{one:"\u0562\u0561\u0575\u0569",many:"\u0562\u0561\u0575\u0569\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},array:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},set:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"}};function t(r){return e[r]??null}let n={regex:"\u0574\u0578\u0582\u057F\u0584",email:"\u0567\u056C. \u0570\u0561\u057D\u0581\u0565",url:"URL",emoji:"\u0567\u0574\u0578\u057B\u056B",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E \u0587 \u056A\u0561\u0574",date:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E",time:"ISO \u056A\u0561\u0574",duration:"ISO \u057F\u0587\u0578\u0572\u0578\u0582\u0569\u0575\u0578\u0582\u0576",ipv4:"IPv4 \u0570\u0561\u057D\u0581\u0565",ipv6:"IPv6 \u0570\u0561\u057D\u0581\u0565",cidrv4:"IPv4 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",cidrv6:"IPv6 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",base64:"base64 \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",base64url:"base64url \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",json_string:"JSON \u057F\u0578\u0572",e164:"E.164 \u0570\u0561\u0574\u0561\u0580",jwt:"JWT",template_literal:"\u0574\u0578\u0582\u057F\u0584"},i={nan:"NaN",number:"\u0569\u056B\u057E",array:"\u0566\u0561\u0576\u0563\u057E\u0561\u056E"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=re(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 instanceof ${r.expected}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${a}`:`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${o}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${a}`}case"invalid_value":return r.values.length===1?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${te(r.values[1])}`:`\u054D\u056D\u0561\u056C \u057F\u0561\u0580\u0562\u0565\u0580\u0561\u056F\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 \u0570\u0565\u057F\u0587\u0575\u0561\u056C\u0576\u0565\u0580\u056B\u0581 \u0574\u0565\u056F\u0568\u055D ${R(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=t(r.origin);if(s){let a=Number(r.maximum),l=Wx(a,s.unit.one,s.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${no(r.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${o}${r.maximum.toString()} ${l}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${no(r.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056C\u056B\u0576\u056B ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=t(r.origin);if(s){let a=Number(r.minimum),l=Wx(a,s.unit.one,s.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${no(r.origin)} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${o}${r.minimum.toString()} ${l}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${no(r.origin)} \u056C\u056B\u0576\u056B ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057D\u056F\u057D\u057E\u056B "${o.prefix}"-\u0578\u057E`:o.format==="ends_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0561\u057E\u0561\u0580\u057F\u057E\u056B "${o.suffix}"-\u0578\u057E`:o.format==="includes"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057A\u0561\u0580\u0578\u0582\u0576\u0561\u056F\u056B "${o.includes}"`:o.format==="regex"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0570\u0561\u0574\u0561\u057A\u0561\u057F\u0561\u057D\u056D\u0561\u0576\u056B ${o.pattern} \u0571\u0587\u0561\u0579\u0561\u0583\u056B\u0576`:`\u054D\u056D\u0561\u056C ${n[o.format]??r.format}`}case"not_multiple_of":return`\u054D\u056D\u0561\u056C \u0569\u056B\u057E\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0562\u0561\u0566\u0574\u0561\u057A\u0561\u057F\u056B\u056F \u056C\u056B\u0576\u056B ${r.divisor}-\u056B`;case"unrecognized_keys":return`\u0549\u0573\u0561\u0576\u0561\u0579\u057E\u0561\u056E \u0562\u0561\u0576\u0561\u056C\u056B${r.keys.length>1?"\u0576\u0565\u0580":""}. ${R(r.keys,", ")}`;case"invalid_key":return`\u054D\u056D\u0561\u056C \u0562\u0561\u0576\u0561\u056C\u056B ${no(r.origin)}-\u0578\u0582\u0574`;case"invalid_union":return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574";case"invalid_element":return`\u054D\u056D\u0561\u056C \u0561\u0580\u056A\u0565\u0584 ${no(r.origin)}-\u0578\u0582\u0574`;default:return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574"}}};function eL(){return{localeError:QP()}}var tL=()=>{let e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function t(r){return e[r]??null}let n={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=re(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`Input tidak valid: diharapkan instanceof ${r.expected}, diterima ${a}`:`Input tidak valid: diharapkan ${o}, diterima ${a}`}case"invalid_value":return r.values.length===1?`Input tidak valid: diharapkan ${te(r.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${R(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=t(r.origin);return s?`Terlalu besar: diharapkan ${r.origin??"value"} memiliki ${o}${r.maximum.toString()} ${s.unit??"elemen"}`:`Terlalu besar: diharapkan ${r.origin??"value"} menjadi ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=t(r.origin);return s?`Terlalu kecil: diharapkan ${r.origin} memiliki ${o}${r.minimum.toString()} ${s.unit}`:`Terlalu kecil: diharapkan ${r.origin} menjadi ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`String tidak valid: harus dimulai dengan "${o.prefix}"`:o.format==="ends_with"?`String tidak valid: harus berakhir dengan "${o.suffix}"`:o.format==="includes"?`String tidak valid: harus menyertakan "${o.includes}"`:o.format==="regex"?`String tidak valid: harus sesuai pola ${o.pattern}`:`${n[o.format]??r.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${r.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${r.keys.length>1?"s":""}: ${R(r.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${r.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${r.origin}`;default:return"Input tidak valid"}}};function nL(){return{localeError:tL()}}var rL=()=>{let e={string:{unit:"stafi",verb:"a\xF0 hafa"},file:{unit:"b\xE6ti",verb:"a\xF0 hafa"},array:{unit:"hluti",verb:"a\xF0 hafa"},set:{unit:"hluti",verb:"a\xF0 hafa"}};function t(r){return e[r]??null}let n={regex:"gildi",email:"netfang",url:"vefsl\xF3\xF0",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dagsetning og t\xEDmi",date:"ISO dagsetning",time:"ISO t\xEDmi",duration:"ISO t\xEDmalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 t\xF6lugildi",jwt:"JWT",template_literal:"gildi"},i={nan:"NaN",number:"n\xFAmer",array:"fylki"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=re(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`Rangt gildi: \xDE\xFA sl\xF3st inn ${a} \xFEar sem \xE1 a\xF0 vera instanceof ${r.expected}`:`Rangt gildi: \xDE\xFA sl\xF3st inn ${a} \xFEar sem \xE1 a\xF0 vera ${o}`}case"invalid_value":return r.values.length===1?`Rangt gildi: gert r\xE1\xF0 fyrir ${te(r.values[0])}`:`\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${R(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=t(r.origin);return s?`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${r.origin??"gildi"} hafi ${o}${r.maximum.toString()} ${s.unit??"hluti"}`:`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${r.origin??"gildi"} s\xE9 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=t(r.origin);return s?`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${r.origin} hafi ${o}${r.minimum.toString()} ${s.unit}`:`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${r.origin} s\xE9 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 byrja \xE1 "${o.prefix}"`:o.format==="ends_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 enda \xE1 "${o.suffix}"`:o.format==="includes"?`\xD3gildur strengur: ver\xF0ur a\xF0 innihalda "${o.includes}"`:o.format==="regex"?`\xD3gildur strengur: ver\xF0ur a\xF0 fylgja mynstri ${o.pattern}`:`Rangt ${n[o.format]??r.format}`}case"not_multiple_of":return`R\xF6ng tala: ver\xF0ur a\xF0 vera margfeldi af ${r.divisor}`;case"unrecognized_keys":return`\xD3\xFEekkt ${r.keys.length>1?"ir lyklar":"ur lykill"}: ${R(r.keys,", ")}`;case"invalid_key":return`Rangur lykill \xED ${r.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi \xED ${r.origin}`;default:return"Rangt gildi"}}};function iL(){return{localeError:rL()}}var oL=()=>{let e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function t(r){return e[r]??null}let n={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"numero",array:"vettore"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=re(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`Input non valido: atteso instanceof ${r.expected}, ricevuto ${a}`:`Input non valido: atteso ${o}, ricevuto ${a}`}case"invalid_value":return r.values.length===1?`Input non valido: atteso ${te(r.values[0])}`:`Opzione non valida: atteso uno tra ${R(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=t(r.origin);return s?`Troppo grande: ${r.origin??"valore"} deve avere ${o}${r.maximum.toString()} ${s.unit??"elementi"}`:`Troppo grande: ${r.origin??"valore"} deve essere ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=t(r.origin);return s?`Troppo piccolo: ${r.origin} deve avere ${o}${r.minimum.toString()} ${s.unit}`:`Troppo piccolo: ${r.origin} deve essere ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Stringa non valida: deve iniziare con "${o.prefix}"`:o.format==="ends_with"?`Stringa non valida: deve terminare con "${o.suffix}"`:o.format==="includes"?`Stringa non valida: deve includere "${o.includes}"`:o.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${o.pattern}`:`Invalid ${n[o.format]??r.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${r.divisor}`;case"unrecognized_keys":return`Chiav${r.keys.length>1?"i":"e"} non riconosciut${r.keys.length>1?"e":"a"}: ${R(r.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${r.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${r.origin}`;default:return"Input non valido"}}};function sL(){return{localeError:oL()}}var aL=()=>{let e={string:{unit:"\u6587\u5B57",verb:"\u3067\u3042\u308B"},file:{unit:"\u30D0\u30A4\u30C8",verb:"\u3067\u3042\u308B"},array:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"},set:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"}};function t(r){return e[r]??null}let n={regex:"\u5165\u529B\u5024",email:"\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9",url:"URL",emoji:"\u7D75\u6587\u5B57",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u6642",date:"ISO\u65E5\u4ED8",time:"ISO\u6642\u523B",duration:"ISO\u671F\u9593",ipv4:"IPv4\u30A2\u30C9\u30EC\u30B9",ipv6:"IPv6\u30A2\u30C9\u30EC\u30B9",cidrv4:"IPv4\u7BC4\u56F2",cidrv6:"IPv6\u7BC4\u56F2",base64:"base64\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",base64url:"base64url\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",json_string:"JSON\u6587\u5B57\u5217",e164:"E.164\u756A\u53F7",jwt:"JWT",template_literal:"\u5165\u529B\u5024"},i={nan:"NaN",number:"\u6570\u5024",array:"\u914D\u5217"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=re(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`\u7121\u52B9\u306A\u5165\u529B: instanceof ${r.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${a}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u5165\u529B: ${o}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${a}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`}case"invalid_value":return r.values.length===1?`\u7121\u52B9\u306A\u5165\u529B: ${te(r.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u9078\u629E: ${R(r.values,"\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"too_big":{let o=r.inclusive?"\u4EE5\u4E0B\u3067\u3042\u308B":"\u3088\u308A\u5C0F\u3055\u3044",s=t(r.origin);return s?`\u5927\u304D\u3059\u304E\u308B\u5024: ${r.origin??"\u5024"}\u306F${r.maximum.toString()}${s.unit??"\u8981\u7D20"}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5927\u304D\u3059\u304E\u308B\u5024: ${r.origin??"\u5024"}\u306F${r.maximum.toString()}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"too_small":{let o=r.inclusive?"\u4EE5\u4E0A\u3067\u3042\u308B":"\u3088\u308A\u5927\u304D\u3044",s=t(r.origin);return s?`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${r.origin}\u306F${r.minimum.toString()}${s.unit}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${r.origin}\u306F${r.minimum.toString()}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${o.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:o.format==="ends_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${o.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:o.format==="includes"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${o.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:o.format==="regex"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${o.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u7121\u52B9\u306A${n[o.format]??r.format}`}case"not_multiple_of":return`\u7121\u52B9\u306A\u6570\u5024: ${r.divisor}\u306E\u500D\u6570\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"unrecognized_keys":return`\u8A8D\u8B58\u3055\u308C\u3066\u3044\u306A\u3044\u30AD\u30FC${r.keys.length>1?"\u7FA4":""}: ${R(r.keys,"\u3001")}`;case"invalid_key":return`${r.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`;case"invalid_union":return"\u7121\u52B9\u306A\u5165\u529B";case"invalid_element":return`${r.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`;default:return"\u7121\u52B9\u306A\u5165\u529B"}}};function lL(){return{localeError:aL()}}var uL=()=>{let e={string:{unit:"\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},file:{unit:"\u10D1\u10D0\u10D8\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},array:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},set:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"}};function t(r){return e[r]??null}let n={regex:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0",email:"\u10D4\u10DA-\u10E4\u10DD\u10E1\u10E2\u10D8\u10E1 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",url:"URL",emoji:"\u10D4\u10DB\u10DD\u10EF\u10D8",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8-\u10D3\u10E0\u10DD",date:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8",time:"\u10D3\u10E0\u10DD",duration:"\u10EE\u10D0\u10DC\u10D2\u10E0\u10EB\u10DA\u10D8\u10D5\u10DD\u10D1\u10D0",ipv4:"IPv4 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",ipv6:"IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",cidrv4:"IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",cidrv6:"IPv6 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",base64:"base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",base64url:"base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",json_string:"JSON \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",e164:"E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",jwt:"JWT",template_literal:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"},i={nan:"NaN",number:"\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8",string:"\u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",boolean:"\u10D1\u10E3\u10DA\u10D4\u10D0\u10DC\u10D8",function:"\u10E4\u10E3\u10DC\u10E5\u10EA\u10D8\u10D0",array:"\u10DB\u10D0\u10E1\u10D8\u10D5\u10D8"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=re(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 instanceof ${r.expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${a}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${o}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${a}`}case"invalid_value":return r.values.length===1?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${te(r.values[0])}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D0\u10E0\u10D8\u10D0\u10DC\u10E2\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8\u10D0 \u10D4\u10E0\u10D7-\u10D4\u10E0\u10D7\u10D8 ${R(r.values,"|")}-\u10D3\u10D0\u10DC`;case"too_big":{let o=r.inclusive?"<=":"<",s=t(r.origin);return s?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${r.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} ${s.verb} ${o}${r.maximum.toString()} ${s.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${r.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} \u10D8\u10E7\u10DD\u10E1 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=t(r.origin);return s?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${r.origin} ${s.verb} ${o}${r.minimum.toString()} ${s.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${r.origin} \u10D8\u10E7\u10DD\u10E1 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10EC\u10E7\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${o.prefix}"-\u10D8\u10D7`:o.format==="ends_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10DB\u10D7\u10D0\u10D5\u10E0\u10D3\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${o.suffix}"-\u10D8\u10D7`:o.format==="includes"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1 "${o.includes}"-\u10E1`:o.format==="regex"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D4\u10E1\u10D0\u10D1\u10D0\u10DB\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 \u10E8\u10D0\u10D1\u10DA\u10DD\u10DC\u10E1 ${o.pattern}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${n[o.format]??r.format}`}case"not_multiple_of":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E0\u10D8\u10EA\u10EE\u10D5\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10E7\u10DD\u10E1 ${r.divisor}-\u10D8\u10E1 \u10EF\u10D4\u10E0\u10D0\u10D3\u10D8`;case"unrecognized_keys":return`\u10E3\u10EA\u10DC\u10DD\u10D1\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1${r.keys.length>1?"\u10D4\u10D1\u10D8":"\u10D8"}: ${R(r.keys,", ")}`;case"invalid_key":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1\u10D8 ${r.origin}-\u10E8\u10D8`;case"invalid_union":return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0";case"invalid_element":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0 ${r.origin}-\u10E8\u10D8`;default:return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"}}};function cL(){return{localeError:uL()}}var dL=()=>{let e={string:{unit:"\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},file:{unit:"\u1794\u17C3",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},array:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},set:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"}};function t(r){return e[r]??null}let n={regex:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B",email:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793\u17A2\u17CA\u17B8\u1798\u17C2\u179B",url:"URL",emoji:"\u179F\u1789\u17D2\u1789\u17B6\u17A2\u17B6\u179A\u1798\u17D2\u1798\u178E\u17CD",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 \u1793\u17B7\u1784\u1798\u17C9\u17C4\u1784 ISO",date:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 ISO",time:"\u1798\u17C9\u17C4\u1784 ISO",duration:"\u179A\u1799\u17C8\u1796\u17C1\u179B ISO",ipv4:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",ipv6:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",cidrv4:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",cidrv6:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",base64:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64",base64url:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64url",json_string:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A JSON",e164:"\u179B\u17C1\u1781 E.164",jwt:"JWT",template_literal:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B"},i={nan:"NaN",number:"\u179B\u17C1\u1781",array:"\u17A2\u17B6\u179A\u17C1 (Array)",null:"\u1782\u17D2\u1798\u17B6\u1793\u178F\u1798\u17D2\u179B\u17C3 (null)"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=re(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A instanceof ${r.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${a}`:`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${o} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${a}`}case"invalid_value":return r.values.length===1?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${te(r.values[0])}`:`\u1787\u1798\u17D2\u179A\u17BE\u179F\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1787\u17B6\u1798\u17BD\u1799\u1780\u17D2\u1793\u17BB\u1784\u1785\u17C6\u178E\u17C4\u1798 ${R(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=t(r.origin);return s?`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${o} ${r.maximum.toString()} ${s.unit??"\u1792\u17B6\u178F\u17BB"}`:`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${o} ${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=t(r.origin);return s?`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.origin} ${o} ${r.minimum.toString()} ${s.unit}`:`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.origin} ${o} ${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1785\u17B6\u1794\u17CB\u1795\u17D2\u178F\u17BE\u1798\u178A\u17C4\u1799 "${o.prefix}"`:o.format==="ends_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1794\u1789\u17D2\u1785\u1794\u17CB\u178A\u17C4\u1799 "${o.suffix}"`:o.format==="includes"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1798\u17B6\u1793 "${o.includes}"`:o.format==="regex"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1795\u17D2\u1782\u17BC\u1795\u17D2\u1782\u1784\u1793\u17B9\u1784\u1791\u1798\u17D2\u179A\u1784\u17CB\u178A\u17C2\u179B\u1794\u17B6\u1793\u1780\u17C6\u178E\u178F\u17CB ${o.pattern}`:`\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${n[o.format]??r.format}`}case"not_multiple_of":return`\u179B\u17C1\u1781\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1787\u17B6\u1796\u17A0\u17BB\u1782\u17BB\u178E\u1793\u17C3 ${r.divisor}`;case"unrecognized_keys":return`\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${R(r.keys,", ")}`;case"invalid_key":return`\u179F\u17C4\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${r.origin}`;case"invalid_union":return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C";case"invalid_element":return`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${r.origin}`;default:return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C"}}};function CS(){return{localeError:dL()}}function fL(){return CS()}var pL=()=>{let e={string:{unit:"\uBB38\uC790",verb:"to have"},file:{unit:"\uBC14\uC774\uD2B8",verb:"to have"},array:{unit:"\uAC1C",verb:"to have"},set:{unit:"\uAC1C",verb:"to have"}};function t(r){return e[r]??null}let n={regex:"\uC785\uB825",email:"\uC774\uBA54\uC77C \uC8FC\uC18C",url:"URL",emoji:"\uC774\uBAA8\uC9C0",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \uB0A0\uC9DC\uC2DC\uAC04",date:"ISO \uB0A0\uC9DC",time:"ISO \uC2DC\uAC04",duration:"ISO \uAE30\uAC04",ipv4:"IPv4 \uC8FC\uC18C",ipv6:"IPv6 \uC8FC\uC18C",cidrv4:"IPv4 \uBC94\uC704",cidrv6:"IPv6 \uBC94\uC704",base64:"base64 \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",base64url:"base64url \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",json_string:"JSON \uBB38\uC790\uC5F4",e164:"E.164 \uBC88\uD638",jwt:"JWT",template_literal:"\uC785\uB825"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=re(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 instanceof ${r.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${a}\uC785\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${o}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${a}\uC785\uB2C8\uB2E4`}case"invalid_value":return r.values.length===1?`\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${te(r.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC635\uC158: ${R(r.values,"\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"too_big":{let o=r.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",s=o==="\uBBF8\uB9CC"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",a=t(r.origin),l=a?.unit??"\uC694\uC18C";return a?`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${r.maximum.toString()}${l} ${o}${s}`:`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${r.maximum.toString()} ${o}${s}`}case"too_small":{let o=r.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",s=o==="\uC774\uC0C1"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",a=t(r.origin),l=a?.unit??"\uC694\uC18C";return a?`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${r.minimum.toString()}${l} ${o}${s}`:`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${r.minimum.toString()} ${o}${s}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${o.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`:o.format==="ends_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${o.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`:o.format==="includes"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${o.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`:o.format==="regex"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${o.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C ${n[o.format]??r.format}`}case"not_multiple_of":return`\uC798\uBABB\uB41C \uC22B\uC790: ${r.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"unrecognized_keys":return`\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${R(r.keys,", ")}`;case"invalid_key":return`\uC798\uBABB\uB41C \uD0A4: ${r.origin}`;case"invalid_union":return"\uC798\uBABB\uB41C \uC785\uB825";case"invalid_element":return`\uC798\uBABB\uB41C \uAC12: ${r.origin}`;default:return"\uC798\uBABB\uB41C \uC785\uB825"}}};function hL(){return{localeError:pL()}}var Ms=e=>e.charAt(0).toUpperCase()+e.slice(1);function Vx(e){let t=Math.abs(e),n=t%10,i=t%100;return i>=11&&i<=19||n===0?"many":n===1?"one":"few"}var mL=()=>{let e={string:{unit:{one:"simbolis",few:"simboliai",many:"simboli\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne ilgesn\u0117 kaip",notInclusive:"turi b\u016Bti trumpesn\u0117 kaip"},bigger:{inclusive:"turi b\u016Bti ne trumpesn\u0117 kaip",notInclusive:"turi b\u016Bti ilgesn\u0117 kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"bait\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne didesnis kaip",notInclusive:"turi b\u016Bti ma\u017Eesnis kaip"},bigger:{inclusive:"turi b\u016Bti ne ma\u017Eesnis kaip",notInclusive:"turi b\u016Bti didesnis kaip"}}},array:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}},set:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}}};function t(r,o,s,a){let l=e[r]??null;return l===null?l:{unit:l.unit[o],verb:l.verb[a][s?"inclusive":"notInclusive"]}}let n={regex:"\u012Fvestis",email:"el. pa\u0161to adresas",url:"URL",emoji:"jaustukas",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO data ir laikas",date:"ISO data",time:"ISO laikas",duration:"ISO trukm\u0117",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 u\u017Ekoduota eilut\u0117",base64url:"base64url u\u017Ekoduota eilut\u0117",json_string:"JSON eilut\u0117",e164:"E.164 numeris",jwt:"JWT",template_literal:"\u012Fvestis"},i={nan:"NaN",number:"skai\u010Dius",bigint:"sveikasis skai\u010Dius",string:"eilut\u0117",boolean:"login\u0117 reik\u0161m\u0117",undefined:"neapibr\u0117\u017Eta reik\u0161m\u0117",function:"funkcija",symbol:"simbolis",array:"masyvas",object:"objektas",null:"nulin\u0117 reik\u0161m\u0117"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=re(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`Gautas tipas ${a}, o tik\u0117tasi - instanceof ${r.expected}`:`Gautas tipas ${a}, o tik\u0117tasi - ${o}`}case"invalid_value":return r.values.length===1?`Privalo b\u016Bti ${te(r.values[0])}`:`Privalo b\u016Bti vienas i\u0161 ${R(r.values,"|")} pasirinkim\u0173`;case"too_big":{let o=i[r.origin]??r.origin,s=t(r.origin,Vx(Number(r.maximum)),r.inclusive??!1,"smaller");if(s?.verb)return`${Ms(o??r.origin??"reik\u0161m\u0117")} ${s.verb} ${r.maximum.toString()} ${s.unit??"element\u0173"}`;let a=r.inclusive?"ne didesnis kaip":"ma\u017Eesnis kaip";return`${Ms(o??r.origin??"reik\u0161m\u0117")} turi b\u016Bti ${a} ${r.maximum.toString()} ${s?.unit}`}case"too_small":{let o=i[r.origin]??r.origin,s=t(r.origin,Vx(Number(r.minimum)),r.inclusive??!1,"bigger");if(s?.verb)return`${Ms(o??r.origin??"reik\u0161m\u0117")} ${s.verb} ${r.minimum.toString()} ${s.unit??"element\u0173"}`;let a=r.inclusive?"ne ma\u017Eesnis kaip":"didesnis kaip";return`${Ms(o??r.origin??"reik\u0161m\u0117")} turi b\u016Bti ${a} ${r.minimum.toString()} ${s?.unit}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Eilut\u0117 privalo prasid\u0117ti "${o.prefix}"`:o.format==="ends_with"?`Eilut\u0117 privalo pasibaigti "${o.suffix}"`:o.format==="includes"?`Eilut\u0117 privalo \u012Ftraukti "${o.includes}"`:o.format==="regex"?`Eilut\u0117 privalo atitikti ${o.pattern}`:`Neteisingas ${n[o.format]??r.format}`}case"not_multiple_of":return`Skai\u010Dius privalo b\u016Bti ${r.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpa\u017Eint${r.keys.length>1?"i":"as"} rakt${r.keys.length>1?"ai":"as"}: ${R(r.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga \u012Fvestis";case"invalid_element":{let o=i[r.origin]??r.origin;return`${Ms(o??r.origin??"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return"Klaidinga \u012Fvestis"}}};function gL(){return{localeError:mL()}}var bL=()=>{let e={string:{unit:"\u0437\u043D\u0430\u0446\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},file:{unit:"\u0431\u0430\u0458\u0442\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},array:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},set:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"}};function t(r){return e[r]??null}let n={regex:"\u0432\u043D\u0435\u0441",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u043D\u0430 \u0435-\u043F\u043E\u0448\u0442\u0430",url:"URL",emoji:"\u0435\u043C\u043E\u045F\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0443\u043C \u0438 \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0443\u043C",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u0432\u0440\u0435\u043C\u0435\u0442\u0440\u0430\u0435\u045A\u0435",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441\u0430",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441\u0430",cidrv4:"IPv4 \u043E\u043F\u0441\u0435\u0433",cidrv6:"IPv6 \u043E\u043F\u0441\u0435\u0433",base64:"base64-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",base64url:"base64url-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",json_string:"JSON \u043D\u0438\u0437\u0430",e164:"E.164 \u0431\u0440\u043E\u0458",jwt:"JWT",template_literal:"\u0432\u043D\u0435\u0441"},i={nan:"NaN",number:"\u0431\u0440\u043E\u0458",array:"\u043D\u0438\u0437\u0430"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=re(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 instanceof ${r.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${a}`:`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${o}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${a}`}case"invalid_value":return r.values.length===1?`Invalid input: expected ${te(r.values[0])}`:`\u0413\u0440\u0435\u0448\u0430\u043D\u0430 \u043E\u043F\u0446\u0438\u0458\u0430: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 \u0435\u0434\u043D\u0430 ${R(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=t(r.origin);return s?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${r.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${o}${r.maximum.toString()} ${s.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438"}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${r.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=t(r.origin);return s?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${r.origin} \u0434\u0430 \u0438\u043C\u0430 ${o}${r.minimum.toString()} ${s.unit}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${r.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u043D\u0443\u0432\u0430 \u0441\u043E "${o.prefix}"`:o.format==="ends_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0443\u0432\u0430 \u0441\u043E "${o.suffix}"`:o.format==="includes"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0432\u043A\u043B\u0443\u0447\u0443\u0432\u0430 "${o.includes}"`:o.format==="regex"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u043E\u0434\u0433\u043E\u0430\u0440\u0430 \u043D\u0430 \u043F\u0430\u0442\u0435\u0440\u043D\u043E\u0442 ${o.pattern}`:`Invalid ${n[o.format]??r.format}`}case"not_multiple_of":return`\u0413\u0440\u0435\u0448\u0435\u043D \u0431\u0440\u043E\u0458: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0431\u0438\u0434\u0435 \u0434\u0435\u043B\u0438\u0432 \u0441\u043E ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D\u0438 \u043A\u043B\u0443\u0447\u0435\u0432\u0438":"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D \u043A\u043B\u0443\u0447"}: ${R(r.keys,", ")}`;case"invalid_key":return`\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${r.origin}`;case"invalid_union":return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441";case"invalid_element":return`\u0413\u0440\u0435\u0448\u043D\u0430 \u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442 \u0432\u043E ${r.origin}`;default:return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441"}}};function vL(){return{localeError:bL()}}var yL=()=>{let e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function t(r){return e[r]??null}let n={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"nombor"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=re(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`Input tidak sah: dijangka instanceof ${r.expected}, diterima ${a}`:`Input tidak sah: dijangka ${o}, diterima ${a}`}case"invalid_value":return r.values.length===1?`Input tidak sah: dijangka ${te(r.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${R(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=t(r.origin);return s?`Terlalu besar: dijangka ${r.origin??"nilai"} ${s.verb} ${o}${r.maximum.toString()} ${s.unit??"elemen"}`:`Terlalu besar: dijangka ${r.origin??"nilai"} adalah ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=t(r.origin);return s?`Terlalu kecil: dijangka ${r.origin} ${s.verb} ${o}${r.minimum.toString()} ${s.unit}`:`Terlalu kecil: dijangka ${r.origin} adalah ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`String tidak sah: mesti bermula dengan "${o.prefix}"`:o.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${o.suffix}"`:o.format==="includes"?`String tidak sah: mesti mengandungi "${o.includes}"`:o.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${o.pattern}`:`${n[o.format]??r.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${r.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${R(r.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${r.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${r.origin}`;default:return"Input tidak sah"}}};function kL(){return{localeError:yL()}}var xL=()=>{let e={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"}};function t(r){return e[r]??null}let n={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"},i={nan:"NaN",number:"getal"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=re(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`Ongeldige invoer: verwacht instanceof ${r.expected}, ontving ${a}`:`Ongeldige invoer: verwacht ${o}, ontving ${a}`}case"invalid_value":return r.values.length===1?`Ongeldige invoer: verwacht ${te(r.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${R(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=t(r.origin),a=r.origin==="date"?"laat":r.origin==="string"?"lang":"groot";return s?`Te ${a}: verwacht dat ${r.origin??"waarde"} ${o}${r.maximum.toString()} ${s.unit??"elementen"} ${s.verb}`:`Te ${a}: verwacht dat ${r.origin??"waarde"} ${o}${r.maximum.toString()} is`}case"too_small":{let o=r.inclusive?">=":">",s=t(r.origin),a=r.origin==="date"?"vroeg":r.origin==="string"?"kort":"klein";return s?`Te ${a}: verwacht dat ${r.origin} ${o}${r.minimum.toString()} ${s.unit} ${s.verb}`:`Te ${a}: verwacht dat ${r.origin} ${o}${r.minimum.toString()} is`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Ongeldige tekst: moet met "${o.prefix}" beginnen`:o.format==="ends_with"?`Ongeldige tekst: moet op "${o.suffix}" eindigen`:o.format==="includes"?`Ongeldige tekst: moet "${o.includes}" bevatten`:o.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${o.pattern}`:`Ongeldig: ${n[o.format]??r.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${r.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${r.keys.length>1?"s":""}: ${R(r.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${r.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${r.origin}`;default:return"Ongeldige invoer"}}};function _L(){return{localeError:xL()}}var wL=()=>{let e={string:{unit:"tegn",verb:"\xE5 ha"},file:{unit:"bytes",verb:"\xE5 ha"},array:{unit:"elementer",verb:"\xE5 inneholde"},set:{unit:"elementer",verb:"\xE5 inneholde"}};function t(r){return e[r]??null}let n={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"tall",array:"liste"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=re(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`Ugyldig input: forventet instanceof ${r.expected}, fikk ${a}`:`Ugyldig input: forventet ${o}, fikk ${a}`}case"invalid_value":return r.values.length===1?`Ugyldig verdi: forventet ${te(r.values[0])}`:`Ugyldig valg: forventet en av ${R(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=t(r.origin);return s?`For stor(t): forventet ${r.origin??"value"} til \xE5 ha ${o}${r.maximum.toString()} ${s.unit??"elementer"}`:`For stor(t): forventet ${r.origin??"value"} til \xE5 ha ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=t(r.origin);return s?`For lite(n): forventet ${r.origin} til \xE5 ha ${o}${r.minimum.toString()} ${s.unit}`:`For lite(n): forventet ${r.origin} til \xE5 ha ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${o.prefix}"`:o.format==="ends_with"?`Ugyldig streng: m\xE5 ende med "${o.suffix}"`:o.format==="includes"?`Ugyldig streng: m\xE5 inneholde "${o.includes}"`:o.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${o.pattern}`:`Ugyldig ${n[o.format]??r.format}`}case"not_multiple_of":return`Ugyldig tall: m\xE5 v\xE6re et multiplum av ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"Ukjente n\xF8kler":"Ukjent n\xF8kkel"}: ${R(r.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8kkel i ${r.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${r.origin}`;default:return"Ugyldig input"}}};function SL(){return{localeError:wL()}}var EL=()=>{let e={string:{unit:"harf",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"unsur",verb:"olmal\u0131d\u0131r"},set:{unit:"unsur",verb:"olmal\u0131d\u0131r"}};function t(r){return e[r]??null}let n={regex:"giren",email:"epostag\xE2h",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO heng\xE2m\u0131",date:"ISO tarihi",time:"ISO zaman\u0131",duration:"ISO m\xFCddeti",ipv4:"IPv4 ni\u015F\xE2n\u0131",ipv6:"IPv6 ni\u015F\xE2n\u0131",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-\u015Fifreli metin",base64url:"base64url-\u015Fifreli metin",json_string:"JSON metin",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"giren"},i={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=re(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`F\xE2sit giren: umulan instanceof ${r.expected}, al\u0131nan ${a}`:`F\xE2sit giren: umulan ${o}, al\u0131nan ${a}`}case"invalid_value":return r.values.length===1?`F\xE2sit giren: umulan ${te(r.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${R(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=t(r.origin);return s?`Fazla b\xFCy\xFCk: ${r.origin??"value"}, ${o}${r.maximum.toString()} ${s.unit??"elements"} sahip olmal\u0131yd\u0131.`:`Fazla b\xFCy\xFCk: ${r.origin??"value"}, ${o}${r.maximum.toString()} olmal\u0131yd\u0131.`}case"too_small":{let o=r.inclusive?">=":">",s=t(r.origin);return s?`Fazla k\xFC\xE7\xFCk: ${r.origin}, ${o}${r.minimum.toString()} ${s.unit} sahip olmal\u0131yd\u0131.`:`Fazla k\xFC\xE7\xFCk: ${r.origin}, ${o}${r.minimum.toString()} olmal\u0131yd\u0131.`}case"invalid_format":{let o=r;return o.format==="starts_with"?`F\xE2sit metin: "${o.prefix}" ile ba\u015Flamal\u0131.`:o.format==="ends_with"?`F\xE2sit metin: "${o.suffix}" ile bitmeli.`:o.format==="includes"?`F\xE2sit metin: "${o.includes}" ihtiv\xE2 etmeli.`:o.format==="regex"?`F\xE2sit metin: ${o.pattern} nak\u015F\u0131na uymal\u0131.`:`F\xE2sit ${n[o.format]??r.format}`}case"not_multiple_of":return`F\xE2sit say\u0131: ${r.divisor} kat\u0131 olmal\u0131yd\u0131.`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar ${r.keys.length>1?"s":""}: ${R(r.keys,", ")}`;case"invalid_key":return`${r.origin} i\xE7in tan\u0131nmayan anahtar var.`;case"invalid_union":return"Giren tan\u0131namad\u0131.";case"invalid_element":return`${r.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`;default:return"K\u0131ymet tan\u0131namad\u0131."}}};function $L(){return{localeError:EL()}}var CL=()=>{let e={string:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},file:{unit:"\u0628\u0627\u06CC\u067C\u0633",verb:"\u0648\u0644\u0631\u064A"},array:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},set:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"}};function t(r){return e[r]??null}let n={regex:"\u0648\u0631\u0648\u062F\u064A",email:"\u0628\u0631\u06CC\u069A\u0646\u0627\u0644\u06CC\u06A9",url:"\u06CC\u0648 \u0622\u0631 \u0627\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0646\u06CC\u067C\u0647 \u0627\u0648 \u0648\u062E\u062A",date:"\u0646\u06D0\u067C\u0647",time:"\u0648\u062E\u062A",duration:"\u0645\u0648\u062F\u0647",ipv4:"\u062F IPv4 \u067E\u062A\u0647",ipv6:"\u062F IPv6 \u067E\u062A\u0647",cidrv4:"\u062F IPv4 \u0633\u0627\u062D\u0647",cidrv6:"\u062F IPv6 \u0633\u0627\u062D\u0647",base64:"base64-encoded \u0645\u062A\u0646",base64url:"base64url-encoded \u0645\u062A\u0646",json_string:"JSON \u0645\u062A\u0646",e164:"\u062F E.164 \u0634\u0645\u06D0\u0631\u0647",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u064A"},i={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0627\u0631\u06D0"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=re(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F instanceof ${r.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${a} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`:`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${o} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${a} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`}case"invalid_value":return r.values.length===1?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${te(r.values[0])} \u0648\u0627\u06CC`:`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${R(r.values,"|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;case"too_big":{let o=r.inclusive?"<=":"<",s=t(r.origin);return s?`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${r.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${o}${r.maximum.toString()} ${s.unit??"\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${r.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${o}${r.maximum.toString()} \u0648\u064A`}case"too_small":{let o=r.inclusive?">=":">",s=t(r.origin);return s?`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${r.origin} \u0628\u0627\u06CC\u062F ${o}${r.minimum.toString()} ${s.unit} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${r.origin} \u0628\u0627\u06CC\u062F ${o}${r.minimum.toString()} \u0648\u064A`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${o.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`:o.format==="ends_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${o.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`:o.format==="includes"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${o.includes}" \u0648\u0644\u0631\u064A`:o.format==="regex"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${o.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`:`${n[o.format]??r.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`}case"not_multiple_of":return`\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${r.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`;case"unrecognized_keys":return`\u0646\u0627\u0633\u0645 ${r.keys.length>1?"\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647":"\u06A9\u0644\u06CC\u0689"}: ${R(r.keys,", ")}`;case"invalid_key":return`\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${r.origin} \u06A9\u06D0`;case"invalid_union":return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A";case"invalid_element":return`\u0646\u0627\u0633\u0645 \u0639\u0646\u0635\u0631 \u067E\u0647 ${r.origin} \u06A9\u06D0`;default:return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A"}}};function TL(){return{localeError:CL()}}var IL=()=>{let e={string:{unit:"znak\xF3w",verb:"mie\u0107"},file:{unit:"bajt\xF3w",verb:"mie\u0107"},array:{unit:"element\xF3w",verb:"mie\u0107"},set:{unit:"element\xF3w",verb:"mie\u0107"}};function t(r){return e[r]??null}let n={regex:"wyra\u017Cenie",email:"adres email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ci\u0105g znak\xF3w zakodowany w formacie base64",base64url:"ci\u0105g znak\xF3w zakodowany w formacie base64url",json_string:"ci\u0105g znak\xF3w w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wej\u015Bcie"},i={nan:"NaN",number:"liczba",array:"tablica"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=re(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano instanceof ${r.expected}, otrzymano ${a}`:`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${o}, otrzymano ${a}`}case"invalid_value":return r.values.length===1?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${te(r.values[0])}`:`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${R(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=t(r.origin);return s?`Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${r.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${o}${r.maximum.toString()} ${s.unit??"element\xF3w"}`:`Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${r.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=t(r.origin);return s?`Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${r.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${o}${r.minimum.toString()} ${s.unit??"element\xF3w"}`:`Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${r.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${o.prefix}"`:o.format==="ends_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${o.suffix}"`:o.format==="includes"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${o.includes}"`:o.format==="regex"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${o.pattern}`:`Nieprawid\u0142ow(y/a/e) ${n[o.format]??r.format}`}case"not_multiple_of":return`Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${r.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${r.keys.length>1?"s":""}: ${R(r.keys,", ")}`;case"invalid_key":return`Nieprawid\u0142owy klucz w ${r.origin}`;case"invalid_union":return"Nieprawid\u0142owe dane wej\u015Bciowe";case"invalid_element":return`Nieprawid\u0142owa warto\u015B\u0107 w ${r.origin}`;default:return"Nieprawid\u0142owe dane wej\u015Bciowe"}}};function AL(){return{localeError:IL()}}var ML=()=>{let e={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function t(r){return e[r]??null}let n={regex:"padr\xE3o",email:"endere\xE7o de e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"dura\xE7\xE3o ISO",ipv4:"endere\xE7o IPv4",ipv6:"endere\xE7o IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},i={nan:"NaN",number:"n\xFAmero",null:"nulo"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=re(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`Tipo inv\xE1lido: esperado instanceof ${r.expected}, recebido ${a}`:`Tipo inv\xE1lido: esperado ${o}, recebido ${a}`}case"invalid_value":return r.values.length===1?`Entrada inv\xE1lida: esperado ${te(r.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperada uma das ${R(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=t(r.origin);return s?`Muito grande: esperado que ${r.origin??"valor"} tivesse ${o}${r.maximum.toString()} ${s.unit??"elementos"}`:`Muito grande: esperado que ${r.origin??"valor"} fosse ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=t(r.origin);return s?`Muito pequeno: esperado que ${r.origin} tivesse ${o}${r.minimum.toString()} ${s.unit}`:`Muito pequeno: esperado que ${r.origin} fosse ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar com "${o.prefix}"`:o.format==="ends_with"?`Texto inv\xE1lido: deve terminar com "${o.suffix}"`:o.format==="includes"?`Texto inv\xE1lido: deve incluir "${o.includes}"`:o.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${o.pattern}`:`${n[o.format]??r.format} inv\xE1lido`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${r.divisor}`;case"unrecognized_keys":return`Chave${r.keys.length>1?"s":""} desconhecida${r.keys.length>1?"s":""}: ${R(r.keys,", ")}`;case"invalid_key":return`Chave inv\xE1lida em ${r.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido em ${r.origin}`;default:return"Campo inv\xE1lido"}}};function zL(){return{localeError:ML()}}function Kx(e,t,n,i){let r=Math.abs(e),o=r%10,s=r%100;return s>=11&&s<=19?i:o===1?t:o>=2&&o<=4?n:i}var DL=()=>{let e={string:{unit:{one:"\u0441\u0438\u043C\u0432\u043E\u043B",few:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",many:"\u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u0430",many:"\u0431\u0430\u0439\u0442"},verb:"\u0438\u043C\u0435\u0442\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"}};function t(r){return e[r]??null}let n={regex:"\u0432\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u044F",duration:"ISO \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64",base64url:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64url",json_string:"JSON \u0441\u0442\u0440\u043E\u043A\u0430",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0432\u043E\u0434"},i={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0441\u0438\u0432"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=re(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C instanceof ${r.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${a}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${o}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${a}`}case"invalid_value":return r.values.length===1?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${te(r.values[0])}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0434\u043D\u043E \u0438\u0437 ${R(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=t(r.origin);if(s){let a=Number(r.maximum),l=Kx(a,s.unit.one,s.unit.few,s.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${o}${r.maximum.toString()} ${l}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=t(r.origin);if(s){let a=Number(r.minimum),l=Kx(a,s.unit.one,s.unit.few,s.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${r.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${o}${r.minimum.toString()} ${l}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${r.origin} \u0431\u0443\u0434\u0435\u0442 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u043D\u0430\u0447\u0438\u043D\u0430\u0442\u044C\u0441\u044F \u0441 "${o.prefix}"`:o.format==="ends_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0437\u0430\u043A\u0430\u043D\u0447\u0438\u0432\u0430\u0442\u044C\u0441\u044F \u043D\u0430 "${o.suffix}"`:o.format==="includes"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442\u044C "${o.includes}"`:o.format==="regex"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043E\u0432\u0430\u0442\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${o.pattern}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${n[o.format]??r.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0447\u0438\u0441\u043B\u043E: \u0434\u043E\u043B\u0436\u043D\u043E \u0431\u044B\u0442\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${r.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${r.keys.length>1?"\u044B\u0435":"\u044B\u0439"} \u043A\u043B\u044E\u0447${r.keys.length>1?"\u0438":""}: ${R(r.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${r.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435";case"invalid_element":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0432 ${r.origin}`;default:return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435"}}};function NL(){return{localeError:DL()}}var OL=()=>{let e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function t(r){return e[r]??null}let n={regex:"vnos",email:"e-po\u0161tni naslov",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum in \u010Das",date:"ISO datum",time:"ISO \u010Das",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 \u0161tevilka",jwt:"JWT",template_literal:"vnos"},i={nan:"NaN",number:"\u0161tevilo",array:"tabela"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=re(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`Neveljaven vnos: pri\u010Dakovano instanceof ${r.expected}, prejeto ${a}`:`Neveljaven vnos: pri\u010Dakovano ${o}, prejeto ${a}`}case"invalid_value":return r.values.length===1?`Neveljaven vnos: pri\u010Dakovano ${te(r.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${R(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=t(r.origin);return s?`Preveliko: pri\u010Dakovano, da bo ${r.origin??"vrednost"} imelo ${o}${r.maximum.toString()} ${s.unit??"elementov"}`:`Preveliko: pri\u010Dakovano, da bo ${r.origin??"vrednost"} ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=t(r.origin);return s?`Premajhno: pri\u010Dakovano, da bo ${r.origin} imelo ${o}${r.minimum.toString()} ${s.unit}`:`Premajhno: pri\u010Dakovano, da bo ${r.origin} ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Neveljaven niz: mora se za\u010Deti z "${o.prefix}"`:o.format==="ends_with"?`Neveljaven niz: mora se kon\u010Dati z "${o.suffix}"`:o.format==="includes"?`Neveljaven niz: mora vsebovati "${o.includes}"`:o.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${o.pattern}`:`Neveljaven ${n[o.format]??r.format}`}case"not_multiple_of":return`Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${r.divisor}`;case"unrecognized_keys":return`Neprepoznan${r.keys.length>1?"i klju\u010Di":" klju\u010D"}: ${R(r.keys,", ")}`;case"invalid_key":return`Neveljaven klju\u010D v ${r.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${r.origin}`;default:return"Neveljaven vnos"}}};function RL(){return{localeError:OL()}}var PL=()=>{let e={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att inneh\xE5lla"},set:{unit:"objekt",verb:"att inneh\xE5lla"}};function t(r){return e[r]??null}let n={regex:"regulj\xE4rt uttryck",email:"e-postadress",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-intervall",ipv6:"IPv6-intervall",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad str\xE4ng",base64url:"base64url-kodad str\xE4ng",json_string:"JSON-str\xE4ng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"},i={nan:"NaN",number:"antal",array:"lista"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=re(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`Ogiltig inmatning: f\xF6rv\xE4ntat instanceof ${r.expected}, fick ${a}`:`Ogiltig inmatning: f\xF6rv\xE4ntat ${o}, fick ${a}`}case"invalid_value":return r.values.length===1?`Ogiltig inmatning: f\xF6rv\xE4ntat ${te(r.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${R(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=t(r.origin);return s?`F\xF6r stor(t): f\xF6rv\xE4ntade ${r.origin??"v\xE4rdet"} att ha ${o}${r.maximum.toString()} ${s.unit??"element"}`:`F\xF6r stor(t): f\xF6rv\xE4ntat ${r.origin??"v\xE4rdet"} att ha ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=t(r.origin);return s?`F\xF6r lite(t): f\xF6rv\xE4ntade ${r.origin??"v\xE4rdet"} att ha ${o}${r.minimum.toString()} ${s.unit}`:`F\xF6r lite(t): f\xF6rv\xE4ntade ${r.origin??"v\xE4rdet"} att ha ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${o.prefix}"`:o.format==="ends_with"?`Ogiltig str\xE4ng: m\xE5ste sluta med "${o.suffix}"`:o.format==="includes"?`Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${o.includes}"`:o.format==="regex"?`Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${o.pattern}"`:`Ogiltig(t) ${n[o.format]??r.format}`}case"not_multiple_of":return`Ogiltigt tal: m\xE5ste vara en multipel av ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"Ok\xE4nda nycklar":"Ok\xE4nd nyckel"}: ${R(r.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${r.origin??"v\xE4rdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt v\xE4rde i ${r.origin??"v\xE4rdet"}`;default:return"Ogiltig input"}}};function LL(){return{localeError:PL()}}var FL=()=>{let e={string:{unit:"\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},file:{unit:"\u0BAA\u0BC8\u0B9F\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},array:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},set:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"}};function t(r){return e[r]??null}let n={regex:"\u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1",email:"\u0BAE\u0BBF\u0BA9\u0BCD\u0BA9\u0B9E\u0BCD\u0B9A\u0BB2\u0BCD \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0BA4\u0BC7\u0BA4\u0BBF \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",date:"ISO \u0BA4\u0BC7\u0BA4\u0BBF",time:"ISO \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",duration:"ISO \u0B95\u0BBE\u0BB2 \u0B85\u0BB3\u0BB5\u0BC1",ipv4:"IPv4 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",ipv6:"IPv6 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",cidrv4:"IPv4 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",cidrv6:"IPv6 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",base64:"base64-encoded \u0B9A\u0BB0\u0BAE\u0BCD",base64url:"base64url-encoded \u0B9A\u0BB0\u0BAE\u0BCD",json_string:"JSON \u0B9A\u0BB0\u0BAE\u0BCD",e164:"E.164 \u0B8E\u0BA3\u0BCD",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"\u0B8E\u0BA3\u0BCD",array:"\u0B85\u0BA3\u0BBF",null:"\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=re(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 instanceof ${r.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${a}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${o}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${a}`}case"invalid_value":return r.values.length===1?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${te(r.values[0])}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0BB0\u0BC1\u0BAA\u0BCD\u0BAA\u0BAE\u0BCD: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${R(r.values,"|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;case"too_big":{let o=r.inclusive?"<=":"<",s=t(r.origin);return s?`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${r.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${o}${r.maximum.toString()} ${s.unit??"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD"} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${r.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${o}${r.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"too_small":{let o=r.inclusive?">=":">",s=t(r.origin);return s?`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${r.origin} ${o}${r.minimum.toString()} ${s.unit} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${r.origin} ${o}${r.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${o.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:o.format==="ends_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${o.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:o.format==="includes"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${o.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:o.format==="regex"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${o.pattern} \u0BAE\u0BC1\u0BB1\u0BC8\u0BAA\u0BBE\u0B9F\u0BCD\u0B9F\u0BC1\u0B9F\u0BA9\u0BCD \u0BAA\u0BCA\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 ${n[o.format]??r.format}`}case"not_multiple_of":return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${r.divisor} \u0B87\u0BA9\u0BCD \u0BAA\u0BB2\u0BAE\u0BBE\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;case"unrecognized_keys":return`\u0B85\u0B9F\u0BC8\u0BAF\u0BBE\u0BB3\u0BAE\u0BCD \u0BA4\u0BC6\u0BB0\u0BBF\u0BAF\u0BBE\u0BA4 \u0BB5\u0BBF\u0B9A\u0BC8${r.keys.length>1?"\u0B95\u0BB3\u0BCD":""}: ${R(r.keys,", ")}`;case"invalid_key":return`${r.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0B9A\u0BC8`;case"invalid_union":return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1";case"invalid_element":return`${r.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1`;default:return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1"}}};function BL(){return{localeError:FL()}}var UL=()=>{let e={string:{unit:"\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},file:{unit:"\u0E44\u0E1A\u0E15\u0E4C",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},array:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},set:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"}};function t(r){return e[r]??null}let n={regex:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19",email:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E2D\u0E35\u0E40\u0E21\u0E25",url:"URL",emoji:"\u0E2D\u0E34\u0E42\u0E21\u0E08\u0E34",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",date:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E41\u0E1A\u0E1A ISO",time:"\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",duration:"\u0E0A\u0E48\u0E27\u0E07\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",ipv4:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv4",ipv6:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv6",cidrv4:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv4",cidrv6:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv6",base64:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64",base64url:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A URL",json_string:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A JSON",e164:"\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28 (E.164)",jwt:"\u0E42\u0E17\u0E40\u0E04\u0E19 JWT",template_literal:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19"},i={nan:"NaN",number:"\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02",array:"\u0E2D\u0E32\u0E23\u0E4C\u0E40\u0E23\u0E22\u0E4C (Array)",null:"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E48\u0E32 (null)"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=re(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 instanceof ${r.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${a}`:`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${o} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${a}`}case"invalid_value":return r.values.length===1?`\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${te(r.values[0])}`:`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E43\u0E19 ${R(r.values,"|")}`;case"too_big":{let o=r.inclusive?"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19":"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",s=t(r.origin);return s?`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${r.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${r.maximum.toString()} ${s.unit??"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`:`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${r.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22":"\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32",s=t(r.origin);return s?`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${r.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${r.minimum.toString()} ${s.unit}`:`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${r.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 "${o.prefix}"`:o.format==="ends_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E25\u0E07\u0E17\u0E49\u0E32\u0E22\u0E14\u0E49\u0E27\u0E22 "${o.suffix}"`:o.format==="includes"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 "${o.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`:o.format==="regex"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14 ${o.pattern}`:`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${n[o.format]??r.format}`}case"not_multiple_of":return`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19\u0E17\u0E35\u0E48\u0E2B\u0E32\u0E23\u0E14\u0E49\u0E27\u0E22 ${r.divisor} \u0E44\u0E14\u0E49\u0E25\u0E07\u0E15\u0E31\u0E27`;case"unrecognized_keys":return`\u0E1E\u0E1A\u0E04\u0E35\u0E22\u0E4C\u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E23\u0E39\u0E49\u0E08\u0E31\u0E01: ${R(r.keys,", ")}`;case"invalid_key":return`\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${r.origin}`;case"invalid_union":return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E44\u0E21\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E22\u0E39\u0E40\u0E19\u0E35\u0E22\u0E19\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E44\u0E27\u0E49";case"invalid_element":return`\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${r.origin}`;default:return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07"}}};function jL(){return{localeError:UL()}}var ZL=()=>{let e={string:{unit:"karakter",verb:"olmal\u0131"},file:{unit:"bayt",verb:"olmal\u0131"},array:{unit:"\xF6\u011Fe",verb:"olmal\u0131"},set:{unit:"\xF6\u011Fe",verb:"olmal\u0131"}};function t(r){return e[r]??null}let n={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO s\xFCre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aral\u0131\u011F\u0131",cidrv6:"IPv6 aral\u0131\u011F\u0131",base64:"base64 ile \u015Fifrelenmi\u015F metin",base64url:"base64url ile \u015Fifrelenmi\u015F metin",json_string:"JSON dizesi",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"\u015Eablon dizesi"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=re(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`Ge\xE7ersiz de\u011Fer: beklenen instanceof ${r.expected}, al\u0131nan ${a}`:`Ge\xE7ersiz de\u011Fer: beklenen ${o}, al\u0131nan ${a}`}case"invalid_value":return r.values.length===1?`Ge\xE7ersiz de\u011Fer: beklenen ${te(r.values[0])}`:`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${R(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=t(r.origin);return s?`\xC7ok b\xFCy\xFCk: beklenen ${r.origin??"de\u011Fer"} ${o}${r.maximum.toString()} ${s.unit??"\xF6\u011Fe"}`:`\xC7ok b\xFCy\xFCk: beklenen ${r.origin??"de\u011Fer"} ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=t(r.origin);return s?`\xC7ok k\xFC\xE7\xFCk: beklenen ${r.origin} ${o}${r.minimum.toString()} ${s.unit}`:`\xC7ok k\xFC\xE7\xFCk: beklenen ${r.origin} ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Ge\xE7ersiz metin: "${o.prefix}" ile ba\u015Flamal\u0131`:o.format==="ends_with"?`Ge\xE7ersiz metin: "${o.suffix}" ile bitmeli`:o.format==="includes"?`Ge\xE7ersiz metin: "${o.includes}" i\xE7ermeli`:o.format==="regex"?`Ge\xE7ersiz metin: ${o.pattern} desenine uymal\u0131`:`Ge\xE7ersiz ${n[o.format]??r.format}`}case"not_multiple_of":return`Ge\xE7ersiz say\u0131: ${r.divisor} ile tam b\xF6l\xFCnebilmeli`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar${r.keys.length>1?"lar":""}: ${R(r.keys,", ")}`;case"invalid_key":return`${r.origin} i\xE7inde ge\xE7ersiz anahtar`;case"invalid_union":return"Ge\xE7ersiz de\u011Fer";case"invalid_element":return`${r.origin} i\xE7inde ge\xE7ersiz de\u011Fer`;default:return"Ge\xE7ersiz de\u011Fer"}}};function HL(){return{localeError:ZL()}}var qL=()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},file:{unit:"\u0431\u0430\u0439\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"}};function t(r){return e[r]??null}let n={regex:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u0435\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0457 \u043F\u043E\u0448\u0442\u0438",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0434\u0430\u0442\u0430 \u0442\u0430 \u0447\u0430\u0441 ISO",date:"\u0434\u0430\u0442\u0430 ISO",time:"\u0447\u0430\u0441 ISO",duration:"\u0442\u0440\u0438\u0432\u0430\u043B\u0456\u0441\u0442\u044C ISO",ipv4:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv4",ipv6:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv6",cidrv4:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv4",cidrv6:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv6",base64:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64",base64url:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64url",json_string:"\u0440\u044F\u0434\u043E\u043A JSON",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"},i={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=re(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F instanceof ${r.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${a}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${o}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${a}`}case"invalid_value":return r.values.length===1?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${te(r.values[0])}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0430 \u043E\u043F\u0446\u0456\u044F: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F \u043E\u0434\u043D\u0435 \u0437 ${R(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=t(r.origin);return s?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${s.verb} ${o}${r.maximum.toString()} ${s.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432"}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=t(r.origin);return s?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${r.origin} ${s.verb} ${o}${r.minimum.toString()} ${s.unit}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${r.origin} \u0431\u0443\u0434\u0435 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043F\u043E\u0447\u0438\u043D\u0430\u0442\u0438\u0441\u044F \u0437 "${o.prefix}"`:o.format==="ends_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0437\u0430\u043A\u0456\u043D\u0447\u0443\u0432\u0430\u0442\u0438\u0441\u044F \u043D\u0430 "${o.suffix}"`:o.format==="includes"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043C\u0456\u0441\u0442\u0438\u0442\u0438 "${o.includes}"`:o.format==="regex"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0442\u0438 \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${o.pattern}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${n[o.format]??r.format}`}case"not_multiple_of":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0447\u0438\u0441\u043B\u043E: \u043F\u043E\u0432\u0438\u043D\u043D\u043E \u0431\u0443\u0442\u0438 \u043A\u0440\u0430\u0442\u043D\u0438\u043C ${r.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${r.keys.length>1?"\u0456":""}: ${R(r.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${r.origin}`;case"invalid_union":return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456";case"invalid_element":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F \u0443 ${r.origin}`;default:return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"}}};function TS(){return{localeError:qL()}}function WL(){return TS()}var VL=()=>{let e={string:{unit:"\u062D\u0631\u0648\u0641",verb:"\u06C1\u0648\u0646\u0627"},file:{unit:"\u0628\u0627\u0626\u0679\u0633",verb:"\u06C1\u0648\u0646\u0627"},array:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"},set:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"}};function t(r){return e[r]??null}let n={regex:"\u0627\u0646 \u067E\u0679",email:"\u0627\u06CC \u0645\u06CC\u0644 \u0627\u06CC\u0688\u0631\u06CC\u0633",url:"\u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",uuidv4:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 4",uuidv6:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 6",nanoid:"\u0646\u06CC\u0646\u0648 \u0622\u0626\u06CC \u0688\u06CC",guid:"\u062C\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid2:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC 2",ulid:"\u06CC\u0648 \u0627\u06CC\u0644 \u0622\u0626\u06CC \u0688\u06CC",xid:"\u0627\u06CC\u06A9\u0633 \u0622\u0626\u06CC \u0688\u06CC",ksuid:"\u06A9\u06D2 \u0627\u06CC\u0633 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",datetime:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0688\u06CC\u0679 \u0679\u0627\u0626\u0645",date:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u062A\u0627\u0631\u06CC\u062E",time:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0648\u0642\u062A",duration:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0645\u062F\u062A",ipv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0627\u06CC\u0688\u0631\u06CC\u0633",ipv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0627\u06CC\u0688\u0631\u06CC\u0633",cidrv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0631\u06CC\u0646\u062C",cidrv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0631\u06CC\u0646\u062C",base64:"\u0628\u06CC\u0633 64 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",base64url:"\u0628\u06CC\u0633 64 \u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",json_string:"\u062C\u06D2 \u0627\u06CC\u0633 \u0627\u0648 \u0627\u06CC\u0646 \u0633\u0679\u0631\u0646\u06AF",e164:"\u0627\u06CC 164 \u0646\u0645\u0628\u0631",jwt:"\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC",template_literal:"\u0627\u0646 \u067E\u0679"},i={nan:"NaN",number:"\u0646\u0645\u0628\u0631",array:"\u0622\u0631\u06D2",null:"\u0646\u0644"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=re(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: instanceof ${r.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${a} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`:`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${o} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${a} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`}case"invalid_value":return r.values.length===1?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${te(r.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`:`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${R(r.values,"|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;case"too_big":{let o=r.inclusive?"<=":"<",s=t(r.origin);return s?`\u0628\u06C1\u062A \u0628\u0691\u0627: ${r.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${o}${r.maximum.toString()} ${s.unit??"\u0639\u0646\u0627\u0635\u0631"} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0628\u0691\u0627: ${r.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${o}${r.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"too_small":{let o=r.inclusive?">=":">",s=t(r.origin);return s?`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${r.origin} \u06A9\u06D2 ${o}${r.minimum.toString()} ${s.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${r.origin} \u06A9\u0627 ${o}${r.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${o.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:o.format==="ends_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${o.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:o.format==="includes"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${o.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:o.format==="regex"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${o.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:`\u063A\u0644\u0637 ${n[o.format]??r.format}`}case"not_multiple_of":return`\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${r.divisor} \u06A9\u0627 \u0645\u0636\u0627\u0639\u0641 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;case"unrecognized_keys":return`\u063A\u06CC\u0631 \u062A\u0633\u0644\u06CC\u0645 \u0634\u062F\u06C1 \u06A9\u06CC${r.keys.length>1?"\u0632":""}: ${R(r.keys,"\u060C ")}`;case"invalid_key":return`${r.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`;case"invalid_union":return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679";case"invalid_element":return`${r.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`;default:return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679"}}};function KL(){return{localeError:VL()}}var JL=()=>{let e={string:{unit:"belgi",verb:"bo\u2018lishi kerak"},file:{unit:"bayt",verb:"bo\u2018lishi kerak"},array:{unit:"element",verb:"bo\u2018lishi kerak"},set:{unit:"element",verb:"bo\u2018lishi kerak"}};function t(r){return e[r]??null}let n={regex:"kirish",email:"elektron pochta manzili",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO sana va vaqti",date:"ISO sana",time:"ISO vaqt",duration:"ISO davomiylik",ipv4:"IPv4 manzil",ipv6:"IPv6 manzil",mac:"MAC manzil",cidrv4:"IPv4 diapazon",cidrv6:"IPv6 diapazon",base64:"base64 kodlangan satr",base64url:"base64url kodlangan satr",json_string:"JSON satr",e164:"E.164 raqam",jwt:"JWT",template_literal:"kirish"},i={nan:"NaN",number:"raqam",array:"massiv"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=re(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`Noto\u2018g\u2018ri kirish: kutilgan instanceof ${r.expected}, qabul qilingan ${a}`:`Noto\u2018g\u2018ri kirish: kutilgan ${o}, qabul qilingan ${a}`}case"invalid_value":return r.values.length===1?`Noto\u2018g\u2018ri kirish: kutilgan ${te(r.values[0])}`:`Noto\u2018g\u2018ri variant: quyidagilardan biri kutilgan ${R(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=t(r.origin);return s?`Juda katta: kutilgan ${r.origin??"qiymat"} ${o}${r.maximum.toString()} ${s.unit} ${s.verb}`:`Juda katta: kutilgan ${r.origin??"qiymat"} ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=t(r.origin);return s?`Juda kichik: kutilgan ${r.origin} ${o}${r.minimum.toString()} ${s.unit} ${s.verb}`:`Juda kichik: kutilgan ${r.origin} ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Noto\u2018g\u2018ri satr: "${o.prefix}" bilan boshlanishi kerak`:o.format==="ends_with"?`Noto\u2018g\u2018ri satr: "${o.suffix}" bilan tugashi kerak`:o.format==="includes"?`Noto\u2018g\u2018ri satr: "${o.includes}" ni o\u2018z ichiga olishi kerak`:o.format==="regex"?`Noto\u2018g\u2018ri satr: ${o.pattern} shabloniga mos kelishi kerak`:`Noto\u2018g\u2018ri ${n[o.format]??r.format}`}case"not_multiple_of":return`Noto\u2018g\u2018ri raqam: ${r.divisor} ning karralisi bo\u2018lishi kerak`;case"unrecognized_keys":return`Noma\u2019lum kalit${r.keys.length>1?"lar":""}: ${R(r.keys,", ")}`;case"invalid_key":return`${r.origin} dagi kalit noto\u2018g\u2018ri`;case"invalid_union":return"Noto\u2018g\u2018ri kirish";case"invalid_element":return`${r.origin} da noto\u2018g\u2018ri qiymat`;default:return"Noto\u2018g\u2018ri kirish"}}};function GL(){return{localeError:JL()}}var XL=()=>{let e={string:{unit:"k\xFD t\u1EF1",verb:"c\xF3"},file:{unit:"byte",verb:"c\xF3"},array:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"},set:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"}};function t(r){return e[r]??null}let n={regex:"\u0111\u1EA7u v\xE0o",email:"\u0111\u1ECBa ch\u1EC9 email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ng\xE0y gi\u1EDD ISO",date:"ng\xE0y ISO",time:"gi\u1EDD ISO",duration:"kho\u1EA3ng th\u1EDDi gian ISO",ipv4:"\u0111\u1ECBa ch\u1EC9 IPv4",ipv6:"\u0111\u1ECBa ch\u1EC9 IPv6",cidrv4:"d\u1EA3i IPv4",cidrv6:"d\u1EA3i IPv6",base64:"chu\u1ED7i m\xE3 h\xF3a base64",base64url:"chu\u1ED7i m\xE3 h\xF3a base64url",json_string:"chu\u1ED7i JSON",e164:"s\u1ED1 E.164",jwt:"JWT",template_literal:"\u0111\u1EA7u v\xE0o"},i={nan:"NaN",number:"s\u1ED1",array:"m\u1EA3ng"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=re(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i instanceof ${r.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${a}`:`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${o}, nh\u1EADn \u0111\u01B0\u1EE3c ${a}`}case"invalid_value":return r.values.length===1?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${te(r.values[0])}`:`T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${R(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=t(r.origin);return s?`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${r.origin??"gi\xE1 tr\u1ECB"} ${s.verb} ${o}${r.maximum.toString()} ${s.unit??"ph\u1EA7n t\u1EED"}`:`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${r.origin??"gi\xE1 tr\u1ECB"} ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=t(r.origin);return s?`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${r.origin} ${s.verb} ${o}${r.minimum.toString()} ${s.unit}`:`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${r.origin} ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${o.prefix}"`:o.format==="ends_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${o.suffix}"`:o.format==="includes"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${o.includes}"`:o.format==="regex"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${o.pattern}`:`${n[o.format]??r.format} kh\xF4ng h\u1EE3p l\u1EC7`}case"not_multiple_of":return`S\u1ED1 kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i l\xE0 b\u1ED9i s\u1ED1 c\u1EE7a ${r.divisor}`;case"unrecognized_keys":return`Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${R(r.keys,", ")}`;case"invalid_key":return`Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${r.origin}`;case"invalid_union":return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7";case"invalid_element":return`Gi\xE1 tr\u1ECB kh\xF4ng h\u1EE3p l\u1EC7 trong ${r.origin}`;default:return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7"}}};function YL(){return{localeError:XL()}}var QL=()=>{let e={string:{unit:"\u5B57\u7B26",verb:"\u5305\u542B"},file:{unit:"\u5B57\u8282",verb:"\u5305\u542B"},array:{unit:"\u9879",verb:"\u5305\u542B"},set:{unit:"\u9879",verb:"\u5305\u542B"}};function t(r){return e[r]??null}let n={regex:"\u8F93\u5165",email:"\u7535\u5B50\u90AE\u4EF6",url:"URL",emoji:"\u8868\u60C5\u7B26\u53F7",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u671F\u65F6\u95F4",date:"ISO\u65E5\u671F",time:"ISO\u65F6\u95F4",duration:"ISO\u65F6\u957F",ipv4:"IPv4\u5730\u5740",ipv6:"IPv6\u5730\u5740",cidrv4:"IPv4\u7F51\u6BB5",cidrv6:"IPv6\u7F51\u6BB5",base64:"base64\u7F16\u7801\u5B57\u7B26\u4E32",base64url:"base64url\u7F16\u7801\u5B57\u7B26\u4E32",json_string:"JSON\u5B57\u7B26\u4E32",e164:"E.164\u53F7\u7801",jwt:"JWT",template_literal:"\u8F93\u5165"},i={nan:"NaN",number:"\u6570\u5B57",array:"\u6570\u7EC4",null:"\u7A7A\u503C(null)"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=re(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B instanceof ${r.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${a}`:`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${o}\uFF0C\u5B9E\u9645\u63A5\u6536 ${a}`}case"invalid_value":return r.values.length===1?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${te(r.values[0])}`:`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${R(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=t(r.origin);return s?`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${r.origin??"\u503C"} ${o}${r.maximum.toString()} ${s.unit??"\u4E2A\u5143\u7D20"}`:`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${r.origin??"\u503C"} ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=t(r.origin);return s?`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${r.origin} ${o}${r.minimum.toString()} ${s.unit}`:`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${r.origin} ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${o.prefix}" \u5F00\u5934`:o.format==="ends_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${o.suffix}" \u7ED3\u5C3E`:o.format==="includes"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${o.includes}"`:o.format==="regex"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${o.pattern}`:`\u65E0\u6548${n[o.format]??r.format}`}case"not_multiple_of":return`\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${r.divisor} \u7684\u500D\u6570`;case"unrecognized_keys":return`\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${R(r.keys,", ")}`;case"invalid_key":return`${r.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`;case"invalid_union":return"\u65E0\u6548\u8F93\u5165";case"invalid_element":return`${r.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`;default:return"\u65E0\u6548\u8F93\u5165"}}};function e8(){return{localeError:QL()}}var t8=()=>{let e={string:{unit:"\u5B57\u5143",verb:"\u64C1\u6709"},file:{unit:"\u4F4D\u5143\u7D44",verb:"\u64C1\u6709"},array:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"},set:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"}};function t(r){return e[r]??null}let n={regex:"\u8F38\u5165",email:"\u90F5\u4EF6\u5730\u5740",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u65E5\u671F\u6642\u9593",date:"ISO \u65E5\u671F",time:"ISO \u6642\u9593",duration:"ISO \u671F\u9593",ipv4:"IPv4 \u4F4D\u5740",ipv6:"IPv6 \u4F4D\u5740",cidrv4:"IPv4 \u7BC4\u570D",cidrv6:"IPv6 \u7BC4\u570D",base64:"base64 \u7DE8\u78BC\u5B57\u4E32",base64url:"base64url \u7DE8\u78BC\u5B57\u4E32",json_string:"JSON \u5B57\u4E32",e164:"E.164 \u6578\u503C",jwt:"JWT",template_literal:"\u8F38\u5165"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=re(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA instanceof ${r.expected}\uFF0C\u4F46\u6536\u5230 ${a}`:`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${o}\uFF0C\u4F46\u6536\u5230 ${a}`}case"invalid_value":return r.values.length===1?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${te(r.values[0])}`:`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${R(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=t(r.origin);return s?`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${r.origin??"\u503C"} \u61C9\u70BA ${o}${r.maximum.toString()} ${s.unit??"\u500B\u5143\u7D20"}`:`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${r.origin??"\u503C"} \u61C9\u70BA ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",s=t(r.origin);return s?`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${r.origin} \u61C9\u70BA ${o}${r.minimum.toString()} ${s.unit}`:`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${r.origin} \u61C9\u70BA ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${o.prefix}" \u958B\u982D`:o.format==="ends_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${o.suffix}" \u7D50\u5C3E`:o.format==="includes"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${o.includes}"`:o.format==="regex"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${o.pattern}`:`\u7121\u6548\u7684 ${n[o.format]??r.format}`}case"not_multiple_of":return`\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${r.divisor} \u7684\u500D\u6578`;case"unrecognized_keys":return`\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${r.keys.length>1?"\u5011":""}\uFF1A${R(r.keys,"\u3001")}`;case"invalid_key":return`${r.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`;case"invalid_union":return"\u7121\u6548\u7684\u8F38\u5165\u503C";case"invalid_element":return`${r.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`;default:return"\u7121\u6548\u7684\u8F38\u5165\u503C"}}};function n8(){return{localeError:t8()}}var r8=()=>{let e={string:{unit:"\xE0mi",verb:"n\xED"},file:{unit:"bytes",verb:"n\xED"},array:{unit:"nkan",verb:"n\xED"},set:{unit:"nkan",verb:"n\xED"}};function t(r){return e[r]??null}let n={regex:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9",email:"\xE0d\xEDr\u1EB9\u0301s\xEC \xECm\u1EB9\u0301l\xEC",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\xE0k\xF3k\xF2 ISO",date:"\u1ECDj\u1ECD\u0301 ISO",time:"\xE0k\xF3k\xF2 ISO",duration:"\xE0k\xF3k\xF2 t\xF3 p\xE9 ISO",ipv4:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv4",ipv6:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv6",cidrv4:"\xE0gb\xE8gb\xE8 IPv4",cidrv6:"\xE0gb\xE8gb\xE8 IPv6",base64:"\u1ECD\u0300r\u1ECD\u0300 t\xED a k\u1ECD\u0301 n\xED base64",base64url:"\u1ECD\u0300r\u1ECD\u0300 base64url",json_string:"\u1ECD\u0300r\u1ECD\u0300 JSON",e164:"n\u1ECD\u0301mb\xE0 E.164",jwt:"JWT",template_literal:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9"},i={nan:"NaN",number:"n\u1ECD\u0301mb\xE0",array:"akop\u1ECD"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,s=re(r.input),a=i[s]??s;return/^[A-Z]/.test(r.expected)?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi instanceof ${r.expected}, \xE0m\u1ECD\u0300 a r\xED ${a}`:`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${o}, \xE0m\u1ECD\u0300 a r\xED ${a}`}case"invalid_value":return r.values.length===1?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${te(r.values[0])}`:`\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${R(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",s=t(r.origin);return s?`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${r.origin??"iye"} ${s.verb} ${o}${r.maximum} ${s.unit}`:`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 ${o}${r.maximum}`}case"too_small":{let o=r.inclusive?">=":">",s=t(r.origin);return s?`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${r.origin} ${s.verb} ${o}${r.minimum} ${s.unit}`:`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 ${o}${r.minimum}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\u1EB9\u0300r\u1EB9\u0300 p\u1EB9\u0300l\xFA "${o.prefix}"`:o.format==="ends_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 par\xED p\u1EB9\u0300l\xFA "${o.suffix}"`:o.format==="includes"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 n\xED "${o.includes}"`:o.format==="regex"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\xE1 \xE0p\u1EB9\u1EB9r\u1EB9 mu ${o.pattern}`:`A\u1E63\xEC\u1E63e: ${n[o.format]??r.format}`}case"not_multiple_of":return`N\u1ECD\u0301mb\xE0 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 j\u1EB9\u0301 \xE8y\xE0 p\xEDp\xEDn ti ${r.divisor}`;case"unrecognized_keys":return`B\u1ECDt\xECn\xEC \xE0\xECm\u1ECD\u0300: ${R(r.keys,", ")}`;case"invalid_key":return`B\u1ECDt\xECn\xEC a\u1E63\xEC\u1E63e n\xEDn\xFA ${r.origin}`;case"invalid_union":return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e";case"invalid_element":return`Iye a\u1E63\xEC\u1E63e n\xEDn\xFA ${r.origin}`;default:return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e"}}};function i8(){return{localeError:r8()}}var Jx,IS=Symbol("ZodOutput"),AS=Symbol("ZodInput"),lu=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){let i=n[0];return this._map.set(t,i),i&&typeof i=="object"&&"id"in i&&this._idmap.set(i.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){let n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){let n=t._zod.parent;if(n){let i={...this.get(n)??{}};delete i.id;let r={...i,...this._map.get(t)};return Object.keys(r).length?r:void 0}return this._map.get(t)}has(t){return this._map.has(t)}};function bh(){return new lu}(Jx=globalThis).__zod_globalRegistry??(Jx.__zod_globalRegistry=bh());var ln=globalThis.__zod_globalRegistry;function MS(e,t){return new e({type:"string",...F(t)})}function zS(e,t){return new e({type:"string",coerce:!0,...F(t)})}function vh(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...F(t)})}function uu(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...F(t)})}function yh(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...F(t)})}function kh(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...F(t)})}function xh(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...F(t)})}function _h(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...F(t)})}function vu(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...F(t)})}function wh(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...F(t)})}function Sh(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...F(t)})}function Eh(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...F(t)})}function $h(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...F(t)})}function Ch(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...F(t)})}function Th(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...F(t)})}function Ih(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...F(t)})}function Ah(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...F(t)})}function Mh(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...F(t)})}function DS(e,t){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...F(t)})}function zh(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...F(t)})}function Dh(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...F(t)})}function Nh(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...F(t)})}function Oh(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...F(t)})}function Rh(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...F(t)})}function Ph(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...F(t)})}var NS={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function OS(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...F(t)})}function RS(e,t){return new e({type:"string",format:"date",check:"string_format",...F(t)})}function PS(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...F(t)})}function LS(e,t){return new e({type:"string",format:"duration",check:"string_format",...F(t)})}function FS(e,t){return new e({type:"number",checks:[],...F(t)})}function BS(e,t){return new e({type:"number",coerce:!0,checks:[],...F(t)})}function US(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...F(t)})}function jS(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...F(t)})}function ZS(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...F(t)})}function HS(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...F(t)})}function qS(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...F(t)})}function WS(e,t){return new e({type:"boolean",...F(t)})}function VS(e,t){return new e({type:"boolean",coerce:!0,...F(t)})}function KS(e,t){return new e({type:"bigint",...F(t)})}function JS(e,t){return new e({type:"bigint",coerce:!0,...F(t)})}function GS(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...F(t)})}function XS(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...F(t)})}function YS(e,t){return new e({type:"symbol",...F(t)})}function QS(e,t){return new e({type:"undefined",...F(t)})}function eE(e,t){return new e({type:"null",...F(t)})}function tE(e){return new e({type:"any"})}function nE(e){return new e({type:"unknown"})}function rE(e,t){return new e({type:"never",...F(t)})}function iE(e,t){return new e({type:"void",...F(t)})}function oE(e,t){return new e({type:"date",...F(t)})}function sE(e,t){return new e({type:"date",coerce:!0,...F(t)})}function aE(e,t){return new e({type:"nan",...F(t)})}function $r(e,t){return new ah({check:"less_than",...F(t),value:e,inclusive:!1})}function un(e,t){return new ah({check:"less_than",...F(t),value:e,inclusive:!0})}function Cr(e,t){return new lh({check:"greater_than",...F(t),value:e,inclusive:!1})}function Wt(e,t){return new lh({check:"greater_than",...F(t),value:e,inclusive:!0})}function Lh(e){return Cr(0,e)}function Fh(e){return $r(0,e)}function Bh(e){return un(0,e)}function Uh(e){return Wt(0,e)}function so(e,t){return new K_({check:"multiple_of",...F(t),value:e})}function fo(e,t){return new X_({check:"max_size",...F(t),maximum:e})}function Tr(e,t){return new Y_({check:"min_size",...F(t),minimum:e})}function Ks(e,t){return new Q_({check:"size_equals",...F(t),size:e})}function Js(e,t){return new ew({check:"max_length",...F(t),maximum:e})}function ri(e,t){return new tw({check:"min_length",...F(t),minimum:e})}function Gs(e,t){return new nw({check:"length_equals",...F(t),length:e})}function yu(e,t){return new rw({check:"string_format",format:"regex",...F(t),pattern:e})}function ku(e){return new iw({check:"string_format",format:"lowercase",...F(e)})}function xu(e){return new ow({check:"string_format",format:"uppercase",...F(e)})}function _u(e,t){return new sw({check:"string_format",format:"includes",...F(t),includes:e})}function wu(e,t){return new aw({check:"string_format",format:"starts_with",...F(t),prefix:e})}function Su(e,t){return new lw({check:"string_format",format:"ends_with",...F(t),suffix:e})}function jh(e,t,n){return new uw({check:"property",property:e,schema:t,...F(n)})}function Eu(e,t){return new cw({check:"mime_type",mime:e,...F(t)})}function nr(e){return new dw({check:"overwrite",tx:e})}function $u(e){return nr(t=>t.normalize(e))}function Cu(){return nr(e=>e.trim())}function Tu(){return nr(e=>e.toLowerCase())}function Iu(){return nr(e=>e.toUpperCase())}function Au(){return nr(e=>t_(e))}function lE(e,t,n){return new e({type:"array",element:t,...F(n)})}function o8(e,t,n){return new e({type:"union",options:t,...F(n)})}function s8(e,t,n){return new e({type:"union",options:t,inclusive:!1,...F(n)})}function a8(e,t,n,i){return new e({type:"union",options:n,discriminator:t,...F(i)})}function l8(e,t,n){return new e({type:"intersection",left:t,right:n})}function u8(e,t,n,i){let r=n instanceof le;return new e({type:"tuple",items:t,rest:r?n:null,...F(r?i:n)})}function c8(e,t,n,i){return new e({type:"record",keyType:t,valueType:n,...F(i)})}function d8(e,t,n,i){return new e({type:"map",keyType:t,valueType:n,...F(i)})}function f8(e,t,n){return new e({type:"set",valueType:t,...F(n)})}function p8(e,t,n){let i=Array.isArray(t)?Object.fromEntries(t.map(r=>[r,r])):t;return new e({type:"enum",entries:i,...F(n)})}function h8(e,t,n){return new e({type:"enum",entries:t,...F(n)})}function m8(e,t,n){return new e({type:"literal",values:Array.isArray(t)?t:[t],...F(n)})}function uE(e,t){return new e({type:"file",...F(t)})}function g8(e,t){return new e({type:"transform",transform:t})}function b8(e,t){return new e({type:"optional",innerType:t})}function v8(e,t){return new e({type:"nullable",innerType:t})}function y8(e,t,n){return new e({type:"default",innerType:t,get defaultValue(){return typeof n=="function"?n():r_(n)}})}function k8(e,t,n){return new e({type:"nonoptional",innerType:t,...F(n)})}function x8(e,t){return new e({type:"success",innerType:t})}function _8(e,t,n){return new e({type:"catch",innerType:t,catchValue:typeof n=="function"?n:()=>n})}function w8(e,t,n){return new e({type:"pipe",in:t,out:n})}function S8(e,t){return new e({type:"readonly",innerType:t})}function E8(e,t,n){return new e({type:"template_literal",parts:t,...F(n)})}function $8(e,t){return new e({type:"lazy",getter:t})}function C8(e,t){return new e({type:"promise",innerType:t})}function cE(e,t,n){let i=F(n);return i.abort??(i.abort=!0),new e({type:"custom",check:"custom",fn:t,...i})}function dE(e,t,n){return new e({type:"custom",check:"custom",fn:t,...F(n)})}function fE(e){let t=pE(n=>(n.addIssue=i=>{if(typeof i=="string")n.issues.push(ou(i,n.value,t._zod.def));else{let r=i;r.fatal&&(r.continue=!1),r.code??(r.code="custom"),r.input??(r.input=n.value),r.inst??(r.inst=t),r.continue??(r.continue=!t._zod.def.abort),n.issues.push(ou(r))}},e(n.value,n)));return t}function pE(e,t){let n=new Je({check:"custom",...F(t)});return n._zod.check=e,n}function hE(e){let t=new Je({check:"describe"});return t._zod.onattach=[n=>{let i=ln.get(n)??{};ln.add(n,{...i,description:e})}],t._zod.check=()=>{},t}function mE(e){let t=new Je({check:"meta"});return t._zod.onattach=[n=>{let i=ln.get(n)??{};ln.add(n,{...i,...e})}],t._zod.check=()=>{},t}function gE(e,t){let n=F(t),i=n.truthy??["true","1","yes","on","y","enabled"],r=n.falsy??["false","0","no","off","n","disabled"];n.case!=="sensitive"&&(i=i.map(f=>typeof f=="string"?f.toLowerCase():f),r=r.map(f=>typeof f=="string"?f.toLowerCase():f));let o=new Set(i),s=new Set(r),a=e.Codec??mh,l=e.Boolean??dh,u=new(e.String??Vs)({type:"string",error:n.error}),c=new l({type:"boolean",error:n.error}),d=new a({type:"pipe",in:u,out:c,transform:(f,p)=>{let h=f;return n.case!=="sensitive"&&(h=h.toLowerCase()),o.has(h)?!0:s.has(h)?!1:(p.issues.push({code:"invalid_value",expected:"stringbool",values:[...o,...s],input:p.value,inst:d,continue:!1}),{})},reverseTransform:(f,p)=>f===!0?i[0]||"true":r[0]||"false",error:n.error});return d}function Xs(e,t,n,i={}){let r=F(i),o={...F(i),check:"string_format",type:"string",format:t,fn:typeof n=="function"?n:s=>n.test(s),...r};return n instanceof RegExp&&(o.pattern=n),new e(o)}function ao(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??ln,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function Ne(e,t,n={path:[],schemaPath:[]}){var i;let r=e._zod.def,o=t.seen.get(e);if(o)return o.count++,n.schemaPath.includes(e)&&(o.cycle=n.path),o.schema;let s={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,s);let a=e._zod.toJSONSchema?.();if(a)s.schema=a;else{let u={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,s.schema,u);else{let d=s.schema,f=t.processors[r.type];if(!f)throw Error(`[toJSONSchema]: Non-representable type encountered: ${r.type}`);f(e,t,d,u)}let c=e._zod.parent;c&&(s.ref||(s.ref=c),Ne(c,t,u),t.seen.get(c).isParent=!0)}let l=t.metadataRegistry.get(e);return l&&Object.assign(s.schema,l),t.io==="input"&&Bt(e)&&(delete s.schema.examples,delete s.schema.default),t.io==="input"&&s.schema._prefault&&((i=s.schema).default??(i.default=s.schema._prefault)),delete s.schema._prefault,t.seen.get(e).schema}function lo(e,t){let n=e.seen.get(t);if(!n)throw Error("Unprocessed schema. This is a bug in Zod.");let i=new Map;for(let s of e.seen.entries()){let a=e.metadataRegistry.get(s[0])?.id;if(a){let l=i.get(a);if(l&&l!==s[0])throw Error(`Duplicate schema id "${a}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);i.set(a,s[0])}}let r=s=>{let a=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){let c=e.external.registry.get(s[0])?.id,d=e.external.uri??(p=>p);if(c)return{ref:d(c)};let f=s[1].defId??s[1].schema.id??`schema${e.counter++}`;return s[1].defId=f,{defId:f,ref:`${d("__shared")}#/${a}/${f}`}}if(s[1]===n)return{ref:"#"};let l=`#/${a}/`,u=s[1].schema.id??`__schema${e.counter++}`;return{defId:u,ref:l+u}},o=s=>{if(s[1].schema.$ref)return;let a=s[1],{ref:l,defId:u}=r(s);a.def={...a.schema},u&&(a.defId=u);let c=a.schema;for(let d in c)delete c[d];c.$ref=l};if(e.cycles==="throw")for(let s of e.seen.entries()){let a=s[1];if(a.cycle)throw Error(`Cycle detected: #/${a.cycle?.join("/")}/<root>
66
+
67
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let s of e.seen.entries()){let a=s[1];if(t===s[0]){o(s);continue}if(e.external){let l=e.external.registry.get(s[0])?.id;if(t!==s[0]&&l){o(s);continue}}if(e.metadataRegistry.get(s[0])?.id){o(s);continue}if(a.cycle){o(s);continue}if(a.count>1&&e.reused==="ref"){o(s);continue}}}function uo(e,t){let n=e.seen.get(t);if(!n)throw Error("Unprocessed schema. This is a bug in Zod.");let i=s=>{let a=e.seen.get(s);if(a.ref===null)return;let l=a.def??a.schema,u={...l},c=a.ref;if(a.ref=null,c){i(c);let f=e.seen.get(c),p=f.schema;if(p.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(l.allOf=l.allOf??[],l.allOf.push(p)):Object.assign(l,p),Object.assign(l,u),s._zod.parent===c)for(let h in l)h==="$ref"||h==="allOf"||h in u||delete l[h];if(p.$ref)for(let h in l)h==="$ref"||h==="allOf"||h in f.def&&JSON.stringify(l[h])===JSON.stringify(f.def[h])&&delete l[h]}let d=s._zod.parent;if(d&&d!==c){i(d);let f=e.seen.get(d);if(f?.schema.$ref&&(l.$ref=f.schema.$ref,f.def))for(let p in l)p==="$ref"||p==="allOf"||p in f.def&&JSON.stringify(l[p])===JSON.stringify(f.def[p])&&delete l[p]}e.override({zodSchema:s,jsonSchema:l,path:a.path??[]})};for(let s of[...e.seen.entries()].reverse())i(s[0]);let r={};if(e.target==="draft-2020-12"?r.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?r.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?r.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){let s=e.external.registry.get(t)?.id;if(!s)throw Error("Schema is missing an `id` property");r.$id=e.external.uri(s)}Object.assign(r,n.def??n.schema);let o=e.external?.defs??{};for(let s of e.seen.entries()){let a=s[1];a.def&&a.defId&&(o[a.defId]=a.def)}e.external||Object.keys(o).length>0&&(e.target==="draft-2020-12"?r.$defs=o:r.definitions=o);try{let s=JSON.parse(JSON.stringify(r));return Object.defineProperty(s,"~standard",{value:{...t["~standard"],jsonSchema:{input:Ds(t,"input",e.processors),output:Ds(t,"output",e.processors)}},enumerable:!1,writable:!1}),s}catch{throw Error("Error converting schema to JSON.")}}function Bt(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let i=e._zod.def;if(i.type==="transform")return!0;if(i.type==="array")return Bt(i.element,n);if(i.type==="set")return Bt(i.valueType,n);if(i.type==="lazy")return Bt(i.getter(),n);if(i.type==="promise"||i.type==="optional"||i.type==="nonoptional"||i.type==="nullable"||i.type==="readonly"||i.type==="default"||i.type==="prefault")return Bt(i.innerType,n);if(i.type==="intersection")return Bt(i.left,n)||Bt(i.right,n);if(i.type==="record"||i.type==="map")return Bt(i.keyType,n)||Bt(i.valueType,n);if(i.type==="pipe")return Bt(i.in,n)||Bt(i.out,n);if(i.type==="object"){for(let r in i.shape)if(Bt(i.shape[r],n))return!0;return!1}if(i.type==="union"){for(let r of i.options)if(Bt(r,n))return!0;return!1}if(i.type==="tuple"){for(let r of i.items)if(Bt(r,n))return!0;return!!(i.rest&&Bt(i.rest,n))}return!1}var bE=(e,t={})=>n=>{let i=ao({...n,processors:t});return Ne(e,i),lo(i,e),uo(i,e)},Ds=(e,t,n={})=>i=>{let{libraryOptions:r,target:o}=i??{},s=ao({...r??{},target:o,io:t,processors:n});return Ne(e,s),lo(s,e),uo(s,e)},T8={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},vE=(e,t,n,i)=>{let r=n;r.type="string";let{minimum:o,maximum:s,format:a,patterns:l,contentEncoding:u}=e._zod.bag;if(typeof o=="number"&&(r.minLength=o),typeof s=="number"&&(r.maxLength=s),a&&(r.format=T8[a]??a,r.format===""&&delete r.format,a==="time"&&delete r.format),u&&(r.contentEncoding=u),l&&l.size>0){let c=[...l];c.length===1?r.pattern=c[0].source:c.length>1&&(r.allOf=[...c.map(d=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:d.source}))])}},yE=(e,t,n,i)=>{let r=n,{minimum:o,maximum:s,format:a,multipleOf:l,exclusiveMaximum:u,exclusiveMinimum:c}=e._zod.bag;typeof a=="string"&&a.includes("int")?r.type="integer":r.type="number",typeof c=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(r.minimum=c,r.exclusiveMinimum=!0):r.exclusiveMinimum=c),typeof o=="number"&&(r.minimum=o,typeof c=="number"&&t.target!=="draft-04"&&(c>=o?delete r.minimum:delete r.exclusiveMinimum)),typeof u=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(r.maximum=u,r.exclusiveMaximum=!0):r.exclusiveMaximum=u),typeof s=="number"&&(r.maximum=s,typeof u=="number"&&t.target!=="draft-04"&&(u<=s?delete r.maximum:delete r.exclusiveMaximum)),typeof l=="number"&&(r.multipleOf=l)},kE=(e,t,n,i)=>{n.type="boolean"},xE=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw Error("BigInt cannot be represented in JSON Schema")},_E=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw Error("Symbols cannot be represented in JSON Schema")},wE=(e,t,n,i)=>{t.target==="openapi-3.0"?(n.type="string",n.nullable=!0,n.enum=[null]):n.type="null"},SE=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw Error("Undefined cannot be represented in JSON Schema")},EE=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw Error("Void cannot be represented in JSON Schema")},$E=(e,t,n,i)=>{n.not={}},CE=(e,t,n,i)=>{},TE=(e,t,n,i)=>{},IE=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw Error("Date cannot be represented in JSON Schema")},AE=(e,t,n,i)=>{let r=e._zod.def,o=Wp(r.entries);o.every(s=>typeof s=="number")&&(n.type="number"),o.every(s=>typeof s=="string")&&(n.type="string"),n.enum=o},ME=(e,t,n,i)=>{let r=e._zod.def,o=[];for(let s of r.values)if(s===void 0){if(t.unrepresentable==="throw")throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof s=="bigint"){if(t.unrepresentable==="throw")throw Error("BigInt literals cannot be represented in JSON Schema");o.push(Number(s))}else o.push(s);if(o.length!==0)if(o.length===1){let s=o[0];n.type=s===null?"null":typeof s,t.target==="draft-04"||t.target==="openapi-3.0"?n.enum=[s]:n.const=s}else o.every(s=>typeof s=="number")&&(n.type="number"),o.every(s=>typeof s=="string")&&(n.type="string"),o.every(s=>typeof s=="boolean")&&(n.type="boolean"),o.every(s=>s===null)&&(n.type="null"),n.enum=o},zE=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw Error("NaN cannot be represented in JSON Schema")},DE=(e,t,n,i)=>{let r=n,o=e._zod.pattern;if(!o)throw Error("Pattern not found in template literal");r.type="string",r.pattern=o.source},NE=(e,t,n,i)=>{let r=n,o={type:"string",format:"binary",contentEncoding:"binary"},{minimum:s,maximum:a,mime:l}=e._zod.bag;s!==void 0&&(o.minLength=s),a!==void 0&&(o.maxLength=a),l?l.length===1?(o.contentMediaType=l[0],Object.assign(r,o)):(Object.assign(r,o),r.anyOf=l.map(u=>({contentMediaType:u}))):Object.assign(r,o)},OE=(e,t,n,i)=>{n.type="boolean"},RE=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw Error("Custom types cannot be represented in JSON Schema")},PE=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw Error("Function types cannot be represented in JSON Schema")},LE=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw Error("Transforms cannot be represented in JSON Schema")},FE=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw Error("Map cannot be represented in JSON Schema")},BE=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw Error("Set cannot be represented in JSON Schema")},UE=(e,t,n,i)=>{let r=n,o=e._zod.def,{minimum:s,maximum:a}=e._zod.bag;typeof s=="number"&&(r.minItems=s),typeof a=="number"&&(r.maxItems=a),r.type="array",r.items=Ne(o.element,t,{...i,path:[...i.path,"items"]})},jE=(e,t,n,i)=>{let r=n,o=e._zod.def;r.type="object",r.properties={};let s=o.shape;for(let u in s)r.properties[u]=Ne(s[u],t,{...i,path:[...i.path,"properties",u]});let a=new Set(Object.keys(s)),l=new Set([...a].filter(u=>{let c=o.shape[u]._zod;return t.io==="input"?c.optin===void 0:c.optout===void 0}));l.size>0&&(r.required=Array.from(l)),o.catchall?._zod.def.type==="never"?r.additionalProperties=!1:o.catchall?o.catchall&&(r.additionalProperties=Ne(o.catchall,t,{...i,path:[...i.path,"additionalProperties"]})):t.io==="output"&&(r.additionalProperties=!1)},Zh=(e,t,n,i)=>{let r=e._zod.def,o=r.inclusive===!1,s=r.options.map((a,l)=>Ne(a,t,{...i,path:[...i.path,o?"oneOf":"anyOf",l]}));o?n.oneOf=s:n.anyOf=s},ZE=(e,t,n,i)=>{let r=e._zod.def,o=Ne(r.left,t,{...i,path:[...i.path,"allOf",0]}),s=Ne(r.right,t,{...i,path:[...i.path,"allOf",1]}),a=u=>"allOf"in u&&Object.keys(u).length===1,l=[...a(o)?o.allOf:[o],...a(s)?s.allOf:[s]];n.allOf=l},HE=(e,t,n,i)=>{let r=n,o=e._zod.def;r.type="array";let s=t.target==="draft-2020-12"?"prefixItems":"items",a=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",l=o.items.map((f,p)=>Ne(f,t,{...i,path:[...i.path,s,p]})),u=o.rest?Ne(o.rest,t,{...i,path:[...i.path,a,...t.target==="openapi-3.0"?[o.items.length]:[]]}):null;t.target==="draft-2020-12"?(r.prefixItems=l,u&&(r.items=u)):t.target==="openapi-3.0"?(r.items={anyOf:l},u&&r.items.anyOf.push(u),r.minItems=l.length,!u&&(r.maxItems=l.length)):(r.items=l,u&&(r.additionalItems=u));let{minimum:c,maximum:d}=e._zod.bag;typeof c=="number"&&(r.minItems=c),typeof d=="number"&&(r.maxItems=d)},qE=(e,t,n,i)=>{let r=n,o=e._zod.def;r.type="object";let s=o.keyType,a=s._zod.bag?.patterns;if(o.mode==="loose"&&a&&a.size>0){let u=Ne(o.valueType,t,{...i,path:[...i.path,"patternProperties","*"]});r.patternProperties={};for(let c of a)r.patternProperties[c.source]=u}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(r.propertyNames=Ne(o.keyType,t,{...i,path:[...i.path,"propertyNames"]})),r.additionalProperties=Ne(o.valueType,t,{...i,path:[...i.path,"additionalProperties"]});let l=s._zod.values;if(l){let u=[...l].filter(c=>typeof c=="string"||typeof c=="number");u.length>0&&(r.required=u)}},WE=(e,t,n,i)=>{let r=e._zod.def,o=Ne(r.innerType,t,i),s=t.seen.get(e);t.target==="openapi-3.0"?(s.ref=r.innerType,n.nullable=!0):n.anyOf=[o,{type:"null"}]},VE=(e,t,n,i)=>{let r=e._zod.def;Ne(r.innerType,t,i);let o=t.seen.get(e);o.ref=r.innerType},KE=(e,t,n,i)=>{let r=e._zod.def;Ne(r.innerType,t,i);let o=t.seen.get(e);o.ref=r.innerType,n.default=JSON.parse(JSON.stringify(r.defaultValue))},JE=(e,t,n,i)=>{let r=e._zod.def;Ne(r.innerType,t,i);let o=t.seen.get(e);o.ref=r.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(r.defaultValue)))},GE=(e,t,n,i)=>{let r=e._zod.def;Ne(r.innerType,t,i);let o=t.seen.get(e);o.ref=r.innerType;let s;try{s=r.catchValue(void 0)}catch{throw Error("Dynamic catch values are not supported in JSON Schema")}n.default=s},XE=(e,t,n,i)=>{let r=e._zod.def,o=t.io==="input"?r.in._zod.def.type==="transform"?r.out:r.in:r.out;Ne(o,t,i);let s=t.seen.get(e);s.ref=o},YE=(e,t,n,i)=>{let r=e._zod.def;Ne(r.innerType,t,i);let o=t.seen.get(e);o.ref=r.innerType,n.readOnly=!0},QE=(e,t,n,i)=>{let r=e._zod.def;Ne(r.innerType,t,i);let o=t.seen.get(e);o.ref=r.innerType},Hh=(e,t,n,i)=>{let r=e._zod.def;Ne(r.innerType,t,i);let o=t.seen.get(e);o.ref=r.innerType},e2=(e,t,n,i)=>{let r=e._zod.innerType;Ne(r,t,i);let o=t.seen.get(e);o.ref=r},Zp={string:vE,number:yE,boolean:kE,bigint:xE,symbol:_E,null:wE,undefined:SE,void:EE,never:$E,any:CE,unknown:TE,date:IE,enum:AE,literal:ME,nan:zE,template_literal:DE,file:NE,success:OE,custom:RE,function:PE,transform:LE,map:FE,set:BE,array:UE,object:jE,union:Zh,intersection:ZE,tuple:HE,record:qE,nullable:WE,nonoptional:VE,default:KE,prefault:JE,catch:GE,pipe:XE,readonly:YE,promise:QE,optional:Hh,lazy:e2};function t2(e,t){if("_idmap"in e){let i=e,r=ao({...t,processors:Zp}),o={};for(let l of i._idmap.entries()){let[u,c]=l;Ne(c,r)}let s={},a={registry:i,uri:t?.uri,defs:o};r.external=a;for(let l of i._idmap.entries()){let[u,c]=l;lo(r,c),s[u]=uo(r,c)}if(Object.keys(o).length>0){let l=r.target==="draft-2020-12"?"$defs":"definitions";s.__shared={[l]:o}}return{schemas:s}}let n=ao({...t,processors:Zp});return Ne(e,n),lo(n,e),uo(n,e)}var Hp=class{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(t){this.ctx.counter=t}get seen(){return this.ctx.seen}constructor(t){let n=t?.target??"draft-2020-12";n==="draft-4"&&(n="draft-04"),n==="draft-7"&&(n="draft-07"),this.ctx=ao({processors:Zp,target:n,...t?.metadata&&{metadata:t.metadata},...t?.unrepresentable&&{unrepresentable:t.unrepresentable},...t?.override&&{override:t.override},...t?.io&&{io:t.io}})}process(t,n={path:[],schemaPath:[]}){return Ne(t,this.ctx,n)}emit(t,n){n&&(n.cycles&&(this.ctx.cycles=n.cycles),n.reused&&(this.ctx.reused=n.reused),n.external&&(this.ctx.external=n.external)),lo(this.ctx,t);let i=uo(this.ctx,t),{"~standard":r,...o}=i;return o}},I8={},n2={};er(n2,{xor:()=>d$,xid:()=>N2,void:()=>o$,uuidv7:()=>$2,uuidv6:()=>E2,uuidv4:()=>S2,uuid:()=>w2,url:()=>C2,unknown:()=>ii,union:()=>Xu,undefined:()=>r$,ulid:()=>D2,uint64:()=>t$,uint32:()=>Y2,tuple:()=>pm,transform:()=>Qu,templateLiteral:()=>S$,symbol:()=>n$,superRefine:()=>Bm,success:()=>x$,stringbool:()=>M$,stringFormat:()=>q2,string:()=>cu,strictObject:()=>u$,set:()=>g$,refine:()=>Fm,record:()=>hm,readonly:()=>Dm,promise:()=>E$,preprocess:()=>D$,prefault:()=>$m,pipe:()=>Ps,partialRecord:()=>p$,optional:()=>Os,object:()=>l$,number:()=>Xh,nullish:()=>k$,nullable:()=>Rs,null:()=>nm,nonoptional:()=>Cm,never:()=>Ju,nativeEnum:()=>b$,nanoid:()=>A2,nan:()=>_$,meta:()=>I$,map:()=>m$,mac:()=>P2,looseRecord:()=>h$,looseObject:()=>c$,literal:()=>v$,lazy:()=>Rm,ksuid:()=>O2,keyof:()=>a$,jwt:()=>H2,json:()=>z$,ipv6:()=>L2,ipv4:()=>R2,intersection:()=>dm,int64:()=>e$,int32:()=>X2,int:()=>du,instanceof:()=>A$,httpUrl:()=>T2,hostname:()=>W2,hex:()=>V2,hash:()=>K2,guid:()=>_2,function:()=>fu,float64:()=>G2,float32:()=>J2,file:()=>y$,exactOptional:()=>xm,enum:()=>Yu,emoji:()=>I2,email:()=>x2,e164:()=>Z2,discriminatedUnion:()=>f$,describe:()=>T$,date:()=>s$,custom:()=>C$,cuid2:()=>z2,cuid:()=>M2,codec:()=>w$,cidrv6:()=>B2,cidrv4:()=>F2,check:()=>$$,catch:()=>Am,boolean:()=>Yh,bigint:()=>Q2,base64url:()=>j2,base64:()=>U2,array:()=>ra,any:()=>i$,_function:()=>fu,_default:()=>Sm,_ZodString:()=>Mu,ZodXor:()=>lm,ZodXID:()=>Lu,ZodVoid:()=>sm,ZodUnknown:()=>im,ZodUnion:()=>oa,ZodUndefined:()=>em,ZodUUID:()=>Ln,ZodURL:()=>Qs,ZodULID:()=>Pu,ZodType:()=>ce,ZodTuple:()=>fm,ZodTransform:()=>ym,ZodTemplateLiteral:()=>Nm,ZodSymbol:()=>Qh,ZodSuccess:()=>Tm,ZodStringFormat:()=>Pe,ZodString:()=>Ys,ZodSet:()=>gm,ZodRecord:()=>sa,ZodReadonly:()=>zm,ZodPromise:()=>Pm,ZodPrefault:()=>Em,ZodPipe:()=>nc,ZodOptional:()=>ec,ZodObject:()=>ia,ZodNumberFormat:()=>ai,ZodNumber:()=>ea,ZodNullable:()=>_m,ZodNull:()=>tm,ZodNonOptional:()=>tc,ZodNever:()=>om,ZodNanoID:()=>Nu,ZodNaN:()=>Mm,ZodMap:()=>mm,ZodMAC:()=>Gh,ZodLiteral:()=>bm,ZodLazy:()=>Om,ZodKSUID:()=>Fu,ZodJWT:()=>Vu,ZodIntersection:()=>cm,ZodIPv6:()=>Uu,ZodIPv4:()=>Bu,ZodGUID:()=>Ns,ZodFunction:()=>Lm,ZodFile:()=>vm,ZodExactOptional:()=>km,ZodEnum:()=>co,ZodEmoji:()=>Du,ZodEmail:()=>zu,ZodE164:()=>Wu,ZodDiscriminatedUnion:()=>um,ZodDefault:()=>wm,ZodDate:()=>Gu,ZodCustomStringFormat:()=>po,ZodCustom:()=>aa,ZodCodec:()=>rc,ZodCatch:()=>Im,ZodCUID2:()=>Ru,ZodCUID:()=>Ou,ZodCIDRv6:()=>Zu,ZodCIDRv4:()=>ju,ZodBoolean:()=>ta,ZodBigIntFormat:()=>Ku,ZodBigInt:()=>na,ZodBase64URL:()=>qu,ZodBase64:()=>Hu,ZodArray:()=>am,ZodAny:()=>rm});var r2={};er(r2,{uppercase:()=>xu,trim:()=>Cu,toUpperCase:()=>Iu,toLowerCase:()=>Tu,startsWith:()=>wu,slugify:()=>Au,size:()=>Ks,regex:()=>yu,property:()=>jh,positive:()=>Lh,overwrite:()=>nr,normalize:()=>$u,nonpositive:()=>Bh,nonnegative:()=>Uh,negative:()=>Fh,multipleOf:()=>so,minSize:()=>Tr,minLength:()=>ri,mime:()=>Eu,maxSize:()=>fo,maxLength:()=>Js,lte:()=>un,lt:()=>$r,lowercase:()=>ku,length:()=>Gs,includes:()=>_u,gte:()=>Wt,gt:()=>Cr,endsWith:()=>Su});var qh={};er(qh,{time:()=>s2,duration:()=>a2,datetime:()=>i2,date:()=>o2,ZodISOTime:()=>Kh,ZodISODuration:()=>Jh,ZodISODateTime:()=>Wh,ZodISODate:()=>Vh});var Wh=w("ZodISODateTime",(e,t)=>{Sw.init(e,t),Pe.init(e,t)});function i2(e){return OS(Wh,e)}var Vh=w("ZodISODate",(e,t)=>{Ew.init(e,t),Pe.init(e,t)});function o2(e){return RS(Vh,e)}var Kh=w("ZodISOTime",(e,t)=>{$w.init(e,t),Pe.init(e,t)});function s2(e){return PS(Kh,e)}var Jh=w("ZodISODuration",(e,t)=>{Cw.init(e,t),Pe.init(e,t)});function a2(e){return LS(Jh,e)}var l2=(e,t)=>{Kp.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>Gp(e,n)},flatten:{value:n=>Jp(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,ru,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,ru,2)}},isEmpty:{get(){return e.issues.length===0}}})},A8=w("ZodError",l2),Qt=w("ZodError",l2,{Parent:Error}),u2=Bs(Qt),c2=Us(Qt),d2=js(Qt),f2=Zs(Qt),p2=Xp(Qt),h2=Yp(Qt),m2=Qp(Qt),g2=eh(Qt),b2=th(Qt),v2=nh(Qt),y2=rh(Qt),k2=ih(Qt),ce=w("ZodType",(e,t)=>(le.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Ds(e,"input"),output:Ds(e,"output")}}),e.toJSONSchema=bE(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(ge.mergeDefs(t,{checks:[...t.checks??[],...n.map(i=>typeof i=="function"?{_zod:{check:i,def:{check:"custom"},onattach:[]}}:i)]}),{parent:!0}),e.with=e.check,e.clone=(n,i)=>dn(e,n,i),e.brand=()=>e,e.register=(n,i)=>(n.add(e,i),e),e.parse=(n,i)=>u2(e,n,i,{callee:e.parse}),e.safeParse=(n,i)=>d2(e,n,i),e.parseAsync=async(n,i)=>c2(e,n,i,{callee:e.parseAsync}),e.safeParseAsync=async(n,i)=>f2(e,n,i),e.spa=e.safeParseAsync,e.encode=(n,i)=>p2(e,n,i),e.decode=(n,i)=>h2(e,n,i),e.encodeAsync=async(n,i)=>m2(e,n,i),e.decodeAsync=async(n,i)=>g2(e,n,i),e.safeEncode=(n,i)=>b2(e,n,i),e.safeDecode=(n,i)=>v2(e,n,i),e.safeEncodeAsync=async(n,i)=>y2(e,n,i),e.safeDecodeAsync=async(n,i)=>k2(e,n,i),e.refine=(n,i)=>e.check(Fm(n,i)),e.superRefine=n=>e.check(Bm(n)),e.overwrite=n=>e.check(nr(n)),e.optional=()=>Os(e),e.exactOptional=()=>xm(e),e.nullable=()=>Rs(e),e.nullish=()=>Os(Rs(e)),e.nonoptional=n=>Cm(e,n),e.array=()=>ra(e),e.or=n=>Xu([e,n]),e.and=n=>dm(e,n),e.transform=n=>Ps(e,Qu(n)),e.default=n=>Sm(e,n),e.prefault=n=>$m(e,n),e.catch=n=>Am(e,n),e.pipe=n=>Ps(e,n),e.readonly=()=>Dm(e),e.describe=n=>{let i=e.clone();return ln.add(i,{description:n}),i},Object.defineProperty(e,"description",{get(){return ln.get(e)?.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return ln.get(e);let i=e.clone();return ln.add(i,n[0]),i},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=n=>n(e),e)),Mu=w("_ZodString",(e,t)=>{Vs.init(e,t),ce.init(e,t),e._zod.processJSONSchema=(i,r,o)=>vE(e,i,r,o);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...i)=>e.check(yu(...i)),e.includes=(...i)=>e.check(_u(...i)),e.startsWith=(...i)=>e.check(wu(...i)),e.endsWith=(...i)=>e.check(Su(...i)),e.min=(...i)=>e.check(ri(...i)),e.max=(...i)=>e.check(Js(...i)),e.length=(...i)=>e.check(Gs(...i)),e.nonempty=(...i)=>e.check(ri(1,...i)),e.lowercase=i=>e.check(ku(i)),e.uppercase=i=>e.check(xu(i)),e.trim=()=>e.check(Cu()),e.normalize=(...i)=>e.check($u(...i)),e.toLowerCase=()=>e.check(Tu()),e.toUpperCase=()=>e.check(Iu()),e.slugify=()=>e.check(Au())}),Ys=w("ZodString",(e,t)=>{Vs.init(e,t),Mu.init(e,t),e.email=n=>e.check(vh(zu,n)),e.url=n=>e.check(vu(Qs,n)),e.jwt=n=>e.check(Ph(Vu,n)),e.emoji=n=>e.check(wh(Du,n)),e.guid=n=>e.check(uu(Ns,n)),e.uuid=n=>e.check(yh(Ln,n)),e.uuidv4=n=>e.check(kh(Ln,n)),e.uuidv6=n=>e.check(xh(Ln,n)),e.uuidv7=n=>e.check(_h(Ln,n)),e.nanoid=n=>e.check(Sh(Nu,n)),e.guid=n=>e.check(uu(Ns,n)),e.cuid=n=>e.check(Eh(Ou,n)),e.cuid2=n=>e.check($h(Ru,n)),e.ulid=n=>e.check(Ch(Pu,n)),e.base64=n=>e.check(Nh(Hu,n)),e.base64url=n=>e.check(Oh(qu,n)),e.xid=n=>e.check(Th(Lu,n)),e.ksuid=n=>e.check(Ih(Fu,n)),e.ipv4=n=>e.check(Ah(Bu,n)),e.ipv6=n=>e.check(Mh(Uu,n)),e.cidrv4=n=>e.check(zh(ju,n)),e.cidrv6=n=>e.check(Dh(Zu,n)),e.e164=n=>e.check(Rh(Wu,n)),e.datetime=n=>e.check(i2(n)),e.date=n=>e.check(o2(n)),e.time=n=>e.check(s2(n)),e.duration=n=>e.check(a2(n))});function cu(e){return MS(Ys,e)}var Pe=w("ZodStringFormat",(e,t)=>{Re.init(e,t),Mu.init(e,t)}),zu=w("ZodEmail",(e,t)=>{mw.init(e,t),Pe.init(e,t)});function x2(e){return vh(zu,e)}var Ns=w("ZodGUID",(e,t)=>{pw.init(e,t),Pe.init(e,t)});function _2(e){return uu(Ns,e)}var Ln=w("ZodUUID",(e,t)=>{hw.init(e,t),Pe.init(e,t)});function w2(e){return yh(Ln,e)}function S2(e){return kh(Ln,e)}function E2(e){return xh(Ln,e)}function $2(e){return _h(Ln,e)}var Qs=w("ZodURL",(e,t)=>{gw.init(e,t),Pe.init(e,t)});function C2(e){return vu(Qs,e)}function T2(e){return vu(Qs,{protocol:/^https?$/,hostname:si.domain,...ge.normalizeParams(e)})}var Du=w("ZodEmoji",(e,t)=>{bw.init(e,t),Pe.init(e,t)});function I2(e){return wh(Du,e)}var Nu=w("ZodNanoID",(e,t)=>{vw.init(e,t),Pe.init(e,t)});function A2(e){return Sh(Nu,e)}var Ou=w("ZodCUID",(e,t)=>{yw.init(e,t),Pe.init(e,t)});function M2(e){return Eh(Ou,e)}var Ru=w("ZodCUID2",(e,t)=>{kw.init(e,t),Pe.init(e,t)});function z2(e){return $h(Ru,e)}var Pu=w("ZodULID",(e,t)=>{xw.init(e,t),Pe.init(e,t)});function D2(e){return Ch(Pu,e)}var Lu=w("ZodXID",(e,t)=>{_w.init(e,t),Pe.init(e,t)});function N2(e){return Th(Lu,e)}var Fu=w("ZodKSUID",(e,t)=>{ww.init(e,t),Pe.init(e,t)});function O2(e){return Ih(Fu,e)}var Bu=w("ZodIPv4",(e,t)=>{Tw.init(e,t),Pe.init(e,t)});function R2(e){return Ah(Bu,e)}var Gh=w("ZodMAC",(e,t)=>{Aw.init(e,t),Pe.init(e,t)});function P2(e){return DS(Gh,e)}var Uu=w("ZodIPv6",(e,t)=>{Iw.init(e,t),Pe.init(e,t)});function L2(e){return Mh(Uu,e)}var ju=w("ZodCIDRv4",(e,t)=>{Mw.init(e,t),Pe.init(e,t)});function F2(e){return zh(ju,e)}var Zu=w("ZodCIDRv6",(e,t)=>{zw.init(e,t),Pe.init(e,t)});function B2(e){return Dh(Zu,e)}var Hu=w("ZodBase64",(e,t)=>{Dw.init(e,t),Pe.init(e,t)});function U2(e){return Nh(Hu,e)}var qu=w("ZodBase64URL",(e,t)=>{Ow.init(e,t),Pe.init(e,t)});function j2(e){return Oh(qu,e)}var Wu=w("ZodE164",(e,t)=>{Rw.init(e,t),Pe.init(e,t)});function Z2(e){return Rh(Wu,e)}var Vu=w("ZodJWT",(e,t)=>{Lw.init(e,t),Pe.init(e,t)});function H2(e){return Ph(Vu,e)}var po=w("ZodCustomStringFormat",(e,t)=>{Fw.init(e,t),Pe.init(e,t)});function q2(e,t,n={}){return Xs(po,e,t,n)}function W2(e){return Xs(po,"hostname",si.hostname,e)}function V2(e){return Xs(po,"hex",si.hex,e)}function K2(e,t){let n=t?.enc??"hex",i=`${e}_${n}`,r=si[i];if(!r)throw Error(`Unrecognized hash format: ${i}`);return Xs(po,i,r,t)}var ea=w("ZodNumber",(e,t)=>{ch.init(e,t),ce.init(e,t),e._zod.processJSONSchema=(i,r,o)=>yE(e,i,r,o),e.gt=(i,r)=>e.check(Cr(i,r)),e.gte=(i,r)=>e.check(Wt(i,r)),e.min=(i,r)=>e.check(Wt(i,r)),e.lt=(i,r)=>e.check($r(i,r)),e.lte=(i,r)=>e.check(un(i,r)),e.max=(i,r)=>e.check(un(i,r)),e.int=i=>e.check(du(i)),e.safe=i=>e.check(du(i)),e.positive=i=>e.check(Cr(0,i)),e.nonnegative=i=>e.check(Wt(0,i)),e.negative=i=>e.check($r(0,i)),e.nonpositive=i=>e.check(un(0,i)),e.multipleOf=(i,r)=>e.check(so(i,r)),e.step=(i,r)=>e.check(so(i,r)),e.finite=()=>e;let n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function Xh(e){return FS(ea,e)}var ai=w("ZodNumberFormat",(e,t)=>{Bw.init(e,t),ea.init(e,t)});function du(e){return US(ai,e)}function J2(e){return jS(ai,e)}function G2(e){return ZS(ai,e)}function X2(e){return HS(ai,e)}function Y2(e){return qS(ai,e)}var ta=w("ZodBoolean",(e,t)=>{dh.init(e,t),ce.init(e,t),e._zod.processJSONSchema=(n,i,r)=>kE(e,n,i,r)});function Yh(e){return WS(ta,e)}var na=w("ZodBigInt",(e,t)=>{fh.init(e,t),ce.init(e,t),e._zod.processJSONSchema=(i,r,o)=>xE(e,i,r,o),e.gte=(i,r)=>e.check(Wt(i,r)),e.min=(i,r)=>e.check(Wt(i,r)),e.gt=(i,r)=>e.check(Cr(i,r)),e.gte=(i,r)=>e.check(Wt(i,r)),e.min=(i,r)=>e.check(Wt(i,r)),e.lt=(i,r)=>e.check($r(i,r)),e.lte=(i,r)=>e.check(un(i,r)),e.max=(i,r)=>e.check(un(i,r)),e.positive=i=>e.check(Cr(BigInt(0),i)),e.negative=i=>e.check($r(BigInt(0),i)),e.nonpositive=i=>e.check(un(BigInt(0),i)),e.nonnegative=i=>e.check(Wt(BigInt(0),i)),e.multipleOf=(i,r)=>e.check(so(i,r));let n=e._zod.bag;e.minValue=n.minimum??null,e.maxValue=n.maximum??null,e.format=n.format??null});function Q2(e){return KS(na,e)}var Ku=w("ZodBigIntFormat",(e,t)=>{Uw.init(e,t),na.init(e,t)});function e$(e){return GS(Ku,e)}function t$(e){return XS(Ku,e)}var Qh=w("ZodSymbol",(e,t)=>{jw.init(e,t),ce.init(e,t),e._zod.processJSONSchema=(n,i,r)=>_E(e,n,i,r)});function n$(e){return YS(Qh,e)}var em=w("ZodUndefined",(e,t)=>{Zw.init(e,t),ce.init(e,t),e._zod.processJSONSchema=(n,i,r)=>SE(e,n,i,r)});function r$(e){return QS(em,e)}var tm=w("ZodNull",(e,t)=>{Hw.init(e,t),ce.init(e,t),e._zod.processJSONSchema=(n,i,r)=>wE(e,n,i,r)});function nm(e){return eE(tm,e)}var rm=w("ZodAny",(e,t)=>{qw.init(e,t),ce.init(e,t),e._zod.processJSONSchema=(n,i,r)=>CE(e,n,i,r)});function i$(){return tE(rm)}var im=w("ZodUnknown",(e,t)=>{Ww.init(e,t),ce.init(e,t),e._zod.processJSONSchema=(n,i,r)=>TE(e,n,i,r)});function ii(){return nE(im)}var om=w("ZodNever",(e,t)=>{Vw.init(e,t),ce.init(e,t),e._zod.processJSONSchema=(n,i,r)=>$E(e,n,i,r)});function Ju(e){return rE(om,e)}var sm=w("ZodVoid",(e,t)=>{Kw.init(e,t),ce.init(e,t),e._zod.processJSONSchema=(n,i,r)=>EE(e,n,i,r)});function o$(e){return iE(sm,e)}var Gu=w("ZodDate",(e,t)=>{Jw.init(e,t),ce.init(e,t),e._zod.processJSONSchema=(i,r,o)=>IE(e,i,r,o),e.min=(i,r)=>e.check(Wt(i,r)),e.max=(i,r)=>e.check(un(i,r));let n=e._zod.bag;e.minDate=n.minimum?new Date(n.minimum):null,e.maxDate=n.maximum?new Date(n.maximum):null});function s$(e){return oE(Gu,e)}var am=w("ZodArray",(e,t)=>{Gw.init(e,t),ce.init(e,t),e._zod.processJSONSchema=(n,i,r)=>UE(e,n,i,r),e.element=t.element,e.min=(n,i)=>e.check(ri(n,i)),e.nonempty=n=>e.check(ri(1,n)),e.max=(n,i)=>e.check(Js(n,i)),e.length=(n,i)=>e.check(Gs(n,i)),e.unwrap=()=>e.element});function ra(e,t){return lE(am,e,t)}function a$(e){let t=e._zod.def.shape;return Yu(Object.keys(t))}var ia=w("ZodObject",(e,t)=>{eS.init(e,t),ce.init(e,t),e._zod.processJSONSchema=(n,i,r)=>jE(e,n,i,r),ge.defineLazy(e,"shape",()=>t.shape),e.keyof=()=>Yu(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:ii()}),e.loose=()=>e.clone({...e._zod.def,catchall:ii()}),e.strict=()=>e.clone({...e._zod.def,catchall:Ju()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>ge.extend(e,n),e.safeExtend=n=>ge.safeExtend(e,n),e.merge=n=>ge.merge(e,n),e.pick=n=>ge.pick(e,n),e.omit=n=>ge.omit(e,n),e.partial=(...n)=>ge.partial(ec,e,n[0]),e.required=(...n)=>ge.required(tc,e,n[0])});function l$(e,t){let n={type:"object",shape:e??{},...ge.normalizeParams(t)};return new ia(n)}function u$(e,t){return new ia({type:"object",shape:e,catchall:Ju(),...ge.normalizeParams(t)})}function c$(e,t){return new ia({type:"object",shape:e,catchall:ii(),...ge.normalizeParams(t)})}var oa=w("ZodUnion",(e,t)=>{bu.init(e,t),ce.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Zh(e,n,i,r),e.options=t.options});function Xu(e,t){return new oa({type:"union",options:e,...ge.normalizeParams(t)})}var lm=w("ZodXor",(e,t)=>{oa.init(e,t),tS.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Zh(e,n,i,r),e.options=t.options});function d$(e,t){return new lm({type:"union",options:e,inclusive:!1,...ge.normalizeParams(t)})}var um=w("ZodDiscriminatedUnion",(e,t)=>{oa.init(e,t),nS.init(e,t)});function f$(e,t,n){return new um({type:"union",options:t,discriminator:e,...ge.normalizeParams(n)})}var cm=w("ZodIntersection",(e,t)=>{rS.init(e,t),ce.init(e,t),e._zod.processJSONSchema=(n,i,r)=>ZE(e,n,i,r)});function dm(e,t){return new cm({type:"intersection",left:e,right:t})}var fm=w("ZodTuple",(e,t)=>{ph.init(e,t),ce.init(e,t),e._zod.processJSONSchema=(n,i,r)=>HE(e,n,i,r),e.rest=n=>e.clone({...e._zod.def,rest:n})});function pm(e,t,n){let i=t instanceof le,r=i?n:t;return new fm({type:"tuple",items:e,rest:i?t:null,...ge.normalizeParams(r)})}var sa=w("ZodRecord",(e,t)=>{iS.init(e,t),ce.init(e,t),e._zod.processJSONSchema=(n,i,r)=>qE(e,n,i,r),e.keyType=t.keyType,e.valueType=t.valueType});function hm(e,t,n){return new sa({type:"record",keyType:e,valueType:t,...ge.normalizeParams(n)})}function p$(e,t,n){let i=dn(e);return i._zod.values=void 0,new sa({type:"record",keyType:i,valueType:t,...ge.normalizeParams(n)})}function h$(e,t,n){return new sa({type:"record",keyType:e,valueType:t,mode:"loose",...ge.normalizeParams(n)})}var mm=w("ZodMap",(e,t)=>{oS.init(e,t),ce.init(e,t),e._zod.processJSONSchema=(n,i,r)=>FE(e,n,i,r),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...n)=>e.check(Tr(...n)),e.nonempty=n=>e.check(Tr(1,n)),e.max=(...n)=>e.check(fo(...n)),e.size=(...n)=>e.check(Ks(...n))});function m$(e,t,n){return new mm({type:"map",keyType:e,valueType:t,...ge.normalizeParams(n)})}var gm=w("ZodSet",(e,t)=>{sS.init(e,t),ce.init(e,t),e._zod.processJSONSchema=(n,i,r)=>BE(e,n,i,r),e.min=(...n)=>e.check(Tr(...n)),e.nonempty=n=>e.check(Tr(1,n)),e.max=(...n)=>e.check(fo(...n)),e.size=(...n)=>e.check(Ks(...n))});function g$(e,t){return new gm({type:"set",valueType:e,...ge.normalizeParams(t)})}var co=w("ZodEnum",(e,t)=>{aS.init(e,t),ce.init(e,t),e._zod.processJSONSchema=(i,r,o)=>AE(e,i,r,o),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(i,r)=>{let o={};for(let s of i)if(n.has(s))o[s]=t.entries[s];else throw Error(`Key ${s} not found in enum`);return new co({...t,checks:[],...ge.normalizeParams(r),entries:o})},e.exclude=(i,r)=>{let o={...t.entries};for(let s of i)if(n.has(s))delete o[s];else throw Error(`Key ${s} not found in enum`);return new co({...t,checks:[],...ge.normalizeParams(r),entries:o})}});function Yu(e,t){let n=Array.isArray(e)?Object.fromEntries(e.map(i=>[i,i])):e;return new co({type:"enum",entries:n,...ge.normalizeParams(t)})}function b$(e,t){return new co({type:"enum",entries:e,...ge.normalizeParams(t)})}var bm=w("ZodLiteral",(e,t)=>{lS.init(e,t),ce.init(e,t),e._zod.processJSONSchema=(n,i,r)=>ME(e,n,i,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function v$(e,t){return new bm({type:"literal",values:Array.isArray(e)?e:[e],...ge.normalizeParams(t)})}var vm=w("ZodFile",(e,t)=>{uS.init(e,t),ce.init(e,t),e._zod.processJSONSchema=(n,i,r)=>NE(e,n,i,r),e.min=(n,i)=>e.check(Tr(n,i)),e.max=(n,i)=>e.check(fo(n,i)),e.mime=(n,i)=>e.check(Eu(Array.isArray(n)?n:[n],i))});function y$(e){return uE(vm,e)}var ym=w("ZodTransform",(e,t)=>{cS.init(e,t),ce.init(e,t),e._zod.processJSONSchema=(n,i,r)=>LE(e,n,i,r),e._zod.parse=(n,i)=>{if(i.direction==="backward")throw new ro(e.constructor.name);n.addIssue=o=>{if(typeof o=="string")n.issues.push(ge.issue(o,n.value,t));else{let s=o;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=n.value),s.inst??(s.inst=e),n.issues.push(ge.issue(s))}};let r=t.transform(n.value,n);return r instanceof Promise?r.then(o=>(n.value=o,n)):(n.value=r,n)}});function Qu(e){return new ym({type:"transform",transform:e})}var ec=w("ZodOptional",(e,t)=>{hh.init(e,t),ce.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Hh(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function Os(e){return new ec({type:"optional",innerType:e})}var km=w("ZodExactOptional",(e,t)=>{dS.init(e,t),ce.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Hh(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function xm(e){return new km({type:"optional",innerType:e})}var _m=w("ZodNullable",(e,t)=>{fS.init(e,t),ce.init(e,t),e._zod.processJSONSchema=(n,i,r)=>WE(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function Rs(e){return new _m({type:"nullable",innerType:e})}function k$(e){return Os(Rs(e))}var wm=w("ZodDefault",(e,t)=>{pS.init(e,t),ce.init(e,t),e._zod.processJSONSchema=(n,i,r)=>KE(e,n,i,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Sm(e,t){return new wm({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():ge.shallowClone(t)}})}var Em=w("ZodPrefault",(e,t)=>{hS.init(e,t),ce.init(e,t),e._zod.processJSONSchema=(n,i,r)=>JE(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function $m(e,t){return new Em({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():ge.shallowClone(t)}})}var tc=w("ZodNonOptional",(e,t)=>{mS.init(e,t),ce.init(e,t),e._zod.processJSONSchema=(n,i,r)=>VE(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function Cm(e,t){return new tc({type:"nonoptional",innerType:e,...ge.normalizeParams(t)})}var Tm=w("ZodSuccess",(e,t)=>{gS.init(e,t),ce.init(e,t),e._zod.processJSONSchema=(n,i,r)=>OE(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function x$(e){return new Tm({type:"success",innerType:e})}var Im=w("ZodCatch",(e,t)=>{bS.init(e,t),ce.init(e,t),e._zod.processJSONSchema=(n,i,r)=>GE(e,n,i,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Am(e,t){return new Im({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}var Mm=w("ZodNaN",(e,t)=>{vS.init(e,t),ce.init(e,t),e._zod.processJSONSchema=(n,i,r)=>zE(e,n,i,r)});function _$(e){return aE(Mm,e)}var nc=w("ZodPipe",(e,t)=>{yS.init(e,t),ce.init(e,t),e._zod.processJSONSchema=(n,i,r)=>XE(e,n,i,r),e.in=t.in,e.out=t.out});function Ps(e,t){return new nc({type:"pipe",in:e,out:t})}var rc=w("ZodCodec",(e,t)=>{nc.init(e,t),mh.init(e,t)});function w$(e,t,n){return new rc({type:"pipe",in:e,out:t,transform:n.decode,reverseTransform:n.encode})}var zm=w("ZodReadonly",(e,t)=>{kS.init(e,t),ce.init(e,t),e._zod.processJSONSchema=(n,i,r)=>YE(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function Dm(e){return new zm({type:"readonly",innerType:e})}var Nm=w("ZodTemplateLiteral",(e,t)=>{xS.init(e,t),ce.init(e,t),e._zod.processJSONSchema=(n,i,r)=>DE(e,n,i,r)});function S$(e,t){return new Nm({type:"template_literal",parts:e,...ge.normalizeParams(t)})}var Om=w("ZodLazy",(e,t)=>{SS.init(e,t),ce.init(e,t),e._zod.processJSONSchema=(n,i,r)=>e2(e,n,i,r),e.unwrap=()=>e._zod.def.getter()});function Rm(e){return new Om({type:"lazy",getter:e})}var Pm=w("ZodPromise",(e,t)=>{wS.init(e,t),ce.init(e,t),e._zod.processJSONSchema=(n,i,r)=>QE(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function E$(e){return new Pm({type:"promise",innerType:e})}var Lm=w("ZodFunction",(e,t)=>{_S.init(e,t),ce.init(e,t),e._zod.processJSONSchema=(n,i,r)=>PE(e,n,i,r)});function fu(e){return new Lm({type:"function",input:Array.isArray(e?.input)?pm(e?.input):e?.input??ra(ii()),output:e?.output??ii()})}var aa=w("ZodCustom",(e,t)=>{ES.init(e,t),ce.init(e,t),e._zod.processJSONSchema=(n,i,r)=>RE(e,n,i,r)});function $$(e){let t=new Je({check:"custom"});return t._zod.check=e,t}function C$(e,t){return cE(aa,e??(()=>!0),t)}function Fm(e,t={}){return dE(aa,e,t)}function Bm(e){return fE(e)}var T$=hE,I$=mE;function A$(e,t={}){let n=new aa({type:"custom",check:"custom",fn:i=>i instanceof e,abort:!0,...ge.normalizeParams(t)});return n._zod.bag.Class=e,n._zod.check=i=>{i.value instanceof e||i.issues.push({code:"invalid_type",expected:e.name,input:i.value,inst:n,path:[...n._zod.def.path??[]]})},n}var M$=(...e)=>gE({Codec:rc,Boolean:ta,String:Ys},...e);function z$(e){let t=Rm(()=>Xu([cu(e),Xh(),Yh(),nm(),ra(t),hm(cu(),t)]));return t}function D$(e,t){return Ps(Qu(e),t)}var M8={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};function z8(e){Dt({customError:e})}function D8(){return Dt().customError}var qp;qp||(qp={});var j={...n2,...r2,iso:qh},N8=new Set(["$schema","$ref","$defs","definitions","$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor","type","enum","const","anyOf","oneOf","allOf","not","properties","required","additionalProperties","patternProperties","propertyNames","minProperties","maxProperties","items","prefixItems","additionalItems","minItems","maxItems","uniqueItems","contains","minContains","maxContains","minLength","maxLength","pattern","format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf","description","default","contentEncoding","contentMediaType","contentSchema","unevaluatedItems","unevaluatedProperties","if","then","else","dependentSchemas","dependentRequired","nullable","readOnly"]);function O8(e,t){let n=e.$schema;return n==="https://json-schema.org/draft/2020-12/schema"?"draft-2020-12":n==="http://json-schema.org/draft-07/schema#"?"draft-7":n==="http://json-schema.org/draft-04/schema#"?"draft-4":t??"draft-2020-12"}function R8(e,t){if(!e.startsWith("#"))throw Error("External $ref is not supported, only local refs (#/...) are allowed");let n=e.slice(1).split("/").filter(Boolean);if(n.length===0)return t.rootSchema;let i=t.version==="draft-2020-12"?"$defs":"definitions";if(n[0]===i){let r=n[1];if(!r||!t.defs[r])throw Error(`Reference not found: ${e}`);return t.defs[r]}throw Error(`Reference not found: ${e}`)}function N$(e,t){if(e.not!==void 0){if(typeof e.not=="object"&&Object.keys(e.not).length===0)return j.never();throw Error("not is not supported in Zod (except { not: {} } for never)")}if(e.unevaluatedItems!==void 0)throw Error("unevaluatedItems is not supported");if(e.unevaluatedProperties!==void 0)throw Error("unevaluatedProperties is not supported");if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw Error("Conditional schemas (if/then/else) are not supported");if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw Error("dependentSchemas and dependentRequired are not supported");if(e.$ref){let r=e.$ref;if(t.refs.has(r))return t.refs.get(r);if(t.processing.has(r))return j.lazy(()=>{if(!t.refs.has(r))throw Error(`Circular reference not resolved: ${r}`);return t.refs.get(r)});t.processing.add(r);let o=R8(r,t),s=zt(o,t);return t.refs.set(r,s),t.processing.delete(r),s}if(e.enum!==void 0){let r=e.enum;if(t.version==="openapi-3.0"&&e.nullable===!0&&r.length===1&&r[0]===null)return j.null();if(r.length===0)return j.never();if(r.length===1)return j.literal(r[0]);if(r.every(s=>typeof s=="string"))return j.enum(r);let o=r.map(s=>j.literal(s));return o.length<2?o[0]:j.union([o[0],o[1],...o.slice(2)])}if(e.const!==void 0)return j.literal(e.const);let n=e.type;if(Array.isArray(n)){let r=n.map(o=>{let s={...e,type:o};return N$(s,t)});return r.length===0?j.never():r.length===1?r[0]:j.union(r)}if(!n)return j.any();let i;switch(n){case"string":{let r=j.string();if(e.format){let o=e.format;o==="email"?r=r.check(j.email()):o==="uri"||o==="uri-reference"?r=r.check(j.url()):o==="uuid"||o==="guid"?r=r.check(j.uuid()):o==="date-time"?r=r.check(j.iso.datetime()):o==="date"?r=r.check(j.iso.date()):o==="time"?r=r.check(j.iso.time()):o==="duration"?r=r.check(j.iso.duration()):o==="ipv4"?r=r.check(j.ipv4()):o==="ipv6"?r=r.check(j.ipv6()):o==="mac"?r=r.check(j.mac()):o==="cidr"?r=r.check(j.cidrv4()):o==="cidr-v6"?r=r.check(j.cidrv6()):o==="base64"?r=r.check(j.base64()):o==="base64url"?r=r.check(j.base64url()):o==="e164"?r=r.check(j.e164()):o==="jwt"?r=r.check(j.jwt()):o==="emoji"?r=r.check(j.emoji()):o==="nanoid"?r=r.check(j.nanoid()):o==="cuid"?r=r.check(j.cuid()):o==="cuid2"?r=r.check(j.cuid2()):o==="ulid"?r=r.check(j.ulid()):o==="xid"?r=r.check(j.xid()):o==="ksuid"&&(r=r.check(j.ksuid()))}typeof e.minLength=="number"&&(r=r.min(e.minLength)),typeof e.maxLength=="number"&&(r=r.max(e.maxLength)),e.pattern&&(r=r.regex(new RegExp(e.pattern))),i=r;break}case"number":case"integer":{let r=n==="integer"?j.number().int():j.number();typeof e.minimum=="number"&&(r=r.min(e.minimum)),typeof e.maximum=="number"&&(r=r.max(e.maximum)),typeof e.exclusiveMinimum=="number"?r=r.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum=="number"&&(r=r.gt(e.minimum)),typeof e.exclusiveMaximum=="number"?r=r.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum=="number"&&(r=r.lt(e.maximum)),typeof e.multipleOf=="number"&&(r=r.multipleOf(e.multipleOf)),i=r;break}case"boolean":{i=j.boolean();break}case"null":{i=j.null();break}case"object":{let r={},o=e.properties||{},s=new Set(e.required||[]);for(let[l,u]of Object.entries(o)){let c=zt(u,t);r[l]=s.has(l)?c:c.optional()}if(e.propertyNames){let l=zt(e.propertyNames,t),u=e.additionalProperties&&typeof e.additionalProperties=="object"?zt(e.additionalProperties,t):j.any();if(Object.keys(r).length===0){i=j.record(l,u);break}let c=j.object(r).passthrough(),d=j.looseRecord(l,u);i=j.intersection(c,d);break}if(e.patternProperties){let l=e.patternProperties,u=Object.keys(l),c=[];for(let f of u){let p=zt(l[f],t),h=j.string().regex(new RegExp(f));c.push(j.looseRecord(h,p))}let d=[];if(Object.keys(r).length>0&&d.push(j.object(r).passthrough()),d.push(...c),d.length===0)i=j.object({}).passthrough();else if(d.length===1)i=d[0];else{let f=j.intersection(d[0],d[1]);for(let p=2;p<d.length;p++)f=j.intersection(f,d[p]);i=f}break}let a=j.object(r);e.additionalProperties===!1?i=a.strict():typeof e.additionalProperties=="object"?i=a.catchall(zt(e.additionalProperties,t)):i=a.passthrough();break}case"array":{let{prefixItems:r,items:o}=e;if(r&&Array.isArray(r)){let s=r.map(l=>zt(l,t)),a=o&&typeof o=="object"&&!Array.isArray(o)?zt(o,t):void 0;a?i=j.tuple(s).rest(a):i=j.tuple(s),typeof e.minItems=="number"&&(i=i.check(j.minLength(e.minItems))),typeof e.maxItems=="number"&&(i=i.check(j.maxLength(e.maxItems)))}else if(Array.isArray(o)){let s=o.map(l=>zt(l,t)),a=e.additionalItems&&typeof e.additionalItems=="object"?zt(e.additionalItems,t):void 0;a?i=j.tuple(s).rest(a):i=j.tuple(s),typeof e.minItems=="number"&&(i=i.check(j.minLength(e.minItems))),typeof e.maxItems=="number"&&(i=i.check(j.maxLength(e.maxItems)))}else if(o!==void 0){let s=zt(o,t),a=j.array(s);typeof e.minItems=="number"&&(a=a.min(e.minItems)),typeof e.maxItems=="number"&&(a=a.max(e.maxItems)),i=a}else i=j.array(j.any());break}default:throw Error(`Unsupported type: ${n}`)}return e.description&&(i=i.describe(e.description)),e.default!==void 0&&(i=i.default(e.default)),i}function zt(e,t){if(typeof e=="boolean")return e?j.any():j.never();let n=N$(e,t),i=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let a=e.anyOf.map(u=>zt(u,t)),l=j.union(a);n=i?j.intersection(n,l):l}if(e.oneOf&&Array.isArray(e.oneOf)){let a=e.oneOf.map(u=>zt(u,t)),l=j.xor(a);n=i?j.intersection(n,l):l}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)n=i?n:j.any();else{let a=i?n:zt(e.allOf[0],t),l=i?0:1;for(let u=l;u<e.allOf.length;u++)a=j.intersection(a,zt(e.allOf[u],t));n=a}e.nullable===!0&&t.version==="openapi-3.0"&&(n=j.nullable(n)),e.readOnly===!0&&(n=j.readonly(n));let r={},o=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let a of o)a in e&&(r[a]=e[a]);let s=["contentEncoding","contentMediaType","contentSchema"];for(let a of s)a in e&&(r[a]=e[a]);for(let a of Object.keys(e))N8.has(a)||(r[a]=e[a]);return Object.keys(r).length>0&&t.registry.add(n,r),n}function P8(e,t){if(typeof e=="boolean")return e?j.any():j.never();let n=O8(e,t?.defaultTarget),i=e.$defs||e.definitions||{},r={version:n,defs:i,refs:new Map,processing:new Set,rootSchema:e,registry:t?.registry??ln};return zt(e,r)}var O$={};er(O$,{string:()=>L8,number:()=>F8,date:()=>j8,boolean:()=>B8,bigint:()=>U8});function L8(e){return zS(Ys,e)}function F8(e){return BS(ea,e)}function B8(e){return VS(ta,e)}function U8(e){return JS(na,e)}function j8(e){return sE(Gu,e)}Dt($S());var Z8=k.union([k.literal("light"),k.literal("dark")]).describe("Color theme preference for the host environment."),Ls=k.union([k.literal("inline"),k.literal("fullscreen"),k.literal("pip")]).describe("Display mode for UI presentation."),H8=k.union([k.literal("--color-background-primary"),k.literal("--color-background-secondary"),k.literal("--color-background-tertiary"),k.literal("--color-background-inverse"),k.literal("--color-background-ghost"),k.literal("--color-background-info"),k.literal("--color-background-danger"),k.literal("--color-background-success"),k.literal("--color-background-warning"),k.literal("--color-background-disabled"),k.literal("--color-text-primary"),k.literal("--color-text-secondary"),k.literal("--color-text-tertiary"),k.literal("--color-text-inverse"),k.literal("--color-text-ghost"),k.literal("--color-text-info"),k.literal("--color-text-danger"),k.literal("--color-text-success"),k.literal("--color-text-warning"),k.literal("--color-text-disabled"),k.literal("--color-text-ghost"),k.literal("--color-border-primary"),k.literal("--color-border-secondary"),k.literal("--color-border-tertiary"),k.literal("--color-border-inverse"),k.literal("--color-border-ghost"),k.literal("--color-border-info"),k.literal("--color-border-danger"),k.literal("--color-border-success"),k.literal("--color-border-warning"),k.literal("--color-border-disabled"),k.literal("--color-ring-primary"),k.literal("--color-ring-secondary"),k.literal("--color-ring-inverse"),k.literal("--color-ring-info"),k.literal("--color-ring-danger"),k.literal("--color-ring-success"),k.literal("--color-ring-warning"),k.literal("--font-sans"),k.literal("--font-mono"),k.literal("--font-weight-normal"),k.literal("--font-weight-medium"),k.literal("--font-weight-semibold"),k.literal("--font-weight-bold"),k.literal("--font-text-xs-size"),k.literal("--font-text-sm-size"),k.literal("--font-text-md-size"),k.literal("--font-text-lg-size"),k.literal("--font-heading-xs-size"),k.literal("--font-heading-sm-size"),k.literal("--font-heading-md-size"),k.literal("--font-heading-lg-size"),k.literal("--font-heading-xl-size"),k.literal("--font-heading-2xl-size"),k.literal("--font-heading-3xl-size"),k.literal("--font-text-xs-line-height"),k.literal("--font-text-sm-line-height"),k.literal("--font-text-md-line-height"),k.literal("--font-text-lg-line-height"),k.literal("--font-heading-xs-line-height"),k.literal("--font-heading-sm-line-height"),k.literal("--font-heading-md-line-height"),k.literal("--font-heading-lg-line-height"),k.literal("--font-heading-xl-line-height"),k.literal("--font-heading-2xl-line-height"),k.literal("--font-heading-3xl-line-height"),k.literal("--border-radius-xs"),k.literal("--border-radius-sm"),k.literal("--border-radius-md"),k.literal("--border-radius-lg"),k.literal("--border-radius-xl"),k.literal("--border-radius-full"),k.literal("--border-width-regular"),k.literal("--shadow-hairline"),k.literal("--shadow-sm"),k.literal("--shadow-md"),k.literal("--shadow-lg")]).describe("CSS variable keys available to MCP apps for theming."),q8=k.record(H8.describe(`Style variables for theming MCP apps.
68
+
69
+ Individual style keys are optional - hosts may provide any subset of these values.
70
+ Values are strings containing CSS values (colors, sizes, font stacks, etc.).
71
+
72
+ Note: This type uses \`Record<K, string | undefined>\` rather than \`Partial<Record<K, string>>\`
73
+ for compatibility with Zod schema generation. Both are functionally equivalent for validation.`),k.union([k.string(),k.undefined()]).describe(`Style variables for theming MCP apps.
74
+
75
+ Individual style keys are optional - hosts may provide any subset of these values.
76
+ Values are strings containing CSS values (colors, sizes, font stacks, etc.).
77
+
78
+ Note: This type uses \`Record<K, string | undefined>\` rather than \`Partial<Record<K, string>>\`
79
+ for compatibility with Zod schema generation. Both are functionally equivalent for validation.`)).describe(`Style variables for theming MCP apps.
80
+
81
+ Individual style keys are optional - hosts may provide any subset of these values.
82
+ Values are strings containing CSS values (colors, sizes, font stacks, etc.).
83
+
84
+ Note: This type uses \`Record<K, string | undefined>\` rather than \`Partial<Record<K, string>>\`
85
+ for compatibility with Zod schema generation. Both are functionally equivalent for validation.`),Vee=k.object({method:k.literal("ui/open-link"),params:k.object({url:k.string().describe("URL to open in the host's browser")})}),W8=k.object({isError:k.boolean().optional().describe("True if the host failed to open the URL (e.g., due to security policy).")}).passthrough(),V8=k.object({isError:k.boolean().optional().describe("True if the host rejected or failed to deliver the message.")}).passthrough(),Kee=k.object({method:k.literal("ui/notifications/sandbox-proxy-ready"),params:k.object({})}),Um=k.object({connectDomains:k.array(k.string()).optional().describe("Origins for network requests (fetch/XHR/WebSocket)."),resourceDomains:k.array(k.string()).optional().describe("Origins for static resources (scripts, images, styles, fonts)."),frameDomains:k.array(k.string()).optional().describe("Origins for nested iframes (frame-src directive)."),baseUriDomains:k.array(k.string()).optional().describe("Allowed base URIs for the document (base-uri directive).")}),jm=k.object({camera:k.object({}).optional().describe("Request camera access (Permission Policy `camera` feature)."),microphone:k.object({}).optional().describe("Request microphone access (Permission Policy `microphone` feature)."),geolocation:k.object({}).optional().describe("Request geolocation access (Permission Policy `geolocation` feature)."),clipboardWrite:k.object({}).optional().describe("Request clipboard write access (Permission Policy `clipboard-write` feature).")}),Jee=k.object({method:k.literal("ui/notifications/size-changed"),params:k.object({width:k.number().optional().describe("New width in pixels."),height:k.number().optional().describe("New height in pixels.")})}),K8=k.object({method:k.literal("ui/notifications/tool-input"),params:k.object({arguments:k.record(k.string(),k.unknown().describe("Complete tool call arguments as key-value pairs.")).optional().describe("Complete tool call arguments as key-value pairs.")})}),J8=k.object({method:k.literal("ui/notifications/tool-input-partial"),params:k.object({arguments:k.record(k.string(),k.unknown().describe("Partial tool call arguments (incomplete, may change).")).optional().describe("Partial tool call arguments (incomplete, may change).")})}),G8=k.object({method:k.literal("ui/notifications/tool-cancelled"),params:k.object({reason:k.string().optional().describe('Optional reason for the cancellation (e.g., "user action", "timeout").')})}),X8=k.object({fonts:k.string().optional()}),Y8=k.object({variables:q8.optional().describe("CSS variables for theming the app."),css:X8.optional().describe("CSS blocks that apps can inject.")}),Q8=k.object({method:k.literal("ui/resource-teardown"),params:k.object({})}),Gee=k.record(k.string(),k.unknown()),Gx=k.object({text:k.object({}).optional().describe("Host supports text content blocks."),image:k.object({}).optional().describe("Host supports image content blocks."),audio:k.object({}).optional().describe("Host supports audio content blocks."),resource:k.object({}).optional().describe("Host supports resource content blocks."),resourceLink:k.object({}).optional().describe("Host supports resource link content blocks."),structuredContent:k.object({}).optional().describe("Host supports structured content.")}),e9=k.object({experimental:k.object({}).optional().describe("Experimental features (structure TBD)."),openLinks:k.object({}).optional().describe("Host supports opening external URLs."),serverTools:k.object({listChanged:k.boolean().optional().describe("Host supports tools/list_changed notifications.")}).optional().describe("Host can proxy tool calls to the MCP server."),serverResources:k.object({listChanged:k.boolean().optional().describe("Host supports resources/list_changed notifications.")}).optional().describe("Host can proxy resource reads to the MCP server."),logging:k.object({}).optional().describe("Host accepts log messages."),sandbox:k.object({permissions:jm.optional().describe("Permissions granted by the host (camera, microphone, geolocation)."),csp:Um.optional().describe("CSP domains approved by the host.")}).optional().describe("Sandbox configuration applied by the host."),updateModelContext:Gx.optional().describe("Host accepts context updates (ui/update-model-context) to be included in the model's context for future turns."),message:Gx.optional().describe("Host supports receiving content messages (ui/message) from the view.")}),t9=k.object({experimental:k.object({}).optional().describe("Experimental features (structure TBD)."),tools:k.object({listChanged:k.boolean().optional().describe("App supports tools/list_changed notifications.")}).optional().describe("App exposes MCP-style tools that the host can call."),availableDisplayModes:k.array(Ls).optional().describe("Display modes the app supports.")}),Xee=k.object({method:k.literal("ui/notifications/initialized"),params:k.object({}).optional()}),Yee=k.object({csp:Um.optional().describe("Content Security Policy configuration."),permissions:jm.optional().describe("Sandbox permissions requested by the UI."),domain:k.string().optional().describe("Dedicated origin for view sandbox."),prefersBorder:k.boolean().optional().describe("Visual boundary preference - true if UI prefers a visible border.")}),Qee=k.object({method:k.literal("ui/request-display-mode"),params:k.object({mode:Ls.describe("The display mode being requested.")})}),n9=k.object({mode:Ls.describe("The display mode that was actually set. May differ from requested if not supported.")}).passthrough(),r9=k.union([k.literal("model"),k.literal("app")]).describe("Tool visibility scope - who can access the tool."),ete=k.object({resourceUri:k.string().optional(),visibility:k.array(r9).optional().describe(`Who can access this tool. Default: ["model", "app"]
86
+ - "model": Tool visible to and callable by the agent
87
+ - "app": Tool callable by the app from this server only`)}),tte=k.object({mimeTypes:k.array(k.string()).optional().describe('Array of supported MIME types for UI resources.\nMust include `"text/html;profile=mcp-app"` for MCP Apps support.')}),nte=k.object({method:k.literal("ui/message"),params:k.object({role:k.literal("user").describe('Message role, currently only "user" is supported.'),content:k.array(eo).describe("Message content blocks (text, image, etc.).")})}),rte=k.object({method:k.literal("ui/notifications/sandbox-resource-ready"),params:k.object({html:k.string().describe("HTML content to load into the inner iframe."),sandbox:k.string().optional().describe("Optional override for the inner iframe's sandbox attribute."),csp:Um.optional().describe("CSP configuration from resource metadata."),permissions:jm.optional().describe("Sandbox permissions from resource metadata.")})}),i9=k.object({method:k.literal("ui/notifications/tool-result"),params:to.describe("Standard MCP tool execution result.")}),R$=k.object({toolInfo:k.object({id:Xi.optional().describe("JSON-RPC id of the tools/call request."),tool:Gl.describe("Tool definition including name, inputSchema, etc.")}).optional().describe("Metadata of the tool call that instantiated this App."),theme:Z8.optional().describe("Current color theme preference."),styles:Y8.optional().describe("Style configuration for theming the app."),displayMode:Ls.optional().describe("How the UI is currently displayed."),availableDisplayModes:k.array(Ls).optional().describe("Display modes the host supports."),containerDimensions:k.union([k.object({height:k.number().describe("Fixed container height in pixels.")}),k.object({maxHeight:k.union([k.number(),k.undefined()]).optional().describe("Maximum container height in pixels.")})]).and(k.union([k.object({width:k.number().describe("Fixed container width in pixels.")}),k.object({maxWidth:k.union([k.number(),k.undefined()]).optional().describe("Maximum container width in pixels.")})])).optional().describe(`Container dimensions. Represents the dimensions of the iframe or other
88
+ container holding the app. Specify either width or maxWidth, and either height or maxHeight.`),locale:k.string().optional().describe("User's language and region preference in BCP 47 format."),timeZone:k.string().optional().describe("User's timezone in IANA format."),userAgent:k.string().optional().describe("Host application identifier."),platform:k.union([k.literal("web"),k.literal("desktop"),k.literal("mobile")]).optional().describe("Platform type for responsive design decisions."),deviceCapabilities:k.object({touch:k.boolean().optional().describe("Whether the device supports touch input."),hover:k.boolean().optional().describe("Whether the device supports hover interactions.")}).optional().describe("Device input capabilities."),safeAreaInsets:k.object({top:k.number().describe("Top safe area inset in pixels."),right:k.number().describe("Right safe area inset in pixels."),bottom:k.number().describe("Bottom safe area inset in pixels."),left:k.number().describe("Left safe area inset in pixels.")}).optional().describe("Mobile safe area boundaries in pixels.")}).passthrough(),o9=k.object({method:k.literal("ui/notifications/host-context-changed"),params:R$.describe("Partial context update containing only changed fields.")}),ite=k.object({method:k.literal("ui/update-model-context"),params:k.object({content:k.array(eo).optional().describe("Context content blocks (text, image, etc.)."),structuredContent:k.record(k.string(),k.unknown().describe("Structured content for machine-readable context data.")).optional().describe("Structured content for machine-readable context data.")})}),ote=k.object({method:k.literal("ui/initialize"),params:k.object({appInfo:Ss.describe("App identification (name and version)."),appCapabilities:t9.describe("Features and capabilities this app provides."),protocolVersion:k.string().describe("Protocol version this app supports.")})}),s9=k.object({protocolVersion:k.string().describe('Negotiated protocol version string (e.g., "2025-11-21").'),hostInfo:Ss.describe("Host application identification and version."),hostCapabilities:e9.describe("Features and capabilities provided by the host."),hostContext:R$.describe("Rich context about the host environment.")}).passthrough();function P$(e){let t=document.documentElement;t.setAttribute("data-theme",e),t.style.colorScheme=e}function L$(e,t=document.documentElement){for(let[n,i]of Object.entries(e))i!==void 0&&t.style.setProperty(n,i)}function F$(e){if(document.getElementById("__mcp-host-fonts"))return;let t=document.createElement("style");t.id="__mcp-host-fonts",t.textContent=e,document.head.appendChild(t)}var pu=class extends Xl{constructor(n,i={},r={autoResize:!0}){super(r);At(this,"_appInfo");At(this,"_capabilities");At(this,"options");At(this,"_hostCapabilities");At(this,"_hostInfo");At(this,"_hostContext");At(this,"sendOpenLink",this.openLink);this._appInfo=n,this._capabilities=i,this.options=r,this.setRequestHandler(Yi,o=>(console.log("Received ping:",o.params),{})),this.onhostcontextchanged=()=>{}}getHostCapabilities(){return this._hostCapabilities}getHostVersion(){return this._hostInfo}getHostContext(){return this._hostContext}set ontoolinput(n){this.setNotificationHandler(K8,i=>n(i.params))}set ontoolinputpartial(n){this.setNotificationHandler(J8,i=>n(i.params))}set ontoolresult(n){this.setNotificationHandler(i9,i=>n(i.params))}set ontoolcancelled(n){this.setNotificationHandler(G8,i=>n(i.params))}set onhostcontextchanged(n){this.setNotificationHandler(o9,i=>{this._hostContext={...this._hostContext,...i.params},n(i.params)})}set onteardown(n){this.setRequestHandler(Q8,(i,r)=>n(i.params,r))}set oncalltool(n){this.setRequestHandler(Np,(i,r)=>n(i.params,r))}set onlisttools(n){this.setRequestHandler(Dp,(i,r)=>n(i.params,r))}assertCapabilityForMethod(n){}assertRequestHandlerCapability(n){switch(n){case"tools/call":case"tools/list":if(!this._capabilities.tools)throw Error(`Client does not support tool capability (required for ${n})`);return;case"ping":case"ui/resource-teardown":return;default:throw Error(`No handler for method ${n} registered`)}}assertNotificationCapability(n){}assertTaskCapability(n){throw Error("Tasks are not supported in MCP Apps")}assertTaskHandlerCapability(n){throw Error("Task handlers are not supported in MCP Apps")}async callServerTool(n,i){return await this.request({method:"tools/call",params:n},to,i)}sendMessage(n,i){return this.request({method:"ui/message",params:n},V8,i)}sendLog(n){return this.notification({method:"notifications/message",params:n})}updateModelContext(n,i){return this.request({method:"ui/update-model-context",params:n},Bl,i)}openLink(n,i){return this.request({method:"ui/open-link",params:n},W8,i)}requestDisplayMode(n,i){return this.request({method:"ui/request-display-mode",params:n},n9,i)}sendSizeChanged(n){return this.notification({method:"ui/notifications/size-changed",params:n})}setupSizeChangedNotifications(){let n=!1,i=0,r=0,o=()=>{n||(n=!0,requestAnimationFrame(()=>{n=!1;let a=document.documentElement,l=a.style.width,u=a.style.height;a.style.width="fit-content",a.style.height="fit-content";let c=a.getBoundingClientRect();a.style.width=l,a.style.height=u;let d=window.innerWidth-a.clientWidth,f=Math.ceil(c.width+d),p=Math.ceil(c.height);(f!==i||p!==r)&&(i=f,r=p,this.sendSizeChanged({width:f,height:p}))}))};o();let s=new ResizeObserver(o);return s.observe(document.documentElement),s.observe(document.body),()=>s.disconnect()}async connect(n=new Pp(window.parent,window.parent),i){await super.connect(n);try{let r=await this.request({method:"ui/initialize",params:{appCapabilities:this._capabilities,appInfo:this._appInfo,protocolVersion:pR}},s9,i);if(r===void 0)throw Error(`Server sent invalid initialize result: ${r}`);this._hostCapabilities=r.hostCapabilities,this._hostInfo=r.hostInfo,this._hostContext=r.hostContext,await this.notification({method:"ui/notifications/initialized"}),this.options?.autoResize&&this.setupSizeChangedNotifications()}catch(r){throw this.close(),r}}};var a9='<svg viewBox="0 0 24 24" aria-hidden="true" focusable="false"><path d="M7 10l5 5 5-5z"></path></svg>',l9='<svg viewBox="0 0 24 24" aria-hidden="true" focusable="false"><path d="M7 14l5-5 5 5z"></path></svg>';function u9(e,t){if(!e)return;let n=t?"Collapse":"Expand";e.title=n,e.setAttribute("aria-label",n),e.innerHTML=t?l9:a9}function c9(e,t){e&&(e.classList.toggle("expanded",t),e.classList.toggle("collapsed",!t))}function d9(e){let{shell:t,toggleButton:n,initialExpanded:i,onToggle:r,onScrollAfterExpand:o,onRender:s}=e,a=i,l=!1,u=typeof o=="function",c=p=>{let h=a;a=p,c9(t,a),u9(n,a),!h&&a&&(l=!1)},d=()=>{c(!a),r?.(a),s?.()},f=p=>{if(!a||l)return;let h=p?.target instanceof Node?p.target:null;h&&t&&!t.contains(h)||(l=!0,o?.())};return c(a),n?.addEventListener("click",d),u&&(t?.addEventListener("scroll",f,{passive:!0}),document.addEventListener("scroll",f,{passive:!0,capture:!0})),{getExpanded:()=>a,setExpanded:c,toggle:d,dispose:()=>{n?.removeEventListener("click",d),u&&(t?.removeEventListener("scroll",f),document.removeEventListener("scroll",f,!0))}}}function B$(e){let{shell:t,compactRow:n,initialExpanded:i,onToggle:r,onScrollAfterExpand:o,onRender:s}=e,a=d9({shell:t,toggleButton:null,initialExpanded:i,onToggle:c=>{n?.setAttribute("aria-expanded",String(c)),r?.(c)},onScrollAfterExpand:o,onRender:s});n?.setAttribute("aria-expanded",String(i));let l=()=>{a.toggle()},u=c=>{c.key!=="Enter"&&c.key!==" "||(c.preventDefault(),a.toggle())};return n?.addEventListener("click",l),n?.addEventListener("keydown",u),{getExpanded:a.getExpanded,setExpanded:a.setExpanded,toggle:a.toggle,dispose:()=>{n?.removeEventListener("click",l),n?.removeEventListener("keydown",u),a.dispose()}}}var U$="mcp-device:widget-state",Zm="__mcp_device_widget_id__:";function f9(){let e=typeof globalThis.crypto=="object"?globalThis.crypto:void 0;return typeof e?.randomUUID=="function"?e.randomUUID():`widget-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`}function p9(e){let t=e.indexOf(Zm);if(t===-1)return;let n=e.slice(t+Zm.length).split("|",1)[0];if(n)try{return decodeURIComponent(n)}catch{return n}}function h9(){if(typeof window>"u")return"unknown-instance";let e=typeof window.name=="string"?window.name:"",t=p9(e);if(t)return t;let n=f9(),i=`${Zm}${encodeURIComponent(n)}`;try{window.name=e?`${e}|${i}`:i}catch{}return n}function m9(){if(typeof window>"u")return`${U$}:unknown`;let e=window.location.pathname||"unknown",t=h9();return`${U$}:${e}:${encodeURIComponent(t)}`}function g9(){if(!(typeof window>"u"))try{return window.sessionStorage}catch{return}}function b9(){return typeof window<"u"&&typeof window.openai?.setWidgetState=="function"}function j$(e){if(!b9()){let t=g9(),n=m9();return{read(){if(t)try{let i=t.getItem(n);if(!i)return;let o=JSON.parse(i)?.payload;return o===void 0||e&&!e(o)?void 0:o}catch{return}},write(i){if(t)try{t.setItem(n,JSON.stringify({payload:i}))}catch{}}}}return{read(){try{let t=window.openai?.widgetState;if(t==null)return;let n=t.payload;return n===void 0||e&&!e(n)?void 0:n}catch{return}},write(t){try{window.openai?.setWidgetState?.({payload:t})}catch{}}}}function fn(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function la(e){let t=e.variant??"ready",n=`compact-row compact-row--${t}`,i=e.id?` id="${fn(e.id)}"`:"",o=e.interactive??t==="ready"?' role="button" tabindex="0"':"",s=typeof e.expanded=="boolean"?` aria-expanded="${String(e.expanded)}"`:"",a=e.expandable?'<svg class="compact-chevron" viewBox="0 0 24 24" aria-hidden="true"><path d="M10 6l6 6-6 6z"/></svg>':"",l=e.filename?`<span class="compact-filename">${fn(e.filename)}</span>`:"";return`<div class="${n}"${i}${o}${s}>${a}<span class="compact-label">${fn(e.label)}</span>${l}</div>`}function ic(e){return typeof e=="object"&&e!==null}function Z$(e,t){if(!ic(e))return;(e.theme==="light"||e.theme==="dark")&&P$(e.theme);let n=ic(e.styles)?e.styles:null,i=ic(n?.variables)?n.variables:null,r=ic(n?.css)?n.css:null,o=typeof r?.fonts=="string"?r.fonts:null;i&&L$(i),o&&F$(o),typeof e.initiallyExpanded=="boolean"&&(t.expanded=e.initiallyExpanded),typeof e.compact=="boolean"&&typeof t.compact=="boolean"&&(t.compact=e.compact),typeof e.hideSummaryRow=="boolean"&&(t.hideSummaryRow=e.hideSummaryRow,e.hideSummaryRow&&(t.expanded=!0,typeof t.compact=="boolean"&&(t.compact=!0)))}async function H$(e){let{app:t,chrome:n,onContextApplied:i,onConnected:r}=e;t.onhostcontextchanged=s=>{Z$(s,n),i?.()},await t.connect();let o=t.getHostContext();o&&(Z$(o,n),i?.()),await r?.()}function v9(e){let t={};if(!e)return t;for(let[n,i]of Object.entries(e))(typeof i=="string"||typeof i=="number"||typeof i=="boolean"||i===null)&&(t[n]=i);return t}function q$(e,t){let n=t.baseParams??{};return(i,r={})=>{e("track_ui_event",{event:i,component:t.component,params:{...n,...v9(r)}}).catch(()=>{})}}var fC=fy(dC(),1);var rt=fC.default;function pC(e){let t=e.regex,n={},i={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[n]}]};Object.assign(n,{className:"variable",variants:[{begin:t.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},i]});let r={className:"subst",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},o=e.inherit(e.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:"comment"}}),s={begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},a={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,n,r]};r.contains.push(a);let l={match:/\\"/},u={className:"string",begin:/'/,end:/'/},c={match:/\\'/},d={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,n]},f=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],p=e.SHEBANG({binary:`(${f.join("|")})`,relevance:10}),h={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},m=["if","then","else","elif","fi","time","for","while","until","in","do","done","case","esac","coproc","function","select"],g=["true","false"],b={match:/(\/[a-z._-]+)+/},v=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],y=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias"],x=["autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp"],C=["chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"];return{name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:m,literal:g,built_in:[...v,...y,"set","shopt",...x,...C]},contains:[p,e.SHEBANG(),h,d,o,s,b,a,l,u,c,n]}}var l5=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),u5=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],c5=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],d5=[...u5,...c5],f5=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),p5=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),h5=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),m5=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function hC(e){let t=e.regex,n=l5(e),i={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},r="and or not only",o=/@-?\w[\w]*(-\w+)*/,s="[a-zA-Z-][a-zA-Z0-9_-]*",a=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[n.BLOCK_COMMENT,i,n.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\."+s,relevance:0},n.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+p5.join("|")+")"},{begin:":(:)?("+h5.join("|")+")"}]},n.CSS_VARIABLE,{className:"attribute",begin:"\\b("+m5.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[n.BLOCK_COMMENT,n.HEXCOLOR,n.IMPORTANT,n.CSS_NUMBER_MODE,...a,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...a,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},n.FUNCTION_DISPATCH]},{begin:t.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:o},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:r,attribute:f5.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...a,n.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+d5.join("|")+")\\b"}]}}function mC(e){let o={keyword:["break","case","chan","const","continue","default","defer","else","fallthrough","for","func","go","goto","if","import","interface","map","package","range","return","select","struct","switch","type","var"],type:["bool","byte","complex64","complex128","error","float32","float64","int8","int16","int32","int64","string","uint8","uint16","uint32","uint64","int","uint","uintptr","rune"],literal:["true","false","iota","nil"],built_in:["append","cap","close","complex","copy","imag","len","make","new","panic","print","println","real","recover","delete"]};return{name:"Go",aliases:["golang"],keywords:o,illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"string",variants:[e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{begin:"`",end:"`"}]},{className:"number",variants:[{match:/-?\b0[xX]\.[a-fA-F0-9](_?[a-fA-F0-9])*[pP][+-]?\d(_?\d)*i?/,relevance:0},{match:/-?\b0[xX](_?[a-fA-F0-9])+((\.([a-fA-F0-9](_?[a-fA-F0-9])*)?)?[pP][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b0[oO](_?[0-7])*i?/,relevance:0},{match:/-?\.\d(_?\d)*([eE][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b\d(_?\d)*(\.(\d(_?\d)*)?)?([eE][+-]?\d(_?\d)*)?i?/,relevance:0}]},{begin:/:=/},{className:"function",beginKeywords:"func",end:"\\s*(\\{|$)",excludeEnd:!0,contains:[e.TITLE_MODE,{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:o,illegal:/["']/}]}]}}var go="[0-9](_*[0-9])*",uc=`\\.(${go})`,cc="[0-9a-fA-F](_*[0-9a-fA-F])*",gC={className:"number",variants:[{begin:`(\\b(${go})((${uc})|\\.)?|(${uc}))[eE][+-]?(${go})[fFdD]?\\b`},{begin:`\\b(${go})((${uc})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${uc})[fFdD]?\\b`},{begin:`\\b(${go})[fFdD]\\b`},{begin:`\\b0[xX]((${cc})\\.?|(${cc})?\\.(${cc}))[pP][+-]?(${go})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${cc})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function bC(e,t,n){return n===-1?"":e.replace(t,i=>bC(e,t,n-1))}function vC(e){let t=e.regex,n="[\xC0-\u02B8a-zA-Z_$][\xC0-\u02B8a-zA-Z_$0-9]*",i=n+bC("(?:<"+n+"~~~(?:\\s*,\\s*"+n+"~~~)*>)?",/~~~/g,2),l={keyword:["synchronized","abstract","private","var","static","if","const ","for","while","strictfp","finally","protected","import","native","final","void","enum","else","break","transient","catch","instanceof","volatile","case","assert","package","default","public","try","switch","continue","throws","protected","public","private","module","requires","exports","do","sealed","yield","permits","goto","when"],literal:["false","true","null"],type:["char","boolean","long","float","int","byte","short","double"],built_in:["super","this"]},u={className:"meta",begin:"@"+n,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},c={className:"params",begin:/\(/,end:/\)/,keywords:l,relevance:0,contains:[e.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:l,illegal:/<\/|#/,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:"string",contains:[e.BACKSLASH_ESCAPE]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,n],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{begin:[t.concat(/(?!else)/,n),/\s+/,n,/\s+/,/=(?!=)/],className:{1:"type",3:"variable",5:"operator"}},{begin:[/record/,/\s+/,n],className:{1:"keyword",3:"title.class"},contains:[c,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new throw return else",relevance:0},{begin:["(?:"+i+"\\s+)",e.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:"title.function"},keywords:l,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:l,relevance:0,contains:[u,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,gC,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},gC,u]}}var yC="[A-Za-z$_][0-9A-Za-z$_]*",g5=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],b5=["true","false","null","undefined","NaN","Infinity"],kC=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],xC=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],_C=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],v5=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],y5=[].concat(_C,kC,xC);function wC(e){let t=e.regex,n=(Z,{after:ee})=>{let ue="</"+Z[0].slice(1);return Z.input.indexOf(ue,ee)!==-1},i=yC,r={begin:"<>",end:"</>"},o=/<[A-Za-z0-9\\._:-]+\s*\/>/,s={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(Z,ee)=>{let ue=Z[0].length+Z.index,_=Z.input[ue];if(_==="<"||_===","){ee.ignoreMatch();return}_===">"&&(n(Z,{after:ue})||ee.ignoreMatch());let S,O=Z.input.substring(ue);if(S=O.match(/^\s*=/)){ee.ignoreMatch();return}if((S=O.match(/^\s+extends\s+/))&&S.index===0){ee.ignoreMatch();return}}},a={$pattern:yC,keyword:g5,literal:b5,built_in:y5,"variable.language":v5},l="[0-9](_?[0-9])*",u=`\\.(${l})`,c="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",d={className:"number",variants:[{begin:`(\\b(${c})((${u})|\\.)?|(${u}))[eE][+-]?(${l})\\b`},{begin:`\\b(${c})\\b((${u})\\b|\\.)?|(${u})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},f={className:"subst",begin:"\\$\\{",end:"\\}",keywords:a,contains:[]},p={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:"xml"}},h={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:"css"}},m={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:"graphql"}},g={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,f]},v={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:i+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},y=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,h,m,g,{match:/\$\d+/},d];f.contains=y.concat({begin:/\{/,end:/\}/,keywords:a,contains:["self"].concat(y)});let x=[].concat(v,f.contains),C=x.concat([{begin:/(\s*)\(/,end:/\)/,keywords:a,contains:["self"].concat(x)}]),A={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,contains:C},D={variants:[{match:[/class/,/\s+/,i,/\s+/,/extends/,/\s+/,t.concat(i,"(",t.concat(/\./,i),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,i],scope:{1:"keyword",3:"title.class"}}]},M={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...kC,...xC]}},V={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},me={variants:[{match:[/function/,/\s+/,i,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[A],illegal:/%/},et={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function it(Z){return t.concat("(?!",Z.join("|"),")")}let je={match:t.concat(/\b/,it([..._C,"super","import"].map(Z=>`${Z}\\s*\\(`)),i,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},Me={begin:t.concat(/\./,t.lookahead(t.concat(i,/(?![0-9A-Za-z$_(])/))),end:i,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},se={match:[/get|set/,/\s+/,i,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},A]},I="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",W={match:[/const|var|let/,/\s+/,i,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(I)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[A]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:a,exports:{PARAMS_CONTAINS:C,CLASS_REFERENCE:M},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),V,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,h,m,g,v,{match:/\$\d+/},d,M,{scope:"attr",match:i+t.lookahead(":"),relevance:0},W,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[v,e.REGEXP_MODE,{className:"function",begin:I,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,contains:C}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:r.begin,end:r.end},{match:o},{begin:s.begin,"on:begin":s.isTrulyOpeningTag,end:s.end}],subLanguage:"xml",contains:[{begin:s.begin,end:s.end,skip:!0,contains:["self"]}]}]},me,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[A,e.inherit(e.TITLE_MODE,{begin:i,className:"title.function"})]},{match:/\.\.\./,relevance:0},Me,{match:"\\$"+i,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[A]},je,et,D,se,{match:/\$[(.]/}]}}function SC(e){let t={className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},n={match:/[{}[\],:]/,className:"punctuation",relevance:0},i=["true","false","null"],r={scope:"literal",beginKeywords:i.join(" ")};return{name:"JSON",aliases:["jsonc"],keywords:{literal:i},contains:[t,n,e.QUOTE_STRING_MODE,r,e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}function EC(e){let t=e.regex,n={begin:/<\/?[A-Za-z_]/,end:">",subLanguage:"xml",relevance:0},i={begin:"^[-\\*]{3,}",end:"$"},r={className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},o={className:"bullet",begin:"^[ ]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},s={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]},a=/[A-Za-z][A-Za-z0-9+.-]*/,l={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:t.concat(/\[.+?\]\(/,a,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}]},u={className:"strong",contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},c={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},d=e.inherit(u,{contains:[]}),f=e.inherit(c,{contains:[]});u.contains.push(f),c.contains.push(d);let p=[n,l];return[u,c,d,f].forEach(b=>{b.contains=b.contains.concat(p)}),p=p.concat(u,c),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:p},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:p}]}]},n,o,u,c,{className:"quote",begin:"^>\\s+",contains:p,end:"$"},r,i,l,s,{scope:"literal",match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}function $C(e){let t=e.regex,n=/[\p{XID_Start}_]\p{XID_Continue}*/u,i=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],a={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:i,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},l={className:"meta",begin:/^(>>>|\.\.\.) /},u={className:"subst",begin:/\{/,end:/\}/,keywords:a,illegal:/#/},c={begin:/\{\{/,relevance:0},d={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,l],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,l],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,l,c,u]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,l,c,u]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,c,u]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,c,u]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},f="[0-9](_?[0-9])*",p=`(\\b(${f}))?\\.(${f})|\\b(${f})\\.`,h=`\\b|${i.join("|")}`,m={className:"number",relevance:0,variants:[{begin:`(\\b(${f})|(${p}))[eE][+-]?(${f})[jJ]?(?=${h})`},{begin:`(${p})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${h})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${h})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${h})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${h})`},{begin:`\\b(${f})[jJ](?=${h})`}]},g={className:"comment",begin:t.lookahead(/# type:/),end:/$/,keywords:a,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},b={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,contains:["self",l,m,d,e.HASH_COMMENT_MODE]}]};return u.contains=[d,m,l],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:a,illegal:/(<\/|\?)|=>/,contains:[l,m,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},d,g,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[b]},{variants:[{match:[/\bclass/,/\s+/,n,/\s*/,/\(\s*/,n,/\s*\)/]},{match:[/\bclass/,/\s+/,n]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[m,b,d]}]}}function CC(e){let t=e.regex,n="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",i=t.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),r=t.concat(i,/(::\w+)*/),s={"variable.constant":["__FILE__","__LINE__","__ENCODING__"],"variable.language":["self","super"],keyword:["alias","and","begin","BEGIN","break","case","class","defined","do","else","elsif","end","END","ensure","for","if","in","module","next","not","or","redo","require","rescue","retry","return","then","undef","unless","until","when","while","yield",...["include","extend","prepend","public","private","protected","raise","throw"]],built_in:["proc","lambda","attr_accessor","attr_reader","attr_writer","define_method","private_constant","module_function"],literal:["true","false","nil"]},a={className:"doctag",begin:"@[A-Za-z]+"},l={begin:"#<",end:">"},u=[e.COMMENT("#","$",{contains:[a]}),e.COMMENT("^=begin","^=end",{contains:[a],relevance:10}),e.COMMENT("^__END__",e.MATCH_NOTHING_RE)],c={className:"subst",begin:/#\{/,end:/\}/,keywords:s},d={className:"string",contains:[e.BACKSLASH_ESCAPE,c],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:/%[qQwWx]?\(/,end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{begin:/%[qQwWx]?\{/,end:/\}/},{begin:/%[qQwWx]?</,end:/>/},{begin:/%[qQwWx]?\//,end:/\//},{begin:/%[qQwWx]?%/,end:/%/},{begin:/%[qQwWx]?-/,end:/-/},{begin:/%[qQwWx]?\|/,end:/\|/},{begin:/\B\?(\\\d{1,3})/},{begin:/\B\?(\\x[A-Fa-f0-9]{1,2})/},{begin:/\B\?(\\u\{?[A-Fa-f0-9]{1,6}\}?)/},{begin:/\B\?(\\M-\\C-|\\M-\\c|\\c\\M-|\\M-|\\C-\\M-)[\x20-\x7e]/},{begin:/\B\?\\(c|C-)[\x20-\x7e]/},{begin:/\B\?\\?\S/},{begin:t.concat(/<<[-~]?'?/,t.lookahead(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/)),contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[e.BACKSLASH_ESCAPE,c]})]}]},f="[1-9](_?[0-9])*|0",p="[0-9](_?[0-9])*",h={className:"number",relevance:0,variants:[{begin:`\\b(${f})(\\.(${p}))?([eE][+-]?(${p})|r)?i?\\b`},{begin:"\\b0[dD][0-9](_?[0-9])*r?i?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*r?i?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*r?i?\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b"},{begin:"\\b0(_?[0-7])+r?i?\\b"}]},m={variants:[{match:/\(\)/},{className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:s}]},A=[d,{variants:[{match:[/class\s+/,r,/\s+<\s+/,r]},{match:[/\b(class|module)\s+/,r]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:s},{match:[/(include|extend)\s+/,r],scope:{2:"title.class"},keywords:s},{relevance:0,match:[r,/\.new[. (]/],scope:{1:"title.class"}},{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},{relevance:0,match:i,scope:"title.class"},{match:[/def/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[m]},{begin:e.IDENT_RE+"::"},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[d,{begin:n}],relevance:0},h,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{className:"params",begin:/\|(?!=)/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:s},{begin:"("+e.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{className:"regexp",contains:[e.BACKSLASH_ESCAPE,c],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:/%r\{/,end:/\}[a-z]*/},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(l,u),relevance:0}].concat(l,u);c.contains=A,m.contains=A;let me=[{begin:/^\s*=>/,starts:{end:"$",contains:A}},{className:"meta.prompt",begin:"^("+"[>?]>"+"|"+"[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]"+"|"+"(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>"+")(?=[ ])",starts:{end:"$",keywords:s,contains:A}}];return u.unshift(l),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:s,illegal:/\/\*/,contains:[e.SHEBANG({binary:"ruby"})].concat(me).concat(u).concat(A)}}function TC(e){let t=e.regex,n=/(r#)?/,i=t.concat(n,e.UNDERSCORE_IDENT_RE),r=t.concat(n,e.IDENT_RE),o={className:"title.function.invoke",relevance:0,begin:t.concat(/\b/,/(?!let|for|while|if|else|match\b)/,r,t.lookahead(/\s*\(/))},s="([ui](8|16|32|64|128|size)|f(32|64))?",a=["abstract","as","async","await","become","box","break","const","continue","crate","do","dyn","else","enum","extern","false","final","fn","for","if","impl","in","let","loop","macro","match","mod","move","mut","override","priv","pub","ref","return","self","Self","static","struct","super","trait","true","try","type","typeof","union","unsafe","unsized","use","virtual","where","while","yield"],l=["true","false","Some","None","Ok","Err"],u=["drop ","Copy","Send","Sized","Sync","Drop","Fn","FnMut","FnOnce","ToOwned","Clone","Debug","PartialEq","PartialOrd","Eq","Ord","AsRef","AsMut","Into","From","Default","Iterator","Extend","IntoIterator","DoubleEndedIterator","ExactSizeIterator","SliceConcatExt","ToString","assert!","assert_eq!","bitflags!","bytes!","cfg!","col!","concat!","concat_idents!","debug_assert!","debug_assert_eq!","env!","eprintln!","panic!","file!","format!","format_args!","include_bytes!","include_str!","line!","local_data_key!","module_path!","option_env!","print!","println!","select!","stringify!","try!","unimplemented!","unreachable!","vec!","write!","writeln!","macro_rules!","assert_ne!","debug_assert_ne!"],c=["i8","i16","i32","i64","i128","isize","u8","u16","u32","u64","u128","usize","f32","f64","str","char","bool","Box","Option","Result","String","Vec"];return{name:"Rust",aliases:["rs"],keywords:{$pattern:e.IDENT_RE+"!?",type:c,keyword:a,literal:l,built_in:u},illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.COMMENT("/\\*","\\*/",{contains:["self"]}),e.inherit(e.QUOTE_STRING_MODE,{begin:/b?"/,illegal:null}),{className:"symbol",begin:/'[a-zA-Z_][a-zA-Z0-9_]*(?!')/},{scope:"string",variants:[{begin:/b?r(#*)"(.|\n)*?"\1(?!#)/},{begin:/b?'/,end:/'/,contains:[{scope:"char.escape",match:/\\('|\w|x\w{2}|u\w{4}|U\w{8})/}]}]},{className:"number",variants:[{begin:"\\b0b([01_]+)"+s},{begin:"\\b0o([0-7_]+)"+s},{begin:"\\b0x([A-Fa-f0-9_]+)"+s},{begin:"\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)"+s}],relevance:0},{begin:[/fn/,/\s+/,i],className:{1:"keyword",3:"title.function"}},{className:"meta",begin:"#!?\\[",end:"\\]",contains:[{className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE]}]},{begin:[/let/,/\s+/,/(?:mut\s+)?/,i],className:{1:"keyword",3:"keyword",4:"variable"}},{begin:[/for/,/\s+/,i,/\s+/,/in/],className:{1:"keyword",3:"variable",5:"keyword"}},{begin:[/type/,/\s+/,i],className:{1:"keyword",3:"title.class"}},{begin:[/(?:trait|enum|struct|union|impl|for)/,/\s+/,i],className:{1:"keyword",3:"title.class"}},{begin:e.IDENT_RE+"::",keywords:{keyword:"Self",built_in:u,type:c}},{className:"punctuation",begin:"->"},o]}}function IC(e){let t=e.regex,n=e.COMMENT("--","$"),i={scope:"string",variants:[{begin:/'/,end:/'/,contains:[{match:/''/}]}]},r={begin:/"/,end:/"/,contains:[{match:/""/}]},o=["true","false","unknown"],s=["double precision","large object","with timezone","without timezone"],a=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],l=["add","asc","collation","desc","final","first","last","view"],u=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year"],c=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],d=["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"],f=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],p=c,h=[...u,...l].filter(C=>!c.includes(C)),m={scope:"variable",match:/@[a-z0-9][a-z0-9_]*/},g={scope:"operator",match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},b={match:t.concat(/\b/,t.either(...p),/\s*\(/),relevance:0,keywords:{built_in:p}};function v(C){return t.concat(/\b/,t.either(...C.map(A=>A.replace(/\s+/,"\\s+"))),/\b/)}let y={scope:"keyword",match:v(f),relevance:0};function x(C,{exceptions:A,when:D}={}){let M=D;return A=A||[],C.map(V=>V.match(/\|\d+$/)||A.includes(V)?V:M(V)?`${V}|0`:V)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:x(h,{when:C=>C.length<3}),literal:o,type:a,built_in:d},contains:[{scope:"type",match:v(s)},y,b,m,i,r,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,n,g]}}var dc="[A-Za-z$_][0-9A-Za-z$_]*",AC=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],MC=["true","false","null","undefined","NaN","Infinity"],zC=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],DC=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],NC=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],OC=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],RC=[].concat(NC,zC,DC);function k5(e){let t=e.regex,n=(Z,{after:ee})=>{let ue="</"+Z[0].slice(1);return Z.input.indexOf(ue,ee)!==-1},i=dc,r={begin:"<>",end:"</>"},o=/<[A-Za-z0-9\\._:-]+\s*\/>/,s={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(Z,ee)=>{let ue=Z[0].length+Z.index,_=Z.input[ue];if(_==="<"||_===","){ee.ignoreMatch();return}_===">"&&(n(Z,{after:ue})||ee.ignoreMatch());let S,O=Z.input.substring(ue);if(S=O.match(/^\s*=/)){ee.ignoreMatch();return}if((S=O.match(/^\s+extends\s+/))&&S.index===0){ee.ignoreMatch();return}}},a={$pattern:dc,keyword:AC,literal:MC,built_in:RC,"variable.language":OC},l="[0-9](_?[0-9])*",u=`\\.(${l})`,c="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",d={className:"number",variants:[{begin:`(\\b(${c})((${u})|\\.)?|(${u}))[eE][+-]?(${l})\\b`},{begin:`\\b(${c})\\b((${u})\\b|\\.)?|(${u})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},f={className:"subst",begin:"\\$\\{",end:"\\}",keywords:a,contains:[]},p={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:"xml"}},h={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:"css"}},m={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:"graphql"}},g={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,f]},v={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:i+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},y=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,h,m,g,{match:/\$\d+/},d];f.contains=y.concat({begin:/\{/,end:/\}/,keywords:a,contains:["self"].concat(y)});let x=[].concat(v,f.contains),C=x.concat([{begin:/(\s*)\(/,end:/\)/,keywords:a,contains:["self"].concat(x)}]),A={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,contains:C},D={variants:[{match:[/class/,/\s+/,i,/\s+/,/extends/,/\s+/,t.concat(i,"(",t.concat(/\./,i),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,i],scope:{1:"keyword",3:"title.class"}}]},M={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...zC,...DC]}},V={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},me={variants:[{match:[/function/,/\s+/,i,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[A],illegal:/%/},et={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function it(Z){return t.concat("(?!",Z.join("|"),")")}let je={match:t.concat(/\b/,it([...NC,"super","import"].map(Z=>`${Z}\\s*\\(`)),i,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},Me={begin:t.concat(/\./,t.lookahead(t.concat(i,/(?![0-9A-Za-z$_(])/))),end:i,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},se={match:[/get|set/,/\s+/,i,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},A]},I="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",W={match:[/const|var|let/,/\s+/,i,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(I)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[A]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:a,exports:{PARAMS_CONTAINS:C,CLASS_REFERENCE:M},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),V,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,h,m,g,v,{match:/\$\d+/},d,M,{scope:"attr",match:i+t.lookahead(":"),relevance:0},W,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[v,e.REGEXP_MODE,{className:"function",begin:I,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,contains:C}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:r.begin,end:r.end},{match:o},{begin:s.begin,"on:begin":s.isTrulyOpeningTag,end:s.end}],subLanguage:"xml",contains:[{begin:s.begin,end:s.end,skip:!0,contains:["self"]}]}]},me,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[A,e.inherit(e.TITLE_MODE,{begin:i,className:"title.function"})]},{match:/\.\.\./,relevance:0},Me,{match:"\\$"+i,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[A]},je,et,D,se,{match:/\$[(.]/}]}}function PC(e){let t=e.regex,n=k5(e),i=dc,r=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],o={begin:[/namespace/,/\s+/,e.IDENT_RE],beginScope:{1:"keyword",3:"title.class"}},s={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:r},contains:[n.exports.CLASS_REFERENCE]},a={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},l=["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"],u={$pattern:dc,keyword:AC.concat(l),literal:MC,built_in:RC.concat(r),"variable.language":OC},c={className:"meta",begin:"@"+i},d=(m,g,b)=>{let v=m.contains.findIndex(y=>y.label===g);if(v===-1)throw new Error("can not find mode to replace");m.contains.splice(v,1,b)};Object.assign(n.keywords,u),n.exports.PARAMS_CONTAINS.push(c);let f=n.contains.find(m=>m.scope==="attr"),p=Object.assign({},f,{match:t.concat(i,t.lookahead(/\s*\?:/))});n.exports.PARAMS_CONTAINS.push([n.exports.CLASS_REFERENCE,f,p]),n.contains=n.contains.concat([c,o,s,p]),d(n,"shebang",e.SHEBANG()),d(n,"use_strict",a);let h=n.contains.find(m=>m.label==="func.def");return h.relevance=0,Object.assign(n,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),n}function Ym(e){let t=e.regex,n=t.concat(/[\p{L}_]/u,t.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),i=/[\p{L}0-9._:-]+/u,r={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},o={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},s=e.inherit(o,{begin:/\(/,end:/\)/}),a=e.inherit(e.APOS_STRING_MODE,{className:"string"}),l=e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),u={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:i,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[r]},{begin:/'/,end:/'/,contains:[r]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,relevance:10,contains:[o,l,a,s,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[o,s,l,a]}]}]},e.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},r,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[l]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[u],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[u],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:t.concat(/</,t.lookahead(t.concat(n,t.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:n,relevance:0,starts:u}]},{className:"tag",begin:t.concat(/<\//,t.lookahead(t.concat(n,/>/))),contains:[{className:"name",begin:n,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}function fc(e){let t="true false yes no null",n="[\\w#;/?:@&=+$,.~*'()[\\]]+",i={className:"attr",variants:[{begin:/[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/},{begin:/"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/},{begin:/'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/}]},r={className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},o={className:"string",relevance:0,begin:/'/,end:/'/,contains:[{match:/''/,scope:"char.escape",relevance:0}]},s={className:"string",relevance:0,variants:[{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,r]},a=e.inherit(s,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),f={className:"number",begin:"\\b"+"[0-9]{4}(-[0-9][0-9]){0,2}"+"([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?"+"(\\.[0-9]*)?"+"([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?"+"\\b"},p={end:",",endsWithParent:!0,excludeEnd:!0,keywords:t,relevance:0},h={begin:/\{/,end:/\}/,contains:[p],illegal:"\\n",relevance:0},m={begin:"\\[",end:"\\]",contains:[p],illegal:"\\n",relevance:0},g=[i,{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+n},{className:"type",begin:"!<"+n+">"},{className:"type",begin:"!"+n},{className:"type",begin:"!!"+n},{className:"meta",begin:"&"+e.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+e.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:t,keywords:{literal:t}},f,{className:"number",begin:e.C_NUMBER_RE+"\\b",relevance:0},h,m,o,s],b=[...g];return b.pop(),b.push(a),p.contains=b,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:g}}rt.registerLanguage("bash",pC);rt.registerLanguage("css",hC);rt.registerLanguage("go",mC);rt.registerLanguage("java",vC);rt.registerLanguage("javascript",wC);rt.registerLanguage("json",SC);rt.registerLanguage("markdown",EC);rt.registerLanguage("python",$C);rt.registerLanguage("ruby",CC);rt.registerLanguage("rust",TC);rt.registerLanguage("sql",IC);rt.registerLanguage("typescript",PC);rt.registerLanguage("xml",Ym);rt.registerLanguage("html",Ym);rt.registerLanguage("yaml",fc);rt.registerLanguage("toml",fc);rt.registerLanguage("ini",fc);function St(e){return fn(e)}function pc(e,t){let n=(t||"").toLowerCase();if(!n||n==="text")return St(e);try{return rt.getLanguage(n)?rt.highlight(e,{language:n,ignoreIllegals:!0}).value:rt.highlightAuto(e).value}catch{return St(e)}}function Qe(e){return e.replace(/^\[Reading [^\]]+\]\r?\n(?:\r?\n)?/,"")}function Vt(e){let t=e.match(/^\[Reading (\d+) lines from (?:line )?(\d+|start) \(total: (\d+) lines/);if(!t)return;let n=Number.parseInt(t[1],10),i=t[2]==="start",r=i?0:Number.parseInt(t[2],10),o=i?1:r,s=Number.parseInt(t[3],10);return{fromLine:o,toLine:o+n-1,totalLines:s,isPartial:n<s,readOffset:r}}function hc(e){return e.availableDisplayModes?.includes("fullscreen")?{canFullscreen:!0}:{canFullscreen:!1,reason:"Fullscreen editing is unavailable in this host."}}function LC(e){return Vt(e)?.isPartial===!0}function Mr(e){return typeof e=="object"&&e!==null}function Ut(e){let t=e.trim().replace(/\\/g,"/"),n=t.split("/").pop()??t,i=n.lastIndexOf(".");return i<=0||i===n.length-1?"none":n.slice(i+1).toLowerCase()}function mc(e){return Mr(e)?typeof e.fileName=="string"&&typeof e.filePath=="string"&&typeof e.fileType=="string":!1}function Qm(e,t){return{...e,content:t}}function Kt(e){if(!Mr(e))return;let t=e.content;if(Array.isArray(t)){for(let n of t)if(Mr(n)&&n.type==="text"&&typeof n.text=="string"&&n.text.trim().length>0)return n.text}}function x5(e){if(!Mr(e))return;let t=e.content;if(!Array.isArray(t))return;let n=[];for(let i of t)Mr(i)&&i.type==="text"&&typeof i.text=="string"&&i.text.trim().length>0&&n.push(i.text);return n.length>0?n.join(`
89
+ `):void 0}function gc(e){if(!Mr(e))return;let t=mc(e.structuredContent)?e.structuredContent:mc(e)?e:null;if(t)return Qm(t,x5(e)??"")}function FC(e){if(!Mr(e))throw new Error("edit_block did not return a valid result.");if(e.isError===!0){let t=Kt(e)??"";throw new Error(t||"edit_block failed.")}if(!Mr(e.structuredContent)){let t=Kt(e)??"";throw new Error(t||"edit_block did not confirm success.")}}function zr(e){return/^https?:\/\//i.test(e)}function BC(e){return e.replace(/\\/g,"/").split("/").filter(Boolean).map(i=>St(i)).join(' <span class="breadcrumb-sep">\u203A</span> ')}function e0(e){let t=Qe(e);if(t==="")return 0;let n=t.split(`
90
+ `);return n[n.length-1]===""?n.length-1:n.length}function t0(e){let t=e.split(`
91
+ `),n=[],i=[];for(let a of t)/^\[(DIR|FILE|DENIED|NOT_FOUND|WARNING)\]/.test(a.trim())?i.push(a.trim()):i.length===0&&n.push(a);let r=[];for(let a of i){if(a.startsWith("[WARNING]")){let p=a.replace(/^\[WARNING\]\s*/,""),h=p.indexOf(":"),m=h>=0?p.slice(0,h).trim():"",g=h>=0?p.slice(h+1).trim():p,b=m.replace(/\\/g,"/").split("/").filter(Boolean);r.push({name:m,fullPath:m,isDir:!1,isDenied:!1,isNotFound:!1,isWarning:!0,warningText:g,depth:b.length});continue}let l=a.startsWith("[DIR]"),u=a.startsWith("[DENIED]"),c=a.startsWith("[NOT_FOUND]"),d=a.replace(/^\[(DIR|FILE|DENIED|NOT_FOUND)\]\s*/,""),f=d.replace(/\\/g,"/").split("/");r.push({name:d,fullPath:d,isDir:l,isDenied:u,isNotFound:c,isWarning:!1,warningText:"",depth:f.length-1})}let o=[],s=[o];for(let a of r){let u={name:a.fullPath.replace(/\\/g,"/").split("/").pop()??a.fullPath,isDir:a.isDir,isDenied:a.isDenied,isNotFound:a.isNotFound,isWarning:a.isWarning,warningText:a.warningText,children:[],relativePath:a.fullPath};for(;s.length>a.depth+1;)s.pop();s[s.length-1].push(u),a.isDir&&s.push(u.children)}return{hint:n.join(`
92
+ `).trim(),entries:o}}var UC=0;function n0(e,t){if(e.length===0)return'<div class="dir-tree"><span class="dir-empty">Empty directory</span></div>';function n(i){return i.map(r=>{let o=`de-${UC++}`,s=`${t}/${r.relativePath.replace(/\\/g,"/")}`,a=St(s);if(r.isWarning)return`<div class="dir-entry"><button class="dir-row dir-row-warning dir-load-more" data-loadpath="${a}"><span class="dir-warning-icon">\u26A0\uFE0F</span> <span class="dir-warning-text">${St(r.warningText)} \u2014 click to load all</span></button></div>`;if(r.isDenied)return`<div class="dir-entry"><span class="dir-icon">\u{1F6AB}</span> <span class="dir-name-denied">${St(r.name)}</span></div>`;if(r.isNotFound)return`<div class="dir-entry"><span class="dir-icon">\u2753</span> <span class="dir-name-denied">${St(r.name)}</span></div>`;if(r.isDir){let l=r.children.length>0,u=`<span class="dir-chevron${l?" expanded":""}">${l?"\u25BC":"\u25B6"}</span>`,c=`<button class="dir-open-btn" data-openpath="${a}" title="Open in Finder">\u{1F4C2}</button>`,d=l?`<div class="dir-children" id="${o}-ch">${n(r.children)}</div>`:"";return`<div class="dir-entry-group" id="${o}"><div class="dir-row dir-row-folder" data-path="${a}" data-eid="${o}" data-loaded="${l}">${u} <span class="dir-icon">\u{1F4C1}</span> <span class="dir-name">${St(r.name)}</span>${c}</div>${d}</div>`}return`<div class="dir-entry"><div class="dir-row dir-row-file" data-path="${a}"><span class="file-icon">\u{1F4C4}</span> <span class="file-name">${St(r.name)}</span></div></div>`}).join("")}return`<div class="dir-tree">${n(e)}</div>`}function jC(e,t){UC=0;let{hint:n,entries:i}=t0(e);return{notice:n||void 0,html:`<div class="panel-content directory-content">${n0(i,t)}</div>`}}function ZC(e){let t=e.container.querySelector(".dir-tree");t&&t.addEventListener("click",async n=>{let i=n.target.closest(".dir-open-btn");if(i){n.stopPropagation();let a=i.dataset.openpath;if(!a)return;let l=e.buildOpenInFolderCommand(a);if(l)try{await e.callTool?.("start_process",{command:l,timeout_ms:12e3,origin:"ui"})}catch{}return}let r=n.target.closest(".dir-load-more");if(r){n.stopPropagation();let a=r.dataset.loadpath;if(!a)return;r.querySelector(".dir-warning-text").textContent="Loading\u2026",r.disabled=!0;try{let l=await e.callTool?.("list_directory",{path:a,depth:1,origin:"ui"}),u=Kt(l)??"";if(u){let c=t0(u),d=n0(c.entries,a),f=r.closest(".dir-children");if(f){let p=document.createElement("div");p.innerHTML=d;let h=p.querySelector(".dir-tree");f.innerHTML=h?h.innerHTML:""}}}catch{r.querySelector(".dir-warning-text").textContent="Failed to load",r.disabled=!1}return}let o=n.target.closest(".dir-row");if(!o)return;let s=o.dataset.path;if(s){if(o.classList.contains("dir-row-folder")){let a=o.dataset.eid;if(!a)return;let l=document.getElementById(`${a}-ch`),u=o.querySelector(".dir-chevron");if(l){let c=l.classList.toggle("dir-collapsed");u?.classList.toggle("expanded",!c),u&&(u.textContent=c?"\u25B6":"\u25BC");return}if(o.dataset.loaded==="true")return;u&&(u.textContent="\u23F3");try{let c=await e.callTool?.("list_directory",{path:s,depth:2,origin:"ui"}),d=Kt(c)??"";if(d){o.dataset.loaded="true";let f=t0(d),p=n0(f.entries,s),h=document.createElement("div");h.className="dir-children",h.id=`${a}-ch`;let m=document.createElement("div");m.innerHTML=p;let g=m.querySelector(".dir-tree");h.innerHTML=g?g.innerHTML:'<span class="dir-empty">Empty</span>',o.parentElement?.appendChild(h),u?.classList.add("expanded"),u&&(u.textContent="\u25BC")}}catch{u&&(u.textContent="\u26A0")}return}if(o.classList.contains("dir-row-file")){o.classList.add("dir-loading");try{let a=await e.callTool?.("read_file",{path:s,origin:"ui"});if(!a||typeof a!="object"||a===null)return;let l=a.structuredContent;if(l&&typeof l=="object"){let u=Kt(a)??"";e.onOpenPayload(Qm(l,u))}}catch{o.classList.remove("dir-loading")}}}})}var HC=Object.defineProperty,r0=(e,t)=>{let n={};for(var i in e)HC(n,i,{get:e[i],enumerable:!0});return t||HC(n,Symbol.toStringTag,{value:"Module"}),n};function Nt(e){this.content=e}Nt.prototype={constructor:Nt,find:function(e){for(var t=0;t<this.content.length;t+=2)if(this.content[t]===e)return t;return-1},get:function(e){var t=this.find(e);return t==-1?void 0:this.content[t+1]},update:function(e,t,n){var i=n&&n!=e?this.remove(n):this,r=i.find(e),o=i.content.slice();return r==-1?o.push(n||e,t):(o[r+1]=t,n&&(o[r]=n)),new Nt(o)},remove:function(e){var t=this.find(e);if(t==-1)return this;var n=this.content.slice();return n.splice(t,2),new Nt(n)},addToStart:function(e,t){return new Nt([e,t].concat(this.remove(e).content))},addToEnd:function(e,t){var n=this.remove(e).content.slice();return n.push(e,t),new Nt(n)},addBefore:function(e,t,n){var i=this.remove(t),r=i.content.slice(),o=i.find(e);return r.splice(o==-1?r.length:o,0,t,n),new Nt(r)},forEach:function(e){for(var t=0;t<this.content.length;t+=2)e(this.content[t],this.content[t+1])},prepend:function(e){return e=Nt.from(e),e.size?new Nt(e.content.concat(this.subtract(e).content)):this},append:function(e){return e=Nt.from(e),e.size?new Nt(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var t=this;e=Nt.from(e);for(var n=0;n<e.content.length;n+=2)t=t.remove(e.content[n]);return t},toObject:function(){var e={};return this.forEach(function(t,n){e[t]=n}),e},get size(){return this.content.length>>1}};Nt.from=function(e){if(e instanceof Nt)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new Nt(t)};var i0=Nt;function eT(e,t,n){for(let i=0;;i++){if(i==e.childCount||i==t.childCount)return e.childCount==t.childCount?null:n;let r=e.child(i),o=t.child(i);if(r==o){n+=r.nodeSize;continue}if(!r.sameMarkup(o))return n;if(r.isText&&r.text!=o.text){let s=r.text,a=o.text,l=0;for(;s[l]==a[l];l++)n++;return l&&l<s.length&&l<a.length&&rT(s.charCodeAt(l-1))&&nT(s.charCodeAt(l))&&n--,n}if(r.content.size||o.content.size){let s=eT(r.content,o.content,n+1);if(s!=null)return s}n+=r.nodeSize}}function tT(e,t,n,i){for(let r=e.childCount,o=t.childCount;;){if(r==0||o==0)return r==o?null:{a:n,b:i};let s=e.child(--r),a=t.child(--o),l=s.nodeSize;if(s==a){n-=l,i-=l;continue}if(!s.sameMarkup(a))return{a:n,b:i};if(s.isText&&s.text!=a.text){let u=s.text,c=a.text,d=u.length,f=c.length;for(;d>0&&f>0&&u[d-1]==c[f-1];)d--,f--,n--,i--;return d&&f&&d<u.length&&rT(u.charCodeAt(d-1))&&nT(u.charCodeAt(d))&&(n++,i++),{a:n,b:i}}if(s.content.size||a.content.size){let u=tT(s.content,a.content,n-1,i-1);if(u)return u}n-=l,i-=l}}function nT(e){return e>=56320&&e<57344}function rT(e){return e>=55296&&e<56320}var z=class e{constructor(t,n){if(this.content=t,this.size=n||0,n==null)for(let i=0;i<t.length;i++)this.size+=t[i].nodeSize}nodesBetween(t,n,i,r=0,o){for(let s=0,a=0;a<n;s++){let l=this.content[s],u=a+l.nodeSize;if(u>t&&i(l,r+a,o||null,s)!==!1&&l.content.size){let c=a+1;l.nodesBetween(Math.max(0,t-c),Math.min(l.content.size,n-c),i,r+c)}a=u}}descendants(t){this.nodesBetween(0,this.size,t)}textBetween(t,n,i,r){let o="",s=!0;return this.nodesBetween(t,n,(a,l)=>{let u=a.isText?a.text.slice(Math.max(t,l)-l,n-l):a.isLeaf?r?typeof r=="function"?r(a):r:a.type.spec.leafText?a.type.spec.leafText(a):"":"";a.isBlock&&(a.isLeaf&&u||a.isTextblock)&&i&&(s?s=!1:o+=i),o+=u},0),o}append(t){if(!t.size)return this;if(!this.size)return t;let n=this.lastChild,i=t.firstChild,r=this.content.slice(),o=0;for(n.isText&&n.sameMarkup(i)&&(r[r.length-1]=n.withText(n.text+i.text),o=1);o<t.content.length;o++)r.push(t.content[o]);return new e(r,this.size+t.size)}cut(t,n=this.size){if(t==0&&n==this.size)return this;let i=[],r=0;if(n>t)for(let o=0,s=0;s<n;o++){let a=this.content[o],l=s+a.nodeSize;l>t&&((s<t||l>n)&&(a.isText?a=a.cut(Math.max(0,t-s),Math.min(a.text.length,n-s)):a=a.cut(Math.max(0,t-s-1),Math.min(a.content.size,n-s-1))),i.push(a),r+=a.nodeSize),s=l}return new e(i,r)}cutByIndex(t,n){return t==n?e.empty:t==0&&n==this.content.length?this:new e(this.content.slice(t,n))}replaceChild(t,n){let i=this.content[t];if(i==n)return this;let r=this.content.slice(),o=this.size+n.nodeSize-i.nodeSize;return r[t]=n,new e(r,o)}addToStart(t){return new e([t].concat(this.content),this.size+t.nodeSize)}addToEnd(t){return new e(this.content.concat(t),this.size+t.nodeSize)}eq(t){if(this.content.length!=t.content.length)return!1;for(let n=0;n<this.content.length;n++)if(!this.content[n].eq(t.content[n]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(t){let n=this.content[t];if(!n)throw new RangeError("Index "+t+" out of range for "+this);return n}maybeChild(t){return this.content[t]||null}forEach(t){for(let n=0,i=0;n<this.content.length;n++){let r=this.content[n];t(r,i,n),i+=r.nodeSize}}findDiffStart(t,n=0){return eT(this,t,n)}findDiffEnd(t,n=this.size,i=t.size){return tT(this,t,n,i)}findIndex(t){if(t==0)return bc(0,t);if(t==this.size)return bc(this.content.length,t);if(t>this.size||t<0)throw new RangeError(`Position ${t} outside of fragment (${this})`);for(let n=0,i=0;;n++){let r=this.child(n),o=i+r.nodeSize;if(o>=t)return o==t?bc(n+1,o):bc(n,i);i=o}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(t=>t.toJSON()):null}static fromJSON(t,n){if(!n)return e.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return e.fromArray(n.map(t.nodeFromJSON))}static fromArray(t){if(!t.length)return e.empty;let n,i=0;for(let r=0;r<t.length;r++){let o=t[r];i+=o.nodeSize,r&&o.isText&&t[r-1].sameMarkup(o)?(n||(n=t.slice(0,r)),n[n.length-1]=o.withText(n[n.length-1].text+o.text)):n&&n.push(o)}return new e(n||t,i)}static from(t){if(!t)return e.empty;if(t instanceof e)return t;if(Array.isArray(t))return this.fromArray(t);if(t.attrs)return new e([t],t.nodeSize);throw new RangeError("Can not convert "+t+" to a Fragment"+(t.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}};z.empty=new z([],0);var o0={index:0,offset:0};function bc(e,t){return o0.index=e,o0.offset=t,o0}function kc(e,t){if(e===t)return!0;if(!(e&&typeof e=="object")||!(t&&typeof t=="object"))return!1;let n=Array.isArray(e);if(Array.isArray(t)!=n)return!1;if(n){if(e.length!=t.length)return!1;for(let i=0;i<e.length;i++)if(!kc(e[i],t[i]))return!1}else{for(let i in e)if(!(i in t)||!kc(e[i],t[i]))return!1;for(let i in t)if(!(i in e))return!1}return!0}var ye=class e{constructor(t,n){this.type=t,this.attrs=n}addToSet(t){let n,i=!1;for(let r=0;r<t.length;r++){let o=t[r];if(this.eq(o))return t;if(this.type.excludes(o.type))n||(n=t.slice(0,r));else{if(o.type.excludes(this.type))return t;!i&&o.type.rank>this.type.rank&&(n||(n=t.slice(0,r)),n.push(this),i=!0),n&&n.push(o)}}return n||(n=t.slice()),i||n.push(this),n}removeFromSet(t){for(let n=0;n<t.length;n++)if(this.eq(t[n]))return t.slice(0,n).concat(t.slice(n+1));return t}isInSet(t){for(let n=0;n<t.length;n++)if(this.eq(t[n]))return!0;return!1}eq(t){return this==t||this.type==t.type&&kc(this.attrs,t.attrs)}toJSON(){let t={type:this.type.name};for(let n in this.attrs){t.attrs=this.attrs;break}return t}static fromJSON(t,n){if(!n)throw new RangeError("Invalid input for Mark.fromJSON");let i=t.marks[n.type];if(!i)throw new RangeError(`There is no mark type ${n.type} in this schema`);let r=i.create(n.attrs);return i.checkAttrs(r.attrs),r}static sameSet(t,n){if(t==n)return!0;if(t.length!=n.length)return!1;for(let i=0;i<t.length;i++)if(!t[i].eq(n[i]))return!1;return!0}static setFrom(t){if(!t||Array.isArray(t)&&t.length==0)return e.none;if(t instanceof e)return[t];let n=t.slice();return n.sort((i,r)=>i.type.rank-r.type.rank),n}};ye.none=[];var Dr=class extends Error{},B=class e{constructor(t,n,i){this.content=t,this.openStart=n,this.openEnd=i}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(t,n){let i=oT(this.content,t+this.openStart,n,this.openStart+1,this.openEnd+1);return i&&new e(i,this.openStart,this.openEnd)}removeBetween(t,n){return new e(iT(this.content,t+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(t){return this.content.eq(t.content)&&this.openStart==t.openStart&&this.openEnd==t.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let t={content:this.content.toJSON()};return this.openStart>0&&(t.openStart=this.openStart),this.openEnd>0&&(t.openEnd=this.openEnd),t}static fromJSON(t,n){if(!n)return e.empty;let i=n.openStart||0,r=n.openEnd||0;if(typeof i!="number"||typeof r!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new e(z.fromJSON(t,n.content),i,r)}static maxOpen(t,n=!0){let i=0,r=0;for(let o=t.firstChild;o&&!o.isLeaf&&(n||!o.type.spec.isolating);o=o.firstChild)i++;for(let o=t.lastChild;o&&!o.isLeaf&&(n||!o.type.spec.isolating);o=o.lastChild)r++;return new e(t,i,r)}};B.empty=new B(z.empty,0,0);function iT(e,t,n){let{index:i,offset:r}=e.findIndex(t),o=e.maybeChild(i),{index:s,offset:a}=e.findIndex(n);if(r==t||o.isText){if(a!=n&&!e.child(s).isText)throw new RangeError("Removing non-flat range");return e.cut(0,t).append(e.cut(n))}if(i!=s)throw new RangeError("Removing non-flat range");return e.replaceChild(i,o.copy(iT(o.content,t-r-1,n-r-1)))}function oT(e,t,n,i,r,o){let{index:s,offset:a}=e.findIndex(t),l=e.maybeChild(s);if(a==t||l.isText)return o&&i<=0&&r<=0&&!o.canReplace(s,s,n)?null:e.cut(0,t).append(n).append(e.cut(t));let u=oT(l.content,t-a-1,n,s==0?i-1:0,s==e.childCount-1?r-1:0,l);return u&&e.replaceChild(s,l.copy(u))}function _5(e,t,n){if(n.openStart>e.depth)throw new Dr("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new Dr("Inconsistent open depths");return sT(e,t,n,0)}function sT(e,t,n,i){let r=e.index(i),o=e.node(i);if(r==t.index(i)&&i<e.depth-n.openStart){let s=sT(e,t,n,i+1);return o.copy(o.content.replaceChild(r,s))}else if(n.content.size)if(!n.openStart&&!n.openEnd&&e.depth==i&&t.depth==i){let s=e.parent,a=s.content;return di(s,a.cut(0,e.parentOffset).append(n.content).append(a.cut(t.parentOffset)))}else{let{start:s,end:a}=w5(n,e);return di(o,lT(e,s,a,t,i))}else return di(o,xc(e,t,i))}function aT(e,t){if(!t.type.compatibleContent(e.type))throw new Dr("Cannot join "+t.type.name+" onto "+e.type.name)}function s0(e,t,n){let i=e.node(n);return aT(i,t.node(n)),i}function ci(e,t){let n=t.length-1;n>=0&&e.isText&&e.sameMarkup(t[n])?t[n]=e.withText(t[n].text+e.text):t.push(e)}function da(e,t,n,i){let r=(t||e).node(n),o=0,s=t?t.index(n):r.childCount;e&&(o=e.index(n),e.depth>n?o++:e.textOffset&&(ci(e.nodeAfter,i),o++));for(let a=o;a<s;a++)ci(r.child(a),i);t&&t.depth==n&&t.textOffset&&ci(t.nodeBefore,i)}function di(e,t){if(!e.type.validContent(t))throw new Dr("Invalid content for node "+e.type.name);return e.copy(t)}function lT(e,t,n,i,r){let o=e.depth>r&&s0(e,t,r+1),s=i.depth>r&&s0(n,i,r+1),a=[];return da(null,e,r,a),o&&s&&t.index(r)==n.index(r)?(aT(o,s),ci(di(o,lT(e,t,n,i,r+1)),a)):(o&&ci(di(o,xc(e,t,r+1)),a),da(t,n,r,a),s&&ci(di(s,xc(n,i,r+1)),a)),da(i,null,r,a),new z(a)}function xc(e,t,n){let i=[];if(da(null,e,n,i),e.depth>n){let r=s0(e,t,n+1);ci(di(r,xc(e,t,n+1)),i)}return da(t,null,n,i),new z(i)}function w5(e,t){let n=t.depth-e.openStart,r=t.node(n).copy(e.content);for(let o=n-1;o>=0;o--)r=t.node(o).copy(z.from(r));return{start:r.resolveNoCache(e.openStart+n),end:r.resolveNoCache(r.content.size-e.openEnd-n)}}var _c=class e{constructor(t,n,i){this.pos=t,this.path=n,this.parentOffset=i,this.depth=n.length/3-1}resolveDepth(t){return t==null?this.depth:t<0?this.depth+t:t}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(t){return this.path[this.resolveDepth(t)*3]}index(t){return this.path[this.resolveDepth(t)*3+1]}indexAfter(t){return t=this.resolveDepth(t),this.index(t)+(t==this.depth&&!this.textOffset?0:1)}start(t){return t=this.resolveDepth(t),t==0?0:this.path[t*3-1]+1}end(t){return t=this.resolveDepth(t),this.start(t)+this.node(t).content.size}before(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position before the top-level node");return t==this.depth+1?this.pos:this.path[t*3-1]}after(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position after the top-level node");return t==this.depth+1?this.pos:this.path[t*3-1]+this.path[t*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let t=this.parent,n=this.index(this.depth);if(n==t.childCount)return null;let i=this.pos-this.path[this.path.length-1],r=t.child(n);return i?t.child(n).cut(i):r}get nodeBefore(){let t=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(t).cut(0,n):t==0?null:this.parent.child(t-1)}posAtIndex(t,n){n=this.resolveDepth(n);let i=this.path[n*3],r=n==0?0:this.path[n*3-1]+1;for(let o=0;o<t;o++)r+=i.child(o).nodeSize;return r}marks(){let t=this.parent,n=this.index();if(t.content.size==0)return ye.none;if(this.textOffset)return t.child(n).marks;let i=t.maybeChild(n-1),r=t.maybeChild(n);if(!i){let a=i;i=r,r=a}let o=i.marks;for(var s=0;s<o.length;s++)o[s].type.spec.inclusive===!1&&(!r||!o[s].isInSet(r.marks))&&(o=o[s--].removeFromSet(o));return o}marksAcross(t){let n=this.parent.maybeChild(this.index());if(!n||!n.isInline)return null;let i=n.marks,r=t.parent.maybeChild(t.index());for(var o=0;o<i.length;o++)i[o].type.spec.inclusive===!1&&(!r||!i[o].isInSet(r.marks))&&(i=i[o--].removeFromSet(i));return i}sharedDepth(t){for(let n=this.depth;n>0;n--)if(this.start(n)<=t&&this.end(n)>=t)return n;return 0}blockRange(t=this,n){if(t.pos<this.pos)return t.blockRange(this);for(let i=this.depth-(this.parent.inlineContent||this.pos==t.pos?1:0);i>=0;i--)if(t.pos<=this.end(i)&&(!n||n(this.node(i))))return new fi(this,t,i);return null}sameParent(t){return this.pos-this.parentOffset==t.pos-t.parentOffset}max(t){return t.pos>this.pos?t:this}min(t){return t.pos<this.pos?t:this}toString(){let t="";for(let n=1;n<=this.depth;n++)t+=(t?"/":"")+this.node(n).type.name+"_"+this.index(n-1);return t+":"+this.parentOffset}static resolve(t,n){if(!(n>=0&&n<=t.content.size))throw new RangeError("Position "+n+" out of range");let i=[],r=0,o=n;for(let s=t;;){let{index:a,offset:l}=s.content.findIndex(o),u=o-l;if(i.push(s,a,r+l),!u||(s=s.child(a),s.isText))break;o=u-1,r+=l+1}return new e(n,i,o)}static resolveCached(t,n){let i=qC.get(t);if(i)for(let o=0;o<i.elts.length;o++){let s=i.elts[o];if(s.pos==n)return s}else qC.set(t,i=new a0);let r=i.elts[i.i]=e.resolve(t,n);return i.i=(i.i+1)%S5,r}},a0=class{constructor(){this.elts=[],this.i=0}},S5=12,qC=new WeakMap,fi=class{constructor(t,n,i){this.$from=t,this.$to=n,this.depth=i}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}},E5=Object.create(null),En=class e{constructor(t,n,i,r=ye.none){this.type=t,this.attrs=n,this.marks=r,this.content=i||z.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(t){return this.content.child(t)}maybeChild(t){return this.content.maybeChild(t)}forEach(t){this.content.forEach(t)}nodesBetween(t,n,i,r=0){this.content.nodesBetween(t,n,i,r,this)}descendants(t){this.nodesBetween(0,this.content.size,t)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(t,n,i,r){return this.content.textBetween(t,n,i,r)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(t){return this==t||this.sameMarkup(t)&&this.content.eq(t.content)}sameMarkup(t){return this.hasMarkup(t.type,t.attrs,t.marks)}hasMarkup(t,n,i){return this.type==t&&kc(this.attrs,n||t.defaultAttrs||E5)&&ye.sameSet(this.marks,i||ye.none)}copy(t=null){return t==this.content?this:new e(this.type,this.attrs,t,this.marks)}mark(t){return t==this.marks?this:new e(this.type,this.attrs,this.content,t)}cut(t,n=this.content.size){return t==0&&n==this.content.size?this:this.copy(this.content.cut(t,n))}slice(t,n=this.content.size,i=!1){if(t==n)return B.empty;let r=this.resolve(t),o=this.resolve(n),s=i?0:r.sharedDepth(n),a=r.start(s),u=r.node(s).content.cut(r.pos-a,o.pos-a);return new B(u,r.depth-s,o.depth-s)}replace(t,n,i){return _5(this.resolve(t),this.resolve(n),i)}nodeAt(t){for(let n=this;;){let{index:i,offset:r}=n.content.findIndex(t);if(n=n.maybeChild(i),!n)return null;if(r==t||n.isText)return n;t-=r+1}}childAfter(t){let{index:n,offset:i}=this.content.findIndex(t);return{node:this.content.maybeChild(n),index:n,offset:i}}childBefore(t){if(t==0)return{node:null,index:0,offset:0};let{index:n,offset:i}=this.content.findIndex(t);if(i<t)return{node:this.content.child(n),index:n,offset:i};let r=this.content.child(n-1);return{node:r,index:n-1,offset:i-r.nodeSize}}resolve(t){return _c.resolveCached(this,t)}resolveNoCache(t){return _c.resolve(this,t)}rangeHasMark(t,n,i){let r=!1;return n>t&&this.nodesBetween(t,n,o=>(i.isInSet(o.marks)&&(r=!0),!r)),r}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let t=this.type.name;return this.content.size&&(t+="("+this.content.toStringInner()+")"),uT(this.marks,t)}contentMatchAt(t){let n=this.type.contentMatch.matchFragment(this.content,0,t);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(t,n,i=z.empty,r=0,o=i.childCount){let s=this.contentMatchAt(t).matchFragment(i,r,o),a=s&&s.matchFragment(this.content,n);if(!a||!a.validEnd)return!1;for(let l=r;l<o;l++)if(!this.type.allowsMarks(i.child(l).marks))return!1;return!0}canReplaceWith(t,n,i,r){if(r&&!this.type.allowsMarks(r))return!1;let o=this.contentMatchAt(t).matchType(i),s=o&&o.matchFragment(this.content,n);return s?s.validEnd:!1}canAppend(t){return t.content.size?this.canReplace(this.childCount,this.childCount,t.content):this.type.compatibleContent(t.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let t=ye.none;for(let n=0;n<this.marks.length;n++){let i=this.marks[n];i.type.checkAttrs(i.attrs),t=i.addToSet(t)}if(!ye.sameSet(t,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(n=>n.type.name)}`);this.content.forEach(n=>n.check())}toJSON(){let t={type:this.type.name};for(let n in this.attrs){t.attrs=this.attrs;break}return this.content.size&&(t.content=this.content.toJSON()),this.marks.length&&(t.marks=this.marks.map(n=>n.toJSON())),t}static fromJSON(t,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let i;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");i=n.marks.map(t.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return t.text(n.text,i)}let r=z.fromJSON(t,n.content),o=t.nodeType(n.type).create(n.attrs,r,i);return o.type.checkAttrs(o.attrs),o}};En.prototype.text=void 0;var l0=class e extends En{constructor(t,n,i,r){if(super(t,n,null,r),!i)throw new RangeError("Empty text nodes are not allowed");this.text=i}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):uT(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(t,n){return this.text.slice(t,n)}get nodeSize(){return this.text.length}mark(t){return t==this.marks?this:new e(this.type,this.attrs,this.text,t)}withText(t){return t==this.text?this:new e(this.type,this.attrs,t,this.marks)}cut(t=0,n=this.text.length){return t==0&&n==this.text.length?this:this.withText(this.text.slice(t,n))}eq(t){return this.sameMarkup(t)&&this.text==t.text}toJSON(){let t=super.toJSON();return t.text=this.text,t}};function uT(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}var pi=class e{constructor(t){this.validEnd=t,this.next=[],this.wrapCache=[]}static parse(t,n){let i=new u0(t,n);if(i.next==null)return e.empty;let r=cT(i);i.next&&i.err("Unexpected trailing text");let o=z5(M5(r));return D5(o,i),o}matchType(t){for(let n=0;n<this.next.length;n++)if(this.next[n].type==t)return this.next[n].next;return null}matchFragment(t,n=0,i=t.childCount){let r=this;for(let o=n;r&&o<i;o++)r=r.matchType(t.child(o).type);return r}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let t=0;t<this.next.length;t++){let{type:n}=this.next[t];if(!(n.isText||n.hasRequiredAttrs()))return n}return null}compatible(t){for(let n=0;n<this.next.length;n++)for(let i=0;i<t.next.length;i++)if(this.next[n].type==t.next[i].type)return!0;return!1}fillBefore(t,n=!1,i=0){let r=[this];function o(s,a){let l=s.matchFragment(t,i);if(l&&(!n||l.validEnd))return z.from(a.map(u=>u.createAndFill()));for(let u=0;u<s.next.length;u++){let{type:c,next:d}=s.next[u];if(!(c.isText||c.hasRequiredAttrs())&&r.indexOf(d)==-1){r.push(d);let f=o(d,a.concat(c));if(f)return f}}return null}return o(this,[])}findWrapping(t){for(let i=0;i<this.wrapCache.length;i+=2)if(this.wrapCache[i]==t)return this.wrapCache[i+1];let n=this.computeWrapping(t);return this.wrapCache.push(t,n),n}computeWrapping(t){let n=Object.create(null),i=[{match:this,type:null,via:null}];for(;i.length;){let r=i.shift(),o=r.match;if(o.matchType(t)){let s=[];for(let a=r;a.type;a=a.via)s.push(a.type);return s.reverse()}for(let s=0;s<o.next.length;s++){let{type:a,next:l}=o.next[s];!a.isLeaf&&!a.hasRequiredAttrs()&&!(a.name in n)&&(!r.type||l.validEnd)&&(i.push({match:a.contentMatch,type:a,via:r}),n[a.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(t){if(t>=this.next.length)throw new RangeError(`There's no ${t}th edge in this content match`);return this.next[t]}toString(){let t=[];function n(i){t.push(i);for(let r=0;r<i.next.length;r++)t.indexOf(i.next[r].next)==-1&&n(i.next[r].next)}return n(this),t.map((i,r)=>{let o=r+(i.validEnd?"*":" ")+" ";for(let s=0;s<i.next.length;s++)o+=(s?", ":"")+i.next[s].type.name+"->"+t.indexOf(i.next[s].next);return o}).join(`
93
+ `)}};pi.empty=new pi(!0);var u0=class{constructor(t,n){this.string=t,this.nodeTypes=n,this.inline=null,this.pos=0,this.tokens=t.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(t){return this.next==t&&(this.pos++||!0)}err(t){throw new SyntaxError(t+" (in content expression '"+this.string+"')")}};function cT(e){let t=[];do t.push($5(e));while(e.eat("|"));return t.length==1?t[0]:{type:"choice",exprs:t}}function $5(e){let t=[];do t.push(C5(e));while(e.next&&e.next!=")"&&e.next!="|");return t.length==1?t[0]:{type:"seq",exprs:t}}function C5(e){let t=A5(e);for(;;)if(e.eat("+"))t={type:"plus",expr:t};else if(e.eat("*"))t={type:"star",expr:t};else if(e.eat("?"))t={type:"opt",expr:t};else if(e.eat("{"))t=T5(e,t);else break;return t}function WC(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");let t=Number(e.next);return e.pos++,t}function T5(e,t){let n=WC(e),i=n;return e.eat(",")&&(e.next!="}"?i=WC(e):i=-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:i,expr:t}}function I5(e,t){let n=e.nodeTypes,i=n[t];if(i)return[i];let r=[];for(let o in n){let s=n[o];s.isInGroup(t)&&r.push(s)}return r.length==0&&e.err("No node type or group '"+t+"' found"),r}function A5(e){if(e.eat("(")){let t=cT(e);return e.eat(")")||e.err("Missing closing paren"),t}else if(/\W/.test(e.next))e.err("Unexpected token '"+e.next+"'");else{let t=I5(e,e.next).map(n=>(e.inline==null?e.inline=n.isInline:e.inline!=n.isInline&&e.err("Mixing inline and block content"),{type:"name",value:n}));return e.pos++,t.length==1?t[0]:{type:"choice",exprs:t}}}function M5(e){let t=[[]];return r(o(e,0),n()),t;function n(){return t.push([])-1}function i(s,a,l){let u={term:l,to:a};return t[s].push(u),u}function r(s,a){s.forEach(l=>l.to=a)}function o(s,a){if(s.type=="choice")return s.exprs.reduce((l,u)=>l.concat(o(u,a)),[]);if(s.type=="seq")for(let l=0;;l++){let u=o(s.exprs[l],a);if(l==s.exprs.length-1)return u;r(u,a=n())}else if(s.type=="star"){let l=n();return i(a,l),r(o(s.expr,l),l),[i(l)]}else if(s.type=="plus"){let l=n();return r(o(s.expr,a),l),r(o(s.expr,l),l),[i(l)]}else{if(s.type=="opt")return[i(a)].concat(o(s.expr,a));if(s.type=="range"){let l=a;for(let u=0;u<s.min;u++){let c=n();r(o(s.expr,l),c),l=c}if(s.max==-1)r(o(s.expr,l),l);else for(let u=s.min;u<s.max;u++){let c=n();i(l,c),r(o(s.expr,l),c),l=c}return[i(l)]}else{if(s.type=="name")return[i(a,void 0,s.value)];throw new Error("Unknown expr type")}}}}function dT(e,t){return t-e}function VC(e,t){let n=[];return i(t),n.sort(dT);function i(r){let o=e[r];if(o.length==1&&!o[0].term)return i(o[0].to);n.push(r);for(let s=0;s<o.length;s++){let{term:a,to:l}=o[s];!a&&n.indexOf(l)==-1&&i(l)}}}function z5(e){let t=Object.create(null);return n(VC(e,0));function n(i){let r=[];i.forEach(s=>{e[s].forEach(({term:a,to:l})=>{if(!a)return;let u;for(let c=0;c<r.length;c++)r[c][0]==a&&(u=r[c][1]);VC(e,l).forEach(c=>{u||r.push([a,u=[]]),u.indexOf(c)==-1&&u.push(c)})})});let o=t[i.join(",")]=new pi(i.indexOf(e.length-1)>-1);for(let s=0;s<r.length;s++){let a=r[s][1].sort(dT);o.next.push({type:r[s][0],next:t[a.join(",")]||n(a)})}return o}}function D5(e,t){for(let n=0,i=[e];n<i.length;n++){let r=i[n],o=!r.validEnd,s=[];for(let a=0;a<r.next.length;a++){let{type:l,next:u}=r.next[a];s.push(l.name),o&&!(l.isText||l.hasRequiredAttrs())&&(o=!1),i.indexOf(u)==-1&&i.push(u)}o&&t.err("Only non-generatable nodes ("+s.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function fT(e){let t=Object.create(null);for(let n in e){let i=e[n];if(!i.hasDefault)return null;t[n]=i.default}return t}function pT(e,t){let n=Object.create(null);for(let i in e){let r=t&&t[i];if(r===void 0){let o=e[i];if(o.hasDefault)r=o.default;else throw new RangeError("No value supplied for attribute "+i)}n[i]=r}return n}function hT(e,t,n,i){for(let r in t)if(!(r in e))throw new RangeError(`Unsupported attribute ${r} for ${n} of type ${i}`);for(let r in e)e[r].validate&&e[r].validate(t[r])}function mT(e,t){let n=Object.create(null);if(t)for(let i in t)n[i]=new c0(e,i,t[i]);return n}var wc=class e{constructor(t,n,i){this.name=t,this.schema=n,this.spec=i,this.markSet=null,this.groups=i.group?i.group.split(" "):[],this.attrs=mT(t,i.attrs),this.defaultAttrs=fT(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(i.inline||t=="text"),this.isText=t=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==pi.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(t){return this.groups.indexOf(t)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let t in this.attrs)if(this.attrs[t].isRequired)return!0;return!1}compatibleContent(t){return this==t||this.contentMatch.compatible(t.contentMatch)}computeAttrs(t){return!t&&this.defaultAttrs?this.defaultAttrs:pT(this.attrs,t)}create(t=null,n,i){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new En(this,this.computeAttrs(t),z.from(n),ye.setFrom(i))}createChecked(t=null,n,i){return n=z.from(n),this.checkContent(n),new En(this,this.computeAttrs(t),n,ye.setFrom(i))}createAndFill(t=null,n,i){if(t=this.computeAttrs(t),n=z.from(n),n.size){let s=this.contentMatch.fillBefore(n);if(!s)return null;n=s.append(n)}let r=this.contentMatch.matchFragment(n),o=r&&r.fillBefore(z.empty,!0);return o?new En(this,t,n.append(o),ye.setFrom(i)):null}validContent(t){let n=this.contentMatch.matchFragment(t);if(!n||!n.validEnd)return!1;for(let i=0;i<t.childCount;i++)if(!this.allowsMarks(t.child(i).marks))return!1;return!0}checkContent(t){if(!this.validContent(t))throw new RangeError(`Invalid content for node ${this.name}: ${t.toString().slice(0,50)}`)}checkAttrs(t){hT(this.attrs,t,"node",this.name)}allowsMarkType(t){return this.markSet==null||this.markSet.indexOf(t)>-1}allowsMarks(t){if(this.markSet==null)return!0;for(let n=0;n<t.length;n++)if(!this.allowsMarkType(t[n].type))return!1;return!0}allowedMarks(t){if(this.markSet==null)return t;let n;for(let i=0;i<t.length;i++)this.allowsMarkType(t[i].type)?n&&n.push(t[i]):n||(n=t.slice(0,i));return n?n.length?n:ye.none:t}static compile(t,n){let i=Object.create(null);t.forEach((o,s)=>i[o]=new e(o,n,s));let r=n.spec.topNode||"doc";if(!i[r])throw new RangeError("Schema is missing its top node type ('"+r+"')");if(!i.text)throw new RangeError("Every schema needs a 'text' type");for(let o in i.text.attrs)throw new RangeError("The text node type should not have attributes");return i}};function N5(e,t,n){let i=n.split("|");return r=>{let o=r===null?"null":typeof r;if(i.indexOf(o)<0)throw new RangeError(`Expected value of type ${i} for attribute ${t} on type ${e}, got ${o}`)}}var c0=class{constructor(t,n,i){this.hasDefault=Object.prototype.hasOwnProperty.call(i,"default"),this.default=i.default,this.validate=typeof i.validate=="string"?N5(t,n,i.validate):i.validate}get isRequired(){return!this.hasDefault}},pa=class e{constructor(t,n,i,r){this.name=t,this.rank=n,this.schema=i,this.spec=r,this.attrs=mT(t,r.attrs),this.excluded=null;let o=fT(this.attrs);this.instance=o?new ye(this,o):null}create(t=null){return!t&&this.instance?this.instance:new ye(this,pT(this.attrs,t))}static compile(t,n){let i=Object.create(null),r=0;return t.forEach((o,s)=>i[o]=new e(o,r++,n,s)),i}removeFromSet(t){for(var n=0;n<t.length;n++)t[n].type==this&&(t=t.slice(0,n).concat(t.slice(n+1)),n--);return t}isInSet(t){for(let n=0;n<t.length;n++)if(t[n].type==this)return t[n]}checkAttrs(t){hT(this.attrs,t,"mark",this.name)}excludes(t){return this.excluded.indexOf(t)>-1}},hi=class{constructor(t){this.linebreakReplacement=null,this.cached=Object.create(null);let n=this.spec={};for(let r in t)n[r]=t[r];n.nodes=i0.from(t.nodes),n.marks=i0.from(t.marks||{}),this.nodes=wc.compile(this.spec.nodes,this),this.marks=pa.compile(this.spec.marks,this);let i=Object.create(null);for(let r in this.nodes){if(r in this.marks)throw new RangeError(r+" can not be both a node and a mark");let o=this.nodes[r],s=o.spec.content||"",a=o.spec.marks;if(o.contentMatch=i[s]||(i[s]=pi.parse(s,this.nodes)),o.inlineContent=o.contentMatch.inlineContent,o.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!o.isInline||!o.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=o}o.markSet=a=="_"?null:a?KC(this,a.split(" ")):a==""||!o.inlineContent?[]:null}for(let r in this.marks){let o=this.marks[r],s=o.spec.excludes;o.excluded=s==null?[o]:s==""?[]:KC(this,s.split(" "))}this.nodeFromJSON=r=>En.fromJSON(this,r),this.markFromJSON=r=>ye.fromJSON(this,r),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(t,n=null,i,r){if(typeof t=="string")t=this.nodeType(t);else if(t instanceof wc){if(t.schema!=this)throw new RangeError("Node type from different schema used ("+t.name+")")}else throw new RangeError("Invalid node type: "+t);return t.createChecked(n,i,r)}text(t,n){let i=this.nodes.text;return new l0(i,i.defaultAttrs,t,ye.setFrom(n))}mark(t,n){return typeof t=="string"&&(t=this.marks[t]),t.create(n)}nodeType(t){let n=this.nodes[t];if(!n)throw new RangeError("Unknown node type: "+t);return n}};function KC(e,t){let n=[];for(let i=0;i<t.length;i++){let r=t[i],o=e.marks[r],s=o;if(o)n.push(o);else for(let a in e.marks){let l=e.marks[a];(r=="_"||l.spec.group&&l.spec.group.split(" ").indexOf(r)>-1)&&n.push(s=l)}if(!s)throw new SyntaxError("Unknown mark type: '"+t[i]+"'")}return n}function O5(e){return e.tag!=null}function R5(e){return e.style!=null}var $n=class e{constructor(t,n){this.schema=t,this.rules=n,this.tags=[],this.styles=[];let i=this.matchedStyles=[];n.forEach(r=>{if(O5(r))this.tags.push(r);else if(R5(r)){let o=/[^=]*/.exec(r.style)[0];i.indexOf(o)<0&&i.push(o),this.styles.push(r)}}),this.normalizeLists=!this.tags.some(r=>{if(!/^(ul|ol)\b/.test(r.tag)||!r.node)return!1;let o=t.nodes[r.node];return o.contentMatch.matchType(o)})}parse(t,n={}){let i=new Sc(this,n,!1);return i.addAll(t,ye.none,n.from,n.to),i.finish()}parseSlice(t,n={}){let i=new Sc(this,n,!0);return i.addAll(t,ye.none,n.from,n.to),B.maxOpen(i.finish())}matchTag(t,n,i){for(let r=i?this.tags.indexOf(i)+1:0;r<this.tags.length;r++){let o=this.tags[r];if(F5(t,o.tag)&&(o.namespace===void 0||t.namespaceURI==o.namespace)&&(!o.context||n.matchesContext(o.context))){if(o.getAttrs){let s=o.getAttrs(t);if(s===!1)continue;o.attrs=s||void 0}return o}}}matchStyle(t,n,i,r){for(let o=r?this.styles.indexOf(r)+1:0;o<this.styles.length;o++){let s=this.styles[o],a=s.style;if(!(a.indexOf(t)!=0||s.context&&!i.matchesContext(s.context)||a.length>t.length&&(a.charCodeAt(t.length)!=61||a.slice(t.length+1)!=n))){if(s.getAttrs){let l=s.getAttrs(n);if(l===!1)continue;s.attrs=l||void 0}return s}}}static schemaRules(t){let n=[];function i(r){let o=r.priority==null?50:r.priority,s=0;for(;s<n.length;s++){let a=n[s];if((a.priority==null?50:a.priority)<o)break}n.splice(s,0,r)}for(let r in t.marks){let o=t.marks[r].spec.parseDOM;o&&o.forEach(s=>{i(s=GC(s)),s.mark||s.ignore||s.clearMark||(s.mark=r)})}for(let r in t.nodes){let o=t.nodes[r].spec.parseDOM;o&&o.forEach(s=>{i(s=GC(s)),s.node||s.ignore||s.mark||(s.node=r)})}return n}static fromSchema(t){return t.cached.domParser||(t.cached.domParser=new e(t,e.schemaRules(t)))}},gT={address:!0,article:!0,aside:!0,blockquote:!0,body:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},P5={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},bT={ol:!0,ul:!0},ha=1,d0=2,fa=4;function JC(e,t,n){return t!=null?(t?ha:0)|(t==="full"?d0:0):e&&e.whitespace=="pre"?ha|d0:n&~fa}var bo=class{constructor(t,n,i,r,o,s){this.type=t,this.attrs=n,this.marks=i,this.solid=r,this.options=s,this.content=[],this.activeMarks=ye.none,this.match=o||(s&fa?null:t.contentMatch)}findWrapping(t){if(!this.match){if(!this.type)return[];let n=this.type.contentMatch.fillBefore(z.from(t));if(n)this.match=this.type.contentMatch.matchFragment(n);else{let i=this.type.contentMatch,r;return(r=i.findWrapping(t.type))?(this.match=i,r):null}}return this.match.findWrapping(t.type)}finish(t){if(!(this.options&ha)){let i=this.content[this.content.length-1],r;if(i&&i.isText&&(r=/[ \t\r\n\u000c]+$/.exec(i.text))){let o=i;i.text.length==r[0].length?this.content.pop():this.content[this.content.length-1]=o.withText(o.text.slice(0,o.text.length-r[0].length))}}let n=z.from(this.content);return!t&&this.match&&(n=n.append(this.match.fillBefore(z.empty,!0))),this.type?this.type.create(this.attrs,n,this.marks):n}inlineContext(t){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:t.parentNode&&!gT.hasOwnProperty(t.parentNode.nodeName.toLowerCase())}},Sc=class{constructor(t,n,i){this.parser=t,this.options=n,this.isOpen=i,this.open=0,this.localPreserveWS=!1;let r=n.topNode,o,s=JC(null,n.preserveWhitespace,0)|(i?fa:0);r?o=new bo(r.type,r.attrs,ye.none,!0,n.topMatch||r.type.contentMatch,s):i?o=new bo(null,null,ye.none,!0,null,s):o=new bo(t.schema.topNodeType,null,ye.none,!0,null,s),this.nodes=[o],this.find=n.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(t,n){t.nodeType==3?this.addTextNode(t,n):t.nodeType==1&&this.addElement(t,n)}addTextNode(t,n){let i=t.nodeValue,r=this.top,o=r.options&d0?"full":this.localPreserveWS||(r.options&ha)>0,{schema:s}=this.parser;if(o==="full"||r.inlineContext(t)||/[^ \t\r\n\u000c]/.test(i)){if(o)if(o==="full")i=i.replace(/\r\n?/g,`
94
+ `);else if(s.linebreakReplacement&&/[\r\n]/.test(i)&&this.top.findWrapping(s.linebreakReplacement.create())){let a=i.split(/\r?\n|\r/);for(let l=0;l<a.length;l++)l&&this.insertNode(s.linebreakReplacement.create(),n,!0),a[l]&&this.insertNode(s.text(a[l]),n,!/\S/.test(a[l]));i=""}else i=i.replace(/\r?\n|\r/g," ");else if(i=i.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(i)&&this.open==this.nodes.length-1){let a=r.content[r.content.length-1],l=t.previousSibling;(!a||l&&l.nodeName=="BR"||a.isText&&/[ \t\r\n\u000c]$/.test(a.text))&&(i=i.slice(1))}i&&this.insertNode(s.text(i),n,!/\S/.test(i)),this.findInText(t)}else this.findInside(t)}addElement(t,n,i){let r=this.localPreserveWS,o=this.top;(t.tagName=="PRE"||/pre/.test(t.style&&t.style.whiteSpace))&&(this.localPreserveWS=!0);let s=t.nodeName.toLowerCase(),a;bT.hasOwnProperty(s)&&this.parser.normalizeLists&&L5(t);let l=this.options.ruleFromNode&&this.options.ruleFromNode(t)||(a=this.parser.matchTag(t,this,i));e:if(l?l.ignore:P5.hasOwnProperty(s))this.findInside(t),this.ignoreFallback(t,n);else if(!l||l.skip||l.closeParent){l&&l.closeParent?this.open=Math.max(0,this.open-1):l&&l.skip.nodeType&&(t=l.skip);let u,c=this.needsBlock;if(gT.hasOwnProperty(s))o.content.length&&o.content[0].isInline&&this.open&&(this.open--,o=this.top),u=!0,o.type||(this.needsBlock=!0);else if(!t.firstChild){this.leafFallback(t,n);break e}let d=l&&l.skip?n:this.readStyles(t,n);d&&this.addAll(t,d),u&&this.sync(o),this.needsBlock=c}else{let u=this.readStyles(t,n);u&&this.addElementByRule(t,l,u,l.consuming===!1?a:void 0)}this.localPreserveWS=r}leafFallback(t,n){t.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(t.ownerDocument.createTextNode(`
95
+ `),n)}ignoreFallback(t,n){t.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),n,!0)}readStyles(t,n){let i=t.style;if(i&&i.length)for(let r=0;r<this.parser.matchedStyles.length;r++){let o=this.parser.matchedStyles[r],s=i.getPropertyValue(o);if(s)for(let a=void 0;;){let l=this.parser.matchStyle(o,s,this,a);if(!l)break;if(l.ignore)return null;if(l.clearMark?n=n.filter(u=>!l.clearMark(u)):n=n.concat(this.parser.schema.marks[l.mark].create(l.attrs)),l.consuming===!1)a=l;else break}}return n}addElementByRule(t,n,i,r){let o,s;if(n.node)if(s=this.parser.schema.nodes[n.node],s.isLeaf)this.insertNode(s.create(n.attrs),i,t.nodeName=="BR")||this.leafFallback(t,i);else{let l=this.enter(s,n.attrs||null,i,n.preserveWhitespace);l&&(o=!0,i=l)}else{let l=this.parser.schema.marks[n.mark];i=i.concat(l.create(n.attrs))}let a=this.top;if(s&&s.isLeaf)this.findInside(t);else if(r)this.addElement(t,i,r);else if(n.getContent)this.findInside(t),n.getContent(t,this.parser.schema).forEach(l=>this.insertNode(l,i,!1));else{let l=t;typeof n.contentElement=="string"?l=t.querySelector(n.contentElement):typeof n.contentElement=="function"?l=n.contentElement(t):n.contentElement&&(l=n.contentElement),this.findAround(t,l,!0),this.addAll(l,i),this.findAround(t,l,!1)}o&&this.sync(a)&&this.open--}addAll(t,n,i,r){let o=i||0;for(let s=i?t.childNodes[i]:t.firstChild,a=r==null?null:t.childNodes[r];s!=a;s=s.nextSibling,++o)this.findAtPoint(t,o),this.addDOM(s,n);this.findAtPoint(t,o)}findPlace(t,n,i){let r,o;for(let s=this.open,a=0;s>=0;s--){let l=this.nodes[s],u=l.findWrapping(t);if(u&&(!r||r.length>u.length+a)&&(r=u,o=l,!u.length))break;if(l.solid){if(i)break;a+=2}}if(!r)return null;this.sync(o);for(let s=0;s<r.length;s++)n=this.enterInner(r[s],null,n,!1);return n}insertNode(t,n,i){if(t.isInline&&this.needsBlock&&!this.top.type){let o=this.textblockFromContext();o&&(n=this.enterInner(o,null,n))}let r=this.findPlace(t,n,i);if(r){this.closeExtra();let o=this.top;o.match&&(o.match=o.match.matchType(t.type));let s=ye.none;for(let a of r.concat(t.marks))(o.type?o.type.allowsMarkType(a.type):XC(a.type,t.type))&&(s=a.addToSet(s));return o.content.push(t.mark(s)),!0}return!1}enter(t,n,i,r){let o=this.findPlace(t.create(n),i,!1);return o&&(o=this.enterInner(t,n,i,!0,r)),o}enterInner(t,n,i,r=!1,o){this.closeExtra();let s=this.top;s.match=s.match&&s.match.matchType(t);let a=JC(t,o,s.options);s.options&fa&&s.content.length==0&&(a|=fa);let l=ye.none;return i=i.filter(u=>(s.type?s.type.allowsMarkType(u.type):XC(u.type,t))?(l=u.addToSet(l),!1):!0),this.nodes.push(new bo(t,n,l,r,null,a)),this.open++,i}closeExtra(t=!1){let n=this.nodes.length-1;if(n>this.open){for(;n>this.open;n--)this.nodes[n-1].content.push(this.nodes[n].finish(t));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(t){for(let n=this.open;n>=0;n--){if(this.nodes[n]==t)return this.open=n,!0;this.localPreserveWS&&(this.nodes[n].options|=ha)}return!1}get currentPos(){this.closeExtra();let t=0;for(let n=this.open;n>=0;n--){let i=this.nodes[n].content;for(let r=i.length-1;r>=0;r--)t+=i[r].nodeSize;n&&t++}return t}findAtPoint(t,n){if(this.find)for(let i=0;i<this.find.length;i++)this.find[i].node==t&&this.find[i].offset==n&&(this.find[i].pos=this.currentPos)}findInside(t){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].pos==null&&t.nodeType==1&&t.contains(this.find[n].node)&&(this.find[n].pos=this.currentPos)}findAround(t,n,i){if(t!=n&&this.find)for(let r=0;r<this.find.length;r++)this.find[r].pos==null&&t.nodeType==1&&t.contains(this.find[r].node)&&n.compareDocumentPosition(this.find[r].node)&(i?2:4)&&(this.find[r].pos=this.currentPos)}findInText(t){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==t&&(this.find[n].pos=this.currentPos-(t.nodeValue.length-this.find[n].offset))}matchesContext(t){if(t.indexOf("|")>-1)return t.split(/\s*\|\s*/).some(this.matchesContext,this);let n=t.split("/"),i=this.options.context,r=!this.isOpen&&(!i||i.parent.type==this.nodes[0].type),o=-(i?i.depth+1:0)+(r?0:1),s=(a,l)=>{for(;a>=0;a--){let u=n[a];if(u==""){if(a==n.length-1||a==0)continue;for(;l>=o;l--)if(s(a-1,l))return!0;return!1}else{let c=l>0||l==0&&r?this.nodes[l].type:i&&l>=o?i.node(l-o).type:null;if(!c||c.name!=u&&!c.isInGroup(u))return!1;l--}}return!0};return s(n.length-1,this.open)}textblockFromContext(){let t=this.options.context;if(t)for(let n=t.depth;n>=0;n--){let i=t.node(n).contentMatchAt(t.indexAfter(n)).defaultType;if(i&&i.isTextblock&&i.defaultAttrs)return i}for(let n in this.parser.schema.nodes){let i=this.parser.schema.nodes[n];if(i.isTextblock&&i.defaultAttrs)return i}}};function L5(e){for(let t=e.firstChild,n=null;t;t=t.nextSibling){let i=t.nodeType==1?t.nodeName.toLowerCase():null;i&&bT.hasOwnProperty(i)&&n?(n.appendChild(t),t=n):i=="li"?n=t:i&&(n=null)}}function F5(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function GC(e){let t={};for(let n in e)t[n]=e[n];return t}function XC(e,t){let n=t.schema.nodes;for(let i in n){let r=n[i];if(!r.allowsMarkType(e))continue;let o=[],s=a=>{o.push(a);for(let l=0;l<a.edgeCount;l++){let{type:u,next:c}=a.edge(l);if(u==t||o.indexOf(c)<0&&s(c))return!0}};if(s(r.contentMatch))return!0}}var rr=class e{constructor(t,n){this.nodes=t,this.marks=n}serializeFragment(t,n={},i){i||(i=vc(n).createDocumentFragment());let r=i,o=[];return t.forEach(s=>{if(o.length||s.marks.length){let a=0,l=0;for(;a<o.length&&l<s.marks.length;){let u=s.marks[l];if(!this.marks[u.type.name]){l++;continue}if(!u.eq(o[a][0])||u.type.spec.spanning===!1)break;a++,l++}for(;a<o.length;)r=o.pop()[1];for(;l<s.marks.length;){let u=s.marks[l++],c=this.serializeMark(u,s.isInline,n);c&&(o.push([u,r]),r.appendChild(c.dom),r=c.contentDOM||c.dom)}}r.appendChild(this.serializeNodeInner(s,n))}),i}serializeNodeInner(t,n){if(t.isText)return vc(n).createTextNode(t.text);let{dom:i,contentDOM:r}=yc(vc(n),this.nodes[t.type.name](t),null,t.attrs);if(r){if(t.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(t.content,n,r)}return i}serializeNode(t,n={}){let i=this.serializeNodeInner(t,n);for(let r=t.marks.length-1;r>=0;r--){let o=this.serializeMark(t.marks[r],t.isInline,n);o&&((o.contentDOM||o.dom).appendChild(i),i=o.dom)}return i}serializeMark(t,n,i={}){let r=this.marks[t.type.name];return r&&yc(vc(i),r(t,n),null,t.attrs)}static renderSpec(t,n,i=null,r){return typeof n=="string"?{dom:t.createTextNode(n)}:yc(t,n,i,r)}static fromSchema(t){return t.cached.domSerializer||(t.cached.domSerializer=new e(this.nodesFromSchema(t),this.marksFromSchema(t)))}static nodesFromSchema(t){let n=YC(t.nodes);return n.text||(n.text=i=>i.text),n}static marksFromSchema(t){return YC(t.marks)}};function YC(e){let t={};for(let n in e){let i=e[n].spec.toDOM;i&&(t[n]=i)}return t}function vc(e){return e.document||window.document}var QC=new WeakMap;function B5(e){let t=QC.get(e);return t===void 0&&QC.set(e,t=U5(e)),t}function U5(e){let t=null;function n(i){if(i&&typeof i=="object")if(Array.isArray(i))if(typeof i[0]=="string")t||(t=[]),t.push(i);else for(let r=0;r<i.length;r++)n(i[r]);else for(let r in i)n(i[r])}return n(e),t}function yc(e,t,n,i){if(t.nodeType==1)return{dom:t};if(t.dom&&t.dom.nodeType==1)return t;let r=t[0],o;if(typeof r!="string")throw new RangeError("Invalid array passed to renderSpec");if(i&&(o=B5(i))&&o.indexOf(t)>-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let s=r.indexOf(" ");s>0&&(n=r.slice(0,s),r=r.slice(s+1));let a,l=n?e.createElementNS(n,r):e.createElement(r),u=t[1],c=1;if(u&&typeof u=="object"&&u.nodeType==null&&!Array.isArray(u)){c=2;for(let d in u)if(u[d]!=null){let f=d.indexOf(" ");f>0?l.setAttributeNS(d.slice(0,f),d.slice(f+1),u[d]):d=="style"&&l.style?l.style.cssText=u[d]:l.setAttribute(d,u[d])}}for(let d=c;d<t.length;d++){let f=t[d];if(f===0){if(d<t.length-1||d>c)throw new RangeError("Content hole must be the only child of its parent node");return{dom:l,contentDOM:l}}else if(typeof f=="string")l.appendChild(e.createTextNode(f));else{let{dom:p,contentDOM:h}=yc(e,f,n,i);if(l.appendChild(p),h){if(a)throw new RangeError("Multiple content holes");a=h}}}return{dom:l,contentDOM:a}}var kT=65535,xT=Math.pow(2,16);function j5(e,t){return e+t*xT}function vT(e){return e&kT}function Z5(e){return(e-(e&kT))/xT}var _T=1,wT=2,Ec=4,ST=8,ba=class{constructor(t,n,i){this.pos=t,this.delInfo=n,this.recover=i}get deleted(){return(this.delInfo&ST)>0}get deletedBefore(){return(this.delInfo&(_T|Ec))>0}get deletedAfter(){return(this.delInfo&(wT|Ec))>0}get deletedAcross(){return(this.delInfo&Ec)>0}},ir=class e{constructor(t,n=!1){if(this.ranges=t,this.inverted=n,!t.length&&e.empty)return e.empty}recover(t){let n=0,i=vT(t);if(!this.inverted)for(let r=0;r<i;r++)n+=this.ranges[r*3+2]-this.ranges[r*3+1];return this.ranges[i*3]+n+Z5(t)}mapResult(t,n=1){return this._map(t,n,!1)}map(t,n=1){return this._map(t,n,!0)}_map(t,n,i){let r=0,o=this.inverted?2:1,s=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let l=this.ranges[a]-(this.inverted?r:0);if(l>t)break;let u=this.ranges[a+o],c=this.ranges[a+s],d=l+u;if(t<=d){let f=u?t==l?-1:t==d?1:n:n,p=l+r+(f<0?0:c);if(i)return p;let h=t==(n<0?l:d)?null:j5(a/3,t-l),m=t==l?wT:t==d?_T:Ec;return(n<0?t!=l:t!=d)&&(m|=ST),new ba(p,m,h)}r+=c-u}return i?t+r:new ba(t+r,0,null)}touches(t,n){let i=0,r=vT(n),o=this.inverted?2:1,s=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let l=this.ranges[a]-(this.inverted?i:0);if(l>t)break;let u=this.ranges[a+o],c=l+u;if(t<=c&&a==r*3)return!0;i+=this.ranges[a+s]-u}return!1}forEach(t){let n=this.inverted?2:1,i=this.inverted?1:2;for(let r=0,o=0;r<this.ranges.length;r+=3){let s=this.ranges[r],a=s-(this.inverted?o:0),l=s+(this.inverted?0:o),u=this.ranges[r+n],c=this.ranges[r+i];t(a,a+u,l,l+c),o+=c-u}}invert(){return new e(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(t){return t==0?e.empty:new e(t<0?[0,-t,0]:[0,0,t])}};ir.empty=new ir([]);var va=class e{constructor(t,n,i=0,r=t?t.length:0){this.mirror=n,this.from=i,this.to=r,this._maps=t||[],this.ownData=!(t||n)}get maps(){return this._maps}slice(t=0,n=this.maps.length){return new e(this._maps,this.mirror,t,n)}appendMap(t,n){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(t),n!=null&&this.setMirror(this._maps.length-1,n)}appendMapping(t){for(let n=0,i=this._maps.length;n<t._maps.length;n++){let r=t.getMirror(n);this.appendMap(t._maps[n],r!=null&&r<n?i+r:void 0)}}getMirror(t){if(this.mirror){for(let n=0;n<this.mirror.length;n++)if(this.mirror[n]==t)return this.mirror[n+(n%2?-1:1)]}}setMirror(t,n){this.mirror||(this.mirror=[]),this.mirror.push(t,n)}appendMappingInverted(t){for(let n=t.maps.length-1,i=this._maps.length+t._maps.length;n>=0;n--){let r=t.getMirror(n);this.appendMap(t._maps[n].invert(),r!=null&&r>n?i-r-1:void 0)}}invert(){let t=new e;return t.appendMappingInverted(this),t}map(t,n=1){if(this.mirror)return this._map(t,n,!0);for(let i=this.from;i<this.to;i++)t=this._maps[i].map(t,n);return t}mapResult(t,n=1){return this._map(t,n,!1)}_map(t,n,i){let r=0;for(let o=this.from;o<this.to;o++){let s=this._maps[o],a=s.mapResult(t,n);if(a.recover!=null){let l=this.getMirror(o);if(l!=null&&l>o&&l<this.to){o=l,t=this._maps[l].recover(a.recover);continue}}r|=a.delInfo,t=a.pos}return i?t:new ba(t,r,null)}},f0=Object.create(null),mt=class{getMap(){return ir.empty}merge(t){return null}static fromJSON(t,n){if(!n||!n.stepType)throw new RangeError("Invalid input for Step.fromJSON");let i=f0[n.stepType];if(!i)throw new RangeError(`No step type ${n.stepType} defined`);return i.fromJSON(t,n)}static jsonID(t,n){if(t in f0)throw new RangeError("Duplicate use of step JSON ID "+t);return f0[t]=n,n.prototype.jsonID=t,n}},Et=class e{constructor(t,n){this.doc=t,this.failed=n}static ok(t){return new e(t,null)}static fail(t){return new e(null,t)}static fromReplace(t,n,i,r){try{return e.ok(t.replace(n,i,r))}catch(o){if(o instanceof Dr)return e.fail(o.message);throw o}}};function b0(e,t,n){let i=[];for(let r=0;r<e.childCount;r++){let o=e.child(r);o.content.size&&(o=o.copy(b0(o.content,t,o))),o.isInline&&(o=t(o,n,r)),i.push(o)}return z.fromArray(i)}var ya=class e extends mt{constructor(t,n,i){super(),this.from=t,this.to=n,this.mark=i}apply(t){let n=t.slice(this.from,this.to),i=t.resolve(this.from),r=i.node(i.sharedDepth(this.to)),o=new B(b0(n.content,(s,a)=>!s.isAtom||!a.type.allowsMarkType(this.mark.type)?s:s.mark(this.mark.addToSet(s.marks)),r),n.openStart,n.openEnd);return Et.fromReplace(t,this.from,this.to,o)}invert(){return new or(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),i=t.mapResult(this.to,-1);return n.deleted&&i.deleted||n.pos>=i.pos?null:new e(n.pos,i.pos,this.mark)}merge(t){return t instanceof e&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new e(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new e(n.from,n.to,t.markFromJSON(n.mark))}};mt.jsonID("addMark",ya);var or=class e extends mt{constructor(t,n,i){super(),this.from=t,this.to=n,this.mark=i}apply(t){let n=t.slice(this.from,this.to),i=new B(b0(n.content,r=>r.mark(this.mark.removeFromSet(r.marks)),t),n.openStart,n.openEnd);return Et.fromReplace(t,this.from,this.to,i)}invert(){return new ya(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),i=t.mapResult(this.to,-1);return n.deleted&&i.deleted||n.pos>=i.pos?null:new e(n.pos,i.pos,this.mark)}merge(t){return t instanceof e&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new e(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new e(n.from,n.to,t.markFromJSON(n.mark))}};mt.jsonID("removeMark",or);var ka=class e extends mt{constructor(t,n){super(),this.pos=t,this.mark=n}apply(t){let n=t.nodeAt(this.pos);if(!n)return Et.fail("No node at mark step's position");let i=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return Et.fromReplace(t,this.pos,this.pos+1,new B(z.from(i),0,n.isLeaf?0:1))}invert(t){let n=t.nodeAt(this.pos);if(n){let i=this.mark.addToSet(n.marks);if(i.length==n.marks.length){for(let r=0;r<n.marks.length;r++)if(!n.marks[r].isInSet(i))return new e(this.pos,n.marks[r]);return new e(this.pos,this.mark)}}return new vo(this.pos,this.mark)}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new e(n.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(t,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new e(n.pos,t.markFromJSON(n.mark))}};mt.jsonID("addNodeMark",ka);var vo=class e extends mt{constructor(t,n){super(),this.pos=t,this.mark=n}apply(t){let n=t.nodeAt(this.pos);if(!n)return Et.fail("No node at mark step's position");let i=n.type.create(n.attrs,null,this.mark.removeFromSet(n.marks));return Et.fromReplace(t,this.pos,this.pos+1,new B(z.from(i),0,n.isLeaf?0:1))}invert(t){let n=t.nodeAt(this.pos);return!n||!this.mark.isInSet(n.marks)?this:new ka(this.pos,this.mark)}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new e(n.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(t,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new e(n.pos,t.markFromJSON(n.mark))}};mt.jsonID("removeNodeMark",vo);var gt=class e extends mt{constructor(t,n,i,r=!1){super(),this.from=t,this.to=n,this.slice=i,this.structure=r}apply(t){return this.structure&&m0(t,this.from,this.to)?Et.fail("Structure replace would overwrite content"):Et.fromReplace(t,this.from,this.to,this.slice)}getMap(){return new ir([this.from,this.to-this.from,this.slice.size])}invert(t){return new e(this.from,this.from+this.slice.size,t.slice(this.from,this.to))}map(t){let n=t.mapResult(this.to,-1),i=this.from==this.to&&e.MAP_BIAS<0?n:t.mapResult(this.from,1);return i.deletedAcross&&n.deletedAcross?null:new e(i.pos,Math.max(i.pos,n.pos),this.slice,this.structure)}merge(t){if(!(t instanceof e)||t.structure||this.structure)return null;if(this.from+this.slice.size==t.from&&!this.slice.openEnd&&!t.slice.openStart){let n=this.slice.size+t.slice.size==0?B.empty:new B(this.slice.content.append(t.slice.content),this.slice.openStart,t.slice.openEnd);return new e(this.from,this.to+(t.to-t.from),n,this.structure)}else if(t.to==this.from&&!this.slice.openStart&&!t.slice.openEnd){let n=this.slice.size+t.slice.size==0?B.empty:new B(t.slice.content.append(this.slice.content),t.slice.openStart,this.slice.openEnd);return new e(t.from,this.to,n,this.structure)}else return null}toJSON(){let t={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new e(n.from,n.to,B.fromJSON(t,n.slice),!!n.structure)}};gt.MAP_BIAS=1;mt.jsonID("replace",gt);var at=class e extends mt{constructor(t,n,i,r,o,s,a=!1){super(),this.from=t,this.to=n,this.gapFrom=i,this.gapTo=r,this.slice=o,this.insert=s,this.structure=a}apply(t){if(this.structure&&(m0(t,this.from,this.gapFrom)||m0(t,this.gapTo,this.to)))return Et.fail("Structure gap-replace would overwrite content");let n=t.slice(this.gapFrom,this.gapTo);if(n.openStart||n.openEnd)return Et.fail("Gap is not a flat range");let i=this.slice.insertAt(this.insert,n.content);return i?Et.fromReplace(t,this.from,this.to,i):Et.fail("Content does not fit in gap")}getMap(){return new ir([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(t){let n=this.gapTo-this.gapFrom;return new e(this.from,this.from+this.slice.size+n,this.from+this.insert,this.from+this.insert+n,t.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(t){let n=t.mapResult(this.from,1),i=t.mapResult(this.to,-1),r=this.from==this.gapFrom?n.pos:t.map(this.gapFrom,-1),o=this.to==this.gapTo?i.pos:t.map(this.gapTo,1);return n.deletedAcross&&i.deletedAcross||r<n.pos||o>i.pos?null:new e(n.pos,i.pos,r,o,this.slice,this.insert,this.structure)}toJSON(){let t={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number"||typeof n.gapFrom!="number"||typeof n.gapTo!="number"||typeof n.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new e(n.from,n.to,n.gapFrom,n.gapTo,B.fromJSON(t,n.slice),n.insert,!!n.structure)}};mt.jsonID("replaceAround",at);function m0(e,t,n){let i=e.resolve(t),r=n-t,o=i.depth;for(;r>0&&o>0&&i.indexAfter(o)==i.node(o).childCount;)o--,r--;if(r>0){let s=i.node(o).maybeChild(i.indexAfter(o));for(;r>0;){if(!s||s.isLeaf)return!0;s=s.firstChild,r--}}return!1}function H5(e,t,n,i){let r=[],o=[],s,a;e.doc.nodesBetween(t,n,(l,u,c)=>{if(!l.isInline)return;let d=l.marks;if(!i.isInSet(d)&&c.type.allowsMarkType(i.type)){let f=Math.max(u,t),p=Math.min(u+l.nodeSize,n),h=i.addToSet(d);for(let m=0;m<d.length;m++)d[m].isInSet(h)||(s&&s.to==f&&s.mark.eq(d[m])?s.to=p:r.push(s=new or(f,p,d[m])));a&&a.to==f?a.to=p:o.push(a=new ya(f,p,i))}}),r.forEach(l=>e.step(l)),o.forEach(l=>e.step(l))}function q5(e,t,n,i){let r=[],o=0;e.doc.nodesBetween(t,n,(s,a)=>{if(!s.isInline)return;o++;let l=null;if(i instanceof pa){let u=s.marks,c;for(;c=i.isInSet(u);)(l||(l=[])).push(c),u=c.removeFromSet(u)}else i?i.isInSet(s.marks)&&(l=[i]):l=s.marks;if(l&&l.length){let u=Math.min(a+s.nodeSize,n);for(let c=0;c<l.length;c++){let d=l[c],f;for(let p=0;p<r.length;p++){let h=r[p];h.step==o-1&&d.eq(r[p].style)&&(f=h)}f?(f.to=u,f.step=o):r.push({style:d,from:Math.max(a,t),to:u,step:o})}}}),r.forEach(s=>e.step(new or(s.from,s.to,s.style)))}function v0(e,t,n,i=n.contentMatch,r=!0){let o=e.doc.nodeAt(t),s=[],a=t+1;for(let l=0;l<o.childCount;l++){let u=o.child(l),c=a+u.nodeSize,d=i.matchType(u.type);if(!d)s.push(new gt(a,c,B.empty));else{i=d;for(let f=0;f<u.marks.length;f++)n.allowsMarkType(u.marks[f].type)||e.step(new or(a,c,u.marks[f]));if(r&&u.isText&&n.whitespace!="pre"){let f,p=/\r?\n|\r/g,h;for(;f=p.exec(u.text);)h||(h=new B(z.from(n.schema.text(" ",n.allowedMarks(u.marks))),0,0)),s.push(new gt(a+f.index,a+f.index+f[0].length,h))}}a=c}if(!i.validEnd){let l=i.fillBefore(z.empty,!0);e.replace(a,a,new B(l,0,0))}for(let l=s.length-1;l>=0;l--)e.step(s[l])}function W5(e,t,n){return(t==0||e.canReplace(t,e.childCount))&&(n==e.childCount||e.canReplace(0,n))}function sr(e){let n=e.parent.content.cutByIndex(e.startIndex,e.endIndex);for(let i=e.depth,r=0,o=0;;--i){let s=e.$from.node(i),a=e.$from.index(i)+r,l=e.$to.indexAfter(i)-o;if(i<e.depth&&s.canReplace(a,l,n))return i;if(i==0||s.type.spec.isolating||!W5(s,a,l))break;a&&(r=1),l<s.childCount&&(o=1)}return null}function V5(e,t,n){let{$from:i,$to:r,depth:o}=t,s=i.before(o+1),a=r.after(o+1),l=s,u=a,c=z.empty,d=0;for(let h=o,m=!1;h>n;h--)m||i.index(h)>0?(m=!0,c=z.from(i.node(h).copy(c)),d++):l--;let f=z.empty,p=0;for(let h=o,m=!1;h>n;h--)m||r.after(h+1)<r.end(h)?(m=!0,f=z.from(r.node(h).copy(f)),p++):u++;e.step(new at(l,u,s,a,new B(c.append(f),d,p),c.size-d,!0))}function ko(e,t,n=null,i=e){let r=K5(e,t),o=r&&J5(i,t);return o?r.map(yT).concat({type:t,attrs:n}).concat(o.map(yT)):null}function yT(e){return{type:e,attrs:null}}function K5(e,t){let{parent:n,startIndex:i,endIndex:r}=e,o=n.contentMatchAt(i).findWrapping(t);if(!o)return null;let s=o.length?o[0]:t;return n.canReplaceWith(i,r,s)?o:null}function J5(e,t){let{parent:n,startIndex:i,endIndex:r}=e,o=n.child(i),s=t.contentMatch.findWrapping(o.type);if(!s)return null;let l=(s.length?s[s.length-1]:t).contentMatch;for(let u=i;l&&u<r;u++)l=l.matchType(n.child(u).type);return!l||!l.validEnd?null:s}function G5(e,t,n){let i=z.empty;for(let s=n.length-1;s>=0;s--){if(i.size){let a=n[s].type.contentMatch.matchFragment(i);if(!a||!a.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}i=z.from(n[s].type.create(n[s].attrs,i))}let r=t.start,o=t.end;e.step(new at(r,o,r,o,new B(i,0,0),n.length,!0))}function X5(e,t,n,i,r){if(!i.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let o=e.steps.length;e.doc.nodesBetween(t,n,(s,a)=>{let l=typeof r=="function"?r(s):r;if(s.isTextblock&&!s.hasMarkup(i,l)&&Y5(e.doc,e.mapping.slice(o).map(a),i)){let u=null;if(i.schema.linebreakReplacement){let p=i.whitespace=="pre",h=!!i.contentMatch.matchType(i.schema.linebreakReplacement);p&&!h?u=!1:!p&&h&&(u=!0)}u===!1&&$T(e,s,a,o),v0(e,e.mapping.slice(o).map(a,1),i,void 0,u===null);let c=e.mapping.slice(o),d=c.map(a,1),f=c.map(a+s.nodeSize,1);return e.step(new at(d,f,d+1,f-1,new B(z.from(i.create(l,null,s.marks)),0,0),1,!0)),u===!0&&ET(e,s,a,o),!1}})}function ET(e,t,n,i){t.forEach((r,o)=>{if(r.isText){let s,a=/\r?\n|\r/g;for(;s=a.exec(r.text);){let l=e.mapping.slice(i).map(n+1+o+s.index);e.replaceWith(l,l+1,t.type.schema.linebreakReplacement.create())}}})}function $T(e,t,n,i){t.forEach((r,o)=>{if(r.type==r.type.schema.linebreakReplacement){let s=e.mapping.slice(i).map(n+1+o);e.replaceWith(s,s+1,t.type.schema.text(`
96
+ `))}})}function Y5(e,t,n){let i=e.resolve(t),r=i.index();return i.parent.canReplaceWith(r,r+1,n)}function Q5(e,t,n,i,r){let o=e.doc.nodeAt(t);if(!o)throw new RangeError("No node at given position");n||(n=o.type);let s=n.create(i,null,r||o.marks);if(o.isLeaf)return e.replaceWith(t,t+o.nodeSize,s);if(!n.validContent(o.content))throw new RangeError("Invalid content for node type "+n.name);e.step(new at(t,t+o.nodeSize,t+1,t+o.nodeSize-1,new B(z.from(s),0,0),1,!0))}function pn(e,t,n=1,i){let r=e.resolve(t),o=r.depth-n,s=i&&i[i.length-1]||r.parent;if(o<0||r.parent.type.spec.isolating||!r.parent.canReplace(r.index(),r.parent.childCount)||!s.type.validContent(r.parent.content.cutByIndex(r.index(),r.parent.childCount)))return!1;for(let u=r.depth-1,c=n-2;u>o;u--,c--){let d=r.node(u),f=r.index(u);if(d.type.spec.isolating)return!1;let p=d.content.cutByIndex(f,d.childCount),h=i&&i[c+1];h&&(p=p.replaceChild(0,h.type.create(h.attrs)));let m=i&&i[c]||d;if(!d.canReplace(f+1,d.childCount)||!m.type.validContent(p))return!1}let a=r.indexAfter(o),l=i&&i[0];return r.node(o).canReplaceWith(a,a,l?l.type:r.node(o+1).type)}function eF(e,t,n=1,i){let r=e.doc.resolve(t),o=z.empty,s=z.empty;for(let a=r.depth,l=r.depth-n,u=n-1;a>l;a--,u--){o=z.from(r.node(a).copy(o));let c=i&&i[u];s=z.from(c?c.type.create(c.attrs,s):r.node(a).copy(s))}e.step(new gt(t,t,new B(o.append(s),n,n),!0))}function Cn(e,t){let n=e.resolve(t),i=n.index();return CT(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(i,i+1)}function tF(e,t){t.content.size||e.type.compatibleContent(t.type);let n=e.contentMatchAt(e.childCount),{linebreakReplacement:i}=e.type.schema;for(let r=0;r<t.childCount;r++){let o=t.child(r),s=o.type==i?e.type.schema.nodes.text:o.type;if(n=n.matchType(s),!n||!e.type.allowsMarks(o.marks))return!1}return n.validEnd}function CT(e,t){return!!(e&&t&&!e.isLeaf&&tF(e,t))}function xo(e,t,n=-1){let i=e.resolve(t);for(let r=i.depth;;r--){let o,s,a=i.index(r);if(r==i.depth?(o=i.nodeBefore,s=i.nodeAfter):n>0?(o=i.node(r+1),a++,s=i.node(r).maybeChild(a)):(o=i.node(r).maybeChild(a-1),s=i.node(r+1)),o&&!o.isTextblock&&CT(o,s)&&i.node(r).canReplace(a,a+1))return t;if(r==0)break;t=n<0?i.before(r):i.after(r)}}function nF(e,t,n){let i=null,{linebreakReplacement:r}=e.doc.type.schema,o=e.doc.resolve(t-n),s=o.node().type;if(r&&s.inlineContent){let c=s.whitespace=="pre",d=!!s.contentMatch.matchType(r);c&&!d?i=!1:!c&&d&&(i=!0)}let a=e.steps.length;if(i===!1){let c=e.doc.resolve(t+n);$T(e,c.node(),c.before(),a)}s.inlineContent&&v0(e,t+n-1,s,o.node().contentMatchAt(o.index()),i==null);let l=e.mapping.slice(a),u=l.map(t-n);if(e.step(new gt(u,l.map(t+n,-1),B.empty,!0)),i===!0){let c=e.doc.resolve(u);ET(e,c.node(),c.before(),e.steps.length)}return e}function rF(e,t,n){let i=e.resolve(t);if(i.parent.canReplaceWith(i.index(),i.index(),n))return t;if(i.parentOffset==0)for(let r=i.depth-1;r>=0;r--){let o=i.index(r);if(i.node(r).canReplaceWith(o,o,n))return i.before(r+1);if(o>0)return null}if(i.parentOffset==i.parent.content.size)for(let r=i.depth-1;r>=0;r--){let o=i.indexAfter(r);if(i.node(r).canReplaceWith(o,o,n))return i.after(r+1);if(o<i.node(r).childCount)return null}return null}function Tc(e,t,n){let i=e.resolve(t);if(!n.content.size)return t;let r=n.content;for(let o=0;o<n.openStart;o++)r=r.firstChild.content;for(let o=1;o<=(n.openStart==0&&n.size?2:1);o++)for(let s=i.depth;s>=0;s--){let a=s==i.depth?0:i.pos<=(i.start(s+1)+i.end(s+1))/2?-1:1,l=i.index(s)+(a>0?1:0),u=i.node(s),c=!1;if(o==1)c=u.canReplace(l,l,r);else{let d=u.contentMatchAt(l).findWrapping(r.firstChild.type);c=d&&u.canReplaceWith(l,l,d[0])}if(c)return a==0?i.pos:a<0?i.before(s+1):i.after(s+1)}return null}function xa(e,t,n=t,i=B.empty){if(t==n&&!i.size)return null;let r=e.resolve(t),o=e.resolve(n);return TT(r,o,i)?new gt(t,n,i):new g0(r,o,i).fit()}function TT(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}var g0=class{constructor(t,n,i){this.$from=t,this.$to=n,this.unplaced=i,this.frontier=[],this.placed=z.empty;for(let r=0;r<=t.depth;r++){let o=t.node(r);this.frontier.push({type:o.type,match:o.contentMatchAt(t.indexAfter(r))})}for(let r=t.depth;r>0;r--)this.placed=z.from(t.node(r).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let u=this.findFittable();u?this.placeNodes(u):this.openMore()||this.dropNode()}let t=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,i=this.$from,r=this.close(t<0?this.$to:i.doc.resolve(t));if(!r)return null;let o=this.placed,s=i.depth,a=r.depth;for(;s&&a&&o.childCount==1;)o=o.firstChild.content,s--,a--;let l=new B(o,s,a);return t>-1?new at(i.pos,t,this.$to.pos,this.$to.end(),l,n):l.size||i.pos!=this.$to.pos?new gt(i.pos,r.pos,l):null}findFittable(){let t=this.unplaced.openStart;for(let n=this.unplaced.content,i=0,r=this.unplaced.openEnd;i<t;i++){let o=n.firstChild;if(n.childCount>1&&(r=0),o.type.spec.isolating&&r<=i){t=i;break}n=o.content}for(let n=1;n<=2;n++)for(let i=n==1?t:this.unplaced.openStart;i>=0;i--){let r,o=null;i?(o=p0(this.unplaced.content,i-1).firstChild,r=o.content):r=this.unplaced.content;let s=r.firstChild;for(let a=this.depth;a>=0;a--){let{type:l,match:u}=this.frontier[a],c,d=null;if(n==1&&(s?u.matchType(s.type)||(d=u.fillBefore(z.from(s),!1)):o&&l.compatibleContent(o.type)))return{sliceDepth:i,frontierDepth:a,parent:o,inject:d};if(n==2&&s&&(c=u.findWrapping(s.type)))return{sliceDepth:i,frontierDepth:a,parent:o,wrap:c};if(o&&u.matchType(o.type))break}}}openMore(){let{content:t,openStart:n,openEnd:i}=this.unplaced,r=p0(t,n);return!r.childCount||r.firstChild.isLeaf?!1:(this.unplaced=new B(t,n+1,Math.max(i,r.size+n>=t.size-i?n+1:0)),!0)}dropNode(){let{content:t,openStart:n,openEnd:i}=this.unplaced,r=p0(t,n);if(r.childCount<=1&&n>0){let o=t.size-n<=n+r.size;this.unplaced=new B(ma(t,n-1,1),n-1,o?n-1:i)}else this.unplaced=new B(ma(t,n,1),n,i)}placeNodes({sliceDepth:t,frontierDepth:n,parent:i,inject:r,wrap:o}){for(;this.depth>n;)this.closeFrontierNode();if(o)for(let m=0;m<o.length;m++)this.openFrontierNode(o[m]);let s=this.unplaced,a=i?i.content:s.content,l=s.openStart-t,u=0,c=[],{match:d,type:f}=this.frontier[n];if(r){for(let m=0;m<r.childCount;m++)c.push(r.child(m));d=d.matchFragment(r)}let p=a.size+t-(s.content.size-s.openEnd);for(;u<a.childCount;){let m=a.child(u),g=d.matchType(m.type);if(!g)break;u++,(u>1||l==0||m.content.size)&&(d=g,c.push(IT(m.mark(f.allowedMarks(m.marks)),u==1?l:0,u==a.childCount?p:-1)))}let h=u==a.childCount;h||(p=-1),this.placed=ga(this.placed,n,z.from(c)),this.frontier[n].match=d,h&&p<0&&i&&i.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let m=0,g=a;m<p;m++){let b=g.lastChild;this.frontier.push({type:b.type,match:b.contentMatchAt(b.childCount)}),g=b.content}this.unplaced=h?t==0?B.empty:new B(ma(s.content,t-1,1),t-1,p<0?s.openEnd:t-1):new B(ma(s.content,t,u),s.openStart,s.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let t=this.frontier[this.depth],n;if(!t.type.isTextblock||!h0(this.$to,this.$to.depth,t.type,t.match,!1)||this.$to.depth==this.depth&&(n=this.findCloseLevel(this.$to))&&n.depth==this.depth)return-1;let{depth:i}=this.$to,r=this.$to.after(i);for(;i>1&&r==this.$to.end(--i);)++r;return r}findCloseLevel(t){e:for(let n=Math.min(this.depth,t.depth);n>=0;n--){let{match:i,type:r}=this.frontier[n],o=n<t.depth&&t.end(n+1)==t.pos+(t.depth-(n+1)),s=h0(t,n,r,i,o);if(s){for(let a=n-1;a>=0;a--){let{match:l,type:u}=this.frontier[a],c=h0(t,a,u,l,!0);if(!c||c.childCount)continue e}return{depth:n,fit:s,move:o?t.doc.resolve(t.after(n+1)):t}}}}close(t){let n=this.findCloseLevel(t);if(!n)return null;for(;this.depth>n.depth;)this.closeFrontierNode();n.fit.childCount&&(this.placed=ga(this.placed,n.depth,n.fit)),t=n.move;for(let i=n.depth+1;i<=t.depth;i++){let r=t.node(i),o=r.type.contentMatch.fillBefore(r.content,!0,t.index(i));this.openFrontierNode(r.type,r.attrs,o)}return t}openFrontierNode(t,n=null,i){let r=this.frontier[this.depth];r.match=r.match.matchType(t),this.placed=ga(this.placed,this.depth,z.from(t.create(n,i))),this.frontier.push({type:t,match:t.contentMatch})}closeFrontierNode(){let n=this.frontier.pop().match.fillBefore(z.empty,!0);n.childCount&&(this.placed=ga(this.placed,this.frontier.length,n))}};function ma(e,t,n){return t==0?e.cutByIndex(n,e.childCount):e.replaceChild(0,e.firstChild.copy(ma(e.firstChild.content,t-1,n)))}function ga(e,t,n){return t==0?e.append(n):e.replaceChild(e.childCount-1,e.lastChild.copy(ga(e.lastChild.content,t-1,n)))}function p0(e,t){for(let n=0;n<t;n++)e=e.firstChild.content;return e}function IT(e,t,n){if(t<=0)return e;let i=e.content;return t>1&&(i=i.replaceChild(0,IT(i.firstChild,t-1,i.childCount==1?n-1:0))),t>0&&(i=e.type.contentMatch.fillBefore(i).append(i),n<=0&&(i=i.append(e.type.contentMatch.matchFragment(i).fillBefore(z.empty,!0)))),e.copy(i)}function h0(e,t,n,i,r){let o=e.node(t),s=r?e.indexAfter(t):e.index(t);if(s==o.childCount&&!n.compatibleContent(o.type))return null;let a=i.fillBefore(o.content,!0,s);return a&&!iF(n,o.content,s)?a:null}function iF(e,t,n){for(let i=n;i<t.childCount;i++)if(!e.allowsMarks(t.child(i).marks))return!0;return!1}function oF(e){return e.spec.defining||e.spec.definingForContent}function sF(e,t,n,i){if(!i.size)return e.deleteRange(t,n);let r=e.doc.resolve(t),o=e.doc.resolve(n);if(TT(r,o,i))return e.step(new gt(t,n,i));let s=MT(r,o);s[s.length-1]==0&&s.pop();let a=-(r.depth+1);s.unshift(a);for(let f=r.depth,p=r.pos-1;f>0;f--,p--){let h=r.node(f).type.spec;if(h.defining||h.definingAsContext||h.isolating)break;s.indexOf(f)>-1?a=f:r.before(f)==p&&s.splice(1,0,-f)}let l=s.indexOf(a),u=[],c=i.openStart;for(let f=i.content,p=0;;p++){let h=f.firstChild;if(u.push(h),p==i.openStart)break;f=h.content}for(let f=c-1;f>=0;f--){let p=u[f],h=oF(p.type);if(h&&!p.sameMarkup(r.node(Math.abs(a)-1)))c=f;else if(h||!p.type.isTextblock)break}for(let f=i.openStart;f>=0;f--){let p=(f+c+1)%(i.openStart+1),h=u[p];if(h)for(let m=0;m<s.length;m++){let g=s[(m+l)%s.length],b=!0;g<0&&(b=!1,g=-g);let v=r.node(g-1),y=r.index(g-1);if(v.canReplaceWith(y,y,h.type,h.marks))return e.replace(r.before(g),b?o.after(g):n,new B(AT(i.content,0,i.openStart,p),p,i.openEnd))}}let d=e.steps.length;for(let f=s.length-1;f>=0&&(e.replace(t,n,i),!(e.steps.length>d));f--){let p=s[f];p<0||(t=r.before(p),n=o.after(p))}}function AT(e,t,n,i,r){if(t<n){let o=e.firstChild;e=e.replaceChild(0,o.copy(AT(o.content,t+1,n,i,o)))}if(t>i){let o=r.contentMatchAt(0),s=o.fillBefore(e).append(e);e=s.append(o.matchFragment(s).fillBefore(z.empty,!0))}return e}function aF(e,t,n,i){if(!i.isInline&&t==n&&e.doc.resolve(t).parent.content.size){let r=rF(e.doc,t,i.type);r!=null&&(t=n=r)}e.replaceRange(t,n,new B(z.from(i),0,0))}function lF(e,t,n){let i=e.doc.resolve(t),r=e.doc.resolve(n);if(i.parent.isTextblock&&r.parent.isTextblock&&i.start()!=r.start()&&i.parentOffset==0&&r.parentOffset==0){let s=i.sharedDepth(n),a=!1;for(let l=i.depth;l>s;l--)i.node(l).type.spec.isolating&&(a=!0);for(let l=r.depth;l>s;l--)r.node(l).type.spec.isolating&&(a=!0);if(!a){for(let l=i.depth;l>0&&t==i.start(l);l--)t=i.before(l);for(let l=r.depth;l>0&&n==r.start(l);l--)n=r.before(l);i=e.doc.resolve(t),r=e.doc.resolve(n)}}let o=MT(i,r);for(let s=0;s<o.length;s++){let a=o[s],l=s==o.length-1;if(l&&a==0||i.node(a).type.contentMatch.validEnd)return e.delete(i.start(a),r.end(a));if(a>0&&(l||i.node(a-1).canReplace(i.index(a-1),r.indexAfter(a-1))))return e.delete(i.before(a),r.after(a))}for(let s=1;s<=i.depth&&s<=r.depth;s++)if(t-i.start(s)==i.depth-s&&n>i.end(s)&&r.end(s)-n!=r.depth-s&&i.start(s-1)==r.start(s-1)&&i.node(s-1).canReplace(i.index(s-1),r.index(s-1)))return e.delete(i.before(s),n);e.delete(t,n)}function MT(e,t){let n=[],i=Math.min(e.depth,t.depth);for(let r=i;r>=0;r--){let o=e.start(r);if(o<e.pos-(e.depth-r)||t.end(r)>t.pos+(t.depth-r)||e.node(r).type.spec.isolating||t.node(r).type.spec.isolating)break;(o==t.start(r)||r==e.depth&&r==t.depth&&e.parent.inlineContent&&t.parent.inlineContent&&r&&t.start(r-1)==o-1)&&n.push(r)}return n}var $c=class e extends mt{constructor(t,n,i){super(),this.pos=t,this.attr=n,this.value=i}apply(t){let n=t.nodeAt(this.pos);if(!n)return Et.fail("No node at attribute step's position");let i=Object.create(null);for(let o in n.attrs)i[o]=n.attrs[o];i[this.attr]=this.value;let r=n.type.create(i,null,n.marks);return Et.fromReplace(t,this.pos,this.pos+1,new B(z.from(r),0,n.isLeaf?0:1))}getMap(){return ir.empty}invert(t){return new e(this.pos,this.attr,t.nodeAt(this.pos).attrs[this.attr])}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new e(n.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(t,n){if(typeof n.pos!="number"||typeof n.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new e(n.pos,n.attr,n.value)}};mt.jsonID("attr",$c);var Cc=class e extends mt{constructor(t,n){super(),this.attr=t,this.value=n}apply(t){let n=Object.create(null);for(let r in t.attrs)n[r]=t.attrs[r];n[this.attr]=this.value;let i=t.type.create(n,t.content,t.marks);return Et.ok(i)}getMap(){return ir.empty}invert(t){return new e(this.attr,t.attrs[this.attr])}map(t){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(t,n){if(typeof n.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new e(n.attr,n.value)}};mt.jsonID("docAttr",Cc);var yo=class extends Error{};yo=function e(t){let n=Error.call(this,t);return n.__proto__=e.prototype,n};yo.prototype=Object.create(Error.prototype);yo.prototype.constructor=yo;yo.prototype.name="TransformError";var Nr=class{constructor(t){this.doc=t,this.steps=[],this.docs=[],this.mapping=new va}get before(){return this.docs.length?this.docs[0]:this.doc}step(t){let n=this.maybeStep(t);if(n.failed)throw new yo(n.failed);return this}maybeStep(t){let n=t.apply(this.doc);return n.failed||this.addStep(t,n.doc),n}get docChanged(){return this.steps.length>0}changedRange(){let t=1e9,n=-1e9;for(let i=0;i<this.mapping.maps.length;i++){let r=this.mapping.maps[i];i&&(t=r.map(t,1),n=r.map(n,-1)),r.forEach((o,s,a,l)=>{t=Math.min(t,a),n=Math.max(n,l)})}return t==1e9?null:{from:t,to:n}}addStep(t,n){this.docs.push(this.doc),this.steps.push(t),this.mapping.appendMap(t.getMap()),this.doc=n}replace(t,n=t,i=B.empty){let r=xa(this.doc,t,n,i);return r&&this.step(r),this}replaceWith(t,n,i){return this.replace(t,n,new B(z.from(i),0,0))}delete(t,n){return this.replace(t,n,B.empty)}insert(t,n){return this.replaceWith(t,t,n)}replaceRange(t,n,i){return sF(this,t,n,i),this}replaceRangeWith(t,n,i){return aF(this,t,n,i),this}deleteRange(t,n){return lF(this,t,n),this}lift(t,n){return V5(this,t,n),this}join(t,n=1){return nF(this,t,n),this}wrap(t,n){return G5(this,t,n),this}setBlockType(t,n=t,i,r=null){return X5(this,t,n,i,r),this}setNodeMarkup(t,n,i=null,r){return Q5(this,t,n,i,r),this}setNodeAttribute(t,n,i){return this.step(new $c(t,n,i)),this}setDocAttribute(t,n){return this.step(new Cc(t,n)),this}addNodeMark(t,n){return this.step(new ka(t,n)),this}removeNodeMark(t,n){let i=this.doc.nodeAt(t);if(!i)throw new RangeError("No node at position "+t);if(n instanceof ye)n.isInSet(i.marks)&&this.step(new vo(t,n));else{let r=i.marks,o,s=[];for(;o=n.isInSet(r);)s.push(new vo(t,o)),r=o.removeFromSet(r);for(let a=s.length-1;a>=0;a--)this.step(s[a])}return this}split(t,n=1,i){return eF(this,t,n,i),this}addMark(t,n,i){return H5(this,t,n,i),this}removeMark(t,n,i){return q5(this,t,n,i),this}clearIncompatible(t,n,i){return v0(this,t,n,i),this}};var y0=Object.create(null),X=class{constructor(t,n,i){this.$anchor=t,this.$head=n,this.ranges=i||[new wo(t.min(n),t.max(n))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let t=this.ranges;for(let n=0;n<t.length;n++)if(t[n].$from.pos!=t[n].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(t,n=B.empty){let i=n.content.lastChild,r=null;for(let a=0;a<n.openEnd;a++)r=i,i=i.lastChild;let o=t.steps.length,s=this.ranges;for(let a=0;a<s.length;a++){let{$from:l,$to:u}=s[a],c=t.mapping.slice(o);t.replaceRange(c.map(l.pos),c.map(u.pos),a?B.empty:n),a==0&&NT(t,o,(i?i.isInline:r&&r.isTextblock)?-1:1)}}replaceWith(t,n){let i=t.steps.length,r=this.ranges;for(let o=0;o<r.length;o++){let{$from:s,$to:a}=r[o],l=t.mapping.slice(i),u=l.map(s.pos),c=l.map(a.pos);o?t.deleteRange(u,c):(t.replaceRangeWith(u,c,n),NT(t,i,n.isInline?-1:1))}}static findFrom(t,n,i=!1){let r=t.parent.inlineContent?new q(t):_o(t.node(0),t.parent,t.pos,t.index(),n,i);if(r)return r;for(let o=t.depth-1;o>=0;o--){let s=n<0?_o(t.node(0),t.node(o),t.before(o+1),t.index(o),n,i):_o(t.node(0),t.node(o),t.after(o+1),t.index(o)+1,n,i);if(s)return s}return null}static near(t,n=1){return this.findFrom(t,n)||this.findFrom(t,-n)||new jt(t.node(0))}static atStart(t){return _o(t,t,0,0,1)||new jt(t)}static atEnd(t){return _o(t,t,t.content.size,t.childCount,-1)||new jt(t)}static fromJSON(t,n){if(!n||!n.type)throw new RangeError("Invalid input for Selection.fromJSON");let i=y0[n.type];if(!i)throw new RangeError(`No selection type ${n.type} defined`);return i.fromJSON(t,n)}static jsonID(t,n){if(t in y0)throw new RangeError("Duplicate use of selection JSON ID "+t);return y0[t]=n,n.prototype.jsonID=t,n}getBookmark(){return q.between(this.$anchor,this.$head).getBookmark()}};X.prototype.visible=!0;var wo=class{constructor(t,n){this.$from=t,this.$to=n}},zT=!1;function DT(e){!zT&&!e.parent.inlineContent&&(zT=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+e.parent.type.name+")"))}var q=class e extends X{constructor(t,n=t){DT(t),DT(n),super(t,n)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(t,n){let i=t.resolve(n.map(this.head));if(!i.parent.inlineContent)return X.near(i);let r=t.resolve(n.map(this.anchor));return new e(r.parent.inlineContent?r:i,i)}replace(t,n=B.empty){if(super.replace(t,n),n==B.empty){let i=this.$from.marksAcross(this.$to);i&&t.ensureMarks(i)}}eq(t){return t instanceof e&&t.anchor==this.anchor&&t.head==this.head}getBookmark(){return new Ac(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(t,n){if(typeof n.anchor!="number"||typeof n.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new e(t.resolve(n.anchor),t.resolve(n.head))}static create(t,n,i=n){let r=t.resolve(n);return new this(r,i==n?r:t.resolve(i))}static between(t,n,i){let r=t.pos-n.pos;if((!i||r)&&(i=r>=0?1:-1),!n.parent.inlineContent){let o=X.findFrom(n,i,!0)||X.findFrom(n,-i,!0);if(o)n=o.$head;else return X.near(n,i)}return t.parent.inlineContent||(r==0?t=n:(t=(X.findFrom(t,-i,!0)||X.findFrom(t,i,!0)).$anchor,t.pos<n.pos!=r<0&&(t=n))),new e(t,n)}};X.jsonID("text",q);var Ac=class e{constructor(t,n){this.anchor=t,this.head=n}map(t){return new e(t.map(this.anchor),t.map(this.head))}resolve(t){return q.between(t.resolve(this.anchor),t.resolve(this.head))}},G=class e extends X{constructor(t){let n=t.nodeAfter,i=t.node(0).resolve(t.pos+n.nodeSize);super(t,i),this.node=n}map(t,n){let{deleted:i,pos:r}=n.mapResult(this.anchor),o=t.resolve(r);return i?X.near(o):new e(o)}content(){return new B(z.from(this.node),0,0)}eq(t){return t instanceof e&&t.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new x0(this.anchor)}static fromJSON(t,n){if(typeof n.anchor!="number")throw new RangeError("Invalid input for NodeSelection.fromJSON");return new e(t.resolve(n.anchor))}static create(t,n){return new e(t.resolve(n))}static isSelectable(t){return!t.isText&&t.type.spec.selectable!==!1}};G.prototype.visible=!1;X.jsonID("node",G);var x0=class e{constructor(t){this.anchor=t}map(t){let{deleted:n,pos:i}=t.mapResult(this.anchor);return n?new Ac(i,i):new e(i)}resolve(t){let n=t.resolve(this.anchor),i=n.nodeAfter;return i&&G.isSelectable(i)?new G(n):X.near(n)}},jt=class e extends X{constructor(t){super(t.resolve(0),t.resolve(t.content.size))}replace(t,n=B.empty){if(n==B.empty){t.delete(0,t.doc.content.size);let i=X.atStart(t.doc);i.eq(t.selection)||t.setSelection(i)}else super.replace(t,n)}toJSON(){return{type:"all"}}static fromJSON(t){return new e(t)}map(t){return new e(t)}eq(t){return t instanceof e}getBookmark(){return uF}};X.jsonID("all",jt);var uF={map(){return this},resolve(e){return new jt(e)}};function _o(e,t,n,i,r,o=!1){if(t.inlineContent)return q.create(e,n);for(let s=i-(r>0?0:1);r>0?s<t.childCount:s>=0;s+=r){let a=t.child(s);if(a.isAtom){if(!o&&G.isSelectable(a))return G.create(e,n-(r<0?a.nodeSize:0))}else{let l=_o(e,a,n+r,r<0?a.childCount:0,r,o);if(l)return l}n+=a.nodeSize*r}return null}function NT(e,t,n){let i=e.steps.length-1;if(i<t)return;let r=e.steps[i];if(!(r instanceof gt||r instanceof at))return;let o=e.mapping.maps[i],s;o.forEach((a,l,u,c)=>{s==null&&(s=c)}),e.setSelection(X.near(e.doc.resolve(s),n))}var OT=1,Ic=2,RT=4,_0=class extends Nr{constructor(t){super(t.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=t.selection,this.storedMarks=t.storedMarks}get selection(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection}setSelection(t){if(t.$from.doc!=this.doc)throw new RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=t,this.curSelectionFor=this.steps.length,this.updated=(this.updated|OT)&~Ic,this.storedMarks=null,this}get selectionSet(){return(this.updated&OT)>0}setStoredMarks(t){return this.storedMarks=t,this.updated|=Ic,this}ensureMarks(t){return ye.sameSet(this.storedMarks||this.selection.$from.marks(),t)||this.setStoredMarks(t),this}addStoredMark(t){return this.ensureMarks(t.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(t){return this.ensureMarks(t.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(this.updated&Ic)>0}addStep(t,n){super.addStep(t,n),this.updated=this.updated&~Ic,this.storedMarks=null}setTime(t){return this.time=t,this}replaceSelection(t){return this.selection.replace(this,t),this}replaceSelectionWith(t,n=!0){let i=this.selection;return n&&(t=t.mark(this.storedMarks||(i.empty?i.$from.marks():i.$from.marksAcross(i.$to)||ye.none))),i.replaceWith(this,t),this}deleteSelection(){return this.selection.replace(this),this}insertText(t,n,i){let r=this.doc.type.schema;if(n==null)return t?this.replaceSelectionWith(r.text(t),!0):this.deleteSelection();{if(i==null&&(i=n),!t)return this.deleteRange(n,i);let o=this.storedMarks;if(!o){let s=this.doc.resolve(n);o=i==n?s.marks():s.marksAcross(this.doc.resolve(i))}return this.replaceRangeWith(n,i,r.text(t,o)),!this.selection.empty&&this.selection.to==n+t.length&&this.setSelection(X.near(this.selection.$to)),this}}setMeta(t,n){return this.meta[typeof t=="string"?t:t.key]=n,this}getMeta(t){return this.meta[typeof t=="string"?t:t.key]}get isGeneric(){for(let t in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=RT,this}get scrolledIntoView(){return(this.updated&RT)>0}};function PT(e,t){return!t||!e?e:e.bind(t)}var mi=class{constructor(t,n,i){this.name=t,this.init=PT(n.init,i),this.apply=PT(n.apply,i)}},cF=[new mi("doc",{init(e){return e.doc||e.schema.topNodeType.createAndFill()},apply(e){return e.doc}}),new mi("selection",{init(e,t){return e.selection||X.atStart(t.doc)},apply(e){return e.selection}}),new mi("storedMarks",{init(e){return e.storedMarks||null},apply(e,t,n,i){return i.selection.$cursor?e.storedMarks:null}}),new mi("scrollToSelection",{init(){return 0},apply(e,t){return e.scrolledIntoView?t+1:t}})],_a=class{constructor(t,n){this.schema=t,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=cF.slice(),n&&n.forEach(i=>{if(this.pluginsByKey[i.key])throw new RangeError("Adding different instances of a keyed plugin ("+i.key+")");this.plugins.push(i),this.pluginsByKey[i.key]=i,i.spec.state&&this.fields.push(new mi(i.key,i.spec.state,i))})}},wa=class e{constructor(t){this.config=t}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(t){return this.applyTransaction(t).state}filterTransaction(t,n=-1){for(let i=0;i<this.config.plugins.length;i++)if(i!=n){let r=this.config.plugins[i];if(r.spec.filterTransaction&&!r.spec.filterTransaction.call(r,t,this))return!1}return!0}applyTransaction(t){if(!this.filterTransaction(t))return{state:this,transactions:[]};let n=[t],i=this.applyInner(t),r=null;for(;;){let o=!1;for(let s=0;s<this.config.plugins.length;s++){let a=this.config.plugins[s];if(a.spec.appendTransaction){let l=r?r[s].n:0,u=r?r[s].state:this,c=l<n.length&&a.spec.appendTransaction.call(a,l?n.slice(l):n,u,i);if(c&&i.filterTransaction(c,s)){if(c.setMeta("appendedTransaction",t),!r){r=[];for(let d=0;d<this.config.plugins.length;d++)r.push(d<s?{state:i,n:n.length}:{state:this,n:0})}n.push(c),i=i.applyInner(c),o=!0}r&&(r[s]={state:i,n:n.length})}}if(!o)return{state:i,transactions:n}}}applyInner(t){if(!t.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");let n=new e(this.config),i=this.config.fields;for(let r=0;r<i.length;r++){let o=i[r];n[o.name]=o.apply(t,this[o.name],this,n)}return n}get tr(){return new _0(this)}static create(t){let n=new _a(t.doc?t.doc.type.schema:t.schema,t.plugins),i=new e(n);for(let r=0;r<n.fields.length;r++)i[n.fields[r].name]=n.fields[r].init(t,i);return i}reconfigure(t){let n=new _a(this.schema,t.plugins),i=n.fields,r=new e(n);for(let o=0;o<i.length;o++){let s=i[o].name;r[s]=this.hasOwnProperty(s)?this[s]:i[o].init(t,r)}return r}toJSON(t){let n={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(n.storedMarks=this.storedMarks.map(i=>i.toJSON())),t&&typeof t=="object")for(let i in t){if(i=="doc"||i=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");let r=t[i],o=r.spec.state;o&&o.toJSON&&(n[i]=o.toJSON.call(r,this[r.key]))}return n}static fromJSON(t,n,i){if(!n)throw new RangeError("Invalid input for EditorState.fromJSON");if(!t.schema)throw new RangeError("Required config field 'schema' missing");let r=new _a(t.schema,t.plugins),o=new e(r);return r.fields.forEach(s=>{if(s.name=="doc")o.doc=En.fromJSON(t.schema,n.doc);else if(s.name=="selection")o.selection=X.fromJSON(o.doc,n.selection);else if(s.name=="storedMarks")n.storedMarks&&(o.storedMarks=n.storedMarks.map(t.schema.markFromJSON));else{if(i)for(let a in i){let l=i[a],u=l.spec.state;if(l.key==s.name&&u&&u.fromJSON&&Object.prototype.hasOwnProperty.call(n,a)){o[s.name]=u.fromJSON.call(l,t,n[a],o);return}}o[s.name]=s.init(t,o)}}),o}};function LT(e,t,n){for(let i in e){let r=e[i];r instanceof Function?r=r.bind(t):i=="handleDOMEvents"&&(r=LT(r,t,{})),n[i]=r}return n}var de=class{constructor(t){this.spec=t,this.props={},t.props&&LT(t.props,this,this.props),this.key=t.key?t.key.key:FT("plugin")}getState(t){return t[this.key]}},k0=Object.create(null);function FT(e){return e in k0?e+"$"+ ++k0[e]:(k0[e]=0,e+"$")}var we=class{constructor(t="key"){this.key=FT(t)}get(t){return t.config.pluginsByKey[this.key]}getState(t){return t[this.key]}};var UT=(e,t)=>e.selection.empty?!1:(t&&t(e.tr.deleteSelection().scrollIntoView()),!0);function jT(e,t){let{$cursor:n}=e.selection;return!n||(t?!t.endOfTextblock("backward",e):n.parentOffset>0)?null:n}var S0=(e,t,n)=>{let i=jT(e,n);if(!i)return!1;let r=$0(i);if(!r){let s=i.blockRange(),a=s&&sr(s);return a==null?!1:(t&&t(e.tr.lift(s,a).scrollIntoView()),!0)}let o=r.nodeBefore;if(XT(e,r,t,-1))return!0;if(i.parent.content.size==0&&(So(o,"end")||G.isSelectable(o)))for(let s=i.depth;;s--){let a=xa(e.doc,i.before(s),i.after(s),B.empty);if(a&&a.slice.size<a.to-a.from){if(t){let l=e.tr.step(a);l.setSelection(So(o,"end")?X.findFrom(l.doc.resolve(l.mapping.map(r.pos,-1)),-1):G.create(l.doc,r.pos-o.nodeSize)),t(l.scrollIntoView())}return!0}if(s==1||i.node(s-1).childCount>1)break}return o.isAtom&&r.depth==i.depth-1?(t&&t(e.tr.delete(r.pos-o.nodeSize,r.pos).scrollIntoView()),!0):!1},ZT=(e,t,n)=>{let i=jT(e,n);if(!i)return!1;let r=$0(i);return r?qT(e,r,t):!1},HT=(e,t,n)=>{let i=WT(e,n);if(!i)return!1;let r=I0(i);return r?qT(e,r,t):!1};function qT(e,t,n){let i=t.nodeBefore,r=i,o=t.pos-1;for(;!r.isTextblock;o--){if(r.type.spec.isolating)return!1;let c=r.lastChild;if(!c)return!1;r=c}let s=t.nodeAfter,a=s,l=t.pos+1;for(;!a.isTextblock;l++){if(a.type.spec.isolating)return!1;let c=a.firstChild;if(!c)return!1;a=c}let u=xa(e.doc,o,l,B.empty);if(!u||u.from!=o||u instanceof gt&&u.slice.size>=l-o)return!1;if(n){let c=e.tr.step(u);c.setSelection(q.create(c.doc,o)),n(c.scrollIntoView())}return!0}function So(e,t,n=!1){for(let i=e;i;i=t=="start"?i.firstChild:i.lastChild){if(i.isTextblock)return!0;if(n&&i.childCount!=1)return!1}return!1}var E0=(e,t,n)=>{let{$head:i,empty:r}=e.selection,o=i;if(!r)return!1;if(i.parent.isTextblock){if(n?!n.endOfTextblock("backward",e):i.parentOffset>0)return!1;o=$0(i)}let s=o&&o.nodeBefore;return!s||!G.isSelectable(s)?!1:(t&&t(e.tr.setSelection(G.create(e.doc,o.pos-s.nodeSize)).scrollIntoView()),!0)};function $0(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){if(e.index(t)>0)return e.doc.resolve(e.before(t+1));if(e.node(t).type.spec.isolating)break}return null}function WT(e,t){let{$cursor:n}=e.selection;return!n||(t?!t.endOfTextblock("forward",e):n.parentOffset<n.parent.content.size)?null:n}var C0=(e,t,n)=>{let i=WT(e,n);if(!i)return!1;let r=I0(i);if(!r)return!1;let o=r.nodeAfter;if(XT(e,r,t,1))return!0;if(i.parent.content.size==0&&(So(o,"start")||G.isSelectable(o))){let s=xa(e.doc,i.before(),i.after(),B.empty);if(s&&s.slice.size<s.to-s.from){if(t){let a=e.tr.step(s);a.setSelection(So(o,"start")?X.findFrom(a.doc.resolve(a.mapping.map(r.pos)),1):G.create(a.doc,a.mapping.map(r.pos))),t(a.scrollIntoView())}return!0}}return o.isAtom&&r.depth==i.depth-1?(t&&t(e.tr.delete(r.pos,r.pos+o.nodeSize).scrollIntoView()),!0):!1},T0=(e,t,n)=>{let{$head:i,empty:r}=e.selection,o=i;if(!r)return!1;if(i.parent.isTextblock){if(n?!n.endOfTextblock("forward",e):i.parentOffset<i.parent.content.size)return!1;o=I0(i)}let s=o&&o.nodeAfter;return!s||!G.isSelectable(s)?!1:(t&&t(e.tr.setSelection(G.create(e.doc,o.pos)).scrollIntoView()),!0)};function I0(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){let n=e.node(t);if(e.index(t)+1<n.childCount)return e.doc.resolve(e.after(t+1));if(n.type.spec.isolating)break}return null}var VT=(e,t)=>{let n=e.selection,i=n instanceof G,r;if(i){if(n.node.isTextblock||!Cn(e.doc,n.from))return!1;r=n.from}else if(r=xo(e.doc,n.from,-1),r==null)return!1;if(t){let o=e.tr.join(r);i&&o.setSelection(G.create(o.doc,r-e.doc.resolve(r).nodeBefore.nodeSize)),t(o.scrollIntoView())}return!0},KT=(e,t)=>{let n=e.selection,i;if(n instanceof G){if(n.node.isTextblock||!Cn(e.doc,n.to))return!1;i=n.to}else if(i=xo(e.doc,n.to,1),i==null)return!1;return t&&t(e.tr.join(i).scrollIntoView()),!0},JT=(e,t)=>{let{$from:n,$to:i}=e.selection,r=n.blockRange(i),o=r&&sr(r);return o==null?!1:(t&&t(e.tr.lift(r,o).scrollIntoView()),!0)},A0=(e,t)=>{let{$head:n,$anchor:i}=e.selection;return!n.parent.type.spec.code||!n.sameParent(i)?!1:(t&&t(e.tr.insertText(`
97
+ `).scrollIntoView()),!0)};function M0(e){for(let t=0;t<e.edgeCount;t++){let{type:n}=e.edge(t);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}var z0=(e,t)=>{let{$head:n,$anchor:i}=e.selection;if(!n.parent.type.spec.code||!n.sameParent(i))return!1;let r=n.node(-1),o=n.indexAfter(-1),s=M0(r.contentMatchAt(o));if(!s||!r.canReplaceWith(o,o,s))return!1;if(t){let a=n.after(),l=e.tr.replaceWith(a,a,s.createAndFill());l.setSelection(X.near(l.doc.resolve(a),1)),t(l.scrollIntoView())}return!0},D0=(e,t)=>{let n=e.selection,{$from:i,$to:r}=n;if(n instanceof jt||i.parent.inlineContent||r.parent.inlineContent)return!1;let o=M0(r.parent.contentMatchAt(r.indexAfter()));if(!o||!o.isTextblock)return!1;if(t){let s=(!i.parentOffset&&r.index()<r.parent.childCount?i:r).pos,a=e.tr.insert(s,o.createAndFill());a.setSelection(q.create(a.doc,s+1)),t(a.scrollIntoView())}return!0},N0=(e,t)=>{let{$cursor:n}=e.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let o=n.before();if(pn(e.doc,o))return t&&t(e.tr.split(o).scrollIntoView()),!0}let i=n.blockRange(),r=i&&sr(i);return r==null?!1:(t&&t(e.tr.lift(i,r).scrollIntoView()),!0)};function dF(e){return(t,n)=>{let{$from:i,$to:r}=t.selection;if(t.selection instanceof G&&t.selection.node.isBlock)return!i.parentOffset||!pn(t.doc,i.pos)?!1:(n&&n(t.tr.split(i.pos).scrollIntoView()),!0);if(!i.depth)return!1;let o=[],s,a,l=!1,u=!1;for(let p=i.depth;;p--)if(i.node(p).isBlock){l=i.end(p)==i.pos+(i.depth-p),u=i.start(p)==i.pos-(i.depth-p),a=M0(i.node(p-1).contentMatchAt(i.indexAfter(p-1)));let m=e&&e(r.parent,l,i);o.unshift(m||(l&&a?{type:a}:null)),s=p;break}else{if(p==1)return!1;o.unshift(null)}let c=t.tr;(t.selection instanceof q||t.selection instanceof jt)&&c.deleteSelection();let d=c.mapping.map(i.pos),f=pn(c.doc,d,o.length,o);if(f||(o[0]=a?{type:a}:null,f=pn(c.doc,d,o.length,o)),!f)return!1;if(c.split(d,o.length,o),!l&&u&&i.node(s).type!=a){let p=c.mapping.map(i.before(s)),h=c.doc.resolve(p);a&&i.node(s-1).canReplaceWith(h.index(),h.index()+1,a)&&c.setNodeMarkup(c.mapping.map(i.before(s)),a)}return n&&n(c.scrollIntoView()),!0}}var fF=dF();var GT=(e,t)=>{let{$from:n,to:i}=e.selection,r,o=n.sharedDepth(i);return o==0?!1:(r=n.before(o),t&&t(e.tr.setSelection(G.create(e.doc,r))),!0)},pF=(e,t)=>(t&&t(e.tr.setSelection(new jt(e.doc))),!0);function hF(e,t,n){let i=t.nodeBefore,r=t.nodeAfter,o=t.index();return!i||!r||!i.type.compatibleContent(r.type)?!1:!i.content.size&&t.parent.canReplace(o-1,o)?(n&&n(e.tr.delete(t.pos-i.nodeSize,t.pos).scrollIntoView()),!0):!t.parent.canReplace(o,o+1)||!(r.isTextblock||Cn(e.doc,t.pos))?!1:(n&&n(e.tr.join(t.pos).scrollIntoView()),!0)}function XT(e,t,n,i){let r=t.nodeBefore,o=t.nodeAfter,s,a,l=r.type.spec.isolating||o.type.spec.isolating;if(!l&&hF(e,t,n))return!0;let u=!l&&t.parent.canReplace(t.index(),t.index()+1);if(u&&(s=(a=r.contentMatchAt(r.childCount)).findWrapping(o.type))&&a.matchType(s[0]||o.type).validEnd){if(n){let p=t.pos+o.nodeSize,h=z.empty;for(let b=s.length-1;b>=0;b--)h=z.from(s[b].create(null,h));h=z.from(r.copy(h));let m=e.tr.step(new at(t.pos-1,p,t.pos,p,new B(h,1,0),s.length,!0)),g=m.doc.resolve(p+2*s.length);g.nodeAfter&&g.nodeAfter.type==r.type&&Cn(m.doc,g.pos)&&m.join(g.pos),n(m.scrollIntoView())}return!0}let c=o.type.spec.isolating||i>0&&l?null:X.findFrom(t,1),d=c&&c.$from.blockRange(c.$to),f=d&&sr(d);if(f!=null&&f>=t.depth)return n&&n(e.tr.lift(d,f).scrollIntoView()),!0;if(u&&So(o,"start",!0)&&So(r,"end")){let p=r,h=[];for(;h.push(p),!p.isTextblock;)p=p.lastChild;let m=o,g=1;for(;!m.isTextblock;m=m.firstChild)g++;if(p.canReplace(p.childCount,p.childCount,m.content)){if(n){let b=z.empty;for(let y=h.length-1;y>=0;y--)b=z.from(h[y].copy(b));let v=e.tr.step(new at(t.pos-h.length,t.pos+o.nodeSize,t.pos+g,t.pos+o.nodeSize-g,new B(b,h.length,0),0,!0));n(v.scrollIntoView())}return!0}}return!1}function YT(e){return function(t,n){let i=t.selection,r=e<0?i.$from:i.$to,o=r.depth;for(;r.node(o).isInline;){if(!o)return!1;o--}return r.node(o).isTextblock?(n&&n(t.tr.setSelection(q.create(t.doc,e<0?r.start(o):r.end(o)))),!0):!1}}var O0=YT(-1),R0=YT(1);function QT(e,t=null){return function(n,i){let{$from:r,$to:o}=n.selection,s=r.blockRange(o),a=s&&ko(s,e,t);return a?(i&&i(n.tr.wrap(s,a).scrollIntoView()),!0):!1}}function P0(e,t=null){return function(n,i){let r=!1;for(let o=0;o<n.selection.ranges.length&&!r;o++){let{$from:{pos:s},$to:{pos:a}}=n.selection.ranges[o];n.doc.nodesBetween(s,a,(l,u)=>{if(r)return!1;if(!(!l.isTextblock||l.hasMarkup(e,t)))if(l.type==e)r=!0;else{let c=n.doc.resolve(u),d=c.index();r=c.parent.canReplaceWith(d,d+1,e)}})}if(!r)return!1;if(i){let o=n.tr;for(let s=0;s<n.selection.ranges.length;s++){let{$from:{pos:a},$to:{pos:l}}=n.selection.ranges[s];o.setBlockType(a,l,e,t)}i(o.scrollIntoView())}return!0}}function L0(...e){return function(t,n,i){for(let r=0;r<e.length;r++)if(e[r](t,n,i))return!0;return!1}}var w0=L0(UT,S0,E0),BT=L0(UT,C0,T0),Or={Enter:L0(A0,D0,N0,fF),"Mod-Enter":z0,Backspace:w0,"Mod-Backspace":w0,"Shift-Backspace":w0,Delete:BT,"Mod-Delete":BT,"Mod-a":pF},mF={"Ctrl-h":Or.Backspace,"Alt-Backspace":Or["Mod-Backspace"],"Ctrl-d":Or.Delete,"Ctrl-Alt-Backspace":Or["Mod-Delete"],"Alt-Delete":Or["Mod-Delete"],"Alt-d":Or["Mod-Delete"],"Ctrl-a":O0,"Ctrl-e":R0};for(let e in Or)mF[e]=Or[e];var vne=typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os<"u"&&os.platform?os.platform()=="darwin":!1;function eI(e,t=null){return function(n,i){let{$from:r,$to:o}=n.selection,s=r.blockRange(o);if(!s)return!1;let a=i?n.tr:null;return gF(a,s,e,t)?(i&&i(a.scrollIntoView()),!0):!1}}function gF(e,t,n,i=null){let r=!1,o=t,s=t.$from.doc;if(t.depth>=2&&t.$from.node(t.depth-1).type.compatibleContent(n)&&t.startIndex==0){if(t.$from.index(t.depth-1)==0)return!1;let l=s.resolve(t.start-2);o=new fi(l,l,t.depth),t.endIndex<t.parent.childCount&&(t=new fi(t.$from,s.resolve(t.$to.end(t.depth)),t.depth)),r=!0}let a=ko(o,n,i,t);return a?(e&&bF(e,t,a,r,n),!0):!1}function bF(e,t,n,i,r){let o=z.empty;for(let c=n.length-1;c>=0;c--)o=z.from(n[c].type.create(n[c].attrs,o));e.step(new at(t.start-(i?2:0),t.end,t.start,t.end,new B(o,0,0),n.length,!0));let s=0;for(let c=0;c<n.length;c++)n[c].type==r&&(s=c+1);let a=n.length-s,l=t.start+n.length-(i?2:0),u=t.parent;for(let c=t.startIndex,d=t.endIndex,f=!0;c<d;c++,f=!1)!f&&pn(e.doc,l,a)&&(e.split(l,a),l+=2*a),l+=u.child(c).nodeSize;return e}function tI(e){return function(t,n){let{$from:i,$to:r}=t.selection,o=i.blockRange(r,s=>s.childCount>0&&s.firstChild.type==e);return o?n?i.node(o.depth-1).type==e?vF(t,n,e,o):yF(t,n,o):!0:!1}}function vF(e,t,n,i){let r=e.tr,o=i.end,s=i.$to.end(i.depth);o<s&&(r.step(new at(o-1,s,o,s,new B(z.from(n.create(null,i.parent.copy())),1,0),1,!0)),i=new fi(r.doc.resolve(i.$from.pos),r.doc.resolve(s),i.depth));let a=sr(i);if(a==null)return!1;r.lift(i,a);let l=r.doc.resolve(r.mapping.map(o,-1)-1);return Cn(r.doc,l.pos)&&l.nodeBefore.type==l.nodeAfter.type&&r.join(l.pos),t(r.scrollIntoView()),!0}function yF(e,t,n){let i=e.tr,r=n.parent;for(let p=n.end,h=n.endIndex-1,m=n.startIndex;h>m;h--)p-=r.child(h).nodeSize,i.delete(p-1,p+1);let o=i.doc.resolve(n.start),s=o.nodeAfter;if(i.mapping.map(n.end)!=n.start+o.nodeAfter.nodeSize)return!1;let a=n.startIndex==0,l=n.endIndex==r.childCount,u=o.node(-1),c=o.index(-1);if(!u.canReplace(c+(a?0:1),c+1,s.content.append(l?z.empty:z.from(r))))return!1;let d=o.pos,f=d+s.nodeSize;return i.step(new at(d-(a?1:0),f+(l?1:0),d+1,f-1,new B((a?z.empty:z.from(r.copy(z.empty))).append(l?z.empty:z.from(r.copy(z.empty))),a?0:1,l?0:1),a?0:1)),t(i.scrollIntoView()),!0}function nI(e){return function(t,n){let{$from:i,$to:r}=t.selection,o=i.blockRange(r,u=>u.childCount>0&&u.firstChild.type==e);if(!o)return!1;let s=o.startIndex;if(s==0)return!1;let a=o.parent,l=a.child(s-1);if(l.type!=e)return!1;if(n){let u=l.lastChild&&l.lastChild.type==a.type,c=z.from(u?e.create():null),d=new B(z.from(e.create(null,z.from(a.type.create(null,c)))),u?3:1,0),f=o.start,p=o.end;n(t.tr.step(new at(f-(u?3:1),p,f,p,d,1,!0)).scrollIntoView())}return!0}}var $t=function(e){for(var t=0;;t++)if(e=e.previousSibling,!e)return t},To=function(e){let t=e.assignedSlot||e.parentNode;return t&&t.nodeType==11?t.host:t},Z0=null,lr=function(e,t,n){let i=Z0||(Z0=document.createRange());return i.setEnd(e,n??e.nodeValue.length),i.setStart(e,t||0),i},kF=function(){Z0=null},wi=function(e,t,n,i){return n&&(rI(e,t,n,i,-1)||rI(e,t,n,i,1))},xF=/^(img|br|input|textarea|hr)$/i;function rI(e,t,n,i,r){for(var o;;){if(e==n&&t==i)return!0;if(t==(r<0?0:mn(e))){let s=e.parentNode;if(!s||s.nodeType!=1||za(e)||xF.test(e.nodeName)||e.contentEditable=="false")return!1;t=$t(e)+(r<0?0:1),e=s}else if(e.nodeType==1){let s=e.childNodes[t+(r<0?-1:0)];if(s.nodeType==1&&s.contentEditable=="false")if(!((o=s.pmViewDesc)===null||o===void 0)&&o.ignoreForSelection)t+=r;else return!1;else e=s,t=r<0?mn(e):0}else return!1}}function mn(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function _F(e,t){for(;;){if(e.nodeType==3&&t)return e;if(e.nodeType==1&&t>0){if(e.contentEditable=="false")return null;e=e.childNodes[t-1],t=mn(e)}else if(e.parentNode&&!za(e))t=$t(e),e=e.parentNode;else return null}}function wF(e,t){for(;;){if(e.nodeType==3&&t<e.nodeValue.length)return e;if(e.nodeType==1&&t<e.childNodes.length){if(e.contentEditable=="false")return null;e=e.childNodes[t],t=0}else if(e.parentNode&&!za(e))t=$t(e)+1,e=e.parentNode;else return null}}function SF(e,t,n){for(let i=t==0,r=t==mn(e);i||r;){if(e==n)return!0;let o=$t(e);if(e=e.parentNode,!e)return!1;i=i&&o==0,r=r&&o==mn(e)}}function za(e){let t;for(let n=e;n&&!(t=n.pmViewDesc);n=n.parentNode);return t&&t.node&&t.node.isBlock&&(t.dom==e||t.contentDOM==e)}var jc=function(e){return e.focusNode&&wi(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)};function gi(e,t){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=e,n.key=n.code=t,n}function EF(e){let t=e.activeElement;for(;t&&t.shadowRoot;)t=t.shadowRoot.activeElement;return t}function $F(e,t,n){if(e.caretPositionFromPoint)try{let i=e.caretPositionFromPoint(t,n);if(i)return{node:i.offsetNode,offset:Math.min(mn(i.offsetNode),i.offset)}}catch{}if(e.caretRangeFromPoint){let i=e.caretRangeFromPoint(t,n);if(i)return{node:i.startContainer,offset:Math.min(mn(i.startContainer),i.startOffset)}}}var Fn=typeof navigator<"u"?navigator:null,iI=typeof document<"u"?document:null,Br=Fn&&Fn.userAgent||"",H0=/Edge\/(\d+)/.exec(Br),DI=/MSIE \d/.exec(Br),q0=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Br),Jt=!!(DI||q0||H0),Lr=DI?document.documentMode:q0?+q0[1]:H0?+H0[1]:0,gn=!Jt&&/gecko\/(\d+)/i.test(Br);gn&&+(/Firefox\/(\d+)/.exec(Br)||[0,0])[1];var W0=!Jt&&/Chrome\/(\d+)/.exec(Br),Ct=!!W0,NI=W0?+W0[1]:0,Rt=!Jt&&!!Fn&&/Apple Computer/.test(Fn.vendor),Io=Rt&&(/Mobile\/\w+/.test(Br)||!!Fn&&Fn.maxTouchPoints>2),hn=Io||(Fn?/Mac/.test(Fn.platform):!1),OI=Fn?/Win/.test(Fn.platform):!1,ur=/Android \d/.test(Br),Da=!!iI&&"webkitFontSmoothing"in iI.documentElement.style,CF=Da?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function TF(e){let t=e.defaultView&&e.defaultView.visualViewport;return t?{left:0,right:t.width,top:0,bottom:t.height}:{left:0,right:e.documentElement.clientWidth,top:0,bottom:e.documentElement.clientHeight}}function ar(e,t){return typeof e=="number"?e:e[t]}function IF(e){let t=e.getBoundingClientRect(),n=t.width/e.offsetWidth||1,i=t.height/e.offsetHeight||1;return{left:t.left,right:t.left+e.clientWidth*n,top:t.top,bottom:t.top+e.clientHeight*i}}function oI(e,t,n){if(!V0(t)&&t.left==0)return;let i=e.someProp("scrollThreshold")||0,r=e.someProp("scrollMargin")||5,o=e.dom.ownerDocument;for(let s=n||e.dom;s;){if(s.nodeType!=1){s=To(s);continue}let a=s,l=a==o.body,u=l?TF(o):IF(a),c=0,d=0;if(t.top<u.top+ar(i,"top")?d=-(u.top-t.top+ar(r,"top")):t.bottom>u.bottom-ar(i,"bottom")&&(d=t.bottom-t.top>u.bottom-u.top?t.top+ar(r,"top")-u.top:t.bottom-u.bottom+ar(r,"bottom")),t.left<u.left+ar(i,"left")?c=-(u.left-t.left+ar(r,"left")):t.right>u.right-ar(i,"right")&&(c=t.right-u.right+ar(r,"right")),c||d)if(l)o.defaultView.scrollBy(c,d);else{let p=a.scrollLeft,h=a.scrollTop;d&&(a.scrollTop+=d),c&&(a.scrollLeft+=c);let m=a.scrollLeft-p,g=a.scrollTop-h;t={left:t.left-m,top:t.top-g,right:t.right-m,bottom:t.bottom-g}}let f=l?"fixed":getComputedStyle(s).position;if(/^(fixed|sticky)$/.test(f))break;s=f=="absolute"?s.offsetParent:To(s)}}function AF(e){let t=e.dom.getBoundingClientRect(),n=Math.max(0,t.top),i,r;for(let o=(t.left+t.right)/2,s=n+1;s<Math.min(innerHeight,t.bottom);s+=5){let a=e.root.elementFromPoint(o,s);if(!a||a==e.dom||!e.dom.contains(a))continue;let l=a.getBoundingClientRect();if(l.top>=n-20){i=a,r=l.top;break}}return{refDOM:i,refTop:r,stack:RI(e.dom)}}function RI(e){let t=[],n=e.ownerDocument;for(let i=e;i&&(t.push({dom:i,top:i.scrollTop,left:i.scrollLeft}),e!=n);i=To(i));return t}function MF({refDOM:e,refTop:t,stack:n}){let i=e?e.getBoundingClientRect().top:0;PI(n,i==0?0:i-t)}function PI(e,t){for(let n=0;n<e.length;n++){let{dom:i,top:r,left:o}=e[n];i.scrollTop!=r+t&&(i.scrollTop=r+t),i.scrollLeft!=o&&(i.scrollLeft=o)}}var Eo=null;function zF(e){if(e.setActive)return e.setActive();if(Eo)return e.focus(Eo);let t=RI(e);e.focus(Eo==null?{get preventScroll(){return Eo={preventScroll:!0},!0}}:void 0),Eo||(Eo=!1,PI(t,0))}function LI(e,t){let n,i=2e8,r,o=0,s=t.top,a=t.top,l,u;for(let c=e.firstChild,d=0;c;c=c.nextSibling,d++){let f;if(c.nodeType==1)f=c.getClientRects();else if(c.nodeType==3)f=lr(c).getClientRects();else continue;for(let p=0;p<f.length;p++){let h=f[p];if(h.top<=s&&h.bottom>=a){s=Math.max(h.bottom,s),a=Math.min(h.top,a);let m=h.left>t.left?h.left-t.left:h.right<t.left?t.left-h.right:0;if(m<i){n=c,i=m,r=m&&n.nodeType==3?{left:h.right<t.left?h.right:h.left,top:t.top}:t,c.nodeType==1&&m&&(o=d+(t.left>=(h.left+h.right)/2?1:0));continue}}else h.top>t.top&&!l&&h.left<=t.left&&h.right>=t.left&&(l=c,u={left:Math.max(h.left,Math.min(h.right,t.left)),top:h.top});!n&&(t.left>=h.right&&t.top>=h.top||t.left>=h.left&&t.top>=h.bottom)&&(o=d+1)}}return!n&&l&&(n=l,r=u,i=0),n&&n.nodeType==3?DF(n,r):!n||i&&n.nodeType==1?{node:e,offset:o}:LI(n,r)}function DF(e,t){let n=e.nodeValue.length,i=document.createRange(),r;for(let o=0;o<n;o++){i.setEnd(e,o+1),i.setStart(e,o);let s=Rr(i,1);if(s.top!=s.bottom&&ug(t,s)){r={node:e,offset:o+(t.left>=(s.left+s.right)/2?1:0)};break}}return i.detach(),r||{node:e,offset:0}}function ug(e,t){return e.left>=t.left-1&&e.left<=t.right+1&&e.top>=t.top-1&&e.top<=t.bottom+1}function NF(e,t){let n=e.parentNode;return n&&/^li$/i.test(n.nodeName)&&t.left<e.getBoundingClientRect().left?n:e}function OF(e,t,n){let{node:i,offset:r}=LI(t,n),o=-1;if(i.nodeType==1&&!i.firstChild){let s=i.getBoundingClientRect();o=s.left!=s.right&&n.left>(s.left+s.right)/2?1:-1}return e.docView.posFromDOM(i,r,o)}function RF(e,t,n,i){let r=-1;for(let o=t,s=!1;o!=e.dom;){let a=e.docView.nearestDesc(o,!0),l;if(!a)return null;if(a.dom.nodeType==1&&(a.node.isBlock&&a.parent||!a.contentDOM)&&((l=a.dom.getBoundingClientRect()).width||l.height)&&(a.node.isBlock&&a.parent&&!/^T(R|BODY|HEAD|FOOT)$/.test(a.dom.nodeName)&&(!s&&l.left>i.left||l.top>i.top?r=a.posBefore:(!s&&l.right<i.left||l.bottom<i.top)&&(r=a.posAfter),s=!0),!a.contentDOM&&r<0&&!a.node.isText))return(a.node.isBlock?i.top<(l.top+l.bottom)/2:i.left<(l.left+l.right)/2)?a.posBefore:a.posAfter;o=a.dom.parentNode}return r>-1?r:e.docView.posFromDOM(t,n,-1)}function FI(e,t,n){let i=e.childNodes.length;if(i&&n.top<n.bottom)for(let r=Math.max(0,Math.min(i-1,Math.floor(i*(t.top-n.top)/(n.bottom-n.top))-2)),o=r;;){let s=e.childNodes[o];if(s.nodeType==1){let a=s.getClientRects();for(let l=0;l<a.length;l++){let u=a[l];if(ug(t,u))return FI(s,t,u)}}if((o=(o+1)%i)==r)break}return e}function PF(e,t){let n=e.dom.ownerDocument,i,r=0,o=$F(n,t.left,t.top);o&&({node:i,offset:r}=o);let s=(e.root.elementFromPoint?e.root:n).elementFromPoint(t.left,t.top),a;if(!s||!e.dom.contains(s.nodeType!=1?s.parentNode:s)){let u=e.dom.getBoundingClientRect();if(!ug(t,u)||(s=FI(e.dom,t,u),!s))return null}if(Rt)for(let u=s;i&&u;u=To(u))u.draggable&&(i=void 0);if(s=NF(s,t),i){if(gn&&i.nodeType==1&&(r=Math.min(r,i.childNodes.length),r<i.childNodes.length)){let c=i.childNodes[r],d;c.nodeName=="IMG"&&(d=c.getBoundingClientRect()).right<=t.left&&d.bottom>t.top&&r++}let u;Da&&r&&i.nodeType==1&&(u=i.childNodes[r-1]).nodeType==1&&u.contentEditable=="false"&&u.getBoundingClientRect().top>=t.top&&r--,i==e.dom&&r==i.childNodes.length-1&&i.lastChild.nodeType==1&&t.top>i.lastChild.getBoundingClientRect().bottom?a=e.state.doc.content.size:(r==0||i.nodeType!=1||i.childNodes[r-1].nodeName!="BR")&&(a=RF(e,i,r,t))}a==null&&(a=OF(e,s,t));let l=e.docView.nearestDesc(s,!0);return{pos:a,inside:l?l.posAtStart-l.border:-1}}function V0(e){return e.top<e.bottom||e.left<e.right}function Rr(e,t){let n=e.getClientRects();if(n.length){let i=n[t<0?0:n.length-1];if(V0(i))return i}return Array.prototype.find.call(n,V0)||e.getBoundingClientRect()}var LF=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function BI(e,t,n){let{node:i,offset:r,atom:o}=e.docView.domFromPos(t,n<0?-1:1),s=Da||gn;if(i.nodeType==3)if(s&&(LF.test(i.nodeValue)||(n<0?!r:r==i.nodeValue.length))){let l=Rr(lr(i,r,r),n);if(gn&&r&&/\s/.test(i.nodeValue[r-1])&&r<i.nodeValue.length){let u=Rr(lr(i,r-1,r-1),-1);if(u.top==l.top){let c=Rr(lr(i,r,r+1),-1);if(c.top!=l.top)return Sa(c,c.left<u.left)}}return l}else{let l=r,u=r,c=n<0?1:-1;return n<0&&!r?(u++,c=-1):n>=0&&r==i.nodeValue.length?(l--,c=1):n<0?l--:u++,Sa(Rr(lr(i,l,u),c),c<0)}if(!e.state.doc.resolve(t-(o||0)).parent.inlineContent){if(o==null&&r&&(n<0||r==mn(i))){let l=i.childNodes[r-1];if(l.nodeType==1)return F0(l.getBoundingClientRect(),!1)}if(o==null&&r<mn(i)){let l=i.childNodes[r];if(l.nodeType==1)return F0(l.getBoundingClientRect(),!0)}return F0(i.getBoundingClientRect(),n>=0)}if(o==null&&r&&(n<0||r==mn(i))){let l=i.childNodes[r-1],u=l.nodeType==3?lr(l,mn(l)-(s?0:1)):l.nodeType==1&&(l.nodeName!="BR"||!l.nextSibling)?l:null;if(u)return Sa(Rr(u,1),!1)}if(o==null&&r<mn(i)){let l=i.childNodes[r];for(;l.pmViewDesc&&l.pmViewDesc.ignoreForCoords;)l=l.nextSibling;let u=l?l.nodeType==3?lr(l,0,s?0:1):l.nodeType==1?l:null:null;if(u)return Sa(Rr(u,-1),!0)}return Sa(Rr(i.nodeType==3?lr(i):i,-n),n>=0)}function Sa(e,t){if(e.width==0)return e;let n=t?e.left:e.right;return{top:e.top,bottom:e.bottom,left:n,right:n}}function F0(e,t){if(e.height==0)return e;let n=t?e.top:e.bottom;return{top:n,bottom:n,left:e.left,right:e.right}}function UI(e,t,n){let i=e.state,r=e.root.activeElement;i!=t&&e.updateState(t),r!=e.dom&&e.focus();try{return n()}finally{i!=t&&e.updateState(i),r!=e.dom&&r&&r.focus()}}function FF(e,t,n){let i=t.selection,r=n=="up"?i.$from:i.$to;return UI(e,t,()=>{let{node:o}=e.docView.domFromPos(r.pos,n=="up"?-1:1);for(;;){let a=e.docView.nearestDesc(o,!0);if(!a)break;if(a.node.isBlock){o=a.contentDOM||a.dom;break}o=a.dom.parentNode}let s=BI(e,r.pos,1);for(let a=o.firstChild;a;a=a.nextSibling){let l;if(a.nodeType==1)l=a.getClientRects();else if(a.nodeType==3)l=lr(a,0,a.nodeValue.length).getClientRects();else continue;for(let u=0;u<l.length;u++){let c=l[u];if(c.bottom>c.top+1&&(n=="up"?s.top-c.top>(c.bottom-s.top)*2:c.bottom-s.bottom>(s.bottom-c.top)*2))return!1}}return!0})}var BF=/[\u0590-\u08ac]/;function UF(e,t,n){let{$head:i}=t.selection;if(!i.parent.isTextblock)return!1;let r=i.parentOffset,o=!r,s=r==i.parent.content.size,a=e.domSelection();return a?!BF.test(i.parent.textContent)||!a.modify?n=="left"||n=="backward"?o:s:UI(e,t,()=>{let{focusNode:l,focusOffset:u,anchorNode:c,anchorOffset:d}=e.domSelectionRange(),f=a.caretBidiLevel;a.modify("move",n,"character");let p=i.depth?e.docView.domAfterPos(i.before()):e.dom,{focusNode:h,focusOffset:m}=e.domSelectionRange(),g=h&&!p.contains(h.nodeType==1?h:h.parentNode)||l==h&&u==m;try{a.collapse(c,d),l&&(l!=c||u!=d)&&a.extend&&a.extend(l,u)}catch{}return f!=null&&(a.caretBidiLevel=f),g}):i.pos==i.start()||i.pos==i.end()}var sI=null,aI=null,lI=!1;function jF(e,t,n){return sI==t&&aI==n?lI:(sI=t,aI=n,lI=n=="up"||n=="down"?FF(e,t,n):UF(e,t,n))}var bn=0,uI=1,bi=2,Tn=3,Si=class{constructor(t,n,i,r){this.parent=t,this.children=n,this.dom=i,this.contentDOM=r,this.dirty=bn,i.pmViewDesc=this}matchesWidget(t){return!1}matchesMark(t){return!1}matchesNode(t,n,i){return!1}matchesHack(t){return!1}parseRule(t){return null}stopEvent(t){return!1}get size(){let t=0;for(let n=0;n<this.children.length;n++)t+=this.children[n].size;return t}get border(){return 0}destroy(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(let t=0;t<this.children.length;t++)this.children[t].destroy()}posBeforeChild(t){for(let n=0,i=this.posAtStart;;n++){let r=this.children[n];if(r==t)return i;i+=r.size}}get posBefore(){return this.parent.posBeforeChild(this)}get posAtStart(){return this.parent?this.parent.posBeforeChild(this)+this.border:0}get posAfter(){return this.posBefore+this.size}get posAtEnd(){return this.posAtStart+this.size-2*this.border}localPosFromDOM(t,n,i){if(this.contentDOM&&this.contentDOM.contains(t.nodeType==1?t:t.parentNode))if(i<0){let o,s;if(t==this.contentDOM)o=t.childNodes[n-1];else{for(;t.parentNode!=this.contentDOM;)t=t.parentNode;o=t.previousSibling}for(;o&&!((s=o.pmViewDesc)&&s.parent==this);)o=o.previousSibling;return o?this.posBeforeChild(s)+s.size:this.posAtStart}else{let o,s;if(t==this.contentDOM)o=t.childNodes[n];else{for(;t.parentNode!=this.contentDOM;)t=t.parentNode;o=t.nextSibling}for(;o&&!((s=o.pmViewDesc)&&s.parent==this);)o=o.nextSibling;return o?this.posBeforeChild(s):this.posAtEnd}let r;if(t==this.dom&&this.contentDOM)r=n>$t(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))r=t.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(n==0)for(let o=t;;o=o.parentNode){if(o==this.dom){r=!1;break}if(o.previousSibling)break}if(r==null&&n==t.childNodes.length)for(let o=t;;o=o.parentNode){if(o==this.dom){r=!0;break}if(o.nextSibling)break}}return r??i>0?this.posAtEnd:this.posAtStart}nearestDesc(t,n=!1){for(let i=!0,r=t;r;r=r.parentNode){let o=this.getDesc(r),s;if(o&&(!n||o.node))if(i&&(s=o.nodeDOM)&&!(s.nodeType==1?s.contains(t.nodeType==1?t:t.parentNode):s==t))i=!1;else return o}}getDesc(t){let n=t.pmViewDesc;for(let i=n;i;i=i.parent)if(i==this)return n}posFromDOM(t,n,i){for(let r=t;r;r=r.parentNode){let o=this.getDesc(r);if(o)return o.localPosFromDOM(t,n,i)}return-1}descAt(t){for(let n=0,i=0;n<this.children.length;n++){let r=this.children[n],o=i+r.size;if(i==t&&o!=i){for(;!r.border&&r.children.length;)for(let s=0;s<r.children.length;s++){let a=r.children[s];if(a.size){r=a;break}}return r}if(t<o)return r.descAt(t-i-r.border);i=o}}domFromPos(t,n){if(!this.contentDOM)return{node:this.dom,offset:0,atom:t+1};let i=0,r=0;for(let o=0;i<this.children.length;i++){let s=this.children[i],a=o+s.size;if(a>t||s instanceof Dc){r=t-o;break}o=a}if(r)return this.children[i].domFromPos(r-this.children[i].border,n);for(let o;i&&!(o=this.children[i-1]).size&&o instanceof Mc&&o.side>=0;i--);if(n<=0){let o,s=!0;for(;o=i?this.children[i-1]:null,!(!o||o.dom.parentNode==this.contentDOM);i--,s=!1);return o&&n&&s&&!o.border&&!o.domAtom?o.domFromPos(o.size,n):{node:this.contentDOM,offset:o?$t(o.dom)+1:0}}else{let o,s=!0;for(;o=i<this.children.length?this.children[i]:null,!(!o||o.dom.parentNode==this.contentDOM);i++,s=!1);return o&&s&&!o.border&&!o.domAtom?o.domFromPos(0,n):{node:this.contentDOM,offset:o?$t(o.dom):this.contentDOM.childNodes.length}}}parseRange(t,n,i=0){if(this.children.length==0)return{node:this.contentDOM,from:t,to:n,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let r=-1,o=-1;for(let s=i,a=0;;a++){let l=this.children[a],u=s+l.size;if(r==-1&&t<=u){let c=s+l.border;if(t>=c&&n<=u-l.border&&l.node&&l.contentDOM&&this.contentDOM.contains(l.contentDOM))return l.parseRange(t,n,c);t=s;for(let d=a;d>0;d--){let f=this.children[d-1];if(f.size&&f.dom.parentNode==this.contentDOM&&!f.emptyChildAt(1)){r=$t(f.dom)+1;break}t-=f.size}r==-1&&(r=0)}if(r>-1&&(u>n||a==this.children.length-1)){n=u;for(let c=a+1;c<this.children.length;c++){let d=this.children[c];if(d.size&&d.dom.parentNode==this.contentDOM&&!d.emptyChildAt(-1)){o=$t(d.dom);break}n+=d.size}o==-1&&(o=this.contentDOM.childNodes.length);break}s=u}return{node:this.contentDOM,from:t,to:n,fromOffset:r,toOffset:o}}emptyChildAt(t){if(this.border||!this.contentDOM||!this.children.length)return!1;let n=this.children[t<0?0:this.children.length-1];return n.size==0||n.emptyChildAt(t)}domAfterPos(t){let{node:n,offset:i}=this.domFromPos(t,0);if(n.nodeType!=1||i==n.childNodes.length)throw new RangeError("No node after pos "+t);return n.childNodes[i]}setSelection(t,n,i,r=!1){let o=Math.min(t,n),s=Math.max(t,n);for(let p=0,h=0;p<this.children.length;p++){let m=this.children[p],g=h+m.size;if(o>h&&s<g)return m.setSelection(t-h-m.border,n-h-m.border,i,r);h=g}let a=this.domFromPos(t,t?-1:1),l=n==t?a:this.domFromPos(n,n?-1:1),u=i.root.getSelection(),c=i.domSelectionRange(),d=!1;if((gn||Rt)&&t==n){let{node:p,offset:h}=a;if(p.nodeType==3){if(d=!!(h&&p.nodeValue[h-1]==`
98
+ `),d&&h==p.nodeValue.length)for(let m=p,g;m;m=m.parentNode){if(g=m.nextSibling){g.nodeName=="BR"&&(a=l={node:g.parentNode,offset:$t(g)+1});break}let b=m.pmViewDesc;if(b&&b.node&&b.node.isBlock)break}}else{let m=p.childNodes[h-1];d=m&&(m.nodeName=="BR"||m.contentEditable=="false")}}if(gn&&c.focusNode&&c.focusNode!=l.node&&c.focusNode.nodeType==1){let p=c.focusNode.childNodes[c.focusOffset];p&&p.contentEditable=="false"&&(r=!0)}if(!(r||d&&Rt)&&wi(a.node,a.offset,c.anchorNode,c.anchorOffset)&&wi(l.node,l.offset,c.focusNode,c.focusOffset))return;let f=!1;if((u.extend||t==n)&&!(d&&gn)){u.collapse(a.node,a.offset);try{t!=n&&u.extend(l.node,l.offset),f=!0}catch{}}if(!f){if(t>n){let h=a;a=l,l=h}let p=document.createRange();p.setEnd(l.node,l.offset),p.setStart(a.node,a.offset),u.removeAllRanges(),u.addRange(p)}}ignoreMutation(t){return!this.contentDOM&&t.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(t,n){for(let i=0,r=0;r<this.children.length;r++){let o=this.children[r],s=i+o.size;if(i==s?t<=s&&n>=i:t<s&&n>i){let a=i+o.border,l=s-o.border;if(t>=a&&n<=l){this.dirty=t==i||n==s?bi:uI,t==a&&n==l&&(o.contentLost||o.dom.parentNode!=this.contentDOM)?o.dirty=Tn:o.markDirty(t-a,n-a);return}else o.dirty=o.dom==o.contentDOM&&o.dom.parentNode==this.contentDOM&&!o.children.length?bi:Tn}i=s}this.dirty=bi}markParentsDirty(){let t=1;for(let n=this.parent;n;n=n.parent,t++){let i=t==1?bi:uI;n.dirty<i&&(n.dirty=i)}}get domAtom(){return!1}get ignoreForCoords(){return!1}get ignoreForSelection(){return!1}isText(t){return!1}},Mc=class extends Si{constructor(t,n,i,r){let o,s=n.type.toDOM;if(typeof s=="function"&&(s=s(i,()=>{if(!o)return r;if(o.parent)return o.parent.posBeforeChild(o)})),!n.type.spec.raw){if(s.nodeType!=1){let a=document.createElement("span");a.appendChild(s),s=a}s.hasAttribute("contenteditable")||(s.contentEditable="false"),s.classList.add("ProseMirror-widget")}super(t,[],s,null),this.widget=n,this.widget=n,o=this}matchesWidget(t){return this.dirty==bn&&t.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(t){let n=this.widget.spec.stopEvent;return n?n(t):!1}ignoreMutation(t){return t.type!="selection"||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get ignoreForSelection(){return!!this.widget.type.spec.relaxedSide}get side(){return this.widget.type.side}},K0=class extends Si{constructor(t,n,i,r){super(t,[],n,null),this.textDOM=i,this.text=r}get size(){return this.text.length}localPosFromDOM(t,n){return t!=this.textDOM?this.posAtStart+(n?this.size:0):this.posAtStart+n}domFromPos(t){return{node:this.textDOM,offset:t}}ignoreMutation(t){return t.type==="characterData"&&t.target.nodeValue==t.oldValue}},yi=class e extends Si{constructor(t,n,i,r,o){super(t,[],i,r),this.mark=n,this.spec=o}static create(t,n,i,r){let o=r.nodeViews[n.type.name],s=o&&o(n,r,i);return(!s||!s.dom)&&(s=rr.renderSpec(document,n.type.spec.toDOM(n,i),null,n.attrs)),new e(t,n,s.dom,s.contentDOM||s.dom,s)}parseRule(){return this.dirty&Tn||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(t){return this.dirty!=Tn&&this.mark.eq(t)}markDirty(t,n){if(super.markDirty(t,n),this.dirty!=bn){let i=this.parent;for(;!i.node;)i=i.parent;i.dirty<this.dirty&&(i.dirty=this.dirty),this.dirty=bn}}slice(t,n,i){let r=e.create(this.parent,this.mark,!0,i),o=this.children,s=this.size;n<s&&(o=Y0(o,n,s,i)),t>0&&(o=Y0(o,0,t,i));for(let a=0;a<o.length;a++)o[a].parent=r;return r.children=o,r}ignoreMutation(t){return this.spec.ignoreMutation?this.spec.ignoreMutation(t):super.ignoreMutation(t)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}},Fr=class e extends Si{constructor(t,n,i,r,o,s,a){super(t,[],o,s),this.node=n,this.outerDeco=i,this.innerDeco=r,this.nodeDOM=a}static create(t,n,i,r,o,s){let a=o.nodeViews[n.type.name],l,u=a&&a(n,o,()=>{if(!l)return s;if(l.parent)return l.parent.posBeforeChild(l)},i,r),c=u&&u.dom,d=u&&u.contentDOM;if(n.isText){if(!c)c=document.createTextNode(n.text);else if(c.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else c||({dom:c,contentDOM:d}=rr.renderSpec(document,n.type.spec.toDOM(n),null,n.attrs));!d&&!n.isText&&c.nodeName!="BR"&&(c.hasAttribute("contenteditable")||(c.contentEditable="false"),n.type.spec.draggable&&(c.draggable=!0));let f=c;return c=HI(c,i,n),u?l=new J0(t,n,i,r,c,d||null,f,u):n.isText?new zc(t,n,i,r,c,f):new e(t,n,i,r,c,d||null,f)}parseRule(t){if(this.node.type.spec.reparseInView)return null;let n={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(n.preserveWhitespace="full"),!this.contentDOM)n.getContent=()=>this.node.content;else if(!this.contentLost)n.contentElement=this.contentDOM;else{for(let i=this.children.length-1;i>=0;i--){let r=this.children[i];if(this.dom.contains(r.dom.parentNode)){n.contentElement=r.dom.parentNode;break}}if(!n.contentElement){let i=t&&t.find(r=>r.nodeType==1&&t.indexOf(r.parentNode)<0&&this.dom.contains(r));i?n.contentElement=i:n.getContent=()=>z.empty}}return n}matchesNode(t,n,i){return this.dirty==bn&&t.eq(this.node)&&Nc(n,this.outerDeco)&&i.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(t,n){let i=this.node.inlineContent,r=n,o=t.composing?this.localCompositionInfo(t,n):null,s=o&&o.pos>-1?o:null,a=o&&o.pos<0,l=new X0(this,s&&s.node,t);WF(this.node,this.innerDeco,(u,c,d)=>{u.spec.marks?l.syncToMarks(u.spec.marks,i,t,c):u.type.side>=0&&!d&&l.syncToMarks(c==this.node.childCount?ye.none:this.node.child(c).marks,i,t,c),l.placeWidget(u,t,r)},(u,c,d,f)=>{l.syncToMarks(u.marks,i,t,f);let p;l.findNodeMatch(u,c,d,f)||a&&t.state.selection.from>r&&t.state.selection.to<r+u.nodeSize&&(p=l.findIndexWithChild(o.node))>-1&&l.updateNodeAt(u,c,d,p,t)||l.updateNextNode(u,c,d,t,f,r)||l.addNode(u,c,d,t,r),r+=u.nodeSize}),l.syncToMarks([],i,t,0),this.node.isTextblock&&l.addTextblockHacks(),l.destroyRest(),(l.changed||this.dirty==bi)&&(s&&this.protectLocalComposition(t,s),jI(this.contentDOM,this.children,t),Io&&VF(this.dom))}localCompositionInfo(t,n){let{from:i,to:r}=t.state.selection;if(!(t.state.selection instanceof q)||i<n||r>n+this.node.content.size)return null;let o=t.input.compositionNode;if(!o||!this.dom.contains(o.parentNode))return null;if(this.node.inlineContent){let s=o.nodeValue,a=KF(this.node.content,s,i-n,r-n);return a<0?null:{node:o,pos:a,text:s}}else return{node:o,pos:-1,text:""}}protectLocalComposition(t,{node:n,pos:i,text:r}){if(this.getDesc(n))return;let o=n;for(;o.parentNode!=this.contentDOM;o=o.parentNode){for(;o.previousSibling;)o.parentNode.removeChild(o.previousSibling);for(;o.nextSibling;)o.parentNode.removeChild(o.nextSibling);o.pmViewDesc&&(o.pmViewDesc=void 0)}let s=new K0(this,o,n,r);t.input.compositionNodes.push(s),this.children=Y0(this.children,i,i+r.length,t,s)}update(t,n,i,r){return this.dirty==Tn||!t.sameMarkup(this.node)?!1:(this.updateInner(t,n,i,r),!0)}updateInner(t,n,i,r){this.updateOuterDeco(n),this.node=t,this.innerDeco=i,this.contentDOM&&this.updateChildren(r,this.posAtStart),this.dirty=bn}updateOuterDeco(t){if(Nc(t,this.outerDeco))return;let n=this.nodeDOM.nodeType!=1,i=this.dom;this.dom=ZI(this.dom,this.nodeDOM,G0(this.outerDeco,this.node,n),G0(t,this.node,n)),this.dom!=i&&(i.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=t}selectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.add("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&(this.nodeDOM.draggable=!0))}deselectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.nodeDOM.removeAttribute("draggable"))}get domAtom(){return this.node.isAtom}};function cI(e,t,n,i,r){HI(i,t,e);let o=new Fr(void 0,e,t,n,i,i,i);return o.contentDOM&&o.updateChildren(r,0),o}var zc=class e extends Fr{constructor(t,n,i,r,o,s){super(t,n,i,r,o,null,s)}parseRule(){let t=this.nodeDOM.parentNode;for(;t&&t!=this.dom&&!t.pmIsDeco;)t=t.parentNode;return{skip:t||!0}}update(t,n,i,r){return this.dirty==Tn||this.dirty!=bn&&!this.inParent()||!t.sameMarkup(this.node)?!1:(this.updateOuterDeco(n),(this.dirty!=bn||t.text!=this.node.text)&&t.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=t.text,r.trackWrites==this.nodeDOM&&(r.trackWrites=null)),this.node=t,this.dirty=bn,!0)}inParent(){let t=this.parent.contentDOM;for(let n=this.nodeDOM;n;n=n.parentNode)if(n==t)return!0;return!1}domFromPos(t){return{node:this.nodeDOM,offset:t}}localPosFromDOM(t,n,i){return t==this.nodeDOM?this.posAtStart+Math.min(n,this.node.text.length):super.localPosFromDOM(t,n,i)}ignoreMutation(t){return t.type!="characterData"&&t.type!="selection"}slice(t,n,i){let r=this.node.cut(t,n),o=document.createTextNode(r.text);return new e(this.parent,r,this.outerDeco,this.innerDeco,o,o)}markDirty(t,n){super.markDirty(t,n),this.dom!=this.nodeDOM&&(t==0||n==this.nodeDOM.nodeValue.length)&&(this.dirty=Tn)}get domAtom(){return!1}isText(t){return this.node.text==t}},Dc=class extends Si{parseRule(){return{ignore:!0}}matchesHack(t){return this.dirty==bn&&this.dom.nodeName==t}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}},J0=class extends Fr{constructor(t,n,i,r,o,s,a,l){super(t,n,i,r,o,s,a),this.spec=l}update(t,n,i,r){if(this.dirty==Tn)return!1;if(this.spec.update&&(this.node.type==t.type||this.spec.multiType)){let o=this.spec.update(t,n,i);return o&&this.updateInner(t,n,i,r),o}else return!this.contentDOM&&!t.isLeaf?!1:super.update(t,n,i,r)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(t,n,i,r){this.spec.setSelection?this.spec.setSelection(t,n,i.root):super.setSelection(t,n,i,r)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(t){return this.spec.stopEvent?this.spec.stopEvent(t):!1}ignoreMutation(t){return this.spec.ignoreMutation?this.spec.ignoreMutation(t):super.ignoreMutation(t)}};function jI(e,t,n){let i=e.firstChild,r=!1;for(let o=0;o<t.length;o++){let s=t[o],a=s.dom;if(a.parentNode==e){for(;a!=i;)i=dI(i),r=!0;i=i.nextSibling}else r=!0,e.insertBefore(a,i);if(s instanceof yi){let l=i?i.previousSibling:e.lastChild;jI(s.contentDOM,s.children,n),i=l?l.nextSibling:e.firstChild}}for(;i;)i=dI(i),r=!0;r&&n.trackWrites==e&&(n.trackWrites=null)}var $a=function(e){e&&(this.nodeName=e)};$a.prototype=Object.create(null);var vi=[new $a];function G0(e,t,n){if(e.length==0)return vi;let i=n?vi[0]:new $a,r=[i];for(let o=0;o<e.length;o++){let s=e[o].type.attrs;if(s){s.nodeName&&r.push(i=new $a(s.nodeName));for(let a in s){let l=s[a];l!=null&&(n&&r.length==1&&r.push(i=new $a(t.isInline?"span":"div")),a=="class"?i.class=(i.class?i.class+" ":"")+l:a=="style"?i.style=(i.style?i.style+";":"")+l:a!="nodeName"&&(i[a]=l))}}}return r}function ZI(e,t,n,i){if(n==vi&&i==vi)return t;let r=t;for(let o=0;o<i.length;o++){let s=i[o],a=n[o];if(o){let l;a&&a.nodeName==s.nodeName&&r!=e&&(l=r.parentNode)&&l.nodeName.toLowerCase()==s.nodeName||(l=document.createElement(s.nodeName),l.pmIsDeco=!0,l.appendChild(r),a=vi[0]),r=l}ZF(r,a||vi[0],s)}return r}function ZF(e,t,n){for(let i in t)i!="class"&&i!="style"&&i!="nodeName"&&!(i in n)&&e.removeAttribute(i);for(let i in n)i!="class"&&i!="style"&&i!="nodeName"&&n[i]!=t[i]&&e.setAttribute(i,n[i]);if(t.class!=n.class){let i=t.class?t.class.split(" ").filter(Boolean):[],r=n.class?n.class.split(" ").filter(Boolean):[];for(let o=0;o<i.length;o++)r.indexOf(i[o])==-1&&e.classList.remove(i[o]);for(let o=0;o<r.length;o++)i.indexOf(r[o])==-1&&e.classList.add(r[o]);e.classList.length==0&&e.removeAttribute("class")}if(t.style!=n.style){if(t.style){let i=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g,r;for(;r=i.exec(t.style);)e.style.removeProperty(r[1])}n.style&&(e.style.cssText+=n.style)}}function HI(e,t,n){return ZI(e,e,vi,G0(t,n,e.nodeType!=1))}function Nc(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].type.eq(t[n].type))return!1;return!0}function dI(e){let t=e.nextSibling;return e.parentNode.removeChild(e),t}var X0=class{constructor(t,n,i){this.lock=n,this.view=i,this.index=0,this.stack=[],this.changed=!1,this.top=t,this.preMatch=HF(t.node.content,t)}destroyBetween(t,n){if(t!=n){for(let i=t;i<n;i++)this.top.children[i].destroy();this.top.children.splice(t,n-t),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(t,n,i,r){let o=0,s=this.stack.length>>1,a=Math.min(s,t.length);for(;o<a&&(o==s-1?this.top:this.stack[o+1<<1]).matchesMark(t[o])&&t[o].type.spec.spanning!==!1;)o++;for(;o<s;)this.destroyRest(),this.top.dirty=bn,this.index=this.stack.pop(),this.top=this.stack.pop(),s--;for(;s<t.length;){this.stack.push(this.top,this.index+1);let l=-1,u=this.top.children.length;r<this.preMatch.index&&(u=Math.min(this.index+3,u));for(let c=this.index;c<u;c++){let d=this.top.children[c];if(d.matchesMark(t[s])&&!this.isLocked(d.dom)){l=c;break}}if(l<0&&this.index<this.top.children.length){let c=this.top.children[this.index];c instanceof yi&&c.dirty!=Tn&&c.mark.type==t[s].type&&c.spec.update&&!this.isLocked(c.dom)&&c.spec.update(t[s])&&(c.mark=t[s],l=this.index,this.changed=!0)}if(l>-1)l>this.index&&(this.changed=!0,this.destroyBetween(this.index,l)),this.top=this.top.children[this.index];else{let c=yi.create(this.top,t[s],n,i);this.top.children.splice(this.index,0,c),this.top=c,this.changed=!0}this.index=0,s++}}findNodeMatch(t,n,i,r){let o=-1,s;if(r>=this.preMatch.index&&(s=this.preMatch.matches[r-this.preMatch.index]).parent==this.top&&s.matchesNode(t,n,i))o=this.top.children.indexOf(s,this.index);else for(let a=this.index,l=Math.min(this.top.children.length,a+5);a<l;a++){let u=this.top.children[a];if(u.matchesNode(t,n,i)&&!this.preMatch.matched.has(u)){o=a;break}}return o<0?!1:(this.destroyBetween(this.index,o),this.index++,!0)}updateNodeAt(t,n,i,r,o){let s=this.top.children[r];return s.dirty==Tn&&s.dom==s.contentDOM&&(s.dirty=bi),s.update(t,n,i,o)?(this.destroyBetween(this.index,r),this.index++,!0):!1}findIndexWithChild(t){for(;;){let n=t.parentNode;if(!n)return-1;if(n==this.top.contentDOM){let i=t.pmViewDesc;if(i){for(let r=this.index;r<this.top.children.length;r++)if(this.top.children[r]==i)return r}return-1}t=n}}updateNextNode(t,n,i,r,o,s){for(let a=this.index;a<this.top.children.length;a++){let l=this.top.children[a];if(l instanceof Fr){let u=this.preMatch.matched.get(l);if(u!=null&&u!=o)return!1;let c=l.dom,d,f=this.isLocked(c)&&!(t.isText&&l.node&&l.node.isText&&l.nodeDOM.nodeValue==t.text&&l.dirty!=Tn&&Nc(n,l.outerDeco));if(!f&&l.update(t,n,i,r))return this.destroyBetween(this.index,a),l.dom!=c&&(this.changed=!0),this.index++,!0;if(!f&&(d=this.recreateWrapper(l,t,n,i,r,s)))return this.destroyBetween(this.index,a),this.top.children[this.index]=d,d.contentDOM&&(d.dirty=bi,d.updateChildren(r,s+1),d.dirty=bn),this.changed=!0,this.index++,!0;break}}return!1}recreateWrapper(t,n,i,r,o,s){if(t.dirty||n.isAtom||!t.children.length||!t.node.content.eq(n.content)||!Nc(i,t.outerDeco)||!r.eq(t.innerDeco))return null;let a=Fr.create(this.top,n,i,r,o,s);if(a.contentDOM){a.children=t.children,t.children=[];for(let l of a.children)l.parent=a}return t.destroy(),a}addNode(t,n,i,r,o){let s=Fr.create(this.top,t,n,i,r,o);s.contentDOM&&s.updateChildren(r,o+1),this.top.children.splice(this.index++,0,s),this.changed=!0}placeWidget(t,n,i){let r=this.index<this.top.children.length?this.top.children[this.index]:null;if(r&&r.matchesWidget(t)&&(t==r.widget||!r.widget.type.toDOM.parentNode))this.index++;else{let o=new Mc(this.top,t,n,i);this.top.children.splice(this.index++,0,o),this.changed=!0}}addTextblockHacks(){let t=this.top.children[this.index-1],n=this.top;for(;t instanceof yi;)n=t,t=n.children[n.children.length-1];(!t||!(t instanceof zc)||/\n$/.test(t.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(t.node.text))&&((Rt||Ct)&&t&&t.dom.contentEditable=="false"&&this.addHackNode("IMG",n),this.addHackNode("BR",this.top))}addHackNode(t,n){if(n==this.top&&this.index<n.children.length&&n.children[this.index].matchesHack(t))this.index++;else{let i=document.createElement(t);t=="IMG"&&(i.className="ProseMirror-separator",i.alt=""),t=="BR"&&(i.className="ProseMirror-trailingBreak");let r=new Dc(this.top,[],i,null);n!=this.top?n.children.push(r):n.children.splice(this.index++,0,r),this.changed=!0}}isLocked(t){return this.lock&&(t==this.lock||t.nodeType==1&&t.contains(this.lock.parentNode))}};function HF(e,t){let n=t,i=n.children.length,r=e.childCount,o=new Map,s=[];e:for(;r>0;){let a;for(;;)if(i){let u=n.children[i-1];if(u instanceof yi)n=u,i=u.children.length;else{a=u,i--;break}}else{if(n==t)break e;i=n.parent.children.indexOf(n),n=n.parent}let l=a.node;if(l){if(l!=e.child(r-1))break;--r,o.set(a,r),s.push(a)}}return{index:r,matched:o,matches:s.reverse()}}function qF(e,t){return e.type.side-t.type.side}function WF(e,t,n,i){let r=t.locals(e),o=0;if(r.length==0){for(let u=0;u<e.childCount;u++){let c=e.child(u);i(c,r,t.forChild(o,c),u),o+=c.nodeSize}return}let s=0,a=[],l=null;for(let u=0;;){let c,d;for(;s<r.length&&r[s].to==o;){let g=r[s++];g.widget&&(c?(d||(d=[c])).push(g):c=g)}if(c)if(d){d.sort(qF);for(let g=0;g<d.length;g++)n(d[g],u,!!l)}else n(c,u,!!l);let f,p;if(l)p=-1,f=l,l=null;else if(u<e.childCount)p=u,f=e.child(u++);else break;for(let g=0;g<a.length;g++)a[g].to<=o&&a.splice(g--,1);for(;s<r.length&&r[s].from<=o&&r[s].to>o;)a.push(r[s++]);let h=o+f.nodeSize;if(f.isText){let g=h;s<r.length&&r[s].from<g&&(g=r[s].from);for(let b=0;b<a.length;b++)a[b].to<g&&(g=a[b].to);g<h&&(l=f.cut(g-o),f=f.cut(0,g-o),h=g,p=-1)}else for(;s<r.length&&r[s].to<h;)s++;let m=f.isInline&&!f.isLeaf?a.filter(g=>!g.inline):a.slice();i(f,m,t.forChild(o,f),p),o=h}}function VF(e){if(e.nodeName=="UL"||e.nodeName=="OL"){let t=e.style.cssText;e.style.cssText=t+"; list-style: square !important",window.getComputedStyle(e).listStyle,e.style.cssText=t}}function KF(e,t,n,i){for(let r=0,o=0;r<e.childCount&&o<=i;){let s=e.child(r++),a=o;if(o+=s.nodeSize,!s.isText)continue;let l=s.text;for(;r<e.childCount;){let u=e.child(r++);if(o+=u.nodeSize,!u.isText)break;l+=u.text}if(o>=n){if(o>=i&&l.slice(i-t.length-a,i-a)==t)return i-t.length;let u=a<i?l.lastIndexOf(t,i-a-1):-1;if(u>=0&&u+t.length+a>=n)return a+u;if(n==i&&l.length>=i+t.length-a&&l.slice(i-a,i-a+t.length)==t)return i}}return-1}function Y0(e,t,n,i,r){let o=[];for(let s=0,a=0;s<e.length;s++){let l=e[s],u=a,c=a+=l.size;u>=n||c<=t?o.push(l):(u<t&&o.push(l.slice(0,t-u,i)),r&&(o.push(r),r=void 0),c>n&&o.push(l.slice(n-u,l.size,i)))}return o}function cg(e,t=null){let n=e.domSelectionRange(),i=e.state.doc;if(!n.focusNode)return null;let r=e.docView.nearestDesc(n.focusNode),o=r&&r.size==0,s=e.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(s<0)return null;let a=i.resolve(s),l,u;if(jc(n)){for(l=s;r&&!r.node;)r=r.parent;let d=r.node;if(r&&d.isAtom&&G.isSelectable(d)&&r.parent&&!(d.isInline&&SF(n.focusNode,n.focusOffset,r.dom))){let f=r.posBefore;u=new G(s==f?a:i.resolve(f))}}else{if(n instanceof e.dom.ownerDocument.defaultView.Selection&&n.rangeCount>1){let d=s,f=s;for(let p=0;p<n.rangeCount;p++){let h=n.getRangeAt(p);d=Math.min(d,e.docView.posFromDOM(h.startContainer,h.startOffset,1)),f=Math.max(f,e.docView.posFromDOM(h.endContainer,h.endOffset,-1))}if(d<0)return null;[l,s]=f==e.state.selection.anchor?[f,d]:[d,f],a=i.resolve(s)}else l=e.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(l<0)return null}let c=i.resolve(l);if(!u){let d=t=="pointer"||e.state.selection.head<a.pos&&!o?1:-1;u=dg(e,c,a,d)}return u}function qI(e){return e.editable?e.hasFocus():VI(e)&&document.activeElement&&document.activeElement.contains(e.dom)}function dr(e,t=!1){let n=e.state.selection;if(WI(e,n),!qI(e))return;let i=e.input.mouseDown;if(!t&&Ct&&i){let r=e.domSelectionRange(),o=e.domObserver.currentSelection;if(r.anchorNode&&o.anchorNode&&wi(r.anchorNode,r.anchorOffset,o.anchorNode,o.anchorOffset)&&i.delaySelUpdate()){e.domObserver.setCurSelection();return}}if(e.domObserver.disconnectSelection(),e.cursorWrapper)GF(e);else{let{anchor:r,head:o}=n,s,a;fI&&!(n instanceof q)&&(n.$from.parent.inlineContent||(s=pI(e,n.from)),!n.empty&&!n.$from.parent.inlineContent&&(a=pI(e,n.to))),e.docView.setSelection(r,o,e,t),fI&&(s&&hI(s),a&&hI(a)),n.visible?e.dom.classList.remove("ProseMirror-hideselection"):(e.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&JF(e))}e.domObserver.setCurSelection(),e.domObserver.connectSelection()}var fI=Rt||Ct&&NI<63;function pI(e,t){let{node:n,offset:i}=e.docView.domFromPos(t,0),r=i<n.childNodes.length?n.childNodes[i]:null,o=i?n.childNodes[i-1]:null;if(Rt&&r&&r.contentEditable=="false")return B0(r);if((!r||r.contentEditable=="false")&&(!o||o.contentEditable=="false")){if(r)return B0(r);if(o)return B0(o)}}function B0(e){return e.contentEditable="true",Rt&&e.draggable&&(e.draggable=!1,e.wasDraggable=!0),e}function hI(e){e.contentEditable="false",e.wasDraggable&&(e.draggable=!0,e.wasDraggable=null)}function JF(e){let t=e.dom.ownerDocument;t.removeEventListener("selectionchange",e.input.hideSelectionGuard);let n=e.domSelectionRange(),i=n.anchorNode,r=n.anchorOffset;t.addEventListener("selectionchange",e.input.hideSelectionGuard=()=>{(n.anchorNode!=i||n.anchorOffset!=r)&&(t.removeEventListener("selectionchange",e.input.hideSelectionGuard),setTimeout(()=>{(!qI(e)||e.state.selection.visible)&&e.dom.classList.remove("ProseMirror-hideselection")},20))})}function GF(e){let t=e.domSelection();if(!t)return;let n=e.cursorWrapper.dom,i=n.nodeName=="IMG";i?t.collapse(n.parentNode,$t(n)+1):t.collapse(n,0),!i&&!e.state.selection.visible&&Jt&&Lr<=11&&(n.disabled=!0,n.disabled=!1)}function WI(e,t){if(t instanceof G){let n=e.docView.descAt(t.from);n!=e.lastSelectedViewDesc&&(mI(e),n&&n.selectNode(),e.lastSelectedViewDesc=n)}else mI(e)}function mI(e){e.lastSelectedViewDesc&&(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),e.lastSelectedViewDesc=void 0)}function dg(e,t,n,i){return e.someProp("createSelectionBetween",r=>r(e,t,n))||q.between(t,n,i)}function gI(e){return e.editable&&!e.hasFocus()?!1:VI(e)}function VI(e){let t=e.domSelectionRange();if(!t.anchorNode)return!1;try{return e.dom.contains(t.anchorNode.nodeType==3?t.anchorNode.parentNode:t.anchorNode)&&(e.editable||e.dom.contains(t.focusNode.nodeType==3?t.focusNode.parentNode:t.focusNode))}catch{return!1}}function XF(e){let t=e.docView.domFromPos(e.state.selection.anchor,0),n=e.domSelectionRange();return wi(t.node,t.offset,n.anchorNode,n.anchorOffset)}function Q0(e,t){let{$anchor:n,$head:i}=e.selection,r=t>0?n.max(i):n.min(i),o=r.parent.inlineContent?r.depth?e.doc.resolve(t>0?r.after():r.before()):null:r;return o&&X.findFrom(o,t)}function Pr(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function bI(e,t,n){let i=e.state.selection;if(i instanceof q)if(n.indexOf("s")>-1){let{$head:r}=i,o=r.textOffset?null:t<0?r.nodeBefore:r.nodeAfter;if(!o||o.isText||!o.isLeaf)return!1;let s=e.state.doc.resolve(r.pos+o.nodeSize*(t<0?-1:1));return Pr(e,new q(i.$anchor,s))}else if(i.empty){if(e.endOfTextblock(t>0?"forward":"backward")){let r=Q0(e.state,t);return r&&r instanceof G?Pr(e,r):!1}else if(!(hn&&n.indexOf("m")>-1)){let r=i.$head,o=r.textOffset?null:t<0?r.nodeBefore:r.nodeAfter,s;if(!o||o.isText)return!1;let a=t<0?r.pos-o.nodeSize:r.pos;return o.isAtom||(s=e.docView.descAt(a))&&!s.contentDOM?G.isSelectable(o)?Pr(e,new G(t<0?e.state.doc.resolve(r.pos-o.nodeSize):r)):Da?Pr(e,new q(e.state.doc.resolve(t<0?a:a+o.nodeSize))):!1:!1}}else return!1;else{if(i instanceof G&&i.node.isInline)return Pr(e,new q(t>0?i.$to:i.$from));{let r=Q0(e.state,t);return r?Pr(e,r):!1}}}function Oc(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function Ca(e,t){let n=e.pmViewDesc;return n&&n.size==0&&(t<0||e.nextSibling||e.nodeName!="BR")}function $o(e,t){return t<0?YF(e):QF(e)}function YF(e){let t=e.domSelectionRange(),n=t.focusNode,i=t.focusOffset;if(!n)return;let r,o,s=!1;for(gn&&n.nodeType==1&&i<Oc(n)&&Ca(n.childNodes[i],-1)&&(s=!0);;)if(i>0){if(n.nodeType!=1)break;{let a=n.childNodes[i-1];if(Ca(a,-1))r=n,o=--i;else if(a.nodeType==3)n=a,i=n.nodeValue.length;else break}}else{if(KI(n))break;{let a=n.previousSibling;for(;a&&Ca(a,-1);)r=n.parentNode,o=$t(a),a=a.previousSibling;if(a)n=a,i=Oc(n);else{if(n=n.parentNode,n==e.dom)break;i=0}}}s?eg(e,n,i):r&&eg(e,r,o)}function QF(e){let t=e.domSelectionRange(),n=t.focusNode,i=t.focusOffset;if(!n)return;let r=Oc(n),o,s;for(;;)if(i<r){if(n.nodeType!=1)break;let a=n.childNodes[i];if(Ca(a,1))o=n,s=++i;else break}else{if(KI(n))break;{let a=n.nextSibling;for(;a&&Ca(a,1);)o=a.parentNode,s=$t(a)+1,a=a.nextSibling;if(a)n=a,i=0,r=Oc(n);else{if(n=n.parentNode,n==e.dom)break;i=r=0}}}o&&eg(e,o,s)}function KI(e){let t=e.pmViewDesc;return t&&t.node&&t.node.isBlock}function eB(e,t){for(;e&&t==e.childNodes.length&&!za(e);)t=$t(e)+1,e=e.parentNode;for(;e&&t<e.childNodes.length;){let n=e.childNodes[t];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable=="false")break;e=n,t=0}}function tB(e,t){for(;e&&!t&&!za(e);)t=$t(e),e=e.parentNode;for(;e&&t;){let n=e.childNodes[t-1];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable=="false")break;e=n,t=e.childNodes.length}}function eg(e,t,n){if(t.nodeType!=3){let o,s;(s=eB(t,n))?(t=s,n=0):(o=tB(t,n))&&(t=o,n=o.nodeValue.length)}let i=e.domSelection();if(!i)return;if(jc(i)){let o=document.createRange();o.setEnd(t,n),o.setStart(t,n),i.removeAllRanges(),i.addRange(o)}else i.extend&&i.extend(t,n);e.domObserver.setCurSelection();let{state:r}=e;setTimeout(()=>{e.state==r&&dr(e)},50)}function vI(e,t){let n=e.state.doc.resolve(t);if(!(Ct||OI)&&n.parent.inlineContent){let r=e.coordsAtPos(t);if(t>n.start()){let o=e.coordsAtPos(t-1),s=(o.top+o.bottom)/2;if(s>r.top&&s<r.bottom&&Math.abs(o.left-r.left)>1)return o.left<r.left?"ltr":"rtl"}if(t<n.end()){let o=e.coordsAtPos(t+1),s=(o.top+o.bottom)/2;if(s>r.top&&s<r.bottom&&Math.abs(o.left-r.left)>1)return o.left>r.left?"ltr":"rtl"}}return getComputedStyle(e.dom).direction=="rtl"?"rtl":"ltr"}function yI(e,t,n){let i=e.state.selection;if(i instanceof q&&!i.empty||n.indexOf("s")>-1||hn&&n.indexOf("m")>-1)return!1;let{$from:r,$to:o}=i;if(!r.parent.inlineContent||e.endOfTextblock(t<0?"up":"down")){let s=Q0(e.state,t);if(s&&s instanceof G)return Pr(e,s)}if(!r.parent.inlineContent){let s=t<0?r:o,a=i instanceof jt?X.near(s,t):X.findFrom(s,t);return a?Pr(e,a):!1}return!1}function kI(e,t){if(!(e.state.selection instanceof q))return!0;let{$head:n,$anchor:i,empty:r}=e.state.selection;if(!n.sameParent(i))return!0;if(!r)return!1;if(e.endOfTextblock(t>0?"forward":"backward"))return!0;let o=!n.textOffset&&(t<0?n.nodeBefore:n.nodeAfter);if(o&&!o.isText){let s=e.state.tr;return t<0?s.delete(n.pos-o.nodeSize,n.pos):s.delete(n.pos,n.pos+o.nodeSize),e.dispatch(s),!0}return!1}function xI(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function nB(e){if(!Rt||e.state.selection.$head.parentOffset>0)return!1;let{focusNode:t,focusOffset:n}=e.domSelectionRange();if(t&&t.nodeType==1&&n==0&&t.firstChild&&t.firstChild.contentEditable=="false"){let i=t.firstChild;xI(e,i,"true"),setTimeout(()=>xI(e,i,"false"),20)}return!1}function rB(e){let t="";return e.ctrlKey&&(t+="c"),e.metaKey&&(t+="m"),e.altKey&&(t+="a"),e.shiftKey&&(t+="s"),t}function iB(e,t){let n=t.keyCode,i=rB(t);if(n==8||hn&&n==72&&i=="c")return kI(e,-1)||$o(e,-1);if(n==46&&!t.shiftKey||hn&&n==68&&i=="c")return kI(e,1)||$o(e,1);if(n==13||n==27)return!0;if(n==37||hn&&n==66&&i=="c"){let r=n==37?vI(e,e.state.selection.from)=="ltr"?-1:1:-1;return bI(e,r,i)||$o(e,r)}else if(n==39||hn&&n==70&&i=="c"){let r=n==39?vI(e,e.state.selection.from)=="ltr"?1:-1:1;return bI(e,r,i)||$o(e,r)}else{if(n==38||hn&&n==80&&i=="c")return yI(e,-1,i)||$o(e,-1);if(n==40||hn&&n==78&&i=="c")return nB(e)||yI(e,1,i)||$o(e,1);if(i==(hn?"m":"c")&&(n==66||n==73||n==89||n==90))return!0}return!1}function fg(e,t){e.someProp("transformCopied",p=>{t=p(t,e)});let n=[],{content:i,openStart:r,openEnd:o}=t;for(;r>1&&o>1&&i.childCount==1&&i.firstChild.childCount==1;){r--,o--;let p=i.firstChild;n.push(p.type.name,p.attrs!=p.type.defaultAttrs?p.attrs:null),i=p.content}let s=e.someProp("clipboardSerializer")||rr.fromSchema(e.state.schema),a=eA(),l=a.createElement("div");l.appendChild(s.serializeFragment(i,{document:a}));let u=l.firstChild,c,d=0;for(;u&&u.nodeType==1&&(c=QI[u.nodeName.toLowerCase()]);){for(let p=c.length-1;p>=0;p--){let h=a.createElement(c[p]);for(;l.firstChild;)h.appendChild(l.firstChild);l.appendChild(h),d++}u=l.firstChild}u&&u.nodeType==1&&u.setAttribute("data-pm-slice",`${r} ${o}${d?` -${d}`:""} ${JSON.stringify(n)}`);let f=e.someProp("clipboardTextSerializer",p=>p(t,e))||t.content.textBetween(0,t.content.size,`
99
+
100
+ `);return{dom:l,text:f,slice:t}}function JI(e,t,n,i,r){let o=r.parent.type.spec.code,s,a;if(!n&&!t)return null;let l=!!t&&(i||o||!n);if(l){if(e.someProp("transformPastedText",f=>{t=f(t,o||i,e)}),o)return a=new B(z.from(e.state.schema.text(t.replace(/\r\n?/g,`
101
+ `))),0,0),e.someProp("transformPasted",f=>{a=f(a,e,!0)}),a;let d=e.someProp("clipboardTextParser",f=>f(t,r,i,e));if(d)a=d;else{let f=r.marks(),{schema:p}=e.state,h=rr.fromSchema(p);s=document.createElement("div"),t.split(/(?:\r\n?|\n)+/).forEach(m=>{let g=s.appendChild(document.createElement("p"));m&&g.appendChild(h.serializeNode(p.text(m,f)))})}}else e.someProp("transformPastedHTML",d=>{n=d(n,e)}),s=lB(n),Da&&uB(s);let u=s&&s.querySelector("[data-pm-slice]"),c=u&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(u.getAttribute("data-pm-slice")||"");if(c&&c[3])for(let d=+c[3];d>0;d--){let f=s.firstChild;for(;f&&f.nodeType!=1;)f=f.nextSibling;if(!f)break;s=f}if(a||(a=(e.someProp("clipboardParser")||e.someProp("domParser")||$n.fromSchema(e.state.schema)).parseSlice(s,{preserveWhitespace:!!(l||c),context:r,ruleFromNode(f){return f.nodeName=="BR"&&!f.nextSibling&&f.parentNode&&!oB.test(f.parentNode.nodeName)?{ignore:!0}:null}})),c)a=cB(_I(a,+c[1],+c[2]),c[4]);else if(a=B.maxOpen(sB(a.content,r),!0),a.openStart||a.openEnd){let d=0,f=0;for(let p=a.content.firstChild;d<a.openStart&&!p.type.spec.isolating;d++,p=p.firstChild);for(let p=a.content.lastChild;f<a.openEnd&&!p.type.spec.isolating;f++,p=p.lastChild);a=_I(a,d,f)}return e.someProp("transformPasted",d=>{a=d(a,e,l)}),a}var oB=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function sB(e,t){if(e.childCount<2)return e;for(let n=t.depth;n>=0;n--){let r=t.node(n).contentMatchAt(t.index(n)),o,s=[];if(e.forEach(a=>{if(!s)return;let l=r.findWrapping(a.type),u;if(!l)return s=null;if(u=s.length&&o.length&&XI(l,o,a,s[s.length-1],0))s[s.length-1]=u;else{s.length&&(s[s.length-1]=YI(s[s.length-1],o.length));let c=GI(a,l);s.push(c),r=r.matchType(c.type),o=l}}),s)return z.from(s)}return e}function GI(e,t,n=0){for(let i=t.length-1;i>=n;i--)e=t[i].create(null,z.from(e));return e}function XI(e,t,n,i,r){if(r<e.length&&r<t.length&&e[r]==t[r]){let o=XI(e,t,n,i.lastChild,r+1);if(o)return i.copy(i.content.replaceChild(i.childCount-1,o));if(i.contentMatchAt(i.childCount).matchType(r==e.length-1?n.type:e[r+1]))return i.copy(i.content.append(z.from(GI(n,e,r+1))))}}function YI(e,t){if(t==0)return e;let n=e.content.replaceChild(e.childCount-1,YI(e.lastChild,t-1)),i=e.contentMatchAt(e.childCount).fillBefore(z.empty,!0);return e.copy(n.append(i))}function tg(e,t,n,i,r,o){let s=t<0?e.firstChild:e.lastChild,a=s.content;return e.childCount>1&&(o=0),r<i-1&&(a=tg(a,t,n,i,r+1,o)),r>=n&&(a=t<0?s.contentMatchAt(0).fillBefore(a,o<=r).append(a):a.append(s.contentMatchAt(s.childCount).fillBefore(z.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,s.copy(a))}function _I(e,t,n){return t<e.openStart&&(e=new B(tg(e.content,-1,t,e.openStart,0,e.openEnd),t,e.openEnd)),n<e.openEnd&&(e=new B(tg(e.content,1,n,e.openEnd,0,0),e.openStart,n)),e}var QI={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]};function eA(){return document.implementation.createHTMLDocument("title")}var Ea=null;function aB(e){let t=window.trustedTypes;if(!t)return e;if(!Ea){if(Ea=t.defaultPolicy)try{return Ea.createHTML(e)}catch{}Ea=t.createPolicy("ProseMirrorClipboard",{createHTML:n=>n})}return Ea.createHTML(e)}function lB(e){let t=/^(\s*<meta [^>]*>)*/.exec(e);t&&(e=e.slice(t[0].length));let n=eA(),i=n.body,r=/<([a-z][^>\s]+)/i.exec(e),o;if((o=r&&QI[r[1].toLowerCase()])&&(e=o.map(s=>"<"+s+">").join("")+e+o.map(s=>"</"+s+">").reverse().join("")),i.innerHTML=aB(e),o)for(let s=0;s<o.length;s++)i=i.querySelector(o[s])||i;for(let s=0;s<n.styleSheets.length;s++){let a=n.styleSheets[s];for(let l=0;l<a.rules.length;l++){let u=a.rules[l];if(u instanceof CSSStyleRule){let c=i.querySelectorAll(u.selectorText);for(let d=0;d<c.length;d++)c[d].style.cssText+=u.style.cssText}}}return i}function uB(e){let t=e.querySelectorAll(Ct?"span:not([class]):not([style])":"span.Apple-converted-space");for(let n=0;n<t.length;n++){let i=t[n];i.childNodes.length==1&&i.textContent=="\xA0"&&i.parentNode&&i.parentNode.replaceChild(e.ownerDocument.createTextNode(" "),i)}}function cB(e,t){if(!e.size)return e;let n=e.content.firstChild.type.schema,i;try{i=JSON.parse(t)}catch{return e}let{content:r,openStart:o,openEnd:s}=e;for(let a=i.length-2;a>=0;a-=2){let l=n.nodes[i[a]];if(!l||l.hasRequiredAttrs())break;try{l.checkAttrs(i[a+1])}catch{break}r=z.from(l.create(i[a+1],r)),o++,s++}return new B(r,o,s)}var Zt={},Ht={},dB={touchstart:!0,touchmove:!0},ng=class{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:"",button:0},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastChromeDelete=0,this.composing=!1,this.compositionNode=null,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.badSafariComposition=!1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}};function fB(e){for(let t in Zt){let n=Zt[t];e.dom.addEventListener(t,e.input.eventHandlers[t]=i=>{hB(e,i)&&!pg(e,i)&&(e.editable||!(i.type in Ht))&&n(e,i)},dB[t]?{passive:!0}:void 0)}Rt&&e.dom.addEventListener("input",()=>null),rg(e)}function cr(e,t){e.input.lastSelectionOrigin=t,e.input.lastSelectionTime=Date.now()}function pB(e){e.input.mouseDown&&e.input.mouseDown.done(),e.domObserver.stop();for(let t in e.input.eventHandlers)e.dom.removeEventListener(t,e.input.eventHandlers[t]);clearTimeout(e.input.composingTimeout),clearTimeout(e.input.lastIOSEnterFallbackTimeout)}function rg(e){e.someProp("handleDOMEvents",t=>{for(let n in t)e.input.eventHandlers[n]||e.dom.addEventListener(n,e.input.eventHandlers[n]=i=>pg(e,i))})}function pg(e,t){return e.someProp("handleDOMEvents",n=>{let i=n[t.type];return i?i(e,t)||t.defaultPrevented:!1})}function hB(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let n=t.target;n!=e.dom;n=n.parentNode)if(!n||n.nodeType==11||n.pmViewDesc&&n.pmViewDesc.stopEvent(t))return!1;return!0}function mB(e,t){!pg(e,t)&&Zt[t.type]&&(e.editable||!(t.type in Ht))&&Zt[t.type](e,t)}Ht.keydown=(e,t)=>{let n=t;if(e.input.shiftKey=n.keyCode==16||n.shiftKey,!rA(e)&&(e.input.lastKeyCode=n.keyCode,e.input.lastKeyCodeTime=Date.now(),!(ur&&Ct&&n.keyCode==13)))if(n.keyCode!=229&&e.domObserver.forceFlush(),Io&&n.keyCode==13&&!n.ctrlKey&&!n.altKey&&!n.metaKey){let i=Date.now();e.input.lastIOSEnter=i,e.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{e.input.lastIOSEnter==i&&(e.someProp("handleKeyDown",r=>r(e,gi(13,"Enter"))),e.input.lastIOSEnter=0)},200)}else e.someProp("handleKeyDown",i=>i(e,n))||iB(e,n)?n.preventDefault():cr(e,"key")};Ht.keyup=(e,t)=>{t.keyCode==16&&(e.input.shiftKey=!1)};Ht.keypress=(e,t)=>{let n=t;if(rA(e)||!n.charCode||n.ctrlKey&&!n.altKey||hn&&n.metaKey)return;if(e.someProp("handleKeyPress",r=>r(e,n))){n.preventDefault();return}let i=e.state.selection;if(!(i instanceof q)||!i.$from.sameParent(i.$to)){let r=String.fromCharCode(n.charCode),o=()=>e.state.tr.insertText(r).scrollIntoView();!/[\r\n]/.test(r)&&!e.someProp("handleTextInput",s=>s(e,i.$from.pos,i.$to.pos,r,o))&&e.dispatch(o()),n.preventDefault()}};function Na(e){return{left:e.clientX,top:e.clientY}}function gB(e,t){let n=t.x-e.clientX,i=t.y-e.clientY;return n*n+i*i<100}function hg(e,t,n,i,r){if(i==-1)return!1;let o=e.state.doc.resolve(i);for(let s=o.depth+1;s>0;s--)if(e.someProp(t,a=>s>o.depth?a(e,n,o.nodeAfter,o.before(s),r,!0):a(e,n,o.node(s),o.before(s),r,!1)))return!0;return!1}function Oa(e,t,n){if(e.focused||e.focus(),e.state.selection.eq(t))return;let i=e.state.tr.setSelection(t);n=="pointer"&&i.setMeta("pointer",!0),e.dispatch(i)}function bB(e,t){if(t==-1)return!1;let n=e.state.doc.resolve(t),i=n.nodeAfter;return i&&i.isAtom&&G.isSelectable(i)?(Oa(e,new G(n),"pointer"),!0):!1}function vB(e,t){if(t==-1)return!1;let n=e.state.selection,i,r;n instanceof G&&(i=n.node);let o=e.state.doc.resolve(t);for(let s=o.depth+1;s>0;s--){let a=s>o.depth?o.nodeAfter:o.node(s);if(G.isSelectable(a)){i&&n.$from.depth>0&&s>=n.$from.depth&&o.before(n.$from.depth+1)==n.$from.pos?r=o.before(n.$from.depth):r=o.before(s);break}}return r!=null?(Oa(e,G.create(e.state.doc,r),"pointer"),!0):!1}function yB(e,t,n,i,r){return hg(e,"handleClickOn",t,n,i)||e.someProp("handleClick",o=>o(e,t,i))||(r?vB(e,n):bB(e,n))}function kB(e,t,n,i){return hg(e,"handleDoubleClickOn",t,n,i)||e.someProp("handleDoubleClick",r=>r(e,t,i))}function xB(e,t,n,i){return hg(e,"handleTripleClickOn",t,n,i)||e.someProp("handleTripleClick",r=>r(e,t,i))||_B(e,n,i)}function _B(e,t,n){if(n.button!=0)return!1;let i=tA(e,t,!0),r=e.state.doc;return i?(Oa(e,i,"pointer"),i instanceof q&&r.eq(e.state.doc)&&(e.input.mouseDown=new og(e,i)),!0):!1}function tA(e,t,n){let i=e.state.doc;if(t==-1)return i.inlineContent?q.create(i,0,i.content.size):null;let r=i.resolve(t);for(let o=r.depth+1;o>0;o--){let s=o>r.depth?r.nodeAfter:r.node(o),a=r.before(o);if(s.inlineContent)return q.create(i,a+1,a+1+s.content.size);if(n&&G.isSelectable(s))return G.create(i,a)}return null}function mg(e){return Pc(e)}var nA=hn?"metaKey":"ctrlKey";Zt.mousedown=(e,t)=>{let n=t;e.input.shiftKey=n.shiftKey;let i=mg(e),r=Date.now(),o="singleClick";r-e.input.lastClick.time<500&&gB(n,e.input.lastClick)&&!n[nA]&&e.input.lastClick.button==n.button&&(e.input.lastClick.type=="singleClick"?o="doubleClick":e.input.lastClick.type=="doubleClick"&&(o="tripleClick")),e.input.lastClick={time:r,x:n.clientX,y:n.clientY,type:o,button:n.button},e.input.mouseDown&&e.input.mouseDown.done();let s=e.posAtCoords(Na(n));s&&(o=="singleClick"?e.input.mouseDown=new ig(e,s,n,!!i):(o=="doubleClick"?kB:xB)(e,s.pos,s.inside,n)?n.preventDefault():cr(e,"pointer"))};var Rc=class{constructor(t){this.view=t,this.mightDrag=null,t.root.addEventListener("mouseup",this.up=this.up.bind(this)),t.root.addEventListener("mousemove",this.move=this.move.bind(this))}up(t){this.done()}move(t){t.buttons==0&&this.done()}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.view.input.mouseDown==this&&(this.view.input.mouseDown=null)}delaySelUpdate(){return!1}},ig=class extends Rc{constructor(t,n,i,r){super(t),this.pos=n,this.event=i,this.flushed=r,this.delayedSelectionSync=!1,this.startDoc=t.state.doc,this.selectNode=!!i[nA],this.allowDefault=i.shiftKey;let o,s;if(n.inside>-1)o=t.state.doc.nodeAt(n.inside),s=n.inside;else{let c=t.state.doc.resolve(n.pos);o=c.parent,s=c.depth?c.before():0}let a=r?null:i.target,l=a?t.docView.nearestDesc(a,!0):null;this.target=l&&l.nodeDOM.nodeType==1?l.nodeDOM:null;let{selection:u}=t.state;i.button==0&&(o.type.spec.draggable&&o.type.spec.selectable!==!1||u instanceof G&&u.from<=s&&u.to>s)&&(this.mightDrag={node:o,pos:s,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&gn&&!this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),cr(t,"pointer")}done(){super.done(),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(()=>{this.view.isDestroyed||dr(this.view)})}up(t){if(this.done(),!this.view.dom.contains(t.target))return;let n=this.pos;this.view.state.doc!=this.startDoc&&(n=this.view.posAtCoords(Na(t))),this.updateAllowDefault(t),this.allowDefault||!n?cr(this.view,"pointer"):yB(this.view,n.pos,n.inside,t,this.selectNode)?t.preventDefault():t.button==0&&(this.flushed||Rt&&this.mightDrag&&!this.mightDrag.node.isAtom||Ct&&!this.view.state.selection.visible&&Math.min(Math.abs(n.pos-this.view.state.selection.from),Math.abs(n.pos-this.view.state.selection.to))<=2)?(Oa(this.view,X.near(this.view.state.doc.resolve(n.pos)),"pointer"),t.preventDefault()):cr(this.view,"pointer")}move(t){this.updateAllowDefault(t),cr(this.view,"pointer"),super.move(t)}updateAllowDefault(t){!this.allowDefault&&(Math.abs(this.event.x-t.clientX)>4||Math.abs(this.event.y-t.clientY)>4)&&(this.allowDefault=!0)}delaySelUpdate(){return this.allowDefault?(this.delayedSelectionSync=!0,!0):!1}},og=class extends Rc{constructor(t,n){super(t),this.startSelection=n,this.startDoc=t.state.doc}move(t){if(t.buttons==0||this.view.isDestroyed||!this.view.state.doc.eq(this.startDoc)){this.done();return}t.preventDefault(),cr(this.view,"pointer");let n=this.view.posAtCoords(Na(t)),i=n&&tA(this.view,n.inside,!1);if(!i)return;let{doc:r}=this.view.state,o=this.startSelection,[s,a]=i.from<o.from?[o.to,i.from]:[o.from,i.to];Oa(this.view,q.create(r,s,a),"pointer")}};Zt.touchstart=e=>{e.input.lastTouch=Date.now(),mg(e),cr(e,"pointer")};Zt.touchmove=e=>{e.input.lastTouch=Date.now(),cr(e,"pointer")};Zt.contextmenu=e=>mg(e);function rA(e,t){return e.composing?!0:Rt&&Math.abs(Date.now()-e.input.compositionEndedAt)<500?(e.input.compositionEndedAt=-2e8,!0):!1}var wB=ur?5e3:-1;Ht.compositionstart=Ht.compositionupdate=e=>{if(!e.composing){e.domObserver.flush();let{state:t}=e,n=t.selection.$to;if(t.selection instanceof q&&(t.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(i=>i.type.spec.inclusive===!1)||Ct&&OI&&SB(e)))e.markCursor=e.state.storedMarks||n.marks(),Pc(e,!0),e.markCursor=null;else if(Pc(e,!t.selection.empty),gn&&t.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let i=e.domSelectionRange();for(let r=i.focusNode,o=i.focusOffset;r&&r.nodeType==1&&o!=0;){let s=o<0?r.lastChild:r.childNodes[o-1];if(!s)break;if(s.nodeType==3){let a=e.domSelection();a&&a.collapse(s,s.nodeValue.length);break}else r=s,o=-1}}e.input.composing=!0}iA(e,wB)};function SB(e){let{focusNode:t,focusOffset:n}=e.domSelectionRange();if(!t||t.nodeType!=1||n>=t.childNodes.length)return!1;let i=t.childNodes[n];return i.nodeType==1&&i.contentEditable=="false"}Ht.compositionend=(e,t)=>{e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=Date.now(),e.input.compositionPendingChanges=e.domObserver.pendingRecords().length?e.input.compositionID:0,e.input.compositionNode=null,e.input.badSafariComposition?e.domObserver.forceFlush():e.input.compositionPendingChanges&&Promise.resolve().then(()=>e.domObserver.flush()),e.input.compositionID++,iA(e,20))};function iA(e,t){clearTimeout(e.input.composingTimeout),t>-1&&(e.input.composingTimeout=setTimeout(()=>Pc(e),t))}function oA(e){for(e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=Date.now());e.input.compositionNodes.length>0;)e.input.compositionNodes.pop().markParentsDirty()}function EB(e){let t=e.domSelectionRange();if(!t.focusNode)return null;let n=_F(t.focusNode,t.focusOffset),i=wF(t.focusNode,t.focusOffset);if(n&&i&&n!=i){let r=i.pmViewDesc,o=e.domObserver.lastChangedTextNode;if(n==o||i==o)return o;if(!r||!r.isText(i.nodeValue))return i;if(e.input.compositionNode==i){let s=n.pmViewDesc;if(!(!s||!s.isText(n.nodeValue)))return i}}return n||i}function Pc(e,t=!1){if(!(ur&&e.domObserver.flushingSoon>=0)){if(e.domObserver.forceFlush(),oA(e),t||e.docView&&e.docView.dirty){let n=cg(e),i=e.state.selection;return n&&!n.eq(i)?e.dispatch(e.state.tr.setSelection(n)):(e.markCursor||t)&&!i.$from.node(i.$from.sharedDepth(i.to)).inlineContent?e.dispatch(e.state.tr.deleteSelection()):e.updateState(e.state),!0}return!1}}function $B(e,t){if(!e.dom.parentNode)return;let n=e.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(t),n.style.cssText="position: fixed; left: -10000px; top: 10px";let i=getSelection(),r=document.createRange();r.selectNodeContents(t),e.dom.blur(),i.removeAllRanges(),i.addRange(r),setTimeout(()=>{n.parentNode&&n.parentNode.removeChild(n),e.focus()},50)}var Ta=Jt&&Lr<15||Io&&CF<604;Zt.copy=Ht.cut=(e,t)=>{let n=t,i=e.state.selection,r=n.type=="cut";if(i.empty)return;let o=Ta?null:n.clipboardData,s=i.content(),{dom:a,text:l}=fg(e,s);o?(n.preventDefault(),o.clearData(),o.setData("text/html",a.innerHTML),o.setData("text/plain",l)):$B(e,a),r&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function CB(e){return e.openStart==0&&e.openEnd==0&&e.content.childCount==1?e.content.firstChild:null}function TB(e,t){if(!e.dom.parentNode)return;let n=e.input.shiftKey||e.state.selection.$from.parent.type.spec.code,i=e.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(i.contentEditable="true"),i.style.cssText="position: fixed; left: -10000px; top: 10px",i.focus();let r=e.input.shiftKey&&e.input.lastKeyCode!=45;setTimeout(()=>{e.focus(),i.parentNode&&i.parentNode.removeChild(i),n?Ia(e,i.value,null,r,t):Ia(e,i.textContent,i.innerHTML,r,t)},50)}function Ia(e,t,n,i,r){let o=JI(e,t,n,i,e.state.selection.$from);if(e.someProp("handlePaste",l=>l(e,r,o||B.empty)))return!0;if(!o)return!1;let s=CB(o),a=s?e.state.tr.replaceSelectionWith(s,i):e.state.tr.replaceSelection(o);return e.dispatch(a.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function sA(e){let t=e.getData("text/plain")||e.getData("Text");if(t)return t;let n=e.getData("text/uri-list");return n?n.replace(/\r?\n/g," "):""}Ht.paste=(e,t)=>{let n=t;if(e.composing&&!ur)return;let i=Ta?null:n.clipboardData,r=e.input.shiftKey&&e.input.lastKeyCode!=45;i&&Ia(e,sA(i),i.getData("text/html"),r,n)?n.preventDefault():TB(e,n)};var Lc=class{constructor(t,n,i){this.slice=t,this.move=n,this.node=i}},IB=hn?"altKey":"ctrlKey";function aA(e,t){let n;return e.someProp("dragCopies",i=>{n=n||i(t)}),n!=null?!n:!t[IB]}Zt.dragstart=(e,t)=>{let n=t,i=e.input.mouseDown;if(i&&i.done(),!n.dataTransfer)return;let r=e.state.selection,o=r.empty?null:e.posAtCoords(Na(n)),s;if(!(o&&o.pos>=r.from&&o.pos<=(r instanceof G?r.to-1:r.to))){if(i&&i.mightDrag)s=G.create(e.state.doc,i.mightDrag.pos);else if(n.target&&n.target.nodeType==1){let d=e.docView.nearestDesc(n.target,!0);d&&d.node.type.spec.draggable&&d!=e.docView&&(s=G.create(e.state.doc,d.posBefore))}}let a=(s||e.state.selection).content(),{dom:l,text:u,slice:c}=fg(e,a);(!n.dataTransfer.files.length||!Ct||NI>120)&&n.dataTransfer.clearData(),n.dataTransfer.setData(Ta?"Text":"text/html",l.innerHTML),n.dataTransfer.effectAllowed="copyMove",Ta||n.dataTransfer.setData("text/plain",u),e.dragging=new Lc(c,aA(e,n),s)};Zt.dragend=e=>{let t=e.dragging;window.setTimeout(()=>{e.dragging==t&&(e.dragging=null)},50)};Ht.dragover=Ht.dragenter=(e,t)=>t.preventDefault();Ht.drop=(e,t)=>{try{AB(e,t,e.dragging)}finally{e.dragging=null}};function AB(e,t,n){if(!t.dataTransfer)return;let i=e.posAtCoords(Na(t));if(!i)return;let r=e.state.doc.resolve(i.pos),o=n&&n.slice;o?e.someProp("transformPasted",p=>{o=p(o,e,!1)}):o=JI(e,sA(t.dataTransfer),Ta?null:t.dataTransfer.getData("text/html"),!1,r);let s=!!(n&&aA(e,t));if(e.someProp("handleDrop",p=>p(e,t,o||B.empty,s))){t.preventDefault();return}if(!o)return;t.preventDefault();let a=o?Tc(e.state.doc,r.pos,o):r.pos;a==null&&(a=r.pos);let l=e.state.tr;if(s){let{node:p}=n;p?p.replace(l):l.deleteSelection()}let u=l.mapping.map(a),c=o.openStart==0&&o.openEnd==0&&o.content.childCount==1,d=l.doc;if(c?l.replaceRangeWith(u,u,o.content.firstChild):l.replaceRange(u,u,o),l.doc.eq(d))return;let f=l.doc.resolve(u);if(c&&G.isSelectable(o.content.firstChild)&&f.nodeAfter&&f.nodeAfter.sameMarkup(o.content.firstChild))l.setSelection(new G(f));else{let p=l.mapping.map(a);l.mapping.maps[l.mapping.maps.length-1].forEach((h,m,g,b)=>p=b),l.setSelection(dg(e,f,l.doc.resolve(p)))}e.focus(),e.dispatch(l.setMeta("uiEvent","drop"))}Zt.focus=e=>{e.input.lastFocus=Date.now(),e.focused||(e.domObserver.stop(),e.dom.classList.add("ProseMirror-focused"),e.domObserver.start(),e.focused=!0,setTimeout(()=>{e.docView&&e.hasFocus()&&!e.domObserver.currentSelection.eq(e.domSelectionRange())&&dr(e)},20))};Zt.blur=(e,t)=>{let n=t;e.focused&&(e.domObserver.stop(),e.dom.classList.remove("ProseMirror-focused"),e.domObserver.start(),n.relatedTarget&&e.dom.contains(n.relatedTarget)&&e.domObserver.currentSelection.clear(),e.focused=!1)};Zt.beforeinput=(e,t)=>{if(ur&&t.inputType=="deleteContentBackward"){e.domObserver.flushSoon();let{domChangeCount:i}=e.input;setTimeout(()=>{if(e.input.domChangeCount!=i||(e.dom.blur(),e.focus(),e.someProp("handleKeyDown",o=>o(e,gi(8,"Backspace")))))return;let{$cursor:r}=e.state.selection;r&&r.pos>0&&e.dispatch(e.state.tr.delete(r.pos-1,r.pos).scrollIntoView())},50)}};for(let e in Ht)Zt[e]=Ht[e];function Aa(e,t){if(e==t)return!0;for(let n in e)if(e[n]!==t[n])return!1;for(let n in t)if(!(n in e))return!1;return!0}var Fc=class e{constructor(t,n){this.toDOM=t,this.spec=n||xi,this.side=this.spec.side||0}map(t,n,i,r){let{pos:o,deleted:s}=t.mapResult(n.from+r,this.side<0?-1:1);return s?null:new pt(o-i,o-i,this)}valid(){return!0}eq(t){return this==t||t instanceof e&&(this.spec.key&&this.spec.key==t.spec.key||this.toDOM==t.toDOM&&Aa(this.spec,t.spec))}destroy(t){this.spec.destroy&&this.spec.destroy(t)}},ki=class e{constructor(t,n){this.attrs=t,this.spec=n||xi}map(t,n,i,r){let o=t.map(n.from+r,this.spec.inclusiveStart?-1:1)-i,s=t.map(n.to+r,this.spec.inclusiveEnd?1:-1)-i;return o>=s?null:new pt(o,s,this)}valid(t,n){return n.from<n.to}eq(t){return this==t||t instanceof e&&Aa(this.attrs,t.attrs)&&Aa(this.spec,t.spec)}static is(t){return t.type instanceof e}destroy(){}},sg=class e{constructor(t,n){this.attrs=t,this.spec=n||xi}map(t,n,i,r){let o=t.mapResult(n.from+r,1);if(o.deleted)return null;let s=t.mapResult(n.to+r,-1);return s.deleted||s.pos<=o.pos?null:new pt(o.pos-i,s.pos-i,this)}valid(t,n){let{index:i,offset:r}=t.content.findIndex(n.from),o;return r==n.from&&!(o=t.child(i)).isText&&r+o.nodeSize==n.to}eq(t){return this==t||t instanceof e&&Aa(this.attrs,t.attrs)&&Aa(this.spec,t.spec)}destroy(){}},pt=class e{constructor(t,n,i){this.from=t,this.to=n,this.type=i}copy(t,n){return new e(t,n,this.type)}eq(t,n=0){return this.type.eq(t.type)&&this.from+n==t.from&&this.to+n==t.to}map(t,n,i){return this.type.map(t,this,n,i)}static widget(t,n,i){return new e(t,t,new Fc(n,i))}static inline(t,n,i,r){return new e(t,n,new ki(i,r))}static node(t,n,i,r){return new e(t,n,new sg(i,r))}get spec(){return this.type.spec}get inline(){return this.type instanceof ki}get widget(){return this.type instanceof Fc}},Co=[],xi={},Ce=class e{constructor(t,n){this.local=t.length?t:Co,this.children=n.length?n:Co}static create(t,n){return n.length?Uc(n,t,0,xi):Ot}find(t,n,i){let r=[];return this.findInner(t??0,n??1e9,r,0,i),r}findInner(t,n,i,r,o){for(let s=0;s<this.local.length;s++){let a=this.local[s];a.from<=n&&a.to>=t&&(!o||o(a.spec))&&i.push(a.copy(a.from+r,a.to+r))}for(let s=0;s<this.children.length;s+=3)if(this.children[s]<n&&this.children[s+1]>t){let a=this.children[s]+1;this.children[s+2].findInner(t-a,n-a,i,r+a,o)}}map(t,n,i){return this==Ot||t.maps.length==0?this:this.mapInner(t,n,0,0,i||xi)}mapInner(t,n,i,r,o){let s;for(let a=0;a<this.local.length;a++){let l=this.local[a].map(t,i,r);l&&l.type.valid(n,l)?(s||(s=[])).push(l):o.onRemove&&o.onRemove(this.local[a].spec)}return this.children.length?MB(this.children,s||[],t,n,i,r,o):s?new e(s.sort(_i),Co):Ot}add(t,n){return n.length?this==Ot?e.create(t,n):this.addInner(t,n,0):this}addInner(t,n,i){let r,o=0;t.forEach((a,l)=>{let u=l+i,c;if(c=uA(n,a,u)){for(r||(r=this.children.slice());o<r.length&&r[o]<l;)o+=3;r[o]==l?r[o+2]=r[o+2].addInner(a,c,u+1):r.splice(o,0,l,l+a.nodeSize,Uc(c,a,u+1,xi)),o+=3}});let s=lA(o?cA(n):n,-i);for(let a=0;a<s.length;a++)s[a].type.valid(t,s[a])||s.splice(a--,1);return new e(s.length?this.local.concat(s).sort(_i):this.local,r||this.children)}remove(t){return t.length==0||this==Ot?this:this.removeInner(t,0)}removeInner(t,n){let i=this.children,r=this.local;for(let o=0;o<i.length;o+=3){let s,a=i[o]+n,l=i[o+1]+n;for(let c=0,d;c<t.length;c++)(d=t[c])&&d.from>a&&d.to<l&&(t[c]=null,(s||(s=[])).push(d));if(!s)continue;i==this.children&&(i=this.children.slice());let u=i[o+2].removeInner(s,a+1);u!=Ot?i[o+2]=u:(i.splice(o,3),o-=3)}if(r.length){for(let o=0,s;o<t.length;o++)if(s=t[o])for(let a=0;a<r.length;a++)r[a].eq(s,n)&&(r==this.local&&(r=this.local.slice()),r.splice(a--,1))}return i==this.children&&r==this.local?this:r.length||i.length?new e(r,i):Ot}forChild(t,n){if(this==Ot)return this;if(n.isLeaf)return e.empty;let i,r;for(let a=0;a<this.children.length;a+=3)if(this.children[a]>=t){this.children[a]==t&&(i=this.children[a+2]);break}let o=t+1,s=o+n.content.size;for(let a=0;a<this.local.length;a++){let l=this.local[a];if(l.from<s&&l.to>o&&l.type instanceof ki){let u=Math.max(o,l.from)-o,c=Math.min(s,l.to)-o;u<c&&(r||(r=[])).push(l.copy(u,c))}}if(r){let a=new e(r.sort(_i),Co);return i?new Bc([a,i]):a}return i||Ot}eq(t){if(this==t)return!0;if(!(t instanceof e)||this.local.length!=t.local.length||this.children.length!=t.children.length)return!1;for(let n=0;n<this.local.length;n++)if(!this.local[n].eq(t.local[n]))return!1;for(let n=0;n<this.children.length;n+=3)if(this.children[n]!=t.children[n]||this.children[n+1]!=t.children[n+1]||!this.children[n+2].eq(t.children[n+2]))return!1;return!0}locals(t){return gg(this.localsInner(t))}localsInner(t){if(this==Ot)return Co;if(t.inlineContent||!this.local.some(ki.is))return this.local;let n=[];for(let i=0;i<this.local.length;i++)this.local[i].type instanceof ki||n.push(this.local[i]);return n}forEachSet(t){t(this)}};Ce.empty=new Ce([],[]);Ce.removeOverlap=gg;var Ot=Ce.empty,Bc=class e{constructor(t){this.members=t}map(t,n){let i=this.members.map(r=>r.map(t,n,xi));return e.from(i)}forChild(t,n){if(n.isLeaf)return Ce.empty;let i=[];for(let r=0;r<this.members.length;r++){let o=this.members[r].forChild(t,n);o!=Ot&&(o instanceof e?i=i.concat(o.members):i.push(o))}return e.from(i)}eq(t){if(!(t instanceof e)||t.members.length!=this.members.length)return!1;for(let n=0;n<this.members.length;n++)if(!this.members[n].eq(t.members[n]))return!1;return!0}locals(t){let n,i=!0;for(let r=0;r<this.members.length;r++){let o=this.members[r].localsInner(t);if(o.length)if(!n)n=o;else{i&&(n=n.slice(),i=!1);for(let s=0;s<o.length;s++)n.push(o[s])}}return n?gg(i?n:n.sort(_i)):Co}static from(t){switch(t.length){case 0:return Ot;case 1:return t[0];default:return new e(t.every(n=>n instanceof Ce)?t:t.reduce((n,i)=>n.concat(i instanceof Ce?i:i.members),[]))}}forEachSet(t){for(let n=0;n<this.members.length;n++)this.members[n].forEachSet(t)}};function MB(e,t,n,i,r,o,s){let a=e.slice();for(let u=0,c=o;u<n.maps.length;u++){let d=0;n.maps[u].forEach((f,p,h,m)=>{let g=m-h-(p-f);for(let b=0;b<a.length;b+=3){let v=a[b+1];if(v<0||f>v+c-d)continue;let y=a[b]+c-d;p>=y?a[b+1]=f<=y?-2:-1:f>=c&&g&&(a[b]+=g,a[b+1]+=g)}d+=g}),c=n.maps[u].map(c,-1)}let l=!1;for(let u=0;u<a.length;u+=3)if(a[u+1]<0){if(a[u+1]==-2){l=!0,a[u+1]=-1;continue}let c=n.map(e[u]+o),d=c-r;if(d<0||d>=i.content.size){l=!0;continue}let f=n.map(e[u+1]+o,-1),p=f-r,{index:h,offset:m}=i.content.findIndex(d),g=i.maybeChild(h);if(g&&m==d&&m+g.nodeSize==p){let b=a[u+2].mapInner(n,g,c+1,e[u]+o+1,s);b!=Ot?(a[u]=d,a[u+1]=p,a[u+2]=b):(a[u+1]=-2,l=!0)}else l=!0}if(l){let u=zB(a,e,t,n,r,o,s),c=Uc(u,i,0,s);t=c.local;for(let d=0;d<a.length;d+=3)a[d+1]<0&&(a.splice(d,3),d-=3);for(let d=0,f=0;d<c.children.length;d+=3){let p=c.children[d];for(;f<a.length&&a[f]<p;)f+=3;a.splice(f,0,c.children[d],c.children[d+1],c.children[d+2])}}return new Ce(t.sort(_i),a)}function lA(e,t){if(!t||!e.length)return e;let n=[];for(let i=0;i<e.length;i++){let r=e[i];n.push(new pt(r.from+t,r.to+t,r.type))}return n}function zB(e,t,n,i,r,o,s){function a(l,u){for(let c=0;c<l.local.length;c++){let d=l.local[c].map(i,r,u);d?n.push(d):s.onRemove&&s.onRemove(l.local[c].spec)}for(let c=0;c<l.children.length;c+=3)a(l.children[c+2],l.children[c]+u+1)}for(let l=0;l<e.length;l+=3)e[l+1]==-1&&a(e[l+2],t[l]+o+1);return n}function uA(e,t,n){if(t.isLeaf)return null;let i=n+t.nodeSize,r=null;for(let o=0,s;o<e.length;o++)(s=e[o])&&s.from>n&&s.to<i&&((r||(r=[])).push(s),e[o]=null);return r}function cA(e){let t=[];for(let n=0;n<e.length;n++)e[n]!=null&&t.push(e[n]);return t}function Uc(e,t,n,i){let r=[],o=!1;t.forEach((a,l)=>{let u=uA(e,a,l+n);if(u){o=!0;let c=Uc(u,a,n+l+1,i);c!=Ot&&r.push(l,l+a.nodeSize,c)}});let s=lA(o?cA(e):e,-n).sort(_i);for(let a=0;a<s.length;a++)s[a].type.valid(t,s[a])||(i.onRemove&&i.onRemove(s[a].spec),s.splice(a--,1));return s.length||r.length?new Ce(s,r):Ot}function _i(e,t){return e.from-t.from||e.to-t.to}function gg(e){let t=e;for(let n=0;n<t.length-1;n++){let i=t[n];if(i.from!=i.to)for(let r=n+1;r<t.length;r++){let o=t[r];if(o.from==i.from){o.to!=i.to&&(t==e&&(t=e.slice()),t[r]=o.copy(o.from,i.to),wI(t,r+1,o.copy(i.to,o.to)));continue}else{o.from<i.to&&(t==e&&(t=e.slice()),t[n]=i.copy(i.from,o.from),wI(t,r,i.copy(o.from,i.to)));break}}}return t}function wI(e,t,n){for(;t<e.length&&_i(n,e[t])>0;)t++;e.splice(t,0,n)}function U0(e){let t=[];return e.someProp("decorations",n=>{let i=n(e.state);i&&i!=Ot&&t.push(i)}),e.cursorWrapper&&t.push(Ce.create(e.state.doc,[e.cursorWrapper.deco])),Bc.from(t)}var DB={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},NB=Jt&&Lr<=11,ag=class{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(t){this.anchorNode=t.anchorNode,this.anchorOffset=t.anchorOffset,this.focusNode=t.focusNode,this.focusOffset=t.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(t){return t.anchorNode==this.anchorNode&&t.anchorOffset==this.anchorOffset&&t.focusNode==this.focusNode&&t.focusOffset==this.focusOffset}},lg=class{constructor(t,n){this.view=t,this.handleDOMChange=n,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new ag,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(i=>{for(let r=0;r<i.length;r++)this.queue.push(i[r]);Jt&&Lr<=11&&i.some(r=>r.type=="childList"&&r.removedNodes.length||r.type=="characterData"&&r.oldValue.length>r.target.nodeValue.length)?this.flushSoon():Rt&&t.composing&&i.some(r=>r.type=="childList"&&r.target.nodeName=="TR")?(t.input.badSafariComposition=!0,this.flushSoon()):this.flush()}),NB&&(this.onCharData=i=>{this.queue.push({target:i.target,type:"characterData",oldValue:i.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(()=>{this.flushingSoon=-1,this.flush()},20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,DB)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let t=this.observer.takeRecords();if(t.length){for(let n=0;n<t.length;n++)this.queue.push(t[n]);window.setTimeout(()=>this.flush(),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout(()=>this.suppressingSelectionUpdates=!1,50)}onSelectionChange(){if(gI(this.view)){if(this.suppressingSelectionUpdates)return dr(this.view);if(Jt&&Lr<=11&&!this.view.state.selection.empty){let t=this.view.domSelectionRange();if(t.focusNode&&wi(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(t){if(!t.focusNode)return!0;let n=new Set,i;for(let o=t.focusNode;o;o=To(o))n.add(o);for(let o=t.anchorNode;o;o=To(o))if(n.has(o)){i=o;break}let r=i&&this.view.docView.nearestDesc(i);if(r&&r.ignoreMutation({type:"selection",target:i.nodeType==3?i.parentNode:i}))return this.setCurSelection(),!0}pendingRecords(){if(this.observer)for(let t of this.observer.takeRecords())this.queue.push(t);return this.queue}flush(){let{view:t}=this;if(!t.docView||this.flushingSoon>-1)return;let n=this.pendingRecords();n.length&&(this.queue=[]);let i=t.domSelectionRange(),r=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(i)&&gI(t)&&!this.ignoreSelectionChange(i),o=-1,s=-1,a=!1,l=[];if(t.editable)for(let c=0;c<n.length;c++){let d=this.registerMutation(n[c],l);d&&(o=o<0?d.from:Math.min(d.from,o),s=s<0?d.to:Math.max(d.to,s),d.typeOver&&(a=!0))}if(l.some(c=>c.nodeName=="BR")&&(t.input.lastKeyCode==8||t.input.lastKeyCode==46||Ct&&(t.composing||t.input.compositionEndedAt>Date.now()-50)&&n.some(c=>c.type=="childList"&&c.removedNodes.length))){for(let c of l)if(c.nodeName=="BR"&&c.parentNode){let d=c.nextSibling;for(;d&&d.nodeType==1;){if(d.contentEditable=="false"){c.parentNode.removeChild(c);break}d=d.firstChild}}}else if(gn&&l.length){let c=l.filter(d=>d.nodeName=="BR");if(c.length==2){let[d,f]=c;d.parentNode&&d.parentNode.parentNode==f.parentNode?f.remove():d.remove()}else{let{focusNode:d}=this.currentSelection;for(let f of c){let p=f.parentNode;p&&p.nodeName=="LI"&&(!d||PB(t,d)!=p)&&f.remove()}}}let u=null;o<0&&r&&t.input.lastFocus>Date.now()-200&&Math.max(t.input.lastTouch,t.input.lastClick.time)<Date.now()-300&&jc(i)&&(u=cg(t))&&u.eq(X.near(t.state.doc.resolve(0),1))?(t.input.lastFocus=0,dr(t),this.currentSelection.set(i),t.scrollToSelection()):(o>-1||r)&&(o>-1&&(t.docView.markDirty(o,s),OB(t)),t.input.badSafariComposition&&(t.input.badSafariComposition=!1,LB(t,l)),this.handleDOMChange(o,s,a,l),t.docView&&t.docView.dirty?t.updateState(t.state):this.currentSelection.eq(i)||dr(t),this.currentSelection.set(i))}registerMutation(t,n){if(n.indexOf(t.target)>-1)return null;let i=this.view.docView.nearestDesc(t.target);if(t.type=="attributes"&&(i==this.view.docView||t.attributeName=="contenteditable"||t.attributeName=="style"&&!t.oldValue&&!t.target.getAttribute("style"))||!i||i.ignoreMutation(t))return null;if(t.type=="childList"){for(let c=0;c<t.addedNodes.length;c++){let d=t.addedNodes[c];n.push(d),d.nodeType==3&&(this.lastChangedTextNode=d)}if(i.contentDOM&&i.contentDOM!=i.dom&&!i.contentDOM.contains(t.target))return{from:i.posBefore,to:i.posAfter};let r=t.previousSibling,o=t.nextSibling;if(Jt&&Lr<=11&&t.addedNodes.length)for(let c=0;c<t.addedNodes.length;c++){let{previousSibling:d,nextSibling:f}=t.addedNodes[c];(!d||Array.prototype.indexOf.call(t.addedNodes,d)<0)&&(r=d),(!f||Array.prototype.indexOf.call(t.addedNodes,f)<0)&&(o=f)}let s=r&&r.parentNode==t.target?$t(r)+1:0,a=i.localPosFromDOM(t.target,s,-1),l=o&&o.parentNode==t.target?$t(o):t.target.childNodes.length,u=i.localPosFromDOM(t.target,l,1);return{from:a,to:u}}else return t.type=="attributes"?{from:i.posAtStart-i.border,to:i.posAtEnd+i.border}:(this.lastChangedTextNode=t.target,{from:i.posAtStart,to:i.posAtEnd,typeOver:t.target.nodeValue==t.oldValue})}},SI=new WeakMap,EI=!1;function OB(e){if(!SI.has(e)&&(SI.set(e,null),["normal","nowrap","pre-line"].indexOf(getComputedStyle(e.dom).whiteSpace)!==-1)){if(e.requiresGeckoHackNode=gn,EI)return;console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."),EI=!0}}function $I(e,t){let n=t.startContainer,i=t.startOffset,r=t.endContainer,o=t.endOffset,s=e.domAtPos(e.state.selection.anchor);return wi(s.node,s.offset,r,o)&&([n,i,r,o]=[r,o,n,i]),{anchorNode:n,anchorOffset:i,focusNode:r,focusOffset:o}}function RB(e,t){if(t.getComposedRanges){let r=t.getComposedRanges(e.root)[0];if(r)return $I(e,r)}let n;function i(r){r.preventDefault(),r.stopImmediatePropagation(),n=r.getTargetRanges()[0]}return e.dom.addEventListener("beforeinput",i,!0),document.execCommand("indent"),e.dom.removeEventListener("beforeinput",i,!0),n?$I(e,n):null}function PB(e,t){for(let n=t.parentNode;n&&n!=e.dom;n=n.parentNode){let i=e.docView.nearestDesc(n,!0);if(i&&i.node.isBlock)return n}return null}function LB(e,t){var n;let{focusNode:i,focusOffset:r}=e.domSelectionRange();for(let o of t)if(((n=o.parentNode)===null||n===void 0?void 0:n.nodeName)=="TR"){let s=o.nextSibling;for(;s&&s.nodeName!="TD"&&s.nodeName!="TH";)s=s.nextSibling;if(s){let a=s;for(;;){let l=a.firstChild;if(!l||l.nodeType!=1||l.contentEditable=="false"||/^(BR|IMG)$/.test(l.nodeName))break;a=l}a.insertBefore(o,a.firstChild),i==o&&e.domSelection().collapse(o,r)}else o.parentNode.removeChild(o)}}function FB(e,t,n,i){let{node:r,fromOffset:o,toOffset:s,from:a,to:l}=e.docView.parseRange(t,n),u=e.domSelectionRange(),c,d=u.anchorNode;if(d&&e.dom.contains(d.nodeType==1?d:d.parentNode)&&(c=[{node:d,offset:u.anchorOffset}],jc(u)||c.push({node:u.focusNode,offset:u.focusOffset})),Ct&&e.input.lastKeyCode===8)for(let b=s;b>o;b--){let v=r.childNodes[b-1],y=v.pmViewDesc;if(v.nodeName=="BR"&&!y){s=b;break}if(!y||y.size)break}let f=e.state.doc,p=e.someProp("domParser")||$n.fromSchema(e.state.schema),h=f.resolve(a),m=null,g=p.parse(r,{topNode:h.parent,topMatch:h.parent.contentMatchAt(h.index()),topOpen:!0,from:o,to:s,preserveWhitespace:h.parent.type.whitespace=="pre"?"full":!0,findPositions:c,ruleFromNode:BB(i),context:h});if(c&&c[0].pos!=null){let b=c[0].pos,v=c[1]&&c[1].pos;v==null&&(v=b),m={anchor:b+a,head:v+a}}return{doc:g,sel:m,from:a,to:l}}var BB=e=>t=>{let n=t.pmViewDesc;if(n)return n.parseRule(e);if(t.nodeName=="BR"&&t.parentNode){if(Rt&&/^(ul|ol)$/i.test(t.parentNode.nodeName)){let i=document.createElement("div");return i.appendChild(document.createElement("li")),{skip:i}}else if(t.parentNode.lastChild==t||Rt&&/^(tr|table)$/i.test(t.parentNode.nodeName))return{ignore:!0}}else if(t.nodeName=="IMG"&&t.getAttribute("mark-placeholder"))return{ignore:!0};return null},UB=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|img|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function jB(e,t,n,i,r){let o=e.input.compositionPendingChanges||(e.composing?e.input.compositionID:0);if(e.input.compositionPendingChanges=0,t<0){let D=e.input.lastSelectionTime>Date.now()-50?e.input.lastSelectionOrigin:null,M=cg(e,D);if(M&&!e.state.selection.eq(M)){if(Ct&&ur&&e.input.lastKeyCode===13&&Date.now()-100<e.input.lastKeyCodeTime&&e.someProp("handleKeyDown",me=>me(e,gi(13,"Enter"))))return;let V=e.state.tr.setSelection(M);D=="pointer"?V.setMeta("pointer",!0):D=="key"&&V.scrollIntoView(),o&&V.setMeta("composition",o),e.dispatch(V)}return}let s=e.state.doc.resolve(t),a=s.sharedDepth(n);t=s.before(a+1),n=e.state.doc.resolve(n).after(a+1);let l=e.state.selection,u=FB(e,t,n,r),c=e.state.doc,d=c.slice(u.from,u.to),f,p;e.input.lastKeyCode===8&&Date.now()-100<e.input.lastKeyCodeTime?(f=e.state.selection.to,p="end"):(f=e.state.selection.from,p="start"),e.input.lastKeyCode=null;let h=qB(d.content,u.doc.content,u.from,f,p);if(h&&e.input.domChangeCount++,(Io&&e.input.lastIOSEnter>Date.now()-225||ur)&&r.some(D=>D.nodeType==1&&!UB.test(D.nodeName))&&(!h||h.endA>=h.endB)&&e.someProp("handleKeyDown",D=>D(e,gi(13,"Enter")))){e.input.lastIOSEnter=0;return}if(!h)if(i&&l instanceof q&&!l.empty&&l.$head.sameParent(l.$anchor)&&!e.composing&&!(u.sel&&u.sel.anchor!=u.sel.head))h={start:l.from,endA:l.to,endB:l.to};else{if(u.sel){let D=CI(e,e.state.doc,u.sel);if(D&&!D.eq(e.state.selection)){let M=e.state.tr.setSelection(D);o&&M.setMeta("composition",o),e.dispatch(M)}}return}e.state.selection.from<e.state.selection.to&&h.start==h.endB&&e.state.selection instanceof q&&(h.start>e.state.selection.from&&h.start<=e.state.selection.from+2&&e.state.selection.from>=u.from?h.start=e.state.selection.from:h.endA<e.state.selection.to&&h.endA>=e.state.selection.to-2&&e.state.selection.to<=u.to&&(h.endB+=e.state.selection.to-h.endA,h.endA=e.state.selection.to)),Jt&&Lr<=11&&h.endB==h.start+1&&h.endA==h.start&&h.start>u.from&&u.doc.textBetween(h.start-u.from-1,h.start-u.from+1)==" \xA0"&&(h.start--,h.endA--,h.endB--);let m=u.doc.resolveNoCache(h.start-u.from),g=u.doc.resolveNoCache(h.endB-u.from),b=c.resolve(h.start),v=m.sameParent(g)&&m.parent.inlineContent&&b.end()>=h.endA;if((Io&&e.input.lastIOSEnter>Date.now()-225&&(!v||r.some(D=>D.nodeName=="DIV"||D.nodeName=="P"))||!v&&m.pos<u.doc.content.size&&(!m.sameParent(g)||!m.parent.inlineContent)&&m.pos<g.pos&&!/\S/.test(u.doc.textBetween(m.pos,g.pos,"","")))&&e.someProp("handleKeyDown",D=>D(e,gi(13,"Enter")))){e.input.lastIOSEnter=0;return}if(e.state.selection.anchor>h.start&&HB(c,h.start,h.endA,m,g)&&e.someProp("handleKeyDown",D=>D(e,gi(8,"Backspace")))){ur&&Ct&&e.domObserver.suppressSelectionUpdates();return}Ct&&h.endB==h.start&&(e.input.lastChromeDelete=Date.now()),ur&&!v&&m.start()!=g.start()&&g.parentOffset==0&&m.depth==g.depth&&u.sel&&u.sel.anchor==u.sel.head&&u.sel.head==h.endA&&(h.endB-=2,g=u.doc.resolveNoCache(h.endB-u.from),setTimeout(()=>{e.someProp("handleKeyDown",function(D){return D(e,gi(13,"Enter"))})},20));let y=h.start,x=h.endA,C=D=>{let M=D||e.state.tr.replace(y,x,u.doc.slice(h.start-u.from,h.endB-u.from));if(u.sel){let V=CI(e,M.doc,u.sel);V&&!(Ct&&e.composing&&V.empty&&(h.start!=h.endB||e.input.lastChromeDelete<Date.now()-100)&&(V.head==y||V.head==M.mapping.map(x)-1)||Jt&&V.empty&&V.head==y)&&M.setSelection(V)}return o&&M.setMeta("composition",o),M.scrollIntoView()},A;if(v)if(m.pos==g.pos){Jt&&Lr<=11&&m.parentOffset==0&&(e.domObserver.suppressSelectionUpdates(),setTimeout(()=>dr(e),20));let D=C(e.state.tr.delete(y,x)),M=c.resolve(h.start).marksAcross(c.resolve(h.endA));M&&D.ensureMarks(M),e.dispatch(D)}else if(h.endA==h.endB&&(A=ZB(m.parent.content.cut(m.parentOffset,g.parentOffset),b.parent.content.cut(b.parentOffset,h.endA-b.start())))){let D=C(e.state.tr);A.type=="add"?D.addMark(y,x,A.mark):D.removeMark(y,x,A.mark),e.dispatch(D)}else if(m.parent.child(m.index()).isText&&m.index()==g.index()-(g.textOffset?0:1)){let D=m.parent.textBetween(m.parentOffset,g.parentOffset),M=()=>C(e.state.tr.insertText(D,y,x));e.someProp("handleTextInput",V=>V(e,y,x,D,M))||e.dispatch(M())}else e.dispatch(C());else e.dispatch(C())}function CI(e,t,n){return Math.max(n.anchor,n.head)>t.content.size?null:dg(e,t.resolve(n.anchor),t.resolve(n.head))}function ZB(e,t){let n=e.firstChild.marks,i=t.firstChild.marks,r=n,o=i,s,a,l;for(let c=0;c<i.length;c++)r=i[c].removeFromSet(r);for(let c=0;c<n.length;c++)o=n[c].removeFromSet(o);if(r.length==1&&o.length==0)a=r[0],s="add",l=c=>c.mark(a.addToSet(c.marks));else if(r.length==0&&o.length==1)a=o[0],s="remove",l=c=>c.mark(a.removeFromSet(c.marks));else return null;let u=[];for(let c=0;c<t.childCount;c++)u.push(l(t.child(c)));if(z.from(u).eq(e))return{mark:a,type:s}}function HB(e,t,n,i,r){if(n-t<=r.pos-i.pos||j0(i,!0,!1)<r.pos)return!1;let o=e.resolve(t);if(!i.parent.isTextblock){let a=o.nodeAfter;return a!=null&&n==t+a.nodeSize}if(o.parentOffset<o.parent.content.size||!o.parent.isTextblock)return!1;let s=e.resolve(j0(o,!0,!0));return!s.parent.isTextblock||s.pos>n||j0(s,!0,!1)<n?!1:i.parent.content.cut(i.parentOffset).eq(s.parent.content)}function j0(e,t,n){let i=e.depth,r=t?e.end():e.pos;for(;i>0&&(t||e.indexAfter(i)==e.node(i).childCount);)i--,r++,t=!1;if(n){let o=e.node(i).maybeChild(e.indexAfter(i));for(;o&&!o.isLeaf;)o=o.firstChild,r++}return r}function qB(e,t,n,i,r){let o=e.findDiffStart(t,n),s=n+e.size,a=n+t.size;if(o==null)return null;let{a:l,b:u}=e.findDiffEnd(t,s,a);if(r=="end"){let c=Math.max(0,o-Math.min(l,u));i-=l+c-o}if(l<o&&s<a){let c=i<=o&&i>=l?o-i:0;o-=c,u=o+(u-l),l=o}else if(u<o){let c=i<=o&&i>=u?o-i:0;o-=c,l=o+(l-u),u=o}return{start:o,endA:l,endB:u}}var Ma=class{constructor(t,n){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new ng,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=n,this.state=n.state,this.directPlugins=n.plugins||[],this.directPlugins.forEach(zI),this.dispatch=this.dispatch.bind(this),this.dom=t&&t.mount||document.createElement("div"),t&&(t.appendChild?t.appendChild(this.dom):typeof t=="function"?t(this.dom):t.mount&&(this.mounted=!0)),this.editable=AI(this),II(this),this.nodeViews=MI(this),this.docView=cI(this.state.doc,TI(this),U0(this),this.dom,this),this.domObserver=new lg(this,(i,r,o,s)=>jB(this,i,r,o,s)),this.domObserver.start(),fB(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let t=this._props;this._props={};for(let n in t)this._props[n]=t[n];this._props.state=this.state}return this._props}update(t){t.handleDOMEvents!=this._props.handleDOMEvents&&rg(this);let n=this._props;this._props=t,t.plugins&&(t.plugins.forEach(zI),this.directPlugins=t.plugins),this.updateStateInner(t.state,n)}setProps(t){let n={};for(let i in this._props)n[i]=this._props[i];n.state=this.state;for(let i in t)n[i]=t[i];this.update(n)}updateState(t){this.updateStateInner(t,this._props)}updateStateInner(t,n){var i;let r=this.state,o=!1,s=!1;t.storedMarks&&this.composing&&(oA(this),s=!0),this.state=t;let a=r.plugins!=t.plugins||this._props.plugins!=n.plugins;if(a||this._props.plugins!=n.plugins||this._props.nodeViews!=n.nodeViews){let p=MI(this);VB(p,this.nodeViews)&&(this.nodeViews=p,o=!0)}(a||n.handleDOMEvents!=this._props.handleDOMEvents)&&rg(this),this.editable=AI(this),II(this);let l=U0(this),u=TI(this),c=r.plugins!=t.plugins&&!r.doc.eq(t.doc)?"reset":t.scrollToSelection>r.scrollToSelection?"to selection":"preserve",d=o||!this.docView.matchesNode(t.doc,u,l);(d||!t.selection.eq(r.selection))&&(s=!0);let f=c=="preserve"&&s&&this.dom.style.overflowAnchor==null&&AF(this);if(s){this.domObserver.stop();let p=d&&(Jt||Ct)&&!this.composing&&!r.selection.empty&&!t.selection.empty&&WB(r.selection,t.selection);if(d){let m=Ct?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=EB(this)),(o||!this.docView.update(t.doc,u,l,this))&&(this.docView.updateOuterDeco(u),this.docView.destroy(),this.docView=cI(t.doc,u,l,this.dom,this)),m&&(!this.trackWrites||!this.dom.contains(this.trackWrites))&&(p=!0)}let h=this.input.mouseDown;p||!(h&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&XF(this)&&h.delaySelUpdate())?dr(this,p):(WI(this,t.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(r),!((i=this.dragging)===null||i===void 0)&&i.node&&!r.doc.eq(t.doc)&&this.updateDraggedNode(this.dragging,r),c=="reset"?this.dom.scrollTop=0:c=="to selection"?this.scrollToSelection():f&&MF(f)}scrollToSelection(){let t=this.domSelectionRange().focusNode;if(!(!t||!this.dom.contains(t.nodeType==1?t:t.parentNode))){if(!this.someProp("handleScrollToSelection",n=>n(this)))if(this.state.selection instanceof G){let n=this.docView.domAfterPos(this.state.selection.from);n.nodeType==1&&oI(this,n.getBoundingClientRect(),t)}else oI(this,this.coordsAtPos(this.state.selection.head,1),t)}}destroyPluginViews(){let t;for(;t=this.pluginViews.pop();)t.destroy&&t.destroy()}updatePluginViews(t){if(!t||t.plugins!=this.state.plugins||this.directPlugins!=this.prevDirectPlugins){this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let n=0;n<this.directPlugins.length;n++){let i=this.directPlugins[n];i.spec.view&&this.pluginViews.push(i.spec.view(this))}for(let n=0;n<this.state.plugins.length;n++){let i=this.state.plugins[n];i.spec.view&&this.pluginViews.push(i.spec.view(this))}}else for(let n=0;n<this.pluginViews.length;n++){let i=this.pluginViews[n];i.update&&i.update(this,t)}}updateDraggedNode(t,n){let i=t.node,r=-1;if(i.from<this.state.doc.content.size&&this.state.doc.nodeAt(i.from)==i.node)r=i.from;else{let o=i.from+(this.state.doc.content.size-n.doc.content.size);(o>0&&o<this.state.doc.content.size&&this.state.doc.nodeAt(o))==i.node&&(r=o)}this.dragging=new Lc(t.slice,t.move,r<0?void 0:G.create(this.state.doc,r))}someProp(t,n){let i=this._props&&this._props[t],r;if(i!=null&&(r=n?n(i):i))return r;for(let s=0;s<this.directPlugins.length;s++){let a=this.directPlugins[s].props[t];if(a!=null&&(r=n?n(a):a))return r}let o=this.state.plugins;if(o)for(let s=0;s<o.length;s++){let a=o[s].props[t];if(a!=null&&(r=n?n(a):a))return r}}hasFocus(){if(Jt){let t=this.root.activeElement;if(t==this.dom)return!0;if(!t||!this.dom.contains(t))return!1;for(;t&&this.dom!=t&&this.dom.contains(t);){if(t.contentEditable=="false")return!1;t=t.parentElement}return!0}return this.root.activeElement==this.dom}focus(){this.domObserver.stop(),this.editable&&zF(this.dom),dr(this),this.domObserver.start()}get root(){let t=this._root;if(t==null){for(let n=this.dom.parentNode;n;n=n.parentNode)if(n.nodeType==9||n.nodeType==11&&n.host)return n.getSelection||(Object.getPrototypeOf(n).getSelection=()=>n.ownerDocument.getSelection()),this._root=n}return t||document}updateRoot(){this._root=null}posAtCoords(t){return PF(this,t)}coordsAtPos(t,n=1){return BI(this,t,n)}domAtPos(t,n=0){return this.docView.domFromPos(t,n)}nodeDOM(t){let n=this.docView.descAt(t);return n?n.nodeDOM:null}posAtDOM(t,n,i=-1){let r=this.docView.posFromDOM(t,n,i);if(r==null)throw new RangeError("DOM position not inside the editor");return r}endOfTextblock(t,n){return jF(this,n||this.state,t)}pasteHTML(t,n){return Ia(this,"",t,!1,n||new ClipboardEvent("paste"))}pasteText(t,n){return Ia(this,t,null,!0,n||new ClipboardEvent("paste"))}serializeForClipboard(t){return fg(this,t)}destroy(){this.docView&&(pB(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],U0(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,kF())}get isDestroyed(){return this.docView==null}dispatchEvent(t){return mB(this,t)}domSelectionRange(){let t=this.domSelection();return t?Rt&&this.root.nodeType===11&&EF(this.dom.ownerDocument)==this.dom&&RB(this,t)||t:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}};Ma.prototype.dispatch=function(e){let t=this._props.dispatchTransaction;t?t.call(this,e):this.updateState(this.state.apply(e))};function TI(e){let t=Object.create(null);return t.class="ProseMirror",t.contenteditable=String(e.editable),e.someProp("attributes",n=>{if(typeof n=="function"&&(n=n(e.state)),n)for(let i in n)i=="class"?t.class+=" "+n[i]:i=="style"?t.style=(t.style?t.style+";":"")+n[i]:!t[i]&&i!="contenteditable"&&i!="nodeName"&&(t[i]=String(n[i]))}),t.translate||(t.translate="no"),[pt.node(0,e.state.doc.content.size,t)]}function II(e){if(e.markCursor){let t=document.createElement("img");t.className="ProseMirror-separator",t.setAttribute("mark-placeholder","true"),t.setAttribute("alt",""),e.cursorWrapper={dom:t,deco:pt.widget(e.state.selection.from,t,{raw:!0,marks:e.markCursor})}}else e.cursorWrapper=null}function AI(e){return!e.someProp("editable",t=>t(e.state)===!1)}function WB(e,t){let n=Math.min(e.$anchor.sharedDepth(e.head),t.$anchor.sharedDepth(t.head));return e.$anchor.start(n)!=t.$anchor.start(n)}function MI(e){let t=Object.create(null);function n(i){for(let r in i)Object.prototype.hasOwnProperty.call(t,r)||(t[r]=i[r])}return e.someProp("nodeViews",n),e.someProp("markViews",n),t}function VB(e,t){let n=0,i=0;for(let r in e){if(e[r]!=t[r])return!0;n++}for(let r in t)i++;return n!=i}function zI(e){if(e.spec.state||e.spec.filterTransaction||e.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}var fr={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},Hc={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},KB=typeof navigator<"u"&&/Mac/.test(navigator.platform),JB=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(lt=0;lt<10;lt++)fr[48+lt]=fr[96+lt]=String(lt);var lt;for(lt=1;lt<=24;lt++)fr[lt+111]="F"+lt;var lt;for(lt=65;lt<=90;lt++)fr[lt]=String.fromCharCode(lt+32),Hc[lt]=String.fromCharCode(lt);var lt;for(Zc in fr)Hc.hasOwnProperty(Zc)||(Hc[Zc]=fr[Zc]);var Zc;function dA(e){var t=KB&&e.metaKey&&e.shiftKey&&!e.ctrlKey&&!e.altKey||JB&&e.shiftKey&&e.key&&e.key.length==1||e.key=="Unidentified",n=!t&&e.key||(e.shiftKey?Hc:fr)[e.keyCode]||e.key||"Unidentified";return n=="Esc"&&(n="Escape"),n=="Del"&&(n="Delete"),n=="Left"&&(n="ArrowLeft"),n=="Up"&&(n="ArrowUp"),n=="Right"&&(n="ArrowRight"),n=="Down"&&(n="ArrowDown"),n}var GB=typeof navigator<"u"&&/Mac|iP(hone|[oa]d)/.test(navigator.platform),XB=typeof navigator<"u"&&/Win/.test(navigator.platform);function YB(e){let t=e.split(/-(?!$)/),n=t[t.length-1];n=="Space"&&(n=" ");let i,r,o,s;for(let a=0;a<t.length-1;a++){let l=t[a];if(/^(cmd|meta|m)$/i.test(l))s=!0;else if(/^a(lt)?$/i.test(l))i=!0;else if(/^(c|ctrl|control)$/i.test(l))r=!0;else if(/^s(hift)?$/i.test(l))o=!0;else if(/^mod$/i.test(l))GB?s=!0:r=!0;else throw new Error("Unrecognized modifier name: "+l)}return i&&(n="Alt-"+n),r&&(n="Ctrl-"+n),s&&(n="Meta-"+n),o&&(n="Shift-"+n),n}function QB(e){let t=Object.create(null);for(let n in e)t[YB(n)]=e[n];return t}function bg(e,t,n=!0){return t.altKey&&(e="Alt-"+e),t.ctrlKey&&(e="Ctrl-"+e),t.metaKey&&(e="Meta-"+e),n&&t.shiftKey&&(e="Shift-"+e),e}function fA(e){return new de({props:{handleKeyDown:Ra(e)}})}function Ra(e){let t=QB(e);return function(n,i){let r=dA(i),o,s=t[bg(r,i)];if(s&&s(n.state,n.dispatch,n))return!0;if(r.length==1&&r!=" "){if(i.shiftKey){let a=t[bg(r,i,!1)];if(a&&a(n.state,n.dispatch,n))return!0}if((i.altKey||i.metaKey||i.ctrlKey)&&!(XB&&i.ctrlKey&&i.altKey)&&(o=fr[i.keyCode])&&o!=r){let a=t[bg(o,i)];if(a&&a(n.state,n.dispatch,n))return!0}}return!1}}function Yc(e){let{state:t,transaction:n}=e,{selection:i}=n,{doc:r}=n,{storedMarks:o}=n;return{...t,apply:t.apply.bind(t),applyTransaction:t.applyTransaction.bind(t),plugins:t.plugins,schema:t.schema,reconfigure:t.reconfigure.bind(t),toJSON:t.toJSON.bind(t),get storedMarks(){return o},get selection(){return i},get doc(){return r},get tr(){return i=n.selection,r=n.doc,o=n.storedMarks,n}}}var Do=class IA{constructor(t){this.editor=t.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=t.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){let{rawCommands:t,editor:n,state:i}=this,{view:r}=n,{tr:o}=i,s=this.buildProps(o);return Object.fromEntries(Object.entries(t).map(([a,l])=>[a,(...c)=>{let d=l(...c)(s);return!o.getMeta("preventDispatch")&&!this.hasCustomState&&r.dispatch(o),d}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(t,n=!0){let{rawCommands:i,editor:r,state:o}=this,{view:s}=r,a=[],l=!!t,u=t||o.tr,c=()=>(!l&&n&&!u.getMeta("preventDispatch")&&!this.hasCustomState&&s.dispatch(u),a.every(f=>f===!0)),d={...Object.fromEntries(Object.entries(i).map(([f,p])=>[f,(...m)=>{let g=this.buildProps(u,n),b=p(...m)(g);return a.push(b),d}])),run:c};return d}static createFakeChain(){let t=new Proxy({},{get:(n,i)=>{if(i!=="then")return i==="run"?()=>!1:()=>t}});return t}createCan(t){let{rawCommands:n,state:i}=this,r=!1,o=t||i.tr,s=this.buildProps(o,r);return{...Object.fromEntries(Object.entries(n).map(([a,l])=>[a,(...u)=>l(...u)({...s,dispatch:void 0})])),chain:()=>this.createChain(o,r)}}static createFallbackCan(){let t=IA.createFakeChain();return new Proxy({chain:()=>t},{get:(n,i)=>{if(i!=="then")return i==="chain"?n.chain:()=>!1}})}buildProps(t,n=!0){let{rawCommands:i,editor:r,state:o}=this,{view:s}=r,a={tr:t,editor:r,view:s,state:Yc({state:o,transaction:t}),dispatch:n?()=>{}:void 0,chain:()=>this.createChain(t,n),can:()=>this.createCan(t),get commands(){return Object.fromEntries(Object.entries(i).map(([l,u])=>[l,(...c)=>u(...c)(a)]))}};return a}},eU=()=>({editor:e,view:t})=>(requestAnimationFrame(()=>{if(!e.isDestroyed){var n;t.dom.blur(),(n=window)===null||n===void 0||(n=n.getSelection())===null||n===void 0||n.removeAllRanges()}}),!0),tU=(e=!0)=>({commands:t})=>t.setContent("",{emitUpdate:e}),nU=()=>({state:e,tr:t,dispatch:n})=>{let{selection:i}=t,{ranges:r}=i;return n&&r.forEach(({$from:o,$to:s})=>{e.doc.nodesBetween(o.pos,s.pos,(a,l)=>{if(a.type.isText)return;let{doc:u,mapping:c}=t,d=u.resolve(c.map(l)),f=u.resolve(c.map(l+a.nodeSize)),p=d.blockRange(f);if(!p)return;let h=sr(p);if(a.type.isTextblock){let{defaultType:m}=d.parent.contentMatchAt(d.index());t.setNodeMarkup(p.start,m)}(h||h===0)&&t.lift(p,h)})}),!0},rU=e=>t=>e(t),iU=()=>({state:e,dispatch:t})=>D0(e,t),oU=(e,t)=>({editor:n,tr:i})=>{let{state:r}=n,o=r.doc.slice(e.from,e.to);i.deleteRange(e.from,e.to);let s=i.mapping.map(t);return i.insert(s,o.content),i.setSelection(new q(i.doc.resolve(Math.max(s-1,0)))),!0},sU=()=>({tr:e,dispatch:t})=>{let{selection:n}=e,i=n.$anchor.node();if(i.content.size>0)return!1;let r=e.selection.$anchor;for(let o=r.depth;o>0;o-=1)if(r.node(o).type===i.type){if(t){let s=r.before(o),a=r.after(o);e.delete(s,a).scrollIntoView()}return!0}return!1};function ut(e,t){if(typeof e=="string"){if(!t.nodes[e])throw Error(`There is no node type named '${e}'. Maybe you forgot to add the extension?`);return t.nodes[e]}return e}var aU=e=>({tr:t,state:n,dispatch:i})=>{let r=ut(e,n.schema),o=t.selection.$anchor;for(let s=o.depth;s>0;s-=1)if(o.node(s).type===r){if(i){let a=o.before(s),l=o.after(s);t.delete(a,l).scrollIntoView()}return!0}return!1},lU=e=>({tr:t,dispatch:n})=>{let{from:i,to:r}=e;return n&&t.delete(i,r),!0},uU=e=>e.content?/^text(\*|\+)/.test(e.content):!1,pA=(e,t,n)=>{if(!e.parent.isInline||n==="left"&&e.pos>e.start()||n==="right"&&e.pos<e.end())return e.pos;let i=t.nodes[e.parent.type.name].spec;return uU(i)?n==="left"?e.start()-1:e.end()+1:e.pos},cU=(e,t,n)=>({from:pA(e,n,"left"),to:pA(t,n,"right")}),dU=()=>({state:e,dispatch:t})=>{if(e.selection.empty)return!1;if(t){let n=e.tr,{ranges:i}=e.selection,r=n.steps.length;i.forEach(o=>{let s=n.mapping.slice(r),a=n.doc.resolve(s.map(o.$from.pos)),l=n.doc.resolve(s.map(o.$to.pos)),{from:u,to:c}=cU(a,l,e.schema);n.deleteRange(u,c)}),n.selection.empty||n.setSelection(q.near(n.doc.resolve(n.selection.from))),n.scrollIntoView(),t(n)}return!0},fU=()=>({commands:e})=>e.keyboardShortcut("Enter"),pU=()=>({state:e,dispatch:t})=>z0(e,t);function Sg(e){return Object.prototype.toString.call(e)==="[object RegExp]"}function Gc(e,t,n={strict:!0}){let i=Object.keys(t);return i.length?i.every(r=>n.strict?t[r]===e[r]:Sg(t[r])?t[r].test(e[r]):t[r]===e[r]):!0}function AA(e,t,n={}){return e.find(i=>i.type===t&&Gc(Object.fromEntries(Object.keys(n).map(r=>[r,i.attrs[r]])),n))}function hA(e,t,n={}){return!!AA(e,t,n)}function Eg(e,t,n){if(!e||!t)return;let i=e.parent.childAfter(e.parentOffset);if((!i.node||!i.node.marks.some(l=>l.type===t))&&(i=e.parent.childBefore(e.parentOffset)),!i.node||!i.node.marks.some(l=>l.type===t))return;if(!n){let l=i.node.marks.find(u=>u.type===t);l&&(n=l.attrs)}if(!AA([...i.node.marks],t,n))return;let r=i.index,o=e.start()+i.offset,s=r+1,a=o+i.node.nodeSize;for(;r>0&&hA([...e.parent.child(r-1).marks],t,n);)r-=1,o-=e.parent.child(r).nodeSize;for(;s<e.parent.childCount&&hA([...e.parent.child(s).marks],t,n);)a+=e.parent.child(s).nodeSize,s+=1;return{from:o,to:a}}function pr(e,t){if(typeof e=="string"){if(!t.marks[e])throw Error(`There is no mark type named '${e}'. Maybe you forgot to add the extension?`);return t.marks[e]}return e}var hU=(e,t)=>({tr:n,state:i,dispatch:r})=>{let o=pr(e,i.schema),{doc:s,selection:a}=n,{$from:l,from:u,to:c}=a;if(r){let d=Eg(l,o,t);if(d&&d.from<=u&&d.to>=c){let f=q.create(s,d.from,d.to);n.setSelection(f)}}return!0},mU=e=>t=>{let n=typeof e=="function"?e(t):e;for(let i=0;i<n.length;i+=1)if(n[i](t))return!0;return!1};function MA(e){return e instanceof q}function Ei(e=0,t=0,n=0){return Math.min(Math.max(e,t),n)}function xg(e,t=null){if(!t)return null;let n=X.atStart(e),i=X.atEnd(e);if(t==="start"||t===!0)return n;if(t==="end")return i;let r=n.from,o=i.to;return t==="all"?q.create(e,Ei(0,r,o),Ei(e.content.size,r,o)):q.create(e,Ei(t,r,o),Ei(t,r,o))}function mA(){return["Android"].includes(navigator.platform)||/android/i.test(navigator.userAgent)}function Xc(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}function gU(){return typeof navigator<"u"?/^((?!chrome|android).)*safari/i.test(navigator.userAgent):!1}var bU=(e=null,t={})=>({editor:n,view:i,tr:r,dispatch:o})=>{t={scrollIntoView:!0,...t};let s=()=>{(Xc()||mA())&&i.dom.focus(),gU()&&!Xc()&&!mA()&&i.dom.focus({preventScroll:!0}),requestAnimationFrame(()=>{n.isDestroyed||(i.focus(),t?.scrollIntoView&&n.commands.scrollIntoView())})};try{if(i.hasFocus()&&e===null||e===!1)return!0}catch{return!1}if(o&&e===null&&!MA(n.state.selection))return s(),!0;let a=xg(r.doc,e)||n.state.selection,l=n.state.selection.eq(a);return o&&(l||r.setSelection(a),l&&r.storedMarks&&r.setStoredMarks(r.storedMarks),s()),!0},vU=(e,t)=>n=>e.every((i,r)=>t(i,{...n,index:r})),yU=(e,t)=>({tr:n,commands:i})=>i.insertContentAt({from:n.selection.from,to:n.selection.to},e,t),zA=e=>{let t=e.childNodes;for(let n=t.length-1;n>=0;n-=1){let i=t[n];i.nodeType===3&&i.nodeValue&&/^(\n\s\s|\n)$/.test(i.nodeValue)?e.removeChild(i):i.nodeType===1&&zA(i)}return e};function qc(e){if(typeof window>"u")throw new Error("[tiptap error]: there is no window object available, so this function cannot be used");let t=`<body>${e}</body>`,n=new window.DOMParser().parseFromString(t,"text/html").body;return zA(n)}function DA(e){return typeof e?.nodesBetween=="function"}function No(e,t,n){if(DA(e))return e;let i=typeof e=="object"&&e!==null;n={slice:!0,parseOptions:{},...n};let r=typeof e=="string";if(i)try{if(Array.isArray(e)&&e.length>0)return z.fromArray(e.map(s=>t.nodeFromJSON(s)));let o=t.nodeFromJSON(e);return n.errorOnInvalidContent&&o.check(),o}catch(o){if(n.errorOnInvalidContent)throw new Error("[tiptap error]: Invalid JSON content",{cause:o});return console.warn("[tiptap warn]: Invalid content.","Passed value:",e,"Error:",o),No("",t,n)}if(r){if(n.errorOnInvalidContent){let s=!1,a="",l=new hi({topNode:t.spec.topNode,marks:t.spec.marks,nodes:t.spec.nodes.append({__tiptap__private__unknown__catch__all__node:{content:"inline*",group:"block",parseDOM:[{tag:"*",getAttrs:u=>(s=!0,a=typeof u=="string"?u:u.outerHTML,null)}]}})});if(n.slice?$n.fromSchema(l).parseSlice(qc(e),n.parseOptions):$n.fromSchema(l).parse(qc(e),n.parseOptions),n.errorOnInvalidContent&&s)throw new Error("[tiptap error]: Invalid HTML content",{cause:new Error(`Invalid element found: ${a}`)})}let o=$n.fromSchema(t);return n.slice?o.parseSlice(qc(e),n.parseOptions).content:o.parse(qc(e),n.parseOptions)}return No("",t,n)}function NA(e){return!("type"in e)}function OA(e,t,n){let i=e.steps.length-1;if(i<t)return;let r=e.steps[i];if(!(r instanceof gt||r instanceof at))return;let o=e.mapping.maps[i],s=0;o.forEach((a,l,u,c)=>{s===0&&(s=c)}),e.setSelection(X.near(e.doc.resolve(s),n))}var kU=(e,t,n)=>({tr:i,dispatch:r,editor:o})=>{if(r){n={parseOptions:o.options.parseOptions,updateSelection:!0,applyInputRules:!1,applyPasteRules:!1,...n};let a,l=g=>{o.emit("contentError",{editor:o,error:g,disableCollaboration:()=>{"collaboration"in o.storage&&typeof o.storage.collaboration=="object"&&o.storage.collaboration&&(o.storage.collaboration.isDisabled=!0)}})},u={preserveWhitespace:"full",...n.parseOptions};if(!n.errorOnInvalidContent&&!o.options.enableContentCheck&&o.options.emitContentError)try{No(t,o.schema,{parseOptions:u,errorOnInvalidContent:!0})}catch(g){l(g)}try{var s;a=No(t,o.schema,{parseOptions:u,errorOnInvalidContent:(s=n.errorOnInvalidContent)!==null&&s!==void 0?s:o.options.enableContentCheck})}catch(g){return l(g),!1}let{from:c,to:d}=typeof e=="number"?{from:e,to:e}:{from:e.from,to:e.to},f=!0,p=!0,h=NA(a)?a.content:[a];if(h.forEach(g=>{g.check(),f=f?g.isText&&g.marks.length===0:!1,p=p?g.isBlock:!1}),c===d&&p){let{parent:g}=i.doc.resolve(c);g.isTextblock&&!g.type.spec.code&&!g.childCount&&(c-=1,d+=1)}let m;if(f)Array.isArray(t)?m=t.map(g=>g.text||"").join(""):DA(t)?m=h.map(g=>{var b;return(b=g.text)!==null&&b!==void 0?b:""}).join(""):typeof t=="object"&&t&&t.text?m=t.text:m=t,i.insertText(m,c,d);else{m=z.from(h);let g=i.doc.resolve(c),b=g.node(),v=g.parentOffset===0,y=b.isText||b.isTextblock,x=b.content.size>0;v&&y&&x&&p&&(c=Math.max(0,c-1)),i.replaceWith(c,d,h)}n.updateSelection&&OA(i,i.steps.length-1,-1),n.applyInputRules&&i.setMeta("applyInputRules",{from:c,text:m}),n.applyPasteRules&&i.setMeta("applyPasteRules",{from:c,text:m})}return!0};function RA(e){for(let t=0;t<e.edgeCount;t+=1){let{type:n}=e.edge(t);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}var xU=(e={})=>({tr:t,dispatch:n,editor:i})=>{let{pos:r,attrs:o,content:s,updateSelection:a=!0}=e,l;typeof r=="number"?l=t.doc.resolve(r):r?l=r:l=t.selection.$from;let u=RA(l.parent.contentMatchAt(l.index()));if(!u)return!1;let c=Object.keys(u.spec.attrs||{}),d=o?Object.fromEntries(Object.entries(o).filter(([p])=>c.includes(p))):{},f;if(s){let p=No(s,i.schema);f=u.createAndFill(d,p)}else f=u.createAndFill(d);return f?(n&&(t.insert(l.pos,f),a&&OA(t,t.steps.length-1,-1)),!0):!1},_U=()=>({state:e,dispatch:t})=>VT(e,t),wU=()=>({state:e,dispatch:t})=>KT(e,t),SU=()=>({state:e,dispatch:t})=>S0(e,t),EU=()=>({state:e,dispatch:t})=>C0(e,t),$U=()=>({state:e,dispatch:t,tr:n})=>{try{let i=xo(e.doc,e.selection.$from.pos,-1);return i==null?!1:(n.join(i,2),t&&t(n),!0)}catch{return!1}},CU=()=>({state:e,dispatch:t,tr:n})=>{try{let i=xo(e.doc,e.selection.$from.pos,1);return i==null?!1:(n.join(i,2),t&&t(n),!0)}catch{return!1}},TU=()=>({state:e,dispatch:t})=>ZT(e,t),IU=()=>({state:e,dispatch:t})=>HT(e,t);function PA(){return typeof navigator<"u"?/Mac/.test(navigator.platform):!1}function AU(e){let t=e.split(/-(?!$)/),n=t[t.length-1];n==="Space"&&(n=" ");let i,r,o,s;for(let a=0;a<t.length-1;a+=1){let l=t[a];if(/^(cmd|meta|m)$/i.test(l))s=!0;else if(/^a(lt)?$/i.test(l))i=!0;else if(/^(c|ctrl|control)$/i.test(l))r=!0;else if(/^s(hift)?$/i.test(l))o=!0;else if(/^mod$/i.test(l))Xc()||PA()?s=!0:r=!0;else throw new Error(`Unrecognized modifier name: ${l}`)}return i&&(n=`Alt-${n}`),r&&(n=`Ctrl-${n}`),s&&(n=`Meta-${n}`),o&&(n=`Shift-${n}`),n}var MU=e=>({editor:t,view:n,tr:i,dispatch:r})=>{let o=AU(e).split(/-(?!$)/),s=o.find(u=>!["Alt","Ctrl","Meta","Shift"].includes(u)),a=new KeyboardEvent("keydown",{key:s==="Space"?" ":s,altKey:o.includes("Alt"),ctrlKey:o.includes("Ctrl"),metaKey:o.includes("Meta"),shiftKey:o.includes("Shift"),bubbles:!0,cancelable:!0}),l=t.captureTransaction(()=>{n.someProp("handleKeyDown",u=>u(n,a))});return l?.steps.forEach(u=>{let c=u.map(i.mapping);c&&r&&i.maybeStep(c)}),!0};function Bn(e,t,n={}){let{from:i,to:r,empty:o}=e.selection,s=t?ut(t,e.schema):null,a=[];e.doc.nodesBetween(i,r,(c,d)=>{if(c.isText)return;let f=Math.max(i,d),p=Math.min(r,d+c.nodeSize);a.push({node:c,from:f,to:p})});let l=r-i,u=a.filter(c=>s?s.name===c.node.type.name:!0).filter(c=>Gc(c.node.attrs,n,{strict:!1}));return o?!!u.length:u.reduce((c,d)=>c+d.to-d.from,0)>=l}var zU=(e,t={})=>({state:n,dispatch:i})=>Bn(n,ut(e,n.schema),t)?JT(n,i):!1,DU=()=>({state:e,dispatch:t})=>N0(e,t),NU=e=>({state:t,dispatch:n})=>{let i=ut(e,t.schema);return tI(i)(t,n)},OU=()=>({state:e,dispatch:t})=>A0(e,t);function Qc(e,t){return t.nodes[e]?"node":t.marks[e]?"mark":null}function gA(e,t){let n=typeof t=="string"?[t]:t;return Object.keys(e).reduce((i,r)=>(n.includes(r)||(i[r]=e[r]),i),{})}var RU=(e,t)=>({tr:n,state:i,dispatch:r})=>{let o=null,s=null,a=Qc(typeof e=="string"?e:e.name,i.schema);if(!a)return!1;a==="node"&&(o=ut(e,i.schema)),a==="mark"&&(s=pr(e,i.schema));let l=!1;return n.selection.ranges.forEach(u=>{i.doc.nodesBetween(u.$from.pos,u.$to.pos,(c,d)=>{o&&o===c.type&&(l=!0,r&&n.setNodeMarkup(d,void 0,gA(c.attrs,t))),s&&c.marks.length&&c.marks.forEach(f=>{s===f.type&&(l=!0,r&&n.addMark(d,d+c.nodeSize,s.create(gA(f.attrs,t))))})})}),l},PU=()=>({tr:e,dispatch:t})=>(t&&e.scrollIntoView(),!0),LU=()=>({tr:e,dispatch:t})=>{if(t){let n=new jt(e.doc);e.setSelection(n)}return!0},FU=()=>({state:e,dispatch:t})=>E0(e,t),BU=()=>({state:e,dispatch:t})=>T0(e,t),UU=()=>({state:e,dispatch:t})=>GT(e,t),jU=()=>({state:e,dispatch:t})=>R0(e,t),ZU=()=>({state:e,dispatch:t})=>O0(e,t);function _g(e,t,n={},i={}){return No(e,t,{slice:!1,parseOptions:n,errorOnInvalidContent:i.errorOnInvalidContent})}var HU=(e,{errorOnInvalidContent:t,emitUpdate:n=!0,parseOptions:i={}}={})=>({editor:r,tr:o,dispatch:s,commands:a})=>{let{doc:l}=o;if(i.preserveWhitespace!=="full"){let u=_g(e,r.schema,i,{errorOnInvalidContent:t??r.options.enableContentCheck});if(s){let c=NA(u)?u.content:[u];o.replaceWith(0,l.content.size,c).setMeta("preventUpdate",!n)}return!0}return s&&o.setMeta("preventUpdate",!n),a.insertContentAt({from:0,to:l.content.size},e,{parseOptions:i,errorOnInvalidContent:t??r.options.enableContentCheck})};function LA(e,t){let n=pr(t,e.schema),{from:i,to:r,empty:o}=e.selection,s=[];o?(e.storedMarks&&s.push(...e.storedMarks),s.push(...e.selection.$head.marks())):e.doc.nodesBetween(i,r,l=>{s.push(...l.marks)});let a=s.find(l=>l.type.name===n.name);return a?{...a.attrs}:{}}function $g(e,t){let n=new Nr(e);return t.forEach(i=>{i.steps.forEach(r=>{n.step(r)})}),n}function FA(e,t,n){let i=[];return e.nodesBetween(t.from,t.to,(r,o)=>{n(r)&&i.push({node:r,pos:o})}),i}function Ro(e,t){for(let n=e.depth;n>0;n-=1){let i=e.node(n);if(t(i))return{pos:n>0?e.before(n):0,start:e.start(n),depth:n,node:i}}}function ed(e){return t=>Ro(t.$from,e)}function K(e,t,n){return e.config[t]===void 0&&e.parent?K(e.parent,t,n):typeof e.config[t]=="function"?e.config[t].bind({...n,parent:e.parent?K(e.parent,t,n):null}):e.config[t]}function Cg(e){return e.map(t=>{let n=K(t,"addExtensions",{name:t.name,options:t.options,storage:t.storage});return n?[t,...Cg(n())]:t}).flat(10)}function Po(e,t){let n=rr.fromSchema(t).serializeFragment(e),i=document.implementation.createHTMLDocument().createElement("div");return i.appendChild(n),i.innerHTML}function BA(e){return typeof e=="function"}function Se(e,t=void 0,...n){return BA(e)?t?e.bind(t)(...n):e(...n):e}function qU(e={}){return Object.keys(e).length===0&&e.constructor===Object}function Oo(e){return{baseExtensions:e.filter(t=>t.type==="extension"),nodeExtensions:e.filter(t=>t.type==="node"),markExtensions:e.filter(t=>t.type==="mark")}}function UA(e){let t=[],{nodeExtensions:n,markExtensions:i}=Oo(e),r=[...n,...i],o={default:null,validate:void 0,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1},s=n.filter(u=>u.name!=="text").map(u=>u.name),a=i.map(u=>u.name),l=[...s,...a];return e.forEach(u=>{let c=K(u,"addGlobalAttributes",{name:u.name,options:u.options,storage:u.storage,extensions:r});c&&c().forEach(d=>{let f;Array.isArray(d.types)?f=d.types:d.types==="*"?f=l:d.types==="nodes"?f=s:d.types==="marks"?f=a:f=[],f.forEach(p=>{Object.entries(d.attributes).forEach(([h,m])=>{t.push({type:p,name:h,attribute:{...o,...m}})})})})}),r.forEach(u=>{let c=K(u,"addAttributes",{name:u.name,options:u.options,storage:u.storage});if(!c)return;let d=c();Object.entries(d).forEach(([f,p])=>{let h={...o,...p};typeof h?.default=="function"&&(h.default=h.default()),h?.isRequired&&h?.default===void 0&&delete h.default,t.push({type:u.name,name:f,attribute:h})})}),t}function WU(e){let t=[],n="",i=!1,r=!1,o=0,s=e.length;for(let a=0;a<s;a+=1){let l=e[a];if(l==="'"&&!r){i=!i,n+=l;continue}if(l==='"'&&!i){r=!r,n+=l;continue}if(!i&&!r){if(l==="("){o+=1,n+=l;continue}if(l===")"&&o>0){o-=1,n+=l;continue}if(l===";"&&o===0){t.push(n),n="";continue}}n+=l}return n&&t.push(n),t}function bA(e){let t=[],n=WU(e||""),i=n.length;for(let r=0;r<i;r+=1){let o=n[r],s=o.indexOf(":");if(s===-1)continue;let a=o.slice(0,s).trim(),l=o.slice(s+1).trim();a&&l&&t.push([a,l])}return t}function fe(...e){return e.filter(t=>!!t).reduce((t,n)=>{let i={...t};return Object.entries(n).forEach(([r,o])=>{if(r==="__proto__"){Object.defineProperty(i,r,{configurable:!0,enumerable:!0,value:o,writable:!0});return}if(!i[r]){i[r]=o;return}if(r==="class"){let s=o?String(o).split(" "):[],a=i[r]?i[r].split(" "):[],l=s.filter(u=>!a.includes(u));i[r]=[...a,...l].join(" ")}else if(r==="style"){let s=new Map([...bA(i[r]),...bA(o)]);i[r]=Array.from(s.entries()).map(([a,l])=>`${a}: ${l}`).join("; ")}else i[r]=o}),i},{})}function Ur(e,t){return t.filter(n=>n.type===e.type.name).filter(n=>n.attribute.rendered).map(n=>n.attribute.renderHTML?n.attribute.renderHTML(e.attrs)||{}:{[n.name]:e.attrs[n.name]}).reduce((n,i)=>fe(n,i),{})}function VU(e){return typeof e!="string"?e:e.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(e):e==="true"?!0:e==="false"?!1:e}function vA(e,t){return"style"in e?e:{...e,getAttrs:n=>{let i=e.getAttrs?e.getAttrs(n):e.attrs;if(i===!1)return!1;let r=t.reduce((o,s)=>{let a=s.attribute.parseHTML?s.attribute.parseHTML(n):VU(n.getAttribute(s.name));return a==null?o:{...o,[s.name]:a}},{});return{...i,...r}}}}function yA(e){return Object.fromEntries(Object.entries(e).filter(([t,n])=>t==="attrs"&&qU(n)?!1:n!=null))}function kA(e){var t,n;let i={};return!(!(e==null||(t=e.attribute)===null||t===void 0)&&t.isRequired)&&"default"in(e?.attribute||{})&&(i.default=e.attribute.default),(e==null||(n=e.attribute)===null||n===void 0?void 0:n.validate)!==void 0&&(i.validate=e.attribute.validate),[e.name,i]}function KU(e,t){var n;let i=UA(e),{nodeExtensions:r,markExtensions:o}=Oo(e),s=(n=r.find(u=>K(u,"topNode")))===null||n===void 0?void 0:n.name,a=Object.fromEntries(r.map(u=>{let c=i.filter(g=>g.type===u.name),d={name:u.name,options:u.options,storage:u.storage,editor:t},f=yA({...e.reduce((g,b)=>{let v=K(b,"extendNodeSchema",d);return{...g,...v?v(u):{}}},{}),content:Se(K(u,"content",d)),marks:Se(K(u,"marks",d)),group:Se(K(u,"group",d)),inline:Se(K(u,"inline",d)),atom:Se(K(u,"atom",d)),selectable:Se(K(u,"selectable",d)),draggable:Se(K(u,"draggable",d)),code:Se(K(u,"code",d)),whitespace:Se(K(u,"whitespace",d)),linebreakReplacement:Se(K(u,"linebreakReplacement",d)),defining:Se(K(u,"defining",d)),isolating:Se(K(u,"isolating",d)),attrs:Object.fromEntries(c.map(kA))}),p=Se(K(u,"parseHTML",d));p&&(f.parseDOM=p.map(g=>vA(g,c)));let h=K(u,"renderHTML",d);h&&(f.toDOM=g=>h({node:g,HTMLAttributes:Ur(g,c)}));let m=K(u,"renderText",d);return m&&(f.toText=m),[u.name,f]})),l=Object.fromEntries(o.map(u=>{let c=i.filter(m=>m.type===u.name),d={name:u.name,options:u.options,storage:u.storage,editor:t},f=yA({...e.reduce((m,g)=>{let b=K(g,"extendMarkSchema",d);return{...m,...b?b(u):{}}},{}),inclusive:Se(K(u,"inclusive",d)),excludes:Se(K(u,"excludes",d)),group:Se(K(u,"group",d)),spanning:Se(K(u,"spanning",d)),code:Se(K(u,"code",d)),attrs:Object.fromEntries(c.map(kA))}),p=Se(K(u,"parseHTML",d));p&&(f.parseDOM=p.map(m=>vA(m,c)));let h=K(u,"renderHTML",d);return h&&(f.toDOM=m=>h({mark:m,HTMLAttributes:Ur(m,c)})),[u.name,f]}));return new hi({topNode:s,nodes:a,marks:l})}function JU(e){let t=e.filter((n,i)=>e.indexOf(n)!==i);return Array.from(new Set(t))}function La(e){return e.sort((n,i)=>{let r=K(n,"priority")||100,o=K(i,"priority")||100;return r>o?-1:r<o?1:0})}function jA(e){let t=La(Cg(e)),n=JU(t.map(i=>i.name));return n.length&&console.warn(`[tiptap warn]: Duplicate extension names found: [${n.map(i=>`'${i}'`).join(", ")}]. This can lead to issues.`),t}function ZA(e,t,n){let{from:i,to:r}=t,{blockSeparator:o=`
102
+
103
+ `,textSerializers:s={}}=n||{},a="";return e.nodesBetween(i,r,(l,u,c,d)=>{l.isBlock&&u>i&&(a+=o);let f=s?.[l.type.name];if(f)return c&&(a+=f({node:l,pos:u,parent:c,index:d,range:t})),!1;if(l.isText){var p;a+=l==null||(p=l.text)===null||p===void 0?void 0:p.slice(Math.max(i,u)-u,r-u)}}),a}function GU(e,t){return ZA(e,{from:0,to:e.content.size},t)}function HA(e){return Object.fromEntries(Object.entries(e.nodes).filter(([,t])=>t.spec.toText).map(([t,n])=>[t,n.spec.toText]))}function XU(e,t){let n=ut(t,e.schema),{from:i,to:r}=e.selection,o=[];e.doc.nodesBetween(i,r,a=>{o.push(a)});let s=o.reverse().find(a=>a.type.name===n.name);return s?{...s.attrs}:{}}function Tg(e,t){let n=Qc(typeof t=="string"?t:t.name,e.schema);return n==="node"?XU(e,t):n==="mark"?LA(e,t):{}}function YU(e,t=JSON.stringify){let n={};return e.filter(i=>{let r=t(i);return Object.prototype.hasOwnProperty.call(n,r)?!1:n[r]=!0})}function QU(e){let t=YU(e);return t.length===1?t:t.filter((n,i)=>!t.filter((r,o)=>o!==i).some(r=>n.oldRange.from>=r.oldRange.from&&n.oldRange.to<=r.oldRange.to&&n.newRange.from>=r.newRange.from&&n.newRange.to<=r.newRange.to))}function Lo(e){let{mapping:t,steps:n}=e,i=[];return t.maps.forEach((r,o)=>{let s=[];if(r.ranges.length)r.forEach((a,l)=>{s.push({from:a,to:l})});else{let{from:a,to:l}=n[o];if(a===void 0||l===void 0)return;s.push({from:a,to:l})}s.forEach(({from:a,to:l})=>{let u=t.slice(o).map(a,-1),c=t.slice(o).map(l),d=t.invert().map(u,-1),f=t.invert().map(c);i.push({oldRange:{from:d,to:f},newRange:{from:u,to:c}})})}),QU(i)}function td(e,t,n){let i=[];return e===t?n.resolve(e).marks().forEach(r=>{let o=Eg(n.resolve(e),r.type);o&&i.push({mark:r,...o})}):n.nodesBetween(e,t,(r,o)=>{!r||r?.nodeSize===void 0||i.push(...r.marks.map(s=>({from:o,to:o+r.nodeSize,mark:s})))}),i}var qA=(e,t,n,i=20)=>{let r=e.doc.resolve(n),o=i,s=null;for(;o>0&&s===null;){let a=r.node(o);a?.type.name===t?s=a:o-=1}return[s,o]},WA=e=>{let t=e.depth-1;if(t<0)return null;let n=e.index(t);return n===0?null:e.node(t).child(n-1)};function Ao(e,t){return t.nodes[e]||t.marks[e]||null}function Jc(e,t,n){return Object.fromEntries(Object.entries(n).filter(([i])=>{let r=e.find(o=>o.type===t&&o.name===i);return r?r.attribute.keepOnSplit:!1}))}var ej=(e,t=500)=>{let n="",i=e.parentOffset;return e.parent.nodesBetween(Math.max(0,i-t),i,(r,o,s,a)=>{var l,u;let c=((l=(u=r.type.spec).toText)===null||l===void 0?void 0:l.call(u,{node:r,pos:o,parent:s,index:a}))||r.textContent||"%leaf%";n+=r.isAtom&&!r.isText?c:c.slice(0,Math.max(0,i-o))}),n};function wg(e,t,n={}){let{empty:i,ranges:r}=e.selection,o=t?pr(t,e.schema):null;if(i)return!!(e.storedMarks||e.selection.$from.marks()).filter(c=>o?o.name===c.type.name:!0).find(c=>Gc(c.attrs,n,{strict:!1}));let s=0,a=[];if(r.forEach(({$from:c,$to:d})=>{let f=c.pos,p=d.pos;e.doc.nodesBetween(f,p,(h,m)=>{if(o&&h.inlineContent&&!h.type.allowsMarkType(o))return!1;if(!h.isText&&!h.marks.length)return;let g=Math.max(f,m),b=Math.min(p,m+h.nodeSize),v=b-g;s+=v,a.push(...h.marks.map(y=>({mark:y,from:g,to:b})))})}),s===0)return!1;let l=a.filter(c=>o?o.name===c.mark.type.name:!0).filter(c=>Gc(c.mark.attrs,n,{strict:!1})).reduce((c,d)=>c+d.to-d.from,0),u=a.filter(c=>o?c.mark.type!==o&&c.mark.type.excludes(o):!0).reduce((c,d)=>c+d.to-d.from,0);return(l>0?l+u:l)>=s}function tj(e,t,n={}){if(!t)return Bn(e,null,n)||wg(e,null,n);let i=Qc(t,e.schema);return i==="node"?Bn(e,t,n):i==="mark"?wg(e,t,n):!1}var VA=(e,t)=>{let{$from:n,$to:i,$anchor:r}=e.selection;if(t){let o=ed(a=>a.type.name===t)(e.selection);if(!o)return!1;let s=e.doc.resolve(o.pos+1);return r.pos+1===s.end()}return!(i.parentOffset<i.parent.nodeSize-2||n.pos!==i.pos)},KA=e=>{let{$from:t,$to:n}=e.selection;return!(t.parentOffset>0||t.pos!==n.pos)};function xA(e,t){return Array.isArray(t)?t.some(n=>(typeof n=="string"?n:n.name)===e.name):t}function vg(e,t){let{nodeExtensions:n}=Oo(t),i=n.find(o=>o.name===e);if(!i)return!1;let r=Se(K(i,"group",{name:i.name,options:i.options,storage:i.storage}));return typeof r!="string"?!1:r.split(" ").includes("list")}function Fo(e,{checkChildren:t=!0,ignoreWhitespace:n=!1}={}){if(n){if(e.type.name==="hardBreak")return!0;if(e.isText){var i;return!/\S/.test((i=e.text)!==null&&i!==void 0?i:"")}}if(e.isText)return!e.text;if(e.isAtom||e.isLeaf)return!1;if(e.content.childCount===0)return!0;if(t){let r=!0;return e.content.forEach(o=>{r!==!1&&(Fo(o,{ignoreWhitespace:n,checkChildren:t})||(r=!1))}),r}return!1}function nd(e){return e instanceof G}var JA=class GA{constructor(t){this.position=t}static fromJSON(t){return new GA(t.position)}toJSON(){return{position:this.position}}};function nj(e,t){let n=t.mapping.mapResult(e.position);return{position:new JA(n.pos),mapResult:n}}function rj(e){return new JA(e)}function ij(e,t,n){let{selection:i}=t,r=null;if(MA(i)&&(r=i.$cursor),r){var o;let a=(o=e.storedMarks)!==null&&o!==void 0?o:r.marks();return r.parent.type.allowsMarkType(n)&&(!!n.isInSet(a)||!a.some(l=>l.type.excludes(n)))}let{ranges:s}=i;return s.some(({$from:a,$to:l})=>{let u=a.depth===0?e.doc.inlineContent&&e.doc.type.allowsMarkType(n):!1;return e.doc.nodesBetween(a.pos,l.pos,(c,d,f)=>{if(u)return!1;if(c.isInline){let p=!f||f.type.allowsMarkType(n),h=!!n.isInSet(c.marks)||!c.marks.some(m=>m.type.excludes(n));u=p&&h}return!u}),u})}var oj=(e,t={})=>({tr:n,state:i,dispatch:r})=>{let{selection:o}=n,{empty:s,ranges:a}=o,l=pr(e,i.schema);if(r)if(s){let u=LA(i,l);n.addStoredMark(l.create({...u,...t}))}else a.forEach(u=>{let c=u.$from.pos,d=u.$to.pos;i.doc.nodesBetween(c,d,(f,p)=>{let h=Math.max(p,c),m=Math.min(p+f.nodeSize,d);f.marks.find(g=>g.type===l)?f.marks.forEach(g=>{l===g.type&&n.addMark(h,m,l.create({...g.attrs,...t}))}):n.addMark(h,m,l.create(t))})});return ij(i,n,l)},sj=(e,t)=>({tr:n})=>(n.setMeta(e,t),!0),aj=(e,t={})=>({state:n,dispatch:i,chain:r})=>{let o=ut(e,n.schema),s;return n.selection.$anchor.sameParent(n.selection.$head)&&(s=n.selection.$anchor.parent.attrs),o.isTextblock?r().command(({commands:a})=>P0(o,{...s,...t})(n)?!0:a.clearNodes()).command(({state:a})=>P0(o,{...s,...t})(a,i)).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},lj=e=>({tr:t,dispatch:n})=>{if(n){let{doc:i}=t,r=Ei(e,0,i.content.size),o=G.create(i,r);t.setSelection(o)}return!0},uj=(e,t)=>({tr:n,state:i,dispatch:r})=>{let{selection:o}=i,s,a;return typeof t=="number"?(s=t,a=t):t&&"from"in t&&"to"in t?(s=t.from,a=t.to):(s=o.from,a=o.to),r&&n.doc.nodesBetween(s,a,(l,u)=>{l.isText||n.setNodeMarkup(u,void 0,{...l.attrs,dir:e})}),!0},cj=e=>({tr:t,dispatch:n})=>{if(n){let{doc:i}=t,{from:r,to:o}=typeof e=="number"?{from:e,to:e}:e,s=q.atStart(i).from,a=q.atEnd(i).to,l=Ei(r,s,a),u=Ei(o,s,a),c=q.create(i,l,u);t.setSelection(c)}return!0},dj=e=>({state:t,dispatch:n})=>{let i=ut(e,t.schema);return nI(i)(t,n)};function _A(e,t){let n=e.storedMarks||e.selection.$to.parentOffset&&e.selection.$from.marks();if(n){let i=n.filter(r=>t?.includes(r.type.name));e.tr.ensureMarks(i)}}var fj=({keepMarks:e=!0}={})=>({tr:t,state:n,dispatch:i,editor:r})=>{let{selection:o,doc:s}=t,{$from:a,$to:l}=o,u=r.extensionManager.attributes,c=Jc(u,a.node().type.name,a.node().attrs);if(o instanceof G&&o.node.isBlock)return!a.parentOffset||!pn(s,a.pos)?!1:(i&&(e&&_A(n,r.extensionManager.splittableMarks),t.split(a.pos).scrollIntoView()),!0);if(!a.parent.isBlock)return!1;let d=l.parentOffset===l.parent.content.size,f=a.depth===0?void 0:RA(a.node(-1).contentMatchAt(a.indexAfter(-1))),p=d&&f?[{type:f,attrs:c}]:void 0,h=pn(t.doc,t.mapping.map(a.pos),1,p);if(!p&&!h&&pn(t.doc,t.mapping.map(a.pos),1,f?[{type:f}]:void 0)&&(h=!0,p=f?[{type:f,attrs:c}]:void 0),i){if(h&&(o instanceof q&&t.deleteSelection(),t.split(t.mapping.map(a.pos),1,p),f&&!d&&!a.parentOffset&&a.parent.type!==f)){let m=t.mapping.map(a.before()),g=t.doc.resolve(m);a.node(-1).canReplaceWith(g.index(),g.index()+1,f)&&t.setNodeMarkup(t.mapping.map(a.before()),f)}e&&_A(n,r.extensionManager.splittableMarks),t.scrollIntoView()}return h},pj=(e,t={})=>({tr:n,state:i,dispatch:r,editor:o})=>{let s=ut(e,i.schema),{$from:a,$to:l}=i.selection,u=i.selection.node;if(u&&u.isBlock||a.depth<2||!a.sameParent(l))return!1;let c=a.node(-1);if(c.type!==s)return!1;let d=o.extensionManager.attributes;if(a.parent.content.size===0&&a.node(-1).childCount===a.indexAfter(-1)){if(a.depth===2||a.node(-3).type!==s||a.index(-2)!==a.node(-2).childCount-1)return!1;if(r){var f;let b=z.empty,v=a.index(-1)?1:a.index(-2)?2:3;for(let M=a.depth-v;M>=a.depth-3;M-=1)b=z.from(a.node(M).copy(b));let y=a.indexAfter(-1)<a.node(-2).childCount?1:a.indexAfter(-2)<a.node(-3).childCount?2:3,x={...Jc(d,a.node().type.name,a.node().attrs),...t},C=((f=s.contentMatch.defaultType)===null||f===void 0?void 0:f.createAndFill(x))||void 0;b=b.append(z.from(s.createAndFill(null,C)||void 0));let A=a.before(a.depth-(v-1));n.replace(A,a.after(-y),new B(b,4-v,0));let D=-1;n.doc.nodesBetween(A,n.doc.content.size,(M,V)=>{if(D>-1)return!1;M.isTextblock&&M.content.size===0&&(D=V+1)}),D>-1&&n.setSelection(q.near(n.doc.resolve(D))),n.scrollIntoView()}return!0}let p=l.pos===a.end()?c.contentMatchAt(0).defaultType:null,h={...Jc(d,c.type.name,c.attrs),...t},m={...Jc(d,a.node().type.name,a.node().attrs),...t};n.delete(a.pos,l.pos);let g=p?[{type:s,attrs:h},{type:p,attrs:m}]:[{type:s,attrs:h}];if(!pn(n.doc,a.pos,2))return!1;if(r){let{selection:b,storedMarks:v}=i,{splittableMarks:y}=o.extensionManager,x=v||b.$to.parentOffset&&b.$from.marks();if(n.split(a.pos,2,g).scrollIntoView(),!x||!r)return!0;let C=x.filter(A=>y.includes(A.type.name));n.ensureMarks(C)}return!0};function wA(e){return!e||e==="1"?null:e}function XA(e,t){return wA(e)===wA(t)}var yg=(e,t)=>{let n=ed(o=>o.type===t)(e.selection);if(!n)return!0;let i=e.doc.resolve(Math.max(0,n.pos-1)).before(n.depth);if(i===void 0)return!0;let r=e.doc.nodeAt(i);return!(n.node.type===r?.type&&Cn(e.doc,n.pos))||!XA(n.node.attrs.type,r?.attrs.type)||e.join(n.pos),!0},kg=(e,t)=>{let n=ed(o=>o.type===t)(e.selection);if(!n)return!0;let i=e.doc.resolve(n.start).after(n.depth);if(i===void 0)return!0;let r=e.doc.nodeAt(i);return!(n.node.type===r?.type&&Cn(e.doc,i))||!XA(n.node.attrs.type,r?.attrs.type)||e.join(i),!0};function hj(e){let t=e.doc,n=t.firstChild;if(!n)return null;let i=t.resolve(1),r=t.resolve(n.nodeSize-1);return q.between(i,r)}var mj=(e,t,n,i={})=>({editor:r,tr:o,state:s,dispatch:a,chain:l,commands:u,can:c})=>{let{extensions:d,splittableMarks:f}=r.extensionManager,p=ut(e,s.schema),h=ut(t,s.schema),{selection:m,storedMarks:g}=s,{$from:b,$to:v}=m,y=b.blockRange(v),x=g||m.$to.parentOffset&&m.$from.marks();if(!y)return!1;let C=ed(je=>vg(je.type.name,d))(m),A=m.from===0&&m.to===s.doc.content.size,D=s.doc.content.content,M=D.length===1?D[0]:null,V=A&&M&&vg(M.type.name,d)?{node:M,pos:0,depth:0}:null,me=C??V,et=!!C&&y.depth>=1&&y.depth-C.depth<=1,it=!!V;if((et||it)&&me){if(me.node.type===p)return A&&it?l().command(({tr:je,dispatch:Me})=>{let se=hj(je);return se?(je.setSelection(se),Me&&Me(je),!0):!1}).liftListItem(h).run():u.liftListItem(h);if(vg(me.node.type.name,d)&&p.validContent(me.node.content))return l().command(()=>(o.setNodeMarkup(me.pos,p),!0)).command(()=>yg(o,p)).command(()=>kg(o,p)).run()}return!n||!x||!a?l().command(()=>c().wrapInList(p,i)?!0:u.clearNodes()).wrapInList(p,i).command(()=>yg(o,p)).command(()=>kg(o,p)).run():l().command(()=>{let je=c().wrapInList(p,i),Me=x.filter(se=>f.includes(se.type.name));return o.ensureMarks(Me),je?!0:u.clearNodes()}).wrapInList(p,i).command(()=>yg(o,p)).command(()=>kg(o,p)).run()},gj=(e,t={},n={})=>({state:i,commands:r})=>{let{extendEmptyMarkRange:o=!1}=n,s=pr(e,i.schema);return wg(i,s,t)?r.unsetMark(s,{extendEmptyMarkRange:o}):r.setMark(s,t)},bj=(e,t,n={})=>({state:i,commands:r})=>{let o=ut(e,i.schema),s=ut(t,i.schema),a=Bn(i,o,n),l;return i.selection.$anchor.sameParent(i.selection.$head)&&(l=i.selection.$anchor.parent.attrs),a?r.setNode(s,l):r.setNode(o,{...l,...n})},vj=(e,t={})=>({state:n,commands:i})=>{let r=ut(e,n.schema);return Bn(n,r,t)?i.lift(r):i.wrapIn(r,t)},yj=()=>({state:e,dispatch:t})=>{let n=e.plugins;for(let i=0;i<n.length;i+=1){let r=n[i],o;if(r.spec.isInputRules&&(o=r.getState(e))){if(t){let s=e.tr,a=o.transform;for(let l=a.steps.length-1;l>=0;l-=1)s.step(a.steps[l].invert(a.docs[l]));if(o.text){let l=s.doc.resolve(o.from).marks();s.replaceWith(o.from,o.to,e.schema.text(o.text,l))}else s.delete(o.from,o.to)}return!0}}return!1},kj=(e={})=>({tr:t,dispatch:n,editor:i})=>{let{ignoreClearable:r=!1}=e,{selection:o}=t,{empty:s,ranges:a}=o;if(s)return!0;let{nonClearableMarks:l}=i.extensionManager;if(n){let u=Object.values(i.schema.marks).filter(c=>r||!l.includes(c.name));a.forEach(c=>{for(let d of u)t.removeMark(c.$from.pos,c.$to.pos,d)})}return!0},xj=(e,t={})=>({tr:n,state:i,dispatch:r})=>{let{extendEmptyMarkRange:o=!1}=t,{selection:s}=n,a=pr(e,i.schema),{$from:l,empty:u,ranges:c}=s;if(!r)return!0;if(u&&o){var d;let{from:f,to:p}=s,h=Eg(l,a,(d=l.marks().find(m=>m.type===a))===null||d===void 0?void 0:d.attrs);h&&(f=h.from,p=h.to),n.removeMark(f,p,a)}else c.forEach(f=>{n.removeMark(f.$from.pos,f.$to.pos,a)});return n.removeStoredMark(a),!0},_j=e=>({tr:t,state:n,dispatch:i})=>{let{selection:r}=n,o,s;return typeof e=="number"?(o=e,s=e):e&&"from"in e&&"to"in e?(o=e.from,s=e.to):(o=r.from,s=r.to),i&&t.doc.nodesBetween(o,s,(a,l)=>{if(a.isText)return;let u={...a.attrs};delete u.dir,t.setNodeMarkup(l,void 0,u)}),!0},wj=(e,t={})=>({tr:n,state:i,dispatch:r})=>{let o=null,s=null,a=Qc(typeof e=="string"?e:e.name,i.schema);if(!a)return!1;a==="node"&&(o=ut(e,i.schema)),a==="mark"&&(s=pr(e,i.schema));let l=!1;return n.selection.ranges.forEach(u=>{let c=u.$from.pos,d=u.$to.pos,f,p,h,m;n.selection.empty?i.doc.nodesBetween(c,d,(g,b)=>{o&&o===g.type&&(l=!0,h=Math.max(b,c),m=Math.min(b+g.nodeSize,d),f=b,p=g)}):i.doc.nodesBetween(c,d,(g,b)=>{b<c&&o&&o===g.type&&(l=!0,h=Math.max(b,c),m=Math.min(b+g.nodeSize,d),f=b,p=g),b>=c&&b<=d&&(o&&o===g.type&&(l=!0,r&&n.setNodeMarkup(b,void 0,{...g.attrs,...t})),s&&g.marks.length&&g.marks.forEach(v=>{if(s===v.type&&(l=!0,r)){let y=Math.max(b,c),x=Math.min(b+g.nodeSize,d);n.addMark(y,x,s.create({...v.attrs,...t}))}}))}),p&&(f!==void 0&&r&&n.setNodeMarkup(f,void 0,{...p.attrs,...t}),s&&p.marks.length&&p.marks.forEach(g=>{s===g.type&&r&&n.addMark(h,m,s.create({...g.attrs,...t}))}))}),l},Mo=new we("__tiptap_decorations__"),Sj=e=>({tr:t,dispatch:n})=>(n&&t.setMeta(Mo,{type:"force",name:e}),!0),Ej=(e,t={})=>({state:n,dispatch:i})=>{let r=ut(e,n.schema);return QT(r,t)(n,i)},$j=(e,t={})=>({state:n,dispatch:i})=>{let r=ut(e,n.schema);return eI(r,t)(n,i)},Cj=r0({blur:()=>eU,clearContent:()=>tU,clearNodes:()=>nU,command:()=>rU,createParagraphNear:()=>iU,cut:()=>oU,deleteCurrentNode:()=>sU,deleteNode:()=>aU,deleteRange:()=>lU,deleteSelection:()=>dU,enter:()=>fU,exitCode:()=>pU,extendMarkRange:()=>hU,first:()=>mU,focus:()=>bU,forEach:()=>vU,insertContent:()=>yU,insertContentAt:()=>kU,insertDefaultBlock:()=>xU,joinBackward:()=>SU,joinDown:()=>wU,joinForward:()=>EU,joinItemBackward:()=>$U,joinItemForward:()=>CU,joinTextblockBackward:()=>TU,joinTextblockForward:()=>IU,joinUp:()=>_U,keyboardShortcut:()=>MU,lift:()=>zU,liftEmptyBlock:()=>DU,liftListItem:()=>NU,newlineInCode:()=>OU,resetAttributes:()=>RU,scrollIntoView:()=>PU,selectAll:()=>LU,selectNodeBackward:()=>FU,selectNodeForward:()=>BU,selectParentNode:()=>UU,selectTextblockEnd:()=>jU,selectTextblockStart:()=>ZU,setContent:()=>HU,setMark:()=>oj,setMeta:()=>sj,setNode:()=>aj,setNodeSelection:()=>lj,setTextDirection:()=>uj,setTextSelection:()=>cj,sinkListItem:()=>dj,splitBlock:()=>fj,splitListItem:()=>pj,toggleList:()=>mj,toggleMark:()=>gj,toggleNode:()=>bj,toggleWrap:()=>vj,undoInputRule:()=>yj,unsetAllMarks:()=>kj,unsetMark:()=>xj,unsetTextDirection:()=>_j,updateAttributes:()=>wj,updateDecorations:()=>Sj,wrapIn:()=>Ej,wrapInList:()=>$j}),zo=new WeakMap;function Tj(e,t){var n;zo.set(e,((n=zo.get(e))!==null&&n!==void 0?n:0)+1);try{return t()}finally{var i;let r=((i=zo.get(e))!==null&&i!==void 0?i:1)-1;r>0?zo.set(e,r):zo.delete(e)}}function Ij(e){return zo.has(e)}var Aj=class{constructor(){this.callbacks={}}on(e,t){return this.callbacks[e]||(this.callbacks[e]=[]),this.callbacks[e].push(t),this}emit(e,...t){let n=this.callbacks[e];return n&&n.forEach(i=>i.apply(this,t)),this}off(e,t){let n=this.callbacks[e];return n&&(t?this.callbacks[e]=n.filter(i=>i!==t):delete this.callbacks[e]),this}once(e,t){let n=(...i)=>{this.off(e,n),t.apply(this,i)};return this.on(e,n)}removeAllListeners(){this.callbacks={}}},YA=typeof process<"u"&&!1;function Mj(e){return e.kind==="widget"}function QA(e,t){let n=[],i=new Set;for(let r of e)r.kind==="widget"&&Mj(r)&&i.add(r.key),n.push(r.toPMDecoration(t));return{decorations:n,widgetKeys:i}}function zj(e,t,n){let{decorations:i,widgetKeys:r}=QA(t,n);return{set:Ce.create(e,i),widgetKeys:r}}function e6({position:e,from:t,to:n,docSize:i}){return e<t?!1:e<n?!0:e===n&&n===i}function Dj({decorations:e,from:t,to:n,docSize:i,extensionName:r,warnedExtensions:o}){return e.filter(s=>e6({position:s.anchor,from:t,to:n,docSize:i})?!0:(s.anchor===n||o.has(r)||(o.add(r),console.warn(`[tiptap warn]: Extension "${r}" returned a decoration outside the requested range [${t}, ${n}). It was ignored.`)),!1))}function t6(e){var t;let n=(t=e.spec)===null||t===void 0?void 0:t.key;return typeof n=="string"?n:void 0}function Nj(e){let t=new Map,n=new Map;for(let s of e.find()){var i,r,o;let a=t6(s);if(!a)continue;let l=(i=s.spec.extensionName)!==null&&i!==void 0?i:"unknown",u=(r=t.get(a))!==null&&r!==void 0?r:new Set;u.add(l),t.set(a,u),n.set(a,((o=n.get(a))!==null&&o!==void 0?o:0)+1)}return Array.from(t,([s,a])=>({key:s,extensions:a})).filter(({key:s})=>{var a;return((a=n.get(s))!==null&&a!==void 0?a:0)>1})}function n6(e){return e.jsonID==="attr"}function Oj(e){let t=!1;if(e.getMap().forEach(()=>{t=!0}),t||n6(e))return!0;let n=e;return typeof n.from=="number"&&typeof n.to=="number"}function Rj(e,t){let n=null,i=0,r=0;for(let o=0;o<e.childCount&&!(r>t.to);o+=1){let s=r+e.child(o).nodeSize;s>=t.from&&(n===null&&(n=r),i=s),r=s}return n===null?null:{from:n,to:i}}function Pj(e,t){if(e.steps.some(o=>!Oj(o)))return{type:"full"};let n=Lo(e).map(({newRange:o})=>o);e.steps.forEach((o,s)=>{if(!n6(o))return;let a=e.mapping.slice(s);n.push({from:a.map(o.pos,-1),to:a.map(o.pos+1)})});let i=[];for(let o of n){let s=Rj(t,o);s&&i.push(s)}i.sort((o,s)=>o.from-s.from);let r=[];for(let o of i){let s=r[r.length-1];s&&o.from<=s.to?s.to=Math.max(s.to,o.to):r.push({...o})}return{type:"ranges",ranges:r}}function r6(e,t,n,i){return e.map(t,n,{onRemove:r=>{let o=r?.key;typeof o=="string"&&i.delete(o)}})}function Lj(e,t,n){var i,r;let o=(i=t.decorationSetsByExtension[e])!==null&&i!==void 0?i:Ce.empty,s=new Set((r=t.widgetKeysByExtension[e])!==null&&r!==void 0?r:[]);return{set:r6(o,n.mapping,n.doc,s),widgetKeys:s}}function SA(e,t){let n=Object.values(t).flatMap(i=>i.find());return Ce.create(e,n)}function EA(e){let t=new Set;for(let n of Object.values(e))for(let i of n)t.add(i);return t}function Fj(e,t){var n;switch((n=t.update)!==null&&n!==void 0?n:"document"){case"document":if(t.createInRange)throw new Error(`[tiptap error]: Extension "${e}" provides createInRange() but does not use the "changedRanges" decoration update strategy.`);return;case"changedRanges":if(!t.createInRange)throw new Error(`[tiptap error]: Extension "${e}" uses the "changedRanges" decoration update strategy but does not provide createInRange().`);return;case"manual":if(t.createInRange)throw new Error(`[tiptap error]: Extension "${e}" uses the "manual" decoration update strategy, which is not compatible with createInRange(). createInRange() requires the "changedRanges" strategy.`);if(t.shouldUpdate)throw new Error(`[tiptap error]: Extension "${e}" cannot combine the "manual" decoration update strategy with shouldUpdate().`);return;default:throw new Error(`[tiptap error]: Extension "${e}" uses an unknown decoration update strategy. Expected "document", "changedRanges", or "manual".`)}}function Bj(e,t,n){return n?!0:e.update==="manual"?!1:e.shouldUpdate?e.shouldUpdate(t):t.tr.docChanged}var Uj=new Set;var jj=class{constructor(e){this.warnedWidgetKeys=new Set,this.warnedOutOfRangeExtensions=new Set,this.handleBeforeTransaction=({nextState:t})=>{let n=Mo.getState(t);n&&this.warnDuplicateWidgetKeys(n)},this.editor=e.editor,this.entries=this.resolveEntries(e.entries),this.entries.forEach(({name:t,spec:n})=>Fj(t,n)),this.plugin=this.entries.length>0?this.createPlugin():null,this.editor.on("beforeTransaction",this.handleBeforeTransaction)}destroy(){this.editor.off("beforeTransaction",this.handleBeforeTransaction)}liveWidgetKeys(){var e,t;return(e=(t=Mo.getState(this.editor.state))===null||t===void 0?void 0:t.widgetKeys)!==null&&e!==void 0?e:Uj}get mountedView(){return this.editor.isDestroyed?null:this.editor.view}resolveEntries(e){let t=[];for(let{name:n,addDecorations:i}of e){let r=i();r&&t.push({name:n,spec:r})}return t}createPlugin(){let{editor:e,entries:t}=this;return new de({key:Mo,state:{init:(n,i)=>{let r={},o={};for(let{name:a,spec:l}of t){let{set:u,widgetKeys:c}=this.buildFullSet(a,l,i);r[a]=u,o[a]=c}let s={decorationSetsByExtension:r,widgetKeysByExtension:o,mergedDecorationSet:this.buildMergedSet(i.doc,r),widgetKeys:EA(o)};return this.warnDuplicateWidgetKeys(s),s},apply:(n,i,r,o)=>{let s=n.getMeta(Mo),a=s?.type==="force"&&!s.name,l=s?.type==="force"?s.name:void 0,u={},c={},d=new Set;return Tj(e,()=>{for(let{name:f,spec:p}of t){let h=a||l===f;if(Bj(p,{editor:e,tr:n,oldState:r,newState:o},h))if(p.update==="changedRanges"&&n.docChanged&&!h){let m=this.applyChangedRangesRecompute(f,p,i,n,o);u[f]=m.set,c[f]=m.widgetKeys,d.add(f)}else{let{set:m,widgetKeys:g}=this.buildFullSet(f,p,o);u[f]=m,c[f]=g,d.add(f)}else{let m=Lj(f,i,n);u[f]=m.set,c[f]=m.widgetKeys}}}),d.size===0&&!n.docChanged?i:{decorationSetsByExtension:u,widgetKeysByExtension:c,mergedDecorationSet:this.mergeAfterApply({entries:t,previous:i,tr:n,decorationSetsByExtension:u,recomputedNames:d}),widgetKeys:EA(c)}}},props:{decorations(n){var i,r;return(i=(r=Mo.getState(n))===null||r===void 0?void 0:r.mergedDecorationSet)!==null&&i!==void 0?i:Ce.empty}}})}applyChangedRangesRecompute(e,t,n,i,r){let o=Pj(i,r.doc);return o.type==="full"?this.buildFullSet(e,t,r):this.rebuildRanges(e,t,n,i,r,o.ranges)}rebuildRanges(e,t,n,i,r,o){var s,a;let l=(s=n.decorationSetsByExtension[e])!==null&&s!==void 0?s:Ce.empty,u=new Set((a=n.widgetKeysByExtension[e])!==null&&a!==void 0?a:[]),c=r6(l,i.mapping,i.doc,u),d=r.doc.content.size;for(let{from:f,to:p}of o){let h=c.find(f,p).filter(b=>e6({position:b.from,from:f,to:p,docSize:d}));for(let b of h){let v=t6(b);v&&u.delete(v)}c=c.remove(h);let{decorations:m,widgetKeys:g}=QA(Dj({decorations:this.runCreate(e,"createInRange",()=>t.createInRange({editor:this.editor,state:r,view:this.mountedView,from:f,to:p})),from:f,to:p,docSize:d,extensionName:e,warnedExtensions:this.warnedOutOfRangeExtensions}),e);c=c.add(r.doc,m);for(let b of g)u.add(b)}return{set:c,widgetKeys:u}}buildFullSet(e,t,n){let i=this.runCreate(e,"create",()=>t.create({editor:this.editor,state:n,view:this.mountedView}));return zj(n.doc,i,e)}runCreate(e,t,n){try{return n()}catch(i){return console.error(`[tiptap error]: Extension "${e}" threw in \`addDecorations().${t}()\`. Its decorations were dropped for this update.`,i),[]}}warnDuplicateWidgetKeys(e){if(!YA)return;if(e.widgetKeys.size===0){this.warnedWidgetKeys.clear();return}let t=Nj(e.mergedDecorationSet),n=new Set(t.map(({key:i})=>i));for(let{key:i,extensions:r}of t){if(this.warnedWidgetKeys.has(i))continue;let o=Array.from(r).map(s=>`"${s}"`).join(", ");console.warn(`[tiptap warn]: Duplicate widget decoration key "${i}" in extension${r.size===1?"":"s"} ${o}. Widget decoration keys must be globally unique, otherwise ProseMirror misplaces the widget DOM. Use a stable, unique key (e.g. \`comment-\${id}\`).`)}this.warnedWidgetKeys=n}buildMergedSet(e,t){let n=Object.keys(t);return n.length===1?t[n[0]]:SA(e,t)}mergeAfterApply({entries:e,previous:t,tr:n,decorationSetsByExtension:i,recomputedNames:r}){return e.length===1?i[e[0].name]:r.size===0?t.mergedDecorationSet.map(n.mapping,n.doc):SA(n.doc,i)}};function i6(e,t){let{selection:n}=e,{$from:i}=n;if(n instanceof G){let o=i.index();return i.parent.canReplaceWith(o,o+1,t)}let r=i.depth;for(;r>=0;){let o=i.index(r);if(i.node(r).contentMatchAt(o).matchType(t))return!0;r-=1}return!1}function Zj(e,t,n){let i=document.querySelector(`style[data-tiptap-style${n?`-${n}`:""}]`);if(i!==null)return i;let r=document.createElement("style");return t&&r.setAttribute("nonce",t),r.setAttribute(`data-tiptap-style${n?`-${n}`:""}`,""),r.innerHTML=e,document.getElementsByTagName("head")[0].appendChild(r),r}function Hj(e){return typeof e=="number"}function qj(e){return Object.prototype.toString.call(e).slice(8,-1)}function Wc(e){return qj(e)!=="Object"?!1:e.constructor===Object&&Object.getPrototypeOf(e)===Object.prototype}function Ig(e,t,n){let i=e.split(`
104
+ `),r=[],o="",s=0,a=t.baseIndentSize||2;for(;s<i.length;){let c=i[s],d=c.match(t.itemPattern);if(!d){if(r.length>0)break;if(c.trim()===""){s+=1,o=`${o}${c}
105
+ `;continue}else return}let f=t.extractItemData(d),{indentLevel:p,mainContent:h}=f;o=`${o}${c}
106
+ `;let m=[h];for(s+=1;s<i.length;){var l;let y=i[s];if(y.trim()===""){var u;let x=i.slice(s+1).findIndex(C=>C.trim()!=="");if(x===-1)break;if((((u=i[s+1+x].match(/^(\s*)/))===null||u===void 0||(u=u[1])===null||u===void 0?void 0:u.length)||0)>p){m.push(y),o=`${o}${y}
107
+ `,s+=1;continue}else break}if((((l=y.match(/^(\s*)/))===null||l===void 0||(l=l[1])===null||l===void 0?void 0:l.length)||0)>p)m.push(y),o=`${o}${y}
108
+ `,s+=1;else break}let g,b=m.slice(1);if(b.length>0){let y=b.map(x=>x.slice(p+a)).join(`
109
+ `);y.trim()&&(t.customNestedParser?g=t.customNestedParser(y):g=n.blockTokens(y))}let v=t.createToken(f,g);r.push(v)}if(r.length!==0)return{items:r,raw:o}}var $A=4;function CA(e){let t=0;for(let n of e)t=n===" "?t+$A-t%$A:t+1;return t}function Ag(e,t,n,i,r){if(!e||!Array.isArray(e.content))return"";let o=typeof n=="function"?n(i):n,[s,...a]=e.content,l=`${o}${t.renderChildren([s])}`;return a&&a.length>0&&a.forEach((u,c)=>{var d,f;let p=(d=(f=t.renderChild)===null||f===void 0?void 0:f.call(t,u,c+1))!==null&&d!==void 0?d:t.renderChildren([u]);if(p!=null){let h=g=>{if(!r?.alignNestedToPrefix)return t.indent(g);let b=t.indent(""),v=CA(o);return(CA(b)>=v?b:" ".repeat(v))+g},m=p.split(`
110
+ `).map(g=>h(g||"")).join(`
111
+ `);l+=u.type==="paragraph"?`
112
+
113
+ ${m}`:`
114
+ ${m}`}}),l}function o6(e,t){let n={...e};return Wc(e)&&Wc(t)&&Object.keys(t).forEach(i=>{Wc(t[i])&&Wc(e[i])?n[i]=o6(e[i],t[i]):n[i]=t[i]}),n}function Wj(e,t,n={}){let{state:i}=t,{doc:r,tr:o}=i,s=e;r.descendants((a,l)=>{let u=o.mapping.map(l),c=o.mapping.map(l)+a.nodeSize,d=null;if(a.marks.forEach(p=>{if(p!==s)return!1;d=p}),!d)return;let f=!1;if(Object.keys(n).forEach(p=>{n[p]!==d.attrs[p]&&(f=!0)}),f){let p=e.type.create({...e.attrs,...n});o.removeMark(u,c,e.type),o.addMark(u,c,p)}}),o.docChanged&&t.view.dispatch(o)}var Bo=class{constructor(e){var t;this.find=e.find,this.handler=e.handler,this.undoable=(t=e.undoable)!==null&&t!==void 0?t:!0}},Vj=(e,t)=>{if(Sg(t))return t.exec(e);let n=t(e);if(!n)return null;let i=[n.text];return i.index=n.index,i.input=e,i.data=n.data,n.replaceWith&&(n.text.includes(n.replaceWith)||console.warn('[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".'),i.push(n.replaceWith)),i};function Vc(e){var t;let{editor:n,from:i,to:r,text:o,rules:s,plugin:a}=e,{view:l}=n;if(l.composing)return!1;let u=l.state.doc.resolve(i);if(u.parent.type.spec.code||!((t=u.nodeBefore||u.nodeAfter)===null||t===void 0)&&t.marks.find(f=>f.type.spec.code))return!1;let c=!1,d=ej(u)+o;return s.forEach(f=>{if(c)return;let p=Vj(d,f.find);if(!p)return;let h=p[0].length-o.length;if(h>0){let C=u.parentOffset-h;if(C<0||u.parent.textBetween(C,u.parentOffset)!==p[0].slice(0,h))return}let m=l.state.tr,g=Yc({state:l.state,transaction:m}),b={from:i-(p[0].length-o.length),to:r},{commands:v,chain:y,can:x}=new Do({editor:n,state:g});f.handler({state:g,range:b,match:p,commands:v,chain:y,can:x})===null||!m.steps.length||(f.undoable&&m.setMeta(a,{transform:m,from:i,to:r,text:o}),l.dispatch(m),c=!0)}),c}function Kj(e){let{editor:t,rules:n}=e,i=new de({state:{init(){return null},apply(r,o,s){let a=r.getMeta(i);if(a)return a;let l=r.getMeta("applyInputRules");return l&&setTimeout(()=>{let{text:u}=l;typeof u=="string"?u=u:u=Po(z.from(u),s.schema);let{from:c}=l,d=c+u.length;Vc({editor:t,from:c,to:d,text:u,rules:n,plugin:i})}),r.selectionSet||r.docChanged?null:o}},props:{handleTextInput(r,o,s,a){return Vc({editor:t,from:o,to:s,text:a,rules:n,plugin:i})},handleDOMEvents:{compositionend:r=>(setTimeout(()=>{let{$cursor:o}=r.state.selection;o&&Vc({editor:t,from:o.pos,to:o.pos,text:"",rules:n,plugin:i})}),!1)},handleKeyDown(r,o){if(o.key!=="Enter")return!1;let{$cursor:s}=r.state.selection;return s?Vc({editor:t,from:s.pos,to:s.pos,text:`
115
+ `,rules:n,plugin:i}):!1}},isInputRules:!0});return i}var Mg=class{constructor(e={}){this.type="extendable",this.parent=null,this.child=null,this.name="",this.config={name:this.name},this.config={...this.config,...e},this.name=this.config.name}get options(){return{...Se(K(this,"addOptions",{name:this.name}))}}get storage(){return{...Se(K(this,"addStorage",{name:this.name,options:this.options}))}}configure(e={}){let t=this.extend({...this.config,addOptions:()=>o6(this.options,e)});return t.name=this.name,t.parent=this.parent,this.child=null,t}extend(e={}){let t=new this.constructor({...this.config,...e});return t.parent=this,this.child=t,t.name="name"in e?e.name:t.parent.name,t}},ct=class s6 extends Mg{constructor(...t){super(...t),this.type="mark"}static create(t={}){let n=typeof t=="function"?t():t;return new s6(n)}static handleExit({editor:t,mark:n}){let{tr:i}=t.state,r=t.state.selection.$from;if(r.pos===r.end()){let o=r.marks();if(!o.find(a=>a?.type.name===n.name))return!1;let s=o.find(a=>a?.type.name===n.name);return s&&i.removeStoredMark(s),i.insertText(" ",r.pos),t.view.dispatch(i),!0}return!1}configure(t){return super.configure(t)}extend(t){let n=typeof t=="function"?t():t;return super.extend(n)}},zg=class{constructor(e){this.find=e.find,this.handler=e.handler}},Jj=(e,t,n)=>{if(Sg(t))return[...e.matchAll(t)];let i=t(e,n);return i?i.map(r=>{let o=[r.text];return o.index=r.index,o.input=e,o.data=r.data,r.replaceWith&&(r.text.includes(r.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),o.push(r.replaceWith)),o}):[]};function Gj(e){let{editor:t,state:n,from:i,to:r,rule:o,pasteEvent:s,dropEvent:a}=e,{commands:l,chain:u,can:c}=new Do({editor:t,state:n}),d=[];return n.doc.nodesBetween(i,r,(f,p)=>{var h,m,g,b;if(!((h=f.type)===null||h===void 0||(h=h.spec)===null||h===void 0)&&h.code||!(f.isText||f.isTextblock||f.isInline))return;let v=(m=(g=(b=f.content)===null||b===void 0?void 0:b.size)!==null&&g!==void 0?g:f.nodeSize)!==null&&m!==void 0?m:0,y=Math.max(i,p),x=Math.min(r,p+v);if(y>=x)return;let C=f.isText?f.text||"":f.textBetween(y-p,x-p,void 0,"\uFFFC");Jj(C,o.find,s).forEach(A=>{if(A.index===void 0)return;let D=y+A.index+1,M=D+A[0].length,V={from:n.tr.mapping.map(D),to:n.tr.mapping.map(M)},me=o.handler({state:n,range:V,match:A,commands:l,chain:u,can:c,pasteEvent:s,dropEvent:a});d.push(me)})}),d.every(f=>f!==null)}var Kc=null,Xj=e=>{var t;let n=new ClipboardEvent("paste",{clipboardData:new DataTransfer});return(t=n.clipboardData)===null||t===void 0||t.setData("text/html",e),n};function Yj(e){let{editor:t,rules:n}=e,i=null,r=!1,o=!1,s=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,a;try{a=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{a=null}let l=({state:u,from:c,to:d,rule:f,pasteEvt:p})=>{let h=u.tr,m=Yc({state:u,transaction:h});if(!(!Gj({editor:t,state:m,from:Math.max(c-1,0),to:d.b-1,rule:f,pasteEvent:p,dropEvent:a})||!h.steps.length)){try{a=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{a=null}return s=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,h}};return n.map(u=>new de({view(c){let d=p=>{var h;i=!((h=c.dom.parentElement)===null||h===void 0)&&h.contains(p.target)?c.dom.parentElement:null,i&&(Kc=t)},f=()=>{Kc&&(Kc=null)};return window.addEventListener("dragstart",d),window.addEventListener("dragend",f),{destroy(){window.removeEventListener("dragstart",d),window.removeEventListener("dragend",f)}}},props:{handleDOMEvents:{drop:(c,d)=>{if(o=i===c.dom.parentElement,a=d,!o){let f=Kc;f?.isEditable&&setTimeout(()=>{let p=f.state.selection;p&&f.commands.deleteRange({from:p.from,to:p.to})},10)}return!1},paste:(c,d)=>{var f;let p=(f=d.clipboardData)===null||f===void 0?void 0:f.getData("text/html");return s=d,r=!!p?.includes("data-pm-slice"),!1}}},appendTransaction:(c,d,f)=>{let p=c[0],h=p.getMeta("uiEvent")==="paste"&&!r,m=p.getMeta("uiEvent")==="drop"&&!o,g=p.getMeta("applyPasteRules"),b=!!g;if(!h&&!m&&!b)return;if(b){let{text:x}=g;typeof x=="string"?x=x:x=Po(z.from(x),f.schema);let{from:C}=g,A=C+x.length,D=Xj(x);return l({rule:u,state:f,from:C,to:{b:A},pasteEvt:D})}let v=d.doc.content.findDiffStart(f.doc.content),y=d.doc.content.findDiffEnd(f.doc.content);if(!(!Hj(v)||!y||v===y.b))return l({rule:u,state:f,from:v,to:y,pasteEvt:s})}}))}var rd=class{constructor(e,t){this.splittableMarks=[],this.nonClearableMarks=[],this.decorationManager=null,this.editor=t,this.baseExtensions=e,this.extensions=jA(e),this.schema=KU(this.extensions,t),this.setupExtensions()}get commands(){return this.extensions.reduce((e,t)=>{let n=K(t,"addCommands",{name:t.name,options:t.options,storage:this.editor.extensionStorage[t.name],editor:this.editor,type:Ao(t.name,this.schema)});return n?{...e,...n()}:e},{})}get plugins(){let{editor:e}=this,t=La([...this.extensions].reverse()).flatMap(i=>{let r={name:i.name,options:i.options,storage:this.editor.extensionStorage[i.name],editor:e,type:Ao(i.name,this.schema)},o=[],s=K(i,"addKeyboardShortcuts",r),a={};if(i.type==="mark"&&K(i,"exitable",r)&&(a.ArrowRight=()=>ct.handleExit({editor:e,mark:i})),s){let f=Object.fromEntries(Object.entries(s()).map(([p,h])=>[p,()=>h({editor:e})]));a={...a,...f}}let l=fA(a);o.push(l);let u=K(i,"addInputRules",r);if(xA(i,e.options.enableInputRules)&&u){let f=u();if(f&&f.length){let p=Kj({editor:e,rules:f}),h=Array.isArray(p)?p:[p];o.push(...h)}}let c=K(i,"addPasteRules",r);if(xA(i,e.options.enablePasteRules)&&c){let f=c();if(f&&f.length){let p=Yj({editor:e,rules:f});o.push(...p)}}let d=K(i,"addProseMirrorPlugins",r);if(d){let f=d();o.push(...f)}return o}),n=this.createDecorationPlugin();return n&&t.push(n),t}createDecorationPlugin(){var e;let{editor:t}=this;(e=this.decorationManager)===null||e===void 0||e.destroy();let n=[];return this.extensions.forEach(i=>{let r=K(i,"addDecorations",{name:i.name,options:i.options,storage:this.editor.extensionStorage[i.name],editor:t,type:Ao(i.name,this.schema)});r&&n.push({name:i.name,addDecorations:r})}),this.decorationManager=new jj({editor:t,entries:n}),this.decorationManager.plugin}get attributes(){return UA(this.extensions)}get nodeViews(){let{editor:e}=this,{nodeExtensions:t}=Oo(this.extensions);return Object.fromEntries(t.filter(n=>!!K(n,"addNodeView")).map(n=>{let i=this.attributes.filter(a=>a.type===n.name),r=K(n,"addNodeView",{name:n.name,options:n.options,storage:this.editor.extensionStorage[n.name],editor:e,type:ut(n.name,this.schema)});if(!r)return[];let o=r();if(!o)return[];let s=(a,l,u,c,d)=>{let f=Ur(a,i);return o({node:a,view:l,getPos:u,decorations:c,innerDecorations:d,editor:e,extension:n,HTMLAttributes:f})};return[n.name,s]}))}dispatchTransaction(e){let{editor:t}=this;return La([...this.extensions].reverse()).reduceRight((n,i)=>{let r={name:i.name,options:i.options,storage:this.editor.extensionStorage[i.name],editor:t,type:Ao(i.name,this.schema)},o=K(i,"dispatchTransaction",r);return o?s=>{o.call(r,{transaction:s,next:n})}:n},e)}transformPastedHTML(e){let{editor:t}=this;return La([...this.extensions]).reduce((n,i)=>{let r={name:i.name,options:i.options,storage:this.editor.extensionStorage[i.name],editor:t,type:Ao(i.name,this.schema)},o=K(i,"transformPastedHTML",r);return o?(s,a)=>{let l=n(s,a);return o.call(r,l)}:n},e||(n=>n))}get markViews(){let{editor:e}=this,{markExtensions:t}=Oo(this.extensions);return Object.fromEntries(t.filter(n=>!!K(n,"addMarkView")).map(n=>{let i=this.attributes.filter(s=>s.type===n.name),r=K(n,"addMarkView",{name:n.name,options:n.options,storage:this.editor.extensionStorage[n.name],editor:e,type:pr(n.name,this.schema)});if(!r)return[];let o=(s,a,l)=>{let u=Ur(s,i);return r()({mark:s,view:a,inline:l,editor:e,extension:n,HTMLAttributes:u,updateAttributes:c=>{Wj(s,e,c)}})};return[n.name,o]}))}destroy(){var e;(e=this.decorationManager)===null||e===void 0||e.destroy(),this.extensions.forEach(t=>{let n=t;for(;n.parent;){let i=n.parent;i.child===n&&(i.child=null),n=i}}),this.extensions=[],this.baseExtensions=[],this.decorationManager=null,this.schema=null,this.editor=null}setupExtensions(){let e=this.extensions;this.editor.extensionStorage=Object.fromEntries(e.map(t=>[t.name,t.storage])),e.forEach(t=>{let n={name:t.name,options:t.options,storage:this.editor.extensionStorage[t.name],editor:this.editor,type:Ao(t.name,this.schema)};if(t.type==="mark"){var i,r;(!((i=Se(K(t,"keepOnSplit",n)))!==null&&i!==void 0)||i)&&this.splittableMarks.push(t.name),!((r=Se(K(t,"clearable",n)))!==null&&r!==void 0)||r||this.nonClearableMarks.push(t.name)}let o=K(t,"onBeforeCreate",n),s=K(t,"onCreate",n),a=K(t,"onUpdate",n),l=K(t,"onSelectionUpdate",n),u=K(t,"onTransaction",n),c=K(t,"onFocus",n),d=K(t,"onBlur",n),f=K(t,"onDestroy",n);o&&this.editor.on("beforeCreate",o),s&&this.editor.on("create",s),a&&this.editor.on("update",a),l&&this.editor.on("selectionUpdate",l),u&&this.editor.on("transaction",u),c&&this.editor.on("focus",c),d&&this.editor.on("blur",d),f&&this.editor.on("destroy",f)})}};rd.resolve=jA;rd.sort=La;rd.flatten=Cg;var Te=class a6 extends Mg{constructor(...t){super(...t),this.type="extension"}static create(t={}){let n=typeof t=="function"?t():t;return new a6(n)}configure(t){return super.configure(t)}extend(t){let n=typeof t=="function"?t():t;return super.extend(n)}},l6=Te.create({name:"clipboardTextSerializer",addOptions(){return{blockSeparator:void 0}},addProseMirrorPlugins(){return[new de({key:new we("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{let{editor:e}=this,{state:t,schema:n}=e,{doc:i,selection:r}=t,o=HA(n),{blockSeparator:s}=this.options,a={...s!==void 0?{blockSeparator:s}:{},textSerializers:o};return[...r.ranges].sort((l,u)=>l.$from.pos-u.$from.pos).map(({$from:l,$to:u})=>ZA(i,{from:l.pos,to:u.pos},a)).join(s??`
116
+
117
+ `)}}})]}}),u6=Te.create({name:"commands",addCommands(){return{...Cj}}}),c6=Te.create({name:"delete",onUpdate({transaction:e,appendedTransactions:t}){var n,i;let r=()=>{var o,s,a;if((o=(s=this.editor.options.coreExtensionOptions)===null||s===void 0||(s=s.delete)===null||s===void 0||(a=s.filterTransaction)===null||a===void 0?void 0:a.call(s,e))!==null&&o!==void 0?o:e.getMeta("y-sync$"))return;let l=$g(e.before,[e,...t]);Lo(l).forEach(c=>{l.mapping.mapResult(c.oldRange.from).deletedAfter&&l.mapping.mapResult(c.oldRange.to).deletedBefore&&l.before.nodesBetween(c.oldRange.from,c.oldRange.to,(d,f)=>{let p=f+d.nodeSize-2,h=c.oldRange.from<=f&&p<=c.oldRange.to;this.editor.emit("delete",{type:"node",node:d,from:f,to:p,newFrom:l.mapping.map(f),newTo:l.mapping.map(p),deletedRange:c.oldRange,newRange:c.newRange,partial:!h,editor:this.editor,transaction:e,combinedTransform:l})})});let u=l.mapping;l.steps.forEach((c,d)=>{if(c instanceof or){var f,p;let h=u.slice(d).map(c.from,-1),m=u.slice(d).map(c.to),g=u.invert().map(h,-1),b=u.invert().map(m),v=h>0?(f=l.doc.nodeAt(h-1))===null||f===void 0?void 0:f.marks.some(x=>x.eq(c.mark)):!1,y=(p=l.doc.nodeAt(m))===null||p===void 0?void 0:p.marks.some(x=>x.eq(c.mark));this.editor.emit("delete",{type:"mark",mark:c.mark,from:c.from,to:c.to,deletedRange:{from:g,to:b},newRange:{from:h,to:m},partial:!!(y||v),editor:this.editor,transaction:e,combinedTransform:l})}})};!((n=(i=this.editor.options.coreExtensionOptions)===null||i===void 0||(i=i.delete)===null||i===void 0?void 0:i.async)!==null&&n!==void 0)||n?setTimeout(r,0):r()}}),d6=Te.create({name:"drop",addProseMirrorPlugins(){return[new de({key:new we("tiptapDrop"),props:{handleDrop:(e,t,n,i)=>{this.editor.emit("drop",{editor:this.editor,event:t,slice:n,moved:i})}}})]}}),f6=Te.create({name:"editable",addProseMirrorPlugins(){return[new de({key:new we("editable"),props:{editable:()=>this.editor.options.editable}})]}}),p6=new we("focusEvents"),h6=Te.create({name:"focusEvents",addProseMirrorPlugins(){let{editor:e}=this;return[new de({key:p6,props:{handleDOMEvents:{focus:(t,n)=>{e.isFocused=!0;let i=e.state.tr.setMeta("focus",{event:n}).setMeta("addToHistory",!1);return t.dispatch(i),!1},blur:(t,n)=>{e.isFocused=!1;let i=e.state.tr.setMeta("blur",{event:n}).setMeta("addToHistory",!1);return t.dispatch(i),!1}}}})]}}),m6=Te.create({name:"keymap",addKeyboardShortcuts(){let e=()=>this.editor.commands.first(({commands:s})=>[()=>s.undoInputRule(),()=>s.command(({tr:a})=>{let{selection:l,doc:u}=a,{empty:c,$anchor:d}=l,{pos:f,parent:p}=d,h=d.parent.isTextblock&&f>0?a.doc.resolve(f-1):d,m=h.parent.type.spec.isolating,g=d.pos-d.parentOffset,b=m&&h.parent.childCount===1?g===d.pos:X.atStart(u).from===f;return!c||!p.type.isTextblock||p.textContent.length||!b||b&&d.parent.type.name==="paragraph"?!1:s.clearNodes()}),()=>s.deleteSelection(),()=>s.joinBackward(),()=>s.selectNodeBackward()]),t=()=>this.editor.commands.first(({commands:s})=>[()=>s.deleteSelection(),()=>s.deleteCurrentNode(),()=>s.joinForward(),()=>s.selectNodeForward()]),i={Enter:()=>this.editor.commands.first(({commands:s})=>[()=>s.newlineInCode(),()=>s.createParagraphNear(),()=>s.liftEmptyBlock(),()=>s.splitBlock()]),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:e,"Mod-Backspace":e,"Shift-Backspace":e,Delete:t,"Mod-Delete":t,"Mod-a":()=>this.editor.commands.selectAll()},r={...i},o={...i,"Ctrl-h":e,"Alt-Backspace":e,"Ctrl-d":t,"Ctrl-Alt-Backspace":t,"Alt-Delete":t,"Alt-d":t,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};return Xc()||PA()?o:r},addProseMirrorPlugins(){return[new de({key:new we("clearDocument"),appendTransaction:(e,t,n)=>{if(e.some(p=>p.getMeta("composition")))return;let i=e.some(p=>p.docChanged)&&!t.doc.eq(n.doc),r=e.some(p=>p.getMeta("preventClearDocument"));if(!i||r)return;let{empty:o,from:s,to:a}=t.selection,l=X.atStart(t.doc).from,u=X.atEnd(t.doc).to;if(o||!(s===l&&a===u)||!Fo(n.doc))return;let c=n.tr,d=Yc({state:n,transaction:c}),{commands:f}=new Do({editor:this.editor,state:d});if(f.clearNodes(),!!c.steps.length)return c}})]}}),g6=Te.create({name:"paste",addProseMirrorPlugins(){return[new de({key:new we("tiptapPaste"),props:{handlePaste:(e,t,n)=>{this.editor.emit("paste",{editor:this.editor,event:t,slice:n})}}})]}}),b6=Te.create({name:"tabindex",addOptions(){return{value:void 0}},addProseMirrorPlugins(){return[new de({key:new we("tabindex"),props:{attributes:()=>{var e;return!this.editor.isEditable&&this.options.value===void 0?{}:{tabindex:(e=this.options.value)!==null&&e!==void 0?e:"0"}}}})]}}),v6=Te.create({name:"textDirection",addOptions(){return{direction:void 0}},addGlobalAttributes(){if(!this.options.direction)return[];let{nodeExtensions:e}=Oo(this.extensions);return[{types:e.filter(t=>t.name!=="text").map(t=>t.name),attributes:{dir:{default:this.options.direction,parseHTML:t=>{let n=t.getAttribute("dir");return n&&(n==="ltr"||n==="rtl"||n==="auto")?n:this.options.direction},renderHTML:t=>t.dir?{dir:t.dir}:{}}}}]},addProseMirrorPlugins(){return[new de({key:new we("textDirection"),props:{attributes:()=>{let e=this.options.direction;return e?{dir:e}:{}}}})]}}),y6=r0({ClipboardTextSerializer:()=>l6,Commands:()=>u6,Delete:()=>c6,Drop:()=>d6,Editable:()=>f6,FocusEvents:()=>h6,Keymap:()=>m6,Paste:()=>g6,Tabindex:()=>b6,TextDirection:()=>v6,focusEventsPluginKey:()=>p6}),TA=!1;function Qj(e){if(TA)return;TA=!0;let t;try{t=gt.fromJSON(e,{from:0,to:0}).slice.content}catch{return}t instanceof z||console.warn("[tiptap warn]: prosemirror-model is loaded more than once. Wrapping and splitting nodes will fail. Deduplicate it in your lock file, or alias it to a single copy in your bundler.")}var eZ=class Pa{get name(){return this.node.type.name}constructor(t,n,i=!1,r=null){this.currentNode=null,this.actualDepth=null,this.isBlock=i,this.resolvedPos=t,this.editor=n,this.currentNode=r}get node(){return this.currentNode||this.resolvedPos.node()}get element(){return this.editor.view.domAtPos(this.pos).node}get depth(){var t;return(t=this.actualDepth)!==null&&t!==void 0?t:this.resolvedPos.depth}get pos(){return this.resolvedPos.pos}get content(){return this.node.content}set content(t){let n=this.from,i=this.to;if(this.isBlock){if(this.content.size===0){console.error(`You can\u2019t set content on a block node. Tried to set content on ${this.name} at ${this.pos}`);return}n=this.from+1,i=this.to-1}this.editor.commands.insertContentAt({from:n,to:i},t)}get attributes(){return this.node.attrs}get textContent(){return this.node.textContent}get size(){return this.node.nodeSize}get from(){return this.isBlock?this.pos:this.resolvedPos.start(this.resolvedPos.depth)}get range(){return{from:this.from,to:this.to}}get to(){return this.isBlock?this.pos+this.size:this.resolvedPos.end(this.resolvedPos.depth)+(this.node.isText?0:1)}get parent(){if(this.depth===0)return null;let t=this.resolvedPos.start(this.resolvedPos.depth-1),n=this.resolvedPos.doc.resolve(t);return new Pa(n,this.editor)}get before(){let t=this.resolvedPos.doc.resolve(this.from-(this.isBlock?1:2));return t.depth!==this.depth&&(t=this.resolvedPos.doc.resolve(this.from-3)),new Pa(t,this.editor)}get after(){let t=this.resolvedPos.doc.resolve(this.to+(this.isBlock?2:1));return t.depth!==this.depth&&(t=this.resolvedPos.doc.resolve(this.to+3)),new Pa(t,this.editor)}get children(){let t=[];return this.node.content.forEach((n,i)=>{let r=n.isBlock&&!n.isTextblock,o=n.isAtom&&!n.isText,s=n.isInline,a=this.pos+i+(o?0:1);if(a<0||a>this.resolvedPos.doc.nodeSize-2)return;let l=this.resolvedPos.doc.resolve(a);if(!r&&!s&&l.depth<=this.depth)return;let u=new Pa(l,this.editor,r,r||s?n:null);r&&(u.actualDepth=this.depth+1),t.push(u)}),t}get firstChild(){return this.children[0]||null}get lastChild(){let t=this.children;return t[t.length-1]||null}closest(t,n={}){let i=null,r=this.parent;for(;r&&!i;){if(r.node.type.name===t)if(Object.keys(n).length>0){let o=r.node.attrs,s=Object.keys(n);for(let a=0;a<s.length;a+=1){let l=s[a];if(o[l]!==n[l])break}}else i=r;r=r.parent}return i}querySelector(t,n={}){return this.querySelectorAll(t,n,!0)[0]||null}querySelectorAll(t,n={},i=!1){let r=[];if(!this.children||this.children.length===0)return r;let o=Object.keys(n);return this.children.forEach(s=>{i&&r.length>0||(s.node.type.name===t&&o.every(a=>n[a]===s.node.attrs[a])&&r.push(s),!(i&&r.length>0)&&(r=r.concat(s.querySelectorAll(t,n,i))))}),r}setAttribute(t){let{tr:n}=this.editor.state;n.setNodeMarkup(this.from,void 0,{...this.node.attrs,...t}),this.editor.view.dispatch(n)}},tZ=`.ProseMirror {
118
+ position: relative;
119
+ }
120
+
121
+ .ProseMirror {
122
+ word-wrap: break-word;
123
+ white-space: pre-wrap;
124
+ white-space: break-spaces;
125
+ -webkit-font-variant-ligatures: none;
126
+ font-variant-ligatures: none;
127
+ font-feature-settings: "liga" 0; /* the above doesn't seem to work in Edge */
128
+ }
129
+
130
+ .ProseMirror [contenteditable="false"] {
131
+ white-space: normal;
132
+ }
133
+
134
+ .ProseMirror [contenteditable="false"] [contenteditable="true"] {
135
+ white-space: pre-wrap;
136
+ }
137
+
138
+ .ProseMirror pre {
139
+ white-space: pre-wrap;
140
+ }
141
+
142
+ img.ProseMirror-separator {
143
+ display: inline !important;
144
+ border: none !important;
145
+ margin: 0 !important;
146
+ width: 0 !important;
147
+ height: 0 !important;
148
+ }
149
+
150
+ .ProseMirror-gapcursor {
151
+ display: none;
152
+ pointer-events: none;
153
+ position: absolute;
154
+ margin: 0;
155
+ }
156
+
157
+ .ProseMirror-gapcursor:after {
158
+ content: "";
159
+ display: block;
160
+ position: absolute;
161
+ top: -2px;
162
+ width: 20px;
163
+ border-top: 1px solid black;
164
+ animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;
165
+ }
166
+
167
+ @keyframes ProseMirror-cursor-blink {
168
+ to {
169
+ visibility: hidden;
170
+ }
171
+ }
172
+
173
+ .ProseMirror-hideselection *::selection {
174
+ background: transparent;
175
+ }
176
+
177
+ .ProseMirror-hideselection *::-moz-selection {
178
+ background: transparent;
179
+ }
180
+
181
+ .ProseMirror-hideselection * {
182
+ caret-color: transparent;
183
+ }
184
+
185
+ .ProseMirror-focused .ProseMirror-gapcursor {
186
+ display: block;
187
+ }`,k6=class extends Aj{constructor(e={}){super(),this.css=null,this.className="tiptap",this.editorView=null,this.isFocused=!1,this.destroyed=!1,this.isInitialized=!1,this.extensionStorage={},this.instanceId=Math.random().toString(36).slice(2,9),this.hasWarnedStaleDecorationRead=!1,this.options={element:typeof document<"u"?document.createElement("div"):null,content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,textDirection:void 0,editorProps:{},parseOptions:{},coreExtensionOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,enableContentCheck:!1,emitContentError:!1,onBeforeCreate:()=>null,onCreate:()=>null,onMount:()=>null,onUnmount:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null,onContentError:({error:n})=>{throw n},onPaste:()=>null,onDrop:()=>null,onDelete:()=>null,enableExtensionDispatchTransaction:!0},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.utils={getUpdatedPosition:nj,createMappablePosition:rj},this.setOptions(e),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on("beforeCreate",this.options.onBeforeCreate),this.emit("beforeCreate",{editor:this}),this.on("mount",this.options.onMount),this.on("unmount",this.options.onUnmount),this.on("contentError",this.options.onContentError),this.on("create",this.options.onCreate),this.on("update",this.options.onUpdate),this.on("selectionUpdate",this.options.onSelectionUpdate),this.on("transaction",this.options.onTransaction),this.on("focus",this.options.onFocus),this.on("blur",this.options.onBlur),this.on("destroy",this.options.onDestroy),this.on("drop",({event:n,slice:i,moved:r})=>this.options.onDrop(n,i,r)),this.on("paste",({event:n,slice:i})=>this.options.onPaste(n,i)),this.on("delete",this.options.onDelete);let t=this.createDoc();if(!this.editorState){let n=xg(t,this.options.autofocus);this.editorState=wa.create({doc:t,schema:this.schema,selection:n||void 0})}Qj(this.schema),this.options.element&&this.mount(this.options.element)}mount(e){if(typeof document>"u")throw new Error("[tiptap error]: The editor cannot be mounted because there is no 'document' defined in this environment.");this.createView(e),this.emit("mount",{editor:this}),this.css&&!document.head.contains(this.css)&&document.head.appendChild(this.css),window.setTimeout(()=>{this.isDestroyed||(this.options.autofocus!==!1&&this.options.autofocus!==null&&this.commands.focus(this.options.autofocus),this.emit("create",{editor:this}),this.isInitialized=!0)},0)}unmount(){if(this.editorView){this.editorState=this.editorView.state;let e=this.editorView.dom;e?.editor&&delete e.editor,this.editorView.destroy()}if(this.editorView=null,this.isInitialized=!1,this.css&&!document.querySelectorAll(`.${this.className}`).length)try{typeof this.css.remove=="function"?this.css.remove():this.css.parentNode&&this.css.parentNode.removeChild(this.css)}catch(e){console.warn("Failed to remove CSS element:",e)}this.css=null,this.emit("unmount",{editor:this})}get storage(){return this.extensionStorage}get commands(){return this.commandManager.commands}chain(){return this.commandManager?this.commandManager.chain():Do.createFakeChain()}can(){return this.commandManager?this.commandManager.can():Do.createFallbackCan()}injectCSS(){this.options.injectCSS&&typeof document<"u"&&(this.css=Zj(tZ,this.options.injectNonce))}setOptions(e={}){this.options={...this.options,...e},!(!this.editorView||!this.state||this.isDestroyed)&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(e,t=!0){this.setOptions({editable:e}),t&&this.emit("update",{editor:this,transaction:this.state.tr,appendedTransactions:[]})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get view(){return this.editorView?this.editorView:new Proxy({state:this.editorState,updateState:e=>{this.editorState=e},dispatch:e=>{this.dispatchTransaction(e)},composing:!1,dragging:null,editable:!0,isDestroyed:!1},{get:(e,t)=>{if(this.editorView)return this.editorView[t];if(t==="state")return this.editorState;if(t in e)return Reflect.get(e,t);throw new Error(`[tiptap error]: The editor view is not available. Cannot access view['${t}']. The editor may not be mounted yet.`)}})}get state(){return YA&&!this.hasWarnedStaleDecorationRead&&Ij(this)&&(this.hasWarnedStaleDecorationRead=!0,console.warn("[tiptap warn]: `editor.state` was read while decoration `create()` was running. It returns the pre-transaction document. Use the `state` argument passed to `create()` instead. Helpers like `editor.isActive()` read `editor.state` too, so pass `state` to their standalone versions instead of calling them on the editor.")),this.editorView&&(this.editorState=this.view.state),this.editorState}registerPlugin(e,t){let n=BA(t)?t(e,[...this.state.plugins]):[...this.state.plugins,e],i=this.state.reconfigure({plugins:n});return this.view.updateState(i),i}unregisterPlugin(e){if(this.isDestroyed)return;let t=this.state.plugins,n=t;if([].concat(e).forEach(r=>{let o=typeof r=="string"?`${r}$`:r.key;n=n.filter(s=>!s.key.startsWith(o))}),t.length===n.length)return;let i=this.state.reconfigure({plugins:n});return this.view.updateState(i),i}createExtensionManager(){var e,t;let n=[...this.options.enableCoreExtensions?[f6,l6.configure({blockSeparator:(e=this.options.coreExtensionOptions)===null||e===void 0||(e=e.clipboardTextSerializer)===null||e===void 0?void 0:e.blockSeparator}),u6,h6,m6,b6.configure({value:(t=this.options.coreExtensionOptions)===null||t===void 0||(t=t.tabindex)===null||t===void 0?void 0:t.value}),d6,g6,c6,v6.configure({direction:this.options.textDirection})].filter(i=>typeof this.options.enableCoreExtensions=="object"?this.options.enableCoreExtensions[i.name]!==!1:!0):[],...this.options.extensions].filter(i=>["extension","node","mark"].includes(i?.type));this.extensionManager=new rd(n,this)}createCommandManager(){this.commandManager=new Do({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createDoc(){let e;try{e=_g(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:this.options.enableContentCheck})}catch(t){if(!(t instanceof Error)||!["[tiptap error]: Invalid JSON content","[tiptap error]: Invalid HTML content"].includes(t.message))throw t;let n=_g(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:!1});return this.editorState=wa.create({doc:n,schema:this.schema,selection:xg(n,this.options.autofocus)||void 0}),this.emit("contentError",{editor:this,error:t,disableCollaboration:()=>{"collaboration"in this.storage&&typeof this.storage.collaboration=="object"&&this.storage.collaboration&&(this.storage.collaboration.isDisabled=!0),this.options.extensions=this.options.extensions.filter(i=>i.name!=="collaboration"),this.createExtensionManager()}}),this.editorState.doc}return e}createView(e){let{editorProps:t,enableExtensionDispatchTransaction:n}=this.options,i=t.dispatchTransaction||this.dispatchTransaction.bind(this),r=n?this.extensionManager.dispatchTransaction(i):i,o=t.transformPastedHTML,s=this.extensionManager.transformPastedHTML(o);this.editorView=new Ma(e,{...t,attributes:{role:"textbox",...t?.attributes},dispatchTransaction:r,transformPastedHTML:s,state:this.editorState,markViews:this.extensionManager.markViews,nodeViews:this.extensionManager.nodeViews});let a=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(a),this.prependClass(),this.injectCSS();let l=this.view.dom;l.editor=this}createNodeViews(){this.view.isDestroyed||this.view.setProps({markViews:this.extensionManager.markViews,nodeViews:this.extensionManager.nodeViews})}prependClass(){this.view.dom.className=`${this.className} ${this.view.dom.className}`}captureTransaction(e){this.isCapturingTransaction=!0,e(),this.isCapturingTransaction=!1;let t=this.capturedTransaction;return this.capturedTransaction=null,t}dispatchTransaction(e){if(this.view.isDestroyed)return;if(this.isCapturingTransaction){if(!this.capturedTransaction){this.capturedTransaction=e;return}e.steps.forEach(u=>{var c;return(c=this.capturedTransaction)===null||c===void 0?void 0:c.step(u)});return}let{state:t,transactions:n}=this.state.applyTransaction(e),i=!this.state.selection.eq(t.selection),r=n.includes(e),o=this.state;if(this.emit("beforeTransaction",{editor:this,transaction:e,nextState:t}),!r)return;this.view.updateState(t),this.emit("transaction",{editor:this,transaction:e,appendedTransactions:n.slice(1)}),i&&this.emit("selectionUpdate",{editor:this,transaction:e});let s=n.findLast(u=>u.getMeta("focus")||u.getMeta("blur")),a=s?.getMeta("focus"),l=s?.getMeta("blur");a&&this.emit("focus",{editor:this,event:a.event,transaction:s}),l&&this.emit("blur",{editor:this,event:l.event,transaction:s}),!(e.getMeta("preventUpdate")||!n.some(u=>u.docChanged)||o.doc.eq(t.doc))&&this.emit("update",{editor:this,transaction:e,appendedTransactions:n.slice(1)})}getAttributes(e){return Tg(this.state,e)}isActive(e,t){let n=typeof e=="string"?e:null,i=typeof e=="string"?t:e;return tj(this.state,n,i)}getJSON(){return this.state.doc.toJSON()}getHTML(){return Po(this.state.doc.content,this.schema)}getText(e){let{blockSeparator:t=`
188
+
189
+ `,textSerializers:n={}}=e||{};return GU(this.state.doc,{blockSeparator:t,textSerializers:{...HA(this.schema),...n}})}get isEmpty(){return Fo(this.state.doc)}destroy(){this.destroyed||(this.destroyed=!0,this.emit("destroy"),this.unmount(),this.removeAllListeners(),this.extensionManager.destroy(),this.extensionManager=null,this.schema=null,this.commandManager=null,this.extensionStorage={})}get isDestroyed(){var e,t;return(e=(t=this.editorView)===null||t===void 0?void 0:t.isDestroyed)!==null&&e!==void 0?e:!0}$node(e,t){var n;return((n=this.$doc)===null||n===void 0?void 0:n.querySelector(e,t))||null}$nodes(e,t){var n;return((n=this.$doc)===null||n===void 0?void 0:n.querySelectorAll(e,t))||null}$pos(e){let t=this.state.doc.resolve(e),n=e>0&&t.nodeAfter&&!t.nodeAfter.isText&&t.nodeAfter.isAtom?t.nodeAfter:null;return new eZ(t,this,!1,n)}get $doc(){return this.$pos(0)}};function vn(e){return new Bo({find:e.find,handler:({state:t,range:n,match:i})=>{let r=Se(e.getAttributes,void 0,i);if(r===!1||r===null)return null;let{tr:o}=t,s=i[i.length-1],a=i[0];if(s){let l=a.search(/\S/),u=n.from+a.indexOf(s),c=u+s.length;if(td(n.from,n.to,t.doc).filter(f=>f.mark.type.excluded.find(p=>p===e.type&&p!==f.mark.type)).filter(f=>f.to>u).length)return null;c<n.to&&o.delete(c,n.to),u>n.from&&o.delete(n.from+l,u);let d=n.from+l+s.length;o.addMark(n.from+l,d,e.type.create(r||{})),o.removeStoredMark(e.type)}},undoable:e.undoable})}function id(e){return new Bo({find:e.find,handler:({state:t,range:n,match:i})=>{let r=Se(e.getAttributes,void 0,i)||{},{tr:o}=t,s=n.from,a=n.to,l=e.type.create(r);if(i[1]){let u=s+i[0].lastIndexOf(i[1]);u>a?u=a:a=u+i[1].length;let c=i[0][i[0].length-1];o.insertText(c,s+i[0].length-1),o.replaceWith(u,a,l)}else if(i[0]){let u=e.type.isInline?s:s-1;o.insert(u,e.type.create(r)).delete(o.mapping.map(s),o.mapping.map(a))}o.scrollIntoView()},undoable:e.undoable})}function Fa(e){return new Bo({find:e.find,handler:({state:t,range:n,match:i})=>{let r=t.doc.resolve(n.from),o=Se(e.getAttributes,void 0,i)||{};if(!r.node(-1).canReplaceWith(r.index(-1),r.indexAfter(-1),e.type))return null;t.tr.delete(n.from,n.to).setBlockType(n.from,n.from,e.type,o)},undoable:e.undoable})}function jr(e){return new Bo({find:e.find,handler:({state:t,range:n,match:i,chain:r})=>{let o=Se(e.getAttributes,void 0,i)||{},s=t.tr.delete(n.from,n.to),a=s.doc.resolve(n.from).blockRange(),l=a&&ko(a,e.type,o);if(!l)return null;if(s.wrap(a,l),e.keepMarks&&e.editor){let{selection:c,storedMarks:d}=t,{splittableMarks:f}=e.editor.extensionManager,p=d||c.$to.parentOffset&&c.$from.marks();if(p){let h=p.filter(m=>f.includes(m.type.name));s.ensureMarks(h)}}if(e.keepAttributes){let c=e.type.name==="bulletList"||e.type.name==="orderedList"?"listItem":"taskList";r().updateAttributes(c,o).run()}let u=s.doc.resolve(n.from-1).nodeBefore;u&&u.type===e.type&&Cn(s.doc,n.from-1)&&(!e.joinPredicate||e.joinPredicate(i,u))&&s.join(n.from-1)},undoable:e.undoable})}var nZ=e=>"touches"in e,x6=class{constructor(e){var t,n,i,r,o,s;this.directions=["bottom-left","bottom-right","top-left","top-right"],this.minSize={height:8,width:8},this.preserveAspectRatio=!1,this.classNames={container:"",wrapper:"",handle:"",resizing:""},this.initialWidth=0,this.initialHeight=0,this.aspectRatio=1,this.isResizing=!1,this.activeHandle=null,this.startX=0,this.startY=0,this.startWidth=0,this.startHeight=0,this.isShiftKeyPressed=!1,this.lastEditableState=void 0,this.handleMap=new Map,this.handleMouseMove=a=>{if(!this.isResizing||!this.activeHandle)return;let l=a.clientX-this.startX,u=a.clientY-this.startY;this.handleResize(l,u)},this.handleTouchMove=a=>{if(!this.isResizing||!this.activeHandle)return;let l=a.touches[0];if(!l)return;let u=l.clientX-this.startX,c=l.clientY-this.startY;this.handleResize(u,c)},this.handleMouseUp=()=>{if(!this.isResizing)return;let a=this.element.offsetWidth,l=this.element.offsetHeight;this.onCommit(a,l),this.isResizing=!1,this.activeHandle=null,this.container.dataset.resizeState="false",this.classNames.resizing&&this.container.classList.remove(this.classNames.resizing),document.removeEventListener("mousemove",this.handleMouseMove),document.removeEventListener("mouseup",this.handleMouseUp),document.removeEventListener("keydown",this.handleKeyDown),document.removeEventListener("keyup",this.handleKeyUp)},this.handleKeyDown=a=>{a.key==="Shift"&&(this.isShiftKeyPressed=!0)},this.handleKeyUp=a=>{a.key==="Shift"&&(this.isShiftKeyPressed=!1)},this.node=e.node,this.editor=e.editor,this.element=e.element,this.element.draggable=!1,this.contentElement=e.contentElement,this.getPos=e.getPos,this.onResize=e.onResize,this.onCommit=e.onCommit,this.onUpdate=e.onUpdate,!((t=e.options)===null||t===void 0)&&t.min&&(this.minSize={...this.minSize,...e.options.min}),!((n=e.options)===null||n===void 0)&&n.max&&(this.maxSize=e.options.max),!(e==null||(i=e.options)===null||i===void 0)&&i.directions&&(this.directions=e.options.directions),!((r=e.options)===null||r===void 0)&&r.preserveAspectRatio&&(this.preserveAspectRatio=e.options.preserveAspectRatio),!((o=e.options)===null||o===void 0)&&o.className&&(this.classNames={container:e.options.className.container||"",wrapper:e.options.className.wrapper||"",handle:e.options.className.handle||"",resizing:e.options.className.resizing||""}),!((s=e.options)===null||s===void 0)&&s.createCustomHandle&&(this.createCustomHandle=e.options.createCustomHandle),this.wrapper=this.createWrapper(),this.container=this.createContainer(),this.applyInitialSize(),this.attachHandles(),this.editor.on("update",this.handleEditorUpdate.bind(this))}get dom(){return this.container}get contentDOM(){var e;return(e=this.contentElement)!==null&&e!==void 0?e:null}handleEditorUpdate(){let e=this.editor.isEditable;e!==this.lastEditableState&&(this.lastEditableState=e,e?e&&this.handleMap.size===0&&this.attachHandles():this.removeHandles())}update(e,t,n){return e.type!==this.node.type?!1:(this.node=e,this.onUpdate?this.onUpdate(e,t,n):!0)}destroy(){this.isResizing&&(this.container.dataset.resizeState="false",this.classNames.resizing&&this.container.classList.remove(this.classNames.resizing),document.removeEventListener("mousemove",this.handleMouseMove),document.removeEventListener("mouseup",this.handleMouseUp),document.removeEventListener("keydown",this.handleKeyDown),document.removeEventListener("keyup",this.handleKeyUp),this.isResizing=!1,this.activeHandle=null),this.editor.off("update",this.handleEditorUpdate.bind(this)),this.container.remove()}createContainer(){let e=document.createElement("div");return e.dataset.resizeContainer="",e.dataset.node=this.node.type.name,e.style.display=this.node.type.isInline?"inline-flex":"flex",this.classNames.container&&(e.className=this.classNames.container),e.appendChild(this.wrapper),e}createWrapper(){let e=document.createElement("div");return e.style.position="relative",e.style.display="block",e.dataset.resizeWrapper="",this.classNames.wrapper&&(e.className=this.classNames.wrapper),e.appendChild(this.element),e}createHandle(e){let t=document.createElement("div");return t.dataset.resizeHandle=e,t.style.position="absolute",this.classNames.handle&&(t.className=this.classNames.handle),t}positionHandle(e,t){let n=t.includes("top"),i=t.includes("bottom"),r=t.includes("left"),o=t.includes("right");n&&(e.style.top="0"),i&&(e.style.bottom="0"),r&&(e.style.left="0"),o&&(e.style.right="0"),(t==="top"||t==="bottom")&&(e.style.left="0",e.style.right="0"),(t==="left"||t==="right")&&(e.style.top="0",e.style.bottom="0")}attachHandles(){this.directions.forEach(e=>{let t;this.createCustomHandle?t=this.createCustomHandle(e):t=this.createHandle(e),t instanceof HTMLElement||(console.warn(`[ResizableNodeView] createCustomHandle("${e}") did not return an HTMLElement. Falling back to default handle.`),t=this.createHandle(e)),this.createCustomHandle||this.positionHandle(t,e),t.addEventListener("mousedown",n=>this.handleResizeStart(n,e)),t.addEventListener("touchstart",n=>this.handleResizeStart(n,e)),this.handleMap.set(e,t),this.wrapper.appendChild(t)})}removeHandles(){this.handleMap.forEach(e=>e.remove()),this.handleMap.clear()}applyInitialSize(){let e=this.node.attrs.width,t=this.node.attrs.height;e?(this.element.style.width=`${e}px`,this.initialWidth=e):this.initialWidth=this.element.offsetWidth,t?(this.element.style.height=`${t}px`,this.initialHeight=t):this.initialHeight=this.element.offsetHeight,this.initialWidth>0&&this.initialHeight>0&&(this.aspectRatio=this.initialWidth/this.initialHeight)}handleResizeStart(e,t){e.preventDefault(),e.stopPropagation(),this.isResizing=!0,this.activeHandle=t,nZ(e)?(this.startX=e.touches[0].clientX,this.startY=e.touches[0].clientY):(this.startX=e.clientX,this.startY=e.clientY),this.startWidth=this.element.offsetWidth,this.startHeight=this.element.offsetHeight,this.startWidth>0&&this.startHeight>0&&(this.aspectRatio=this.startWidth/this.startHeight),this.getPos(),this.container.dataset.resizeState="true",this.classNames.resizing&&this.container.classList.add(this.classNames.resizing),document.addEventListener("mousemove",this.handleMouseMove),document.addEventListener("touchmove",this.handleTouchMove),document.addEventListener("mouseup",this.handleMouseUp),document.addEventListener("keydown",this.handleKeyDown),document.addEventListener("keyup",this.handleKeyUp)}handleResize(e,t){if(!this.activeHandle)return;let n=this.preserveAspectRatio||this.isShiftKeyPressed,{width:i,height:r}=this.calculateNewDimensions(this.activeHandle,e,t),o=this.applyConstraints(i,r,n);this.element.style.width=`${o.width}px`,this.element.style.height=`${o.height}px`,this.onResize&&this.onResize(o.width,o.height)}calculateNewDimensions(e,t,n){let i=this.startWidth,r=this.startHeight,o=e.includes("right"),s=e.includes("left"),a=e.includes("bottom"),l=e.includes("top");return o?i=this.startWidth+t:s&&(i=this.startWidth-t),a?r=this.startHeight+n:l&&(r=this.startHeight-n),(e==="right"||e==="left")&&(i=this.startWidth+(o?t:-t)),(e==="top"||e==="bottom")&&(r=this.startHeight+(a?n:-n)),this.preserveAspectRatio||this.isShiftKeyPressed?this.applyAspectRatio(i,r,e):{width:i,height:r}}applyConstraints(e,t,n){var i,r;if(!n){var o,s;let u=Math.max(this.minSize.width,e),c=Math.max(this.minSize.height,t);return!((o=this.maxSize)===null||o===void 0)&&o.width&&(u=Math.min(this.maxSize.width,u)),!((s=this.maxSize)===null||s===void 0)&&s.height&&(c=Math.min(this.maxSize.height,c)),{width:u,height:c}}let a=e,l=t;return a<this.minSize.width&&(a=this.minSize.width,l=a/this.aspectRatio),l<this.minSize.height&&(l=this.minSize.height,a=l*this.aspectRatio),!((i=this.maxSize)===null||i===void 0)&&i.width&&a>this.maxSize.width&&(a=this.maxSize.width,l=a/this.aspectRatio),!((r=this.maxSize)===null||r===void 0)&&r.height&&l>this.maxSize.height&&(l=this.maxSize.height,a=l*this.aspectRatio),{width:a,height:l}}applyAspectRatio(e,t,n){let i=n==="left"||n==="right",r=n==="top"||n==="bottom";return i?{width:e,height:e/this.aspectRatio}:r?{width:t*this.aspectRatio,height:t}:{width:e,height:e/this.aspectRatio}}};var ae=class _6 extends Mg{constructor(...t){super(...t),this.type="node"}static create(t={}){let n=typeof t=="function"?t():t;return new _6(n)}configure(t){return super.configure(t)}extend(t){let n=typeof t=="function"?t():t;return super.extend(n)}};function en(e){return new zg({find:e.find,handler:({state:t,range:n,match:i,pasteEvent:r})=>{let o=Se(e.getAttributes,void 0,i,r);if(o===!1||o===null)return null;let{tr:s}=t,a=i[i.length-1],l=i[0],u=n.to;if(a){let c=l.search(/\S/),d=n.from+l.indexOf(a),f=d+a.length;if(td(n.from,n.to,t.doc).filter(p=>p.mark.type.excluded.find(h=>h===e.type&&h!==p.mark.type)).filter(p=>p.to>d).length)return null;f<n.to&&s.delete(f,n.to),d>n.from&&s.delete(n.from+c,d),u=n.from+c+a.length,s.addMark(n.from+c,u,e.type.create(o||{})),i.index!==void 0&&i.input!==void 0&&i.index+i[0].length>=i.input.length||s.removeStoredMark(e.type)}}})}var w6=new WeakSet,S6=new WeakSet;function $i(e){let t=e;return w6.add(t),t}function Dg(e){return Array.isArray(e)&&w6.has(e)}function E6(e){return e.flatMap(t=>t==null?[]:Array.isArray(t)&&S6.has(t)&&!Dg(t)?E6(t):[t])}function rZ(e,t){if(e==="slot")return 0;if(e instanceof Function){let r=e(t);return Array.isArray(r)&&!Dg(r)&&!S6.has(r)?$i(r):r}let{children:n,...i}=t??{};if(e==="svg")throw new Error("SVG elements are not supported in the JSX syntax, use the array syntax instead");if(Array.isArray(n)){if(Dg(n))return $i([e,i,n]);if(n.length===0)return $i([e,i]);let r=E6(n);return r.length===0?$i([e,i]):$i([e,i,...r])}return n!=null?$i([e,i,n]):$i([e,i])}var Uo=(e,t)=>rZ(e,t);var iZ=(e,t)=>{var n;let{state:i}=e,{selection:r}=i;if(!r.empty)return!1;let{$from:o}=r;if(o.parentOffset!==0)return!1;let s=o.depth-1;if(s<0)return!1;let a=o.node(s),l=o.index(s);if(l===0)return!1;if(a.type===t)return e.commands.lift(t.name);let u=a.child(l-1);if(u.type!==t||!(!((n=u.lastChild)===null||n===void 0)&&n.isTextblock))return!1;let c=o.before()-1-1;return e.commands.command(({tr:d,dispatch:f})=>{if(!f)return!0;let p=o.parent.content,h=new B(p,0,0);return d.replace(c,o.after(),h),d.setSelection(q.create(d.doc,c+p.size)),d.scrollIntoView(),f(d),!0})},oZ=/^\s*>\s$/,$6=ae.create({name:"blockquote",addOptions(){return{HTMLAttributes:{}}},content:"block+",group:"block",defining:!0,parseHTML(){return[{tag:"blockquote"}]},renderHTML({HTMLAttributes:e}){return Uo("blockquote",{...fe(this.options.HTMLAttributes,e),children:Uo("slot",{})})},parseMarkdown:(e,t)=>{var n;let i=(n=t.parseBlockChildren)!==null&&n!==void 0?n:t.parseChildren;return t.createNode("blockquote",void 0,i(e.tokens||[]))},renderMarkdown:(e,t)=>{if(!e.content)return"";let n=">",i=[];return e.content.forEach((r,o)=>{var s,a;let l=((s=(a=t.renderChild)===null||a===void 0?void 0:a.call(t,r,o))!==null&&s!==void 0?s:t.renderChildren([r])).split(`
190
+ `).map(u=>u.trim()===""?n:`${n} ${u}`);i.push(l.join(`
191
+ `))}),i.join(`
192
+ ${n}
193
+ `)},addCommands(){return{setBlockquote:()=>({commands:e})=>e.wrapIn(this.name),toggleBlockquote:()=>({commands:e})=>e.toggleWrap(this.name),unsetBlockquote:()=>({commands:e})=>e.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote(),Backspace:()=>iZ(this.editor,this.type)}},addInputRules(){return[jr({find:oZ,type:this.type})]}});var sZ=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,aZ=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,lZ=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,uZ=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,C6=ct.create({name:"bold",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:e=>e.style.fontWeight!=="normal"&&null},{style:"font-weight=400",clearMark:e=>e.type.name===this.name},{style:"font-weight",getAttrs:e=>/^(bold(er)?|[5-9]\d{2,})$/.test(e)&&null}]},renderHTML({HTMLAttributes:e}){return Uo("strong",{...fe(this.options.HTMLAttributes,e),children:Uo("slot",{})})},markdownTokenName:"strong",parseMarkdown:(e,t)=>t.applyMark("bold",t.parseInline(e.tokens||[])),markdownOptions:{htmlReopen:{open:"<strong>",close:"</strong>"}},renderMarkdown:(e,t)=>`**${t.renderChildren(e)}**`,addCommands(){return{setBold:()=>({commands:e})=>e.setMark(this.name),toggleBold:()=>({commands:e})=>e.toggleMark(this.name),unsetBold:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[vn({find:sZ,type:this.type}),vn({find:lZ,type:this.type})]},addPasteRules(){return[en({find:aZ,type:this.type}),en({find:uZ,type:this.type})]}});var cZ=e=>{let t=/`([^`]+)`(?!`)$/.exec(e);return!t||t.index>0&&e[t.index-1]==="`"?null:{index:t.index,text:t[0],replaceWith:t[1]}},dZ=e=>{let t=/`([^`]+)`(?!`)/g,n=[],i;for(;(i=t.exec(e))!==null;)i.index>0&&e[i.index-1]==="`"||n.push({index:i.index,text:i[0],replaceWith:i[1]});return n},T6=ct.create({name:"code",addOptions(){return{HTMLAttributes:{}}},excludes:"_",code:!0,exitable:!0,parseHTML(){return[{tag:"code"}]},renderHTML({HTMLAttributes:e}){return["code",fe(this.options.HTMLAttributes,e),0]},markdownTokenName:"codespan",parseMarkdown:(e,t)=>t.applyMark("code",[{type:"text",text:e.text||""}]),renderMarkdown:(e,t)=>e.content?`\`${t.renderChildren(e.content)}\``:"",addCommands(){return{setCode:()=>({commands:e})=>e.setMark(this.name),toggleCode:()=>({commands:e})=>e.toggleMark(this.name),unsetCode:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[vn({find:cZ,type:this.type})]},addPasteRules(){return[en({find:dZ,type:this.type})]}});var Ng=4,fZ=/^```([a-z]+)?[\s\n]$/,pZ=/^~~~([a-z]+)?[\s\n]$/,I6=ae.create({name:"codeBlock",addOptions(){return{languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,exitOnArrowUp:!0,defaultLanguage:null,enableTabIndentation:!1,tabSize:Ng,HTMLAttributes:{}}},content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:this.options.defaultLanguage,parseHTML:e=>{var t;let{languageClassPrefix:n}=this.options;if(!n)return null;let i=[...((t=e.firstElementChild)===null||t===void 0?void 0:t.classList)||[]].filter(r=>r.startsWith(n)).map(r=>r.replace(n,""))[0];return i||null},rendered:!1}}},parseHTML(){return[{tag:"pre",preserveWhitespace:"full"}]},renderHTML({node:e,HTMLAttributes:t}){return["pre",fe(this.options.HTMLAttributes,t),["code",{class:e.attrs.language?this.options.languageClassPrefix+e.attrs.language:null},0]]},markdownTokenName:"code",parseMarkdown:(e,t)=>{var n,i;return((n=e.raw)===null||n===void 0?void 0:n.startsWith("```"))===!1&&((i=e.raw)===null||i===void 0?void 0:i.startsWith("~~~"))===!1&&e.codeBlockStyle!=="indented"?[]:t.createNode("codeBlock",{language:e.lang||null},e.text?[t.createTextNode(e.text)]:[])},renderMarkdown:(e,t)=>{var n;let i="",r=((n=e.attrs)===null||n===void 0?void 0:n.language)||"";return e.content?i=[`\`\`\`${r}`,t.renderChildren(e.content),"```"].join(`
194
+ `):i=`\`\`\`${r}
195
+
196
+ \`\`\``,i},addCommands(){return{setCodeBlock:e=>({commands:t})=>t.setNode(this.name,e),toggleCodeBlock:e=>({commands:t})=>t.toggleNode(this.name,"paragraph",e)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{let{empty:e,$anchor:t}=this.editor.state.selection,n=t.pos===1;return!e||t.parent.type.name!==this.name?!1:n||!t.parent.textContent.length?this.editor.commands.clearNodes():!1},Tab:({editor:e})=>{var t;if(!this.options.enableTabIndentation)return!1;let n=(t=this.options.tabSize)!==null&&t!==void 0?t:Ng,{state:i}=e,{selection:r}=i,{$from:o,empty:s}=r;if(o.parent.type!==this.type)return!1;let a=" ".repeat(n);return s?e.commands.insertContent(a):e.commands.command(({tr:l})=>{let{from:u,to:c}=r,d=i.doc.textBetween(u,c,`
197
+ `,`
198
+ `).split(`
199
+ `).map(f=>a+f).join(`
200
+ `);return l.replaceWith(u,c,i.schema.text(d)),!0})},"Shift-Tab":({editor:e})=>{var t;if(!this.options.enableTabIndentation)return!1;let n=(t=this.options.tabSize)!==null&&t!==void 0?t:Ng,{state:i}=e,{selection:r}=i,{$from:o,empty:s}=r;return o.parent.type!==this.type?!1:s?e.commands.command(({tr:a})=>{var l;let{pos:u}=o,c=o.start(),d=o.end(),f=i.doc.textBetween(c,d,`
201
+ `,`
202
+ `).split(`
203
+ `),p=0,h=0,m=u-c;for(let y=0;y<f.length;y+=1){if(h+f[y].length>=m){p=y;break}h+=f[y].length+1}let g=((l=f[p].match(/^ */))===null||l===void 0?void 0:l[0])||"",b=Math.min(g.length,n);if(b===0)return!0;let v=c;for(let y=0;y<p;y+=1)v+=f[y].length+1;return a.delete(v,v+b),u-v<=b&&a.setSelection(q.create(a.doc,v)),!0}):e.commands.command(({tr:a})=>{let{from:l,to:u}=r,c=i.doc.textBetween(l,u,`
204
+ `,`
205
+ `).split(`
206
+ `).map(d=>{var f;let p=((f=d.match(/^ */))===null||f===void 0?void 0:f[0])||"",h=Math.min(p.length,n);return d.slice(h)}).join(`
207
+ `);return a.replaceWith(l,u,i.schema.text(c)),!0})},Enter:({editor:e})=>{if(!this.options.exitOnTripleEnter)return!1;let{state:t}=e,{selection:n}=t,{$from:i,empty:r}=n;if(!r||i.parent.type!==this.type)return!1;let o=i.parentOffset===i.parent.nodeSize-2,s=i.parent.textContent.endsWith(`
208
+
209
+ `);return!o||!s?!1:e.chain().command(({tr:a})=>(a.delete(i.pos-2,i.pos),!0)).exitCode().run()},ArrowUp:({editor:e})=>{if(!this.options.exitOnArrowUp)return!1;let{state:t}=e,{selection:n}=t,{$from:i,empty:r}=n;if(!r||i.parent.type!==this.type||i.parentOffset!==0)return!1;let o=i.before();return o>0?!1:e.commands.insertDefaultBlock({pos:o})},ArrowDown:({editor:e})=>{if(!this.options.exitOnArrowDown)return!1;let{state:t}=e,{selection:n,doc:i}=t,{$from:r,empty:o}=n;if(!o||r.parent.type!==this.type||r.parentOffset!==r.parent.nodeSize-2)return!1;let s=r.after();return s===void 0?!1:i.nodeAt(s)?e.commands.command(({tr:a})=>(a.setSelection(X.near(i.resolve(s))),!0)):e.commands.exitCode()}}},addInputRules(){return[Fa({find:fZ,type:this.type,getAttributes:e=>({language:e[1]})}),Fa({find:pZ,type:this.type,getAttributes:e=>({language:e[1]})})]},addProseMirrorPlugins(){return[new de({key:new we("codeBlockVSCodeHandler"),props:{handlePaste:(e,t)=>{if(!t.clipboardData||this.editor.isActive(this.type.name))return!1;let n=t.clipboardData.getData("text/plain"),i=t.clipboardData.getData("vscode-editor-data"),r=i?JSON.parse(i):void 0,o=r?.mode;if(!n||!o)return!1;let{tr:s,schema:a}=e.state,l=a.text(n.replace(/\r\n?/g,`
210
+ `));return s.replaceSelectionWith(this.type.create({language:o},l)),s.selection.$from.parent.type!==this.type&&s.setSelection(q.near(s.doc.resolve(Math.max(0,s.selection.from-2)))),s.setMeta("paste",!0),e.dispatch(s),!0}}})]}});var A6=ae.create({name:"doc",topNode:!0,content:"block+",renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,`
211
+
212
+ `):""});var M6=ae.create({name:"hardBreak",markdownTokenName:"br",addOptions(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:"inline",selectable:!1,linebreakReplacement:!0,parseHTML(){return[{tag:"br"}]},renderHTML({HTMLAttributes:e}){return["br",fe(this.options.HTMLAttributes,e)]},renderText(){return`
213
+ `},renderMarkdown:()=>`
214
+ `,parseMarkdown:()=>({type:"hardBreak"}),addCommands(){return{setHardBreak:()=>({commands:e,chain:t,state:n,editor:i})=>e.first([()=>e.exitCode(),()=>e.command(()=>{let{selection:r,storedMarks:o}=n;if(r.$from.parent.type.spec.isolating)return!1;let{keepMarks:s}=this.options,{splittableMarks:a}=i.extensionManager,l=o||r.$to.parentOffset&&r.$from.marks();return t().insertContent({type:this.name}).command(({tr:u,dispatch:c})=>{if(c&&l&&s){let d=l.filter(f=>a.includes(f.type.name));u.ensureMarks(d)}return!0}).scrollIntoView().run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}});var z6=ae.create({name:"heading",addOptions(){return{levels:[1,2,3,4,5,6],HTMLAttributes:{}}},content:"inline*",group:"block",defining:!0,addAttributes(){return{level:{default:1,rendered:!1}}},parseHTML(){return this.options.levels.map(e=>({tag:`h${e}`,attrs:{level:e}}))},renderHTML({node:e,HTMLAttributes:t}){return[`h${this.options.levels.includes(e.attrs.level)?e.attrs.level:this.options.levels[0]}`,fe(this.options.HTMLAttributes,t),0]},parseMarkdown:(e,t)=>t.createNode("heading",{level:e.depth||1},t.parseInline(e.tokens||[])),renderMarkdown:(e,t)=>{var n;let i=!((n=e.attrs)===null||n===void 0)&&n.level?parseInt(e.attrs.level,10):1,r="#".repeat(i);return e.content?`${r} ${t.renderChildren(e.content)}`:""},addCommands(){return{setHeading:e=>({commands:t})=>this.options.levels.includes(e.level)?t.setNode(this.name,e):!1,toggleHeading:e=>({commands:t})=>this.options.levels.includes(e.level)?t.toggleNode(this.name,"paragraph",e):!1}},addKeyboardShortcuts(){return this.options.levels.reduce((e,t)=>({...e,[`Mod-Alt-${t}`]:()=>this.editor.commands.toggleHeading({level:t})}),{})},addInputRules(){return this.options.levels.map(e=>Fa({find:new RegExp(`^(#{${Math.min(...this.options.levels)},${e}})\\s$`),type:this.type,getAttributes:{level:e}}))}});var D6=ae.create({name:"horizontalRule",addOptions(){return{HTMLAttributes:{},nextNodeType:"paragraph"}},group:"block",parseHTML(){return[{tag:"hr"}]},renderHTML({HTMLAttributes:e}){return["hr",fe(this.options.HTMLAttributes,e)]},markdownTokenName:"hr",parseMarkdown:(e,t)=>t.createNode("horizontalRule"),renderMarkdown:()=>"---",addCommands(){return{setHorizontalRule:()=>({chain:e,state:t})=>{if(!i6(t,t.schema.nodes[this.name]))return!1;let{selection:n}=t,{$to:i}=n,r=e();return nd(n)?r.insertContentAt(i.pos,{type:this.name}):r.insertContent({type:this.name}),r.command(({state:o,tr:s,dispatch:a})=>{if(a){let{$to:l}=s.selection,u=l.end();if(l.nodeAfter)l.nodeAfter.isTextblock?s.setSelection(q.create(s.doc,l.pos+1)):l.nodeAfter.isBlock?s.setSelection(G.create(s.doc,l.pos)):s.setSelection(q.create(s.doc,l.pos));else{let c=o.schema.nodes[this.options.nextNodeType]||l.parent.type.contentMatch.defaultType,d=c?.create();d&&(s.insert(u,d),s.setSelection(q.create(s.doc,u+1)))}s.scrollIntoView()}return!0}).run()}}},addInputRules(){return[id({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}});var hZ=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,mZ=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,gZ=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,bZ=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,N6=ct.create({name:"italic",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:e=>e.style.fontStyle!=="normal"&&null},{style:"font-style=normal",clearMark:e=>e.type.name===this.name},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:e}){return["em",fe(this.options.HTMLAttributes,e),0]},addCommands(){return{setItalic:()=>({commands:e})=>e.setMark(this.name),toggleItalic:()=>({commands:e})=>e.toggleMark(this.name),unsetItalic:()=>({commands:e})=>e.unsetMark(this.name)}},markdownTokenName:"em",parseMarkdown:(e,t)=>t.applyMark("italic",t.parseInline(e.tokens||[])),markdownOptions:{htmlReopen:{open:"<em>",close:"</em>"}},renderMarkdown:(e,t)=>`*${t.renderChildren(e)}*`,addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[vn({find:hZ,type:this.type}),vn({find:gZ,type:this.type})]},addPasteRules(){return[en({find:mZ,type:this.type}),en({find:bZ,type:this.type})]}});var vZ="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2odyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rck0msd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0axi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5m\xF6gensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2oodside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",yZ="\u03B5\u03BB1\u03C52\u0431\u04331\u0435\u043B3\u0434\u0435\u0442\u04384\u0435\u044E2\u043A\u0430\u0442\u043E\u043B\u0438\u043A6\u043E\u043C3\u043C\u043A\u04342\u043E\u043D1\u0441\u043A\u0432\u04306\u043E\u043D\u043B\u0430\u0439\u043D5\u0440\u04333\u0440\u0443\u04412\u04442\u0441\u0430\u0439\u04423\u0440\u04313\u0443\u043A\u04403\u049B\u0430\u04373\u0570\u0561\u05753\u05D9\u05E9\u05E8\u05D0\u05DC5\u05E7\u05D5\u05DD3\u0627\u0628\u0648\u0638\u0628\u064A5\u0631\u0627\u0645\u0643\u06485\u0644\u0627\u0631\u062F\u06464\u0628\u062D\u0631\u064A\u06465\u062C\u0632\u0627\u0626\u06315\u0633\u0639\u0648\u062F\u064A\u06296\u0639\u0644\u064A\u0627\u06465\u0645\u063A\u0631\u06285\u0645\u0627\u0631\u0627\u062A5\u06CC\u0631\u0627\u06465\u0628\u0627\u0631\u062A2\u0632\u0627\u06314\u064A\u062A\u06433\u06BE\u0627\u0631\u062A5\u062A\u0648\u0646\u06334\u0633\u0648\u062F\u0627\u06463\u0631\u064A\u06295\u0634\u0628\u0643\u06294\u0639\u0631\u0627\u06422\u06282\u0645\u0627\u06464\u0641\u0644\u0633\u0637\u064A\u06466\u0642\u0637\u06313\u0643\u0627\u062B\u0648\u0644\u064A\u06436\u0648\u06453\u0645\u0635\u06312\u0644\u064A\u0633\u064A\u06275\u0648\u0631\u064A\u062A\u0627\u0646\u064A\u06277\u0642\u06394\u0647\u0645\u0631\u0627\u06475\u067E\u0627\u06A9\u0633\u062A\u0627\u06467\u0680\u0627\u0631\u062A4\u0915\u0949\u092E3\u0928\u0947\u091F3\u092D\u093E\u0930\u09240\u092E\u094D3\u094B\u09245\u0938\u0902\u0917\u0920\u09285\u09AC\u09BE\u0982\u09B2\u09BE5\u09AD\u09BE\u09B0\u09A42\u09F0\u09A44\u0A2D\u0A3E\u0A30\u0A244\u0AAD\u0ABE\u0AB0\u0AA44\u0B2D\u0B3E\u0B30\u0B244\u0B87\u0BA8\u0BCD\u0BA4\u0BBF\u0BAF\u0BBE6\u0BB2\u0B99\u0BCD\u0B95\u0BC86\u0B9A\u0BBF\u0B99\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0BC2\u0BB0\u0BCD11\u0C2D\u0C3E\u0C30\u0C24\u0C4D5\u0CAD\u0CBE\u0CB0\u0CA44\u0D2D\u0D3E\u0D30\u0D24\u0D025\u0DBD\u0D82\u0D9A\u0DCF4\u0E04\u0E2D\u0E213\u0E44\u0E17\u0E223\u0EA5\u0EB2\u0EA73\u10D2\u10D42\u307F\u3093\u306A3\u30A2\u30DE\u30BE\u30F34\u30AF\u30E9\u30A6\u30C94\u30B0\u30FC\u30B0\u30EB4\u30B3\u30E02\u30B9\u30C8\u30A23\u30BB\u30FC\u30EB3\u30D5\u30A1\u30C3\u30B7\u30E7\u30F36\u30DD\u30A4\u30F3\u30C84\u4E16\u754C2\u4E2D\u4FE11\u56FD1\u570B1\u6587\u7F513\u4E9A\u9A6C\u900A3\u4F01\u4E1A2\u4F5B\u5C712\u4FE1\u606F2\u5065\u5EB72\u516B\u53662\u516C\u53F81\u76CA2\u53F0\u6E7E1\u70632\u5546\u57CE1\u5E971\u68072\u5609\u91CC0\u5927\u9152\u5E975\u5728\u7EBF2\u5927\u62FF2\u5929\u4E3B\u65593\u5A31\u4E502\u5BB6\u96FB2\u5E7F\u4E1C2\u5FAE\u535A2\u6148\u55842\u6211\u7231\u4F603\u624B\u673A2\u62DB\u80582\u653F\u52A11\u5E9C2\u65B0\u52A0\u57612\u95FB2\u65F6\u5C1A2\u66F8\u7C4D2\u673A\u67842\u6DE1\u9A6C\u95213\u6E38\u620F2\u6FB3\u95802\u70B9\u770B2\u79FB\u52A82\u7EC4\u7EC7\u673A\u67844\u7F51\u57401\u5E971\u7AD91\u7EDC2\u8054\u901A2\u8C37\u6B4C2\u8D2D\u72692\u901A\u8CA92\u96C6\u56E22\u96FB\u8A0A\u76C8\u79D14\u98DE\u5229\u6D663\u98DF\u54C12\u9910\u53852\u9999\u683C\u91CC\u62C93\u6E2F2\uB2F7\uB1371\uCEF42\uC0BC\uC1312\uD55C\uAD6D2",Ug="numeric",jg="ascii",Zg="alpha",ja="asciinumeric",Ua="alphanumeric",Hg="domain",B6="emoji",kZ="scheme",xZ="slashscheme",Og="whitespace";function _Z(e,t){return e in t||(t[e]=[]),t[e]}function Ci(e,t,n){t[Ug]&&(t[ja]=!0,t[Ua]=!0),t[jg]&&(t[ja]=!0,t[Zg]=!0),t[ja]&&(t[Ua]=!0),t[Zg]&&(t[Ua]=!0),t[Ua]&&(t[Hg]=!0),t[B6]&&(t[Hg]=!0);for(let i in t){let r=_Z(i,n);r.indexOf(e)<0&&r.push(e)}}function wZ(e,t){let n={};for(let i in t)t[i].indexOf(e)>=0&&(n[i]=!0);return n}function Gt(e=null){this.j={},this.jr=[],this.jd=null,this.t=e}Gt.groups={};Gt.prototype={accepts(){return!!this.t},go(e){let t=this,n=t.j[e];if(n)return n;for(let i=0;i<t.jr.length;i++){let r=t.jr[i][0],o=t.jr[i][1];if(o&&r.test(e))return o}return t.jd},has(e,t=!1){return t?e in this.j:!!this.go(e)},ta(e,t,n,i){for(let r=0;r<e.length;r++)this.tt(e[r],t,n,i)},tr(e,t,n,i){i=i||Gt.groups;let r;return t&&t.j?r=t:(r=new Gt(t),n&&i&&Ci(t,n,i)),this.jr.push([e,r]),r},ts(e,t,n,i){let r=this,o=e.length;if(!o)return r;for(let s=0;s<o-1;s++)r=r.tt(e[s]);return r.tt(e[o-1],t,n,i)},tt(e,t,n,i){i=i||Gt.groups;let r=this;if(t&&t.j)return r.j[e]=t,t;let o=t,s,a=r.go(e);if(a?(s=new Gt,Object.assign(s.j,a.j),s.jr.push.apply(s.jr,a.jr),s.jd=a.jd,s.t=a.t):s=new Gt,o){if(i)if(s.t&&typeof s.t=="string"){let l=Object.assign(wZ(s.t,i),n);Ci(o,l,i)}else n&&Ci(o,n,i);s.t=o}return r.j[e]=s,s}};var he=(e,t,n,i,r)=>e.ta(t,n,i,r),tt=(e,t,n,i,r)=>e.tr(t,n,i,r),O6=(e,t,n,i,r)=>e.ts(t,n,i,r),P=(e,t,n,i,r)=>e.tt(t,n,i,r),gr="WORD",qg="UWORD",U6="ASCIINUMERICAL",j6="ALPHANUMERICAL",Ka="LOCALHOST",Wg="TLD",Vg="UTLD",ld="SCHEME",jo="SLASH_SCHEME",Jg="NUM",Kg="WS",Gg="NL",Za="OPENBRACE",Ha="CLOSEBRACE",ud="OPENBRACKET",cd="CLOSEBRACKET",dd="OPENPAREN",fd="CLOSEPAREN",pd="OPENANGLEBRACKET",hd="CLOSEANGLEBRACKET",md="FULLWIDTHLEFTPAREN",gd="FULLWIDTHRIGHTPAREN",bd="LEFTCORNERBRACKET",vd="RIGHTCORNERBRACKET",yd="LEFTWHITECORNERBRACKET",kd="RIGHTWHITECORNERBRACKET",xd="FULLWIDTHLESSTHAN",_d="FULLWIDTHGREATERTHAN",wd="AMPERSAND",Sd="APOSTROPHE",Ed="ASTERISK",Hr="AT",$d="BACKSLASH",Cd="BACKTICK",Td="CARET",Ti="COLON",Xg="COMMA",Id="DOLLAR",Un="DOT",Ad="EQUALS",Yg="EXCLAMATION",kn="HYPHEN",qa="PERCENT",Md="PIPE",zd="PLUS",Dd="POUND",Wa="QUERY",Qg="QUOTE",Z6="FULLWIDTHMIDDLEDOT",eb="SEMI",jn="SLASH",Va="TILDE",Nd="UNDERSCORE",H6="EMOJI",Od="SYM",q6=Object.freeze({__proto__:null,ALPHANUMERICAL:j6,AMPERSAND:wd,APOSTROPHE:Sd,ASCIINUMERICAL:U6,ASTERISK:Ed,AT:Hr,BACKSLASH:$d,BACKTICK:Cd,CARET:Td,CLOSEANGLEBRACKET:hd,CLOSEBRACE:Ha,CLOSEBRACKET:cd,CLOSEPAREN:fd,COLON:Ti,COMMA:Xg,DOLLAR:Id,DOT:Un,EMOJI:H6,EQUALS:Ad,EXCLAMATION:Yg,FULLWIDTHGREATERTHAN:_d,FULLWIDTHLEFTPAREN:md,FULLWIDTHLESSTHAN:xd,FULLWIDTHMIDDLEDOT:Z6,FULLWIDTHRIGHTPAREN:gd,HYPHEN:kn,LEFTCORNERBRACKET:bd,LEFTWHITECORNERBRACKET:yd,LOCALHOST:Ka,NL:Gg,NUM:Jg,OPENANGLEBRACKET:pd,OPENBRACE:Za,OPENBRACKET:ud,OPENPAREN:dd,PERCENT:qa,PIPE:Md,PLUS:zd,POUND:Dd,QUERY:Wa,QUOTE:Qg,RIGHTCORNERBRACKET:vd,RIGHTWHITECORNERBRACKET:kd,SCHEME:ld,SEMI:eb,SLASH:jn,SLASH_SCHEME:jo,SYM:Od,TILDE:Va,TLD:Wg,UNDERSCORE:Nd,UTLD:Vg,UWORD:qg,WORD:gr,WS:Kg}),hr=/[a-z]/,Ba=/\p{L}/u,Rg=/\p{Emoji}/u;var mr=/\d/,Pg=/\s/;var R6="\r",Lg=`
215
+ `,SZ="\uFE0F",EZ="\u200D",Fg="\uFFFC",od=null,sd=null;function $Z(e=[]){let t={};Gt.groups=t;let n=new Gt;od==null&&(od=P6(vZ)),sd==null&&(sd=P6(yZ)),P(n,"'",Sd),P(n,"{",Za),P(n,"}",Ha),P(n,"[",ud),P(n,"]",cd),P(n,"(",dd),P(n,")",fd),P(n,"<",pd),P(n,">",hd),P(n,"\uFF08",md),P(n,"\uFF09",gd),P(n,"\u300C",bd),P(n,"\u300D",vd),P(n,"\u300E",yd),P(n,"\u300F",kd),P(n,"\uFF1C",xd),P(n,"\uFF1E",_d),P(n,"&",wd),P(n,"*",Ed),P(n,"@",Hr),P(n,"`",Cd),P(n,"^",Td),P(n,":",Ti),P(n,",",Xg),P(n,"$",Id),P(n,".",Un),P(n,"=",Ad),P(n,"!",Yg),P(n,"-",kn),P(n,"%",qa),P(n,"|",Md),P(n,"+",zd),P(n,"#",Dd),P(n,"?",Wa),P(n,'"',Qg),P(n,"/",jn),P(n,";",eb),P(n,"~",Va),P(n,"_",Nd),P(n,"\\",$d),P(n,"\u30FB",Z6);let i=tt(n,mr,Jg,{[Ug]:!0});tt(i,mr,i);let r=tt(i,hr,U6,{[ja]:!0}),o=tt(i,Ba,j6,{[Ua]:!0}),s=tt(n,hr,gr,{[jg]:!0});tt(s,mr,r),tt(s,hr,s),tt(r,mr,r),tt(r,hr,r);let a=tt(n,Ba,qg,{[Zg]:!0});tt(a,hr),tt(a,mr,o),tt(a,Ba,a),tt(o,mr,o),tt(o,hr),tt(o,Ba,o);let l=P(n,Lg,Gg,{[Og]:!0}),u=P(n,R6,Kg,{[Og]:!0}),c=tt(n,Pg,Kg,{[Og]:!0});P(n,Fg,c),P(u,Lg,l),P(u,Fg,c),tt(u,Pg,c),P(c,R6),P(c,Lg),tt(c,Pg,c),P(c,Fg,c);let d=tt(n,Rg,H6,{[B6]:!0});P(d,"#"),tt(d,Rg,d),P(d,SZ,d);let f=P(d,EZ);P(f,"#"),tt(f,Rg,d);let p=[[hr,s],[mr,r]],h=[[hr,null],[Ba,a],[mr,o]];for(let m=0;m<od.length;m++)Zr(n,od[m],Wg,gr,p);for(let m=0;m<sd.length;m++)Zr(n,sd[m],Vg,qg,h);Ci(Wg,{tld:!0,ascii:!0},t),Ci(Vg,{utld:!0,alpha:!0},t),Zr(n,"file",ld,gr,p),Zr(n,"mailto",ld,gr,p),Zr(n,"http",jo,gr,p),Zr(n,"https",jo,gr,p),Zr(n,"ftp",jo,gr,p),Zr(n,"ftps",jo,gr,p),Ci(ld,{scheme:!0,ascii:!0},t),Ci(jo,{slashscheme:!0,ascii:!0},t),e=e.sort((m,g)=>m[0]>g[0]?1:-1);for(let m=0;m<e.length;m++){let g=e[m][0],v=e[m][1]?{[kZ]:!0}:{[xZ]:!0};g.indexOf("-")>=0?v[Hg]=!0:hr.test(g)?mr.test(g)?v[ja]=!0:v[jg]=!0:v[Ug]=!0,O6(n,g,g,v)}return O6(n,"localhost",Ka,{ascii:!0}),n.jd=new Gt(Od),{start:n,tokens:Object.assign({groups:t},q6)}}function W6(e,t){let n=CZ(t.replace(/[A-Z]/g,a=>a.toLowerCase())),i=n.length,r=[],o=0,s=0;for(;s<i;){let a=e,l=null,u=0,c=null,d=-1,f=-1;for(;s<i&&(l=a.go(n[s]));)a=l,a.accepts()?(d=0,f=0,c=a):d>=0&&(d+=n[s].length,f++),u+=n[s].length,o+=n[s].length,s++;o-=d,s-=f,u-=d,r.push({t:c.t,v:t.slice(o-u,o),s:o-u,e:o})}return r}function CZ(e){let t=[],n=e.length,i=0;for(;i<n;){let r=e.charCodeAt(i),o,s=r<55296||r>56319||i+1===n||(o=e.charCodeAt(i+1))<56320||o>57343?e[i]:e.slice(i,i+2);t.push(s),i+=s.length}return t}function Zr(e,t,n,i,r){let o,s=t.length;for(let a=0;a<s-1;a++){let l=t[a];e.j[l]?o=e.j[l]:(o=new Gt(i),o.jr=r.slice(),e.j[l]=o),e=o}return o=new Gt(n),o.jr=r.slice(),e.j[t[s-1]]=o,o}function P6(e){let t=[],n=[],i=0,r="0123456789";for(;i<e.length;){let o=0;for(;r.indexOf(e[i+o])>=0;)o++;if(o>0){t.push(n.join(""));for(let s=parseInt(e.substring(i,i+o),10);s>0;s--)n.pop();i+=o}else n.push(e[i]),i++}return t}var Ja={defaultProtocol:"http",events:null,format:L6,formatHref:L6,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function tb(e,t=null){let n=Object.assign({},Ja);e&&(n=Object.assign(n,e instanceof tb?e.o:e));let i=n.ignoreTags,r=[];for(let o=0;o<i.length;o++)r.push(i[o].toUpperCase());this.o=n,t&&(this.defaultRender=t),this.ignoreTags=r}tb.prototype={o:Ja,ignoreTags:[],defaultRender(e){return e},check(e){return this.get("validate",e.toString(),e)},get(e,t,n){let i=t!=null,r=this.o[e];return r&&(typeof r=="object"?(r=n.t in r?r[n.t]:Ja[e],typeof r=="function"&&i&&(r=r(t,n))):typeof r=="function"&&i&&(r=r(t,n.t,n)),r)},getObj(e,t,n){let i=this.o[e];return typeof i=="function"&&t!=null&&(i=i(t,n.t,n)),i},render(e){let t=e.render(this);return(this.get("render",null,e)||this.defaultRender)(t,e.t,e)}};function L6(e){return e}function V6(e,t){this.t="token",this.v=e,this.tk=t}V6.prototype={isLink:!1,toString(){return this.v},toHref(e){return this.toString()},toFormattedString(e){let t=this.toString(),n=e.get("truncate",t,this),i=e.get("format",t,this);return n&&i.length>n?i.substring(0,n)+"\u2026":i},toFormattedHref(e){return e.get("formatHref",this.toHref(e.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(e=Ja.defaultProtocol){return{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(e),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(e){return{type:this.t,value:this.toFormattedString(e),isLink:this.isLink,href:this.toFormattedHref(e),start:this.startIndex(),end:this.endIndex()}},validate(e){return e.get("validate",this.toString(),this)},render(e){let t=this,n=this.toHref(e.get("defaultProtocol")),i=e.get("formatHref",n,this),r=e.get("tagName",n,t),o=this.toFormattedString(e),s={},a=e.get("className",n,t),l=e.get("target",n,t),u=e.get("rel",n,t),c=e.getObj("attributes",n,t),d=e.getObj("events",n,t);return s.href=i,a&&(s.class=a),l&&(s.target=l),u&&(s.rel=u),c&&Object.assign(s,c),{tagName:r,attributes:s,content:o,eventListeners:d}}};function Rd(e,t){class n extends V6{constructor(r,o){super(r,o),this.t=e}}for(let i in t)n.prototype[i]=t[i];return n.t=e,n}var TZ=Rd("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),F6=Rd("text"),IZ=Rd("nl"),ad=Rd("url",{isLink:!0,toHref(e=Ja.defaultProtocol){return this.hasProtocol()?this.v:`${e}://${this.v}`},hasProtocol(){let e=this.tk;return e.length>=2&&e[0].t!==Ka&&e[1].t===Ti}});var yn=e=>new Gt(e);function AZ({groups:e}){let t=e.domain.concat([wd,Ed,Hr,$d,Cd,Td,Id,Ad,kn,Jg,qa,Md,zd,Dd,jn,Od,Va,Nd]),n=[Sd,Ti,Xg,Un,Yg,qa,Wa,Qg,eb,pd,hd,Za,Ha,cd,ud,dd,fd,md,gd,bd,vd,yd,kd,xd,_d],i=[wd,Sd,Ed,$d,Cd,Td,Id,Ad,kn,Za,Ha,qa,Md,zd,Dd,Wa,jn,Od,Va,Nd],r=yn(),o=P(r,Va);he(o,i,o),he(o,e.domain,o);let s=yn(),a=yn(),l=yn();he(r,e.domain,s),he(r,e.scheme,a),he(r,e.slashscheme,l),he(s,i,o),he(s,e.domain,s);let u=P(s,Hr);P(o,Hr,u),P(a,Hr,u),P(l,Hr,u);let c=P(o,Un);he(c,i,o),he(c,e.domain,o);let d=yn();he(u,e.domain,d),he(d,e.domain,d);let f=P(d,Un);he(f,e.domain,d);let p=yn(TZ);he(f,e.tld,p),he(f,e.utld,p),P(u,Ka,p);let h=P(d,kn);P(h,kn,h),he(h,e.domain,d),he(p,e.domain,d),P(p,Un,f),P(p,kn,h);let m=P(s,kn),g=P(s,Un);P(m,kn,m),he(m,e.domain,s),he(g,i,o),he(g,e.domain,s);let b=yn(ad);he(g,e.tld,b),he(g,e.utld,b),he(b,e.domain,s),he(b,i,o),P(b,Un,g),P(b,kn,m),P(b,Hr,u);let v=P(b,Ti),y=yn(ad);he(v,e.numeric,y);let x=yn(ad),C=yn();he(x,t,x),he(x,n,C),he(C,t,x),he(C,n,C),P(b,jn,x),P(y,jn,x);let A=P(a,Ti),D=P(l,Ti),M=P(D,jn),V=P(M,jn);he(a,e.domain,s),P(a,Un,g),P(a,kn,m),he(l,e.domain,s),P(l,Un,g),P(l,kn,m),he(A,e.domain,x),P(A,jn,x),P(A,Wa,x),he(V,e.domain,x),he(V,t,x),P(V,jn,x);let me=[[Za,Ha],[ud,cd],[dd,fd],[pd,hd],[md,gd],[bd,vd],[yd,kd],[xd,_d]];for(let et=0;et<me.length;et++){let[it,je]=me[et],Me=P(x,it);P(C,it,Me);let se=yn(ad);he(Me,t,se);let I=yn();he(Me,n,I),P(Me,je,x),he(se,t,se),he(se,n,I),he(I,t,se),he(I,n,I),P(se,je,x),P(I,je,x)}return P(r,Ka,b),P(r,Gg,IZ),{start:r,tokens:q6}}function MZ(e,t,n){let i=n.length,r=0,o=[],s=[];for(;r<i;){let a=e,l=null,u=null,c=0,d=null,f=-1;for(;r<i&&!(l=a.go(n[r].t));)s.push(n[r++]);for(;r<i&&(u=l||a.go(n[r].t));)l=null,a=u,a.accepts()?(f=0,d=a):f>=0&&f++,r++,c++;if(f<0)r-=c,r<i&&(s.push(n[r]),r++);else{s.length>0&&(o.push(Bg(F6,t,s)),s=[]),r-=f,c-=f;let p=d.t,h=n.slice(r-c,r);o.push(Bg(p,t,h))}}return s.length>0&&o.push(Bg(F6,t,s)),o}function Bg(e,t,n){let i=n[0].s,r=n[n.length-1].e,o=t.slice(i,r);return new e(o,n)}var zZ=typeof console<"u"&&console&&console.warn||(()=>{}),DZ="until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.",qe={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function K6(){return Gt.groups={},qe.scanner=null,qe.parser=null,qe.tokenQueue=[],qe.pluginQueue=[],qe.customSchemes=[],qe.initialized=!1,qe}function nb(e,t=!1){if(qe.initialized&&zZ(`linkifyjs: already initialized - will not register custom scheme "${e}" ${DZ}`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(e))throw new Error(`linkifyjs: incorrect scheme format.
216
+ 1. Must only contain digits, lowercase ASCII letters or "-"
217
+ 2. Cannot start or end with "-"
218
+ 3. "-" cannot repeat`);qe.customSchemes.push([e,t])}function NZ(){qe.scanner=$Z(qe.customSchemes);for(let e=0;e<qe.tokenQueue.length;e++)qe.tokenQueue[e][1]({scanner:qe.scanner});qe.parser=AZ(qe.scanner.tokens);for(let e=0;e<qe.pluginQueue.length;e++)qe.pluginQueue[e][1]({scanner:qe.scanner,parser:qe.parser});return qe.initialized=!0,qe}function Pd(e){return qe.initialized||NZ(),MZ(qe.parser.start,e,W6(qe.scanner.start,e))}Pd.scan=W6;function rb(e,t=null,n=null){if(t&&typeof t=="object"){if(n)throw Error(`linkifyjs: Invalid link type ${t}; must be a string`);n=t,t=null}let i=new tb(n),r=Pd(e),o=[];for(let s=0;s<r.length;s++){let a=r[s];a.isLink&&(!t||a.t===t)&&i.check(a)&&o.push(a.toFormattedObject(i))}return o}var ib="[\0- \xA0\u1680\u180E\u2000-\u2029\u205F\u3000]",OZ=new RegExp(ib),RZ=new RegExp(`${ib}$`),PZ=new RegExp(ib,"g");function LZ(e){return e.length===1?e[0].isLink:e.length===3&&e[1].isLink?["()","[]"].includes(e[0].value+e[2].value):!1}function FZ(e){return new de({key:new we("autolink"),appendTransaction:(t,n,i)=>{let r=t.some(l=>l.docChanged)&&!n.doc.eq(i.doc),o=t.some(l=>l.getMeta("preventAutolink"));if(!r||o)return;let{tr:s}=i,a=$g(n.doc,[...t]);if(Lo(a).forEach(({newRange:l})=>{let u=FA(i.doc,l,f=>f.isTextblock),c,d;if(u.length>1)c=u[0],d=i.doc.textBetween(c.pos,c.pos+c.node.nodeSize,void 0," ");else if(u.length){let f=i.doc.textBetween(l.from,l.to," "," ");if(!RZ.test(f))return;c=u[0],d=i.doc.textBetween(c.pos,l.to,void 0," ")}if(c&&d){let f=d.split(OZ).filter(Boolean);if(f.length<=0)return!1;let p=f[f.length-1],h=c.pos+d.lastIndexOf(p);if(!p)return!1;let m=Pd(p).map(g=>g.toObject(e.defaultProtocol));if(!LZ(m))return!1;m.filter(g=>g.isLink).map(g=>({...g,from:h+g.start+1,to:h+g.end+1})).filter(g=>i.schema.marks.code?!i.doc.rangeHasMark(g.from,g.to,i.schema.marks.code):!0).filter(g=>e.validate(g.value)).filter(g=>e.shouldAutoLink(g.value)).forEach(g=>{td(g.from,g.to,i.doc).some(b=>b.mark.type===e.type)||s.addMark(g.from,g.to,e.type.create({href:g.href}))})}}),!!s.steps.length)return s}})}function BZ(e){return new de({key:new we("handleClickLink"),props:{handleClick:(t,n,i)=>{if(i.button!==0||!t.editable)return!1;let r=null;if(i.target instanceof HTMLAnchorElement)r=i.target;else{let l=i.target;if(!l)return!1;let u=e.editor.view.dom;r=l.closest("a"),r&&!u.contains(r)&&(r=null)}if(!r)return!1;let o=!1;if(e.enableClickSelection&&(o=e.editor.commands.extendMarkRange(e.type.name)),e.openOnClick){var s,a;let l=Tg(t.state,e.type.name),u=(s=r.href)!==null&&s!==void 0?s:l.href,c=(a=r.target)!==null&&a!==void 0?a:l.target;u&&(window.open(u,c),o=!0)}return o}}})}var UZ=/\[([^[\]]+)\]\(((?:[^\s()]|\([^\s()]*\))+)(?:\s+(?:(["'])(.*?)\3|“(.*?)”|‘(.*?)’))?\)$/,jZ=/\[([^[\]]+)\]\(((?:[^\s()]|\([^\s()]*\))+)(?:\s+(?:(["'])(.*?)\3|“(.*?)”|‘(.*?)’))?\)/g;function J6(e,t){let n=0;for(let i=t-1;i>=0&&e[i]==="\\";i-=1)n+=1;return n%2===1}function ZZ(e,t){let n=0,i=0;for(;i<t;){if(e[i]!=="`"){i+=1;continue}if(n===0&&J6(e,i)){i+=1;continue}let r=0;for(;i<t&&e[i]==="`";)r+=1,i+=1;n===0?n=r:r===n&&(n=0)}return n>0}function G6(e,t,n){var i,r;let[,o,s]=t;return(t.index?e[t.index-1]:void 0)==="!"||J6(e,(i=t.index)!==null&&i!==void 0?i:0)||ZZ(e,(r=t.index)!==null&&r!==void 0?r:0)?!1:!!o.trim()&&n(s)}function X6(e){var t,n;let[i,r,o,,s,a,l]=e,u=(t=s??a)!==null&&t!==void 0?t:l;return{index:(n=e.index)!==null&&n!==void 0?n:0,text:i,replaceWith:r,data:{href:o,title:u||null,markdown:!0}}}function HZ(e,t){return e.index<t.index+t.text.length&&t.index<e.index+e.text.length}function Y6(e){var t,n,i;return{href:(t=e.data)===null||t===void 0?void 0:t.href,title:(n=(i=e.data)===null||i===void 0?void 0:i.title)!==null&&n!==void 0?n:null}}function qZ(e){let t=vn({find:n=>{let i=UZ.exec(n);return!i||!G6(n,i,e.isAllowedHref)?null:X6(i)},type:e.type,getAttributes:Y6});return new Bo({find:t.find,handler:n=>{let i=t.handler(n);return i!==null&&n.state.tr.steps.length&&n.state.tr.setMeta("preventAutolink",!0),i}})}function WZ(e){let t=en({find:n=>{var i,r;let o=[];for(let a of n.matchAll(jZ))G6(n,a,e.isAllowedHref)&&o.push(X6(a));let s=((i=(r=e.findPlainUrls)===null||r===void 0?void 0:r.call(e,n))!==null&&i!==void 0?i:[]).filter(a=>!o.some(l=>HZ(l,a)));return[...o,...s]},type:e.type,getAttributes:Y6});return new zg({find:t.find,handler:n=>{var i;let r=t.handler(n);return r!==null&&n.state.tr.steps.length&&(!((i=n.match.data)===null||i===void 0)&&i.markdown)&&n.state.tr.setMeta("preventAutolink",!0),r}})}function VZ(e){return new de({key:new we("handlePasteLink"),props:{handlePaste:(t,n,i)=>{let{shouldAutoLink:r}=e,{state:o}=t,{selection:s}=o,{empty:a}=s;if(a)return!1;let l="";i.content.forEach(c=>{l+=c.textContent});let u=rb(l,{defaultProtocol:e.defaultProtocol}).find(c=>c.isLink&&c.value===l);return!l||!u||r!==void 0&&!r(u.value)?!1:e.editor.commands.setMark(e.type,{href:u.href})}}})}function br(e,t){let n=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"];return t&&t.forEach(i=>{let r=typeof i=="string"?i:i.scheme;r&&n.push(r)}),!e||e.replace(PZ,"").match(new RegExp(`^(?:(?:${n.map(i=>i.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")).join("|")}):|[^a-z]|[a-z0-9+.\\-]+(?:[^a-z+.\\-:]|$))`,"i"))}var Q6=ct.create({name:"link",priority:1e3,keepOnSplit:!1,exitable:!0,onCreate(){this.options.validate&&!this.options.shouldAutoLink&&(this.options.shouldAutoLink=this.options.validate,console.warn("The `validate` option is deprecated. Rename to the `shouldAutoLink` option instead.")),this.options.protocols.forEach(e=>{if(typeof e=="string"){nb(e);return}nb(e.scheme,e.optionalSlashes)})},onDestroy(){K6()},inclusive(){return this.options.autolink},addOptions(){return{openOnClick:!0,enableClickSelection:!1,linkOnPaste:!0,markdownLinks:!1,autolink:!0,protocols:[],defaultProtocol:"http",HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},isAllowedUri:(e,t)=>!!br(e,t.protocols),validate:e=>!!e,shouldAutoLink:e=>{let t=/^[a-z][a-z0-9+.-]*:\/\//i.test(e),n=/^[a-z][a-z0-9+.-]*:/i.test(e);if(t||n&&!e.includes("@"))return!0;let i=(e.includes("@")?e.split("@").pop():e).split(/[/?#:]/)[0];return!(/^\d{1,3}(\.\d{1,3}){3}$/.test(i)||!/\./.test(i))}}},addAttributes(){var e,t,n;return{href:{default:null,parseHTML(i){return i.getAttribute("href")}},target:{default:(e=this.options.HTMLAttributes.target)!==null&&e!==void 0?e:null},rel:{default:(t=this.options.HTMLAttributes.rel)!==null&&t!==void 0?t:null},class:{default:(n=this.options.HTMLAttributes.class)!==null&&n!==void 0?n:null},title:{default:null}}},parseHTML(){return[{tag:"a[href]",getAttrs:e=>{let t=e.getAttribute("href");return!t||!this.options.isAllowedUri(t,{defaultValidate:n=>!!br(n,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:null}}]},renderHTML({HTMLAttributes:e}){return this.options.isAllowedUri(e.href,{defaultValidate:t=>!!br(t,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?["a",fe(this.options.HTMLAttributes,e),0]:["a",fe(this.options.HTMLAttributes,{...e,href:""}),0]},markdownTokenName:"link",parseMarkdown:(e,t)=>t.applyMark("link",t.parseInline(e.tokens||[]),{href:e.href,title:e.title||null}),renderMarkdown:(e,t)=>{var n,i,r,o;let s=(n=(i=e.attrs)===null||i===void 0?void 0:i.href)!==null&&n!==void 0?n:"",a=(r=(o=e.attrs)===null||o===void 0?void 0:o.title)!==null&&r!==void 0?r:"",l=t.renderChildren(e);return a?`[${l}](${s} "${a}")`:`[${l}](${s})`},addCommands(){return{setLink:e=>({chain:t})=>{let{href:n}=e;return this.options.isAllowedUri(n,{defaultValidate:i=>!!br(i,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?t().setMark(this.name,e).setMeta("preventAutolink",!0).run():!1},toggleLink:e=>({chain:t})=>{let{href:n}=e||{};return n&&!this.options.isAllowedUri(n,{defaultValidate:i=>!!br(i,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:t().toggleMark(this.name,e,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()},unsetLink:()=>({chain:e})=>e().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addInputRules(){return this.options.markdownLinks?[qZ({type:this.type,isAllowedHref:e=>this.options.isAllowedUri(e,{defaultValidate:t=>!!br(t,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})})]:[]},addPasteRules(){let e=t=>{let n=[];if(t){let{protocols:i,defaultProtocol:r}=this.options;rb(t).filter(o=>o.isLink&&this.options.isAllowedUri(o.value,{defaultValidate:s=>!!br(s,i),protocols:i,defaultProtocol:r})).forEach(o=>{this.options.shouldAutoLink(o.value)&&n.push({text:o.value,data:{href:o.href},index:o.start})})}return n};return this.options.markdownLinks?[WZ({type:this.type,isAllowedHref:t=>this.options.isAllowedUri(t,{defaultValidate:n=>!!br(n,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol}),findPlainUrls:e})]:[en({find:e,type:this.type,getAttributes:t=>{var n;return{href:(n=t.data)===null||n===void 0?void 0:n.href}}})]},addProseMirrorPlugins(){let e=[],{protocols:t,defaultProtocol:n}=this.options;return this.options.autolink&&e.push(FZ({type:this.type,defaultProtocol:this.options.defaultProtocol,validate:i=>this.options.isAllowedUri(i,{defaultValidate:r=>!!br(r,t),protocols:t,defaultProtocol:n}),shouldAutoLink:this.options.shouldAutoLink})),e.push(BZ({type:this.type,editor:this.editor,openOnClick:this.options.openOnClick==="whenNotEditable"?!0:this.options.openOnClick,enableClickSelection:this.options.enableClickSelection})),this.options.linkOnPaste&&e.push(VZ({editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type,shouldAutoLink:this.options.shouldAutoLink})),e}});var KZ="listItem",eM="textStyle",tM=/^\s*([-+*])\s$/,sb=ae.create({name:"bulletList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:"ul"}]},renderHTML({HTMLAttributes:e}){return["ul",fe(this.options.HTMLAttributes,e),0]},markdownTokenName:"list",parseMarkdown:(e,t)=>e.type!=="list"||e.ordered?[]:{type:"bulletList",content:e.items?t.parseChildren(e.items):[]},renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,`
219
+ `):"",markdownOptions:{indentsContent:!0},addCommands(){return{toggleBulletList:()=>({commands:e,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(KZ,this.editor.getAttributes(eM)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let e=jr({find:tM,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(e=jr({find:tM,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(eM),editor:this.editor})),[e]}}),JZ=(e,t,n)=>{let{selection:i}=e;if(!i.empty)return null;let{$from:r}=i;if(!r.parent.isTextblock||r.parentOffset!==r.parent.content.size)return null;let o=-1;for(let p=r.depth;p>0;p-=1)if(r.node(p).type.name===t){o=p;break}if(o<0)return null;let s=r.node(o),a=r.index(o);if(a+1>=s.childCount)return null;let l=s.child(a+1);if(!n.includes(l.type.name))return null;let u=e.schema.nodes[t],c=!1;if(l.forEach(p=>{p.type===u&&p.childCount>1&&(c=!0)}),!c)return null;let d=e.doc.resolve(r.after()).nodeAfter;if(!d||!n.includes(d.type.name))return null;let f=[];return d.forEach(p=>{f.push(p)}),f.length===0?null:{listItemDepth:o,nestedList:d,nestedListPos:r.after(),insertPos:r.after(o),items:f}},GZ=(e,t,n,i)=>{let r=JZ(e,n,i);if(!r)return!1;let{selection:o}=e,{nestedList:s,nestedListPos:a,insertPos:l,items:u}=r,c=e.tr;c.delete(a,a+s.nodeSize);let d=c.mapping.map(l);return c.insert(d,z.from(u)),c.setSelection(o.map(c.doc,c.mapping)),t&&t(c),!0},XZ=(e,t,n)=>GZ(e.state,e.view.dispatch,t,n),aM=(e,t)=>Te.create({name:`${e}BranchingDeleteKeymap`,priority:101,addKeyboardShortcuts(){let n=()=>XZ(this.editor,e,t);return{Delete:n,"Mod-Delete":n}}}),lM=[[1e3,"m"],[900,"cm"],[500,"d"],[400,"cd"],[100,"c"],[90,"xc"],[50,"l"],[40,"xl"],[10,"x"],[9,"ix"],[5,"v"],[4,"iv"],[1,"i"]],Ld="abcdefghijklmnopqrstuvwxyz",uM=String.raw`\d+|[ivxlcdmIVXLCDM]+|${"[a-zA-Z]{1,2}"}`;function Bd(e){let t=e,n="";for(let[i,r]of lM)for(;t>=i;)n+=r,t-=i;return n}function ab(e){return Bd(e).toUpperCase()}function cM(e){let t=e.toLowerCase(),n=0,i=0;for(;n<t.length;){let r=!1;for(let[o,s]of lM)if(t.startsWith(s,n)){i+=o,n+=s.length,r=!0;break}if(!r)return 0}return i}function YZ(e){if(!/^[ivxlcdmIVXLCDM]+$/.test(e))return!1;let t=cM(e);return t<=0?!1:(e===e.toLowerCase()?Bd(t):ab(t))===e}function QZ(e){let t=e.toLowerCase();if(t.length===1)return t.charCodeAt(0)-97+1;if(t.length===2){let n=t.charCodeAt(0)-97,i=t.charCodeAt(1)-97;return(n+1)*26+i+1}return 0}function Fd(e){if(e<=26)return Ld[e-1];let t=Math.floor((e-1)/26)-1,n=(e-1)%26;return t<0?Ld[n]:Ld[t]+Ld[n]}function Ud(e){if(!(!e||/^\d+$/.test(e))){if(YZ(e))return e===e.toLowerCase()?"i":"I";if(/^[a-z]{1,2}$/.test(e))return"a";if(/^[A-Z]{1,2}$/.test(e))return"A"}}function lb(e){if(/^\d+$/.test(e))return parseInt(e,10);let t=Ud(e);if(t==="i"||t==="I")return cM(e);if(t==="a"||t==="A"){let i=QZ(e);return i>0?i:1}let n=parseInt(e,10);return Number.isNaN(n)?1:n}function e7(e,t){if(e==="numeric")return String(t);switch(e){case"a":return Fd(t);case"A":return Fd(t).toUpperCase();case"i":return Bd(t);case"I":return ab(t);default:return String(t)}}function t7(e){var t;if(e.length===0)return!1;let n=(t=Ud(e[0]))!==null&&t!==void 0?t:"numeric",i=lb(e[0]);if(i<1)return!1;for(let r=0;r<e.length;r++){let o=e7(n,i+r);if(e[r]!==o)return!1}return!0}function n7(e){return{type:Ud(e),start:lb(e)}}function r7(e){let{type:t,start:n}=n7(e),i={};return t&&(i.type=t),n!==1&&(i.start=n),i}function i7(e,t,n=". "){let i=t+1;if(!e||e==="1")return`${i}${n}`;switch(e){case"a":return`${Fd(i)}${n}`;case"A":return`${Fd(i).toUpperCase()}${n}`;case"i":return`${Bd(i)}${n}`;case"I":return`${ab(i)}${n}`;default:return`${i}${n}`}}function o7(e){var t,n;let i=(t=e.tokens)===null||t===void 0?void 0:t[0];return!!(e.text&&((n=e.tokens)===null||n===void 0?void 0:n.length)===1&&i?.type==="list"&&i.ordered&&i.raw===e.text)}function s7(e,t){return t.tokenizeInline?t.parseInline(t.tokenizeInline(e)):t.parseInline([{type:"text",raw:e,text:e}])}var ub=ae.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:e}){return["li",fe(this.options.HTMLAttributes,e),0]},markdownTokenName:"list_item",parseMarkdown:(e,t)=>{var n;if(e.type!=="list_item")return[];let i=(n=t.parseBlockChildren)!==null&&n!==void 0?n:t.parseChildren,r=[];if(e.tokens&&e.tokens.length>0){if(o7(e))return{type:"listItem",content:[{type:"paragraph",content:s7(e.text||"",t)}]};if(e.tokens.some(o=>o.type==="paragraph"))r=i(e.tokens);else{let o=e.tokens[0];if(o&&o.type==="text"&&o.tokens&&o.tokens.length>0){if(r=[{type:"paragraph",content:t.parseInline(o.tokens)}],e.tokens.length>1){let s=i(e.tokens.slice(1));r.push(...s)}}else r=i(e.tokens)}}return r.length===0&&(r=[{type:"paragraph",content:[]}]),{type:"listItem",content:r}},renderMarkdown:(e,t,n)=>Ag(e,t,i=>{if(i.parentType==="bulletList")return"- ";if(i.parentType==="orderedList"){var r,o;let s=((r=i.meta)===null||r===void 0||(r=r.parentAttrs)===null||r===void 0?void 0:r.start)||1;return i7((o=i.meta)===null||o===void 0||(o=o.parentAttrs)===null||o===void 0?void 0:o.type,s-1+(i.index||0),". ")}return"- "},n,{alignNestedToPrefix:n?.parentType==="orderedList"}),addExtensions(){return[aM(this.name,[this.options.bulletListTypeName,this.options.orderedListTypeName])]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),cb=(e,t)=>{let{$from:n}=t.selection,i=ut(e,t.schema),r=null,o=n.depth,s=n.pos,a=null;for(;o>0&&a===null;)r=n.node(o),r.type===i?a=o:(o-=1,s-=1);return a===null?null:{$pos:t.doc.resolve(s),depth:a}},dM=(e,t)=>{let n=cb(e,t);if(!n)return!1;let[,i]=qA(t,e,n.$pos.pos+4);return i},a7=(e,t,n)=>{let{$anchor:i}=e.selection,r=Math.max(0,i.pos-2),o=e.doc.resolve(r).node();return!(!o||!n.includes(o.type.name))},nM=(e,t,n)=>{if(e.commands.undoInputRule())return!0;if(e.state.selection.from!==e.state.selection.to)return!1;if(!Bn(e.state,t)&&a7(e.state,t,n)){let{$anchor:o}=e.state.selection,s=e.state.doc.resolve(o.before()-1),a=[];s.node().descendants((c,d)=>{c.type.name===t&&a.push({node:c,pos:d})});let l=a.at(-1);if(!l)return!1;let u=e.state.doc.resolve(s.start()+l.pos+1);return e.chain().cut({from:o.start()-1,to:o.end()+1},u.end()).joinForward().run()}if(!Bn(e.state,t)||!KA(e.state))return!1;let{$from:i}=e.state.selection,r=i.depth-1;return i.node(r).type!==e.schema.nodes[t]||i.index(r)!==0?!1:e.chain().liftListItem(t).run()},l7=(e,t)=>{let n=dM(e,t),i=cb(e,t);return!i||!n?!1:n>i.depth},u7=(e,t)=>{let n=dM(e,t),i=cb(e,t);return!i||!n?!1:n<i.depth},rM=(e,t)=>{if(!Bn(e.state,t)||!VA(e.state,t))return!1;let{selection:n}=e.state,{$from:i,$to:r}=n;return!n.empty&&i.sameParent(r)?!1:l7(t,e.state)?e.chain().focus(e.state.selection.from+4).lift(t).joinBackward().run():u7(t,e.state)?e.chain().joinForward().joinBackward().run():e.commands.joinItemForward()},c7=(e,t,n)=>{let{state:i}=e,{selection:r}=i;if(!r.empty)return!1;let{$from:o}=r;if(o.parentOffset!==0||!o.parent.isTextblock||Bn(i,t))return!1;let s=WA(o);if(!s||!n.includes(s.type.name))return!1;let a=s.lastChild;if(!a||a.type.name!==t)return!1;let l=o.parent;if(!a.canReplace(a.childCount,a.childCount,z.from(l)))return!1;let u=o.before(),c=o.after(),d=u-2;return e.commands.command(({tr:f,dispatch:p})=>(p&&(f.delete(u,c).insert(d,z.from(l)),f.setSelection(q.create(f.doc,d+1)),f.scrollIntoView()),!0))};var db=Te.create({name:"listKeymap",addOptions(){return{listTypes:[{itemName:"listItem",wrapperNames:["bulletList","orderedList"]},{itemName:"taskItem",wrapperNames:["taskList"]}]}},addKeyboardShortcuts(){return{Delete:({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n})=>{e.state.schema.nodes[n]!==void 0&&rM(e,n)&&(t=!0)}),t},"Mod-Delete":({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n})=>{e.state.schema.nodes[n]!==void 0&&rM(e,n)&&(t=!0)}),t},Backspace:({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n,wrapperNames:i})=>{e.state.schema.nodes[n]!==void 0&&nM(e,n,i)&&(t=!0)}),t},"Mod-Backspace":({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n,wrapperNames:i})=>{e.state.schema.nodes[n]!==void 0&&nM(e,n,i)&&(t=!0)}),t},Tab:({editor:e})=>{for(let{itemName:t,wrapperNames:n}of this.options.listTypes)if(e.state.schema.nodes[t]!==void 0&&c7(e,t,n))return!0;return!1}}}}),ob=new RegExp(`^(\\s*)(${uM})([.)])\\s+(.*)$`),d7=/^\s/,Zo={heading:/^#{1,6}(?:\s|$)/,bulletItem:/^[-+*]\s+/,codeFence:/^(?:```|~~~)/,blockMath:/^\$\$/,thematicBreak:/^(?:(?:-[ \t]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})$/};function f7(e){return ob.test(e.trimStart())}function p7(e){let t=e.trimStart();return Zo.bulletItem.test(t)||f7(t)||Zo.heading.test(t)||Zo.thematicBreak.test(t)&&!t.startsWith("-")||/^>\s?/.test(t)||Zo.codeFence.test(t)||Zo.blockMath.test(t)}function h7(e){return Object.values(Zo).some(t=>t.test(e))}function m7(e){let t=[],n=[],i=!1;return e.forEach(r=>{if(i){n.push(r);return}if(r.trim()===""){i=!0,n.push(r);return}if(t.length>0&&p7(r)){i=!0,n.push(r);return}t.push(r)}),{paragraphLines:t,blockLines:n}}function g7(e){let t=[],n=0,i=0;for(;n<e.length;){let r=e[n],o=r.match(ob);if(!o)break;let[,s,a,l,u]=o,c=s.length,d=parseInt(a,10),f=isNaN(d)?Ud(a):void 0,p=isNaN(d)?lb(a):d,h=[u],m=n+1,g=[r],b=!1;for(;m<e.length;){let v=e[m];if(v.match(ob))break;if(v.trim()==="")g.push(v),h.push(""),b=!0,m+=1;else if(v.match(d7)){let y=v.length-v.trimStart().length,x=c+a.length+1;g.push(v),h.push(v.slice(Math.min(y,x))),m+=1}else{if(b||h7(v))break;g.push(v),h.push(v),m+=1}}t.push({indent:c,number:p,type:f,content:h.join(`
220
+ `).trim(),contentLines:h,raw:g.join(`
221
+ `)}),i=m,n=m}return[t,i]}var b7=new RegExp(`^(${uM})([.)])\\s+(.+)$`);function v7(e){let t=e.split(`
222
+ `).filter(i=>i.trim().length>0);if(t.length===0)return null;let n=[];for(let i of t){let r=i.trim().match(b7);if(!r)return null;n.push({marker:r[1],content:r[3]})}return t7(n.map(i=>i.marker))?{type:"orderedList",attrs:r7(n[0].marker),content:n.map(i=>({type:"listItem",content:[{type:"paragraph",content:[{type:"text",text:i.content}]}]}))}:null}function fM(e,t,n){let i=[],r=0;for(;r<e.length;){let o=e[r];if(o.indent===t){let{paragraphLines:s,blockLines:a}=m7(o.contentLines),l=s.join(`
223
+ `).trim(),u=[];l&&u.push({type:"paragraph",raw:l,tokens:n.inlineTokens(l)});let c=a.join(`
224
+ `).trim();if(c){let p=n.blockTokens(c);u.push(...p)}let d=r+1,f=[];for(;d<e.length&&e[d].indent>t;)f.push(e[d]),d+=1;if(f.length>0){let p=fM(f,Math.min(...f.map(h=>h.indent)),n);u.push({type:"list",ordered:!0,start:f[0].number,typeMarker:f[0].type,items:p,raw:f.map(h=>h.raw).join(`
225
+ `)})}i.push({type:"list_item",raw:o.raw,tokens:u}),r=d}else r+=1}return i}function y7(e,t){return e.map(n=>{if(n.type!=="list_item")return t.parseChildren([n])[0];let i=[];return n.tokens&&n.tokens.length>0&&n.tokens.forEach(r=>{if(r.type==="paragraph"||r.type==="list"||r.type==="blockquote"||r.type==="code")i.push(...t.parseChildren([r]));else if(r.type==="text"&&r.tokens){let o=t.parseChildren([r]);i.push({type:"paragraph",content:o})}else{let o=t.parseChildren([r]);o.length>0&&i.push(...o)}}),{type:"listItem",content:i}})}var k7="listItem",iM="textStyle",oM=/^(\d+)\.\s$/;function sM(e){let t=e.match(/list-style-type\s*:\s*([^;]+)/i);if(!t)return null;switch(t[1].trim().toLowerCase()){case"upper-roman":return"I";case"lower-roman":return"i";case"upper-alpha":case"upper-latin":return"A";case"lower-alpha":case"lower-latin":return"a";default:return null}}var fb=ae.create({name:"orderedList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes(){return{start:{default:1,parseHTML:e=>e.hasAttribute("start")?parseInt(e.getAttribute("start")||"",10):1},type:{default:null,parseHTML:e=>{let t=e.getAttribute("type");if(t)return t;let n=e.getAttribute("style");if(n){let r=sM(n);if(r)return r}let i=e.querySelector("li");if(i){let r=i.getAttribute("style");if(r){let o=sM(r);if(o)return o}}return null}}}},parseHTML(){return[{tag:"ol"}]},renderHTML({HTMLAttributes:e}){let{start:t,type:n,...i}=e,r=fe(this.options.HTMLAttributes,i);return t!==1&&(r.start=t),n&&n!=="1"&&(r.type=n),["ol",r,0]},markdownTokenName:"list",parseMarkdown:(e,t)=>{if(e.type!=="list"||!e.ordered)return[];let n=e.start||1,i=e.typeMarker,r=e.items?y7(e.items,t):[],o={};return n!==1&&(o.start=n),i&&(o.type=i),Object.keys(o).length>0?{type:"orderedList",attrs:o,content:r}:{type:"orderedList",content:r}},renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,`
226
+ `):"",markdownTokenizer:{name:"orderedList",level:"block",start:()=>-1,tokenize:(e,t,n)=>{var i,r;let o=e.split(`
227
+ `),[s,a]=g7(o);if(s.length===0)return;let l=fM(s,s[0].indent,n);if(l.length!==0)return{type:"list",ordered:!0,start:((i=s[0])===null||i===void 0?void 0:i.number)||1,typeMarker:(r=s[0])===null||r===void 0?void 0:r.type,items:l,raw:o.slice(0,a).join(`
228
+ `)}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleOrderedList:()=>({commands:e,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(k7,this.editor.getAttributes(iM)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addProseMirrorPlugins(){return[new de({props:{handlePaste:(e,t)=>{var n,i;let r=(n=t.clipboardData)===null||n===void 0?void 0:n.getData("text/html");if(r?.trim())return!1;let o=(i=t.clipboardData)===null||i===void 0?void 0:i.getData("text/plain");if(!o)return!1;let s=v7(o);if(!s)return!1;try{let a=e.state.schema.nodeFromJSON(s),l=e.state.tr.replaceSelectionWith(a);return e.dispatch(l),!0}catch{return!1}}}})]},addInputRules(){let e=(n,i)=>(!i.attrs.type||i.attrs.type==="1")&&i.childCount+i.attrs.start===+n[1],t=jr({find:oM,type:this.type,getAttributes:n=>({start:+n[1]}),joinPredicate:e});return(this.options.keepMarks||this.options.keepAttributes)&&(t=jr({find:oM,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:n=>({start:+n[1],...this.editor.getAttributes(iM)}),joinPredicate:e,editor:this.editor})),[t]}}),x7=/^\s*(\[([( |x])?\])\s$/,_7="position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0",w7=(e,t,n)=>{var i;return(n==null||(i=n.checkboxLabel)===null||i===void 0?void 0:i.call(n,e,t))||`Task item checkbox for ${e.textContent||"empty task item"}`},S7=ae.create({name:"taskItem",addOptions(){return{nested:!1,HTMLAttributes:{},taskListTypeName:"taskList",a11y:void 0}},content(){return this.options.nested?"paragraph block*":"paragraph+"},defining:!0,addAttributes(){return{checked:{default:!1,keepOnSplit:!1,parseHTML:e=>{let t=e.getAttribute("data-checked");return t===""||t==="true"},renderHTML:e=>({"data-checked":e.checked})}}},parseHTML(){return[{tag:`li[data-type="${this.name}"]`,priority:51,contentElement:e=>{var t;return(t=e.querySelector("div"))!==null&&t!==void 0?t:e}}]},renderHTML({node:e,HTMLAttributes:t}){return["li",fe(this.options.HTMLAttributes,t,{"data-type":this.name}),["label",["input",{type:"checkbox",checked:e.attrs.checked?"checked":null}],["span"]],["div",0]]},parseMarkdown:(e,t)=>{let n=[];if(e.tokens&&e.tokens.length>0?n.push(t.createNode("paragraph",{},t.parseInline(e.tokens))):e.text?n.push(t.createNode("paragraph",{},[t.createNode("text",{text:e.text})])):n.push(t.createNode("paragraph",{},[])),e.nestedTokens&&e.nestedTokens.length>0){let i=t.parseChildren(e.nestedTokens);n.push(...i)}return t.createNode("taskItem",{checked:e.checked||!1},n)},renderMarkdown:(e,t)=>{var n;let i=`- [${!((n=e.attrs)===null||n===void 0)&&n.checked?"x":" "}] `;return Ag(e,t,i)},addExtensions(){return this.options.nested?[aM(this.name,[this.options.taskListTypeName])]:[]},addKeyboardShortcuts(){let e={Enter:()=>this.editor.commands.splitListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)};return this.options.nested?{...e,Tab:()=>this.editor.commands.sinkListItem(this.name)}:e},addNodeView(){return({node:e,HTMLAttributes:t,getPos:n,editor:i})=>{let r=document.createElement("li"),o=document.createElement("label"),s=document.createElement("span"),a=document.createElement("input"),l=document.createElement("div");s.style.cssText=_7;let u=d=>{let f=w7(d,d.attrs.checked,this.options.a11y);a.setAttribute("aria-label",f),s.textContent=f};u(e),o.contentEditable="false",a.type="checkbox",a.addEventListener("mousedown",d=>d.preventDefault()),a.addEventListener("change",d=>{if(!i.isEditable&&!this.options.onReadOnlyChecked){a.checked=!a.checked;return}let{checked:f}=d.target;i.isEditable&&typeof n=="function"&&i.chain().focus(void 0,{scrollIntoView:!1}).command(({tr:p})=>{let h=n();if(typeof h!="number")return!1;let m=p.doc.nodeAt(h);return p.setNodeMarkup(h,void 0,{...m?.attrs,checked:f}),!0}).run(),!i.isEditable&&this.options.onReadOnlyChecked&&(this.options.onReadOnlyChecked(e,f)||(a.checked=!a.checked))}),Object.entries(this.options.HTMLAttributes).forEach(([d,f])=>{r.setAttribute(d,f)}),r.dataset.checked=e.attrs.checked,a.checked=e.attrs.checked,o.append(a,s),r.append(o,l),Object.entries(t).forEach(([d,f])=>{r.setAttribute(d,f)});let c=new Set(Object.keys(t));return{dom:r,contentDOM:l,update:d=>{if(d.type!==this.type)return!1;r.dataset.checked=d.attrs.checked,a.checked=d.attrs.checked,u(d);let f=i.extensionManager.attributes,p=Ur(d,f),h=new Set(Object.keys(p)),m=this.options.HTMLAttributes;return c.forEach(g=>{h.has(g)||(g in m?r.setAttribute(g,m[g]):r.removeAttribute(g))}),Object.entries(p).forEach(([g,b])=>{b==null?g in m?r.setAttribute(g,m[g]):r.removeAttribute(g):r.setAttribute(g,b)}),c=h,!0}}}},addInputRules(){return[jr({find:x7,type:this.type,getAttributes:e=>({checked:e[e.length-1]==="x"})})]}}),E7=ae.create({name:"taskList",addOptions(){return{itemTypeName:"taskItem",HTMLAttributes:{}}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:`ul[data-type="${this.name}"]`,priority:51}]},renderHTML({HTMLAttributes:e}){return["ul",fe(this.options.HTMLAttributes,e,{"data-type":this.name}),0]},parseMarkdown:(e,t)=>t.createNode("taskList",{},t.parseChildren(e.items||[])),renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,`
229
+ `):"",markdownTokenizer:{name:"taskList",level:"block",start(e){var t;let n=(t=e.match(/^\s*[-+*]\s+\[([ xX])\]\s+/))===null||t===void 0?void 0:t.index;return n!==void 0?n:-1},tokenize(e,t,n){let i=o=>{let s=Ig(o,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:a=>({indentLevel:a[1].length,mainContent:a[4],checked:a[3].toLowerCase()==="x"}),createToken:(a,l)=>({type:"taskItem",raw:"",mainContent:a.mainContent,indentLevel:a.indentLevel,checked:a.checked,text:a.mainContent,tokens:n.inlineTokens(a.mainContent),nestedTokens:l}),customNestedParser:i},n);if(s){let a={type:"taskList",raw:s.raw,items:s.items},l=o.slice(s.raw.length);return l.trim()?[a,...n.blockTokens(l)]:[a]}return n.blockTokens(o)},r=Ig(e,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:o=>({indentLevel:o[1].length,mainContent:o[4],checked:o[3].toLowerCase()==="x"}),createToken:(o,s)=>({type:"taskItem",raw:"",mainContent:o.mainContent,indentLevel:o.indentLevel,checked:o.checked,text:o.mainContent,tokens:n.inlineTokens(o.mainContent),nestedTokens:s}),customNestedParser:i},n);if(r)return{type:"taskList",raw:r.raw,items:r.items}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleTaskList:()=>({commands:e})=>e.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}}),jre=Te.create({name:"listKit",addExtensions(){let e=[];return this.options.bulletList!==!1&&e.push(sb.configure(this.options.bulletList)),this.options.listItem!==!1&&e.push(ub.configure(this.options.listItem)),this.options.listKeymap!==!1&&e.push(db.configure(this.options.listKeymap)),this.options.orderedList!==!1&&e.push(fb.configure(this.options.orderedList)),this.options.taskItem!==!1&&e.push(S7.configure(this.options.taskItem)),this.options.taskList!==!1&&e.push(E7.configure(this.options.taskList)),e}});var jd="&nbsp;",pb="\xA0",pM=ae.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:e}){return["p",fe(this.options.HTMLAttributes,e),0]},parseMarkdown:(e,t)=>{let n=e.tokens||[];if(n.length===1&&n[0].type==="image")return t.parseChildren([n[0]]);let i=t.parseInline(n);return n.length===1&&n[0].type==="text"&&(n[0].raw===jd||n[0].text===jd||n[0].raw===pb||n[0].text===pb)&&i.length===1&&i[0].type==="text"&&(i[0].text===jd||i[0].text===pb)?t.createNode("paragraph",void 0,[]):t.createNode("paragraph",void 0,i)},renderMarkdown:(e,t,n)=>{if(!e)return"";let i=Array.isArray(e.content)?e.content:[];if(i.length===0){var r,o;let s=Array.isArray(n==null||(r=n.previousNode)===null||r===void 0?void 0:r.content)?n.previousNode.content:[];return(n==null||(o=n.previousNode)===null||o===void 0?void 0:o.type)==="paragraph"&&s.length===0?jd:""}return t.renderChildren(i)},addCommands(){return{setParagraph:()=>({commands:e})=>e.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}});var $7=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,C7=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,hM=ct.create({name:"strike",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:e=>e.includes("line-through")?{}:!1}]},renderHTML({HTMLAttributes:e}){return["s",fe(this.options.HTMLAttributes,e),0]},markdownTokenName:"del",parseMarkdown:(e,t)=>t.applyMark("strike",t.parseInline(e.tokens||[])),renderMarkdown:(e,t)=>`~~${t.renderChildren(e)}~~`,addCommands(){return{setStrike:()=>({commands:e})=>e.setMark(this.name),toggleStrike:()=>({commands:e})=>e.toggleMark(this.name),unsetStrike:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[vn({find:$7,type:this.type})]},addPasteRules(){return[en({find:C7,type:this.type})]}});var mM=ae.create({name:"text",group:"inline",parseMarkdown:e=>({type:"text",text:e.text||""}),renderMarkdown:e=>e.text||""});var gM=ct.create({name:"underline",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:e=>e.includes("underline")?{}:!1}]},renderHTML({HTMLAttributes:e}){return["u",fe(this.options.HTMLAttributes,e),0]},parseMarkdown(e,t){return t.applyMark(this.name||"underline",t.parseInline(e.tokens||[]))},renderMarkdown(e,t){return`++${t.renderChildren(e)}++`},markdownTokenizer:{name:"underline",level:"inline",start(e){return e.indexOf("++")},tokenize(e,t,n){let i=/^(\+\+)([\s\S]+?)(\+\+)/.exec(e);if(!i)return;let r=i[2].trim();return{type:"underline",raw:i[0],text:r,tokens:n.inlineTokens(r)}}},addCommands(){return{setUnderline:()=>({commands:e})=>e.setMark(this.name),toggleUnderline:()=>({commands:e})=>e.toggleMark(this.name),unsetUnderline:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}});function bM(e={}){return new de({view(t){return new hb(t,e)}})}var hb=class{constructor(t,n){var i;this.editorView=t,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=(i=n.width)!==null&&i!==void 0?i:1,this.color=n.color===!1?void 0:n.color||"black",this.class=n.class,this.handlers=["dragover","dragend","drop","dragleave"].map(r=>{let o=s=>{this[r](s)};return t.dom.addEventListener(r,o),{name:r,handler:o}})}destroy(){this.handlers.forEach(({name:t,handler:n})=>this.editorView.dom.removeEventListener(t,n))}update(t,n){this.cursorPos!=null&&n.doc!=t.state.doc&&(this.cursorPos>t.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(t){t!=this.cursorPos&&(this.cursorPos=t,t==null?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let t=this.editorView.state.doc.resolve(this.cursorPos),n=!t.parent.inlineContent,i,r=this.editorView.dom,o=r.getBoundingClientRect(),s=o.width/r.offsetWidth,a=o.height/r.offsetHeight;if(n){let d=t.nodeBefore,f=t.nodeAfter;if(d||f){let p=this.editorView.nodeDOM(this.cursorPos-(d?d.nodeSize:0));if(p){let h=p.getBoundingClientRect(),m=d?h.bottom:h.top;d&&f&&(m=(m+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2);let g=this.width/2*a;i={left:h.left,right:h.right,top:m-g,bottom:m+g}}}}if(!i){let d=this.editorView.coordsAtPos(this.cursorPos),f=this.width/2*s;i={left:d.left-f,right:d.left+f,top:d.top,bottom:d.bottom}}let l=this.editorView.dom.offsetParent;this.element||(this.element=l.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none;",this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle("prosemirror-dropcursor-block",n),this.element.classList.toggle("prosemirror-dropcursor-inline",!n);let u,c;if(!l||l==document.body&&getComputedStyle(l).position=="static")u=-pageXOffset,c=-pageYOffset;else{let d=l.getBoundingClientRect(),f=d.width/l.offsetWidth,p=d.height/l.offsetHeight;u=d.left-l.scrollLeft*f,c=d.top-l.scrollTop*p}this.element.style.left=(i.left-u)/s+"px",this.element.style.top=(i.top-c)/a+"px",this.element.style.width=(i.right-i.left)/s+"px",this.element.style.height=(i.bottom-i.top)/a+"px"}scheduleRemoval(t){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),t)}dragover(t){if(!this.editorView.editable)return;let n=this.editorView.posAtCoords({left:t.clientX,top:t.clientY}),i=n&&n.inside>=0&&this.editorView.state.doc.nodeAt(n.inside),r=i&&i.type.spec.disableDropCursor,o=typeof r=="function"?r(this.editorView,n,t):r;if(n&&!o){let s=n.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let a=Tc(this.editorView.state.doc,s,this.editorView.dragging.slice);a!=null&&(s=a)}this.setCursor(s),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(t){this.editorView.dom.contains(t.relatedTarget)||this.setCursor(null)}};var Pt=class e extends X{constructor(t){super(t,t)}map(t,n){let i=t.resolve(n.map(this.head));return e.valid(i)?new e(i):X.near(i)}content(){return B.empty}eq(t){return t instanceof e&&t.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(t,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for GapCursor.fromJSON");return new e(t.resolve(n.pos))}getBookmark(){return new mb(this.anchor)}static valid(t){let n=t.parent;if(n.inlineContent||!T7(t)||!I7(t))return!1;let i=n.type.spec.allowGapCursor;if(i!=null)return i;let r=n.contentMatchAt(t.index()).defaultType;return r&&r.isTextblock}static findGapCursorFrom(t,n,i=!1){e:for(;;){if(!i&&e.valid(t))return t;let r=t.pos,o=null;for(let s=t.depth;;s--){let a=t.node(s);if(n>0?t.indexAfter(s)<a.childCount:t.index(s)>0){o=a.child(n>0?t.indexAfter(s):t.index(s)-1);break}else if(s==0)return null;r+=n;let l=t.doc.resolve(r);if(e.valid(l))return l}for(;;){let s=n>0?o.firstChild:o.lastChild;if(!s){if(o.isAtom&&!o.isText&&!G.isSelectable(o)){t=t.doc.resolve(r+o.nodeSize*n),i=!1;continue e}break}o=s,r+=n;let a=t.doc.resolve(r);if(e.valid(a))return a}return null}}};Pt.prototype.visible=!1;Pt.findFrom=Pt.findGapCursorFrom;X.jsonID("gapcursor",Pt);var mb=class e{constructor(t){this.pos=t}map(t){return new e(t.map(this.pos))}resolve(t){let n=t.resolve(this.pos);return Pt.valid(n)?new Pt(n):X.near(n)}};function vM(e){return e.isAtom||e.spec.isolating||e.spec.createGapCursor}function T7(e){for(let t=e.depth;t>=0;t--){let n=e.index(t),i=e.node(t);if(n==0){if(i.type.spec.isolating)return!0;continue}for(let r=i.child(n-1);;r=r.lastChild){if(r.childCount==0&&!r.inlineContent||vM(r.type))return!0;if(r.inlineContent)return!1}}return!0}function I7(e){for(let t=e.depth;t>=0;t--){let n=e.indexAfter(t),i=e.node(t);if(n==i.childCount){if(i.type.spec.isolating)return!0;continue}for(let r=i.child(n);;r=r.firstChild){if(r.childCount==0&&!r.inlineContent||vM(r.type))return!0;if(r.inlineContent)return!1}}return!0}function yM(){return new de({props:{decorations:D7,createSelectionBetween(e,t,n){return t.pos==n.pos&&Pt.valid(n)?new Pt(n):null},handleClick:M7,handleKeyDown:A7,handleDOMEvents:{beforeinput:z7}}})}var A7=Ra({ArrowLeft:Zd("horiz",-1),ArrowRight:Zd("horiz",1),ArrowUp:Zd("vert",-1),ArrowDown:Zd("vert",1)});function Zd(e,t){let n=e=="vert"?t>0?"down":"up":t>0?"right":"left";return function(i,r,o){let s=i.selection,a=t>0?s.$to:s.$from,l=s.empty;if(s instanceof q){if(!o.endOfTextblock(n)||a.depth==0)return!1;l=!1,a=i.doc.resolve(t>0?a.after():a.before())}let u=Pt.findGapCursorFrom(a,t,l);return u?(r&&r(i.tr.setSelection(new Pt(u))),!0):!1}}function M7(e,t,n){if(!e||!e.editable)return!1;let i=e.state.doc.resolve(t);if(!Pt.valid(i))return!1;let r=e.posAtCoords({left:n.clientX,top:n.clientY});return r&&r.inside>-1&&G.isSelectable(e.state.doc.nodeAt(r.inside))?!1:(e.dispatch(e.state.tr.setSelection(new Pt(i))),!0)}function z7(e,t){if(t.inputType!="insertCompositionText"||!(e.state.selection instanceof Pt))return!1;let{$from:n}=e.state.selection,i=n.parent.contentMatchAt(n.index()).findWrapping(e.state.schema.nodes.text);if(!i)return!1;let r=z.empty;for(let s=i.length-1;s>=0;s--)r=z.from(i[s].createAndFill(null,r));let o=e.state.tr.replace(n.pos,n.pos,new B(r,0,0));return o.setSelection(q.near(o.doc.resolve(n.pos+1))),e.dispatch(o),!1}function D7(e){if(!(e.selection instanceof Pt))return null;let t=document.createElement("div");return t.className="ProseMirror-gapcursor",Ce.create(e.doc,[pt.widget(e.selection.head,t,{key:"gapcursor"})])}var Hd=200,Tt=function(){};Tt.prototype.append=function(t){return t.length?(t=Tt.from(t),!this.length&&t||t.length<Hd&&this.leafAppend(t)||this.length<Hd&&t.leafPrepend(this)||this.appendInner(t)):this};Tt.prototype.prepend=function(t){return t.length?Tt.from(t).append(this):this};Tt.prototype.appendInner=function(t){return new N7(this,t)};Tt.prototype.slice=function(t,n){return t===void 0&&(t=0),n===void 0&&(n=this.length),t>=n?Tt.empty:this.sliceInner(Math.max(0,t),Math.min(this.length,n))};Tt.prototype.get=function(t){if(!(t<0||t>=this.length))return this.getInner(t)};Tt.prototype.forEach=function(t,n,i){n===void 0&&(n=0),i===void 0&&(i=this.length),n<=i?this.forEachInner(t,n,i,0):this.forEachInvertedInner(t,n,i,0)};Tt.prototype.map=function(t,n,i){n===void 0&&(n=0),i===void 0&&(i=this.length);var r=[];return this.forEach(function(o,s){return r.push(t(o,s))},n,i),r};Tt.from=function(t){return t instanceof Tt?t:t&&t.length?new kM(t):Tt.empty};var kM=(function(e){function t(i){e.call(this),this.values=i}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={length:{configurable:!0},depth:{configurable:!0}};return t.prototype.flatten=function(){return this.values},t.prototype.sliceInner=function(r,o){return r==0&&o==this.length?this:new t(this.values.slice(r,o))},t.prototype.getInner=function(r){return this.values[r]},t.prototype.forEachInner=function(r,o,s,a){for(var l=o;l<s;l++)if(r(this.values[l],a+l)===!1)return!1},t.prototype.forEachInvertedInner=function(r,o,s,a){for(var l=o-1;l>=s;l--)if(r(this.values[l],a+l)===!1)return!1},t.prototype.leafAppend=function(r){if(this.length+r.length<=Hd)return new t(this.values.concat(r.flatten()))},t.prototype.leafPrepend=function(r){if(this.length+r.length<=Hd)return new t(r.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(t.prototype,n),t})(Tt);Tt.empty=new kM([]);var N7=(function(e){function t(n,i){e.call(this),this.left=n,this.right=i,this.length=n.length+i.length,this.depth=Math.max(n.depth,i.depth)+1}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},t.prototype.getInner=function(i){return i<this.left.length?this.left.get(i):this.right.get(i-this.left.length)},t.prototype.forEachInner=function(i,r,o,s){var a=this.left.length;if(r<a&&this.left.forEachInner(i,r,Math.min(o,a),s)===!1||o>a&&this.right.forEachInner(i,Math.max(r-a,0),Math.min(this.length,o)-a,s+a)===!1)return!1},t.prototype.forEachInvertedInner=function(i,r,o,s){var a=this.left.length;if(r>a&&this.right.forEachInvertedInner(i,r-a,Math.max(o,a)-a,s+a)===!1||o<a&&this.left.forEachInvertedInner(i,Math.min(r,a),o,s)===!1)return!1},t.prototype.sliceInner=function(i,r){if(i==0&&r==this.length)return this;var o=this.left.length;return r<=o?this.left.slice(i,r):i>=o?this.right.slice(i-o,r-o):this.left.slice(i,o).append(this.right.slice(0,r-o))},t.prototype.leafAppend=function(i){var r=this.right.leafAppend(i);if(r)return new t(this.left,r)},t.prototype.leafPrepend=function(i){var r=this.left.leafPrepend(i);if(r)return new t(r,this.right)},t.prototype.appendInner=function(i){return this.left.depth>=Math.max(this.right.depth,i.depth)+1?new t(this.left,new t(this.right,i)):new t(this,i)},t})(Tt),gb=Tt;var O7=500,Ai=class e{constructor(t,n){this.items=t,this.eventCount=n}popEvent(t,n){if(this.eventCount==0)return null;let i=this.items.length;for(;;i--)if(this.items.get(i-1).selection){--i;break}let r,o;n&&(r=this.remapping(i,this.items.length),o=r.maps.length);let s=t.tr,a,l,u=[],c=[];return this.items.forEach((d,f)=>{if(!d.step){r||(r=this.remapping(i,f+1),o=r.maps.length),o--,c.push(d);return}if(r){c.push(new Zn(d.map));let p=d.step.map(r.slice(o)),h;p&&s.maybeStep(p).doc&&(h=s.mapping.maps[s.mapping.maps.length-1],u.push(new Zn(h,void 0,void 0,u.length+c.length))),o--,h&&r.appendMap(h,o)}else s.maybeStep(d.step);if(d.selection)return a=r?d.selection.map(r.slice(o)):d.selection,l=new e(this.items.slice(0,i).append(c.reverse().concat(u)),this.eventCount-1),!1},this.items.length,0),{remaining:l,transform:s,selection:a}}addTransform(t,n,i,r){let o=[],s=this.eventCount,a=this.items,l=!r&&a.length?a.get(a.length-1):null;for(let c=0;c<t.steps.length;c++){let d=t.steps[c].invert(t.docs[c]),f=new Zn(t.mapping.maps[c],d,n),p;(p=l&&l.merge(f))&&(f=p,c?o.pop():a=a.slice(0,a.length-1)),o.push(f),n&&(s++,n=void 0),r||(l=f)}let u=s-i.depth;return u>P7&&(a=R7(a,u),s-=u),new e(a.append(o),s)}remapping(t,n){let i=new va;return this.items.forEach((r,o)=>{let s=r.mirrorOffset!=null&&o-r.mirrorOffset>=t?i.maps.length-r.mirrorOffset:void 0;i.appendMap(r.map,s)},t,n),i}addMaps(t){return this.eventCount==0?this:new e(this.items.append(t.map(n=>new Zn(n))),this.eventCount)}rebased(t,n){if(!this.eventCount)return this;let i=[],r=Math.max(0,this.items.length-n),o=t.mapping,s=t.steps.length,a=this.eventCount;this.items.forEach(f=>{f.selection&&a--},r);let l=n;this.items.forEach(f=>{let p=o.getMirror(--l);if(p==null)return;s=Math.min(s,p);let h=o.maps[p];if(f.step){let m=t.steps[p].invert(t.docs[p]),g=f.selection&&f.selection.map(o.slice(l+1,p));g&&a++,i.push(new Zn(h,m,g))}else i.push(new Zn(h))},r);let u=[];for(let f=n;f<s;f++)u.push(new Zn(o.maps[f]));let c=this.items.slice(0,r).append(u).append(i),d=new e(c,a);return d.emptyItemCount()>O7&&(d=d.compress(this.items.length-i.length)),d}emptyItemCount(){let t=0;return this.items.forEach(n=>{n.step||t++}),t}compress(t=this.items.length){let n=this.remapping(0,t),i=n.maps.length,r=[],o=0;return this.items.forEach((s,a)=>{if(a>=t)r.push(s),s.selection&&o++;else if(s.step){let l=s.step.map(n.slice(i)),u=l&&l.getMap();if(i--,u&&n.appendMap(u,i),l){let c=s.selection&&s.selection.map(n.slice(i));c&&o++;let d=new Zn(u.invert(),l,c),f,p=r.length-1;(f=r.length&&r[p].merge(d))?r[p]=f:r.push(d)}}else s.map&&i--},this.items.length,0),new e(gb.from(r.reverse()),o)}};Ai.empty=new Ai(gb.empty,0);function R7(e,t){let n;return e.forEach((i,r)=>{if(i.selection&&t--==0)return n=r,!1}),e.slice(n)}var Zn=class e{constructor(t,n,i,r){this.map=t,this.step=n,this.selection=i,this.mirrorOffset=r}merge(t){if(this.step&&t.step&&!t.selection){let n=t.step.merge(this.step);if(n)return new e(n.getMap().invert(),n,this.selection)}}},Hn=class{constructor(t,n,i,r,o){this.done=t,this.undone=n,this.prevRanges=i,this.prevTime=r,this.prevComposition=o}},P7=20;function L7(e,t,n,i){let r=n.getMeta(Ii),o;if(r)return r.historyState;n.getMeta(U7)&&(e=new Hn(e.done,e.undone,null,0,-1));let s=n.getMeta("appendedTransaction");if(n.steps.length==0)return e;if(s&&s.getMeta(Ii))return s.getMeta(Ii).redo?new Hn(e.done.addTransform(n,void 0,i,qd(t)),e.undone,xM(n.mapping.maps),e.prevTime,e.prevComposition):new Hn(e.done,e.undone.addTransform(n,void 0,i,qd(t)),null,e.prevTime,e.prevComposition);if(n.getMeta("addToHistory")!==!1&&!(s&&s.getMeta("addToHistory")===!1)){let a=n.getMeta("composition"),l=e.prevTime==0||!s&&e.prevComposition!=a&&(e.prevTime<(n.time||0)-i.newGroupDelay||!F7(n,e.prevRanges)),u=s?bb(e.prevRanges,n.mapping):xM(n.mapping.maps);return new Hn(e.done.addTransform(n,l?t.selection.getBookmark():void 0,i,qd(t)),Ai.empty,u,n.time,a??e.prevComposition)}else return(o=n.getMeta("rebased"))?new Hn(e.done.rebased(n,o),e.undone.rebased(n,o),bb(e.prevRanges,n.mapping),e.prevTime,e.prevComposition):new Hn(e.done.addMaps(n.mapping.maps),e.undone.addMaps(n.mapping.maps),bb(e.prevRanges,n.mapping),e.prevTime,e.prevComposition)}function F7(e,t){if(!t)return!1;if(!e.docChanged)return!0;let n=!1;return e.mapping.maps[0].forEach((i,r)=>{for(let o=0;o<t.length;o+=2)i<=t[o+1]&&r>=t[o]&&(n=!0)}),n}function xM(e){let t=[];for(let n=e.length-1;n>=0&&t.length==0;n--)e[n].forEach((i,r,o,s)=>t.push(o,s));return t}function bb(e,t){if(!e)return null;let n=[];for(let i=0;i<e.length;i+=2){let r=t.map(e[i],1),o=t.map(e[i+1],-1);r<=o&&n.push(r,o)}return n}function B7(e,t,n){let i=qd(t),r=Ii.get(t).spec.config,o=(n?e.undone:e.done).popEvent(t,i);if(!o)return null;let s=o.selection.resolve(o.transform.doc),a=(n?e.done:e.undone).addTransform(o.transform,t.selection.getBookmark(),r,i),l=new Hn(n?a:o.remaining,n?o.remaining:a,null,0,-1);return o.transform.setSelection(s).setMeta(Ii,{redo:n,historyState:l})}var vb=!1,_M=null;function qd(e){let t=e.plugins;if(_M!=t){vb=!1,_M=t;for(let n=0;n<t.length;n++)if(t[n].spec.historyPreserveItems){vb=!0;break}}return vb}var Ii=new we("history"),U7=new we("closeHistory");function wM(e={}){return e={depth:e.depth||100,newGroupDelay:e.newGroupDelay||500},new de({key:Ii,state:{init(){return new Hn(Ai.empty,Ai.empty,null,0,-1)},apply(t,n,i){return L7(n,i,t,e)}},config:e,props:{handleDOMEvents:{beforeinput(t,n){let i=n.inputType,r=i=="historyUndo"?yb:i=="historyRedo"?kb:null;return!r||!t.editable?!1:(n.preventDefault(),r(t.state,t.dispatch))}}}})}function Wd(e,t){return(n,i)=>{let r=Ii.getState(n);if(!r||(e?r.undone:r.done).eventCount==0)return!1;if(i){let o=B7(r,n,e);o&&i(t?o.scrollIntoView():o)}return!0}}var yb=Wd(!1,!0),kb=Wd(!0,!0),hie=Wd(!1,!1),mie=Wd(!0,!1);var Eie=Te.create({name:"characterCount",addOptions(){return{limit:null,autoTrim:!0,mode:"textSize",textCounter:e=>e.length,wordCounter:e=>e.split(" ").filter(t=>t!=="").length}},addStorage(){return{characters:()=>0,words:()=>0}},onBeforeCreate(){this.storage.characters=e=>{let t=e?.node||this.editor.state.doc;if((e?.mode||this.options.mode)==="textSize"){let n=t.textBetween(0,t.content.size,void 0," ");return this.options.textCounter(n)}return t.nodeSize},this.storage.words=e=>{let t=e?.node||this.editor.state.doc,n=t.textBetween(0,t.content.size," "," ");return this.options.wordCounter(n)}},addProseMirrorPlugins(){let e=!1;return[new de({key:new we("characterCount"),appendTransaction:(t,n,i)=>{if(e)return;let r=this.options.limit,o=this.options.autoTrim;if(r==null||r===0||o===!1){e=!0;return}let s=this.storage.characters({node:i.doc});if(s>r){let a=s-r,l=0,u=a;console.warn(`[CharacterCount] Initial content exceeded limit of ${r} characters. Content was automatically trimmed.`);let c=i.tr.deleteRange(l,u);return e=!0,c}e=!0},filterTransaction:(t,n)=>{let i=this.options.limit;if(!t.docChanged||i===0||i===null||i===void 0)return!0;let r=this.storage.characters({node:n.doc}),o=this.storage.characters({node:t.doc});if(o<=i||r>i&&o>i&&o<=r)return!0;if(r>i&&o>i&&o>r||!t.getMeta("paste"))return!1;let s=t.selection.$head.pos,a=s-(o-i),l=s;return t.deleteRange(a,l),!(this.storage.characters({node:t.doc})>i)}})]}}),$M=Te.create({name:"dropCursor",addOptions(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins(){return[bM(this.options)]}}),$ie=Te.create({name:"focus",addOptions(){return{className:"has-focus",mode:"all"}},addProseMirrorPlugins(){return[new de({key:new we("focus"),props:{decorations:({doc:e,selection:t})=>{let{isEditable:n,isFocused:i}=this.editor,{anchor:r}=t,o=[];if(!n||!i)return Ce.create(e,[]);let s=0;this.options.mode==="deepest"&&e.descendants((l,u)=>{if(!l.isText){if(!(r>=u&&r<=u+l.nodeSize-1))return!1;s+=1}});let a=0;return e.descendants((l,u)=>{if(l.isText||!(r>=u&&r<=u+l.nodeSize-1))return!1;if(a+=1,this.options.mode==="deepest"&&s-a>0||this.options.mode==="shallowest"&&a>1)return this.options.mode==="deepest";o.push(pt.node(u,u+l.nodeSize,{class:this.options.className}))}),Ce.create(e,o)}}})]}}),CM=Te.create({name:"gapCursor",addProseMirrorPlugins(){return[yM()]},extendNodeSchema(e){var t;let n={name:e.name,options:e.options,storage:e.storage};return{allowGapCursor:(t=Se(K(e,"allowGapCursor",n)))!==null&&t!==void 0?t:null}}}),TM="placeholder",SM=new we("tiptap__placeholder");function IM(e){let{editor:t,placeholder:n,dataAttribute:i,pos:r,node:o,isEmptyDoc:s,hasAnchor:a,classes:{emptyNode:l,emptyEditor:u}}=e,c=[l];return s&&c.push(u),pt.node(r,r+o.nodeSize,{class:c.join(" "),[i]:typeof n=="function"?n({editor:t,node:o,pos:r,hasAnchor:a}):n})}function AM(e,t){return typeof e=="function"?e(t):e}function MM({editor:e,options:t,dataAttribute:n,doc:i,selection:r,from:o,to:s}){let{anchor:a}=r,l=[],u=e.isEmpty;return i.nodesBetween(o,s,(c,d)=>{let f=a>=d&&a<=d+c.nodeSize,p=!c.isLeaf&&Fo(c);return c.type.isTextblock&&(f||!t.showOnlyCurrent)&&p&&l.push(IM({editor:e,isEmptyDoc:u,dataAttribute:n,hasAnchor:f,placeholder:t.placeholder,classes:{emptyEditor:t.emptyEditorClass,emptyNode:AM(t.emptyNodeClass,{editor:e,node:c,pos:d,hasAnchor:f})},node:c,pos:d})),t.includeChildren}),l}function zM({editor:e,options:t,dataAttribute:n,doc:i,selection:r}){if(!(e.isEditable||!t.showOnlyWhenEditable))return null;let{anchor:o}=r,s=[],a=e.isEmpty;if(t.showOnlyCurrent&&!t.includeChildren){let l=i.resolve(o),u=l.depth>0?l.node(1):l.nodeAfter,c=l.depth>0?l.before(1):o;if(u&&u.type.isTextblock&&Fo(u)){let d=o>=c&&o<=c+u.nodeSize;s.push(IM({editor:e,isEmptyDoc:a,dataAttribute:n,hasAnchor:d,placeholder:t.placeholder,classes:{emptyEditor:t.emptyEditorClass,emptyNode:AM(t.emptyNodeClass,{editor:e,node:u,pos:c,hasAnchor:d})},node:u,pos:c}))}}else s.push(...MM({editor:e,options:t,dataAttribute:n,doc:i,selection:r,from:0,to:i.content.size}));return Ce.create(i,s)}function Ga(e,t){let n=e.resolve(t);if(n.depth===0){var i;let o=(i=n.nodeAfter)!==null&&i!==void 0?i:n.nodeBefore;if(!o)return{from:t,to:t};let s=n.nodeAfter?t:t-o.nodeSize;return{from:s,to:s+o.nodeSize}}let r=n.before(1);return{from:r,to:r+n.node(1).nodeSize}}function Xa(e,t){return{from:Math.max(0,t.from-1),to:Math.min(e.content.size,t.to-1)}}function j7(e,t,n){let i=[];return e.forEach((r,o)=>{let s=o,a=s+r.nodeSize,l=s+1,u=a+1;l<n&&u>t&&i.push({from:s,to:a})}),i}function Z7(e){if(e.length===0)return[];let t=[...e].sort((i,r)=>i.from-r.from),n=[{...t[0]}];for(let i=1;i<t.length;i+=1){let r=n[n.length-1],o=t[i];o.from<=r.to?r.to=Math.max(r.to,o.to):n.push({...o})}return n}function H7(e,t){let n=j7(e,t.from,t.to);return n.push(Xa(e,Ga(e,t.from))),t.to>t.from?n.push(Xa(e,Ga(e,Math.min(t.to,e.content.size+1)-1))):t.from<e.content.size+1&&n.push(Xa(e,Ga(e,Math.min(t.from+1,e.content.size)))),n}function q7(e,t,n){let i=[];if(e.docChanged){let r=Lo(e);for(let o of r)i.push(...H7(n.doc,o.newRange))}return e.selectionSet&&(i.push(Xa(n.doc,Ga(n.doc,e.mapping.map(t.selection.anchor)))),i.push(Xa(n.doc,Ga(n.doc,n.selection.anchor)))),Z7(i)}function W7(e,t,n){let i=Math.max(0,Math.min(e,n.content.size));return{from:i,to:Math.max(i,Math.min(t,n.content.size))}}function V7({decorations:e,ranges:t,editor:n,options:i,dataAttribute:r,doc:o,selection:s}){let a=e;for(let l of t){let{from:u,to:c}=W7(l.from,l.to,o),d=a.find(u,c).filter(p=>p.from>=u&&p.to<=c);d.length&&(a=a.remove(d));let f=MM({editor:n,options:i,dataAttribute:r,doc:o,selection:s,from:u,to:c});f.length&&(a=a.add(o,f))}return a}function K7({editor:e,options:t,dataAttribute:n}){return{init(i,r){let o=zM({editor:e,options:t,dataAttribute:n,doc:r.doc,selection:r.selection});return o??Ce.empty},apply(i,r,o,s){return!i.docChanged&&!i.selectionSet?r:V7({decorations:r.map(i.mapping,i.doc),ranges:q7(i,o,s),editor:e,options:t,dataAttribute:n,doc:s.doc,selection:s.selection})}}}function J7(e){return e.replace(/\s+/g,"-").replace(/[^a-zA-Z0-9-]/g,"").replace(/^[0-9-]+/,"").replace(/^-+/,"").toLowerCase()}function G7({editor:e,options:t}){let n=t.dataAttribute?`data-${J7(t.dataAttribute)}`:`data-${TM}`,i=t.showOnlyCurrent&&!t.includeChildren;return new de({key:SM,...i?{}:{state:K7({editor:e,options:t,dataAttribute:n})},props:{decorations:i?({doc:r,selection:o})=>zM({editor:e,options:t,dataAttribute:n,doc:r,selection:o}):r=>{var o;return t.showOnlyWhenEditable&&!e.isEditable?Ce.empty:(o=SM.getState(r))!==null&&o!==void 0?o:Ce.empty}}})}var Cie=Te.create({name:"placeholder",addOptions(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",dataAttribute:TM,placeholder:"Write something \u2026",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){return[G7({editor:this.editor,options:this.options})]}});function xb(e,t){return!e.selection.empty&&!nd(e.selection)&&t.isEditable}function X7(e,t){return xb(e,t)&&!t.isFocused&&!t.view.dragging}function Y7(){var e;(e=window.getSelection())===null||e===void 0||e.removeAllRanges()}function Q7(e){e.focus()}var Tie=Te.create({name:"selection",addOptions(){return{className:"selection"}},addProseMirrorPlugins(){let{editor:e,options:t}=this;return[new de({key:new we("selection"),props:{decorations(n){return X7(n,e)?Ce.create(n.doc,[pt.inline(n.selection.from,n.selection.to,{class:t.className})]):null},handleDOMEvents:{blur(n){return xb(n.state,e)&&Y7(),!1},focus(n){return xb(n.state,e)&&requestAnimationFrame(()=>{!e.isDestroyed&&n.hasFocus()&&Q7(n)}),!1}}}})]}});function EM({types:e,node:t}){return t&&Array.isArray(e)&&e.includes(t.type)||t?.type===e}var DM=Te.create({name:"trailingNode",addOptions(){return{node:void 0,notAfter:[]}},addProseMirrorPlugins(){var e;let t=new we(this.name),n=this.options.node||((e=this.editor.schema.topNodeType.contentMatch.defaultType)===null||e===void 0?void 0:e.name)||"paragraph",i=Object.entries(this.editor.schema.nodes).map(([,r])=>r).filter(r=>(this.options.notAfter||[]).concat(n).includes(r.name));return[new de({key:t,appendTransaction:(r,o,s)=>{let{doc:a,tr:l,schema:u}=s,c=t.getState(s),d=a.content.size,f=u.nodes[n];if(!r.some(p=>p.getMeta("skipTrailingNode"))&&c)return l.insert(d,f.create())},state:{init:(r,o)=>{let s=o.tr.doc.lastChild;return!EM({node:s,types:i})},apply:(r,o)=>{if(!r.docChanged||r.getMeta("__uniqueIDTransaction"))return o;let s=r.doc.lastChild;return!EM({node:s,types:i})}}})]}}),NM=Te.create({name:"undoRedo",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:e,dispatch:t})=>yb(e,t),redo:()=>({state:e,dispatch:t})=>kb(e,t)}},addProseMirrorPlugins(){return[wM(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-\u044F":()=>this.editor.commands.undo(),"Shift-Mod-\u044F":()=>this.editor.commands.redo()}}});var eH=Te.create({name:"starterKit",addExtensions(){let e=[];if(this.options.bold!==!1&&e.push(C6.configure(this.options.bold)),this.options.blockquote!==!1&&e.push($6.configure(this.options.blockquote)),this.options.bulletList!==!1&&e.push(sb.configure(this.options.bulletList)),this.options.code!==!1&&e.push(T6.configure(this.options.code)),this.options.codeBlock!==!1&&e.push(I6.configure(this.options.codeBlock)),this.options.document!==!1&&e.push(A6.configure(this.options.document)),this.options.dropcursor!==!1&&e.push($M.configure(this.options.dropcursor)),this.options.gapcursor!==!1&&e.push(CM.configure(this.options.gapcursor)),this.options.hardBreak!==!1&&e.push(M6.configure(this.options.hardBreak)),this.options.heading!==!1&&e.push(z6.configure(this.options.heading)),this.options.undoRedo!==!1&&e.push(NM.configure(this.options.undoRedo)),this.options.horizontalRule!==!1&&e.push(D6.configure(this.options.horizontalRule)),this.options.italic!==!1&&e.push(N6.configure(this.options.italic)),this.options.listItem!==!1&&e.push(ub.configure(this.options.listItem)),this.options.listKeymap!==!1){var t;e.push(db.configure((t=this.options)===null||t===void 0?void 0:t.listKeymap))}if(this.options.link!==!1){var n;e.push(Q6.configure((n=this.options)===null||n===void 0?void 0:n.link))}if(this.options.orderedList!==!1&&e.push(fb.configure(this.options.orderedList)),this.options.paragraph!==!1&&e.push(pM.configure(this.options.paragraph)),this.options.strike!==!1&&e.push(hM.configure(this.options.strike)),this.options.text!==!1&&e.push(mM.configure(this.options.text)),this.options.underline!==!1){var i;e.push(gM.configure((i=this.options)===null||i===void 0?void 0:i.underline))}if(this.options.trailingNode!==!1){var r;e.push(DM.configure((r=this.options)===null||r===void 0?void 0:r.trailingNode))}return e}}),OM=eH;var tH=/(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/,nH=ae.create({name:"image",addOptions(){return{inline:!1,allowBase64:!1,HTMLAttributes:{},resize:!1}},inline(){return this.options.inline},group(){return this.options.inline?"inline":"block"},draggable:!0,addAttributes(){return{src:{default:null},alt:{default:null},title:{default:null},width:{default:null},height:{default:null}}},parseHTML(){return[{tag:this.options.allowBase64?"img[src]":'img[src]:not([src^="data:"])'}]},renderHTML({HTMLAttributes:e}){return["img",fe(this.options.HTMLAttributes,e)]},parseMarkdown:(e,t)=>t.createNode("image",{src:e.href,title:e.title,alt:e.text}),renderMarkdown:e=>{var t,n,i,r,o,s;let a=(t=(n=e.attrs)===null||n===void 0?void 0:n.src)!==null&&t!==void 0?t:"",l=(i=(r=e.attrs)===null||r===void 0?void 0:r.alt)!==null&&i!==void 0?i:"",u=(o=(s=e.attrs)===null||s===void 0?void 0:s.title)!==null&&o!==void 0?o:"";return u?`![${l}](${a} "${u}")`:`![${l}](${a})`},addNodeView(){if(!this.options.resize||!this.options.resize.enabled||typeof document>"u")return null;let{directions:e,minWidth:t,minHeight:n,alwaysPreserveAspectRatio:i}=this.options.resize,r=new Set(["src","width","height"]);return({node:o,getPos:s,HTMLAttributes:a,editor:l})=>{let u=document.createElement("img");u.draggable=!1;let c=fe(this.options.HTMLAttributes,a);Object.entries(c).forEach(([b,v])=>{if(v!=null)switch(b){case"src":case"width":case"height":break;default:u.setAttribute(b,v)}}),c.src!==null&&(u.src=c.src);let d={...a},f=b=>{if(typeof b=="string"&&b!==""){u.getAttribute("src")!==b&&(u.src=b);return}u.hasAttribute("src")&&u.removeAttribute("src"),u.src!==""&&(u.src="")};f(a.src);let p=b=>{if(b.type!==o.type)return!1;let v=l.extensionManager.attributes.filter(x=>x.type===b.type.name),y=Ur(b,v);return Object.keys(d).forEach(x=>{!r.has(x)&&!(x in y)&&u.removeAttribute(x)}),Object.entries(y).forEach(([x,C])=>{r.has(x)||(C!=null?u.setAttribute(x,C):u.removeAttribute(x))}),f(y.src),d=y,!0},h=new x6({element:u,editor:l,node:o,getPos:s,onResize:(b,v)=>{u.style.width=`${b}px`,u.style.height=`${v}px`},onCommit:(b,v)=>{let y=s();y!==void 0&&this.editor.chain().setNodeSelection(y).updateAttributes(this.name,{width:b,height:v}).run()},onUpdate:p,options:{directions:e,min:{width:t,height:n},preserveAspectRatio:i===!0}}),m=h.dom,g=()=>{m.style.visibility="",m.style.pointerEvents=""};return m.style.visibility="hidden",m.style.pointerEvents="none",u.complete&&u.naturalWidth>0?g():(u.onload=g,u.onerror=g),h}},addCommands(){return{setImage:e=>({commands:t})=>t.insertContent({type:this.name,attrs:e})}},addInputRules(){return[id({find:tH,type:this.type,getAttributes:e=>{let[,,t,n,i]=e;return{src:n,alt:t,title:i}}})]}}),RM=nH;var wb,Sb;if(typeof WeakMap<"u"){let e=new WeakMap;wb=t=>e.get(t),Sb=(t,n)=>(e.set(t,n),n)}else{let e=[],n=0;wb=i=>{for(let r=0;r<e.length;r+=2)if(e[r]==i)return e[r+1]},Sb=(i,r)=>(n==10&&(n=0),e[n++]=i,e[n++]=r)}var nt=class{constructor(e,t,n,i){this.width=e,this.height=t,this.map=n,this.problems=i}findCell(e){for(let t=0;t<this.map.length;t++){let n=this.map[t];if(n!=e)continue;let i=t%this.width,r=t/this.width|0,o=i+1,s=r+1;for(let a=1;o<this.width&&this.map[t+a]==n;a++)o++;for(let a=1;s<this.height&&this.map[t+this.width*a]==n;a++)s++;return{left:i,top:r,right:o,bottom:s}}throw new RangeError(`No cell with offset ${e} found`)}colCount(e){for(let t=0;t<this.map.length;t++)if(this.map[t]==e)return t%this.width;throw new RangeError(`No cell with offset ${e} found`)}nextCell(e,t,n){let{left:i,right:r,top:o,bottom:s}=this.findCell(e);return t=="horiz"?(n<0?i==0:r==this.width)?null:this.map[o*this.width+(n<0?i-1:r)]:(n<0?o==0:s==this.height)?null:this.map[i+this.width*(n<0?o-1:s)]}rectBetween(e,t){let{left:n,right:i,top:r,bottom:o}=this.findCell(e),{left:s,right:a,top:l,bottom:u}=this.findCell(t);return{left:Math.min(n,s),top:Math.min(r,l),right:Math.max(i,a),bottom:Math.max(o,u)}}cellsInRect(e){let t=[],n={};for(let i=e.top;i<e.bottom;i++)for(let r=e.left;r<e.right;r++){let o=i*this.width+r,s=this.map[o];n[s]||(n[s]=!0,!(r==e.left&&r&&this.map[o-1]==s||i==e.top&&i&&this.map[o-this.width]==s)&&t.push(s))}return t}positionAt(e,t,n){for(let i=0,r=0;;i++){let o=r+n.child(i).nodeSize;if(i==e){let s=t+e*this.width,a=(e+1)*this.width;for(;s<a&&this.map[s]<r;)s++;return s==a?o-1:this.map[s]}r=o}}static get(e){return wb(e)||Sb(e,rH(e))}};function rH(e){if(e.type.spec.tableRole!="table")throw new RangeError("Not a table node: "+e.type.name);let t=iH(e),n=e.childCount,i=[],r=0,o=null,s=[];for(let u=0,c=t*n;u<c;u++)i[u]=0;for(let u=0,c=0;u<n;u++){let d=e.child(u);c++;for(let h=0;;h++){for(;r<i.length&&i[r]!=0;)r++;if(h==d.childCount)break;let m=d.child(h),{colspan:g,rowspan:b,colwidth:v}=m.attrs;for(let y=0;y<b;y++){if(y+u>=n){(o||(o=[])).push({type:"overlong_rowspan",pos:c,n:b-y});break}let x=r+y*t;for(let C=0;C<g;C++){i[x+C]==0?i[x+C]=c:(o||(o=[])).push({type:"collision",row:u,pos:c,n:g-C});let A=v&&v[C];if(A){let D=(x+C)%t*2,M=s[D];M==null||M!=A&&s[D+1]==1?(s[D]=A,s[D+1]=1):M==A&&s[D+1]++}}}r+=g,c+=m.nodeSize}let f=(u+1)*t,p=0;for(;r<f;)i[r++]==0&&p++;p&&(o||(o=[])).push({type:"missing",row:u,n:p}),c++}(t===0||n===0)&&(o||(o=[])).push({type:"zero_sized"});let a=new nt(t,n,i,o),l=!1;for(let u=0;!l&&u<s.length;u+=2)s[u]!=null&&s[u+1]<n&&(l=!0);return l&&oH(a,s,e),a}function iH(e){let t=-1,n=!1;for(let i=0;i<e.childCount;i++){let r=e.child(i),o=0;if(n)for(let s=0;s<i;s++){let a=e.child(s);for(let l=0;l<a.childCount;l++){let u=a.child(l);s+u.attrs.rowspan>i&&(o+=u.attrs.colspan)}}for(let s=0;s<r.childCount;s++){let a=r.child(s);o+=a.attrs.colspan,a.attrs.rowspan>1&&(n=!0)}t==-1?t=o:t!=o&&(t=Math.max(t,o))}return t}function oH(e,t,n){e.problems||(e.problems=[]);let i={};for(let r=0;r<e.map.length;r++){let o=e.map[r];if(i[o])continue;i[o]=!0;let s=n.nodeAt(o);if(!s)throw new RangeError(`No cell with offset ${o} found`);let a=null,l=s.attrs;for(let u=0;u<l.colspan;u++){let c=t[(r+u)%e.width*2];c!=null&&(!l.colwidth||l.colwidth[u]!=c)&&((a||(a=sH(l)))[u]=c)}a&&e.problems.unshift({type:"colwidth mismatch",pos:o,colwidth:a})}}function sH(e){if(e.colwidth)return e.colwidth.slice();let t=[];for(let n=0;n<e.colspan;n++)t.push(0);return t}function Lt(e){let t=e.cached.tableNodeTypes;if(!t){t=e.cached.tableNodeTypes={};for(let n in e.nodes){let i=e.nodes[n],r=i.spec.tableRole;r&&(t[r]=i)}}return t}var qr=new we("selectingCells");function Mi(e){for(let t=e.depth-1;t>0;t--)if(e.node(t).type.spec.tableRole=="row")return e.node(0).resolve(e.before(t+1));return null}function aH(e){for(let t=e.depth;t>0;t--){let n=e.node(t).type.spec.tableRole;if(n==="cell"||n==="header_cell")return e.node(t)}return null}function In(e){let t=e.selection.$head;for(let n=t.depth;n>0;n--)if(t.node(n).type.spec.tableRole=="row")return!0;return!1}function Yd(e){let t=e.selection;if("$anchorCell"in t&&t.$anchorCell)return t.$anchorCell.pos>t.$headCell.pos?t.$anchorCell:t.$headCell;if("node"in t&&t.node&&t.node.type.spec.tableRole=="cell")return t.$anchor;let n=Mi(t.$head)||lH(t.$head);if(n)return n;throw new RangeError(`No cell found around position ${t.head}`)}function lH(e){for(let t=e.nodeAfter,n=e.pos;t;t=t.firstChild,n++){let i=t.type.spec.tableRole;if(i=="cell"||i=="header_cell")return e.doc.resolve(n)}for(let t=e.nodeBefore,n=e.pos;t;t=t.lastChild,n--){let i=t.type.spec.tableRole;if(i=="cell"||i=="header_cell")return e.doc.resolve(n-t.nodeSize)}}function Eb(e){return e.parent.type.spec.tableRole=="row"&&!!e.nodeAfter}function uH(e){return e.node(0).resolve(e.pos+e.nodeAfter.nodeSize)}function Tb(e,t){return e.depth==t.depth&&e.pos>=t.start(-1)&&e.pos<=t.end(-1)}function WM(e,t,n){let i=e.node(-1),r=nt.get(i),o=e.start(-1),s=r.nextCell(e.pos-o,t,n);return s==null?null:e.node(0).resolve(o+s)}function zi(e,t,n=1){let i={...e,colspan:e.colspan-n};return i.colwidth&&(i.colwidth=i.colwidth.slice(),i.colwidth.splice(t,n),i.colwidth.some(r=>r>0)||(i.colwidth=null)),i}function VM(e,t,n=1){let i={...e,colspan:e.colspan+n};if(i.colwidth){i.colwidth=i.colwidth.slice();for(let r=0;r<n;r++)i.colwidth.splice(t,0,0)}return i}function cH(e,t,n){let i=Lt(t.type.schema).header_cell;for(let r=0;r<e.height;r++)if(t.nodeAt(e.map[n+r*e.width]).type!=i)return!1;return!0}var Le=class vr extends X{constructor(t,n=t){let i=t.node(-1),r=nt.get(i),o=t.start(-1),s=r.rectBetween(t.pos-o,n.pos-o),a=t.node(0),l=r.cellsInRect(s).filter(c=>c!=n.pos-o);l.unshift(n.pos-o);let u=l.map(c=>{let d=i.nodeAt(c);if(!d)throw new RangeError(`No cell with offset ${c} found`);let f=o+c+1;return new wo(a.resolve(f),a.resolve(f+d.content.size))});super(u[0].$from,u[0].$to,u),this.$anchorCell=t,this.$headCell=n}map(t,n){let i=t.resolve(n.map(this.$anchorCell.pos)),r=t.resolve(n.map(this.$headCell.pos));if(Eb(i)&&Eb(r)&&Tb(i,r)){let o=this.$anchorCell.node(-1)!=i.node(-1);return o&&this.isRowSelection()?vr.rowSelection(i,r):o&&this.isColSelection()?vr.colSelection(i,r):new vr(i,r)}return q.between(i,r)}content(){let t=this.$anchorCell.node(-1),n=nt.get(t),i=this.$anchorCell.start(-1),r=n.rectBetween(this.$anchorCell.pos-i,this.$headCell.pos-i),o={},s=[];for(let l=r.top;l<r.bottom;l++){let u=[];for(let c=l*n.width+r.left,d=r.left;d<r.right;d++,c++){let f=n.map[c];if(o[f])continue;o[f]=!0;let p=n.findCell(f),h=t.nodeAt(f);if(!h)throw new RangeError(`No cell with offset ${f} found`);let m=r.left-p.left,g=p.right-r.right;if(m>0||g>0){let b=h.attrs;if(m>0&&(b=zi(b,0,m)),g>0&&(b=zi(b,b.colspan-g,g)),p.left<r.left){if(h=h.type.createAndFill(b),!h)throw new RangeError(`Could not create cell with attrs ${JSON.stringify(b)}`)}else h=h.type.create(b,h.content)}if(p.top<r.top||p.bottom>r.bottom){let b={...h.attrs,rowspan:Math.min(p.bottom,r.bottom)-Math.max(p.top,r.top)};p.top<r.top?h=h.type.createAndFill(b):h=h.type.create(b,h.content)}u.push(h)}s.push(t.child(l).copy(z.from(u)))}let a=this.isColSelection()&&this.isRowSelection()?t:s;return new B(z.from(a),1,1)}replace(t,n=B.empty){let i=t.steps.length,r=this.ranges;for(let s=0;s<r.length;s++){let{$from:a,$to:l}=r[s],u=t.mapping.slice(i);t.replace(u.map(a.pos),u.map(l.pos),s?B.empty:n)}let o=X.findFrom(t.doc.resolve(t.mapping.slice(i).map(this.to)),-1);o&&t.setSelection(o)}replaceWith(t,n){this.replace(t,new B(z.from(n),0,0))}forEachCell(t){let n=this.$anchorCell.node(-1),i=nt.get(n),r=this.$anchorCell.start(-1),o=i.cellsInRect(i.rectBetween(this.$anchorCell.pos-r,this.$headCell.pos-r));for(let s=0;s<o.length;s++)t(n.nodeAt(o[s]),r+o[s])}isColSelection(){let t=this.$anchorCell.index(-1),n=this.$headCell.index(-1);if(Math.min(t,n)>0)return!1;let i=t+this.$anchorCell.nodeAfter.attrs.rowspan,r=n+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(i,r)==this.$headCell.node(-1).childCount}static colSelection(t,n=t){let i=t.node(-1),r=nt.get(i),o=t.start(-1),s=r.findCell(t.pos-o),a=r.findCell(n.pos-o),l=t.node(0);return s.top<=a.top?(s.top>0&&(t=l.resolve(o+r.map[s.left])),a.bottom<r.height&&(n=l.resolve(o+r.map[r.width*(r.height-1)+a.right-1]))):(a.top>0&&(n=l.resolve(o+r.map[a.left])),s.bottom<r.height&&(t=l.resolve(o+r.map[r.width*(r.height-1)+s.right-1]))),new vr(t,n)}isRowSelection(){let t=this.$anchorCell.node(-1),n=nt.get(t),i=this.$anchorCell.start(-1),r=n.colCount(this.$anchorCell.pos-i),o=n.colCount(this.$headCell.pos-i);if(Math.min(r,o)>0)return!1;let s=r+this.$anchorCell.nodeAfter.attrs.colspan,a=o+this.$headCell.nodeAfter.attrs.colspan;return Math.max(s,a)==n.width}eq(t){return t instanceof vr&&t.$anchorCell.pos==this.$anchorCell.pos&&t.$headCell.pos==this.$headCell.pos}static rowSelection(t,n=t){let i=t.node(-1),r=nt.get(i),o=t.start(-1),s=r.findCell(t.pos-o),a=r.findCell(n.pos-o),l=t.node(0);return s.left<=a.left?(s.left>0&&(t=l.resolve(o+r.map[s.top*r.width])),a.right<r.width&&(n=l.resolve(o+r.map[r.width*(a.top+1)-1]))):(a.left>0&&(n=l.resolve(o+r.map[a.top*r.width])),s.right<r.width&&(t=l.resolve(o+r.map[r.width*(s.top+1)-1]))),new vr(t,n)}toJSON(){return{type:"cell",anchor:this.$anchorCell.pos,head:this.$headCell.pos}}static fromJSON(t,n){return new vr(t.resolve(n.anchor),t.resolve(n.head))}static create(t,n,i=n){return new vr(t.resolve(n),t.resolve(i))}getBookmark(){return new dH(this.$anchorCell.pos,this.$headCell.pos)}};Le.prototype.visible=!1;X.jsonID("cell",Le);var dH=class KM{constructor(t,n){this.anchor=t,this.head=n}map(t){return new KM(t.map(this.anchor),t.map(this.head))}resolve(t){let n=t.resolve(this.anchor),i=t.resolve(this.head);return n.parent.type.spec.tableRole=="row"&&i.parent.type.spec.tableRole=="row"&&n.index()<n.parent.childCount&&i.index()<i.parent.childCount&&Tb(n,i)?new Le(n,i):X.near(i,1)}};function fH(e){if(!(e.selection instanceof Le))return null;let t=[];return e.selection.forEachCell((n,i)=>{t.push(pt.node(i,i+n.nodeSize,{class:"selectedCell"}))}),Ce.create(e.doc,t)}function pH({$from:e,$to:t}){if(e.pos==t.pos||e.pos<t.pos-6)return!1;let n=e.pos,i=t.pos,r=e.depth;for(;r>=0&&!(e.after(r+1)<e.end(r));r--,n++);for(let o=t.depth;o>=0&&!(t.before(o+1)>t.start(o));o--,i--);return n==i&&/row|table/.test(e.node(r).type.spec.tableRole)}function hH({$from:e,$to:t}){let n,i;for(let r=e.depth;r>0;r--){let o=e.node(r);if(o.type.spec.tableRole==="cell"||o.type.spec.tableRole==="header_cell"){n=o;break}}for(let r=t.depth;r>0;r--){let o=t.node(r);if(o.type.spec.tableRole==="cell"||o.type.spec.tableRole==="header_cell"){i=o;break}}return n!==i&&t.parentOffset===0}function mH(e,t,n){let i=(t||e).selection,r=(t||e).doc,o,s;if(i instanceof G&&(s=i.node.type.spec.tableRole)){if(s=="cell"||s=="header_cell")o=Le.create(r,i.from);else if(s=="row"){let a=r.resolve(i.from+1);o=Le.rowSelection(a,a)}else if(!n){let a=nt.get(i.node),l=i.from+1,u=l+a.map[a.width*a.height-1];o=Le.create(r,l+1,u)}}else i instanceof q&&pH(i)?o=q.create(r,i.from):i instanceof q&&hH(i)&&(o=q.create(r,i.$from.start(),i.$from.end()));return o&&(t||(t=e.tr)).setSelection(o),t}var gH=new we("fix-tables");function JM(e,t,n,i){let r=e.childCount,o=t.childCount;e:for(let s=0,a=0;s<o;s++){let l=t.child(s);for(let u=a,c=Math.min(r,s+3);u<c;u++)if(e.child(u)==l){a=u+1,n+=l.nodeSize;continue e}i(l,n),a<r&&e.child(a).sameMarkup(l)?JM(e.child(a),l,n+1,i):l.nodesBetween(0,l.content.size,i,n+1),n+=l.nodeSize}}function Ib(e,t){let n,i=(r,o)=>{r.type.spec.tableRole=="table"&&(n=bH(e,r,o,n))};return t?t.doc!=e.doc&&JM(t.doc,e.doc,0,i):e.doc.descendants(i),n}function bH(e,t,n,i){let r=nt.get(t);if(!r.problems)return i;i||(i=e.tr);let o=[];for(let l=0;l<r.height;l++)o.push(0);for(let l=0;l<r.problems.length;l++){let u=r.problems[l];if(u.type=="collision"){let c=t.nodeAt(u.pos);if(!c)continue;let d=c.attrs;for(let f=0;f<d.rowspan;f++)o[u.row+f]+=u.n;i.setNodeMarkup(i.mapping.map(n+1+u.pos),null,zi(d,d.colspan-u.n,u.n))}else if(u.type=="missing")o[u.row]+=u.n;else if(u.type=="overlong_rowspan"){let c=t.nodeAt(u.pos);if(!c)continue;i.setNodeMarkup(i.mapping.map(n+1+u.pos),null,{...c.attrs,rowspan:c.attrs.rowspan-u.n})}else if(u.type=="colwidth mismatch"){let c=t.nodeAt(u.pos);if(!c)continue;i.setNodeMarkup(i.mapping.map(n+1+u.pos),null,{...c.attrs,colwidth:u.colwidth})}else if(u.type=="zero_sized"){let c=i.mapping.map(n);i.delete(c,c+t.nodeSize)}}let s,a;for(let l=0;l<o.length;l++)o[l]&&(s==null&&(s=l),a=l);for(let l=0,u=n+1;l<r.height;l++){let c=t.child(l),d=u+c.nodeSize,f=o[l];if(f>0){let p="cell";c.firstChild&&(p=c.firstChild.type.spec.tableRole);let h=[];for(let g=0;g<f;g++){let b=Lt(e.schema)[p].createAndFill();b&&h.push(b)}let m=(l==0||s==l-1)&&a==l?u+1:d-1;i.insert(i.mapping.map(m),h)}u=d}return i.setMeta(gH,{fixTables:!0})}function qn(e){let t=e.selection,n=Yd(e),i=n.node(-1),r=n.start(-1),o=nt.get(i);return{...t instanceof Le?o.rectBetween(t.$anchorCell.pos-r,t.$headCell.pos-r):o.findCell(n.pos-r),tableStart:r,map:o,table:i}}function GM(e,{map:t,tableStart:n,table:i},r){let o=r>0?-1:0;cH(t,i,r+o)&&(o=r==0||r==t.width?null:0);for(let s=0;s<t.height;s++){let a=s*t.width+r;if(r>0&&r<t.width&&t.map[a-1]==t.map[a]){let l=t.map[a],u=i.nodeAt(l);e.setNodeMarkup(e.mapping.map(n+l),null,VM(u.attrs,r-t.colCount(l))),s+=u.attrs.rowspan-1}else{let l=o==null?Lt(i.type.schema).cell:i.nodeAt(t.map[a+o]).type,u=t.positionAt(s,r,i);e.insert(e.mapping.map(n+u),l.createAndFill())}}return e}function XM(e,t){if(!In(e))return!1;if(t){let n=qn(e);t(GM(e.tr,n,n.left))}return!0}function YM(e,t){if(!In(e))return!1;if(t){let n=qn(e);t(GM(e.tr,n,n.right))}return!0}function vH(e,{map:t,table:n,tableStart:i},r){let o=e.mapping.maps.length;for(let s=0;s<t.height;){let a=s*t.width+r,l=t.map[a],u=n.nodeAt(l),c=u.attrs;if(r>0&&t.map[a-1]==l||r<t.width-1&&t.map[a+1]==l)e.setNodeMarkup(e.mapping.slice(o).map(i+l),null,zi(c,r-t.colCount(l)));else{let d=e.mapping.slice(o).map(i+l);e.delete(d,d+u.nodeSize)}s+=c.rowspan}}function QM(e,t){if(!In(e))return!1;if(t){let n=qn(e),i=e.tr;if(n.left==0&&n.right==n.map.width)return!1;for(let r=n.right-1;vH(i,n,r),r!=n.left;r--){let o=n.tableStart?i.doc.nodeAt(n.tableStart-1):i.doc;if(!o)throw new RangeError("No table found");n.table=o,n.map=nt.get(o)}t(i)}return!0}function yH(e,t,n){var i;let r=Lt(t.type.schema).header_cell;for(let o=0;o<e.width;o++)if(((i=t.nodeAt(e.map[o+n*e.width]))===null||i===void 0?void 0:i.type)!=r)return!1;return!0}function ez(e,{map:t,tableStart:n,table:i},r){let o=n;for(let u=0;u<r;u++)o+=i.child(u).nodeSize;let s=[],a=r>0?-1:0;yH(t,i,r+a)&&(a=r==0||r==t.height?null:0);for(let u=0,c=t.width*r;u<t.width;u++,c++)if(r>0&&r<t.height&&t.map[c]==t.map[c-t.width]){let d=t.map[c],f=i.nodeAt(d).attrs;e.setNodeMarkup(n+d,null,{...f,rowspan:f.rowspan+1}),u+=f.colspan-1}else{var l;let d=a==null?Lt(i.type.schema).cell:(l=i.nodeAt(t.map[c+a*t.width]))===null||l===void 0?void 0:l.type,f=d?.createAndFill();f&&s.push(f)}return e.insert(o,Lt(i.type.schema).row.create(null,s)),e}function tz(e,t){if(!In(e))return!1;if(t){let n=qn(e);t(ez(e.tr,n,n.top))}return!0}function nz(e,t){if(!In(e))return!1;if(t){let n=qn(e);t(ez(e.tr,n,n.bottom))}return!0}function kH(e,{map:t,table:n,tableStart:i},r){let o=0;for(let u=0;u<r;u++)o+=n.child(u).nodeSize;let s=o+n.child(r).nodeSize,a=e.mapping.maps.length;e.delete(o+i,s+i);let l=new Set;for(let u=0,c=r*t.width;u<t.width;u++,c++){let d=t.map[c];if(!l.has(d)){if(l.add(d),r>0&&d==t.map[c-t.width]){let f=n.nodeAt(d).attrs;e.setNodeMarkup(e.mapping.slice(a).map(d+i),null,{...f,rowspan:f.rowspan-1}),u+=f.colspan-1}else if(r<t.height&&d==t.map[c+t.width]){let f=n.nodeAt(d),p=f.attrs,h=f.type.create({...p,rowspan:f.attrs.rowspan-1},f.content),m=t.positionAt(r+1,u,n);e.insert(e.mapping.slice(a).map(i+m),h),u+=p.colspan-1}}}}function rz(e,t){if(!In(e))return!1;if(t){let n=qn(e),i=e.tr;if(n.top==0&&n.bottom==n.map.height)return!1;for(let r=n.bottom-1;kH(i,n,r),r!=n.top;r--){let o=n.tableStart?i.doc.nodeAt(n.tableStart-1):i.doc;if(!o)throw new RangeError("No table found");n.table=o,n.map=nt.get(n.table)}t(i)}return!0}function PM(e){let t=e.content;return t.childCount==1&&t.child(0).isTextblock&&t.child(0).childCount==0}function xH({width:e,height:t,map:n},i){let r=i.top*e+i.left,o=r,s=(i.bottom-1)*e+i.left,a=r+(i.right-i.left-1);for(let l=i.top;l<i.bottom;l++){if(i.left>0&&n[o]==n[o-1]||i.right<e&&n[a]==n[a+1])return!0;o+=e,a+=e}for(let l=i.left;l<i.right;l++){if(i.top>0&&n[r]==n[r-e]||i.bottom<t&&n[s]==n[s+e])return!0;r++,s++}return!1}function Ab(e,t){let n=e.selection;if(!(n instanceof Le)||n.$anchorCell.pos==n.$headCell.pos)return!1;let i=qn(e),{map:r}=i;if(xH(r,i))return!1;if(t){let o=e.tr,s={},a=z.empty,l,u;for(let c=i.top;c<i.bottom;c++)for(let d=i.left;d<i.right;d++){let f=r.map[c*r.width+d],p=i.table.nodeAt(f);if(!(s[f]||!p))if(s[f]=!0,l==null)l=f,u=p;else{PM(p)||(a=a.append(p.content));let h=o.mapping.map(f+i.tableStart);o.delete(h,h+p.nodeSize)}}if(l==null||u==null)return!0;if(o.setNodeMarkup(l+i.tableStart,null,{...VM(u.attrs,u.attrs.colspan,i.right-i.left-u.attrs.colspan),rowspan:i.bottom-i.top}),a.size>0){let c=l+1+u.content.size,d=PM(u)?l+1:c;o.replaceWith(d+i.tableStart,c+i.tableStart,a)}o.setSelection(new Le(o.doc.resolve(l+i.tableStart))),t(o)}return!0}function Mb(e,t){let n=Lt(e.schema);return _H(({node:i})=>n[i.type.spec.tableRole])(e,t)}function _H(e){return(t,n)=>{let i=t.selection,r,o;if(i instanceof Le){if(i.$anchorCell.pos!=i.$headCell.pos)return!1;r=i.$anchorCell.nodeAfter,o=i.$anchorCell.pos}else{var s;if(r=aH(i.$from),!r)return!1;o=(s=Mi(i.$from))===null||s===void 0?void 0:s.pos}if(r==null||o==null||r.attrs.colspan==1&&r.attrs.rowspan==1)return!1;if(n){let a=r.attrs,l=[],u=a.colwidth;a.rowspan>1&&(a={...a,rowspan:1}),a.colspan>1&&(a={...a,colspan:1});let c=qn(t),d=t.tr;for(let p=0;p<c.right-c.left;p++)l.push(u?{...a,colwidth:u&&u[p]?[u[p]]:null}:a);let f;for(let p=c.top;p<c.bottom;p++){let h=c.map.positionAt(p,c.left,c.table);p==c.top&&(h+=r.nodeSize);for(let m=c.left,g=0;m<c.right;m++,g++)m==c.left&&p==c.top||d.insert(f=d.mapping.map(h+c.tableStart,1),e({node:r,row:p,col:m}).createAndFill(l[g]))}d.setNodeMarkup(o,e({node:r,row:c.top,col:c.left}),l[0]),i instanceof Le&&d.setSelection(new Le(d.doc.resolve(i.$anchorCell.pos),f?d.doc.resolve(f):void 0)),n(d)}return!0}}function iz(e,t){return function(n,i){if(!In(n))return!1;let r=Yd(n);if(r.nodeAfter.attrs[e]===t)return!1;if(i){let o=n.tr;n.selection instanceof Le?n.selection.forEachCell((s,a)=>{s.attrs[e]!==t&&o.setNodeMarkup(a,null,{...s.attrs,[e]:t})}):o.setNodeMarkup(r.pos,null,{...r.nodeAfter.attrs,[e]:t}),i(o)}return!0}}function wH(e){return function(t,n){if(!In(t))return!1;if(n){let i=Lt(t.schema),r=qn(t),o=t.tr,s=r.map.cellsInRect(e=="column"?{left:r.left,top:0,right:r.right,bottom:r.map.height}:e=="row"?{left:0,top:r.top,right:r.map.width,bottom:r.bottom}:r),a=s.map(l=>r.table.nodeAt(l));for(let l=0;l<s.length;l++)a[l].type==i.header_cell&&o.setNodeMarkup(r.tableStart+s[l],i.cell,a[l].attrs);if(o.steps.length===0)for(let l=0;l<s.length;l++)o.setNodeMarkup(r.tableStart+s[l],i.header_cell,a[l].attrs);n(o)}return!0}}function LM(e,t,n){let i=t.map.cellsInRect({left:0,top:0,right:e=="row"?t.map.width:1,bottom:e=="column"?t.map.height:1});for(let r=0;r<i.length;r++){let o=t.table.nodeAt(i[r]);if(o&&o.type!==n.header_cell)return!1}return!0}function Ho(e,t){return t=t||{useDeprecatedLogic:!1},t.useDeprecatedLogic?wH(e):function(n,i){if(!In(n))return!1;if(i){let r=Lt(n.schema),o=qn(n),s=n.tr,a=LM("row",o,r),l=LM("column",o,r),u=(e==="column"?a:e==="row"&&l)?1:0,c=e=="column"?{left:0,top:u,right:1,bottom:o.map.height}:e=="row"?{left:u,top:0,right:o.map.width,bottom:1}:o,d=e=="column"?l?r.cell:r.header_cell:e=="row"?a?r.cell:r.header_cell:r.cell;o.map.cellsInRect(c).forEach(f=>{let p=f+o.tableStart,h=s.doc.nodeAt(p);h&&s.setNodeMarkup(p,d,h.attrs)}),i(s)}return!0}}var toe=Ho("row",{useDeprecatedLogic:!0}),noe=Ho("column",{useDeprecatedLogic:!0}),oz=Ho("cell",{useDeprecatedLogic:!0});function SH(e,t){if(t<0){let n=e.nodeBefore;if(n)return e.pos-n.nodeSize;for(let i=e.index(-1)-1,r=e.before();i>=0;i--){let o=e.node(-1).child(i),s=o.lastChild;if(s)return r-1-s.nodeSize;r-=o.nodeSize}}else{if(e.index()<e.parent.childCount-1)return e.pos+e.nodeAfter.nodeSize;let n=e.node(-1);for(let i=e.indexAfter(-1),r=e.after();i<n.childCount;i++){let o=n.child(i);if(o.childCount)return r+1;r+=o.nodeSize}}return null}function zb(e){return function(t,n){if(!In(t))return!1;let i=SH(Yd(t),e);if(i==null)return!1;if(n){let r=t.doc.resolve(i);n(t.tr.setSelection(q.between(r,uH(r))).scrollIntoView())}return!0}}function sz(e,t){let n=e.selection.$anchor;for(let i=n.depth;i>0;i--)if(n.node(i).type.spec.tableRole=="table")return t&&t(e.tr.delete(n.before(i),n.after(i)).scrollIntoView()),!0;return!1}function Vd(e,t){let n=e.selection;if(!(n instanceof Le))return!1;if(t){let i=e.tr,r=Lt(e.schema).cell.createAndFill().content;n.forEachCell((o,s)=>{o.content.eq(r)||i.replace(i.mapping.map(s+1),i.mapping.map(s+o.nodeSize-1),new B(r,0,0))}),i.docChanged&&t(i)}return!0}function EH(e){if(e.size===0)return null;let{content:t,openStart:n,openEnd:i}=e;for(;t.childCount==1&&(n>0&&i>0||t.child(0).type.spec.tableRole=="table");)n--,i--,t=t.child(0).content;let r=t.child(0),o=r.type.spec.tableRole,s=r.type.schema,a=[];if(o=="row")for(let l=0;l<t.childCount;l++){let u=t.child(l).content,c=l?0:Math.max(0,n-1),d=l<t.childCount-1?0:Math.max(0,i-1);(c||d)&&(u=$b(Lt(s).row,new B(u,c,d)).content),a.push(u)}else if(o=="cell"||o=="header_cell")a.push(n||i?$b(Lt(s).row,new B(t,n,i)).content:t);else return null;return $H(s,a)}function $H(e,t){let n=[];for(let r=0;r<t.length;r++){let o=t[r];for(let s=o.childCount-1;s>=0;s--){let{rowspan:a,colspan:l}=o.child(s).attrs;for(let u=r;u<r+a;u++)n[u]=(n[u]||0)+l}}let i=0;for(let r=0;r<n.length;r++)i=Math.max(i,n[r]);for(let r=0;r<n.length;r++)if(r>=t.length&&t.push(z.empty),n[r]<i){let o=Lt(e).cell.createAndFill(),s=[];for(let a=n[r];a<i;a++)s.push(o);t[r]=t[r].append(z.from(s))}return{height:t.length,width:i,rows:t}}function $b(e,t){let n=e.createAndFill();return new Nr(n).replace(0,n.content.size,t).doc}function CH({width:e,height:t,rows:n},i,r){if(e!=i){let o=[],s=[];for(let a=0;a<n.length;a++){let l=n[a],u=[];for(let c=o[a]||0,d=0;c<i;d++){let f=l.child(d%l.childCount);c+f.attrs.colspan>i&&(f=f.type.createChecked(zi(f.attrs,f.attrs.colspan,c+f.attrs.colspan-i),f.content)),u.push(f),c+=f.attrs.colspan;for(let p=1;p<f.attrs.rowspan;p++)o[a+p]=(o[a+p]||0)+f.attrs.colspan}s.push(z.from(u))}n=s,e=i}if(t!=r){let o=[];for(let s=0,a=0;s<r;s++,a++){let l=[],u=n[a%t];for(let c=0;c<u.childCount;c++){let d=u.child(c);s+d.attrs.rowspan>r&&(d=d.type.create({...d.attrs,rowspan:Math.max(1,r-d.attrs.rowspan)},d.content)),l.push(d)}o.push(z.from(l))}n=o,t=r}return{width:e,height:t,rows:n}}function TH(e,t,n,i,r,o,s){let a=e.doc.type.schema,l=Lt(a),u,c;if(r>t.width)for(let d=0,f=0;d<t.height;d++){let p=n.child(d);f+=p.nodeSize;let h=[],m;p.lastChild==null||p.lastChild.type==l.cell?m=u||(u=l.cell.createAndFill()):m=c||(c=l.header_cell.createAndFill());for(let g=t.width;g<r;g++)h.push(m);e.insert(e.mapping.slice(s).map(f-1+i),h)}if(o>t.height){let d=[];for(let h=0,m=(t.height-1)*t.width;h<Math.max(t.width,r);h++){let g=h>=t.width?!1:n.nodeAt(t.map[m+h]).type==l.header_cell;d.push(g?c||(c=l.header_cell.createAndFill()):u||(u=l.cell.createAndFill()))}let f=l.row.create(null,z.from(d)),p=[];for(let h=t.height;h<o;h++)p.push(f);e.insert(e.mapping.slice(s).map(i+n.nodeSize-2),p)}return!!(u||c)}function FM(e,t,n,i,r,o,s,a){if(s==0||s==t.height)return!1;let l=!1;for(let u=r;u<o;u++){let c=s*t.width+u,d=t.map[c];if(t.map[c-t.width]==d){l=!0;let f=n.nodeAt(d),{top:p,left:h}=t.findCell(d);e.setNodeMarkup(e.mapping.slice(a).map(d+i),null,{...f.attrs,rowspan:s-p}),e.insert(e.mapping.slice(a).map(t.positionAt(s,h,n)),f.type.createAndFill({...f.attrs,rowspan:p+f.attrs.rowspan-s})),u+=f.attrs.colspan-1}}return l}function BM(e,t,n,i,r,o,s,a){if(s==0||s==t.width)return!1;let l=!1;for(let u=r;u<o;u++){let c=u*t.width+s,d=t.map[c];if(t.map[c-1]==d){l=!0;let f=n.nodeAt(d),p=t.colCount(d),h=e.mapping.slice(a).map(d+i);e.setNodeMarkup(h,null,zi(f.attrs,s-p,f.attrs.colspan-(s-p))),e.insert(h+f.nodeSize,f.type.createAndFill(zi(f.attrs,0,s-p))),u+=f.attrs.rowspan-1}}return l}function UM(e,t,n,i,r){let o=n?e.doc.nodeAt(n-1):e.doc;if(!o)throw new Error("No table found");let s=nt.get(o),{top:a,left:l}=i,u=l+r.width,c=a+r.height,d=e.tr,f=0;function p(){if(o=n?d.doc.nodeAt(n-1):d.doc,!o)throw new Error("No table found");s=nt.get(o),f=d.mapping.maps.length}TH(d,s,o,n,u,c,f)&&p(),FM(d,s,o,n,l,u,a,f)&&p(),FM(d,s,o,n,l,u,c,f)&&p(),BM(d,s,o,n,a,c,l,f)&&p(),BM(d,s,o,n,a,c,u,f)&&p();for(let h=a;h<c;h++){let m=s.positionAt(h,l,o),g=s.positionAt(h,u,o);d.replace(d.mapping.slice(f).map(m+n),d.mapping.slice(f).map(g+n),new B(r.rows[h-a],0,0))}p(),d.setSelection(new Le(d.doc.resolve(n+s.positionAt(a,l,o)),d.doc.resolve(n+s.positionAt(c-1,u-1,o)))),t(d)}var IH=Ra({ArrowLeft:Kd("horiz",-1),ArrowRight:Kd("horiz",1),ArrowUp:Kd("vert",-1),ArrowDown:Kd("vert",1),"Shift-ArrowLeft":Jd("horiz",-1),"Shift-ArrowRight":Jd("horiz",1),"Shift-ArrowUp":Jd("vert",-1),"Shift-ArrowDown":Jd("vert",1),Backspace:Vd,"Mod-Backspace":Vd,Delete:Vd,"Mod-Delete":Vd});function Gd(e,t,n){return n.eq(e.selection)?!1:(t&&t(e.tr.setSelection(n).scrollIntoView()),!0)}function Kd(e,t){return(n,i,r)=>{if(!r)return!1;let o=n.selection;if(o instanceof Le)return Gd(n,i,X.near(o.$headCell,t));if(e!="horiz"&&!o.empty)return!1;let s=az(r,e,t);if(s==null)return!1;if(e=="horiz")return Gd(n,i,X.near(n.doc.resolve(o.head+t),t));{let a=n.doc.resolve(s),l=WM(a,e,t),u;return l?u=X.near(l,1):t<0?u=X.near(n.doc.resolve(a.before(-1)),-1):u=X.near(n.doc.resolve(a.after(-1)),1),Gd(n,i,u)}}}function Jd(e,t){return(n,i,r)=>{if(!r)return!1;let o=n.selection,s;if(o instanceof Le)s=o;else{let l=az(r,e,t);if(l==null)return!1;s=new Le(n.doc.resolve(l))}let a=WM(s.$headCell,e,t);return a?Gd(n,i,new Le(s.$anchorCell,a)):!1}}function AH(e,t){let n=e.state.doc,i=Mi(n.resolve(t));return i?(e.dispatch(e.state.tr.setSelection(new Le(i))),!0):!1}function MH(e,t,n){if(!In(e.state))return!1;let i=EH(n),r=e.state.selection;if(r instanceof Le){i||(i={width:1,height:1,rows:[z.from($b(Lt(e.state.schema).cell,n))]});let o=r.$anchorCell.node(-1),s=r.$anchorCell.start(-1),a=nt.get(o).rectBetween(r.$anchorCell.pos-s,r.$headCell.pos-s);return i=CH(i,a.right-a.left,a.bottom-a.top),UM(e.state,e.dispatch,s,a,i),!0}else if(i){let o=Yd(e.state),s=o.start(-1);return UM(e.state,e.dispatch,s,nt.get(o.node(-1)).findCell(o.pos-s),i),!0}else return!1}function zH(e,t){var n;if(t.button!=0||t.ctrlKey||t.metaKey)return;let i=jM(e,t.target),r;if(t.shiftKey&&e.state.selection instanceof Le)o(e.state.selection.$anchorCell,t),t.preventDefault();else if(t.shiftKey&&i&&(r=Mi(e.state.selection.$anchor))!=null&&((n=_b(e,t))===null||n===void 0?void 0:n.pos)!=r.pos)o(r,t),t.preventDefault();else if(!i)return;function o(l,u){let c=_b(e,u),d=qr.getState(e.state)==null;if(!c||!Tb(l,c))if(d)c=l;else return;let f=new Le(l,c);if(d||!e.state.selection.eq(f)){let p=e.state.tr.setSelection(f);d&&p.setMeta(qr,l.pos),e.dispatch(p)}}function s(){e.root.removeEventListener("mouseup",s),e.root.removeEventListener("dragstart",s),e.root.removeEventListener("mousemove",a),qr.getState(e.state)!=null&&e.dispatch(e.state.tr.setMeta(qr,-1))}function a(l){let u=l,c=qr.getState(e.state),d;if(c!=null)d=e.state.doc.resolve(c);else if(jM(e,u.target)!=i&&(d=_b(e,t),!d))return s();d&&o(d,u)}e.root.addEventListener("mouseup",s),e.root.addEventListener("dragstart",s),e.root.addEventListener("mousemove",a)}function az(e,t,n){if(!(e.state.selection instanceof q))return null;let{$head:i}=e.state.selection;for(let r=i.depth-1;r>=0;r--){let o=i.node(r);if((n<0?i.index(r):i.indexAfter(r))!=(n<0?0:o.childCount))return null;if(o.type.spec.tableRole=="cell"||o.type.spec.tableRole=="header_cell"){let s=i.before(r),a=t=="vert"?n>0?"down":"up":n>0?"right":"left";return e.endOfTextblock(a)?s:null}}return null}function jM(e,t){for(;t&&t!=e.dom;t=t.parentNode)if(t.nodeName=="TD"||t.nodeName=="TH")return t;return null}function _b(e,t){let n=e.posAtCoords({left:t.clientX,top:t.clientY});if(!n)return null;let{inside:i,pos:r}=n;return i>=0&&Mi(e.state.doc.resolve(i))||Mi(e.state.doc.resolve(r))}var DH=class{constructor(e,t){this.node=e,this.defaultCellMinWidth=t,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.table.style.setProperty("--default-cell-min-width",`${t}px`),this.colgroup=this.table.appendChild(document.createElement("colgroup")),Cb(e,this.colgroup,this.table,t),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(e){return e.type!=this.node.type?!1:(this.node=e,Cb(e,this.colgroup,this.table,this.defaultCellMinWidth),!0)}ignoreMutation(e){return e.type=="attributes"&&(e.target==this.table||this.colgroup.contains(e.target))}};function Cb(e,t,n,i,r,o){let s=0,a=!0,l=t.firstChild,u=e.firstChild;if(u){for(let d=0,f=0;d<u.childCount;d++){let{colspan:p,colwidth:h}=u.child(d).attrs;for(let m=0;m<p;m++,f++){let g=r==f?o:h&&h[m],b=g?g+"px":"";if(s+=g||i,g||(a=!1),l)l.style.width!=b&&(l.style.width=b),l=l.nextSibling;else{let v=document.createElement("col");v.style.width=b,t.appendChild(v)}}}for(;l;){var c;let d=l.nextSibling;(c=l.parentNode)===null||c===void 0||c.removeChild(l),l=d}a?(n.style.width=s+"px",n.style.minWidth=""):(n.style.width="",n.style.minWidth=s+"px")}}var tn=new we("tableColumnResizing");function lz({handleWidth:e=5,cellMinWidth:t=25,defaultCellMinWidth:n=100,View:i=DH,lastColumnResizable:r=!0}={}){let o=new de({key:tn,state:{init(s,a){var l;let u=(l=o.spec)===null||l===void 0||(l=l.props)===null||l===void 0?void 0:l.nodeViews,c=Lt(a.schema).table.name;return i&&u&&(u[c]=(d,f)=>new i(d,n,f)),new NH(-1,!1)},apply(s,a){return a.apply(s)}},props:{attributes:s=>{let a=tn.getState(s);return a&&a.activeHandle>-1?{class:"resize-cursor"}:{}},handleDOMEvents:{mousemove:(s,a)=>{OH(s,a,e,r)},mouseleave:s=>{RH(s)},mousedown:(s,a)=>{PH(s,a,t,n)}},decorations:s=>{let a=tn.getState(s);if(a&&a.activeHandle>-1)return jH(s,a.activeHandle)},nodeViews:{}}});return o}var NH=class Xd{constructor(t,n){this.activeHandle=t,this.dragging=n}apply(t){let n=this,i=t.getMeta(tn);if(i&&i.setHandle!=null)return new Xd(i.setHandle,!1);if(i&&i.setDragging!==void 0)return new Xd(n.activeHandle,i.setDragging);if(n.activeHandle>-1&&t.docChanged){let r=t.mapping.map(n.activeHandle,-1);return Eb(t.doc.resolve(r))||(r=-1),new Xd(r,n.dragging)}return n}};function OH(e,t,n,i){if(!e.editable)return;let r=tn.getState(e.state);if(r&&!r.dragging){let o=FH(t.target),s=-1;if(o){let{left:a,right:l}=o.getBoundingClientRect();t.clientX-a<=n?s=ZM(e,t,"left",n):l-t.clientX<=n&&(s=ZM(e,t,"right",n))}if(s!=r.activeHandle){if(!i&&s!==-1){let a=e.state.doc.resolve(s),l=a.node(-1),u=nt.get(l),c=a.start(-1);if(u.colCount(a.pos-c)+a.nodeAfter.attrs.colspan-1==u.width-1)return}uz(e,s)}}}function RH(e){if(!e.editable)return;let t=tn.getState(e.state);t&&t.activeHandle>-1&&!t.dragging&&uz(e,-1)}function PH(e,t,n,i){var r;if(!e.editable)return!1;let o=(r=e.dom.ownerDocument.defaultView)!==null&&r!==void 0?r:window,s=tn.getState(e.state);if(!s||s.activeHandle==-1||s.dragging)return!1;let a=e.state.doc.nodeAt(s.activeHandle),l=LH(e,s.activeHandle,a.attrs);e.dispatch(e.state.tr.setMeta(tn,{setDragging:{startX:t.clientX,startWidth:l}}));function u(d){o.removeEventListener("mouseup",u),o.removeEventListener("mousemove",c);let f=tn.getState(e.state);f?.dragging&&(BH(e,f.activeHandle,HM(f.dragging,d,n)),e.dispatch(e.state.tr.setMeta(tn,{setDragging:null})))}function c(d){if(!d.which)return u(d);let f=tn.getState(e.state);if(f&&f.dragging){let p=HM(f.dragging,d,n);qM(e,f.activeHandle,p,i)}}return qM(e,s.activeHandle,l,i),o.addEventListener("mouseup",u),o.addEventListener("mousemove",c),t.preventDefault(),!0}function LH(e,t,{colspan:n,colwidth:i}){let r=i&&i[i.length-1];if(r)return r;let o=e.domAtPos(t),s=o.node.childNodes[o.offset].offsetWidth,a=n;if(i)for(let l=0;l<n;l++)i[l]&&(s-=i[l],a--);return s/a}function FH(e){for(;e&&e.nodeName!="TD"&&e.nodeName!="TH";)e=e.classList&&e.classList.contains("ProseMirror")?null:e.parentNode;return e}function ZM(e,t,n,i){let r=n=="right"?-i:i,o=e.posAtCoords({left:t.clientX+r,top:t.clientY});if(!o)return-1;let{pos:s}=o,a=Mi(e.state.doc.resolve(s));if(!a)return-1;if(n=="right")return a.pos;let l=nt.get(a.node(-1)),u=a.start(-1),c=l.map.indexOf(a.pos-u);return c%l.width==0?-1:u+l.map[c-1]}function HM(e,t,n){let i=t.clientX-e.startX;return Math.max(n,e.startWidth+i)}function uz(e,t){e.dispatch(e.state.tr.setMeta(tn,{setHandle:t}))}function BH(e,t,n){let i=e.state.doc.resolve(t),r=i.node(-1),o=nt.get(r),s=i.start(-1),a=o.colCount(i.pos-s)+i.nodeAfter.attrs.colspan-1,l=e.state.tr;for(let u=0;u<o.height;u++){let c=u*o.width+a;if(u&&o.map[c]==o.map[c-o.width])continue;let d=o.map[c],f=r.nodeAt(d).attrs,p=f.colspan==1?0:a-o.colCount(d);if(f.colwidth&&f.colwidth[p]==n)continue;let h=f.colwidth?f.colwidth.slice():UH(f.colspan);h[p]=n,l.setNodeMarkup(s+d,null,{...f,colwidth:h})}l.docChanged&&e.dispatch(l)}function qM(e,t,n,i){let r=e.state.doc.resolve(t),o=r.node(-1),s=r.start(-1),a=nt.get(o).colCount(r.pos-s)+r.nodeAfter.attrs.colspan-1,l=e.domAtPos(r.start(-1)).node;for(;l&&l.nodeName!="TABLE";)l=l.parentNode;l&&Cb(o,l.firstChild,l,i,a,n)}function UH(e){return Array(e).fill(0)}function jH(e,t){let n=[],i=e.doc.resolve(t),r=i.node(-1);if(!r)return Ce.empty;let o=nt.get(r),s=i.start(-1),a=o.colCount(i.pos-s)+i.nodeAfter.attrs.colspan-1;for(let u=0;u<o.height;u++){let c=a+u*o.width;if((a==o.width-1||o.map[c]!=o.map[c+1])&&(u==0||o.map[c]!=o.map[c-o.width])){var l;let d=o.map[c],f=s+d+r.nodeAt(d).nodeSize-1,p=document.createElement("div");p.className="column-resize-handle",!((l=tn.getState(e))===null||l===void 0)&&l.dragging&&n.push(pt.node(s+d,s+d+r.nodeAt(d).nodeSize,{class:"column-resize-dragging"})),n.push(pt.widget(f,p))}}return Ce.create(e.doc,n)}function cz({allowTableNodeSelection:e=!1}={}){return new de({key:qr,state:{init(){return null},apply(t,n){let i=t.getMeta(qr);if(i!=null)return i==-1?null:i;if(n==null||!t.docChanged)return n;let{deleted:r,pos:o}=t.mapping.mapResult(n);return r?null:o}},props:{decorations:fH,handleDOMEvents:{mousedown:zH},createSelectionBetween(t){return qr.getState(t.state)!=null?t.state.selection:null},handleTripleClick:AH,handleKeyDown:IH,handlePaste:MH},appendTransaction(t,n,i){return mH(i,Ib(i,n),e)}})}function ef(e){return e==="left"||e==="right"||e==="center"?e:null}function ZH(e){let t=(e.style.textAlign||"").trim().toLowerCase(),n=(e.getAttribute("align")||"").trim().toLowerCase();return ef(t||n)}function HH(e){return ef(e?.align)}function hz(){return{default:null,parseHTML:e=>ZH(e),renderHTML:e=>e.align?{style:`text-align: ${e.align}`}:{}}}function qH(e){var t;let n=e.parentElement,i=e.closest("table");if(!n||!i)return null;let r=Array.from(n.children).indexOf(e),o=(t=i.querySelectorAll("colgroup > col")[r])===null||t===void 0?void 0:t.getAttribute("width");return o?[parseInt(o,10)]:null}function mz(e){let t=e.getAttribute("colwidth");return t?t.split(",").map(n=>parseInt(n,10)):qH(e)}var WH=/[ \t\r\n\f]+/g;function gz(e){var t;return e.children.length>0?!1:((t=e.textContent)!==null&&t!==void 0?t:"").replace(WH,"")===""}function bz(e){let t=e.createAndFill();if(!t)throw new Error(`[tiptap error]: "${e.name}" has no default content to backfill.`);return t.content}var Ya=ae.create({name:"tableCell",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:mz},align:hz()}},tableRole:"cell",isolating:!0,parseHTML(){return[{tag:"td",getAttrs:e=>gz(e)?{}:!1,getContent:(e,t)=>bz(t.nodes[this.name])},{tag:"td"}]},renderHTML({HTMLAttributes:e}){return["td",fe(this.options.HTMLAttributes,e),0]}}),Qa=ae.create({name:"tableHeader",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:mz},align:hz()}},tableRole:"header_cell",isolating:!0,parseHTML(){return[{tag:"th",getAttrs:e=>gz(e)?{}:!1,getContent:(e,t)=>bz(t.nodes[this.name])},{tag:"th"}]},renderHTML({HTMLAttributes:e}){return["th",fe(this.options.HTMLAttributes,e),0]}}),el=ae.create({name:"tableRow",addOptions(){return{HTMLAttributes:{}}},content:"(tableCell | tableHeader)*",tableRole:"row",parseHTML(){return[{tag:"tr"}]},renderHTML({HTMLAttributes:e}){return["tr",fe(this.options.HTMLAttributes,e),0]}});function Db(e,t){return t?["width",`${Math.max(t,e)}px`]:["min-width",`${e}px`]}function dz(e,t,n,i,r,o){let s=0,a=!0,l=t.firstChild,u=e.firstChild;if(u!==null)for(let f=0,p=0;f<u.childCount;f+=1){let{colspan:h,colwidth:m}=u.child(f).attrs;for(let g=0;g<h;g+=1,p+=1){let b=r===p?o:m&&m[g],v=b?`${b}px`:"";if(s+=b||i,b||(a=!1),l){if(l.style.width!==v){let[y,x]=Db(i,b);l.style.setProperty(y,x)}l=l.nextSibling}else{let y=document.createElement("col"),[x,C]=Db(i,b);y.style.setProperty(x,C),t.appendChild(y)}}}for(;l;){var c;let f=l.nextSibling;(c=l.parentNode)===null||c===void 0||c.removeChild(l),l=f}let d=e.attrs.style&&typeof e.attrs.style=="string"&&/\bwidth\s*:/i.test(e.attrs.style);a&&!d?(n.style.width=`${s}px`,n.style.minWidth=""):(n.style.width="",n.style.minWidth=`${s}px`)}var VH=class{constructor(e,t,n,i={}){this.node=e,this.cellMinWidth=t,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table"));for(let[r,o]of Object.entries(i))o!=null&&(r==="style"?this.table.style.cssText=String(o):this.table.setAttribute(r,String(o)));e.attrs.style&&(this.table.style.cssText=e.attrs.style),this.colgroup=this.table.appendChild(document.createElement("colgroup")),dz(e,this.colgroup,this.table,t),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(e){return e.type!==this.node.type?!1:(this.node=e,dz(e,this.colgroup,this.table,this.cellMinWidth),!0)}ignoreMutation(e){let t=e.target,n=this.dom.contains(t),i=this.contentDOM.contains(t);return!!(n&&!i&&(e.type==="attributes"||e.type==="childList"||e.type==="characterData"))}};function KH(e,t,n,i){let r=0,o=!0,s=[],a=e.firstChild;if(!a)return{};for(let c=0,d=0;c<a.childCount;c+=1){let{colspan:f,colwidth:p}=a.child(c).attrs;for(let h=0;h<f;h+=1,d+=1){let m=n===d?i:p&&p[h];r+=m||t,m||(o=!1);let[g,b]=Db(t,m);s.push(["col",{style:`${g}: ${b}`}])}}let l=o?`${r}px`:"",u=o?"":`${r}px`;return{colgroup:["colgroup",{},...s],tableWidth:l,tableMinWidth:u}}function fz(e,t){return t?e.createChecked(null,t):e.createAndFill()}function JH(e){if(e.cached.tableNodeTypes)return e.cached.tableNodeTypes;let t={};return Object.keys(e.nodes).forEach(n=>{let i=e.nodes[n];i.spec.tableRole&&(t[i.spec.tableRole]=i)}),e.cached.tableNodeTypes=t,t}function GH(e,t,n,i,r){let o=JH(e),s=[],a=[];for(let u=0;u<n;u+=1){let c=fz(o.cell,r);if(c&&a.push(c),i){let d=fz(o.header_cell,r);d&&s.push(d)}}let l=[];for(let u=0;u<t;u+=1)l.push(o.row.createChecked(null,i&&u===0?s:a));return o.table.createChecked(null,l)}function XH(e){return e instanceof Le}var Qd=({editor:e})=>{let{selection:t}=e.state;if(!XH(t))return!1;let n=0,i=Ro(t.ranges[0].$from,r=>r.type.name==="table");return i?.node.descendants(r=>{if(r.type.name==="table")return!1;["tableCell","tableHeader"].includes(r.type.name)&&(n+=1)}),n!==t.ranges.length?!1:(e.commands.deleteTable(),!0)};function pz(e,t){let n=e.mapping.map(t),i=Ro(e.selection.$from,s=>s.type.name==="table");if(i?.pos===n)return;let r=e.doc.nodeAt(n);if(!r)return;let o=n+r.nodeSize-1;e.setSelection(q.near(e.doc.resolve(o),-1))}function YH(e){let t="",n=0;for(;n<e.length;){if(e[n]==="\\"&&n+1<e.length){t+=e[n]+e[n+1],n+=2;continue}if(e[n]!=="`"){t+=e[n++];continue}let i=0;for(;n+i<e.length&&e[n+i]==="`";)i+=1;let r=n+i,o=!1;for(;r<e.length;){if(e[r]!=="`"){r+=1;continue}let s=0;for(;r+s<e.length&&e[r+s]==="`";)s+=1;if(s===i){let a=e.slice(n+i,r);t+=e.slice(n,n+i)+a.replace(/\\\||\|/g,l=>l==="|"?"\\|":l)+e.slice(r,r+i),n=r+i,o=!0;break}r+=s}o||(t+=e.slice(n,n+i),n+=i)}return t}function QH(e){return e.split(`
230
+ `).map(t=>!t.includes("|")||!t.includes("`")?t:YH(t)).join(`
231
+ `)}function eq(e){return(e||"").replace(/\s+/g," ").trim()}function tq(e,t,n={}){var i;let r=(i=n.cellLineSeparator)!==null&&i!==void 0?i:"";if(!e||!e.content||e.content.length===0)return"";let o=[];e.content.forEach(h=>{let m=[];h.content&&h.content.forEach(g=>{let b="";g.content&&Array.isArray(g.content)&&g.content.length>1?b=g.content.map(C=>t.renderChildren(C)).join(r):b=g.content?t.renderChildren(g.content):"";let v=eq(b.split(r).join(`
232
+ `).replace(/[ \t]*\r?\n[ \t]*/g,"<br>")),y=g.type==="tableHeader",x=HH(g.attrs);m.push({text:v,isHeader:y,align:x})}),o.push(m)});let s=o.reduce((h,m)=>Math.max(h,m.length),0);if(s===0)return"";let a=Array.from({length:s}).fill(0);o.forEach(h=>{for(let g=0;g<s;g+=1){var m;let b=(((m=h[g])===null||m===void 0?void 0:m.text)||"").length;b>a[g]&&(a[g]=b),a[g]<3&&(a[g]=3)}});let l=(h,m)=>h+" ".repeat(Math.max(0,m-h.length)),u=o[0],c=u.some(h=>h.isHeader),d=Array.from({length:s}).fill(null);o.forEach(h=>{for(let g=0;g<s;g+=1){var m;!d[g]&&(!((m=h[g])===null||m===void 0)&&m.align)&&(d[g]=h[g].align)}});let f=`
233
+ `,p=Array.from({length:s}).map((h,m)=>c&&u[m]&&u[m].text||"");return f+=`| ${p.map((h,m)=>l(h,a[m])).join(" | ")} |
234
+ `,f+=`| ${a.map((h,m)=>{let g=Math.max(3,h),b=d[m];return b==="left"?`:${"-".repeat(g)}`:b==="right"?`${"-".repeat(g)}:`:b==="center"?`:${"-".repeat(g)}:`:"-".repeat(g)}).join(" | ")} |
235
+ `,(c?o.slice(1):o).forEach(h=>{f+=`| ${Array.from({length:s}).fill(0).map((m,g)=>l(h[g]&&h[g].text||"",a[g])).join(" | ")} |
236
+ `}),f}var Nb=ae.create({name:"table",addOptions(){return{HTMLAttributes:{},resizable:!1,renderWrapper:!1,handleWidth:5,cellMinWidth:25,View:VH,lastColumnResizable:!0,allowTableNodeSelection:!1}},content:"tableRow+",tableRole:"table",isolating:!0,group:"block",parseHTML(){return[{tag:"table"}]},renderHTML({node:e,HTMLAttributes:t}){let{colgroup:n,tableWidth:i,tableMinWidth:r}=KH(e,this.options.cellMinWidth),o=t.style;function s(){return o||(i?`width: ${i}`:`min-width: ${r}`)}let a=["table",fe(this.options.HTMLAttributes,t,{style:s()}),n,["tbody",0]];return this.options.renderWrapper?["div",{class:"tableWrapper"},a]:a},parseMarkdown:(e,t)=>{let n=[],i=Array.isArray(e.align)?e.align:[];if(e.header){let r=[];e.header.forEach((o,s)=>{var a;let l=ef((a=i[s])!==null&&a!==void 0?a:o.align),u=l?{align:l}:{};r.push(t.createNode("tableHeader",u,[{type:"paragraph",content:t.parseInline(o.tokens)}]))}),n.push(t.createNode("tableRow",{},r))}return e.rows&&e.rows.forEach(r=>{let o=[];r.forEach((s,a)=>{var l;let u=ef((l=i[a])!==null&&l!==void 0?l:s.align),c=u?{align:u}:{};o.push(t.createNode("tableCell",c,[{type:"paragraph",content:t.parseInline(s.tokens)}]))}),n.push(t.createNode("tableRow",{},o))}),t.createNode("table",void 0,n)},renderMarkdown:(e,t)=>tq(e,t),markdownTokenizer:{name:"table",level:"block",start:e=>{let t=e.split(`
237
+ `);if(t.length<2)return-1;let n=t[1];return!/^[ \t|:]*-[ \t|:-]*$/.test(n)||!n.includes("|")?-1:t[0].includes("|")?0:-1},tokenize(e,t,n){let i=e.indexOf(`
238
+
239
+ `),r=i>=0?e.slice(0,i):e,o=r.split(`
240
+ `);if(o.length<2)return;let s=o[1];if(!/^[ \t|:]*-[ \t|:-]*$/.test(s)||!s.includes("|"))return;let a=QH(r);if(a===r)return;let l=n.blockTokens(a)[0];if(l?.type!=="table"||!l.raw)return;let u=l.raw.split(`
241
+ `).length,c=e.split(`
242
+ `).slice(0,u).join(`
243
+ `);return{...l,raw:c}}},addCommands(){return{insertTable:({rows:e=3,cols:t=3,withHeaderRow:n=!0}={})=>({tr:i,dispatch:r,editor:o})=>{let s=GH(o.schema,e,t,n);if(r){let a=i.selection.from+1;i.replaceSelectionWith(s).scrollIntoView().setSelection(q.near(i.doc.resolve(a)))}return!0},addColumnBefore:()=>({state:e,dispatch:t})=>XM(e,t),addColumnAfter:()=>({state:e,dispatch:t})=>YM(e,t),deleteColumn:()=>({state:e,dispatch:t})=>{let n=Ro(e.selection.$from,i=>i.type.name==="table");return QM(e,t&&(i=>{n&&pz(i,n.pos),t(i)}))},addRowBefore:()=>({state:e,dispatch:t})=>tz(e,t),addRowAfter:()=>({state:e,dispatch:t})=>nz(e,t),deleteRow:()=>({state:e,dispatch:t})=>{let n=Ro(e.selection.$from,i=>i.type.name==="table");return rz(e,t&&(i=>{n&&pz(i,n.pos),t(i)}))},deleteTable:()=>({state:e,dispatch:t})=>sz(e,t),mergeCells:()=>({state:e,dispatch:t})=>Ab(e,t),splitCell:()=>({state:e,dispatch:t})=>Mb(e,t),toggleHeaderColumn:()=>({state:e,dispatch:t})=>Ho("column")(e,t),toggleHeaderRow:()=>({state:e,dispatch:t})=>Ho("row")(e,t),toggleHeaderCell:()=>({state:e,dispatch:t})=>oz(e,t),mergeOrSplit:()=>({state:e,dispatch:t})=>Ab(e,t)?!0:Mb(e,t),setCellAttribute:(e,t)=>({state:n,dispatch:i})=>iz(e,t)(n,i),goToNextCell:()=>({state:e,dispatch:t})=>zb(1)(e,t),goToPreviousCell:()=>({state:e,dispatch:t})=>zb(-1)(e,t),fixTables:()=>({state:e,dispatch:t})=>(t&&Ib(e),!0),setCellSelection:e=>({tr:t,dispatch:n})=>{if(n){let i=Le.create(t.doc,e.anchorCell,e.headCell);t.setSelection(i)}return!0}}},addKeyboardShortcuts(){return{Tab:()=>this.editor.commands.goToNextCell()?!0:this.editor.can().addRowAfter()?this.editor.chain().addRowAfter().goToNextCell().run():!1,"Shift-Tab":()=>this.editor.commands.goToPreviousCell(),Backspace:Qd,"Mod-Backspace":Qd,Delete:Qd,"Mod-Delete":Qd}},addProseMirrorPlugins(){return[...this.options.resizable&&this.editor.isEditable?[lz({handleWidth:this.options.handleWidth,cellMinWidth:this.options.cellMinWidth,defaultCellMinWidth:this.options.cellMinWidth,View:this.options.View,lastColumnResizable:this.options.lastColumnResizable})]:[],cz({allowTableNodeSelection:this.options.allowTableNodeSelection})]},addNodeView(){let e=this.options.resizable&&this.editor.isEditable,t=this.options.View;return e||!t?null:({node:n,view:i,HTMLAttributes:r})=>{let o=fe(this.options.HTMLAttributes,r);return new t(n,this.options.cellMinWidth,i,o)}},extendNodeSchema(e){let t={name:e.name,options:e.options,storage:e.storage};return{tableRole:Se(K(e,"tableRole",t))}}}),doe=Te.create({name:"tableKit",addExtensions(){let e=[];return this.options.table!==!1&&e.push(Nb.configure(this.options.table)),this.options.tableCell!==!1&&e.push(Ya.configure(this.options.tableCell)),this.options.tableHeader!==!1&&e.push(Qa.configure(this.options.tableHeader)),this.options.tableRow!==!1&&e.push(el.configure(this.options.tableRow)),e}});var jb={};Wi(jb,{arrayReplaceAt:()=>Cq,asciiTrim:()=>Pi,assign:()=>Ko,escapeHtml:()=>kr,escapeRE:()=>Lq,fromCodePoint:()=>Jo,has:()=>$q,isMdAsciiPunct:()=>Oi,isPunctChar:()=>Lz,isPunctCharCode:()=>Ni,isSpace:()=>be,isString:()=>pf,isValidEntityCode:()=>hf,isWhiteSpace:()=>Di,lib:()=>Fq,normalizeReference:()=>Ri,unescapeAll:()=>yr,unescapeMd:()=>zq});var sf={};Wi(sf,{decode:()=>tl,encode:()=>rf,format:()=>qo,parse:()=>nl});var vz={};function nq(e){let t=vz[e];if(t)return t;t=vz[e]=[];for(let n=0;n<128;n++){let i=String.fromCharCode(n);t.push(i)}for(let n=0;n<e.length;n++){let i=e.charCodeAt(n);t[i]="%"+("0"+i.toString(16).toUpperCase()).slice(-2)}return t}function tf(e,t){typeof t!="string"&&(t=tf.defaultChars);let n=nq(t);return e.replace(/(%[a-f0-9]{2})+/gi,function(i){let r="";for(let o=0,s=i.length;o<s;o+=3){let a=parseInt(i.slice(o+1,o+3),16);if(a<128){r+=n[a];continue}if((a&224)===192&&o+3<s){let l=parseInt(i.slice(o+4,o+6),16);if((l&192)===128){let u=a<<6&1984|l&63;u<128?r+="\uFFFD\uFFFD":r+=String.fromCharCode(u),o+=3;continue}}if((a&240)===224&&o+6<s){let l=parseInt(i.slice(o+4,o+6),16),u=parseInt(i.slice(o+7,o+9),16);if((l&192)===128&&(u&192)===128){let c=a<<12&61440|l<<6&4032|u&63;c<2048||c>=55296&&c<=57343?r+="\uFFFD\uFFFD\uFFFD":r+=String.fromCharCode(c),o+=6;continue}}if((a&248)===240&&o+9<s){let l=parseInt(i.slice(o+4,o+6),16),u=parseInt(i.slice(o+7,o+9),16),c=parseInt(i.slice(o+10,o+12),16);if((l&192)===128&&(u&192)===128&&(c&192)===128){let d=a<<18&1835008|l<<12&258048|u<<6&4032|c&63;d<65536||d>1114111?r+="\uFFFD\uFFFD\uFFFD\uFFFD":(d-=65536,r+=String.fromCharCode(55296+(d>>10),56320+(d&1023))),o+=9;continue}}r+="\uFFFD"}return r})}tf.defaultChars=";/?:@&=+$,#";tf.componentChars="";var tl=tf;var yz={};function rq(e){let t=yz[e];if(t)return t;t=yz[e]=[];for(let n=0;n<128;n++){let i=String.fromCharCode(n);/^[0-9a-z]$/i.test(i)?t.push(i):t.push("%"+("0"+n.toString(16).toUpperCase()).slice(-2))}for(let n=0;n<e.length;n++)t[e.charCodeAt(n)]=e[n];return t}function nf(e,t,n){typeof t!="string"&&(n=t,t=nf.defaultChars),typeof n>"u"&&(n=!0);let i=rq(t),r="";for(let o=0,s=e.length;o<s;o++){let a=e.charCodeAt(o);if(n&&a===37&&o+2<s&&/^[0-9a-f]{2}$/i.test(e.slice(o+1,o+3))){r+=e.slice(o,o+3),o+=2;continue}if(a<128){r+=i[a];continue}if(a>=55296&&a<=57343){if(a>=55296&&a<=56319&&o+1<s){let l=e.charCodeAt(o+1);if(l>=56320&&l<=57343){r+=encodeURIComponent(e[o]+e[o+1]),o++;continue}}r+="%EF%BF%BD";continue}r+=encodeURIComponent(e[o])}return r}nf.defaultChars=";/?:@&=+$,-_.!~*'()#";nf.componentChars="-_.!~*'()";var rf=nf;function qo(e){let t="";return t+=e.protocol||"",t+=e.slashes?"//":"",t+=e.auth?e.auth+"@":"",e.hostname&&e.hostname.indexOf(":")!==-1?t+="["+e.hostname+"]":t+=e.hostname||"",t+=e.port?":"+e.port:"",t+=e.pathname||"",t+=e.search||"",t+=e.hash||"",t}function of(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}var iq=/^([a-z0-9.+-]+:)/i,oq=/:[0-9]*$/,sq=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,aq=["<",">",'"',"`"," ","\r",`
244
+ `," "],lq=["{","}","|","\\","^","`"].concat(aq),uq=["'"].concat(lq),kz=["%","/","?",";","#"].concat(uq),xz=["/","?","#"],cq=255,_z=/^[+a-z0-9A-Z_-]{0,63}$/,dq=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,wz={javascript:!0,"javascript:":!0},Sz={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function fq(e,t){if(e&&e instanceof of)return e;let n=new of;return n.parse(e,t),n}of.prototype.parse=function(e,t){let n,i,r,o=e;if(o=o.trim(),!t&&e.split("#").length===1){let u=sq.exec(o);if(u)return this.pathname=u[1],u[2]&&(this.search=u[2]),this}let s=iq.exec(o);if(s&&(s=s[0],n=s.toLowerCase(),this.protocol=s,o=o.substr(s.length)),(t||s||o.match(/^\/\/[^@\/]+@[^@\/]+/))&&(r=o.substr(0,2)==="//",r&&!(s&&wz[s])&&(o=o.substr(2),this.slashes=!0)),!wz[s]&&(r||s&&!Sz[s])){let u=-1;for(let h=0;h<xz.length;h++)i=o.indexOf(xz[h]),i!==-1&&(u===-1||i<u)&&(u=i);let c,d;u===-1?d=o.lastIndexOf("@"):d=o.lastIndexOf("@",u),d!==-1&&(c=o.slice(0,d),o=o.slice(d+1),this.auth=c),u=-1;for(let h=0;h<kz.length;h++)i=o.indexOf(kz[h]),i!==-1&&(u===-1||i<u)&&(u=i);u===-1&&(u=o.length),o[u-1]===":"&&u--;let f=o.slice(0,u);o=o.slice(u),this.parseHost(f),this.hostname=this.hostname||"";let p=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!p){let h=this.hostname.split(/\./);for(let m=0,g=h.length;m<g;m++){let b=h[m];if(b&&!b.match(_z)){let v="";for(let y=0,x=b.length;y<x;y++)b.charCodeAt(y)>127?v+="x":v+=b[y];if(!v.match(_z)){let y=h.slice(0,m),x=h.slice(m+1),C=b.match(dq);C&&(y.push(C[1]),x.unshift(C[2])),x.length&&(o=x.join(".")+o),this.hostname=y.join(".");break}}}}this.hostname.length>cq&&(this.hostname=""),p&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}let a=o.indexOf("#");a!==-1&&(this.hash=o.substr(a),o=o.slice(0,a));let l=o.indexOf("?");return l!==-1&&(this.search=o.substr(l),o=o.slice(0,l)),o&&(this.pathname=o),Sz[n]&&this.hostname&&!this.pathname&&(this.pathname=""),this};of.prototype.parseHost=function(e){let t=oq.exec(e);t&&(t=t[0],t!==":"&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};var nl=fq;var Ob={};Wi(Ob,{Any:()=>af,Cc:()=>lf,Cf:()=>Ez,P:()=>Wo,S:()=>uf,Z:()=>cf});var af=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;var lf=/[\0-\x1F\x7F-\x9F]/;var Ez=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/;var Wo=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/;var uf=/[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC2\uFD40-\uFD4F\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF76\uDF7B-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC5\uDECE-\uDEDB\uDEE0-\uDEE8\uDEF0-\uDEF8\uDF00-\uDF92\uDF94-\uDFCA]/;var cf=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/;var $z=new Uint16Array('\u1D41<\xD5\u0131\u028A\u049D\u057B\u05D0\u0675\u06DE\u07A2\u07D6\u080F\u0A4A\u0A91\u0DA1\u0E6D\u0F09\u0F26\u10CA\u1228\u12E1\u1415\u149D\u14C3\u14DF\u1525\0\0\0\0\0\0\u156B\u16CD\u198D\u1C12\u1DDD\u1F7E\u2060\u21B0\u228D\u23C0\u23FB\u2442\u2824\u2912\u2D08\u2E48\u2FCE\u3016\u32BA\u3639\u37AC\u38FE\u3A28\u3A71\u3AE0\u3B2E\u0800EMabcfglmnoprstu\\bfms\x7F\x84\x8B\x90\x95\x98\xA6\xB3\xB9\xC8\xCFlig\u803B\xC6\u40C6P\u803B&\u4026cute\u803B\xC1\u40C1reve;\u4102\u0100iyx}rc\u803B\xC2\u40C2;\u4410r;\uC000\u{1D504}rave\u803B\xC0\u40C0pha;\u4391acr;\u4100d;\u6A53\u0100gp\x9D\xA1on;\u4104f;\uC000\u{1D538}plyFunction;\u6061ing\u803B\xC5\u40C5\u0100cs\xBE\xC3r;\uC000\u{1D49C}ign;\u6254ilde\u803B\xC3\u40C3ml\u803B\xC4\u40C4\u0400aceforsu\xE5\xFB\xFE\u0117\u011C\u0122\u0127\u012A\u0100cr\xEA\xF2kslash;\u6216\u0176\xF6\xF8;\u6AE7ed;\u6306y;\u4411\u0180crt\u0105\u010B\u0114ause;\u6235noullis;\u612Ca;\u4392r;\uC000\u{1D505}pf;\uC000\u{1D539}eve;\u42D8c\xF2\u0113mpeq;\u624E\u0700HOacdefhilorsu\u014D\u0151\u0156\u0180\u019E\u01A2\u01B5\u01B7\u01BA\u01DC\u0215\u0273\u0278\u027Ecy;\u4427PY\u803B\xA9\u40A9\u0180cpy\u015D\u0162\u017Aute;\u4106\u0100;i\u0167\u0168\u62D2talDifferentialD;\u6145leys;\u612D\u0200aeio\u0189\u018E\u0194\u0198ron;\u410Cdil\u803B\xC7\u40C7rc;\u4108nint;\u6230ot;\u410A\u0100dn\u01A7\u01ADilla;\u40B8terDot;\u40B7\xF2\u017Fi;\u43A7rcle\u0200DMPT\u01C7\u01CB\u01D1\u01D6ot;\u6299inus;\u6296lus;\u6295imes;\u6297o\u0100cs\u01E2\u01F8kwiseContourIntegral;\u6232eCurly\u0100DQ\u0203\u020FoubleQuote;\u601Duote;\u6019\u0200lnpu\u021E\u0228\u0247\u0255on\u0100;e\u0225\u0226\u6237;\u6A74\u0180git\u022F\u0236\u023Aruent;\u6261nt;\u622FourIntegral;\u622E\u0100fr\u024C\u024E;\u6102oduct;\u6210nterClockwiseContourIntegral;\u6233oss;\u6A2Fcr;\uC000\u{1D49E}p\u0100;C\u0284\u0285\u62D3ap;\u624D\u0580DJSZacefios\u02A0\u02AC\u02B0\u02B4\u02B8\u02CB\u02D7\u02E1\u02E6\u0333\u048D\u0100;o\u0179\u02A5trahd;\u6911cy;\u4402cy;\u4405cy;\u440F\u0180grs\u02BF\u02C4\u02C7ger;\u6021r;\u61A1hv;\u6AE4\u0100ay\u02D0\u02D5ron;\u410E;\u4414l\u0100;t\u02DD\u02DE\u6207a;\u4394r;\uC000\u{1D507}\u0100af\u02EB\u0327\u0100cm\u02F0\u0322ritical\u0200ADGT\u0300\u0306\u0316\u031Ccute;\u40B4o\u0174\u030B\u030D;\u42D9bleAcute;\u42DDrave;\u4060ilde;\u42DCond;\u62C4ferentialD;\u6146\u0470\u033D\0\0\0\u0342\u0354\0\u0405f;\uC000\u{1D53B}\u0180;DE\u0348\u0349\u034D\u40A8ot;\u60DCqual;\u6250ble\u0300CDLRUV\u0363\u0372\u0382\u03CF\u03E2\u03F8ontourIntegra\xEC\u0239o\u0274\u0379\0\0\u037B\xBB\u0349nArrow;\u61D3\u0100eo\u0387\u03A4ft\u0180ART\u0390\u0396\u03A1rrow;\u61D0ightArrow;\u61D4e\xE5\u02CAng\u0100LR\u03AB\u03C4eft\u0100AR\u03B3\u03B9rrow;\u67F8ightArrow;\u67FAightArrow;\u67F9ight\u0100AT\u03D8\u03DErrow;\u61D2ee;\u62A8p\u0241\u03E9\0\0\u03EFrrow;\u61D1ownArrow;\u61D5erticalBar;\u6225n\u0300ABLRTa\u0412\u042A\u0430\u045E\u047F\u037Crrow\u0180;BU\u041D\u041E\u0422\u6193ar;\u6913pArrow;\u61F5reve;\u4311eft\u02D2\u043A\0\u0446\0\u0450ightVector;\u6950eeVector;\u695Eector\u0100;B\u0459\u045A\u61BDar;\u6956ight\u01D4\u0467\0\u0471eeVector;\u695Fector\u0100;B\u047A\u047B\u61C1ar;\u6957ee\u0100;A\u0486\u0487\u62A4rrow;\u61A7\u0100ct\u0492\u0497r;\uC000\u{1D49F}rok;\u4110\u0800NTacdfglmopqstux\u04BD\u04C0\u04C4\u04CB\u04DE\u04E2\u04E7\u04EE\u04F5\u0521\u052F\u0536\u0552\u055D\u0560\u0565G;\u414AH\u803B\xD0\u40D0cute\u803B\xC9\u40C9\u0180aiy\u04D2\u04D7\u04DCron;\u411Arc\u803B\xCA\u40CA;\u442Dot;\u4116r;\uC000\u{1D508}rave\u803B\xC8\u40C8ement;\u6208\u0100ap\u04FA\u04FEcr;\u4112ty\u0253\u0506\0\0\u0512mallSquare;\u65FBerySmallSquare;\u65AB\u0100gp\u0526\u052Aon;\u4118f;\uC000\u{1D53C}silon;\u4395u\u0100ai\u053C\u0549l\u0100;T\u0542\u0543\u6A75ilde;\u6242librium;\u61CC\u0100ci\u0557\u055Ar;\u6130m;\u6A73a;\u4397ml\u803B\xCB\u40CB\u0100ip\u056A\u056Fsts;\u6203onentialE;\u6147\u0280cfios\u0585\u0588\u058D\u05B2\u05CCy;\u4424r;\uC000\u{1D509}lled\u0253\u0597\0\0\u05A3mallSquare;\u65FCerySmallSquare;\u65AA\u0370\u05BA\0\u05BF\0\0\u05C4f;\uC000\u{1D53D}All;\u6200riertrf;\u6131c\xF2\u05CB\u0600JTabcdfgorst\u05E8\u05EC\u05EF\u05FA\u0600\u0612\u0616\u061B\u061D\u0623\u066C\u0672cy;\u4403\u803B>\u403Emma\u0100;d\u05F7\u05F8\u4393;\u43DCreve;\u411E\u0180eiy\u0607\u060C\u0610dil;\u4122rc;\u411C;\u4413ot;\u4120r;\uC000\u{1D50A};\u62D9pf;\uC000\u{1D53E}eater\u0300EFGLST\u0635\u0644\u064E\u0656\u065B\u0666qual\u0100;L\u063E\u063F\u6265ess;\u62DBullEqual;\u6267reater;\u6AA2ess;\u6277lantEqual;\u6A7Eilde;\u6273cr;\uC000\u{1D4A2};\u626B\u0400Aacfiosu\u0685\u068B\u0696\u069B\u069E\u06AA\u06BE\u06CARDcy;\u442A\u0100ct\u0690\u0694ek;\u42C7;\u405Eirc;\u4124r;\u610ClbertSpace;\u610B\u01F0\u06AF\0\u06B2f;\u610DizontalLine;\u6500\u0100ct\u06C3\u06C5\xF2\u06A9rok;\u4126mp\u0144\u06D0\u06D8ownHum\xF0\u012Fqual;\u624F\u0700EJOacdfgmnostu\u06FA\u06FE\u0703\u0707\u070E\u071A\u071E\u0721\u0728\u0744\u0778\u078B\u078F\u0795cy;\u4415lig;\u4132cy;\u4401cute\u803B\xCD\u40CD\u0100iy\u0713\u0718rc\u803B\xCE\u40CE;\u4418ot;\u4130r;\u6111rave\u803B\xCC\u40CC\u0180;ap\u0720\u072F\u073F\u0100cg\u0734\u0737r;\u412AinaryI;\u6148lie\xF3\u03DD\u01F4\u0749\0\u0762\u0100;e\u074D\u074E\u622C\u0100gr\u0753\u0758ral;\u622Bsection;\u62C2isible\u0100CT\u076C\u0772omma;\u6063imes;\u6062\u0180gpt\u077F\u0783\u0788on;\u412Ef;\uC000\u{1D540}a;\u4399cr;\u6110ilde;\u4128\u01EB\u079A\0\u079Ecy;\u4406l\u803B\xCF\u40CF\u0280cfosu\u07AC\u07B7\u07BC\u07C2\u07D0\u0100iy\u07B1\u07B5rc;\u4134;\u4419r;\uC000\u{1D50D}pf;\uC000\u{1D541}\u01E3\u07C7\0\u07CCr;\uC000\u{1D4A5}rcy;\u4408kcy;\u4404\u0380HJacfos\u07E4\u07E8\u07EC\u07F1\u07FD\u0802\u0808cy;\u4425cy;\u440Cppa;\u439A\u0100ey\u07F6\u07FBdil;\u4136;\u441Ar;\uC000\u{1D50E}pf;\uC000\u{1D542}cr;\uC000\u{1D4A6}\u0580JTaceflmost\u0825\u0829\u082C\u0850\u0863\u09B3\u09B8\u09C7\u09CD\u0A37\u0A47cy;\u4409\u803B<\u403C\u0280cmnpr\u0837\u083C\u0841\u0844\u084Dute;\u4139bda;\u439Bg;\u67EAlacetrf;\u6112r;\u619E\u0180aey\u0857\u085C\u0861ron;\u413Ddil;\u413B;\u441B\u0100fs\u0868\u0970t\u0500ACDFRTUVar\u087E\u08A9\u08B1\u08E0\u08E6\u08FC\u092F\u095B\u0390\u096A\u0100nr\u0883\u088FgleBracket;\u67E8row\u0180;BR\u0899\u089A\u089E\u6190ar;\u61E4ightArrow;\u61C6eiling;\u6308o\u01F5\u08B7\0\u08C3bleBracket;\u67E6n\u01D4\u08C8\0\u08D2eeVector;\u6961ector\u0100;B\u08DB\u08DC\u61C3ar;\u6959loor;\u630Aight\u0100AV\u08EF\u08F5rrow;\u6194ector;\u694E\u0100er\u0901\u0917e\u0180;AV\u0909\u090A\u0910\u62A3rrow;\u61A4ector;\u695Aiangle\u0180;BE\u0924\u0925\u0929\u62B2ar;\u69CFqual;\u62B4p\u0180DTV\u0937\u0942\u094CownVector;\u6951eeVector;\u6960ector\u0100;B\u0956\u0957\u61BFar;\u6958ector\u0100;B\u0965\u0966\u61BCar;\u6952ight\xE1\u039Cs\u0300EFGLST\u097E\u098B\u0995\u099D\u09A2\u09ADqualGreater;\u62DAullEqual;\u6266reater;\u6276ess;\u6AA1lantEqual;\u6A7Dilde;\u6272r;\uC000\u{1D50F}\u0100;e\u09BD\u09BE\u62D8ftarrow;\u61DAidot;\u413F\u0180npw\u09D4\u0A16\u0A1Bg\u0200LRlr\u09DE\u09F7\u0A02\u0A10eft\u0100AR\u09E6\u09ECrrow;\u67F5ightArrow;\u67F7ightArrow;\u67F6eft\u0100ar\u03B3\u0A0Aight\xE1\u03BFight\xE1\u03CAf;\uC000\u{1D543}er\u0100LR\u0A22\u0A2CeftArrow;\u6199ightArrow;\u6198\u0180cht\u0A3E\u0A40\u0A42\xF2\u084C;\u61B0rok;\u4141;\u626A\u0400acefiosu\u0A5A\u0A5D\u0A60\u0A77\u0A7C\u0A85\u0A8B\u0A8Ep;\u6905y;\u441C\u0100dl\u0A65\u0A6FiumSpace;\u605Flintrf;\u6133r;\uC000\u{1D510}nusPlus;\u6213pf;\uC000\u{1D544}c\xF2\u0A76;\u439C\u0480Jacefostu\u0AA3\u0AA7\u0AAD\u0AC0\u0B14\u0B19\u0D91\u0D97\u0D9Ecy;\u440Acute;\u4143\u0180aey\u0AB4\u0AB9\u0ABEron;\u4147dil;\u4145;\u441D\u0180gsw\u0AC7\u0AF0\u0B0Eative\u0180MTV\u0AD3\u0ADF\u0AE8ediumSpace;\u600Bhi\u0100cn\u0AE6\u0AD8\xEB\u0AD9eryThi\xEE\u0AD9ted\u0100GL\u0AF8\u0B06reaterGreate\xF2\u0673essLes\xF3\u0A48Line;\u400Ar;\uC000\u{1D511}\u0200Bnpt\u0B22\u0B28\u0B37\u0B3Areak;\u6060BreakingSpace;\u40A0f;\u6115\u0680;CDEGHLNPRSTV\u0B55\u0B56\u0B6A\u0B7C\u0BA1\u0BEB\u0C04\u0C5E\u0C84\u0CA6\u0CD8\u0D61\u0D85\u6AEC\u0100ou\u0B5B\u0B64ngruent;\u6262pCap;\u626DoubleVerticalBar;\u6226\u0180lqx\u0B83\u0B8A\u0B9Bement;\u6209ual\u0100;T\u0B92\u0B93\u6260ilde;\uC000\u2242\u0338ists;\u6204reater\u0380;EFGLST\u0BB6\u0BB7\u0BBD\u0BC9\u0BD3\u0BD8\u0BE5\u626Fqual;\u6271ullEqual;\uC000\u2267\u0338reater;\uC000\u226B\u0338ess;\u6279lantEqual;\uC000\u2A7E\u0338ilde;\u6275ump\u0144\u0BF2\u0BFDownHump;\uC000\u224E\u0338qual;\uC000\u224F\u0338e\u0100fs\u0C0A\u0C27tTriangle\u0180;BE\u0C1A\u0C1B\u0C21\u62EAar;\uC000\u29CF\u0338qual;\u62ECs\u0300;EGLST\u0C35\u0C36\u0C3C\u0C44\u0C4B\u0C58\u626Equal;\u6270reater;\u6278ess;\uC000\u226A\u0338lantEqual;\uC000\u2A7D\u0338ilde;\u6274ested\u0100GL\u0C68\u0C79reaterGreater;\uC000\u2AA2\u0338essLess;\uC000\u2AA1\u0338recedes\u0180;ES\u0C92\u0C93\u0C9B\u6280qual;\uC000\u2AAF\u0338lantEqual;\u62E0\u0100ei\u0CAB\u0CB9verseElement;\u620CghtTriangle\u0180;BE\u0CCB\u0CCC\u0CD2\u62EBar;\uC000\u29D0\u0338qual;\u62ED\u0100qu\u0CDD\u0D0CuareSu\u0100bp\u0CE8\u0CF9set\u0100;E\u0CF0\u0CF3\uC000\u228F\u0338qual;\u62E2erset\u0100;E\u0D03\u0D06\uC000\u2290\u0338qual;\u62E3\u0180bcp\u0D13\u0D24\u0D4Eset\u0100;E\u0D1B\u0D1E\uC000\u2282\u20D2qual;\u6288ceeds\u0200;EST\u0D32\u0D33\u0D3B\u0D46\u6281qual;\uC000\u2AB0\u0338lantEqual;\u62E1ilde;\uC000\u227F\u0338erset\u0100;E\u0D58\u0D5B\uC000\u2283\u20D2qual;\u6289ilde\u0200;EFT\u0D6E\u0D6F\u0D75\u0D7F\u6241qual;\u6244ullEqual;\u6247ilde;\u6249erticalBar;\u6224cr;\uC000\u{1D4A9}ilde\u803B\xD1\u40D1;\u439D\u0700Eacdfgmoprstuv\u0DBD\u0DC2\u0DC9\u0DD5\u0DDB\u0DE0\u0DE7\u0DFC\u0E02\u0E20\u0E22\u0E32\u0E3F\u0E44lig;\u4152cute\u803B\xD3\u40D3\u0100iy\u0DCE\u0DD3rc\u803B\xD4\u40D4;\u441Eblac;\u4150r;\uC000\u{1D512}rave\u803B\xD2\u40D2\u0180aei\u0DEE\u0DF2\u0DF6cr;\u414Cga;\u43A9cron;\u439Fpf;\uC000\u{1D546}enCurly\u0100DQ\u0E0E\u0E1AoubleQuote;\u601Cuote;\u6018;\u6A54\u0100cl\u0E27\u0E2Cr;\uC000\u{1D4AA}ash\u803B\xD8\u40D8i\u016C\u0E37\u0E3Cde\u803B\xD5\u40D5es;\u6A37ml\u803B\xD6\u40D6er\u0100BP\u0E4B\u0E60\u0100ar\u0E50\u0E53r;\u603Eac\u0100ek\u0E5A\u0E5C;\u63DEet;\u63B4arenthesis;\u63DC\u0480acfhilors\u0E7F\u0E87\u0E8A\u0E8F\u0E92\u0E94\u0E9D\u0EB0\u0EFCrtialD;\u6202y;\u441Fr;\uC000\u{1D513}i;\u43A6;\u43A0usMinus;\u40B1\u0100ip\u0EA2\u0EADncareplan\xE5\u069Df;\u6119\u0200;eio\u0EB9\u0EBA\u0EE0\u0EE4\u6ABBcedes\u0200;EST\u0EC8\u0EC9\u0ECF\u0EDA\u627Aqual;\u6AAFlantEqual;\u627Cilde;\u627Eme;\u6033\u0100dp\u0EE9\u0EEEuct;\u620Fortion\u0100;a\u0225\u0EF9l;\u621D\u0100ci\u0F01\u0F06r;\uC000\u{1D4AB};\u43A8\u0200Ufos\u0F11\u0F16\u0F1B\u0F1FOT\u803B"\u4022r;\uC000\u{1D514}pf;\u611Acr;\uC000\u{1D4AC}\u0600BEacefhiorsu\u0F3E\u0F43\u0F47\u0F60\u0F73\u0FA7\u0FAA\u0FAD\u1096\u10A9\u10B4\u10BEarr;\u6910G\u803B\xAE\u40AE\u0180cnr\u0F4E\u0F53\u0F56ute;\u4154g;\u67EBr\u0100;t\u0F5C\u0F5D\u61A0l;\u6916\u0180aey\u0F67\u0F6C\u0F71ron;\u4158dil;\u4156;\u4420\u0100;v\u0F78\u0F79\u611Cerse\u0100EU\u0F82\u0F99\u0100lq\u0F87\u0F8Eement;\u620Builibrium;\u61CBpEquilibrium;\u696Fr\xBB\u0F79o;\u43A1ght\u0400ACDFTUVa\u0FC1\u0FEB\u0FF3\u1022\u1028\u105B\u1087\u03D8\u0100nr\u0FC6\u0FD2gleBracket;\u67E9row\u0180;BL\u0FDC\u0FDD\u0FE1\u6192ar;\u61E5eftArrow;\u61C4eiling;\u6309o\u01F5\u0FF9\0\u1005bleBracket;\u67E7n\u01D4\u100A\0\u1014eeVector;\u695Dector\u0100;B\u101D\u101E\u61C2ar;\u6955loor;\u630B\u0100er\u102D\u1043e\u0180;AV\u1035\u1036\u103C\u62A2rrow;\u61A6ector;\u695Biangle\u0180;BE\u1050\u1051\u1055\u62B3ar;\u69D0qual;\u62B5p\u0180DTV\u1063\u106E\u1078ownVector;\u694FeeVector;\u695Cector\u0100;B\u1082\u1083\u61BEar;\u6954ector\u0100;B\u1091\u1092\u61C0ar;\u6953\u0100pu\u109B\u109Ef;\u611DndImplies;\u6970ightarrow;\u61DB\u0100ch\u10B9\u10BCr;\u611B;\u61B1leDelayed;\u69F4\u0680HOacfhimoqstu\u10E4\u10F1\u10F7\u10FD\u1119\u111E\u1151\u1156\u1161\u1167\u11B5\u11BB\u11BF\u0100Cc\u10E9\u10EEHcy;\u4429y;\u4428FTcy;\u442Ccute;\u415A\u0280;aeiy\u1108\u1109\u110E\u1113\u1117\u6ABCron;\u4160dil;\u415Erc;\u415C;\u4421r;\uC000\u{1D516}ort\u0200DLRU\u112A\u1134\u113E\u1149ownArrow\xBB\u041EeftArrow\xBB\u089AightArrow\xBB\u0FDDpArrow;\u6191gma;\u43A3allCircle;\u6218pf;\uC000\u{1D54A}\u0272\u116D\0\0\u1170t;\u621Aare\u0200;ISU\u117B\u117C\u1189\u11AF\u65A1ntersection;\u6293u\u0100bp\u118F\u119Eset\u0100;E\u1197\u1198\u628Fqual;\u6291erset\u0100;E\u11A8\u11A9\u6290qual;\u6292nion;\u6294cr;\uC000\u{1D4AE}ar;\u62C6\u0200bcmp\u11C8\u11DB\u1209\u120B\u0100;s\u11CD\u11CE\u62D0et\u0100;E\u11CD\u11D5qual;\u6286\u0100ch\u11E0\u1205eeds\u0200;EST\u11ED\u11EE\u11F4\u11FF\u627Bqual;\u6AB0lantEqual;\u627Dilde;\u627FTh\xE1\u0F8C;\u6211\u0180;es\u1212\u1213\u1223\u62D1rset\u0100;E\u121C\u121D\u6283qual;\u6287et\xBB\u1213\u0580HRSacfhiors\u123E\u1244\u1249\u1255\u125E\u1271\u1276\u129F\u12C2\u12C8\u12D1ORN\u803B\xDE\u40DEADE;\u6122\u0100Hc\u124E\u1252cy;\u440By;\u4426\u0100bu\u125A\u125C;\u4009;\u43A4\u0180aey\u1265\u126A\u126Fron;\u4164dil;\u4162;\u4422r;\uC000\u{1D517}\u0100ei\u127B\u1289\u01F2\u1280\0\u1287efore;\u6234a;\u4398\u0100cn\u128E\u1298kSpace;\uC000\u205F\u200ASpace;\u6009lde\u0200;EFT\u12AB\u12AC\u12B2\u12BC\u623Cqual;\u6243ullEqual;\u6245ilde;\u6248pf;\uC000\u{1D54B}ipleDot;\u60DB\u0100ct\u12D6\u12DBr;\uC000\u{1D4AF}rok;\u4166\u0AE1\u12F7\u130E\u131A\u1326\0\u132C\u1331\0\0\0\0\0\u1338\u133D\u1377\u1385\0\u13FF\u1404\u140A\u1410\u0100cr\u12FB\u1301ute\u803B\xDA\u40DAr\u0100;o\u1307\u1308\u619Fcir;\u6949r\u01E3\u1313\0\u1316y;\u440Eve;\u416C\u0100iy\u131E\u1323rc\u803B\xDB\u40DB;\u4423blac;\u4170r;\uC000\u{1D518}rave\u803B\xD9\u40D9acr;\u416A\u0100di\u1341\u1369er\u0100BP\u1348\u135D\u0100ar\u134D\u1350r;\u405Fac\u0100ek\u1357\u1359;\u63DFet;\u63B5arenthesis;\u63DDon\u0100;P\u1370\u1371\u62C3lus;\u628E\u0100gp\u137B\u137Fon;\u4172f;\uC000\u{1D54C}\u0400ADETadps\u1395\u13AE\u13B8\u13C4\u03E8\u13D2\u13D7\u13F3rrow\u0180;BD\u1150\u13A0\u13A4ar;\u6912ownArrow;\u61C5ownArrow;\u6195quilibrium;\u696Eee\u0100;A\u13CB\u13CC\u62A5rrow;\u61A5own\xE1\u03F3er\u0100LR\u13DE\u13E8eftArrow;\u6196ightArrow;\u6197i\u0100;l\u13F9\u13FA\u43D2on;\u43A5ing;\u416Ecr;\uC000\u{1D4B0}ilde;\u4168ml\u803B\xDC\u40DC\u0480Dbcdefosv\u1427\u142C\u1430\u1433\u143E\u1485\u148A\u1490\u1496ash;\u62ABar;\u6AEBy;\u4412ash\u0100;l\u143B\u143C\u62A9;\u6AE6\u0100er\u1443\u1445;\u62C1\u0180bty\u144C\u1450\u147Aar;\u6016\u0100;i\u144F\u1455cal\u0200BLST\u1461\u1465\u146A\u1474ar;\u6223ine;\u407Ceparator;\u6758ilde;\u6240ThinSpace;\u600Ar;\uC000\u{1D519}pf;\uC000\u{1D54D}cr;\uC000\u{1D4B1}dash;\u62AA\u0280cefos\u14A7\u14AC\u14B1\u14B6\u14BCirc;\u4174dge;\u62C0r;\uC000\u{1D51A}pf;\uC000\u{1D54E}cr;\uC000\u{1D4B2}\u0200fios\u14CB\u14D0\u14D2\u14D8r;\uC000\u{1D51B};\u439Epf;\uC000\u{1D54F}cr;\uC000\u{1D4B3}\u0480AIUacfosu\u14F1\u14F5\u14F9\u14FD\u1504\u150F\u1514\u151A\u1520cy;\u442Fcy;\u4407cy;\u442Ecute\u803B\xDD\u40DD\u0100iy\u1509\u150Drc;\u4176;\u442Br;\uC000\u{1D51C}pf;\uC000\u{1D550}cr;\uC000\u{1D4B4}ml;\u4178\u0400Hacdefos\u1535\u1539\u153F\u154B\u154F\u155D\u1560\u1564cy;\u4416cute;\u4179\u0100ay\u1544\u1549ron;\u417D;\u4417ot;\u417B\u01F2\u1554\0\u155BoWidt\xE8\u0AD9a;\u4396r;\u6128pf;\u6124cr;\uC000\u{1D4B5}\u0BE1\u1583\u158A\u1590\0\u15B0\u15B6\u15BF\0\0\0\0\u15C6\u15DB\u15EB\u165F\u166D\0\u1695\u169B\u16B2\u16B9\0\u16BEcute\u803B\xE1\u40E1reve;\u4103\u0300;Ediuy\u159C\u159D\u15A1\u15A3\u15A8\u15AD\u623E;\uC000\u223E\u0333;\u623Frc\u803B\xE2\u40E2te\u80BB\xB4\u0306;\u4430lig\u803B\xE6\u40E6\u0100;r\xB2\u15BA;\uC000\u{1D51E}rave\u803B\xE0\u40E0\u0100ep\u15CA\u15D6\u0100fp\u15CF\u15D4sym;\u6135\xE8\u15D3ha;\u43B1\u0100ap\u15DFc\u0100cl\u15E4\u15E7r;\u4101g;\u6A3F\u0264\u15F0\0\0\u160A\u0280;adsv\u15FA\u15FB\u15FF\u1601\u1607\u6227nd;\u6A55;\u6A5Clope;\u6A58;\u6A5A\u0380;elmrsz\u1618\u1619\u161B\u161E\u163F\u164F\u1659\u6220;\u69A4e\xBB\u1619sd\u0100;a\u1625\u1626\u6221\u0461\u1630\u1632\u1634\u1636\u1638\u163A\u163C\u163E;\u69A8;\u69A9;\u69AA;\u69AB;\u69AC;\u69AD;\u69AE;\u69AFt\u0100;v\u1645\u1646\u621Fb\u0100;d\u164C\u164D\u62BE;\u699D\u0100pt\u1654\u1657h;\u6222\xBB\xB9arr;\u637C\u0100gp\u1663\u1667on;\u4105f;\uC000\u{1D552}\u0380;Eaeiop\u12C1\u167B\u167D\u1682\u1684\u1687\u168A;\u6A70cir;\u6A6F;\u624Ad;\u624Bs;\u4027rox\u0100;e\u12C1\u1692\xF1\u1683ing\u803B\xE5\u40E5\u0180cty\u16A1\u16A6\u16A8r;\uC000\u{1D4B6};\u402Amp\u0100;e\u12C1\u16AF\xF1\u0288ilde\u803B\xE3\u40E3ml\u803B\xE4\u40E4\u0100ci\u16C2\u16C8onin\xF4\u0272nt;\u6A11\u0800Nabcdefiklnoprsu\u16ED\u16F1\u1730\u173C\u1743\u1748\u1778\u177D\u17E0\u17E6\u1839\u1850\u170D\u193D\u1948\u1970ot;\u6AED\u0100cr\u16F6\u171Ek\u0200ceps\u1700\u1705\u170D\u1713ong;\u624Cpsilon;\u43F6rime;\u6035im\u0100;e\u171A\u171B\u623Dq;\u62CD\u0176\u1722\u1726ee;\u62BDed\u0100;g\u172C\u172D\u6305e\xBB\u172Drk\u0100;t\u135C\u1737brk;\u63B6\u0100oy\u1701\u1741;\u4431quo;\u601E\u0280cmprt\u1753\u175B\u1761\u1764\u1768aus\u0100;e\u010A\u0109ptyv;\u69B0s\xE9\u170Cno\xF5\u0113\u0180ahw\u176F\u1771\u1773;\u43B2;\u6136een;\u626Cr;\uC000\u{1D51F}g\u0380costuvw\u178D\u179D\u17B3\u17C1\u17D5\u17DB\u17DE\u0180aiu\u1794\u1796\u179A\xF0\u0760rc;\u65EFp\xBB\u1371\u0180dpt\u17A4\u17A8\u17ADot;\u6A00lus;\u6A01imes;\u6A02\u0271\u17B9\0\0\u17BEcup;\u6A06ar;\u6605riangle\u0100du\u17CD\u17D2own;\u65BDp;\u65B3plus;\u6A04e\xE5\u1444\xE5\u14ADarow;\u690D\u0180ako\u17ED\u1826\u1835\u0100cn\u17F2\u1823k\u0180lst\u17FA\u05AB\u1802ozenge;\u69EBriangle\u0200;dlr\u1812\u1813\u1818\u181D\u65B4own;\u65BEeft;\u65C2ight;\u65B8k;\u6423\u01B1\u182B\0\u1833\u01B2\u182F\0\u1831;\u6592;\u65914;\u6593ck;\u6588\u0100eo\u183E\u184D\u0100;q\u1843\u1846\uC000=\u20E5uiv;\uC000\u2261\u20E5t;\u6310\u0200ptwx\u1859\u185E\u1867\u186Cf;\uC000\u{1D553}\u0100;t\u13CB\u1863om\xBB\u13CCtie;\u62C8\u0600DHUVbdhmptuv\u1885\u1896\u18AA\u18BB\u18D7\u18DB\u18EC\u18FF\u1905\u190A\u1910\u1921\u0200LRlr\u188E\u1890\u1892\u1894;\u6557;\u6554;\u6556;\u6553\u0280;DUdu\u18A1\u18A2\u18A4\u18A6\u18A8\u6550;\u6566;\u6569;\u6564;\u6567\u0200LRlr\u18B3\u18B5\u18B7\u18B9;\u655D;\u655A;\u655C;\u6559\u0380;HLRhlr\u18CA\u18CB\u18CD\u18CF\u18D1\u18D3\u18D5\u6551;\u656C;\u6563;\u6560;\u656B;\u6562;\u655Fox;\u69C9\u0200LRlr\u18E4\u18E6\u18E8\u18EA;\u6555;\u6552;\u6510;\u650C\u0280;DUdu\u06BD\u18F7\u18F9\u18FB\u18FD;\u6565;\u6568;\u652C;\u6534inus;\u629Flus;\u629Eimes;\u62A0\u0200LRlr\u1919\u191B\u191D\u191F;\u655B;\u6558;\u6518;\u6514\u0380;HLRhlr\u1930\u1931\u1933\u1935\u1937\u1939\u193B\u6502;\u656A;\u6561;\u655E;\u653C;\u6524;\u651C\u0100ev\u0123\u1942bar\u803B\xA6\u40A6\u0200ceio\u1951\u1956\u195A\u1960r;\uC000\u{1D4B7}mi;\u604Fm\u0100;e\u171A\u171Cl\u0180;bh\u1968\u1969\u196B\u405C;\u69C5sub;\u67C8\u016C\u1974\u197El\u0100;e\u1979\u197A\u6022t\xBB\u197Ap\u0180;Ee\u012F\u1985\u1987;\u6AAE\u0100;q\u06DC\u06DB\u0CE1\u19A7\0\u19E8\u1A11\u1A15\u1A32\0\u1A37\u1A50\0\0\u1AB4\0\0\u1AC1\0\0\u1B21\u1B2E\u1B4D\u1B52\0\u1BFD\0\u1C0C\u0180cpr\u19AD\u19B2\u19DDute;\u4107\u0300;abcds\u19BF\u19C0\u19C4\u19CA\u19D5\u19D9\u6229nd;\u6A44rcup;\u6A49\u0100au\u19CF\u19D2p;\u6A4Bp;\u6A47ot;\u6A40;\uC000\u2229\uFE00\u0100eo\u19E2\u19E5t;\u6041\xEE\u0693\u0200aeiu\u19F0\u19FB\u1A01\u1A05\u01F0\u19F5\0\u19F8s;\u6A4Don;\u410Ddil\u803B\xE7\u40E7rc;\u4109ps\u0100;s\u1A0C\u1A0D\u6A4Cm;\u6A50ot;\u410B\u0180dmn\u1A1B\u1A20\u1A26il\u80BB\xB8\u01ADptyv;\u69B2t\u8100\xA2;e\u1A2D\u1A2E\u40A2r\xE4\u01B2r;\uC000\u{1D520}\u0180cei\u1A3D\u1A40\u1A4Dy;\u4447ck\u0100;m\u1A47\u1A48\u6713ark\xBB\u1A48;\u43C7r\u0380;Ecefms\u1A5F\u1A60\u1A62\u1A6B\u1AA4\u1AAA\u1AAE\u65CB;\u69C3\u0180;el\u1A69\u1A6A\u1A6D\u42C6q;\u6257e\u0261\u1A74\0\0\u1A88rrow\u0100lr\u1A7C\u1A81eft;\u61BAight;\u61BB\u0280RSacd\u1A92\u1A94\u1A96\u1A9A\u1A9F\xBB\u0F47;\u64C8st;\u629Birc;\u629Aash;\u629Dnint;\u6A10id;\u6AEFcir;\u69C2ubs\u0100;u\u1ABB\u1ABC\u6663it\xBB\u1ABC\u02EC\u1AC7\u1AD4\u1AFA\0\u1B0Aon\u0100;e\u1ACD\u1ACE\u403A\u0100;q\xC7\xC6\u026D\u1AD9\0\0\u1AE2a\u0100;t\u1ADE\u1ADF\u402C;\u4040\u0180;fl\u1AE8\u1AE9\u1AEB\u6201\xEE\u1160e\u0100mx\u1AF1\u1AF6ent\xBB\u1AE9e\xF3\u024D\u01E7\u1AFE\0\u1B07\u0100;d\u12BB\u1B02ot;\u6A6Dn\xF4\u0246\u0180fry\u1B10\u1B14\u1B17;\uC000\u{1D554}o\xE4\u0254\u8100\xA9;s\u0155\u1B1Dr;\u6117\u0100ao\u1B25\u1B29rr;\u61B5ss;\u6717\u0100cu\u1B32\u1B37r;\uC000\u{1D4B8}\u0100bp\u1B3C\u1B44\u0100;e\u1B41\u1B42\u6ACF;\u6AD1\u0100;e\u1B49\u1B4A\u6AD0;\u6AD2dot;\u62EF\u0380delprvw\u1B60\u1B6C\u1B77\u1B82\u1BAC\u1BD4\u1BF9arr\u0100lr\u1B68\u1B6A;\u6938;\u6935\u0270\u1B72\0\0\u1B75r;\u62DEc;\u62DFarr\u0100;p\u1B7F\u1B80\u61B6;\u693D\u0300;bcdos\u1B8F\u1B90\u1B96\u1BA1\u1BA5\u1BA8\u622Arcap;\u6A48\u0100au\u1B9B\u1B9Ep;\u6A46p;\u6A4Aot;\u628Dr;\u6A45;\uC000\u222A\uFE00\u0200alrv\u1BB5\u1BBF\u1BDE\u1BE3rr\u0100;m\u1BBC\u1BBD\u61B7;\u693Cy\u0180evw\u1BC7\u1BD4\u1BD8q\u0270\u1BCE\0\0\u1BD2re\xE3\u1B73u\xE3\u1B75ee;\u62CEedge;\u62CFen\u803B\xA4\u40A4earrow\u0100lr\u1BEE\u1BF3eft\xBB\u1B80ight\xBB\u1BBDe\xE4\u1BDD\u0100ci\u1C01\u1C07onin\xF4\u01F7nt;\u6231lcty;\u632D\u0980AHabcdefhijlorstuwz\u1C38\u1C3B\u1C3F\u1C5D\u1C69\u1C75\u1C8A\u1C9E\u1CAC\u1CB7\u1CFB\u1CFF\u1D0D\u1D7B\u1D91\u1DAB\u1DBB\u1DC6\u1DCDr\xF2\u0381ar;\u6965\u0200glrs\u1C48\u1C4D\u1C52\u1C54ger;\u6020eth;\u6138\xF2\u1133h\u0100;v\u1C5A\u1C5B\u6010\xBB\u090A\u016B\u1C61\u1C67arow;\u690Fa\xE3\u0315\u0100ay\u1C6E\u1C73ron;\u410F;\u4434\u0180;ao\u0332\u1C7C\u1C84\u0100gr\u02BF\u1C81r;\u61CAtseq;\u6A77\u0180glm\u1C91\u1C94\u1C98\u803B\xB0\u40B0ta;\u43B4ptyv;\u69B1\u0100ir\u1CA3\u1CA8sht;\u697F;\uC000\u{1D521}ar\u0100lr\u1CB3\u1CB5\xBB\u08DC\xBB\u101E\u0280aegsv\u1CC2\u0378\u1CD6\u1CDC\u1CE0m\u0180;os\u0326\u1CCA\u1CD4nd\u0100;s\u0326\u1CD1uit;\u6666amma;\u43DDin;\u62F2\u0180;io\u1CE7\u1CE8\u1CF8\u40F7de\u8100\xF7;o\u1CE7\u1CF0ntimes;\u62C7n\xF8\u1CF7cy;\u4452c\u026F\u1D06\0\0\u1D0Arn;\u631Eop;\u630D\u0280lptuw\u1D18\u1D1D\u1D22\u1D49\u1D55lar;\u4024f;\uC000\u{1D555}\u0280;emps\u030B\u1D2D\u1D37\u1D3D\u1D42q\u0100;d\u0352\u1D33ot;\u6251inus;\u6238lus;\u6214quare;\u62A1blebarwedg\xE5\xFAn\u0180adh\u112E\u1D5D\u1D67ownarrow\xF3\u1C83arpoon\u0100lr\u1D72\u1D76ef\xF4\u1CB4igh\xF4\u1CB6\u0162\u1D7F\u1D85karo\xF7\u0F42\u026F\u1D8A\0\0\u1D8Ern;\u631Fop;\u630C\u0180cot\u1D98\u1DA3\u1DA6\u0100ry\u1D9D\u1DA1;\uC000\u{1D4B9};\u4455l;\u69F6rok;\u4111\u0100dr\u1DB0\u1DB4ot;\u62F1i\u0100;f\u1DBA\u1816\u65BF\u0100ah\u1DC0\u1DC3r\xF2\u0429a\xF2\u0FA6angle;\u69A6\u0100ci\u1DD2\u1DD5y;\u445Fgrarr;\u67FF\u0900Dacdefglmnopqrstux\u1E01\u1E09\u1E19\u1E38\u0578\u1E3C\u1E49\u1E61\u1E7E\u1EA5\u1EAF\u1EBD\u1EE1\u1F2A\u1F37\u1F44\u1F4E\u1F5A\u0100Do\u1E06\u1D34o\xF4\u1C89\u0100cs\u1E0E\u1E14ute\u803B\xE9\u40E9ter;\u6A6E\u0200aioy\u1E22\u1E27\u1E31\u1E36ron;\u411Br\u0100;c\u1E2D\u1E2E\u6256\u803B\xEA\u40EAlon;\u6255;\u444Dot;\u4117\u0100Dr\u1E41\u1E45ot;\u6252;\uC000\u{1D522}\u0180;rs\u1E50\u1E51\u1E57\u6A9Aave\u803B\xE8\u40E8\u0100;d\u1E5C\u1E5D\u6A96ot;\u6A98\u0200;ils\u1E6A\u1E6B\u1E72\u1E74\u6A99nters;\u63E7;\u6113\u0100;d\u1E79\u1E7A\u6A95ot;\u6A97\u0180aps\u1E85\u1E89\u1E97cr;\u4113ty\u0180;sv\u1E92\u1E93\u1E95\u6205et\xBB\u1E93p\u01001;\u1E9D\u1EA4\u0133\u1EA1\u1EA3;\u6004;\u6005\u6003\u0100gs\u1EAA\u1EAC;\u414Bp;\u6002\u0100gp\u1EB4\u1EB8on;\u4119f;\uC000\u{1D556}\u0180als\u1EC4\u1ECE\u1ED2r\u0100;s\u1ECA\u1ECB\u62D5l;\u69E3us;\u6A71i\u0180;lv\u1EDA\u1EDB\u1EDF\u43B5on\xBB\u1EDB;\u43F5\u0200csuv\u1EEA\u1EF3\u1F0B\u1F23\u0100io\u1EEF\u1E31rc\xBB\u1E2E\u0269\u1EF9\0\0\u1EFB\xED\u0548ant\u0100gl\u1F02\u1F06tr\xBB\u1E5Dess\xBB\u1E7A\u0180aei\u1F12\u1F16\u1F1Als;\u403Dst;\u625Fv\u0100;D\u0235\u1F20D;\u6A78parsl;\u69E5\u0100Da\u1F2F\u1F33ot;\u6253rr;\u6971\u0180cdi\u1F3E\u1F41\u1EF8r;\u612Fo\xF4\u0352\u0100ah\u1F49\u1F4B;\u43B7\u803B\xF0\u40F0\u0100mr\u1F53\u1F57l\u803B\xEB\u40EBo;\u60AC\u0180cip\u1F61\u1F64\u1F67l;\u4021s\xF4\u056E\u0100eo\u1F6C\u1F74ctatio\xEE\u0559nential\xE5\u0579\u09E1\u1F92\0\u1F9E\0\u1FA1\u1FA7\0\0\u1FC6\u1FCC\0\u1FD3\0\u1FE6\u1FEA\u2000\0\u2008\u205Allingdotse\xF1\u1E44y;\u4444male;\u6640\u0180ilr\u1FAD\u1FB3\u1FC1lig;\u8000\uFB03\u0269\u1FB9\0\0\u1FBDg;\u8000\uFB00ig;\u8000\uFB04;\uC000\u{1D523}lig;\u8000\uFB01lig;\uC000fj\u0180alt\u1FD9\u1FDC\u1FE1t;\u666Dig;\u8000\uFB02ns;\u65B1of;\u4192\u01F0\u1FEE\0\u1FF3f;\uC000\u{1D557}\u0100ak\u05BF\u1FF7\u0100;v\u1FFC\u1FFD\u62D4;\u6AD9artint;\u6A0D\u0100ao\u200C\u2055\u0100cs\u2011\u2052\u03B1\u201A\u2030\u2038\u2045\u2048\0\u2050\u03B2\u2022\u2025\u2027\u202A\u202C\0\u202E\u803B\xBD\u40BD;\u6153\u803B\xBC\u40BC;\u6155;\u6159;\u615B\u01B3\u2034\0\u2036;\u6154;\u6156\u02B4\u203E\u2041\0\0\u2043\u803B\xBE\u40BE;\u6157;\u615C5;\u6158\u01B6\u204C\0\u204E;\u615A;\u615D8;\u615El;\u6044wn;\u6322cr;\uC000\u{1D4BB}\u0880Eabcdefgijlnorstv\u2082\u2089\u209F\u20A5\u20B0\u20B4\u20F0\u20F5\u20FA\u20FF\u2103\u2112\u2138\u0317\u213E\u2152\u219E\u0100;l\u064D\u2087;\u6A8C\u0180cmp\u2090\u2095\u209Dute;\u41F5ma\u0100;d\u209C\u1CDA\u43B3;\u6A86reve;\u411F\u0100iy\u20AA\u20AErc;\u411D;\u4433ot;\u4121\u0200;lqs\u063E\u0642\u20BD\u20C9\u0180;qs\u063E\u064C\u20C4lan\xF4\u0665\u0200;cdl\u0665\u20D2\u20D5\u20E5c;\u6AA9ot\u0100;o\u20DC\u20DD\u6A80\u0100;l\u20E2\u20E3\u6A82;\u6A84\u0100;e\u20EA\u20ED\uC000\u22DB\uFE00s;\u6A94r;\uC000\u{1D524}\u0100;g\u0673\u061Bmel;\u6137cy;\u4453\u0200;Eaj\u065A\u210C\u210E\u2110;\u6A92;\u6AA5;\u6AA4\u0200Eaes\u211B\u211D\u2129\u2134;\u6269p\u0100;p\u2123\u2124\u6A8Arox\xBB\u2124\u0100;q\u212E\u212F\u6A88\u0100;q\u212E\u211Bim;\u62E7pf;\uC000\u{1D558}\u0100ci\u2143\u2146r;\u610Am\u0180;el\u066B\u214E\u2150;\u6A8E;\u6A90\u8300>;cdlqr\u05EE\u2160\u216A\u216E\u2173\u2179\u0100ci\u2165\u2167;\u6AA7r;\u6A7Aot;\u62D7Par;\u6995uest;\u6A7C\u0280adels\u2184\u216A\u2190\u0656\u219B\u01F0\u2189\0\u218Epro\xF8\u209Er;\u6978q\u0100lq\u063F\u2196les\xF3\u2088i\xED\u066B\u0100en\u21A3\u21ADrtneqq;\uC000\u2269\uFE00\xC5\u21AA\u0500Aabcefkosy\u21C4\u21C7\u21F1\u21F5\u21FA\u2218\u221D\u222F\u2268\u227Dr\xF2\u03A0\u0200ilmr\u21D0\u21D4\u21D7\u21DBrs\xF0\u1484f\xBB\u2024il\xF4\u06A9\u0100dr\u21E0\u21E4cy;\u444A\u0180;cw\u08F4\u21EB\u21EFir;\u6948;\u61ADar;\u610Firc;\u4125\u0180alr\u2201\u220E\u2213rts\u0100;u\u2209\u220A\u6665it\xBB\u220Alip;\u6026con;\u62B9r;\uC000\u{1D525}s\u0100ew\u2223\u2229arow;\u6925arow;\u6926\u0280amopr\u223A\u223E\u2243\u225E\u2263rr;\u61FFtht;\u623Bk\u0100lr\u2249\u2253eftarrow;\u61A9ightarrow;\u61AAf;\uC000\u{1D559}bar;\u6015\u0180clt\u226F\u2274\u2278r;\uC000\u{1D4BD}as\xE8\u21F4rok;\u4127\u0100bp\u2282\u2287ull;\u6043hen\xBB\u1C5B\u0AE1\u22A3\0\u22AA\0\u22B8\u22C5\u22CE\0\u22D5\u22F3\0\0\u22F8\u2322\u2367\u2362\u237F\0\u2386\u23AA\u23B4cute\u803B\xED\u40ED\u0180;iy\u0771\u22B0\u22B5rc\u803B\xEE\u40EE;\u4438\u0100cx\u22BC\u22BFy;\u4435cl\u803B\xA1\u40A1\u0100fr\u039F\u22C9;\uC000\u{1D526}rave\u803B\xEC\u40EC\u0200;ino\u073E\u22DD\u22E9\u22EE\u0100in\u22E2\u22E6nt;\u6A0Ct;\u622Dfin;\u69DCta;\u6129lig;\u4133\u0180aop\u22FE\u231A\u231D\u0180cgt\u2305\u2308\u2317r;\u412B\u0180elp\u071F\u230F\u2313in\xE5\u078Ear\xF4\u0720h;\u4131f;\u62B7ed;\u41B5\u0280;cfot\u04F4\u232C\u2331\u233D\u2341are;\u6105in\u0100;t\u2338\u2339\u621Eie;\u69DDdo\xF4\u2319\u0280;celp\u0757\u234C\u2350\u235B\u2361al;\u62BA\u0100gr\u2355\u2359er\xF3\u1563\xE3\u234Darhk;\u6A17rod;\u6A3C\u0200cgpt\u236F\u2372\u2376\u237By;\u4451on;\u412Ff;\uC000\u{1D55A}a;\u43B9uest\u803B\xBF\u40BF\u0100ci\u238A\u238Fr;\uC000\u{1D4BE}n\u0280;Edsv\u04F4\u239B\u239D\u23A1\u04F3;\u62F9ot;\u62F5\u0100;v\u23A6\u23A7\u62F4;\u62F3\u0100;i\u0777\u23AElde;\u4129\u01EB\u23B8\0\u23BCcy;\u4456l\u803B\xEF\u40EF\u0300cfmosu\u23CC\u23D7\u23DC\u23E1\u23E7\u23F5\u0100iy\u23D1\u23D5rc;\u4135;\u4439r;\uC000\u{1D527}ath;\u4237pf;\uC000\u{1D55B}\u01E3\u23EC\0\u23F1r;\uC000\u{1D4BF}rcy;\u4458kcy;\u4454\u0400acfghjos\u240B\u2416\u2422\u2427\u242D\u2431\u2435\u243Bppa\u0100;v\u2413\u2414\u43BA;\u43F0\u0100ey\u241B\u2420dil;\u4137;\u443Ar;\uC000\u{1D528}reen;\u4138cy;\u4445cy;\u445Cpf;\uC000\u{1D55C}cr;\uC000\u{1D4C0}\u0B80ABEHabcdefghjlmnoprstuv\u2470\u2481\u2486\u248D\u2491\u250E\u253D\u255A\u2580\u264E\u265E\u2665\u2679\u267D\u269A\u26B2\u26D8\u275D\u2768\u278B\u27C0\u2801\u2812\u0180art\u2477\u247A\u247Cr\xF2\u09C6\xF2\u0395ail;\u691Barr;\u690E\u0100;g\u0994\u248B;\u6A8Bar;\u6962\u0963\u24A5\0\u24AA\0\u24B1\0\0\0\0\0\u24B5\u24BA\0\u24C6\u24C8\u24CD\0\u24F9ute;\u413Amptyv;\u69B4ra\xEE\u084Cbda;\u43BBg\u0180;dl\u088E\u24C1\u24C3;\u6991\xE5\u088E;\u6A85uo\u803B\xAB\u40ABr\u0400;bfhlpst\u0899\u24DE\u24E6\u24E9\u24EB\u24EE\u24F1\u24F5\u0100;f\u089D\u24E3s;\u691Fs;\u691D\xEB\u2252p;\u61ABl;\u6939im;\u6973l;\u61A2\u0180;ae\u24FF\u2500\u2504\u6AABil;\u6919\u0100;s\u2509\u250A\u6AAD;\uC000\u2AAD\uFE00\u0180abr\u2515\u2519\u251Drr;\u690Crk;\u6772\u0100ak\u2522\u252Cc\u0100ek\u2528\u252A;\u407B;\u405B\u0100es\u2531\u2533;\u698Bl\u0100du\u2539\u253B;\u698F;\u698D\u0200aeuy\u2546\u254B\u2556\u2558ron;\u413E\u0100di\u2550\u2554il;\u413C\xEC\u08B0\xE2\u2529;\u443B\u0200cqrs\u2563\u2566\u256D\u257Da;\u6936uo\u0100;r\u0E19\u1746\u0100du\u2572\u2577har;\u6967shar;\u694Bh;\u61B2\u0280;fgqs\u258B\u258C\u0989\u25F3\u25FF\u6264t\u0280ahlrt\u2598\u25A4\u25B7\u25C2\u25E8rrow\u0100;t\u0899\u25A1a\xE9\u24F6arpoon\u0100du\u25AF\u25B4own\xBB\u045Ap\xBB\u0966eftarrows;\u61C7ight\u0180ahs\u25CD\u25D6\u25DErrow\u0100;s\u08F4\u08A7arpoon\xF3\u0F98quigarro\xF7\u21F0hreetimes;\u62CB\u0180;qs\u258B\u0993\u25FAlan\xF4\u09AC\u0280;cdgs\u09AC\u260A\u260D\u261D\u2628c;\u6AA8ot\u0100;o\u2614\u2615\u6A7F\u0100;r\u261A\u261B\u6A81;\u6A83\u0100;e\u2622\u2625\uC000\u22DA\uFE00s;\u6A93\u0280adegs\u2633\u2639\u263D\u2649\u264Bppro\xF8\u24C6ot;\u62D6q\u0100gq\u2643\u2645\xF4\u0989gt\xF2\u248C\xF4\u099Bi\xED\u09B2\u0180ilr\u2655\u08E1\u265Asht;\u697C;\uC000\u{1D529}\u0100;E\u099C\u2663;\u6A91\u0161\u2669\u2676r\u0100du\u25B2\u266E\u0100;l\u0965\u2673;\u696Alk;\u6584cy;\u4459\u0280;acht\u0A48\u2688\u268B\u2691\u2696r\xF2\u25C1orne\xF2\u1D08ard;\u696Bri;\u65FA\u0100io\u269F\u26A4dot;\u4140ust\u0100;a\u26AC\u26AD\u63B0che\xBB\u26AD\u0200Eaes\u26BB\u26BD\u26C9\u26D4;\u6268p\u0100;p\u26C3\u26C4\u6A89rox\xBB\u26C4\u0100;q\u26CE\u26CF\u6A87\u0100;q\u26CE\u26BBim;\u62E6\u0400abnoptwz\u26E9\u26F4\u26F7\u271A\u272F\u2741\u2747\u2750\u0100nr\u26EE\u26F1g;\u67ECr;\u61FDr\xEB\u08C1g\u0180lmr\u26FF\u270D\u2714eft\u0100ar\u09E6\u2707ight\xE1\u09F2apsto;\u67FCight\xE1\u09FDparrow\u0100lr\u2725\u2729ef\xF4\u24EDight;\u61AC\u0180afl\u2736\u2739\u273Dr;\u6985;\uC000\u{1D55D}us;\u6A2Dimes;\u6A34\u0161\u274B\u274Fst;\u6217\xE1\u134E\u0180;ef\u2757\u2758\u1800\u65CAnge\xBB\u2758ar\u0100;l\u2764\u2765\u4028t;\u6993\u0280achmt\u2773\u2776\u277C\u2785\u2787r\xF2\u08A8orne\xF2\u1D8Car\u0100;d\u0F98\u2783;\u696D;\u600Eri;\u62BF\u0300achiqt\u2798\u279D\u0A40\u27A2\u27AE\u27BBquo;\u6039r;\uC000\u{1D4C1}m\u0180;eg\u09B2\u27AA\u27AC;\u6A8D;\u6A8F\u0100bu\u252A\u27B3o\u0100;r\u0E1F\u27B9;\u601Arok;\u4142\u8400<;cdhilqr\u082B\u27D2\u2639\u27DC\u27E0\u27E5\u27EA\u27F0\u0100ci\u27D7\u27D9;\u6AA6r;\u6A79re\xE5\u25F2mes;\u62C9arr;\u6976uest;\u6A7B\u0100Pi\u27F5\u27F9ar;\u6996\u0180;ef\u2800\u092D\u181B\u65C3r\u0100du\u2807\u280Dshar;\u694Ahar;\u6966\u0100en\u2817\u2821rtneqq;\uC000\u2268\uFE00\xC5\u281E\u0700Dacdefhilnopsu\u2840\u2845\u2882\u288E\u2893\u28A0\u28A5\u28A8\u28DA\u28E2\u28E4\u0A83\u28F3\u2902Dot;\u623A\u0200clpr\u284E\u2852\u2863\u287Dr\u803B\xAF\u40AF\u0100et\u2857\u2859;\u6642\u0100;e\u285E\u285F\u6720se\xBB\u285F\u0100;s\u103B\u2868to\u0200;dlu\u103B\u2873\u2877\u287Bow\xEE\u048Cef\xF4\u090F\xF0\u13D1ker;\u65AE\u0100oy\u2887\u288Cmma;\u6A29;\u443Cash;\u6014asuredangle\xBB\u1626r;\uC000\u{1D52A}o;\u6127\u0180cdn\u28AF\u28B4\u28C9ro\u803B\xB5\u40B5\u0200;acd\u1464\u28BD\u28C0\u28C4s\xF4\u16A7ir;\u6AF0ot\u80BB\xB7\u01B5us\u0180;bd\u28D2\u1903\u28D3\u6212\u0100;u\u1D3C\u28D8;\u6A2A\u0163\u28DE\u28E1p;\u6ADB\xF2\u2212\xF0\u0A81\u0100dp\u28E9\u28EEels;\u62A7f;\uC000\u{1D55E}\u0100ct\u28F8\u28FDr;\uC000\u{1D4C2}pos\xBB\u159D\u0180;lm\u2909\u290A\u290D\u43BCtimap;\u62B8\u0C00GLRVabcdefghijlmoprstuvw\u2942\u2953\u297E\u2989\u2998\u29DA\u29E9\u2A15\u2A1A\u2A58\u2A5D\u2A83\u2A95\u2AA4\u2AA8\u2B04\u2B07\u2B44\u2B7F\u2BAE\u2C34\u2C67\u2C7C\u2CE9\u0100gt\u2947\u294B;\uC000\u22D9\u0338\u0100;v\u2950\u0BCF\uC000\u226B\u20D2\u0180elt\u295A\u2972\u2976ft\u0100ar\u2961\u2967rrow;\u61CDightarrow;\u61CE;\uC000\u22D8\u0338\u0100;v\u297B\u0C47\uC000\u226A\u20D2ightarrow;\u61CF\u0100Dd\u298E\u2993ash;\u62AFash;\u62AE\u0280bcnpt\u29A3\u29A7\u29AC\u29B1\u29CCla\xBB\u02DEute;\u4144g;\uC000\u2220\u20D2\u0280;Eiop\u0D84\u29BC\u29C0\u29C5\u29C8;\uC000\u2A70\u0338d;\uC000\u224B\u0338s;\u4149ro\xF8\u0D84ur\u0100;a\u29D3\u29D4\u666El\u0100;s\u29D3\u0B38\u01F3\u29DF\0\u29E3p\u80BB\xA0\u0B37mp\u0100;e\u0BF9\u0C00\u0280aeouy\u29F4\u29FE\u2A03\u2A10\u2A13\u01F0\u29F9\0\u29FB;\u6A43on;\u4148dil;\u4146ng\u0100;d\u0D7E\u2A0Aot;\uC000\u2A6D\u0338p;\u6A42;\u443Dash;\u6013\u0380;Aadqsx\u0B92\u2A29\u2A2D\u2A3B\u2A41\u2A45\u2A50rr;\u61D7r\u0100hr\u2A33\u2A36k;\u6924\u0100;o\u13F2\u13F0ot;\uC000\u2250\u0338ui\xF6\u0B63\u0100ei\u2A4A\u2A4Ear;\u6928\xED\u0B98ist\u0100;s\u0BA0\u0B9Fr;\uC000\u{1D52B}\u0200Eest\u0BC5\u2A66\u2A79\u2A7C\u0180;qs\u0BBC\u2A6D\u0BE1\u0180;qs\u0BBC\u0BC5\u2A74lan\xF4\u0BE2i\xED\u0BEA\u0100;r\u0BB6\u2A81\xBB\u0BB7\u0180Aap\u2A8A\u2A8D\u2A91r\xF2\u2971rr;\u61AEar;\u6AF2\u0180;sv\u0F8D\u2A9C\u0F8C\u0100;d\u2AA1\u2AA2\u62FC;\u62FAcy;\u445A\u0380AEadest\u2AB7\u2ABA\u2ABE\u2AC2\u2AC5\u2AF6\u2AF9r\xF2\u2966;\uC000\u2266\u0338rr;\u619Ar;\u6025\u0200;fqs\u0C3B\u2ACE\u2AE3\u2AEFt\u0100ar\u2AD4\u2AD9rro\xF7\u2AC1ightarro\xF7\u2A90\u0180;qs\u0C3B\u2ABA\u2AEAlan\xF4\u0C55\u0100;s\u0C55\u2AF4\xBB\u0C36i\xED\u0C5D\u0100;r\u0C35\u2AFEi\u0100;e\u0C1A\u0C25i\xE4\u0D90\u0100pt\u2B0C\u2B11f;\uC000\u{1D55F}\u8180\xAC;in\u2B19\u2B1A\u2B36\u40ACn\u0200;Edv\u0B89\u2B24\u2B28\u2B2E;\uC000\u22F9\u0338ot;\uC000\u22F5\u0338\u01E1\u0B89\u2B33\u2B35;\u62F7;\u62F6i\u0100;v\u0CB8\u2B3C\u01E1\u0CB8\u2B41\u2B43;\u62FE;\u62FD\u0180aor\u2B4B\u2B63\u2B69r\u0200;ast\u0B7B\u2B55\u2B5A\u2B5Flle\xEC\u0B7Bl;\uC000\u2AFD\u20E5;\uC000\u2202\u0338lint;\u6A14\u0180;ce\u0C92\u2B70\u2B73u\xE5\u0CA5\u0100;c\u0C98\u2B78\u0100;e\u0C92\u2B7D\xF1\u0C98\u0200Aait\u2B88\u2B8B\u2B9D\u2BA7r\xF2\u2988rr\u0180;cw\u2B94\u2B95\u2B99\u619B;\uC000\u2933\u0338;\uC000\u219D\u0338ghtarrow\xBB\u2B95ri\u0100;e\u0CCB\u0CD6\u0380chimpqu\u2BBD\u2BCD\u2BD9\u2B04\u0B78\u2BE4\u2BEF\u0200;cer\u0D32\u2BC6\u0D37\u2BC9u\xE5\u0D45;\uC000\u{1D4C3}ort\u026D\u2B05\0\0\u2BD6ar\xE1\u2B56m\u0100;e\u0D6E\u2BDF\u0100;q\u0D74\u0D73su\u0100bp\u2BEB\u2BED\xE5\u0CF8\xE5\u0D0B\u0180bcp\u2BF6\u2C11\u2C19\u0200;Ees\u2BFF\u2C00\u0D22\u2C04\u6284;\uC000\u2AC5\u0338et\u0100;e\u0D1B\u2C0Bq\u0100;q\u0D23\u2C00c\u0100;e\u0D32\u2C17\xF1\u0D38\u0200;Ees\u2C22\u2C23\u0D5F\u2C27\u6285;\uC000\u2AC6\u0338et\u0100;e\u0D58\u2C2Eq\u0100;q\u0D60\u2C23\u0200gilr\u2C3D\u2C3F\u2C45\u2C47\xEC\u0BD7lde\u803B\xF1\u40F1\xE7\u0C43iangle\u0100lr\u2C52\u2C5Ceft\u0100;e\u0C1A\u2C5A\xF1\u0C26ight\u0100;e\u0CCB\u2C65\xF1\u0CD7\u0100;m\u2C6C\u2C6D\u43BD\u0180;es\u2C74\u2C75\u2C79\u4023ro;\u6116p;\u6007\u0480DHadgilrs\u2C8F\u2C94\u2C99\u2C9E\u2CA3\u2CB0\u2CB6\u2CD3\u2CE3ash;\u62ADarr;\u6904p;\uC000\u224D\u20D2ash;\u62AC\u0100et\u2CA8\u2CAC;\uC000\u2265\u20D2;\uC000>\u20D2nfin;\u69DE\u0180Aet\u2CBD\u2CC1\u2CC5rr;\u6902;\uC000\u2264\u20D2\u0100;r\u2CCA\u2CCD\uC000<\u20D2ie;\uC000\u22B4\u20D2\u0100At\u2CD8\u2CDCrr;\u6903rie;\uC000\u22B5\u20D2im;\uC000\u223C\u20D2\u0180Aan\u2CF0\u2CF4\u2D02rr;\u61D6r\u0100hr\u2CFA\u2CFDk;\u6923\u0100;o\u13E7\u13E5ear;\u6927\u1253\u1A95\0\0\0\0\0\0\0\0\0\0\0\0\0\u2D2D\0\u2D38\u2D48\u2D60\u2D65\u2D72\u2D84\u1B07\0\0\u2D8D\u2DAB\0\u2DC8\u2DCE\0\u2DDC\u2E19\u2E2B\u2E3E\u2E43\u0100cs\u2D31\u1A97ute\u803B\xF3\u40F3\u0100iy\u2D3C\u2D45r\u0100;c\u1A9E\u2D42\u803B\xF4\u40F4;\u443E\u0280abios\u1AA0\u2D52\u2D57\u01C8\u2D5Alac;\u4151v;\u6A38old;\u69BClig;\u4153\u0100cr\u2D69\u2D6Dir;\u69BF;\uC000\u{1D52C}\u036F\u2D79\0\0\u2D7C\0\u2D82n;\u42DBave\u803B\xF2\u40F2;\u69C1\u0100bm\u2D88\u0DF4ar;\u69B5\u0200acit\u2D95\u2D98\u2DA5\u2DA8r\xF2\u1A80\u0100ir\u2D9D\u2DA0r;\u69BEoss;\u69BBn\xE5\u0E52;\u69C0\u0180aei\u2DB1\u2DB5\u2DB9cr;\u414Dga;\u43C9\u0180cdn\u2DC0\u2DC5\u01CDron;\u43BF;\u69B6pf;\uC000\u{1D560}\u0180ael\u2DD4\u2DD7\u01D2r;\u69B7rp;\u69B9\u0380;adiosv\u2DEA\u2DEB\u2DEE\u2E08\u2E0D\u2E10\u2E16\u6228r\xF2\u1A86\u0200;efm\u2DF7\u2DF8\u2E02\u2E05\u6A5Dr\u0100;o\u2DFE\u2DFF\u6134f\xBB\u2DFF\u803B\xAA\u40AA\u803B\xBA\u40BAgof;\u62B6r;\u6A56lope;\u6A57;\u6A5B\u0180clo\u2E1F\u2E21\u2E27\xF2\u2E01ash\u803B\xF8\u40F8l;\u6298i\u016C\u2E2F\u2E34de\u803B\xF5\u40F5es\u0100;a\u01DB\u2E3As;\u6A36ml\u803B\xF6\u40F6bar;\u633D\u0AE1\u2E5E\0\u2E7D\0\u2E80\u2E9D\0\u2EA2\u2EB9\0\0\u2ECB\u0E9C\0\u2F13\0\0\u2F2B\u2FBC\0\u2FC8r\u0200;ast\u0403\u2E67\u2E72\u0E85\u8100\xB6;l\u2E6D\u2E6E\u40B6le\xEC\u0403\u0269\u2E78\0\0\u2E7Bm;\u6AF3;\u6AFDy;\u443Fr\u0280cimpt\u2E8B\u2E8F\u2E93\u1865\u2E97nt;\u4025od;\u402Eil;\u6030enk;\u6031r;\uC000\u{1D52D}\u0180imo\u2EA8\u2EB0\u2EB4\u0100;v\u2EAD\u2EAE\u43C6;\u43D5ma\xF4\u0A76ne;\u660E\u0180;tv\u2EBF\u2EC0\u2EC8\u43C0chfork\xBB\u1FFD;\u43D6\u0100au\u2ECF\u2EDFn\u0100ck\u2ED5\u2EDDk\u0100;h\u21F4\u2EDB;\u610E\xF6\u21F4s\u0480;abcdemst\u2EF3\u2EF4\u1908\u2EF9\u2EFD\u2F04\u2F06\u2F0A\u2F0E\u402Bcir;\u6A23ir;\u6A22\u0100ou\u1D40\u2F02;\u6A25;\u6A72n\u80BB\xB1\u0E9Dim;\u6A26wo;\u6A27\u0180ipu\u2F19\u2F20\u2F25ntint;\u6A15f;\uC000\u{1D561}nd\u803B\xA3\u40A3\u0500;Eaceinosu\u0EC8\u2F3F\u2F41\u2F44\u2F47\u2F81\u2F89\u2F92\u2F7E\u2FB6;\u6AB3p;\u6AB7u\xE5\u0ED9\u0100;c\u0ECE\u2F4C\u0300;acens\u0EC8\u2F59\u2F5F\u2F66\u2F68\u2F7Eppro\xF8\u2F43urlye\xF1\u0ED9\xF1\u0ECE\u0180aes\u2F6F\u2F76\u2F7Approx;\u6AB9qq;\u6AB5im;\u62E8i\xED\u0EDFme\u0100;s\u2F88\u0EAE\u6032\u0180Eas\u2F78\u2F90\u2F7A\xF0\u2F75\u0180dfp\u0EEC\u2F99\u2FAF\u0180als\u2FA0\u2FA5\u2FAAlar;\u632Eine;\u6312urf;\u6313\u0100;t\u0EFB\u2FB4\xEF\u0EFBrel;\u62B0\u0100ci\u2FC0\u2FC5r;\uC000\u{1D4C5};\u43C8ncsp;\u6008\u0300fiopsu\u2FDA\u22E2\u2FDF\u2FE5\u2FEB\u2FF1r;\uC000\u{1D52E}pf;\uC000\u{1D562}rime;\u6057cr;\uC000\u{1D4C6}\u0180aeo\u2FF8\u3009\u3013t\u0100ei\u2FFE\u3005rnion\xF3\u06B0nt;\u6A16st\u0100;e\u3010\u3011\u403F\xF1\u1F19\xF4\u0F14\u0A80ABHabcdefhilmnoprstux\u3040\u3051\u3055\u3059\u30E0\u310E\u312B\u3147\u3162\u3172\u318E\u3206\u3215\u3224\u3229\u3258\u326E\u3272\u3290\u32B0\u32B7\u0180art\u3047\u304A\u304Cr\xF2\u10B3\xF2\u03DDail;\u691Car\xF2\u1C65ar;\u6964\u0380cdenqrt\u3068\u3075\u3078\u307F\u308F\u3094\u30CC\u0100eu\u306D\u3071;\uC000\u223D\u0331te;\u4155i\xE3\u116Emptyv;\u69B3g\u0200;del\u0FD1\u3089\u308B\u308D;\u6992;\u69A5\xE5\u0FD1uo\u803B\xBB\u40BBr\u0580;abcfhlpstw\u0FDC\u30AC\u30AF\u30B7\u30B9\u30BC\u30BE\u30C0\u30C3\u30C7\u30CAp;\u6975\u0100;f\u0FE0\u30B4s;\u6920;\u6933s;\u691E\xEB\u225D\xF0\u272El;\u6945im;\u6974l;\u61A3;\u619D\u0100ai\u30D1\u30D5il;\u691Ao\u0100;n\u30DB\u30DC\u6236al\xF3\u0F1E\u0180abr\u30E7\u30EA\u30EEr\xF2\u17E5rk;\u6773\u0100ak\u30F3\u30FDc\u0100ek\u30F9\u30FB;\u407D;\u405D\u0100es\u3102\u3104;\u698Cl\u0100du\u310A\u310C;\u698E;\u6990\u0200aeuy\u3117\u311C\u3127\u3129ron;\u4159\u0100di\u3121\u3125il;\u4157\xEC\u0FF2\xE2\u30FA;\u4440\u0200clqs\u3134\u3137\u313D\u3144a;\u6937dhar;\u6969uo\u0100;r\u020E\u020Dh;\u61B3\u0180acg\u314E\u315F\u0F44l\u0200;ips\u0F78\u3158\u315B\u109Cn\xE5\u10BBar\xF4\u0FA9t;\u65AD\u0180ilr\u3169\u1023\u316Esht;\u697D;\uC000\u{1D52F}\u0100ao\u3177\u3186r\u0100du\u317D\u317F\xBB\u047B\u0100;l\u1091\u3184;\u696C\u0100;v\u318B\u318C\u43C1;\u43F1\u0180gns\u3195\u31F9\u31FCht\u0300ahlrst\u31A4\u31B0\u31C2\u31D8\u31E4\u31EErrow\u0100;t\u0FDC\u31ADa\xE9\u30C8arpoon\u0100du\u31BB\u31BFow\xEE\u317Ep\xBB\u1092eft\u0100ah\u31CA\u31D0rrow\xF3\u0FEAarpoon\xF3\u0551ightarrows;\u61C9quigarro\xF7\u30CBhreetimes;\u62CCg;\u42DAingdotse\xF1\u1F32\u0180ahm\u320D\u3210\u3213r\xF2\u0FEAa\xF2\u0551;\u600Foust\u0100;a\u321E\u321F\u63B1che\xBB\u321Fmid;\u6AEE\u0200abpt\u3232\u323D\u3240\u3252\u0100nr\u3237\u323Ag;\u67EDr;\u61FEr\xEB\u1003\u0180afl\u3247\u324A\u324Er;\u6986;\uC000\u{1D563}us;\u6A2Eimes;\u6A35\u0100ap\u325D\u3267r\u0100;g\u3263\u3264\u4029t;\u6994olint;\u6A12ar\xF2\u31E3\u0200achq\u327B\u3280\u10BC\u3285quo;\u603Ar;\uC000\u{1D4C7}\u0100bu\u30FB\u328Ao\u0100;r\u0214\u0213\u0180hir\u3297\u329B\u32A0re\xE5\u31F8mes;\u62CAi\u0200;efl\u32AA\u1059\u1821\u32AB\u65B9tri;\u69CEluhar;\u6968;\u611E\u0D61\u32D5\u32DB\u32DF\u332C\u3338\u3371\0\u337A\u33A4\0\0\u33EC\u33F0\0\u3428\u3448\u345A\u34AD\u34B1\u34CA\u34F1\0\u3616\0\0\u3633cute;\u415Bqu\xEF\u27BA\u0500;Eaceinpsy\u11ED\u32F3\u32F5\u32FF\u3302\u330B\u330F\u331F\u3326\u3329;\u6AB4\u01F0\u32FA\0\u32FC;\u6AB8on;\u4161u\xE5\u11FE\u0100;d\u11F3\u3307il;\u415Frc;\u415D\u0180Eas\u3316\u3318\u331B;\u6AB6p;\u6ABAim;\u62E9olint;\u6A13i\xED\u1204;\u4441ot\u0180;be\u3334\u1D47\u3335\u62C5;\u6A66\u0380Aacmstx\u3346\u334A\u3357\u335B\u335E\u3363\u336Drr;\u61D8r\u0100hr\u3350\u3352\xEB\u2228\u0100;o\u0A36\u0A34t\u803B\xA7\u40A7i;\u403Bwar;\u6929m\u0100in\u3369\xF0nu\xF3\xF1t;\u6736r\u0100;o\u3376\u2055\uC000\u{1D530}\u0200acoy\u3382\u3386\u3391\u33A0rp;\u666F\u0100hy\u338B\u338Fcy;\u4449;\u4448rt\u026D\u3399\0\0\u339Ci\xE4\u1464ara\xEC\u2E6F\u803B\xAD\u40AD\u0100gm\u33A8\u33B4ma\u0180;fv\u33B1\u33B2\u33B2\u43C3;\u43C2\u0400;deglnpr\u12AB\u33C5\u33C9\u33CE\u33D6\u33DE\u33E1\u33E6ot;\u6A6A\u0100;q\u12B1\u12B0\u0100;E\u33D3\u33D4\u6A9E;\u6AA0\u0100;E\u33DB\u33DC\u6A9D;\u6A9Fe;\u6246lus;\u6A24arr;\u6972ar\xF2\u113D\u0200aeit\u33F8\u3408\u340F\u3417\u0100ls\u33FD\u3404lsetm\xE9\u336Ahp;\u6A33parsl;\u69E4\u0100dl\u1463\u3414e;\u6323\u0100;e\u341C\u341D\u6AAA\u0100;s\u3422\u3423\u6AAC;\uC000\u2AAC\uFE00\u0180flp\u342E\u3433\u3442tcy;\u444C\u0100;b\u3438\u3439\u402F\u0100;a\u343E\u343F\u69C4r;\u633Ff;\uC000\u{1D564}a\u0100dr\u344D\u0402es\u0100;u\u3454\u3455\u6660it\xBB\u3455\u0180csu\u3460\u3479\u349F\u0100au\u3465\u346Fp\u0100;s\u1188\u346B;\uC000\u2293\uFE00p\u0100;s\u11B4\u3475;\uC000\u2294\uFE00u\u0100bp\u347F\u348F\u0180;es\u1197\u119C\u3486et\u0100;e\u1197\u348D\xF1\u119D\u0180;es\u11A8\u11AD\u3496et\u0100;e\u11A8\u349D\xF1\u11AE\u0180;af\u117B\u34A6\u05B0r\u0165\u34AB\u05B1\xBB\u117Car\xF2\u1148\u0200cemt\u34B9\u34BE\u34C2\u34C5r;\uC000\u{1D4C8}tm\xEE\xF1i\xEC\u3415ar\xE6\u11BE\u0100ar\u34CE\u34D5r\u0100;f\u34D4\u17BF\u6606\u0100an\u34DA\u34EDight\u0100ep\u34E3\u34EApsilo\xEE\u1EE0h\xE9\u2EAFs\xBB\u2852\u0280bcmnp\u34FB\u355E\u1209\u358B\u358E\u0480;Edemnprs\u350E\u350F\u3511\u3515\u351E\u3523\u352C\u3531\u3536\u6282;\u6AC5ot;\u6ABD\u0100;d\u11DA\u351Aot;\u6AC3ult;\u6AC1\u0100Ee\u3528\u352A;\u6ACB;\u628Alus;\u6ABFarr;\u6979\u0180eiu\u353D\u3552\u3555t\u0180;en\u350E\u3545\u354Bq\u0100;q\u11DA\u350Feq\u0100;q\u352B\u3528m;\u6AC7\u0100bp\u355A\u355C;\u6AD5;\u6AD3c\u0300;acens\u11ED\u356C\u3572\u3579\u357B\u3326ppro\xF8\u32FAurlye\xF1\u11FE\xF1\u11F3\u0180aes\u3582\u3588\u331Bppro\xF8\u331Aq\xF1\u3317g;\u666A\u0680123;Edehlmnps\u35A9\u35AC\u35AF\u121C\u35B2\u35B4\u35C0\u35C9\u35D5\u35DA\u35DF\u35E8\u35ED\u803B\xB9\u40B9\u803B\xB2\u40B2\u803B\xB3\u40B3;\u6AC6\u0100os\u35B9\u35BCt;\u6ABEub;\u6AD8\u0100;d\u1222\u35C5ot;\u6AC4s\u0100ou\u35CF\u35D2l;\u67C9b;\u6AD7arr;\u697Bult;\u6AC2\u0100Ee\u35E4\u35E6;\u6ACC;\u628Blus;\u6AC0\u0180eiu\u35F4\u3609\u360Ct\u0180;en\u121C\u35FC\u3602q\u0100;q\u1222\u35B2eq\u0100;q\u35E7\u35E4m;\u6AC8\u0100bp\u3611\u3613;\u6AD4;\u6AD6\u0180Aan\u361C\u3620\u362Drr;\u61D9r\u0100hr\u3626\u3628\xEB\u222E\u0100;o\u0A2B\u0A29war;\u692Alig\u803B\xDF\u40DF\u0BE1\u3651\u365D\u3660\u12CE\u3673\u3679\0\u367E\u36C2\0\0\0\0\0\u36DB\u3703\0\u3709\u376C\0\0\0\u3787\u0272\u3656\0\0\u365Bget;\u6316;\u43C4r\xEB\u0E5F\u0180aey\u3666\u366B\u3670ron;\u4165dil;\u4163;\u4442lrec;\u6315r;\uC000\u{1D531}\u0200eiko\u3686\u369D\u36B5\u36BC\u01F2\u368B\0\u3691e\u01004f\u1284\u1281a\u0180;sv\u3698\u3699\u369B\u43B8ym;\u43D1\u0100cn\u36A2\u36B2k\u0100as\u36A8\u36AEppro\xF8\u12C1im\xBB\u12ACs\xF0\u129E\u0100as\u36BA\u36AE\xF0\u12C1rn\u803B\xFE\u40FE\u01EC\u031F\u36C6\u22E7es\u8180\xD7;bd\u36CF\u36D0\u36D8\u40D7\u0100;a\u190F\u36D5r;\u6A31;\u6A30\u0180eps\u36E1\u36E3\u3700\xE1\u2A4D\u0200;bcf\u0486\u36EC\u36F0\u36F4ot;\u6336ir;\u6AF1\u0100;o\u36F9\u36FC\uC000\u{1D565}rk;\u6ADA\xE1\u3362rime;\u6034\u0180aip\u370F\u3712\u3764d\xE5\u1248\u0380adempst\u3721\u374D\u3740\u3751\u3757\u375C\u375Fngle\u0280;dlqr\u3730\u3731\u3736\u3740\u3742\u65B5own\xBB\u1DBBeft\u0100;e\u2800\u373E\xF1\u092E;\u625Cight\u0100;e\u32AA\u374B\xF1\u105Aot;\u65ECinus;\u6A3Alus;\u6A39b;\u69CDime;\u6A3Bezium;\u63E2\u0180cht\u3772\u377D\u3781\u0100ry\u3777\u377B;\uC000\u{1D4C9};\u4446cy;\u445Brok;\u4167\u0100io\u378B\u378Ex\xF4\u1777head\u0100lr\u3797\u37A0eftarro\xF7\u084Fightarrow\xBB\u0F5D\u0900AHabcdfghlmoprstuw\u37D0\u37D3\u37D7\u37E4\u37F0\u37FC\u380E\u381C\u3823\u3834\u3851\u385D\u386B\u38A9\u38CC\u38D2\u38EA\u38F6r\xF2\u03EDar;\u6963\u0100cr\u37DC\u37E2ute\u803B\xFA\u40FA\xF2\u1150r\u01E3\u37EA\0\u37EDy;\u445Eve;\u416D\u0100iy\u37F5\u37FArc\u803B\xFB\u40FB;\u4443\u0180abh\u3803\u3806\u380Br\xF2\u13ADlac;\u4171a\xF2\u13C3\u0100ir\u3813\u3818sht;\u697E;\uC000\u{1D532}rave\u803B\xF9\u40F9\u0161\u3827\u3831r\u0100lr\u382C\u382E\xBB\u0957\xBB\u1083lk;\u6580\u0100ct\u3839\u384D\u026F\u383F\0\0\u384Arn\u0100;e\u3845\u3846\u631Cr\xBB\u3846op;\u630Fri;\u65F8\u0100al\u3856\u385Acr;\u416B\u80BB\xA8\u0349\u0100gp\u3862\u3866on;\u4173f;\uC000\u{1D566}\u0300adhlsu\u114B\u3878\u387D\u1372\u3891\u38A0own\xE1\u13B3arpoon\u0100lr\u3888\u388Cef\xF4\u382Digh\xF4\u382Fi\u0180;hl\u3899\u389A\u389C\u43C5\xBB\u13FAon\xBB\u389Aparrows;\u61C8\u0180cit\u38B0\u38C4\u38C8\u026F\u38B6\0\0\u38C1rn\u0100;e\u38BC\u38BD\u631Dr\xBB\u38BDop;\u630Eng;\u416Fri;\u65F9cr;\uC000\u{1D4CA}\u0180dir\u38D9\u38DD\u38E2ot;\u62F0lde;\u4169i\u0100;f\u3730\u38E8\xBB\u1813\u0100am\u38EF\u38F2r\xF2\u38A8l\u803B\xFC\u40FCangle;\u69A7\u0780ABDacdeflnoprsz\u391C\u391F\u3929\u392D\u39B5\u39B8\u39BD\u39DF\u39E4\u39E8\u39F3\u39F9\u39FD\u3A01\u3A20r\xF2\u03F7ar\u0100;v\u3926\u3927\u6AE8;\u6AE9as\xE8\u03E1\u0100nr\u3932\u3937grt;\u699C\u0380eknprst\u34E3\u3946\u394B\u3952\u395D\u3964\u3996app\xE1\u2415othin\xE7\u1E96\u0180hir\u34EB\u2EC8\u3959op\xF4\u2FB5\u0100;h\u13B7\u3962\xEF\u318D\u0100iu\u3969\u396Dgm\xE1\u33B3\u0100bp\u3972\u3984setneq\u0100;q\u397D\u3980\uC000\u228A\uFE00;\uC000\u2ACB\uFE00setneq\u0100;q\u398F\u3992\uC000\u228B\uFE00;\uC000\u2ACC\uFE00\u0100hr\u399B\u399Fet\xE1\u369Ciangle\u0100lr\u39AA\u39AFeft\xBB\u0925ight\xBB\u1051y;\u4432ash\xBB\u1036\u0180elr\u39C4\u39D2\u39D7\u0180;be\u2DEA\u39CB\u39CFar;\u62BBq;\u625Alip;\u62EE\u0100bt\u39DC\u1468a\xF2\u1469r;\uC000\u{1D533}tr\xE9\u39AEsu\u0100bp\u39EF\u39F1\xBB\u0D1C\xBB\u0D59pf;\uC000\u{1D567}ro\xF0\u0EFBtr\xE9\u39B4\u0100cu\u3A06\u3A0Br;\uC000\u{1D4CB}\u0100bp\u3A10\u3A18n\u0100Ee\u3980\u3A16\xBB\u397En\u0100Ee\u3992\u3A1E\xBB\u3990igzag;\u699A\u0380cefoprs\u3A36\u3A3B\u3A56\u3A5B\u3A54\u3A61\u3A6Airc;\u4175\u0100di\u3A40\u3A51\u0100bg\u3A45\u3A49ar;\u6A5Fe\u0100;q\u15FA\u3A4F;\u6259erp;\u6118r;\uC000\u{1D534}pf;\uC000\u{1D568}\u0100;e\u1479\u3A66at\xE8\u1479cr;\uC000\u{1D4CC}\u0AE3\u178E\u3A87\0\u3A8B\0\u3A90\u3A9B\0\0\u3A9D\u3AA8\u3AAB\u3AAF\0\0\u3AC3\u3ACE\0\u3AD8\u17DC\u17DFtr\xE9\u17D1r;\uC000\u{1D535}\u0100Aa\u3A94\u3A97r\xF2\u03C3r\xF2\u09F6;\u43BE\u0100Aa\u3AA1\u3AA4r\xF2\u03B8r\xF2\u09EBa\xF0\u2713is;\u62FB\u0180dpt\u17A4\u3AB5\u3ABE\u0100fl\u3ABA\u17A9;\uC000\u{1D569}im\xE5\u17B2\u0100Aa\u3AC7\u3ACAr\xF2\u03CEr\xF2\u0A01\u0100cq\u3AD2\u17B8r;\uC000\u{1D4CD}\u0100pt\u17D6\u3ADCr\xE9\u17D4\u0400acefiosu\u3AF0\u3AFD\u3B08\u3B0C\u3B11\u3B15\u3B1B\u3B21c\u0100uy\u3AF6\u3AFBte\u803B\xFD\u40FD;\u444F\u0100iy\u3B02\u3B06rc;\u4177;\u444Bn\u803B\xA5\u40A5r;\uC000\u{1D536}cy;\u4457pf;\uC000\u{1D56A}cr;\uC000\u{1D4CE}\u0100cm\u3B26\u3B29y;\u444El\u803B\xFF\u40FF\u0500acdefhiosw\u3B42\u3B48\u3B54\u3B58\u3B64\u3B69\u3B6D\u3B74\u3B7A\u3B80cute;\u417A\u0100ay\u3B4D\u3B52ron;\u417E;\u4437ot;\u417C\u0100et\u3B5D\u3B61tr\xE6\u155Fa;\u43B6r;\uC000\u{1D537}cy;\u4436grarr;\u61DDpf;\uC000\u{1D56B}cr;\uC000\u{1D4CF}\u0100jn\u3B85\u3B87;\u600Dj;\u600C'.split("").map(e=>e.charCodeAt(0)));var Cz=new Uint16Array("\u0200aglq \x1B\u026D\0\0p;\u4026os;\u4027t;\u403Et;\u403Cuot;\u4022".split("").map(e=>e.charCodeAt(0)));var Rb,pq=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),Pb=(Rb=String.fromCodePoint)!==null&&Rb!==void 0?Rb:function(e){let t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|e&1023),t+=String.fromCharCode(e),t};function Lb(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=pq.get(e))!==null&&t!==void 0?t:e}var vt;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(vt||(vt={}));var hq=32,Wr;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Wr||(Wr={}));function Fb(e){return e>=vt.ZERO&&e<=vt.NINE}function mq(e){return e>=vt.UPPER_A&&e<=vt.UPPER_F||e>=vt.LOWER_A&&e<=vt.LOWER_F}function gq(e){return e>=vt.UPPER_A&&e<=vt.UPPER_Z||e>=vt.LOWER_A&&e<=vt.LOWER_Z||Fb(e)}function bq(e){return e===vt.EQUALS||gq(e)}var bt;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(bt||(bt={}));var An;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(An||(An={}));var df=class{constructor(t,n,i){this.decodeTree=t,this.emitCodePoint=n,this.errors=i,this.state=bt.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=An.Strict}startEntity(t){this.decodeMode=t,this.state=bt.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case bt.EntityStart:return t.charCodeAt(n)===vt.NUM?(this.state=bt.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=bt.NamedEntity,this.stateNamedEntity(t,n));case bt.NumericStart:return this.stateNumericStart(t,n);case bt.NumericDecimal:return this.stateNumericDecimal(t,n);case bt.NumericHex:return this.stateNumericHex(t,n);case bt.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|hq)===vt.LOWER_X?(this.state=bt.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=bt.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,i,r){if(n!==i){let o=i-n;this.result=this.result*Math.pow(r,o)+parseInt(t.substr(n,o),r),this.consumed+=o}}stateNumericHex(t,n){let i=n;for(;n<t.length;){let r=t.charCodeAt(n);if(Fb(r)||mq(r))n+=1;else return this.addToNumericResult(t,i,n,16),this.emitNumericEntity(r,3)}return this.addToNumericResult(t,i,n,16),-1}stateNumericDecimal(t,n){let i=n;for(;n<t.length;){let r=t.charCodeAt(n);if(Fb(r))n+=1;else return this.addToNumericResult(t,i,n,10),this.emitNumericEntity(r,2)}return this.addToNumericResult(t,i,n,10),-1}emitNumericEntity(t,n){var i;if(this.consumed<=n)return(i=this.errors)===null||i===void 0||i.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===vt.SEMI)this.consumed+=1;else if(this.decodeMode===An.Strict)return 0;return this.emitCodePoint(Lb(this.result),this.consumed),this.errors&&(t!==vt.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){let{decodeTree:i}=this,r=i[this.treeIndex],o=(r&Wr.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){let s=t.charCodeAt(n);if(this.treeIndex=vq(i,r,this.treeIndex+Math.max(1,o),s),this.treeIndex<0)return this.result===0||this.decodeMode===An.Attribute&&(o===0||bq(s))?0:this.emitNotTerminatedNamedEntity();if(r=i[this.treeIndex],o=(r&Wr.VALUE_LENGTH)>>14,o!==0){if(s===vt.SEMI)return this.emitNamedEntityData(this.treeIndex,o,this.consumed+this.excess);this.decodeMode!==An.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;let{result:n,decodeTree:i}=this,r=(i[n]&Wr.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,r,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,i){let{decodeTree:r}=this;return this.emitCodePoint(n===1?r[t]&~Wr.VALUE_LENGTH:r[t+1],i),n===3&&this.emitCodePoint(r[t+2],i),i}end(){var t;switch(this.state){case bt.NamedEntity:return this.result!==0&&(this.decodeMode!==An.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case bt.NumericDecimal:return this.emitNumericEntity(0,2);case bt.NumericHex:return this.emitNumericEntity(0,3);case bt.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case bt.EntityStart:return 0}}};function Tz(e){let t="",n=new df(e,i=>t+=Pb(i));return function(r,o){let s=0,a=0;for(;(a=r.indexOf("&",a))>=0;){t+=r.slice(s,a),n.startEntity(o);let u=n.write(r,a+1);if(u<0){s=a+n.end();break}s=a+u,a=u===0?s+1:s}let l=t+r.slice(s);return t="",l}}function vq(e,t,n,i){let r=(t&Wr.BRANCH_LENGTH)>>7,o=t&Wr.JUMP_TABLE;if(r===0)return o!==0&&i===o?n:-1;if(o){let l=i-o;return l<0||l>=r?-1:e[n+l]-1}let s=n,a=s+r-1;for(;s<=a;){let l=s+a>>>1,u=e[l];if(u<i)s=l+1;else if(u>i)a=l-1;else return e[l+r]}return-1}var Iz=Tz($z),Voe=Tz(Cz);function Vo(e,t=An.Legacy){return Iz(e,t)}function rl(e){return Iz(e,An.Strict)}function ff(e){for(let t=1;t<e.length;t++)e[t][0]+=e[t-1][0]+1;return e}var yq=new Map(ff([[9,"&Tab;"],[0,"&NewLine;"],[22,"&excl;"],[0,"&quot;"],[0,"&num;"],[0,"&dollar;"],[0,"&percnt;"],[0,"&amp;"],[0,"&apos;"],[0,"&lpar;"],[0,"&rpar;"],[0,"&ast;"],[0,"&plus;"],[0,"&comma;"],[1,"&period;"],[0,"&sol;"],[10,"&colon;"],[0,"&semi;"],[0,{v:"&lt;",n:8402,o:"&nvlt;"}],[0,{v:"&equals;",n:8421,o:"&bne;"}],[0,{v:"&gt;",n:8402,o:"&nvgt;"}],[0,"&quest;"],[0,"&commat;"],[26,"&lbrack;"],[0,"&bsol;"],[0,"&rbrack;"],[0,"&Hat;"],[0,"&lowbar;"],[0,"&DiacriticalGrave;"],[5,{n:106,o:"&fjlig;"}],[20,"&lbrace;"],[0,"&verbar;"],[0,"&rbrace;"],[34,"&nbsp;"],[0,"&iexcl;"],[0,"&cent;"],[0,"&pound;"],[0,"&curren;"],[0,"&yen;"],[0,"&brvbar;"],[0,"&sect;"],[0,"&die;"],[0,"&copy;"],[0,"&ordf;"],[0,"&laquo;"],[0,"&not;"],[0,"&shy;"],[0,"&circledR;"],[0,"&macr;"],[0,"&deg;"],[0,"&PlusMinus;"],[0,"&sup2;"],[0,"&sup3;"],[0,"&acute;"],[0,"&micro;"],[0,"&para;"],[0,"&centerdot;"],[0,"&cedil;"],[0,"&sup1;"],[0,"&ordm;"],[0,"&raquo;"],[0,"&frac14;"],[0,"&frac12;"],[0,"&frac34;"],[0,"&iquest;"],[0,"&Agrave;"],[0,"&Aacute;"],[0,"&Acirc;"],[0,"&Atilde;"],[0,"&Auml;"],[0,"&angst;"],[0,"&AElig;"],[0,"&Ccedil;"],[0,"&Egrave;"],[0,"&Eacute;"],[0,"&Ecirc;"],[0,"&Euml;"],[0,"&Igrave;"],[0,"&Iacute;"],[0,"&Icirc;"],[0,"&Iuml;"],[0,"&ETH;"],[0,"&Ntilde;"],[0,"&Ograve;"],[0,"&Oacute;"],[0,"&Ocirc;"],[0,"&Otilde;"],[0,"&Ouml;"],[0,"&times;"],[0,"&Oslash;"],[0,"&Ugrave;"],[0,"&Uacute;"],[0,"&Ucirc;"],[0,"&Uuml;"],[0,"&Yacute;"],[0,"&THORN;"],[0,"&szlig;"],[0,"&agrave;"],[0,"&aacute;"],[0,"&acirc;"],[0,"&atilde;"],[0,"&auml;"],[0,"&aring;"],[0,"&aelig;"],[0,"&ccedil;"],[0,"&egrave;"],[0,"&eacute;"],[0,"&ecirc;"],[0,"&euml;"],[0,"&igrave;"],[0,"&iacute;"],[0,"&icirc;"],[0,"&iuml;"],[0,"&eth;"],[0,"&ntilde;"],[0,"&ograve;"],[0,"&oacute;"],[0,"&ocirc;"],[0,"&otilde;"],[0,"&ouml;"],[0,"&div;"],[0,"&oslash;"],[0,"&ugrave;"],[0,"&uacute;"],[0,"&ucirc;"],[0,"&uuml;"],[0,"&yacute;"],[0,"&thorn;"],[0,"&yuml;"],[0,"&Amacr;"],[0,"&amacr;"],[0,"&Abreve;"],[0,"&abreve;"],[0,"&Aogon;"],[0,"&aogon;"],[0,"&Cacute;"],[0,"&cacute;"],[0,"&Ccirc;"],[0,"&ccirc;"],[0,"&Cdot;"],[0,"&cdot;"],[0,"&Ccaron;"],[0,"&ccaron;"],[0,"&Dcaron;"],[0,"&dcaron;"],[0,"&Dstrok;"],[0,"&dstrok;"],[0,"&Emacr;"],[0,"&emacr;"],[2,"&Edot;"],[0,"&edot;"],[0,"&Eogon;"],[0,"&eogon;"],[0,"&Ecaron;"],[0,"&ecaron;"],[0,"&Gcirc;"],[0,"&gcirc;"],[0,"&Gbreve;"],[0,"&gbreve;"],[0,"&Gdot;"],[0,"&gdot;"],[0,"&Gcedil;"],[1,"&Hcirc;"],[0,"&hcirc;"],[0,"&Hstrok;"],[0,"&hstrok;"],[0,"&Itilde;"],[0,"&itilde;"],[0,"&Imacr;"],[0,"&imacr;"],[2,"&Iogon;"],[0,"&iogon;"],[0,"&Idot;"],[0,"&imath;"],[0,"&IJlig;"],[0,"&ijlig;"],[0,"&Jcirc;"],[0,"&jcirc;"],[0,"&Kcedil;"],[0,"&kcedil;"],[0,"&kgreen;"],[0,"&Lacute;"],[0,"&lacute;"],[0,"&Lcedil;"],[0,"&lcedil;"],[0,"&Lcaron;"],[0,"&lcaron;"],[0,"&Lmidot;"],[0,"&lmidot;"],[0,"&Lstrok;"],[0,"&lstrok;"],[0,"&Nacute;"],[0,"&nacute;"],[0,"&Ncedil;"],[0,"&ncedil;"],[0,"&Ncaron;"],[0,"&ncaron;"],[0,"&napos;"],[0,"&ENG;"],[0,"&eng;"],[0,"&Omacr;"],[0,"&omacr;"],[2,"&Odblac;"],[0,"&odblac;"],[0,"&OElig;"],[0,"&oelig;"],[0,"&Racute;"],[0,"&racute;"],[0,"&Rcedil;"],[0,"&rcedil;"],[0,"&Rcaron;"],[0,"&rcaron;"],[0,"&Sacute;"],[0,"&sacute;"],[0,"&Scirc;"],[0,"&scirc;"],[0,"&Scedil;"],[0,"&scedil;"],[0,"&Scaron;"],[0,"&scaron;"],[0,"&Tcedil;"],[0,"&tcedil;"],[0,"&Tcaron;"],[0,"&tcaron;"],[0,"&Tstrok;"],[0,"&tstrok;"],[0,"&Utilde;"],[0,"&utilde;"],[0,"&Umacr;"],[0,"&umacr;"],[0,"&Ubreve;"],[0,"&ubreve;"],[0,"&Uring;"],[0,"&uring;"],[0,"&Udblac;"],[0,"&udblac;"],[0,"&Uogon;"],[0,"&uogon;"],[0,"&Wcirc;"],[0,"&wcirc;"],[0,"&Ycirc;"],[0,"&ycirc;"],[0,"&Yuml;"],[0,"&Zacute;"],[0,"&zacute;"],[0,"&Zdot;"],[0,"&zdot;"],[0,"&Zcaron;"],[0,"&zcaron;"],[19,"&fnof;"],[34,"&imped;"],[63,"&gacute;"],[65,"&jmath;"],[142,"&circ;"],[0,"&caron;"],[16,"&breve;"],[0,"&DiacriticalDot;"],[0,"&ring;"],[0,"&ogon;"],[0,"&DiacriticalTilde;"],[0,"&dblac;"],[51,"&DownBreve;"],[127,"&Alpha;"],[0,"&Beta;"],[0,"&Gamma;"],[0,"&Delta;"],[0,"&Epsilon;"],[0,"&Zeta;"],[0,"&Eta;"],[0,"&Theta;"],[0,"&Iota;"],[0,"&Kappa;"],[0,"&Lambda;"],[0,"&Mu;"],[0,"&Nu;"],[0,"&Xi;"],[0,"&Omicron;"],[0,"&Pi;"],[0,"&Rho;"],[1,"&Sigma;"],[0,"&Tau;"],[0,"&Upsilon;"],[0,"&Phi;"],[0,"&Chi;"],[0,"&Psi;"],[0,"&ohm;"],[7,"&alpha;"],[0,"&beta;"],[0,"&gamma;"],[0,"&delta;"],[0,"&epsi;"],[0,"&zeta;"],[0,"&eta;"],[0,"&theta;"],[0,"&iota;"],[0,"&kappa;"],[0,"&lambda;"],[0,"&mu;"],[0,"&nu;"],[0,"&xi;"],[0,"&omicron;"],[0,"&pi;"],[0,"&rho;"],[0,"&sigmaf;"],[0,"&sigma;"],[0,"&tau;"],[0,"&upsi;"],[0,"&phi;"],[0,"&chi;"],[0,"&psi;"],[0,"&omega;"],[7,"&thetasym;"],[0,"&Upsi;"],[2,"&phiv;"],[0,"&piv;"],[5,"&Gammad;"],[0,"&digamma;"],[18,"&kappav;"],[0,"&rhov;"],[3,"&epsiv;"],[0,"&backepsilon;"],[10,"&IOcy;"],[0,"&DJcy;"],[0,"&GJcy;"],[0,"&Jukcy;"],[0,"&DScy;"],[0,"&Iukcy;"],[0,"&YIcy;"],[0,"&Jsercy;"],[0,"&LJcy;"],[0,"&NJcy;"],[0,"&TSHcy;"],[0,"&KJcy;"],[1,"&Ubrcy;"],[0,"&DZcy;"],[0,"&Acy;"],[0,"&Bcy;"],[0,"&Vcy;"],[0,"&Gcy;"],[0,"&Dcy;"],[0,"&IEcy;"],[0,"&ZHcy;"],[0,"&Zcy;"],[0,"&Icy;"],[0,"&Jcy;"],[0,"&Kcy;"],[0,"&Lcy;"],[0,"&Mcy;"],[0,"&Ncy;"],[0,"&Ocy;"],[0,"&Pcy;"],[0,"&Rcy;"],[0,"&Scy;"],[0,"&Tcy;"],[0,"&Ucy;"],[0,"&Fcy;"],[0,"&KHcy;"],[0,"&TScy;"],[0,"&CHcy;"],[0,"&SHcy;"],[0,"&SHCHcy;"],[0,"&HARDcy;"],[0,"&Ycy;"],[0,"&SOFTcy;"],[0,"&Ecy;"],[0,"&YUcy;"],[0,"&YAcy;"],[0,"&acy;"],[0,"&bcy;"],[0,"&vcy;"],[0,"&gcy;"],[0,"&dcy;"],[0,"&iecy;"],[0,"&zhcy;"],[0,"&zcy;"],[0,"&icy;"],[0,"&jcy;"],[0,"&kcy;"],[0,"&lcy;"],[0,"&mcy;"],[0,"&ncy;"],[0,"&ocy;"],[0,"&pcy;"],[0,"&rcy;"],[0,"&scy;"],[0,"&tcy;"],[0,"&ucy;"],[0,"&fcy;"],[0,"&khcy;"],[0,"&tscy;"],[0,"&chcy;"],[0,"&shcy;"],[0,"&shchcy;"],[0,"&hardcy;"],[0,"&ycy;"],[0,"&softcy;"],[0,"&ecy;"],[0,"&yucy;"],[0,"&yacy;"],[1,"&iocy;"],[0,"&djcy;"],[0,"&gjcy;"],[0,"&jukcy;"],[0,"&dscy;"],[0,"&iukcy;"],[0,"&yicy;"],[0,"&jsercy;"],[0,"&ljcy;"],[0,"&njcy;"],[0,"&tshcy;"],[0,"&kjcy;"],[1,"&ubrcy;"],[0,"&dzcy;"],[7074,"&ensp;"],[0,"&emsp;"],[0,"&emsp13;"],[0,"&emsp14;"],[1,"&numsp;"],[0,"&puncsp;"],[0,"&ThinSpace;"],[0,"&hairsp;"],[0,"&NegativeMediumSpace;"],[0,"&zwnj;"],[0,"&zwj;"],[0,"&lrm;"],[0,"&rlm;"],[0,"&dash;"],[2,"&ndash;"],[0,"&mdash;"],[0,"&horbar;"],[0,"&Verbar;"],[1,"&lsquo;"],[0,"&CloseCurlyQuote;"],[0,"&lsquor;"],[1,"&ldquo;"],[0,"&CloseCurlyDoubleQuote;"],[0,"&bdquo;"],[1,"&dagger;"],[0,"&Dagger;"],[0,"&bull;"],[2,"&nldr;"],[0,"&hellip;"],[9,"&permil;"],[0,"&pertenk;"],[0,"&prime;"],[0,"&Prime;"],[0,"&tprime;"],[0,"&backprime;"],[3,"&lsaquo;"],[0,"&rsaquo;"],[3,"&oline;"],[2,"&caret;"],[1,"&hybull;"],[0,"&frasl;"],[10,"&bsemi;"],[7,"&qprime;"],[7,{v:"&MediumSpace;",n:8202,o:"&ThickSpace;"}],[0,"&NoBreak;"],[0,"&af;"],[0,"&InvisibleTimes;"],[0,"&ic;"],[72,"&euro;"],[46,"&tdot;"],[0,"&DotDot;"],[37,"&complexes;"],[2,"&incare;"],[4,"&gscr;"],[0,"&hamilt;"],[0,"&Hfr;"],[0,"&Hopf;"],[0,"&planckh;"],[0,"&hbar;"],[0,"&imagline;"],[0,"&Ifr;"],[0,"&lagran;"],[0,"&ell;"],[1,"&naturals;"],[0,"&numero;"],[0,"&copysr;"],[0,"&weierp;"],[0,"&Popf;"],[0,"&Qopf;"],[0,"&realine;"],[0,"&real;"],[0,"&reals;"],[0,"&rx;"],[3,"&trade;"],[1,"&integers;"],[2,"&mho;"],[0,"&zeetrf;"],[0,"&iiota;"],[2,"&bernou;"],[0,"&Cayleys;"],[1,"&escr;"],[0,"&Escr;"],[0,"&Fouriertrf;"],[1,"&Mellintrf;"],[0,"&order;"],[0,"&alefsym;"],[0,"&beth;"],[0,"&gimel;"],[0,"&daleth;"],[12,"&CapitalDifferentialD;"],[0,"&dd;"],[0,"&ee;"],[0,"&ii;"],[10,"&frac13;"],[0,"&frac23;"],[0,"&frac15;"],[0,"&frac25;"],[0,"&frac35;"],[0,"&frac45;"],[0,"&frac16;"],[0,"&frac56;"],[0,"&frac18;"],[0,"&frac38;"],[0,"&frac58;"],[0,"&frac78;"],[49,"&larr;"],[0,"&ShortUpArrow;"],[0,"&rarr;"],[0,"&darr;"],[0,"&harr;"],[0,"&updownarrow;"],[0,"&nwarr;"],[0,"&nearr;"],[0,"&LowerRightArrow;"],[0,"&LowerLeftArrow;"],[0,"&nlarr;"],[0,"&nrarr;"],[1,{v:"&rarrw;",n:824,o:"&nrarrw;"}],[0,"&Larr;"],[0,"&Uarr;"],[0,"&Rarr;"],[0,"&Darr;"],[0,"&larrtl;"],[0,"&rarrtl;"],[0,"&LeftTeeArrow;"],[0,"&mapstoup;"],[0,"&map;"],[0,"&DownTeeArrow;"],[1,"&hookleftarrow;"],[0,"&hookrightarrow;"],[0,"&larrlp;"],[0,"&looparrowright;"],[0,"&harrw;"],[0,"&nharr;"],[1,"&lsh;"],[0,"&rsh;"],[0,"&ldsh;"],[0,"&rdsh;"],[1,"&crarr;"],[0,"&cularr;"],[0,"&curarr;"],[2,"&circlearrowleft;"],[0,"&circlearrowright;"],[0,"&leftharpoonup;"],[0,"&DownLeftVector;"],[0,"&RightUpVector;"],[0,"&LeftUpVector;"],[0,"&rharu;"],[0,"&DownRightVector;"],[0,"&dharr;"],[0,"&dharl;"],[0,"&RightArrowLeftArrow;"],[0,"&udarr;"],[0,"&LeftArrowRightArrow;"],[0,"&leftleftarrows;"],[0,"&upuparrows;"],[0,"&rightrightarrows;"],[0,"&ddarr;"],[0,"&leftrightharpoons;"],[0,"&Equilibrium;"],[0,"&nlArr;"],[0,"&nhArr;"],[0,"&nrArr;"],[0,"&DoubleLeftArrow;"],[0,"&DoubleUpArrow;"],[0,"&DoubleRightArrow;"],[0,"&dArr;"],[0,"&DoubleLeftRightArrow;"],[0,"&DoubleUpDownArrow;"],[0,"&nwArr;"],[0,"&neArr;"],[0,"&seArr;"],[0,"&swArr;"],[0,"&lAarr;"],[0,"&rAarr;"],[1,"&zigrarr;"],[6,"&larrb;"],[0,"&rarrb;"],[15,"&DownArrowUpArrow;"],[7,"&loarr;"],[0,"&roarr;"],[0,"&hoarr;"],[0,"&forall;"],[0,"&comp;"],[0,{v:"&part;",n:824,o:"&npart;"}],[0,"&exist;"],[0,"&nexist;"],[0,"&empty;"],[1,"&Del;"],[0,"&Element;"],[0,"&NotElement;"],[1,"&ni;"],[0,"&notni;"],[2,"&prod;"],[0,"&coprod;"],[0,"&sum;"],[0,"&minus;"],[0,"&MinusPlus;"],[0,"&dotplus;"],[1,"&Backslash;"],[0,"&lowast;"],[0,"&compfn;"],[1,"&radic;"],[2,"&prop;"],[0,"&infin;"],[0,"&angrt;"],[0,{v:"&ang;",n:8402,o:"&nang;"}],[0,"&angmsd;"],[0,"&angsph;"],[0,"&mid;"],[0,"&nmid;"],[0,"&DoubleVerticalBar;"],[0,"&NotDoubleVerticalBar;"],[0,"&and;"],[0,"&or;"],[0,{v:"&cap;",n:65024,o:"&caps;"}],[0,{v:"&cup;",n:65024,o:"&cups;"}],[0,"&int;"],[0,"&Int;"],[0,"&iiint;"],[0,"&conint;"],[0,"&Conint;"],[0,"&Cconint;"],[0,"&cwint;"],[0,"&ClockwiseContourIntegral;"],[0,"&awconint;"],[0,"&there4;"],[0,"&becaus;"],[0,"&ratio;"],[0,"&Colon;"],[0,"&dotminus;"],[1,"&mDDot;"],[0,"&homtht;"],[0,{v:"&sim;",n:8402,o:"&nvsim;"}],[0,{v:"&backsim;",n:817,o:"&race;"}],[0,{v:"&ac;",n:819,o:"&acE;"}],[0,"&acd;"],[0,"&VerticalTilde;"],[0,"&NotTilde;"],[0,{v:"&eqsim;",n:824,o:"&nesim;"}],[0,"&sime;"],[0,"&NotTildeEqual;"],[0,"&cong;"],[0,"&simne;"],[0,"&ncong;"],[0,"&ap;"],[0,"&nap;"],[0,"&ape;"],[0,{v:"&apid;",n:824,o:"&napid;"}],[0,"&backcong;"],[0,{v:"&asympeq;",n:8402,o:"&nvap;"}],[0,{v:"&bump;",n:824,o:"&nbump;"}],[0,{v:"&bumpe;",n:824,o:"&nbumpe;"}],[0,{v:"&doteq;",n:824,o:"&nedot;"}],[0,"&doteqdot;"],[0,"&efDot;"],[0,"&erDot;"],[0,"&Assign;"],[0,"&ecolon;"],[0,"&ecir;"],[0,"&circeq;"],[1,"&wedgeq;"],[0,"&veeeq;"],[1,"&triangleq;"],[2,"&equest;"],[0,"&ne;"],[0,{v:"&Congruent;",n:8421,o:"&bnequiv;"}],[0,"&nequiv;"],[1,{v:"&le;",n:8402,o:"&nvle;"}],[0,{v:"&ge;",n:8402,o:"&nvge;"}],[0,{v:"&lE;",n:824,o:"&nlE;"}],[0,{v:"&gE;",n:824,o:"&ngE;"}],[0,{v:"&lnE;",n:65024,o:"&lvertneqq;"}],[0,{v:"&gnE;",n:65024,o:"&gvertneqq;"}],[0,{v:"&ll;",n:new Map(ff([[824,"&nLtv;"],[7577,"&nLt;"]]))}],[0,{v:"&gg;",n:new Map(ff([[824,"&nGtv;"],[7577,"&nGt;"]]))}],[0,"&between;"],[0,"&NotCupCap;"],[0,"&nless;"],[0,"&ngt;"],[0,"&nle;"],[0,"&nge;"],[0,"&lesssim;"],[0,"&GreaterTilde;"],[0,"&nlsim;"],[0,"&ngsim;"],[0,"&LessGreater;"],[0,"&gl;"],[0,"&NotLessGreater;"],[0,"&NotGreaterLess;"],[0,"&pr;"],[0,"&sc;"],[0,"&prcue;"],[0,"&sccue;"],[0,"&PrecedesTilde;"],[0,{v:"&scsim;",n:824,o:"&NotSucceedsTilde;"}],[0,"&NotPrecedes;"],[0,"&NotSucceeds;"],[0,{v:"&sub;",n:8402,o:"&NotSubset;"}],[0,{v:"&sup;",n:8402,o:"&NotSuperset;"}],[0,"&nsub;"],[0,"&nsup;"],[0,"&sube;"],[0,"&supe;"],[0,"&NotSubsetEqual;"],[0,"&NotSupersetEqual;"],[0,{v:"&subne;",n:65024,o:"&varsubsetneq;"}],[0,{v:"&supne;",n:65024,o:"&varsupsetneq;"}],[1,"&cupdot;"],[0,"&UnionPlus;"],[0,{v:"&sqsub;",n:824,o:"&NotSquareSubset;"}],[0,{v:"&sqsup;",n:824,o:"&NotSquareSuperset;"}],[0,"&sqsube;"],[0,"&sqsupe;"],[0,{v:"&sqcap;",n:65024,o:"&sqcaps;"}],[0,{v:"&sqcup;",n:65024,o:"&sqcups;"}],[0,"&CirclePlus;"],[0,"&CircleMinus;"],[0,"&CircleTimes;"],[0,"&osol;"],[0,"&CircleDot;"],[0,"&circledcirc;"],[0,"&circledast;"],[1,"&circleddash;"],[0,"&boxplus;"],[0,"&boxminus;"],[0,"&boxtimes;"],[0,"&dotsquare;"],[0,"&RightTee;"],[0,"&dashv;"],[0,"&DownTee;"],[0,"&bot;"],[1,"&models;"],[0,"&DoubleRightTee;"],[0,"&Vdash;"],[0,"&Vvdash;"],[0,"&VDash;"],[0,"&nvdash;"],[0,"&nvDash;"],[0,"&nVdash;"],[0,"&nVDash;"],[0,"&prurel;"],[1,"&LeftTriangle;"],[0,"&RightTriangle;"],[0,{v:"&LeftTriangleEqual;",n:8402,o:"&nvltrie;"}],[0,{v:"&RightTriangleEqual;",n:8402,o:"&nvrtrie;"}],[0,"&origof;"],[0,"&imof;"],[0,"&multimap;"],[0,"&hercon;"],[0,"&intcal;"],[0,"&veebar;"],[1,"&barvee;"],[0,"&angrtvb;"],[0,"&lrtri;"],[0,"&bigwedge;"],[0,"&bigvee;"],[0,"&bigcap;"],[0,"&bigcup;"],[0,"&diam;"],[0,"&sdot;"],[0,"&sstarf;"],[0,"&divideontimes;"],[0,"&bowtie;"],[0,"&ltimes;"],[0,"&rtimes;"],[0,"&leftthreetimes;"],[0,"&rightthreetimes;"],[0,"&backsimeq;"],[0,"&curlyvee;"],[0,"&curlywedge;"],[0,"&Sub;"],[0,"&Sup;"],[0,"&Cap;"],[0,"&Cup;"],[0,"&fork;"],[0,"&epar;"],[0,"&lessdot;"],[0,"&gtdot;"],[0,{v:"&Ll;",n:824,o:"&nLl;"}],[0,{v:"&Gg;",n:824,o:"&nGg;"}],[0,{v:"&leg;",n:65024,o:"&lesg;"}],[0,{v:"&gel;",n:65024,o:"&gesl;"}],[2,"&cuepr;"],[0,"&cuesc;"],[0,"&NotPrecedesSlantEqual;"],[0,"&NotSucceedsSlantEqual;"],[0,"&NotSquareSubsetEqual;"],[0,"&NotSquareSupersetEqual;"],[2,"&lnsim;"],[0,"&gnsim;"],[0,"&precnsim;"],[0,"&scnsim;"],[0,"&nltri;"],[0,"&NotRightTriangle;"],[0,"&nltrie;"],[0,"&NotRightTriangleEqual;"],[0,"&vellip;"],[0,"&ctdot;"],[0,"&utdot;"],[0,"&dtdot;"],[0,"&disin;"],[0,"&isinsv;"],[0,"&isins;"],[0,{v:"&isindot;",n:824,o:"&notindot;"}],[0,"&notinvc;"],[0,"&notinvb;"],[1,{v:"&isinE;",n:824,o:"&notinE;"}],[0,"&nisd;"],[0,"&xnis;"],[0,"&nis;"],[0,"&notnivc;"],[0,"&notnivb;"],[6,"&barwed;"],[0,"&Barwed;"],[1,"&lceil;"],[0,"&rceil;"],[0,"&LeftFloor;"],[0,"&rfloor;"],[0,"&drcrop;"],[0,"&dlcrop;"],[0,"&urcrop;"],[0,"&ulcrop;"],[0,"&bnot;"],[1,"&profline;"],[0,"&profsurf;"],[1,"&telrec;"],[0,"&target;"],[5,"&ulcorn;"],[0,"&urcorn;"],[0,"&dlcorn;"],[0,"&drcorn;"],[2,"&frown;"],[0,"&smile;"],[9,"&cylcty;"],[0,"&profalar;"],[7,"&topbot;"],[6,"&ovbar;"],[1,"&solbar;"],[60,"&angzarr;"],[51,"&lmoustache;"],[0,"&rmoustache;"],[2,"&OverBracket;"],[0,"&bbrk;"],[0,"&bbrktbrk;"],[37,"&OverParenthesis;"],[0,"&UnderParenthesis;"],[0,"&OverBrace;"],[0,"&UnderBrace;"],[2,"&trpezium;"],[4,"&elinters;"],[59,"&blank;"],[164,"&circledS;"],[55,"&boxh;"],[1,"&boxv;"],[9,"&boxdr;"],[3,"&boxdl;"],[3,"&boxur;"],[3,"&boxul;"],[3,"&boxvr;"],[7,"&boxvl;"],[7,"&boxhd;"],[7,"&boxhu;"],[7,"&boxvh;"],[19,"&boxH;"],[0,"&boxV;"],[0,"&boxdR;"],[0,"&boxDr;"],[0,"&boxDR;"],[0,"&boxdL;"],[0,"&boxDl;"],[0,"&boxDL;"],[0,"&boxuR;"],[0,"&boxUr;"],[0,"&boxUR;"],[0,"&boxuL;"],[0,"&boxUl;"],[0,"&boxUL;"],[0,"&boxvR;"],[0,"&boxVr;"],[0,"&boxVR;"],[0,"&boxvL;"],[0,"&boxVl;"],[0,"&boxVL;"],[0,"&boxHd;"],[0,"&boxhD;"],[0,"&boxHD;"],[0,"&boxHu;"],[0,"&boxhU;"],[0,"&boxHU;"],[0,"&boxvH;"],[0,"&boxVh;"],[0,"&boxVH;"],[19,"&uhblk;"],[3,"&lhblk;"],[3,"&block;"],[8,"&blk14;"],[0,"&blk12;"],[0,"&blk34;"],[13,"&square;"],[8,"&blacksquare;"],[0,"&EmptyVerySmallSquare;"],[1,"&rect;"],[0,"&marker;"],[2,"&fltns;"],[1,"&bigtriangleup;"],[0,"&blacktriangle;"],[0,"&triangle;"],[2,"&blacktriangleright;"],[0,"&rtri;"],[3,"&bigtriangledown;"],[0,"&blacktriangledown;"],[0,"&dtri;"],[2,"&blacktriangleleft;"],[0,"&ltri;"],[6,"&loz;"],[0,"&cir;"],[32,"&tridot;"],[2,"&bigcirc;"],[8,"&ultri;"],[0,"&urtri;"],[0,"&lltri;"],[0,"&EmptySmallSquare;"],[0,"&FilledSmallSquare;"],[8,"&bigstar;"],[0,"&star;"],[7,"&phone;"],[49,"&female;"],[1,"&male;"],[29,"&spades;"],[2,"&clubs;"],[1,"&hearts;"],[0,"&diamondsuit;"],[3,"&sung;"],[2,"&flat;"],[0,"&natural;"],[0,"&sharp;"],[163,"&check;"],[3,"&cross;"],[8,"&malt;"],[21,"&sext;"],[33,"&VerticalSeparator;"],[25,"&lbbrk;"],[0,"&rbbrk;"],[84,"&bsolhsub;"],[0,"&suphsol;"],[28,"&LeftDoubleBracket;"],[0,"&RightDoubleBracket;"],[0,"&lang;"],[0,"&rang;"],[0,"&Lang;"],[0,"&Rang;"],[0,"&loang;"],[0,"&roang;"],[7,"&longleftarrow;"],[0,"&longrightarrow;"],[0,"&longleftrightarrow;"],[0,"&DoubleLongLeftArrow;"],[0,"&DoubleLongRightArrow;"],[0,"&DoubleLongLeftRightArrow;"],[1,"&longmapsto;"],[2,"&dzigrarr;"],[258,"&nvlArr;"],[0,"&nvrArr;"],[0,"&nvHarr;"],[0,"&Map;"],[6,"&lbarr;"],[0,"&bkarow;"],[0,"&lBarr;"],[0,"&dbkarow;"],[0,"&drbkarow;"],[0,"&DDotrahd;"],[0,"&UpArrowBar;"],[0,"&DownArrowBar;"],[2,"&Rarrtl;"],[2,"&latail;"],[0,"&ratail;"],[0,"&lAtail;"],[0,"&rAtail;"],[0,"&larrfs;"],[0,"&rarrfs;"],[0,"&larrbfs;"],[0,"&rarrbfs;"],[2,"&nwarhk;"],[0,"&nearhk;"],[0,"&hksearow;"],[0,"&hkswarow;"],[0,"&nwnear;"],[0,"&nesear;"],[0,"&seswar;"],[0,"&swnwar;"],[8,{v:"&rarrc;",n:824,o:"&nrarrc;"}],[1,"&cudarrr;"],[0,"&ldca;"],[0,"&rdca;"],[0,"&cudarrl;"],[0,"&larrpl;"],[2,"&curarrm;"],[0,"&cularrp;"],[7,"&rarrpl;"],[2,"&harrcir;"],[0,"&Uarrocir;"],[0,"&lurdshar;"],[0,"&ldrushar;"],[2,"&LeftRightVector;"],[0,"&RightUpDownVector;"],[0,"&DownLeftRightVector;"],[0,"&LeftUpDownVector;"],[0,"&LeftVectorBar;"],[0,"&RightVectorBar;"],[0,"&RightUpVectorBar;"],[0,"&RightDownVectorBar;"],[0,"&DownLeftVectorBar;"],[0,"&DownRightVectorBar;"],[0,"&LeftUpVectorBar;"],[0,"&LeftDownVectorBar;"],[0,"&LeftTeeVector;"],[0,"&RightTeeVector;"],[0,"&RightUpTeeVector;"],[0,"&RightDownTeeVector;"],[0,"&DownLeftTeeVector;"],[0,"&DownRightTeeVector;"],[0,"&LeftUpTeeVector;"],[0,"&LeftDownTeeVector;"],[0,"&lHar;"],[0,"&uHar;"],[0,"&rHar;"],[0,"&dHar;"],[0,"&luruhar;"],[0,"&ldrdhar;"],[0,"&ruluhar;"],[0,"&rdldhar;"],[0,"&lharul;"],[0,"&llhard;"],[0,"&rharul;"],[0,"&lrhard;"],[0,"&udhar;"],[0,"&duhar;"],[0,"&RoundImplies;"],[0,"&erarr;"],[0,"&simrarr;"],[0,"&larrsim;"],[0,"&rarrsim;"],[0,"&rarrap;"],[0,"&ltlarr;"],[1,"&gtrarr;"],[0,"&subrarr;"],[1,"&suplarr;"],[0,"&lfisht;"],[0,"&rfisht;"],[0,"&ufisht;"],[0,"&dfisht;"],[5,"&lopar;"],[0,"&ropar;"],[4,"&lbrke;"],[0,"&rbrke;"],[0,"&lbrkslu;"],[0,"&rbrksld;"],[0,"&lbrksld;"],[0,"&rbrkslu;"],[0,"&langd;"],[0,"&rangd;"],[0,"&lparlt;"],[0,"&rpargt;"],[0,"&gtlPar;"],[0,"&ltrPar;"],[3,"&vzigzag;"],[1,"&vangrt;"],[0,"&angrtvbd;"],[6,"&ange;"],[0,"&range;"],[0,"&dwangle;"],[0,"&uwangle;"],[0,"&angmsdaa;"],[0,"&angmsdab;"],[0,"&angmsdac;"],[0,"&angmsdad;"],[0,"&angmsdae;"],[0,"&angmsdaf;"],[0,"&angmsdag;"],[0,"&angmsdah;"],[0,"&bemptyv;"],[0,"&demptyv;"],[0,"&cemptyv;"],[0,"&raemptyv;"],[0,"&laemptyv;"],[0,"&ohbar;"],[0,"&omid;"],[0,"&opar;"],[1,"&operp;"],[1,"&olcross;"],[0,"&odsold;"],[1,"&olcir;"],[0,"&ofcir;"],[0,"&olt;"],[0,"&ogt;"],[0,"&cirscir;"],[0,"&cirE;"],[0,"&solb;"],[0,"&bsolb;"],[3,"&boxbox;"],[3,"&trisb;"],[0,"&rtriltri;"],[0,{v:"&LeftTriangleBar;",n:824,o:"&NotLeftTriangleBar;"}],[0,{v:"&RightTriangleBar;",n:824,o:"&NotRightTriangleBar;"}],[11,"&iinfin;"],[0,"&infintie;"],[0,"&nvinfin;"],[4,"&eparsl;"],[0,"&smeparsl;"],[0,"&eqvparsl;"],[5,"&blacklozenge;"],[8,"&RuleDelayed;"],[1,"&dsol;"],[9,"&bigodot;"],[0,"&bigoplus;"],[0,"&bigotimes;"],[1,"&biguplus;"],[1,"&bigsqcup;"],[5,"&iiiint;"],[0,"&fpartint;"],[2,"&cirfnint;"],[0,"&awint;"],[0,"&rppolint;"],[0,"&scpolint;"],[0,"&npolint;"],[0,"&pointint;"],[0,"&quatint;"],[0,"&intlarhk;"],[10,"&pluscir;"],[0,"&plusacir;"],[0,"&simplus;"],[0,"&plusdu;"],[0,"&plussim;"],[0,"&plustwo;"],[1,"&mcomma;"],[0,"&minusdu;"],[2,"&loplus;"],[0,"&roplus;"],[0,"&Cross;"],[0,"&timesd;"],[0,"&timesbar;"],[1,"&smashp;"],[0,"&lotimes;"],[0,"&rotimes;"],[0,"&otimesas;"],[0,"&Otimes;"],[0,"&odiv;"],[0,"&triplus;"],[0,"&triminus;"],[0,"&tritime;"],[0,"&intprod;"],[2,"&amalg;"],[0,"&capdot;"],[1,"&ncup;"],[0,"&ncap;"],[0,"&capand;"],[0,"&cupor;"],[0,"&cupcap;"],[0,"&capcup;"],[0,"&cupbrcap;"],[0,"&capbrcup;"],[0,"&cupcup;"],[0,"&capcap;"],[0,"&ccups;"],[0,"&ccaps;"],[2,"&ccupssm;"],[2,"&And;"],[0,"&Or;"],[0,"&andand;"],[0,"&oror;"],[0,"&orslope;"],[0,"&andslope;"],[1,"&andv;"],[0,"&orv;"],[0,"&andd;"],[0,"&ord;"],[1,"&wedbar;"],[6,"&sdote;"],[3,"&simdot;"],[2,{v:"&congdot;",n:824,o:"&ncongdot;"}],[0,"&easter;"],[0,"&apacir;"],[0,{v:"&apE;",n:824,o:"&napE;"}],[0,"&eplus;"],[0,"&pluse;"],[0,"&Esim;"],[0,"&Colone;"],[0,"&Equal;"],[1,"&ddotseq;"],[0,"&equivDD;"],[0,"&ltcir;"],[0,"&gtcir;"],[0,"&ltquest;"],[0,"&gtquest;"],[0,{v:"&leqslant;",n:824,o:"&nleqslant;"}],[0,{v:"&geqslant;",n:824,o:"&ngeqslant;"}],[0,"&lesdot;"],[0,"&gesdot;"],[0,"&lesdoto;"],[0,"&gesdoto;"],[0,"&lesdotor;"],[0,"&gesdotol;"],[0,"&lap;"],[0,"&gap;"],[0,"&lne;"],[0,"&gne;"],[0,"&lnap;"],[0,"&gnap;"],[0,"&lEg;"],[0,"&gEl;"],[0,"&lsime;"],[0,"&gsime;"],[0,"&lsimg;"],[0,"&gsiml;"],[0,"&lgE;"],[0,"&glE;"],[0,"&lesges;"],[0,"&gesles;"],[0,"&els;"],[0,"&egs;"],[0,"&elsdot;"],[0,"&egsdot;"],[0,"&el;"],[0,"&eg;"],[2,"&siml;"],[0,"&simg;"],[0,"&simlE;"],[0,"&simgE;"],[0,{v:"&LessLess;",n:824,o:"&NotNestedLessLess;"}],[0,{v:"&GreaterGreater;",n:824,o:"&NotNestedGreaterGreater;"}],[1,"&glj;"],[0,"&gla;"],[0,"&ltcc;"],[0,"&gtcc;"],[0,"&lescc;"],[0,"&gescc;"],[0,"&smt;"],[0,"&lat;"],[0,{v:"&smte;",n:65024,o:"&smtes;"}],[0,{v:"&late;",n:65024,o:"&lates;"}],[0,"&bumpE;"],[0,{v:"&PrecedesEqual;",n:824,o:"&NotPrecedesEqual;"}],[0,{v:"&sce;",n:824,o:"&NotSucceedsEqual;"}],[2,"&prE;"],[0,"&scE;"],[0,"&precneqq;"],[0,"&scnE;"],[0,"&prap;"],[0,"&scap;"],[0,"&precnapprox;"],[0,"&scnap;"],[0,"&Pr;"],[0,"&Sc;"],[0,"&subdot;"],[0,"&supdot;"],[0,"&subplus;"],[0,"&supplus;"],[0,"&submult;"],[0,"&supmult;"],[0,"&subedot;"],[0,"&supedot;"],[0,{v:"&subE;",n:824,o:"&nsubE;"}],[0,{v:"&supE;",n:824,o:"&nsupE;"}],[0,"&subsim;"],[0,"&supsim;"],[2,{v:"&subnE;",n:65024,o:"&varsubsetneqq;"}],[0,{v:"&supnE;",n:65024,o:"&varsupsetneqq;"}],[2,"&csub;"],[0,"&csup;"],[0,"&csube;"],[0,"&csupe;"],[0,"&subsup;"],[0,"&supsub;"],[0,"&subsub;"],[0,"&supsup;"],[0,"&suphsub;"],[0,"&supdsub;"],[0,"&forkv;"],[0,"&topfork;"],[0,"&mlcp;"],[8,"&Dashv;"],[1,"&Vdashl;"],[0,"&Barv;"],[0,"&vBar;"],[0,"&vBarv;"],[1,"&Vbar;"],[0,"&Not;"],[0,"&bNot;"],[0,"&rnmid;"],[0,"&cirmid;"],[0,"&midcir;"],[0,"&topcir;"],[0,"&nhpar;"],[0,"&parsim;"],[9,{v:"&parsl;",n:8421,o:"&nparsl;"}],[44343,{n:new Map(ff([[56476,"&Ascr;"],[1,"&Cscr;"],[0,"&Dscr;"],[2,"&Gscr;"],[2,"&Jscr;"],[0,"&Kscr;"],[2,"&Nscr;"],[0,"&Oscr;"],[0,"&Pscr;"],[0,"&Qscr;"],[1,"&Sscr;"],[0,"&Tscr;"],[0,"&Uscr;"],[0,"&Vscr;"],[0,"&Wscr;"],[0,"&Xscr;"],[0,"&Yscr;"],[0,"&Zscr;"],[0,"&ascr;"],[0,"&bscr;"],[0,"&cscr;"],[0,"&dscr;"],[1,"&fscr;"],[1,"&hscr;"],[0,"&iscr;"],[0,"&jscr;"],[0,"&kscr;"],[0,"&lscr;"],[0,"&mscr;"],[0,"&nscr;"],[1,"&pscr;"],[0,"&qscr;"],[0,"&rscr;"],[0,"&sscr;"],[0,"&tscr;"],[0,"&uscr;"],[0,"&vscr;"],[0,"&wscr;"],[0,"&xscr;"],[0,"&yscr;"],[0,"&zscr;"],[52,"&Afr;"],[0,"&Bfr;"],[1,"&Dfr;"],[0,"&Efr;"],[0,"&Ffr;"],[0,"&Gfr;"],[2,"&Jfr;"],[0,"&Kfr;"],[0,"&Lfr;"],[0,"&Mfr;"],[0,"&Nfr;"],[0,"&Ofr;"],[0,"&Pfr;"],[0,"&Qfr;"],[1,"&Sfr;"],[0,"&Tfr;"],[0,"&Ufr;"],[0,"&Vfr;"],[0,"&Wfr;"],[0,"&Xfr;"],[0,"&Yfr;"],[1,"&afr;"],[0,"&bfr;"],[0,"&cfr;"],[0,"&dfr;"],[0,"&efr;"],[0,"&ffr;"],[0,"&gfr;"],[0,"&hfr;"],[0,"&ifr;"],[0,"&jfr;"],[0,"&kfr;"],[0,"&lfr;"],[0,"&mfr;"],[0,"&nfr;"],[0,"&ofr;"],[0,"&pfr;"],[0,"&qfr;"],[0,"&rfr;"],[0,"&sfr;"],[0,"&tfr;"],[0,"&ufr;"],[0,"&vfr;"],[0,"&wfr;"],[0,"&xfr;"],[0,"&yfr;"],[0,"&zfr;"],[0,"&Aopf;"],[0,"&Bopf;"],[1,"&Dopf;"],[0,"&Eopf;"],[0,"&Fopf;"],[0,"&Gopf;"],[1,"&Iopf;"],[0,"&Jopf;"],[0,"&Kopf;"],[0,"&Lopf;"],[0,"&Mopf;"],[1,"&Oopf;"],[3,"&Sopf;"],[0,"&Topf;"],[0,"&Uopf;"],[0,"&Vopf;"],[0,"&Wopf;"],[0,"&Xopf;"],[0,"&Yopf;"],[1,"&aopf;"],[0,"&bopf;"],[0,"&copf;"],[0,"&dopf;"],[0,"&eopf;"],[0,"&fopf;"],[0,"&gopf;"],[0,"&hopf;"],[0,"&iopf;"],[0,"&jopf;"],[0,"&kopf;"],[0,"&lopf;"],[0,"&mopf;"],[0,"&nopf;"],[0,"&oopf;"],[0,"&popf;"],[0,"&qopf;"],[0,"&ropf;"],[0,"&sopf;"],[0,"&topf;"],[0,"&uopf;"],[0,"&vopf;"],[0,"&wopf;"],[0,"&xopf;"],[0,"&yopf;"],[0,"&zopf;"]]))}],[8906,"&fflig;"],[0,"&filig;"],[0,"&fllig;"],[0,"&ffilig;"],[0,"&ffllig;"]]));var kq=new Map([[34,"&quot;"],[38,"&amp;"],[39,"&apos;"],[60,"&lt;"],[62,"&gt;"]]),xq=String.prototype.codePointAt!=null?(e,t)=>e.codePointAt(t):(e,t)=>(e.charCodeAt(t)&64512)===55296?(e.charCodeAt(t)-55296)*1024+e.charCodeAt(t+1)-56320+65536:e.charCodeAt(t);function Bb(e,t){return function(i){let r,o=0,s="";for(;r=e.exec(i);)o!==r.index&&(s+=i.substring(o,r.index)),s+=t.get(r[0].charCodeAt(0)),o=r.index+1;return s+i.substring(o)}}var Az=Bb(/[&<>'"]/g,kq),Mz=Bb(/["&\u00A0]/g,new Map([[34,"&quot;"],[38,"&amp;"],[160,"&nbsp;"]])),zz=Bb(/[&<>\u00A0]/g,new Map([[38,"&amp;"],[60,"&lt;"],[62,"&gt;"],[160,"&nbsp;"]]));var Dz;(function(e){e[e.XML=0]="XML",e[e.HTML=1]="HTML"})(Dz||(Dz={}));var Nz;(function(e){e[e.UTF8=0]="UTF8",e[e.ASCII=1]="ASCII",e[e.Extensive=2]="Extensive",e[e.Attribute=3]="Attribute",e[e.Text=4]="Text"})(Nz||(Nz={}));function Sq(e){return Object.prototype.toString.call(e)}function pf(e){return Sq(e)==="[object String]"}var Eq=Object.prototype.hasOwnProperty;function $q(e,t){return Eq.call(e,t)}function Ko(e){return Array.prototype.slice.call(arguments,1).forEach(function(n){if(n){if(typeof n!="object")throw new TypeError(n+"must be object");Object.keys(n).forEach(function(i){e[i]=n[i]})}}),e}function Cq(e,t,n){return[].concat(e.slice(0,t),n,e.slice(t+1))}function hf(e){return!(e>=55296&&e<=57343||e>=64976&&e<=65007||(e&65535)===65535||(e&65535)===65534||e>=0&&e<=8||e===11||e>=14&&e<=31||e>=127&&e<=159||e>1114111)}function Jo(e){if(e>65535){e-=65536;let t=55296+(e>>10),n=56320+(e&1023);return String.fromCharCode(t,n)}return String.fromCharCode(e)}var Pz=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,Tq=/&([a-z#][a-z0-9]{1,31});/gi,Iq=new RegExp(Pz.source+"|"+Tq.source,"gi"),Aq=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function Mq(e,t){if(t.charCodeAt(0)===35&&Aq.test(t)){let i=t[1].toLowerCase()==="x"?parseInt(t.slice(2),16):parseInt(t.slice(1),10);return hf(i)?Jo(i):e}let n=Vo(e);return n!==e?n:e}function zq(e){return e.indexOf("\\")<0?e:e.replace(Pz,"$1")}function yr(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(Iq,function(t,n,i){return n||Mq(t,i)})}var Dq=/[&<>"]/,Nq=/[&<>"]/g,Oq={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"};function Rq(e){return Oq[e]}function kr(e){return Dq.test(e)?e.replace(Nq,Rq):e}var Pq=/[.?*+^$[\]\\(){}|-]/g;function Lq(e){return e.replace(Pq,"\\$&")}function be(e){switch(e){case 9:case 32:return!0}return!1}function Di(e){if(e>=8192&&e<=8202)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}function Lz(e){return Wo.test(e)||uf.test(e)}function Ni(e){return Lz(Jo(e))}function Oi(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function Ri(e){return e=e.trim().replace(/\s+/g," "),"\u1E9E".toLowerCase()==="\u1E7E"&&(e=e.replace(/ẞ/g,"\xDF")),e.toLowerCase().toUpperCase()}function Rz(e){return e===32||e===9||e===10||e===13}function Pi(e){let t=0;for(;t<e.length&&Rz(e.charCodeAt(t));t++);let n=e.length-1;for(;n>=t&&Rz(e.charCodeAt(n));n--);return e.slice(t,n+1)}var Fq={mdurl:sf,ucmicro:Ob};var Wb={};Wi(Wb,{parseLinkDestination:()=>Hb,parseLinkLabel:()=>Zb,parseLinkTitle:()=>qb});function Zb(e,t,n){let i,r,o,s,a=e.posMax,l=e.pos;for(e.pos=t+1,i=1;e.pos<a;){if(o=e.src.charCodeAt(e.pos),o===93&&(i--,i===0)){r=!0;break}if(s=e.pos,e.md.inline.skipToken(e),o===91){if(s===e.pos-1)i++;else if(n)return e.pos=l,-1}}let u=-1;return r&&(u=e.pos),e.pos=l,u}function Hb(e,t,n){let i,r=t,o={ok:!1,pos:0,str:""};if(e.charCodeAt(r)===60){for(r++;r<n;){if(i=e.charCodeAt(r),i===10||i===60)return o;if(i===62)return o.pos=r+1,o.str=yr(e.slice(t+1,r)),o.ok=!0,o;if(i===92&&r+1<n){r+=2;continue}r++}return o}let s=0;for(;r<n&&(i=e.charCodeAt(r),!(i===32||i<32||i===127));){if(i===92&&r+1<n){if(e.charCodeAt(r+1)===32){r++;continue}r+=2;continue}if(i===40&&(s++,s>32))return o;if(i===41){if(s===0)break;s--}r++}return t===r||s!==0||(o.str=yr(e.slice(t,r)),o.pos=r,o.ok=!0),o}function qb(e,t,n,i){let r,o=t,s={ok:!1,can_continue:!1,pos:0,str:"",marker:0};if(i)s.str=i.str,s.marker=i.marker;else{if(o>=n)return s;let a=e.charCodeAt(o);if(a!==34&&a!==39&&a!==40)return s;t++,o++,a===40&&(a=41),s.marker=a}for(;o<n;){if(r=e.charCodeAt(o),r===s.marker)return s.pos=o+1,s.str+=yr(e.slice(t,o)),s.ok=!0,s;if(r===40&&s.marker===41)return s;r===92&&o+1<n&&o++,o++}return s.can_continue=!0,s.str+=yr(e.slice(t,o)),s}var Wn={};Wn.code_inline=function(e,t,n,i,r){let o=e[t];return"<code"+r.renderAttrs(o)+">"+kr(o.content)+"</code>"};Wn.code_block=function(e,t,n,i,r){let o=e[t];return"<pre"+r.renderAttrs(o)+"><code>"+kr(e[t].content)+`</code></pre>
245
+ `};Wn.fence=function(e,t,n,i,r){let o=e[t],s=o.info?yr(o.info).trim():"",a="",l="";if(s){let c=s.split(/(\s+)/g);a=c[0],l=c.slice(2).join("")}let u;if(n.highlight?u=n.highlight(o.content,a,l)||kr(o.content):u=kr(o.content),u.indexOf("<pre")===0)return u+`
246
+ `;if(s){let c=o.attrIndex("class"),d=o.attrs?o.attrs.slice():[];c<0?d.push(["class",n.langPrefix+a]):(d[c]=d[c].slice(),d[c][1]+=" "+n.langPrefix+a);let f={attrs:d};return`<pre><code${r.renderAttrs(f)}>${u}</code></pre>
247
+ `}return`<pre><code${r.renderAttrs(o)}>${u}</code></pre>
248
+ `};Wn.image=function(e,t,n,i,r){let o=e[t];return o.attrs[o.attrIndex("alt")][1]=r.renderInlineAsText(o.children,n,i),r.renderToken(e,t,n)};Wn.hardbreak=function(e,t,n){return n.xhtmlOut?`<br />
249
+ `:`<br>
250
+ `};Wn.softbreak=function(e,t,n){return n.breaks?n.xhtmlOut?`<br />
251
+ `:`<br>
252
+ `:`
253
+ `};Wn.text=function(e,t){return kr(e[t].content)};Wn.html_block=function(e,t){return e[t].content};Wn.html_inline=function(e,t){return e[t].content};function Go(){this.rules=Ko({},Wn)}Go.prototype.renderAttrs=function(t){let n,i,r;if(!t.attrs)return"";for(r="",n=0,i=t.attrs.length;n<i;n++)r+=" "+kr(t.attrs[n][0])+'="'+kr(t.attrs[n][1])+'"';return r};Go.prototype.renderToken=function(t,n,i){let r=t[n],o="";if(r.hidden)return"";r.block&&r.nesting!==-1&&n&&t[n-1].hidden&&(o+=`
254
+ `),o+=(r.nesting===-1?"</":"<")+r.tag,o+=this.renderAttrs(r),r.nesting===0&&i.xhtmlOut&&(o+=" /");let s=!1;if(r.block&&(s=!0,r.nesting===1&&n+1<t.length)){let a=t[n+1];(a.type==="inline"||a.hidden||a.nesting===-1&&a.tag===r.tag)&&(s=!1)}return o+=s?`>
255
+ `:">",o};Go.prototype.renderInline=function(e,t,n){let i="",r=this.rules;for(let o=0,s=e.length;o<s;o++){let a=e[o].type;typeof r[a]<"u"?i+=r[a](e,o,t,n,this):i+=this.renderToken(e,o,t)}return i};Go.prototype.renderInlineAsText=function(e,t,n){let i="";for(let r=0,o=e.length;r<o;r++)switch(e[r].type){case"text":i+=e[r].content;break;case"image":i+=this.renderInlineAsText(e[r].children,t,n);break;case"html_inline":case"html_block":i+=e[r].content;break;case"softbreak":case"hardbreak":i+=`
256
+ `;break;default:}return i};Go.prototype.render=function(e,t,n){let i="",r=this.rules;for(let o=0,s=e.length;o<s;o++){let a=e[o].type;a==="inline"?i+=this.renderInline(e[o].children,t,n):typeof r[a]<"u"?i+=r[a](e,o,t,n,this):i+=this.renderToken(e,o,t,n)}return i};var Fz=Go;function Mn(){this.__rules__=[],this.__cache__=null}Mn.prototype.__find__=function(e){for(let t=0;t<this.__rules__.length;t++)if(this.__rules__[t].name===e)return t;return-1};Mn.prototype.__compile__=function(){let e=this,t=[""];e.__rules__.forEach(function(n){n.enabled&&n.alt.forEach(function(i){t.indexOf(i)<0&&t.push(i)})}),e.__cache__={},t.forEach(function(n){e.__cache__[n]=[],e.__rules__.forEach(function(i){i.enabled&&(n&&i.alt.indexOf(n)<0||e.__cache__[n].push(i.fn))})})};Mn.prototype.at=function(e,t,n){let i=this.__find__(e),r=n||{};if(i===-1)throw new Error("Parser rule not found: "+e);this.__rules__[i].fn=t,this.__rules__[i].alt=r.alt||[],this.__cache__=null};Mn.prototype.before=function(e,t,n,i){let r=this.__find__(e),o=i||{};if(r===-1)throw new Error("Parser rule not found: "+e);this.__rules__.splice(r,0,{name:t,enabled:!0,fn:n,alt:o.alt||[]}),this.__cache__=null};Mn.prototype.after=function(e,t,n,i){let r=this.__find__(e),o=i||{};if(r===-1)throw new Error("Parser rule not found: "+e);this.__rules__.splice(r+1,0,{name:t,enabled:!0,fn:n,alt:o.alt||[]}),this.__cache__=null};Mn.prototype.push=function(e,t,n){let i=n||{};this.__rules__.push({name:e,enabled:!0,fn:t,alt:i.alt||[]}),this.__cache__=null};Mn.prototype.enable=function(e,t){Array.isArray(e)||(e=[e]);let n=[];return e.forEach(function(i){let r=this.__find__(i);if(r<0){if(t)return;throw new Error("Rules manager: invalid rule name "+i)}this.__rules__[r].enabled=!0,n.push(i)},this),this.__cache__=null,n};Mn.prototype.enableOnly=function(e,t){Array.isArray(e)||(e=[e]),this.__rules__.forEach(function(n){n.enabled=!1}),this.enable(e,t)};Mn.prototype.disable=function(e,t){Array.isArray(e)||(e=[e]);let n=[];return e.forEach(function(i){let r=this.__find__(i);if(r<0){if(t)return;throw new Error("Rules manager: invalid rule name "+i)}this.__rules__[r].enabled=!1,n.push(i)},this),this.__cache__=null,n};Mn.prototype.getRules=function(e){return this.__cache__===null&&this.__compile__(),this.__cache__[e]||[]};var Li=Mn;function Xo(e,t,n){this.type=e,this.tag=t,this.attrs=null,this.map=null,this.nesting=n,this.level=0,this.children=null,this.content="",this.markup="",this.info="",this.meta=null,this.block=!1,this.hidden=!1}Xo.prototype.attrIndex=function(t){if(!this.attrs)return-1;let n=this.attrs;for(let i=0,r=n.length;i<r;i++)if(n[i][0]===t)return i;return-1};Xo.prototype.attrPush=function(t){this.attrs?this.attrs.push(t):this.attrs=[t]};Xo.prototype.attrSet=function(t,n){let i=this.attrIndex(t),r=[t,n];i<0?this.attrPush(r):this.attrs[i]=r};Xo.prototype.attrGet=function(t){let n=this.attrIndex(t),i=null;return n>=0&&(i=this.attrs[n][1]),i};Xo.prototype.attrJoin=function(t,n){let i=this.attrIndex(t);i<0?this.attrPush([t,n]):this.attrs[i][1]=this.attrs[i][1]+" "+n};var xr=Xo;function Bz(e,t,n){this.src=e,this.env=n,this.tokens=[],this.inlineMode=!1,this.md=t}Bz.prototype.Token=xr;var Uz=Bz;var Bq=/\r\n?|\n/g,Uq=/\0/g;function Vb(e){let t;t=e.src.replace(Bq,`
257
+ `),t=t.replace(Uq,"\uFFFD"),e.src=t}function Kb(e){let t;e.inlineMode?(t=new e.Token("inline","",0),t.content=e.src,t.map=[0,1],t.children=[],e.tokens.push(t)):e.md.block.parse(e.src,e.md,e.env,e.tokens)}function Jb(e){let t=e.tokens;for(let n=0,i=t.length;n<i;n++){let r=t[n];r.type==="inline"&&e.md.inline.parse(r.content,e.md,e.env,r.children)}}function jq(e){return/^<a[>\s]/i.test(e)}function Zq(e){return/^<\/a\s*>/i.test(e)}function Gb(e){let t=e.tokens;if(e.md.options.linkify)for(let n=0,i=t.length;n<i;n++){if(t[n].type!=="inline"||!e.md.linkify.pretest(t[n].content))continue;let r=t[n].children,o=[],s=0;for(let a=r.length-1;a>=0;a--){let l=r[a];if(l.type==="link_close"){for(a--;r[a].level!==l.level&&r[a].type!=="link_open";)a--;continue}if(l.type==="html_inline"&&(jq(l.content)&&s>0&&s--,Zq(l.content)&&s++),!(s>0)&&l.type==="text"&&e.md.linkify.test(l.content)){let u=l.content,c=e.md.linkify.match(u),d=[],f=l.level,p=0;c.length>0&&c[0].index===0&&a>0&&r[a-1].type==="text_special"&&(c=c.slice(1));for(let h=0;h<c.length;h++){let m=c[h].url,g=e.md.normalizeLink(m);if(!e.md.validateLink(g))continue;let b=c[h].text;c[h].schema?c[h].schema==="mailto:"&&!/^mailto:/i.test(b)?b=e.md.normalizeLinkText("mailto:"+b).replace(/^mailto:/,""):b=e.md.normalizeLinkText(b):b=e.md.normalizeLinkText("http://"+b).replace(/^http:\/\//,"");let v=c[h].index;if(v>p){let A=new e.Token("text","",0);A.content=u.slice(p,v),A.level=f,d.push(A)}let y=new e.Token("link_open","a",1);y.attrs=[["href",g]],y.level=f++,y.markup="linkify",y.info="auto",d.push(y);let x=new e.Token("text","",0);x.content=b,x.level=f,d.push(x);let C=new e.Token("link_close","a",-1);C.level=--f,C.markup="linkify",C.info="auto",d.push(C),p=c[h].lastIndex}if(p<u.length){let h=new e.Token("text","",0);h.content=u.slice(p),h.level=f,d.push(h)}o.push({index:a,nodes:d})}}if(o.length>0){let a=r.length;for(let d of o)a+=d.nodes.length-1;let l=new Array(a),u=0,c=0;o.reverse();for(let d=0;d<r.length;d++){let f=o[u];if(f?.index===d){for(let p of f.nodes)l[c++]=p;u++}else l[c++]=r[d]}t[n].children=l}}}var jz=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,Hq=/\((c|tm|r)\)/i,qq=/\((c|tm|r)\)/ig,Wq={c:"\xA9",r:"\xAE",tm:"\u2122"};function Vq(e,t){return Wq[t.toLowerCase()]}function Kq(e){let t=0;for(let n=e.length-1;n>=0;n--){let i=e[n];i.type==="text"&&!t&&(i.content=i.content.replace(qq,Vq)),i.type==="link_open"&&i.info==="auto"&&t--,i.type==="link_close"&&i.info==="auto"&&t++}}function Jq(e){let t=0;for(let n=e.length-1;n>=0;n--){let i=e[n];i.type==="text"&&!t&&jz.test(i.content)&&(i.content=i.content.replace(/\+-/g,"\xB1").replace(/\.{2,}/g,"\u2026").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/mg,"$1\u2014").replace(/(^|\s)--(?=\s|$)/mg,"$1\u2013").replace(/(^|[^-\s])--(?=[^-\s]|$)/mg,"$1\u2013")),i.type==="link_open"&&i.info==="auto"&&t--,i.type==="link_close"&&i.info==="auto"&&t++}}function Xb(e){let t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)e.tokens[t].type==="inline"&&(Hq.test(e.tokens[t].content)&&Kq(e.tokens[t].children),jz.test(e.tokens[t].content)&&Jq(e.tokens[t].children))}var Gq=/['"]/,Zz=/['"]/g,Hz="\u2019",Xq=1e3;function qz(e,t,n){for(;e.length>n;){let i=e.pop();i.isSingleQuote?t.single=i.prevSameQuoteIdx:t.double=i.prevSameQuoteIdx}}function mf(e,t,n,i){e[t]||(e[t]=[]),e[t].push({pos:n,ch:i})}function Yq(e,t){let n="",i=0;t.sort((r,o)=>r.pos-o.pos);for(let r=0;r<t.length;r++){let o=t[r];n+=e.slice(i,o.pos)+o.ch,i=o.pos+1}return n+e.slice(i)}function Qq(e,t){let n,i=[],r={single:-1,double:-1},o={};for(let s=0;s<e.length;s++){let a=e[s],l=e[s].level;for(n=i.length-1;n>=0&&!(i[n].level<=l);n--);if(qz(i,r,n+1),a.type!=="text")continue;let u=a.content,c=0,d=u.length;e:for(;c<d;){Zz.lastIndex=c;let f=Zz.exec(u);if(!f)break;let p=!0,h=!0;c=f.index+1;let m=f[0]==="'",g=32;if(f.index-1>=0)g=u.charCodeAt(f.index-1);else for(n=s-1;n>=0&&!(e[n].type==="softbreak"||e[n].type==="hardbreak");n--)if(e[n].content){g=e[n].content.charCodeAt(e[n].content.length-1);break}let b=32;if(c<d)b=u.charCodeAt(c);else for(n=s+1;n<e.length&&!(e[n].type==="softbreak"||e[n].type==="hardbreak");n++)if(e[n].content){b=e[n].content.charCodeAt(0);break}let v=Oi(g)||Ni(g),y=Oi(b)||Ni(b),x=Di(g),C=Di(b);if(C?p=!1:y&&(x||v||(p=!1)),x?h=!1:v&&(C||y||(h=!1)),b===34&&f[0]==='"'&&g>=48&&g<=57&&(h=p=!1),p&&h&&(p=v,h=y),!p&&!h){m&&mf(o,s,f.index,Hz);continue}if(h&&(n=m?r.single:r.double,n>=0&&i[n].level===l)){let A=i[n],D,M;m?(D=t.md.options.quotes[2],M=t.md.options.quotes[3]):(D=t.md.options.quotes[0],M=t.md.options.quotes[1]),mf(o,s,f.index,M),mf(o,A.tokenIdx,A.contentPos,D),qz(i,r,n);continue e}if(p){if(i.length>=Xq)return;i.push({tokenIdx:s,contentPos:f.index,isSingleQuote:m,level:l,prevSameQuoteIdx:m?r.single:r.double}),m?r.single=i.length-1:r.double=i.length-1}else h&&m&&mf(o,s,f.index,Hz)}}Object.keys(o).forEach(function(s){e[s].content=Yq(e[s].content,o[s])})}function Yb(e){if(e.md.options.typographer)for(let t=e.tokens.length-1;t>=0;t--)e.tokens[t].type!=="inline"||!Gq.test(e.tokens[t].content)||Qq(e.tokens[t].children,e)}function Qb(e){let t,n,i=e.tokens,r=i.length;for(let o=0;o<r;o++){if(i[o].type!=="inline")continue;let s=i[o].children,a=s.length;for(t=0;t<a;t++)s[t].type==="text_special"&&(s[t].type="text");for(t=n=0;t<a;t++)s[t].type==="text"&&t+1<a&&s[t+1].type==="text"?s[t+1].content=s[t].content+s[t+1].content:(t!==n&&(s[n]=s[t]),n++);t!==n&&(s.length=n)}}var ev=[["normalize",Vb],["block",Kb],["inline",Jb],["linkify",Gb],["replacements",Xb],["smartquotes",Yb],["text_join",Qb]];function tv(){this.ruler=new Li;for(let e=0;e<ev.length;e++)this.ruler.push(ev[e][0],ev[e][1])}tv.prototype.process=function(e){let t=this.ruler.getRules("");for(let n=0,i=t.length;n<i;n++)t[n](e)};tv.prototype.State=Uz;var Wz=tv;function Vn(e,t,n,i){this.src=e,this.md=t,this.env=n,this.tokens=i,this.bMarks=[],this.eMarks=[],this.tShift=[],this.sCount=[],this.bsCount=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.ddIndent=-1,this.listIndent=-1,this.parentType="root",this.level=0;let r=this.src;for(let o=0,s=0,a=0,l=0,u=r.length,c=!1;s<u;s++){let d=r.charCodeAt(s);if(!c)if(be(d)){a++,d===9?l+=4-l%4:l++;continue}else c=!0;(d===10||s===u-1)&&(d!==10&&s++,this.bMarks.push(o),this.eMarks.push(s),this.tShift.push(a),this.sCount.push(l),this.bsCount.push(0),c=!1,a=0,l=0,o=s+1)}this.bMarks.push(r.length),this.eMarks.push(r.length),this.tShift.push(0),this.sCount.push(0),this.bsCount.push(0),this.lineMax=this.bMarks.length-1}Vn.prototype.push=function(e,t,n){let i=new xr(e,t,n);return i.block=!0,n<0&&this.level--,i.level=this.level,n>0&&this.level++,this.tokens.push(i),i};Vn.prototype.isEmpty=function(t){return this.bMarks[t]+this.tShift[t]>=this.eMarks[t]};Vn.prototype.skipEmptyLines=function(t){for(let n=this.lineMax;t<n&&!(this.bMarks[t]+this.tShift[t]<this.eMarks[t]);t++);return t};Vn.prototype.skipSpaces=function(t){for(let n=this.src.length;t<n;t++){let i=this.src.charCodeAt(t);if(!be(i))break}return t};Vn.prototype.skipSpacesBack=function(t,n){if(t<=n)return t;for(;t>n;)if(!be(this.src.charCodeAt(--t)))return t+1;return t};Vn.prototype.skipChars=function(t,n){for(let i=this.src.length;t<i&&this.src.charCodeAt(t)===n;t++);return t};Vn.prototype.skipCharsBack=function(t,n,i){if(t<=i)return t;for(;t>i;)if(n!==this.src.charCodeAt(--t))return t+1;return t};Vn.prototype.getLines=function(t,n,i,r){if(t>=n)return"";let o=new Array(n-t);for(let s=0,a=t;a<n;a++,s++){let l=0,u=this.bMarks[a],c=u,d;for(a+1<n||r?d=this.eMarks[a]+1:d=this.eMarks[a];c<d&&l<i;){let f=this.src.charCodeAt(c);if(be(f))f===9?l+=4-(l+this.bsCount[a])%4:l++;else if(c-u<this.tShift[a])l++;else break;c++}l>i?o[s]=new Array(l-i+1).join(" ")+this.src.slice(c,d):o[s]=this.src.slice(c,d)}return o.join("")};Vn.prototype.Token=xr;var Vz=Vn;var eW=65536;function nv(e,t){let n=e.bMarks[t]+e.tShift[t],i=e.eMarks[t];return e.src.slice(n,i)}function Kz(e){let t=[],n=e.length,i=0,r=e.charCodeAt(i),o=!1,s=0,a="";for(;i<n;)r===124&&(o?(a+=e.substring(s,i-1),s=i):(t.push(a+e.substring(s,i)),a="",s=i+1)),o=r===92,i++,r=e.charCodeAt(i);return t.push(a+e.substring(s)),t}function rv(e,t,n,i){if(t+2>n)return!1;let r=t+1;if(e.sCount[r]<e.blkIndent||e.sCount[r]-e.blkIndent>=4)return!1;let o=e.bMarks[r]+e.tShift[r];if(o>=e.eMarks[r])return!1;let s=e.src.charCodeAt(o++);if(s!==124&&s!==45&&s!==58||o>=e.eMarks[r])return!1;let a=e.src.charCodeAt(o++);if(a!==124&&a!==45&&a!==58&&!be(a)||s===45&&be(a))return!1;for(;o<e.eMarks[r];){let x=e.src.charCodeAt(o);if(x!==124&&x!==45&&x!==58&&!be(x))return!1;o++}let l=nv(e,t+1),u=l.split("|"),c=[];for(let x=0;x<u.length;x++){let C=u[x].trim();if(!C){if(x===0||x===u.length-1)continue;return!1}if(!/^:?-+:?$/.test(C))return!1;C.charCodeAt(C.length-1)===58?c.push(C.charCodeAt(0)===58?"center":"right"):C.charCodeAt(0)===58?c.push("left"):c.push("")}if(l=nv(e,t).trim(),l.indexOf("|")===-1||e.sCount[t]-e.blkIndent>=4)return!1;u=Kz(l),u.length&&u[0]===""&&u.shift(),u.length&&u[u.length-1]===""&&u.pop();let d=u.length;if(d===0||d!==c.length)return!1;if(i)return!0;let f=e.parentType;e.parentType="table";let p=e.md.block.ruler.getRules("blockquote"),h=e.push("table_open","table",1),m=[t,0];h.map=m;let g=e.push("thead_open","thead",1);g.map=[t,t+1];let b=e.push("tr_open","tr",1);b.map=[t,t+1];for(let x=0;x<u.length;x++){let C=e.push("th_open","th",1);c[x]&&(C.attrs=[["style","text-align:"+c[x]]]);let A=e.push("inline","",0);A.content=u[x].trim(),A.children=[],e.push("th_close","th",-1)}e.push("tr_close","tr",-1),e.push("thead_close","thead",-1);let v,y=0;for(r=t+2;r<n&&!(e.sCount[r]<e.blkIndent);r++){let x=!1;for(let A=0,D=p.length;A<D;A++)if(p[A](e,r,n,!0)){x=!0;break}if(x||(l=nv(e,r).trim(),!l)||e.sCount[r]-e.blkIndent>=4||(u=Kz(l),u.length&&u[0]===""&&u.shift(),u.length&&u[u.length-1]===""&&u.pop(),y+=d-u.length,y>eW))break;if(r===t+2){let A=e.push("tbody_open","tbody",1);A.map=v=[t+2,0]}let C=e.push("tr_open","tr",1);C.map=[r,r+1];for(let A=0;A<d;A++){let D=e.push("td_open","td",1);c[A]&&(D.attrs=[["style","text-align:"+c[A]]]);let M=e.push("inline","",0);M.content=u[A]?u[A].trim():"",M.children=[],e.push("td_close","td",-1)}e.push("tr_close","tr",-1)}return v&&(e.push("tbody_close","tbody",-1),v[1]=r),e.push("table_close","table",-1),m[1]=r,e.parentType=f,e.line=r,!0}function iv(e,t,n){if(e.sCount[t]-e.blkIndent<4)return!1;let i=t+1,r=i;for(;i<n;){if(e.isEmpty(i)){i++;continue}if(e.sCount[i]-e.blkIndent>=4){i++,r=i;continue}break}e.line=r;let o=e.push("code_block","code",0);return o.content=e.getLines(t,r,4+e.blkIndent,!1)+`
258
+ `,o.map=[t,e.line],!0}function ov(e,t,n,i){let r=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||r+3>o)return!1;let s=e.src.charCodeAt(r);if(s!==126&&s!==96)return!1;let a=r;r=e.skipChars(r,s);let l=r-a;if(l<3)return!1;let u=e.src.slice(a,r),c=e.src.slice(r,o);if(s===96&&c.indexOf(String.fromCharCode(s))>=0)return!1;if(i)return!0;let d=t,f=!1;for(;d++,!(d>=n||(r=a=e.bMarks[d]+e.tShift[d],o=e.eMarks[d],r<o&&e.sCount[d]<e.blkIndent));)if(e.src.charCodeAt(r)===s&&!(e.sCount[d]-e.blkIndent>=4)&&(r=e.skipChars(r,s),!(r-a<l)&&(r=e.skipSpaces(r),!(r<o)))){f=!0;break}l=e.sCount[t],e.line=d+(f?1:0);let p=e.push("fence","code",0);return p.info=c,p.content=e.getLines(t+1,d,l,!0),p.markup=u,p.map=[t,e.line],!0}function sv(e,t,n,i){let r=e.bMarks[t]+e.tShift[t],o=e.eMarks[t],s=e.lineMax;if(e.sCount[t]-e.blkIndent>=4||e.src.charCodeAt(r)!==62)return!1;if(i)return!0;let a=[],l=[],u=[],c=[],d=e.md.block.ruler.getRules("blockquote"),f=e.parentType;e.parentType="blockquote";let p=!1,h;for(h=t;h<n;h++){let y=e.sCount[h]<e.blkIndent;if(r=e.bMarks[h]+e.tShift[h],o=e.eMarks[h],r>=o)break;if(e.src.charCodeAt(r++)===62&&!y){let C=e.sCount[h]+1,A,D;e.src.charCodeAt(r)===32?(r++,C++,D=!1,A=!0):e.src.charCodeAt(r)===9?(A=!0,(e.bsCount[h]+C)%4===3?(r++,C++,D=!1):D=!0):A=!1;let M=C;for(a.push(e.bMarks[h]),e.bMarks[h]=r;r<o;){let V=e.src.charCodeAt(r);if(be(V))V===9?M+=4-(M+e.bsCount[h]+(D?1:0))%4:M++;else break;r++}p=r>=o,l.push(e.bsCount[h]),e.bsCount[h]=e.sCount[h]+1+(A?1:0),u.push(e.sCount[h]),e.sCount[h]=M-C,c.push(e.tShift[h]),e.tShift[h]=r-e.bMarks[h];continue}if(p)break;let x=!1;for(let C=0,A=d.length;C<A;C++)if(d[C](e,h,n,!0)){x=!0;break}if(x){e.lineMax=h,e.blkIndent!==0&&(a.push(e.bMarks[h]),l.push(e.bsCount[h]),c.push(e.tShift[h]),u.push(e.sCount[h]),e.sCount[h]-=e.blkIndent);break}a.push(e.bMarks[h]),l.push(e.bsCount[h]),c.push(e.tShift[h]),u.push(e.sCount[h]),e.sCount[h]=-1}let m=e.blkIndent;e.blkIndent=0;let g=e.push("blockquote_open","blockquote",1);g.markup=">";let b=[t,0];g.map=b,e.md.block.tokenize(e,t,h);let v=e.push("blockquote_close","blockquote",-1);v.markup=">",e.lineMax=s,e.parentType=f,b[1]=e.line;for(let y=0;y<c.length;y++)e.bMarks[y+t]=a[y],e.tShift[y+t]=c[y],e.sCount[y+t]=u[y],e.bsCount[y+t]=l[y];return e.blkIndent=m,!0}function av(e,t,n,i){let r=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let o=e.bMarks[t]+e.tShift[t],s=e.src.charCodeAt(o++);if(s!==42&&s!==45&&s!==95)return!1;let a=1;for(;o<r;){let u=e.src.charCodeAt(o++);if(u!==s&&!be(u))return!1;u===s&&a++}if(a<3)return!1;if(i)return!0;e.line=t+1;let l=e.push("hr","hr",0);return l.map=[t,e.line],l.markup=Array(a+1).join(String.fromCharCode(s)),!0}function Jz(e,t){let n=e.eMarks[t],i=e.bMarks[t]+e.tShift[t],r=e.src.charCodeAt(i++);if(r!==42&&r!==45&&r!==43)return-1;if(i<n){let o=e.src.charCodeAt(i);if(!be(o))return-1}return i}function Gz(e,t){let n=e.bMarks[t]+e.tShift[t],i=e.eMarks[t],r=n;if(r+1>=i)return-1;let o=e.src.charCodeAt(r++);if(o<48||o>57)return-1;for(;;){if(r>=i)return-1;if(o=e.src.charCodeAt(r++),o>=48&&o<=57){if(r-n>=10)return-1;continue}if(o===41||o===46)break;return-1}return r<i&&(o=e.src.charCodeAt(r),!be(o))?-1:r}function tW(e,t){let n=e.level+2;for(let i=t+2,r=e.tokens.length-2;i<r;i++)e.tokens[i].level===n&&e.tokens[i].type==="paragraph_open"&&(e.tokens[i+2].hidden=!0,e.tokens[i].hidden=!0,i+=2)}function lv(e,t,n,i){let r,o,s,a,l=t,u=!0;if(e.sCount[l]-e.blkIndent>=4||e.listIndent>=0&&e.sCount[l]-e.listIndent>=4&&e.sCount[l]<e.blkIndent)return!1;let c=!1;i&&e.parentType==="paragraph"&&e.sCount[l]>=e.blkIndent&&(c=!0);let d,f,p;if((p=Gz(e,l))>=0){if(d=!0,s=e.bMarks[l]+e.tShift[l],f=Number(e.src.slice(s,p-1)),c&&f!==1)return!1}else if((p=Jz(e,l))>=0)d=!1;else return!1;if(c&&e.skipSpaces(p)>=e.eMarks[l])return!1;if(i)return!0;let h=e.src.charCodeAt(p-1),m=e.tokens.length;d?(a=e.push("ordered_list_open","ol",1),f!==1&&(a.attrs=[["start",f]])):a=e.push("bullet_list_open","ul",1);let g=[l,0];a.map=g,a.markup=String.fromCharCode(h);let b=!1,v=e.md.block.ruler.getRules("list"),y=e.parentType;for(e.parentType="list";l<n;){o=p,r=e.eMarks[l];let x=e.sCount[l]+p-(e.bMarks[l]+e.tShift[l]),C=x;for(;o<r;){let se=e.src.charCodeAt(o);if(se===9)C+=4-(C+e.bsCount[l])%4;else if(se===32)C++;else break;o++}let A=o,D;A>=r?D=1:D=C-x,D>4&&(D=1);let M=x+D;a=e.push("list_item_open","li",1),a.markup=String.fromCharCode(h);let V=[l,0];a.map=V,d&&(a.info=e.src.slice(s,p-1));let me=e.tight,et=e.tShift[l],it=e.sCount[l],je=e.listIndent;if(e.listIndent=e.blkIndent,e.blkIndent=M,e.tight=!0,e.tShift[l]=A-e.bMarks[l],e.sCount[l]=C,A>=r&&e.isEmpty(l+1)?e.line=Math.min(e.line+2,n):e.md.block.tokenize(e,l,n,!0),(!e.tight||b)&&(u=!1),b=e.line-l>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=je,e.tShift[l]=et,e.sCount[l]=it,e.tight=me,a=e.push("list_item_close","li",-1),a.markup=String.fromCharCode(h),l=e.line,V[1]=l,l>=n||e.sCount[l]<e.blkIndent||e.sCount[l]-e.blkIndent>=4)break;let Me=!1;for(let se=0,I=v.length;se<I;se++)if(v[se](e,l,n,!0)){Me=!0;break}if(Me)break;if(d){if(p=Gz(e,l),p<0)break;s=e.bMarks[l]+e.tShift[l]}else if(p=Jz(e,l),p<0)break;if(h!==e.src.charCodeAt(p-1))break}return d?a=e.push("ordered_list_close","ol",-1):a=e.push("bullet_list_close","ul",-1),a.markup=String.fromCharCode(h),g[1]=l,e.line=l,e.parentType=y,u&&tW(e,m),!0}function uv(e,t,n,i){let r=e.bMarks[t]+e.tShift[t],o=e.eMarks[t],s=t+1;if(e.sCount[t]-e.blkIndent>=4||e.src.charCodeAt(r)!==91)return!1;function a(v){let y=e.lineMax;if(v>=y||e.isEmpty(v))return null;let x=!1;if(e.sCount[v]-e.blkIndent>3&&(x=!0),e.sCount[v]<0&&(x=!0),!x){let D=e.md.block.ruler.getRules("reference"),M=e.parentType;e.parentType="reference";let V=!1;for(let me=0,et=D.length;me<et;me++)if(D[me](e,v,y,!0)){V=!0;break}if(e.parentType=M,V)return null}let C=e.bMarks[v]+e.tShift[v],A=e.eMarks[v];return e.src.slice(C,A+1)}let l=e.src.slice(r,o+1);o=l.length;let u=-1;for(r=1;r<o;r++){let v=l.charCodeAt(r);if(v===91)return!1;if(v===93){u=r;break}else if(v===10){let y=a(s);y!==null&&(l+=y,o=l.length,s++)}else if(v===92&&(r++,r<o&&l.charCodeAt(r)===10)){let y=a(s);y!==null&&(l+=y,o=l.length,s++)}}if(u<0||l.charCodeAt(u+1)!==58)return!1;for(r=u+2;r<o;r++){let v=l.charCodeAt(r);if(v===10){let y=a(s);y!==null&&(l+=y,o=l.length,s++)}else if(!be(v))break}let c=e.md.helpers.parseLinkDestination(l,r,o);if(!c.ok)return!1;let d=e.md.normalizeLink(c.str);if(!e.md.validateLink(d))return!1;r=c.pos;let f=r,p=s,h=r;for(;r<o;r++){let v=l.charCodeAt(r);if(v===10){let y=a(s);y!==null&&(l+=y,o=l.length,s++)}else if(!be(v))break}let m=e.md.helpers.parseLinkTitle(l,r,o);for(;m.can_continue;){let v=a(s);if(v===null)break;l+=v,r=o,o=l.length,s++,m=e.md.helpers.parseLinkTitle(l,r,o,m)}let g;for(r<o&&h!==r&&m.ok?(g=m.str,r=m.pos):(g="",r=f,s=p);r<o;){let v=l.charCodeAt(r);if(!be(v))break;r++}if(r<o&&l.charCodeAt(r)!==10&&g)for(g="",r=f,s=p;r<o;){let v=l.charCodeAt(r);if(!be(v))break;r++}if(r<o&&l.charCodeAt(r)!==10)return!1;let b=Ri(l.slice(1,u));return b?(i||(typeof e.env.references>"u"&&(e.env.references={}),typeof e.env.references[b]>"u"&&(e.env.references[b]={title:g,href:d}),e.line=s),!0):!1}var Xz=["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","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"];var nW="[a-zA-Z_:][a-zA-Z0-9:._-]*",rW="[^\"'=<>`\\x00-\\x20]+",iW="'[^']*'",oW='"[^"]*"',sW="(?:"+rW+"|"+iW+"|"+oW+")",aW="(?:\\s+"+nW+"(?:\\s*=\\s*"+sW+")?)",Yz="<[A-Za-z][A-Za-z0-9\\-]*"+aW+"*\\s*\\/?>",Qz="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",lW="<!---?>|<!--(?:[^-]|-[^-]|--[^>])*-->",uW="<[?][\\s\\S]*?[?]>",cW="<![A-Za-z][^>]*>",dW="<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",e4=new RegExp("^(?:"+Yz+"|"+Qz+"|"+lW+"|"+uW+"|"+cW+"|"+dW+")"),t4=new RegExp("^(?:"+Yz+"|"+Qz+")");var Fi=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Za-z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^</?("+Xz.join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(t4.source+"\\s*$"),/^$/,!1]];function cv(e,t,n,i){let r=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||!e.md.options.html||e.src.charCodeAt(r)!==60)return!1;let s=e.src.slice(r,o),a=0;for(;a<Fi.length&&!Fi[a][0].test(s);a++);if(a===Fi.length)return!1;if(i)return Fi[a][2];let l=t+1,u=Fi[a][1].test("");if(!Fi[a][1].test(s)){for(;l<n&&!(e.sCount[l]<e.blkIndent&&(u||!e.isEmpty(l)));l++)if(r=e.bMarks[l]+e.tShift[l],o=e.eMarks[l],s=e.src.slice(r,o),Fi[a][1].test(s)){s.length!==0&&l++;break}}e.line=l;let c=e.push("html_block","",0);return c.map=[t,l],c.content=e.getLines(t,l,e.blkIndent,!0),!0}function dv(e,t,n,i){let r=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let s=e.src.charCodeAt(r);if(s!==35||r>=o)return!1;let a=1;for(s=e.src.charCodeAt(++r);s===35&&r<o&&a<=6;)a++,s=e.src.charCodeAt(++r);if(a>6||r<o&&!be(s))return!1;if(i)return!0;o=e.skipSpacesBack(o,r);let l=e.skipCharsBack(o,35,r);l>r&&be(e.src.charCodeAt(l-1))&&(o=l),e.line=t+1;let u=e.push("heading_open","h"+String(a),1);u.markup="########".slice(0,a),u.map=[t,e.line];let c=e.push("inline","",0);c.content=Pi(e.src.slice(r,o)),c.map=[t,e.line],c.children=[];let d=e.push("heading_close","h"+String(a),-1);return d.markup="########".slice(0,a),!0}function fv(e,t,n){let i=e.md.block.ruler.getRules("paragraph");if(e.sCount[t]-e.blkIndent>=4)return!1;let r=e.parentType;e.parentType="paragraph";let o=0,s,a=t+1;for(;a<n&&!e.isEmpty(a);a++){if(e.sCount[a]-e.blkIndent>3)continue;if(e.sCount[a]>=e.blkIndent){let p=e.bMarks[a]+e.tShift[a],h=e.eMarks[a];if(p<h&&(s=e.src.charCodeAt(p),(s===45||s===61)&&(p=e.skipChars(p,s),p=e.skipSpaces(p),p>=h))){o=s===61?1:2;break}}if(e.sCount[a]<0)continue;let f=!1;for(let p=0,h=i.length;p<h;p++)if(i[p](e,a,n,!0)){f=!0;break}if(f)break}if(!o)return e.parentType=r,!1;let l=Pi(e.getLines(t,a,e.blkIndent,!1));e.line=a+1;let u=e.push("heading_open","h"+String(o),1);u.markup=String.fromCharCode(s),u.map=[t,e.line];let c=e.push("inline","",0);c.content=l,c.map=[t,e.line-1],c.children=[];let d=e.push("heading_close","h"+String(o),-1);return d.markup=String.fromCharCode(s),e.parentType=r,!0}function pv(e,t,n){let i=e.md.block.ruler.getRules("paragraph"),r=e.parentType,o=t+1;for(e.parentType="paragraph";o<n&&!e.isEmpty(o);o++){if(e.sCount[o]-e.blkIndent>3||e.sCount[o]<0)continue;let u=!1;for(let c=0,d=i.length;c<d;c++)if(i[c](e,o,n,!0)){u=!0;break}if(u)break}let s=Pi(e.getLines(t,o,e.blkIndent,!1));e.line=o;let a=e.push("paragraph_open","p",1);a.map=[t,e.line];let l=e.push("inline","",0);return l.content=s,l.map=[t,e.line],l.children=[],e.push("paragraph_close","p",-1),e.parentType=r,!0}var gf=[["table",rv,["paragraph","reference"]],["code",iv],["fence",ov,["paragraph","reference","blockquote","list"]],["blockquote",sv,["paragraph","reference","blockquote","list"]],["hr",av,["paragraph","reference","blockquote","list"]],["list",lv,["paragraph","reference","blockquote"]],["reference",uv],["html_block",cv,["paragraph","reference","blockquote"]],["heading",dv,["paragraph","reference","blockquote"]],["lheading",fv],["paragraph",pv]];function bf(){this.ruler=new Li;for(let e=0;e<gf.length;e++)this.ruler.push(gf[e][0],gf[e][1],{alt:(gf[e][2]||[]).slice()})}bf.prototype.tokenize=function(e,t,n){let i=this.ruler.getRules(""),r=i.length,o=e.md.options.maxNesting,s=t,a=!1;for(;s<n&&(e.line=s=e.skipEmptyLines(s),!(s>=n||e.sCount[s]<e.blkIndent));){if(e.level>=o){e.line=n;break}let l=e.line,u=!1;for(let c=0;c<r;c++)if(u=i[c](e,s,n,!1),u){if(l>=e.line)throw new Error("block rule didn't increment state.line");break}if(!u)throw new Error("none of the block rules matched");e.tight=!a,e.isEmpty(e.line-1)&&(a=!0),s=e.line,s<n&&e.isEmpty(s)&&(a=!0,s++,e.line=s)}};bf.prototype.parse=function(e,t,n,i){if(!e)return;let r=new this.State(e,t,n,i);this.tokenize(r,r.line,r.lineMax)};bf.prototype.State=Vz;var n4=bf;function il(e,t,n,i){this.src=e,this.env=n,this.md=t,this.tokens=i,this.tokens_meta=Array(i.length),this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache={},this.delimiters=[],this._prev_delimiters=[],this.backticks={},this.backticksScanned=!1,this.linkLevel=0}il.prototype.pushPending=function(){let e=new xr("text","",0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending="",e};il.prototype.push=function(e,t,n){this.pending&&this.pushPending();let i=new xr(e,t,n),r=null;return n<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),i.level=this.level,n>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],r={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(i),this.tokens_meta.push(r),i};il.prototype.scanDelims=function(e,t){let n=this.posMax,i=this.src.charCodeAt(e),r;if(e===0)r=32;else if(e===1)r=this.src.charCodeAt(0),(r&63488)===55296&&(r=65533);else if(r=this.src.charCodeAt(e-1),(r&64512)===56320){let g=this.src.charCodeAt(e-2);r=(g&64512)===55296?65536+(g-55296<<10)+(r-56320):65533}else(r&64512)===55296&&(r=65533);let o=e;for(;o<n&&this.src.charCodeAt(o)===i;)o++;let s=o-e,a=o<n?this.src.charCodeAt(o):32;if((a&64512)===55296){let g=this.src.charCodeAt(o+1);a=(g&64512)===56320?65536+(a-55296<<10)+(g-56320):65533}else(a&64512)===56320&&(a=65533);let l=Oi(r)||Ni(r),u=Oi(a)||Ni(a),c=Di(r),d=Di(a),f=!d&&(!u||c||l),p=!c&&(!l||d||u);return{can_open:f&&(t||!p||l),can_close:p&&(t||!f||u),length:s}};il.prototype.Token=xr;var r4=il;function fW(e){switch(e){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}function hv(e,t){let n=e.pos;for(;n<e.posMax&&!fW(e.src.charCodeAt(n));)n++;return n===e.pos?!1:(t||(e.pending+=e.src.slice(e.pos,n)),e.pos=n,!0)}function pW(e){return e>=65&&e<=90||e>=97&&e<=122}function hW(e){return e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||e===43||e===45||e===46}function mv(e,t){if(!e.md.options.linkify||e.linkLevel>0)return!1;let n=e.pos,i=e.posMax;if(n+3>i||e.src.charCodeAt(n)!==58||e.src.charCodeAt(n+1)!==47||e.src.charCodeAt(n+2)!==47)return!1;let r=n-Math.min(10,e.pending.length,n),o=n;for(;o>r&&hW(e.src.charCodeAt(o-1));)o--;if(o===n||!pW(e.src.charCodeAt(o)))return!1;let s=n-o,a=e.md.linkify.matchAtStart(e.src.slice(o));if(!a)return!1;let l=a.url;if(l.length<=s)return!1;let u=l.length;for(;u>0&&l.charCodeAt(u-1)===42;)u--;u!==l.length&&(l=l.slice(0,u));let c=e.md.normalizeLink(l);if(!e.md.validateLink(c))return!1;if(!t){e.pending=e.pending.slice(0,-s);let d=e.push("link_open","a",1);d.attrs=[["href",c]],d.markup="linkify",d.info="auto";let f=e.push("text","",0);f.content=e.md.normalizeLinkText(l);let p=e.push("link_close","a",-1);p.markup="linkify",p.info="auto"}return e.pos+=l.length-s,!0}function gv(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==10)return!1;let i=e.pending.length-1,r=e.posMax;if(!t)if(i>=0&&e.pending.charCodeAt(i)===32)if(i>=1&&e.pending.charCodeAt(i-1)===32){let o=i-1;for(;o>=1&&e.pending.charCodeAt(o-1)===32;)o--;e.pending=e.pending.slice(0,o),e.push("hardbreak","br",0)}else e.pending=e.pending.slice(0,-1),e.push("softbreak","br",0);else e.push("softbreak","br",0);for(n++;n<r&&be(e.src.charCodeAt(n));)n++;return e.pos=n,!0}var bv=[];for(let e=0;e<256;e++)bv.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(e){bv[e.charCodeAt(0)]=1});function vv(e,t){let n=e.pos,i=e.posMax;if(e.src.charCodeAt(n)!==92||(n++,n>=i))return!1;let r=e.src.charCodeAt(n);if(r===10){for(t||e.push("hardbreak","br",0),n++;n<i&&(r=e.src.charCodeAt(n),!!be(r));)n++;return e.pos=n,!0}if(r===32){if(!t){let a=e.push("text_special","",0);a.content="\\",a.markup="\\",a.info="escape"}return e.pos=n,!0}let o=e.src[n];if(r>=55296&&r<=56319&&n+1<i){let a=e.src.charCodeAt(n+1);a>=56320&&a<=57343&&(o+=e.src[n+1],n++)}let s="\\"+o;if(!t){let a=e.push("text_special","",0);r<256&&bv[r]!==0?a.content=o:a.content=s,a.markup=s,a.info="escape"}return e.pos=n+1,!0}function yv(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==96)return!1;let r=n;n++;let o=e.posMax;for(;n<o&&e.src.charCodeAt(n)===96;)n++;let s=e.src.slice(r,n),a=s.length;if(e.backticksScanned&&(e.backticks[a]||0)<=r)return t||(e.pending+=s),e.pos+=a,!0;let l=n,u;for(;(u=e.src.indexOf("`",l))!==-1;){for(l=u+1;l<o&&e.src.charCodeAt(l)===96;)l++;let c=l-u;if(c===a){if(!t){let d=e.push("code_inline","code",0);d.markup=s,d.content=e.src.slice(n,u).replace(/\n/g," ").replace(/^ (.+) $/,"$1")}return e.pos=l,!0}e.backticks[c]=u}return e.backticksScanned=!0,t||(e.pending+=s),e.pos+=a,!0}function mW(e,t){let n=e.pos,i=e.src.charCodeAt(n);if(t||i!==126)return!1;let r=e.scanDelims(e.pos,!0),o=r.length,s=String.fromCharCode(i);if(o<2)return!1;let a;o%2&&(a=e.push("text","",0),a.content=s,o--);for(let l=0;l<o;l+=2)a=e.push("text","",0),a.content=s+s,e.delimiters.push({marker:i,length:0,token:e.tokens.length-1,end:-1,open:r.can_open,close:r.can_close});return e.pos+=r.length,!0}function i4(e,t){let n,i=[],r=t.length;for(let o=0;o<r;o++){let s=t[o];if(s.marker!==126||s.end===-1)continue;let a=t[s.end];n=e.tokens[s.token],n.type="s_open",n.tag="s",n.nesting=1,n.markup="~~",n.content="",n=e.tokens[a.token],n.type="s_close",n.tag="s",n.nesting=-1,n.markup="~~",n.content="",e.tokens[a.token-1].type==="text"&&e.tokens[a.token-1].content==="~"&&i.push(a.token-1)}for(;i.length;){let o=i.pop(),s=o+1;for(;s<e.tokens.length&&e.tokens[s].type==="s_close";)s++;s--,o!==s&&(n=e.tokens[s],e.tokens[s]=e.tokens[o],e.tokens[o]=n)}}function gW(e){let t=e.tokens_meta,n=e.tokens_meta.length;i4(e,e.delimiters);for(let i=0;i<n;i++)t[i]&&t[i].delimiters&&i4(e,t[i].delimiters)}var kv={tokenize:mW,postProcess:gW};function bW(e,t){let n=e.pos,i=e.src.charCodeAt(n);if(t||i!==95&&i!==42)return!1;let r=e.scanDelims(e.pos,i===42);for(let o=0;o<r.length;o++){let s=e.push("text","",0);s.content=String.fromCharCode(i),e.delimiters.push({marker:i,length:r.length,token:e.tokens.length-1,end:-1,open:r.can_open,close:r.can_close})}return e.pos+=r.length,!0}function o4(e,t){let n=t.length;for(let i=n-1;i>=0;i--){let r=t[i];if(r.marker!==95&&r.marker!==42||r.end===-1)continue;let o=t[r.end],s=i>0&&t[i-1].end===r.end+1&&t[i-1].marker===r.marker&&t[i-1].token===r.token-1&&t[r.end+1].token===o.token+1,a=String.fromCharCode(r.marker),l=e.tokens[r.token];l.type=s?"strong_open":"em_open",l.tag=s?"strong":"em",l.nesting=1,l.markup=s?a+a:a,l.content="";let u=e.tokens[o.token];u.type=s?"strong_close":"em_close",u.tag=s?"strong":"em",u.nesting=-1,u.markup=s?a+a:a,u.content="",s&&(e.tokens[t[i-1].token].content="",e.tokens[t[r.end+1].token].content="",i--)}}function vW(e){let t=e.tokens_meta,n=e.tokens_meta.length;o4(e,e.delimiters);for(let i=0;i<n;i++)t[i]&&t[i].delimiters&&o4(e,t[i].delimiters)}var xv={tokenize:bW,postProcess:vW};function _v(e,t){let n,i,r,o,s="",a="",l=e.pos,u=!0;if(e.src.charCodeAt(e.pos)!==91)return!1;let c=e.pos,d=e.posMax,f=e.pos+1,p=e.md.helpers.parseLinkLabel(e,e.pos,!0);if(p<0)return!1;let h=p+1;if(h<d&&e.src.charCodeAt(h)===40){for(u=!1,h++;h<d&&(n=e.src.charCodeAt(h),!(!be(n)&&n!==10));h++);if(h>=d)return!1;if(l=h,r=e.md.helpers.parseLinkDestination(e.src,h,e.posMax),r.ok){for(s=e.md.normalizeLink(r.str),e.md.validateLink(s)?h=r.pos:s="",l=h;h<d&&(n=e.src.charCodeAt(h),!(!be(n)&&n!==10));h++);if(r=e.md.helpers.parseLinkTitle(e.src,h,e.posMax),h<d&&l!==h&&r.ok)for(a=r.str,h=r.pos;h<d&&(n=e.src.charCodeAt(h),!(!be(n)&&n!==10));h++);}(h>=d||e.src.charCodeAt(h)!==41)&&(u=!0),h++}if(u){if(typeof e.env.references>"u")return!1;if(h<d&&e.src.charCodeAt(h)===91?(l=h+1,h=e.md.helpers.parseLinkLabel(e,h),h>=0?i=e.src.slice(l,h++):h=p+1):h=p+1,i||(i=e.src.slice(f,p)),o=e.env.references[Ri(i)],!o)return e.pos=c,!1;s=o.href,a=o.title}if(!t){e.pos=f,e.posMax=p;let m=e.push("link_open","a",1),g=[["href",s]];m.attrs=g,a&&g.push(["title",a]),e.linkLevel++,e.md.inline.tokenize(e),e.linkLevel--,e.push("link_close","a",-1)}return e.pos=h,e.posMax=d,!0}function wv(e,t){let n,i,r,o,s,a,l,u,c="",d=e.pos,f=e.posMax;if(e.src.charCodeAt(e.pos)!==33||e.src.charCodeAt(e.pos+1)!==91)return!1;let p=e.pos+2,h=e.md.helpers.parseLinkLabel(e,e.pos+1,!1);if(h<0)return!1;if(o=h+1,o<f&&e.src.charCodeAt(o)===40){for(o++;o<f&&(n=e.src.charCodeAt(o),!(!be(n)&&n!==10));o++);if(o>=f)return!1;for(u=o,a=e.md.helpers.parseLinkDestination(e.src,o,e.posMax),a.ok&&(c=e.md.normalizeLink(a.str),e.md.validateLink(c)?o=a.pos:c=""),u=o;o<f&&(n=e.src.charCodeAt(o),!(!be(n)&&n!==10));o++);if(a=e.md.helpers.parseLinkTitle(e.src,o,e.posMax),o<f&&u!==o&&a.ok)for(l=a.str,o=a.pos;o<f&&(n=e.src.charCodeAt(o),!(!be(n)&&n!==10));o++);else l="";if(o>=f||e.src.charCodeAt(o)!==41)return e.pos=d,!1;o++}else{if(typeof e.env.references>"u")return!1;if(o<f&&e.src.charCodeAt(o)===91?(u=o+1,o=e.md.helpers.parseLinkLabel(e,o),o>=0?r=e.src.slice(u,o++):o=h+1):o=h+1,r||(r=e.src.slice(p,h)),s=e.env.references[Ri(r)],!s)return e.pos=d,!1;c=s.href,l=s.title}if(!t){i=e.src.slice(p,h);let m=[];e.md.inline.parse(i,e.md,e.env,m);let g=e.push("image","img",0),b=[["src",c],["alt",""]];g.attrs=b,g.children=m,g.content=i,l&&b.push(["title",l])}return e.pos=o,e.posMax=f,!0}var yW=/^([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])?)*)$/,kW=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function Sv(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==60)return!1;let i=e.pos,r=e.posMax;for(;;){if(++n>=r)return!1;let s=e.src.charCodeAt(n);if(s===60)return!1;if(s===62)break}let o=e.src.slice(i+1,n);if(kW.test(o)){let s=e.md.normalizeLink(o);if(!e.md.validateLink(s))return!1;if(!t){let a=e.push("link_open","a",1);a.attrs=[["href",s]],a.markup="autolink",a.info="auto";let l=e.push("text","",0);l.content=e.md.normalizeLinkText(o);let u=e.push("link_close","a",-1);u.markup="autolink",u.info="auto"}return e.pos+=o.length+2,!0}if(yW.test(o)){let s=e.md.normalizeLink("mailto:"+o);if(!e.md.validateLink(s))return!1;if(!t){let a=e.push("link_open","a",1);a.attrs=[["href",s]],a.markup="autolink",a.info="auto";let l=e.push("text","",0);l.content=e.md.normalizeLinkText(o);let u=e.push("link_close","a",-1);u.markup="autolink",u.info="auto"}return e.pos+=o.length+2,!0}return!1}function xW(e){return/^<a[>\s]/i.test(e)}function _W(e){return/^<\/a\s*>/i.test(e)}function wW(e){let t=e|32;return t>=97&&t<=122}function Ev(e,t){if(!e.md.options.html)return!1;let n=e.posMax,i=e.pos;if(e.src.charCodeAt(i)!==60||i+2>=n)return!1;let r=e.src.charCodeAt(i+1);if(r!==33&&r!==63&&r!==47&&!wW(r))return!1;let o=e.src.slice(i).match(e4);if(!o)return!1;if(!t){let s=e.push("html_inline","",0);s.content=o[0],xW(s.content)&&e.linkLevel++,_W(s.content)&&e.linkLevel--}return e.pos+=o[0].length,!0}var SW=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,EW=/^&([a-z][a-z0-9]{1,31});/i;function $v(e,t){let n=e.pos,i=e.posMax;if(e.src.charCodeAt(n)!==38||n+1>=i)return!1;if(e.src.charCodeAt(n+1)===35){let o=e.src.slice(n).match(SW);if(o){if(!t){let s=o[1][0].toLowerCase()==="x"?parseInt(o[1].slice(1),16):parseInt(o[1],10),a=e.push("text_special","",0);a.content=hf(s)?Jo(s):Jo(65533),a.markup=o[0],a.info="entity"}return e.pos+=o[0].length,!0}}else{let o=e.src.slice(n).match(EW);if(o){let s=rl(o[0]);if(s!==o[0]){if(!t){let a=e.push("text_special","",0);a.content=s,a.markup=o[0],a.info="entity"}return e.pos+=o[0].length,!0}}}return!1}function s4(e){let t={},n=e.length;if(!n)return;let i=0,r=-2,o=[];for(let s=0;s<n;s++){let a=e[s];if(o.push(0),(e[i].marker!==a.marker||r!==a.token-1)&&(i=s),r=a.token,a.length=a.length||0,!a.close)continue;t.hasOwnProperty(a.marker)||(t[a.marker]=[-1,-1,-1,-1,-1,-1]);let l=t[a.marker][(a.open?3:0)+a.length%3],u=i-o[i]-1,c=u;for(;u>l;u-=o[u]+1){let d=e[u];if(d.marker===a.marker&&d.open&&d.end<0){let f=!1;if((d.close||a.open)&&(d.length+a.length)%3===0&&(d.length%3!==0||a.length%3!==0)&&(f=!0),!f){let p=u>0&&!e[u-1].open?o[u-1]+1:0;o[s]=s-u+p,o[u]=p,a.open=!1,d.end=s,d.close=!1,c=-1,r=-2;break}}}c!==-1&&(t[a.marker][(a.open?3:0)+(a.length||0)%3]=c)}}function Cv(e){let t=e.tokens_meta,n=e.tokens_meta.length;s4(e.delimiters);for(let i=0;i<n;i++)t[i]&&t[i].delimiters&&s4(t[i].delimiters)}function Tv(e){let t,n,i=0,r=e.tokens,o=e.tokens.length;for(t=n=0;t<o;t++)r[t].nesting<0&&i--,r[t].level=i,r[t].nesting>0&&i++,r[t].type==="text"&&t+1<o&&r[t+1].type==="text"?r[t+1].content=r[t].content+r[t+1].content:(t!==n&&(r[n]=r[t]),n++);t!==n&&(r.length=n)}var Iv=[["text",hv],["linkify",mv],["newline",gv],["escape",vv],["backticks",yv],["strikethrough",kv.tokenize],["emphasis",xv.tokenize],["link",_v],["image",wv],["autolink",Sv],["html_inline",Ev],["entity",$v]],Av=[["balance_pairs",Cv],["strikethrough",kv.postProcess],["emphasis",xv.postProcess],["fragments_join",Tv]];function ol(){this.ruler=new Li;for(let e=0;e<Iv.length;e++)this.ruler.push(Iv[e][0],Iv[e][1]);this.ruler2=new Li;for(let e=0;e<Av.length;e++)this.ruler2.push(Av[e][0],Av[e][1])}ol.prototype.skipToken=function(e){let t=e.pos,n=this.ruler.getRules(""),i=n.length,r=e.md.options.maxNesting,o=e.cache;if(typeof o[t]<"u"){e.pos=o[t];return}let s=!1;if(e.level<r){for(let a=0;a<i;a++)if(e.level++,s=n[a](e,!0),e.level--,s){if(t>=e.pos)throw new Error("inline rule didn't increment state.pos");break}}else e.pos=e.posMax;s||e.pos++,o[t]=e.pos};ol.prototype.tokenize=function(e){let t=this.ruler.getRules(""),n=t.length,i=e.posMax,r=e.md.options.maxNesting;for(;e.pos<i;){let o=e.pos,s=!1;if(e.level<r){for(let a=0;a<n;a++)if(s=t[a](e,!1),s){if(o>=e.pos)throw new Error("inline rule didn't increment state.pos");break}}if(s){if(e.pos>=i)break;continue}e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()};ol.prototype.parse=function(e,t,n,i){let r=new this.State(e,t,n,i);this.tokenize(r);let o=this.ruler2.getRules(""),s=o.length;for(let a=0;a<s;a++)o[a](r)};ol.prototype.State=r4;var a4=ol;function l4(e){let t={};e=e||{},t.src_Any=af.source,t.src_Cc=lf.source,t.src_Z=cf.source,t.src_P=Wo.source,t.src_ZPCc=[t.src_Z,t.src_P,t.src_Cc].join("|"),t.src_ZCc=[t.src_Z,t.src_Cc].join("|");let n="[><\uFF5C]";return t.src_pseudo_letter=`(?:(?!${n}|${t.src_ZPCc})${t.src_Any})`,t.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",t.src_auth=`(?:(?:(?!${t.src_ZCc}|[@/\\[\\]()]).){1,50}@)?`,t.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",t.src_host_terminator=`(?=$|${n}|${t.src_ZPCc})(?!${e["---"]?"-(?!--)|":"-|"}_|:\\d|\\.-|\\.(?!$|${t.src_ZPCc}))`,t.src_path=`(?:[/?#](?:(?!${t.src_ZCc}|${n}|[()[\\]{}.,"'?!\\-;]).|\\[(?:(?!${t.src_ZCc}|\\]).)*\\]|\\((?:(?!${t.src_ZCc}|[)]).)*\\)|\\{(?:(?!${t.src_ZCc}|[}]).)*\\}|\\"(?:(?!${t.src_ZCc}|["]).)+\\"|\\'(?:(?!${t.src_ZCc}|[']).)+\\'|\\'(?=${t.src_pseudo_letter}|[-])|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!${t.src_ZCc}|[.]|$)|`+(e["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+`,(?!${t.src_ZCc}|$)|;(?!${t.src_ZCc}|$)|\\!+(?!${t.src_ZCc}|[!]|$)|\\?(?!${t.src_ZCc}|[?]|$))+|\\/)?`,t.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]{0,63}',t.src_xn="xn--[a-z0-9\\-]{1,59}",t.src_domain_root="(?:"+t.src_xn+`|${t.src_pseudo_letter}{1,63})`,t.src_domain="(?:"+t.src_xn+`|(?:${t.src_pseudo_letter})|(?:${t.src_pseudo_letter}(?:-|${t.src_pseudo_letter}){0,61}${t.src_pseudo_letter}))`,t.src_host=`(?:(?:(?:(?:${t.src_domain})\\.)*${t.src_domain}))`,t.tpl_host_fuzzy="(?:"+t.src_ip4+`|(?:(?:(?:${t.src_domain})\\.)+(?:%TLDS%)))`,t.tpl_host_no_ip_fuzzy=`(?:(?:(?:${t.src_domain})\\.)+(?:%TLDS%))`,t.src_host_strict=t.src_host+t.src_host_terminator,t.tpl_host_fuzzy_strict=t.tpl_host_fuzzy+t.src_host_terminator,t.src_host_port_strict=t.src_host+t.src_port+t.src_host_terminator,t.tpl_host_port_fuzzy_strict=t.tpl_host_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_port_no_ip_fuzzy_strict=t.tpl_host_no_ip_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_fuzzy_test=`localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:${t.src_ZPCc}|>|$))`,t.tpl_email_fuzzy=`(^|${n}|"|\\(|${t.src_ZCc})(${t.src_email_name}@${t.tpl_host_fuzzy_strict})`,t.tpl_link_fuzzy=`(^|(?![.:/\\-_@])(?:[$+<=>^\`|\uFF5C]|${t.src_ZPCc}))((?![$+<=>^\`|\uFF5C])${t.tpl_host_port_fuzzy_strict}${t.src_path})`,t.tpl_link_no_ip_fuzzy=`(^|(?![.:/\\-_@])(?:[$+<=>^\`|\uFF5C]|${t.src_ZPCc}))((?![$+<=>^\`|\uFF5C])${t.tpl_host_port_no_ip_fuzzy_strict}${t.src_path})`,t}function Mv(e){return Array.prototype.slice.call(arguments,1).forEach(function(n){n&&Object.keys(n).forEach(function(i){e[i]=n[i]})}),e}function yf(e){return Object.prototype.toString.call(e)}function $W(e){return yf(e)==="[object String]"}function CW(e){return yf(e)==="[object Object]"}function TW(e){return yf(e)==="[object RegExp]"}function u4(e){return yf(e)==="[object Function]"}function IW(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}var d4={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function AW(e){return Object.keys(e||{}).reduce(function(t,n){return t||d4.hasOwnProperty(n)},!1)}var MW={"http:":{validate:function(e,t,n){let i=e.slice(t);return n.re.http||(n.re.http=new RegExp(`^\\/\\/${n.re.src_auth}${n.re.src_host_port_strict}${n.re.src_path}`,"i")),n.re.http.test(i)?i.match(n.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,n){let i=e.slice(t);return n.re.no_http||(n.re.no_http=new RegExp("^"+n.re.src_auth+`(?:localhost|(?:(?:${n.re.src_domain})\\.)+${n.re.src_domain_root})`+n.re.src_port+n.re.src_host_terminator+n.re.src_path,"i")),n.re.no_http.test(i)?t>=3&&e[t-3]===":"||t>=3&&e[t-3]==="/"?0:i.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,n){let i=e.slice(t);return n.re.mailto||(n.re.mailto=new RegExp(`^${n.re.src_email_name}@${n.re.src_host_strict}`,"i")),n.re.mailto.test(i)?i.match(n.re.mailto)[0].length:0}}},zW="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",DW="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|\u0440\u0444".split("|");function NW(e){return function(t,n){let i=t.slice(n);return e.test(i)?i.match(e)[0].length:0}}function c4(){return function(e,t){t.normalize(e)}}function vf(e){let t=e.re=l4(e.__opts__),n=e.__tlds__.slice();e.onCompile(),e.__tlds_replaced__||n.push(zW),n.push(t.src_xn),t.src_tlds=n.join("|");function i(a){return a.replace("%TLDS%",t.src_tlds)}t.email_fuzzy=RegExp(i(t.tpl_email_fuzzy),"i"),t.email_fuzzy_global=RegExp(i(t.tpl_email_fuzzy),"ig"),t.link_fuzzy=RegExp(i(t.tpl_link_fuzzy),"i"),t.link_fuzzy_global=RegExp(i(t.tpl_link_fuzzy),"ig"),t.link_no_ip_fuzzy=RegExp(i(t.tpl_link_no_ip_fuzzy),"i"),t.link_no_ip_fuzzy_global=RegExp(i(t.tpl_link_no_ip_fuzzy),"ig"),t.host_fuzzy_test=RegExp(i(t.tpl_host_fuzzy_test),"i");let r=[];e.__compiled__={};function o(a,l){throw new Error(`(LinkifyIt) Invalid schema "${a}": ${l}`)}Object.keys(e.__schemas__).forEach(function(a){let l=e.__schemas__[a];if(l===null)return;let u={validate:null,link:null};if(e.__compiled__[a]=u,CW(l)){TW(l.validate)?u.validate=NW(l.validate):u4(l.validate)?u.validate=l.validate:o(a,l),u4(l.normalize)?u.normalize=l.normalize:l.normalize?o(a,l):u.normalize=c4();return}if($W(l)){r.push(a);return}o(a,l)}),r.forEach(function(a){e.__compiled__[e.__schemas__[a]]&&(e.__compiled__[a].validate=e.__compiled__[e.__schemas__[a]].validate,e.__compiled__[a].normalize=e.__compiled__[e.__schemas__[a]].normalize)}),e.__compiled__[""]={validate:null,normalize:c4()};let s=Object.keys(e.__compiled__).filter(function(a){return a.length>0&&e.__compiled__[a]}).map(IW).join("|");e.re.schema_test=RegExp(`(^|(?!_)(?:[><\uFF5C]|${t.src_ZPCc}))(${s})`,"i"),e.re.schema_search=RegExp(`(^|(?!_)(?:[><\uFF5C]|${t.src_ZPCc}))(${s})`,"ig"),e.re.schema_at_start=RegExp(`^${e.re.schema_search.source}`,"i"),e.re.pretest=RegExp(`(${e.re.schema_test.source})|(${e.re.host_fuzzy_test.source})|@`,"i")}function f4(e,t,n,i){let r=e.slice(n,i);this.schema=t.toLowerCase(),this.index=n,this.lastIndex=i,this.raw=r,this.text=r,this.url=r}function nn(e,t){if(!(this instanceof nn))return new nn(e,t);t||AW(e)&&(t=e,e={}),this.__opts__=Mv({},d4,t),this.__schemas__=Mv({},MW,e),this.__compiled__={},this.__tlds__=DW,this.__tlds_replaced__=!1,this.re={},vf(this)}nn.prototype.add=function(t,n){return this.__schemas__[t]=n,vf(this),this};nn.prototype.set=function(t){return this.__opts__=Mv(this.__opts__,t),this};nn.prototype.test=function(t){if(!t.length)return!1;let n,i;if(this.re.schema_test.test(t)){for(i=this.re.schema_search,i.lastIndex=0;(n=i.exec(t))!==null;)if(this.testSchemaAt(t,n[2],i.lastIndex))return!0}return!!(this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&t.search(this.re.host_fuzzy_test)>=0&&t.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy)!==null||this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&t.indexOf("@")>=0&&t.match(this.re.email_fuzzy)!==null)};nn.prototype.pretest=function(t){return this.re.pretest.test(t)};nn.prototype.testSchemaAt=function(t,n,i){return this.__compiled__[n.toLowerCase()]?this.__compiled__[n.toLowerCase()].validate(t,i,this):0};nn.prototype.match=function(t){let n=[],i=[],r=[],o=[],s,a,l;function u(f,p){return f?p?f.index!==p.index?f.index<p.index?f:p:f.lastIndex>=p.lastIndex?f:p:f:p}if(!t.length)return null;if(this.re.schema_test.test(t))for(l=this.re.schema_search,l.lastIndex=0;(s=l.exec(t))!==null;)a=this.testSchemaAt(t,s[2],l.lastIndex),a&&i.push({schema:s[2],index:s.index+s[1].length,lastIndex:s.index+s[0].length+a});if(this.__opts__.fuzzyLink&&this.__compiled__["http:"])for(l=this.__opts__.fuzzyIP?this.re.link_fuzzy_global:this.re.link_no_ip_fuzzy_global,l.lastIndex=0;(s=l.exec(t))!==null;)r.push({schema:"",index:s.index+s[1].length,lastIndex:s.index+s[0].length});if(this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"])for(l=this.re.email_fuzzy_global,l.lastIndex=0;(s=l.exec(t))!==null;)o.push({schema:"mailto:",index:s.index+s[1].length,lastIndex:s.index+s[0].length});let c=[0,0,0],d=0;for(;;){let f=[i[c[0]],o[c[1]],r[c[2]]],p=u(u(f[0],f[1]),f[2]);if(!p)break;if(p===f[0]?c[0]++:p===f[1]?c[1]++:c[2]++,p.index<d)continue;let h=new f4(t,p.schema,p.index,p.lastIndex);this.__compiled__[h.schema].normalize(h,this),n.push(h),d=p.lastIndex}return n.length?n:null};nn.prototype.matchAtStart=function(t){if(!t.length)return null;let n=this.re.schema_at_start.exec(t);if(!n)return null;let i=this.testSchemaAt(t,n[2],n[0].length);if(!i)return null;let r=new f4(t,n[2],n.index+n[1].length,n.index+n[0].length+i);return this.__compiled__[r.schema].normalize(r,this),r};nn.prototype.tlds=function(t,n){return t=Array.isArray(t)?t:[t],n?(this.__tlds__=this.__tlds__.concat(t).sort().filter(function(i,r,o){return i!==o[r-1]}).reverse(),vf(this),this):(this.__tlds__=t.slice(),this.__tlds_replaced__=!0,vf(this),this)};nn.prototype.normalize=function(t){t.schema||(t.url=`http://${t.url}`),t.schema==="mailto:"&&!/^mailto:/i.test(t.url)&&(t.url=`mailto:${t.url}`)};nn.prototype.onCompile=function(){};var p4=nn;var OW=/^xn--/,RW=/[^\0-\x7F]/,PW=/[\x2E\u3002\uFF0E\uFF61]/g,LW={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},zv=35,Kn=Math.floor,Dv=String.fromCharCode;function Vr(e){throw new RangeError(LW[e])}function FW(e,t){let n=[],i=e.length;for(;i--;)n[i]=t(e[i]);return n}function m4(e,t){let n=e.split("@"),i="";n.length>1&&(i=n[0]+"@",e=n[1]),e=e.replace(PW,".");let r=e.split("."),o=FW(r,t).join(".");return i+o}function g4(e){let t=[],n=0,i=e.length;for(;n<i;){let r=e.charCodeAt(n++);if(r>=55296&&r<=56319&&n<i){let o=e.charCodeAt(n++);(o&64512)==56320?t.push(((r&1023)<<10)+(o&1023)+65536):(t.push(r),n--)}else t.push(r)}return t}var BW=e=>String.fromCodePoint(...e),UW=function(e){return e>=48&&e<58?26+(e-48):e>=65&&e<91?e-65:e>=97&&e<123?e-97:36},h4=function(e,t){return e+22+75*(e<26)-((t!=0)<<5)},b4=function(e,t,n){let i=0;for(e=n?Kn(e/700):e>>1,e+=Kn(e/t);e>zv*26>>1;i+=36)e=Kn(e/zv);return Kn(i+(zv+1)*e/(e+38))},v4=function(e){let t=[],n=e.length,i=0,r=128,o=72,s=e.lastIndexOf("-");s<0&&(s=0);for(let a=0;a<s;++a)e.charCodeAt(a)>=128&&Vr("not-basic"),t.push(e.charCodeAt(a));for(let a=s>0?s+1:0;a<n;){let l=i;for(let c=1,d=36;;d+=36){a>=n&&Vr("invalid-input");let f=UW(e.charCodeAt(a++));f>=36&&Vr("invalid-input"),f>Kn((2147483647-i)/c)&&Vr("overflow"),i+=f*c;let p=d<=o?1:d>=o+26?26:d-o;if(f<p)break;let h=36-p;c>Kn(2147483647/h)&&Vr("overflow"),c*=h}let u=t.length+1;o=b4(i-l,u,l==0),Kn(i/u)>2147483647-r&&Vr("overflow"),r+=Kn(i/u),i%=u,t.splice(i++,0,r)}return String.fromCodePoint(...t)},y4=function(e){let t=[];e=g4(e);let n=e.length,i=128,r=0,o=72;for(let l of e)l<128&&t.push(Dv(l));let s=t.length,a=s;for(s&&t.push("-");a<n;){let l=2147483647;for(let c of e)c>=i&&c<l&&(l=c);let u=a+1;l-i>Kn((2147483647-r)/u)&&Vr("overflow"),r+=(l-i)*u,i=l;for(let c of e)if(c<i&&++r>2147483647&&Vr("overflow"),c===i){let d=r;for(let f=36;;f+=36){let p=f<=o?1:f>=o+26?26:f-o;if(d<p)break;let h=d-p,m=36-p;t.push(Dv(h4(p+h%m,0))),d=Kn(h/m)}t.push(Dv(h4(d,0))),o=b4(r,u,a===s),r=0,++a}++r,++i}return t.join("")},jW=function(e){return m4(e,function(t){return OW.test(t)?v4(t.slice(4).toLowerCase()):t})},ZW=function(e){return m4(e,function(t){return RW.test(t)?"xn--"+y4(t):t})},HW={version:"2.3.1",ucs2:{decode:g4,encode:BW},decode:v4,encode:y4,toASCII:ZW,toUnicode:jW};var Nv=HW;var k4={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"\u201C\u201D\u2018\u2019",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}};var x4={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"\u201C\u201D\u2018\u2019",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","fragments_join"]}}};var _4={options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"\u201C\u201D\u2018\u2019",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","fragments_join"]}}};var qW={default:k4,zero:x4,commonmark:_4},WW=/^(vbscript|javascript|file|data):/,VW=/^data:image\/(gif|png|jpeg|webp);/;function KW(e){let t=e.trim().toLowerCase();return WW.test(t)?VW.test(t):!0}var w4=["http:","https:","mailto:"];function JW(e){let t=nl(e,!0);if(t.hostname&&(!t.protocol||w4.indexOf(t.protocol)>=0))try{t.hostname=Nv.toASCII(t.hostname)}catch{}return rf(qo(t))}function GW(e){let t=nl(e,!0);if(t.hostname&&(!t.protocol||w4.indexOf(t.protocol)>=0))try{t.hostname=Nv.toUnicode(t.hostname)}catch{}return tl(qo(t),tl.defaultChars+"%")}function xn(e,t){if(!(this instanceof xn))return new xn(e,t);t||pf(e)||(t=e||{},e="default"),this.inline=new a4,this.block=new n4,this.core=new Wz,this.renderer=new Fz,this.linkify=new p4,this.validateLink=KW,this.normalizeLink=JW,this.normalizeLinkText=GW,this.utils=jb,this.helpers=Ko({},Wb),this.options={},this.configure(e),t&&this.set(t)}xn.prototype.set=function(e){return Ko(this.options,e),this};xn.prototype.configure=function(e){let t=this;if(pf(e)){let n=e;if(e=qW[n],!e)throw new Error('Wrong `markdown-it` preset "'+n+'", check name')}if(!e)throw new Error("Wrong `markdown-it` preset, can't be empty");return e.options&&t.set(e.options),e.components&&Object.keys(e.components).forEach(function(n){e.components[n].rules&&t[n].ruler.enableOnly(e.components[n].rules),e.components[n].rules2&&t[n].ruler2.enableOnly(e.components[n].rules2)}),this};xn.prototype.enable=function(e,t){let n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(r){n=n.concat(this[r].ruler.enable(e,!0))},this),n=n.concat(this.inline.ruler2.enable(e,!0));let i=e.filter(function(r){return n.indexOf(r)<0});if(i.length&&!t)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+i);return this};xn.prototype.disable=function(e,t){let n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(r){n=n.concat(this[r].ruler.disable(e,!0))},this),n=n.concat(this.inline.ruler2.disable(e,!0));let i=e.filter(function(r){return n.indexOf(r)<0});if(i.length&&!t)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+i);return this};xn.prototype.use=function(e){let t=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,t),this};xn.prototype.parse=function(e,t){if(typeof e!="string")throw new Error("Input data should be a String");let n=new this.core.State(e,this,t);return this.core.process(n),n.tokens};xn.prototype.render=function(e,t){return t=t||{},this.renderer.render(this.parse(e,t),this.options,t)};xn.prototype.parseInline=function(e,t){let n=new this.core.State(e,this,t);return n.inlineMode=!0,this.core.process(n),n.tokens};xn.prototype.renderInline=function(e,t){return t=t||{},this.renderer.render(this.parseInline(e,t),this.options,t)};var Kr=xn;var XW=new hi({nodes:{doc:{content:"block+"},paragraph:{content:"inline*",group:"block",parseDOM:[{tag:"p"}],toDOM(){return["p",0]}},blockquote:{content:"block+",group:"block",parseDOM:[{tag:"blockquote"}],toDOM(){return["blockquote",0]}},horizontal_rule:{group:"block",parseDOM:[{tag:"hr"}],toDOM(){return["div",["hr"]]}},heading:{attrs:{level:{default:1}},content:"(text | image)*",group:"block",defining:!0,parseDOM:[{tag:"h1",attrs:{level:1}},{tag:"h2",attrs:{level:2}},{tag:"h3",attrs:{level:3}},{tag:"h4",attrs:{level:4}},{tag:"h5",attrs:{level:5}},{tag:"h6",attrs:{level:6}}],toDOM(e){return["h"+e.attrs.level,0]}},code_block:{content:"text*",group:"block",code:!0,defining:!0,marks:"",attrs:{params:{default:""}},parseDOM:[{tag:"pre",preserveWhitespace:"full",getAttrs:e=>({params:e.getAttribute("data-params")||""})}],toDOM(e){return["pre",e.attrs.params?{"data-params":e.attrs.params}:{},["code",0]]}},ordered_list:{content:"list_item+",group:"block",attrs:{order:{default:1},tight:{default:!1}},parseDOM:[{tag:"ol",getAttrs(e){return{order:e.hasAttribute("start")?+e.getAttribute("start"):1,tight:e.hasAttribute("data-tight")}}}],toDOM(e){return["ol",{start:e.attrs.order==1?null:e.attrs.order,"data-tight":e.attrs.tight?"true":null},0]}},bullet_list:{content:"list_item+",group:"block",attrs:{tight:{default:!1}},parseDOM:[{tag:"ul",getAttrs:e=>({tight:e.hasAttribute("data-tight")})}],toDOM(e){return["ul",{"data-tight":e.attrs.tight?"true":null},0]}},list_item:{content:"block+",defining:!0,parseDOM:[{tag:"li"}],toDOM(){return["li",0]}},text:{group:"inline"},image:{inline:!0,attrs:{src:{},alt:{default:null},title:{default:null}},group:"inline",draggable:!0,parseDOM:[{tag:"img[src]",getAttrs(e){return{src:e.getAttribute("src"),title:e.getAttribute("title"),alt:e.getAttribute("alt")}}}],toDOM(e){return["img",e.attrs]}},hard_break:{inline:!0,group:"inline",selectable:!1,parseDOM:[{tag:"br"}],toDOM(){return["br"]}}},marks:{em:{parseDOM:[{tag:"i"},{tag:"em"},{style:"font-style=italic"},{style:"font-style=normal",clearMark:e=>e.type.name=="em"}],toDOM(){return["em"]}},strong:{parseDOM:[{tag:"strong"},{tag:"b",getAttrs:e=>e.style.fontWeight!="normal"&&null},{style:"font-weight=400",clearMark:e=>e.type.name=="strong"},{style:"font-weight",getAttrs:e=>/^(bold(er)?|[5-9]\d{2,})$/.test(e)&&null}],toDOM(){return["strong"]}},link:{attrs:{href:{},title:{default:null}},inclusive:!1,parseDOM:[{tag:"a[href]",getAttrs(e){return{href:e.getAttribute("href"),title:e.getAttribute("title")}}}],toDOM(e){return["a",e.attrs]}},code:{code:!0,parseDOM:[{tag:"code"}],toDOM(){return["code"]}}}});function YW(e,t){if(e.isText&&t.isText&&ye.sameSet(e.marks,t.marks))return e.withText(e.text+t.text)}var Pv=class{constructor(t,n){this.schema=t,this.tokenHandlers=n,this.stack=[{type:t.topNodeType,attrs:null,content:[],marks:ye.none}]}top(){return this.stack[this.stack.length-1]}push(t){this.stack.length&&this.top().content.push(t)}addText(t){if(!t)return;let n=this.top(),i=n.content,r=i[i.length-1],o=this.schema.text(t,n.marks),s;r&&(s=YW(r,o))?i[i.length-1]=s:i.push(o)}openMark(t){let n=this.top();n.marks=t.addToSet(n.marks)}closeMark(t){let n=this.top();n.marks=t.removeFromSet(n.marks)}parseTokens(t){for(let n=0;n<t.length;n++){let i=t[n],r=this.tokenHandlers[i.type];if(!r)throw new Error("Token type `"+i.type+"` not supported by Markdown parser");r(this,i,t,n)}}addNode(t,n,i){let r=this.top(),o=t.createAndFill(n,i,r?r.marks:[]);return o?(this.push(o),o):null}openNode(t,n){this.stack.push({type:t,attrs:n,content:[],marks:ye.none})}closeNode(){let t=this.stack.pop();return this.addNode(t.type,t.attrs,t.content)}};function sl(e,t,n,i){return e.getAttrs?e.getAttrs(t,n,i):e.attrs instanceof Function?e.attrs(t):e.attrs}function Ov(e,t){return e.noCloseToken||t=="code_inline"||t=="code_block"||t=="fence"}function S4(e){return e[e.length-1]==`
259
+ `?e.slice(0,e.length-1):e}function Rv(){}function QW(e,t){let n=Object.create(null);for(let i in t){let r=t[i];if(r.block){let o=e.nodeType(r.block);Ov(r,i)?n[i]=(s,a,l,u)=>{s.openNode(o,sl(r,a,l,u)),s.addText(S4(a.content)),s.closeNode()}:(n[i+"_open"]=(s,a,l,u)=>s.openNode(o,sl(r,a,l,u)),n[i+"_close"]=s=>s.closeNode())}else if(r.node){let o=e.nodeType(r.node);n[i]=(s,a,l,u)=>s.addNode(o,sl(r,a,l,u))}else if(r.mark){let o=e.marks[r.mark];Ov(r,i)?n[i]=(s,a,l,u)=>{s.openMark(o.create(sl(r,a,l,u))),s.addText(S4(a.content)),s.closeMark(o)}:(n[i+"_open"]=(s,a,l,u)=>s.openMark(o.create(sl(r,a,l,u))),n[i+"_close"]=s=>s.closeMark(o))}else if(r.ignore)Ov(r,i)?n[i]=Rv:(n[i+"_open"]=Rv,n[i+"_close"]=Rv);else throw new RangeError("Unrecognized parsing spec "+JSON.stringify(r))}return n.text=(i,r)=>i.addText(r.content),n.inline=(i,r)=>i.parseTokens(r.children),n.softbreak=n.softbreak||(i=>i.addText(" ")),n}var Lv=class{constructor(t,n,i){this.schema=t,this.tokenizer=n,this.tokens=i,this.tokenHandlers=QW(t,i)}parse(t,n={}){let i=new Pv(this.schema,this.tokenHandlers),r;i.parseTokens(this.tokenizer.parse(t,n));do r=i.closeNode();while(i.stack.length);return r||this.schema.topNodeType.createAndFill()}};function E4(e,t){for(;++t<e.length;)if(e[t].type!="list_item_open")return e[t].hidden;return!1}var Fle=new Lv(XW,Kr("commonmark",{html:!1}),{blockquote:{block:"blockquote"},paragraph:{block:"paragraph"},list_item:{block:"list_item"},bullet_list:{block:"bullet_list",getAttrs:(e,t,n)=>({tight:E4(t,n)})},ordered_list:{block:"ordered_list",getAttrs:(e,t,n)=>({order:+e.attrGet("start")||1,tight:E4(t,n)})},heading:{block:"heading",getAttrs:e=>({level:+e.tag.slice(1)})},code_block:{block:"code_block",noCloseToken:!0},fence:{block:"code_block",getAttrs:e=>({params:e.info||""}),noCloseToken:!0},hr:{node:"horizontal_rule"},image:{node:"image",getAttrs:e=>({src:e.attrGet("src"),title:e.attrGet("title")||null,alt:e.children[0]&&e.children[0].content||null})},hardbreak:{node:"hard_break"},em:{mark:"em"},strong:{mark:"strong"},link:{mark:"link",getAttrs:e=>({href:e.attrGet("href"),title:e.attrGet("title")||null})},code_inline:{mark:"code",noCloseToken:!0}}),eV={open:"",close:"",mixable:!0},Fv=class{constructor(t,n,i={}){this.nodes=t,this.marks=n,this.options=i}serialize(t,n={}){n=Object.assign({},this.options,n);let i=new al(this.nodes,this.marks,n);return i.renderContent(t),i.out}},zn=new Fv({blockquote(e,t){e.wrapBlock("> ",null,t,()=>e.renderContent(t))},code_block(e,t){let n=t.textContent.match(/`{3,}/gm),i=n?n.sort().slice(-1)[0]+"`":"```";e.write(i+(t.attrs.params||"")+`
260
+ `),e.text(t.textContent,!1),e.write(`
261
+ `),e.write(i),e.closeBlock(t)},heading(e,t){e.write(e.repeat("#",t.attrs.level)+" "),e.renderInline(t,!1),e.closeBlock(t)},horizontal_rule(e,t){e.write(t.attrs.markup||"---"),e.closeBlock(t)},bullet_list(e,t){e.renderList(t," ",()=>(t.attrs.bullet||"*")+" ")},ordered_list(e,t){let n=t.attrs.order||1,i=String(n+t.childCount-1).length,r=e.repeat(" ",i+2);e.renderList(t,r,o=>{let s=String(n+o);return e.repeat(" ",i-s.length)+s+". "})},list_item(e,t){e.renderContent(t)},paragraph(e,t){e.renderInline(t),e.closeBlock(t)},image(e,t){e.write("!["+e.esc(t.attrs.alt||"")+"]("+t.attrs.src.replace(/[\(\)]/g,"\\$&")+(t.attrs.title?' "'+t.attrs.title.replace(/"/g,'\\"')+'"':"")+")")},hard_break(e,t,n,i){for(let r=i+1;r<n.childCount;r++)if(n.child(r).type!=t.type){e.write(`\\
262
+ `);return}},text(e,t){e.text(t.text,!e.inAutolink)}},{em:{open:"*",close:"*",mixable:!0,expelEnclosingWhitespace:!0},strong:{open:"**",close:"**",mixable:!0,expelEnclosingWhitespace:!0},link:{open(e,t,n,i){return e.inAutolink=tV(t,n,i),e.inAutolink?"<":"["},close(e,t,n,i){let{inAutolink:r}=e;return e.inAutolink=void 0,r?">":"]("+t.attrs.href.replace(/[\(\)"]/g,"\\$&")+(t.attrs.title?` "${t.attrs.title.replace(/"/g,'\\"')}"`:"")+")"},mixable:!0},code:{open(e,t,n,i){return $4(n.child(i),-1)},close(e,t,n,i){return $4(n.child(i-1),1)},escape:!1}});function $4(e,t){let n=/`+/g,i,r=0;if(e.isText)for(;i=n.exec(e.text);)r=Math.max(r,i[0].length);let o=r>0&&t>0?" `":"`";for(let s=0;s<r;s++)o+="`";return r>0&&t<0&&(o+=" "),o}function tV(e,t,n){if(e.attrs.title||!/^\w+:/.test(e.attrs.href))return!1;let i=t.child(n);return!i.isText||i.text!=e.attrs.href||i.marks[i.marks.length-1]!=e?!1:n==t.childCount-1||!e.isInSet(t.child(n+1).marks)}var al=class{constructor(t,n,i){this.nodes=t,this.marks=n,this.options=i,this.delim="",this.out="",this.closed=null,this.inAutolink=void 0,this.atBlockStart=!1,this.inTightList=!1,typeof this.options.tightLists>"u"&&(this.options.tightLists=!1),typeof this.options.hardBreakNodeName>"u"&&(this.options.hardBreakNodeName="hard_break")}flushClose(t=2){if(this.closed){if(this.atBlank()||(this.out+=`
263
+ `),t>1){let n=this.delim,i=/\s+$/.exec(n);i&&(n=n.slice(0,n.length-i[0].length));for(let r=1;r<t;r++)this.out+=n+`
264
+ `}this.closed=null}}getMark(t){let n=this.marks[t];if(!n){if(this.options.strict!==!1)throw new Error(`Mark type \`${t}\` not supported by Markdown renderer`);n=eV}return n}wrapBlock(t,n,i,r){let o=this.delim;this.write(n??t),this.delim+=t,r(),this.delim=o,this.closeBlock(i)}atBlank(){return/(^|\n)$/.test(this.out)}ensureNewLine(){this.atBlank()||(this.out+=`
265
+ `)}write(t){this.flushClose(),this.delim&&this.atBlank()&&(this.out+=this.delim),t&&(this.out+=t)}closeBlock(t){this.closed=t}text(t,n=!0){let i=t.split(`
266
+ `);for(let r=0;r<i.length;r++)this.write(),!n&&i[r][0]=="["&&/(^|[^\\])\!$/.test(this.out)&&(this.out=this.out.slice(0,this.out.length-1)+"\\!"),this.out+=n?this.esc(i[r],this.atBlockStart):i[r],r!=i.length-1&&(this.out+=`
267
+ `)}render(t,n,i){if(this.nodes[t.type.name])this.nodes[t.type.name](this,t,n,i);else{if(this.options.strict!==!1)throw new Error("Token type `"+t.type.name+"` not supported by Markdown renderer");t.type.isLeaf||(t.type.inlineContent?this.renderInline(t):this.renderContent(t),t.isBlock&&this.closeBlock(t))}}renderContent(t){t.forEach((n,i,r)=>this.render(n,t,r))}renderInline(t,n=!0){this.atBlockStart=n;let i=[],r="",o=(s,a,l)=>{let u=s?s.marks:[];s&&s.type.name===this.options.hardBreakNodeName&&(u=u.filter(m=>{if(l+1==t.childCount)return!1;let g=t.child(l+1);return m.isInSet(g.marks)&&(!g.isText||/\S/.test(g.text))}));let c=r;if(r="",s&&s.isText&&u.some(m=>{let g=this.getMark(m.type.name);return g&&g.expelEnclosingWhitespace&&!m.isInSet(i)})){let[m,g,b]=/^(\s*)(.*)$/m.exec(s.text);g&&(c+=g,s=b?s.withText(b):null,s||(u=i))}if(s&&s.isText&&u.some(m=>{let g=this.getMark(m.type.name);return g&&g.expelEnclosingWhitespace&&!this.isMarkAhead(t,l+1,m)})){let[m,g,b]=/^(.*?)(\s*)$/m.exec(s.text);b&&(r=b,s=g?s.withText(g):null,s||(u=i))}let d=u.length?u[u.length-1]:null,f=d&&this.getMark(d.type.name).escape===!1,p=u.length-(f?1:0);e:for(let m=0;m<p;m++){let g=u[m];if(!this.getMark(g.type.name).mixable)break;for(let b=0;b<i.length;b++){let v=i[b];if(!this.getMark(v.type.name).mixable)break;if(g.eq(v)){m>b?u=u.slice(0,b).concat(g).concat(u.slice(b,m)).concat(u.slice(m+1,p)):b>m&&(u=u.slice(0,m).concat(u.slice(m+1,b)).concat(g).concat(u.slice(b,p)));continue e}}}let h=0;for(;h<Math.min(i.length,p)&&u[h].eq(i[h]);)++h;for(;h<i.length;)this.text(this.markString(i.pop(),!1,t,l),!1);if(c&&this.text(c),s){for(;i.length<p;){let m=u[i.length];i.push(m),this.text(this.markString(m,!0,t,l),!1),this.atBlockStart=!1}f&&s.isText?this.text(this.markString(d,!0,t,l)+s.text+this.markString(d,!1,t,l+1),!1):this.render(s,t,l),this.atBlockStart=!1}s?.isText&&s.nodeSize>0&&(this.atBlockStart=!1)};t.forEach(o),o(null,0,t.childCount),this.atBlockStart=!1}renderList(t,n,i){this.closed&&this.closed.type==t.type?this.flushClose(3):this.inTightList&&this.flushClose(1);let r=typeof t.attrs.tight<"u"?t.attrs.tight:this.options.tightLists,o=this.inTightList;this.inTightList=r,t.forEach((s,a,l)=>{l&&r&&this.flushClose(1),this.wrapBlock(n,i(l),t,()=>this.render(s,t,l))}),this.inTightList=o}esc(t,n=!1){return t=t.replace(/[`*\\~\[\]_]/g,(i,r)=>i=="_"&&r>0&&r+1<t.length&&t[r-1].match(/\w/)&&t[r+1].match(/\w/)?i:"\\"+i),n&&(t=t.replace(/^(\+[ ]|[\-*>])/,"\\$&").replace(/^(\s*)(#{1,6})(\s|$)/,"$1\\$2$3").replace(/^(\s*\d+)\.\s/,"$1\\. ")),this.options.escapeExtraCharacters&&(t=t.replace(this.options.escapeExtraCharacters,"\\$&")),t}quote(t){let n=t.indexOf('"')==-1?'""':t.indexOf("'")==-1?"''":"()";return n[0]+t+n[1]}repeat(t,n){let i="";for(let r=0;r<n;r++)i+=t;return i}markString(t,n,i,r){let o=this.getMark(t.type.name),s=n?o.open:o.close;return typeof s=="string"?s:s(this,t,i,r)}getEnclosingWhitespace(t){return{leading:(t.match(/^(\s+)/)||[void 0])[0],trailing:(t.match(/(\s+)$/)||[void 0])[0]}}isMarkAhead(t,n,i){for(;;n++){if(n>=t.childCount)return!1;let r=t.child(n);if(r.type.name!=this.options.hardBreakNodeName)return i.isInSet(r.marks);n++}}};var O4=fy(M4(),1);var pV=Object.defineProperty,hV=(e,t,n)=>t in e?pV(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,kf=(e,t,n)=>(hV(e,typeof t!="symbol"?t+"":t,n),n),mV=Te.create({name:"markdownTightLists",addOptions:()=>({tight:!0,tightClass:"tight",listTypes:["bulletList","orderedList"]}),addGlobalAttributes(){return[{types:this.options.listTypes,attributes:{tight:{default:this.options.tight,parseHTML:e=>e.getAttribute("data-tight")==="true"||!e.querySelector("p"),renderHTML:e=>({class:e.tight?this.options.tightClass:null,"data-tight":e.tight?"true":null})}}}]},addCommands(){var e=this;return{toggleTight:function(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;return n=>{let{editor:i,commands:r}=n;function o(s){if(!i.isActive(s))return!1;let a=i.getAttributes(s);return r.updateAttributes(s,{tight:t??!(a!=null&&a.tight)})}return e.options.listTypes.some(s=>o(s))}}}}}),z4=Kr();function R4(e,t){return z4.inline.State.prototype.scanDelims.call({src:e,posMax:e.length}),new z4.inline.State(e,null,null,[]).scanDelims(t,!0)}function P4(e,t,n,i){let r=e.substring(0,n)+e.substring(n+t.length);return r=r.substring(0,n+i)+t+r.substring(n+i),r}function gV(e,t,n,i){let r=n,o=e;for(;r<i&&!R4(o,r).can_open;)o=P4(o,t,r,1),r++;return{text:o,from:r,to:i}}function bV(e,t,n,i){let r=i,o=e;for(;r>n&&!R4(o,r).can_close;)o=P4(o,t,r,-1),r--;return{text:o,from:n,to:r}}function vV(e,t,n,i){let r={text:e,from:n,to:i};return r=gV(r.text,t,r.from,r.to),r=bV(r.text,t,r.from,r.to),r.to-r.from<t.length+1&&(r.text=r.text.substring(0,r.from)+r.text.substring(r.to+t.length)),r.text}var jv=class extends al{constructor(t,n,i){super(t,n,i??{}),kf(this,"inTable",!1),this.inlines=[]}render(t,n,i){super.render(t,n,i);let r=this.inlines[this.inlines.length-1];if(r!=null&&r.start&&r!==null&&r!==void 0&&r.end){let{delimiter:o,start:s,end:a}=this.normalizeInline(r);this.out=vV(this.out,o,s,a),this.inlines.pop()}}markString(t,n,i,r){let o=this.marks[t.type.name];if(o.expelEnclosingWhitespace)if(n)this.inlines.push({start:this.out.length,delimiter:o.open});else{let s=this.inlines.pop();this.inlines.push({...s,end:this.out.length})}return super.markString(t,n,i,r)}normalizeInline(t){let{start:n,end:i}=t;for(;this.out.charAt(n).match(/\s/);)n++;return{...t,start:n}}},L4=ct.create({name:"markdownHTMLMark",addStorage(){return{markdown:{serialize:{open(e,t){var n,i;return this.editor.storage.markdown.options.html?(n=(i=D4(t))===null||i===void 0?void 0:i[0])!==null&&n!==void 0?n:"":(console.warn(`Tiptap Markdown: "${t.type.name}" mark is only available in html mode`),"")},close(e,t){var n,i;return this.editor.storage.markdown.options.html&&(n=(i=D4(t))===null||i===void 0?void 0:i[1])!==null&&n!==void 0?n:""}},parse:{}}}}});function D4(e){let t=e.type.schema,n=t.text(" ",[e]),r=Po(z.from(n),t).match(/^(<.*?>) (<\/.*?>)$/);return r?[r[1],r[2]]:null}function qv(e){let t=`<body>${e}</body>`;return new window.DOMParser().parseFromString(t,"text/html").body}function yV(e){return e?.replace(/</g,"&lt;").replace(/>/g,"&gt;")}function kV(e){let t=e.parentElement,n=t.cloneNode();for(;t.firstChild&&t.firstChild!==e;)n.appendChild(t.firstChild);n.childNodes.length>0&&t.parentElement.insertBefore(n,t),t.parentElement.insertBefore(e,t),t.childNodes.length===0&&t.remove()}function xV(e){let t=e.parentNode;for(;e.firstChild;)t.insertBefore(e.firstChild,e);t.removeChild(e)}var _f=ae.create({name:"markdownHTMLNode",addStorage(){return{markdown:{serialize(e,t,n){this.editor.storage.markdown.options.html?e.write(_V(t,n)):(console.warn(`Tiptap Markdown: "${t.type.name}" node is only available in html mode`),e.write(`[${t.type.name}]`)),t.isBlock&&e.closeBlock(t)},parse:{}}}}});function _V(e,t){let n=e.type.schema,i=Po(z.from(e),n);return e.isBlock&&(t instanceof z||t.type.name===n.topNodeType.name)?wV(i):i}function wV(e){let n=qv(e).firstElementChild;return n.innerHTML=n.innerHTML.trim()?`
268
+ ${n.innerHTML}
269
+ `:`
270
+ `,n.outerHTML}var SV=ae.create({name:"blockquote"}),EV=SV.extend({addStorage(){return{markdown:{serialize:zn.nodes.blockquote,parse:{}}}}}),$V=ae.create({name:"bulletList"}),F4=$V.extend({addStorage(){return{markdown:{serialize(e,t){return e.renderList(t," ",()=>(this.editor.storage.markdown.options.bulletListMarker||"-")+" ")},parse:{}}}}}),CV=ae.create({name:"codeBlock"}),TV=CV.extend({addStorage(){return{markdown:{serialize(e,t){e.write("```"+(t.attrs.language||"")+`
271
+ `),e.text(t.textContent,!1),e.ensureNewLine(),e.write("```"),e.closeBlock(t)},parse:{setup(e){var t;e.set({langPrefix:(t=this.options.languageClassPrefix)!==null&&t!==void 0?t:"language-"})},updateDOM(e){e.innerHTML=e.innerHTML.replace(/\n<\/code><\/pre>/g,"</code></pre>")}}}}}}),IV=ae.create({name:"hardBreak"}),B4=IV.extend({addStorage(){return{markdown:{serialize(e,t,n,i){for(let r=i+1;r<n.childCount;r++)if(n.child(r).type!=t.type){e.write(e.inTable?_f.storage.markdown.serialize.call(this,e,t,n):`\\
272
+ `);return}},parse:{}}}}}),AV=ae.create({name:"heading"}),MV=AV.extend({addStorage(){return{markdown:{serialize:zn.nodes.heading,parse:{}}}}}),zV=ae.create({name:"horizontalRule"}),DV=zV.extend({addStorage(){return{markdown:{serialize:zn.nodes.horizontal_rule,parse:{}}}}}),NV=ae.create({name:"image"}),OV=NV.extend({addStorage(){return{markdown:{serialize:zn.nodes.image,parse:{}}}}}),RV=ae.create({name:"listItem"}),PV=RV.extend({addStorage(){return{markdown:{serialize:zn.nodes.list_item,parse:{}}}}}),LV=ae.create({name:"orderedList"});function FV(e,t,n){let i=0;for(;n-i>0&&t.child(n-i-1).type.name===e.type.name;i++);return i}var BV=LV.extend({addStorage(){return{markdown:{serialize(e,t,n,i){let r=t.attrs.start||1,o=String(r+t.childCount-1).length,s=e.repeat(" ",o+2),l=FV(t,n,i)%2?") ":". ";e.renderList(t,s,u=>{let c=String(r+u);return e.repeat(" ",o-c.length)+c+l})},parse:{}}}}}),UV=ae.create({name:"paragraph"}),jV=UV.extend({addStorage(){return{markdown:{serialize:zn.nodes.paragraph,parse:{}}}}});function Uv(e){var t,n;return(t=e==null||(n=e.content)===null||n===void 0?void 0:n.content)!==null&&t!==void 0?t:[]}var ZV=ae.create({name:"table"}),HV=ZV.extend({addStorage(){return{markdown:{serialize(e,t,n){if(!qV(t)){_f.storage.markdown.serialize.call(this,e,t,n);return}e.inTable=!0,t.forEach((i,r,o)=>{if(e.write("| "),i.forEach((s,a,l)=>{l&&e.write(" | ");let u=s.firstChild;u.textContent.trim()&&e.renderInline(u)}),e.write(" |"),e.ensureNewLine(),!o){let s=Array.from({length:i.childCount}).map(()=>"---").join(" | ");e.write(`| ${s} |`),e.ensureNewLine()}}),e.closeBlock(t),e.inTable=!1},parse:{}}}}});function N4(e){return e.attrs.colspan>1||e.attrs.rowspan>1}function qV(e){let t=Uv(e),n=t[0],i=t.slice(1);return!(Uv(n).some(r=>r.type.name!=="tableHeader"||N4(r)||r.childCount>1)||i.some(r=>Uv(r).some(o=>o.type.name==="tableHeader"||N4(o)||o.childCount>1)))}var WV=ae.create({name:"taskItem"}),VV=WV.extend({addStorage(){return{markdown:{serialize(e,t){let n=t.attrs.checked?"[x]":"[ ]";e.write(`${n} `),e.renderContent(t)},parse:{updateDOM(e){[...e.querySelectorAll(".task-list-item")].forEach(t=>{let n=t.querySelector("input");t.setAttribute("data-type","taskItem"),n&&(t.setAttribute("data-checked",n.checked),n.remove())})}}}}}}),KV=ae.create({name:"taskList"}),JV=KV.extend({addStorage(){return{markdown:{serialize:F4.storage.markdown.serialize,parse:{setup(e){e.use(O4.default)},updateDOM(e){[...e.querySelectorAll(".contains-task-list")].forEach(t=>{t.setAttribute("data-type","taskList")})}}}}}}),GV=ae.create({name:"text"}),XV=GV.extend({addStorage(){return{markdown:{serialize(e,t){e.text(yV(t.text))},parse:{}}}}}),YV=ct.create({name:"bold"}),QV=YV.extend({addStorage(){return{markdown:{serialize:zn.marks.strong,parse:{}}}}}),eK=ct.create({name:"code"}),tK=eK.extend({addStorage(){return{markdown:{serialize:zn.marks.code,parse:{}}}}}),nK=ct.create({name:"italic"}),rK=nK.extend({addStorage(){return{markdown:{serialize:zn.marks.em,parse:{}}}}}),iK=ct.create({name:"link"}),oK=iK.extend({addStorage(){return{markdown:{serialize:zn.marks.link,parse:{}}}}}),sK=ct.create({name:"strike"}),aK=sK.extend({addStorage(){return{markdown:{serialize:{open:"~~",close:"~~",expelEnclosingWhitespace:!0},parse:{}}}}}),lK=[EV,F4,TV,B4,MV,DV,_f,OV,PV,BV,jV,HV,VV,JV,XV,QV,tK,L4,rK,oK,aK];function xf(e){var t,n;let i=(t=e.storage)===null||t===void 0?void 0:t.markdown,r=(n=lK.find(o=>o.name===e.name))===null||n===void 0?void 0:n.storage.markdown;return i||r?{...r,...i}:null}var Zv=class{constructor(t){kf(this,"editor",null),this.editor=t}serialize(t){let n=new jv(this.nodes,this.marks,{hardBreakNodeName:B4.name});return n.renderContent(t),n.out}get nodes(){var t;return{...Object.fromEntries(Object.keys(this.editor.schema.nodes).map(n=>[n,this.serializeNode(_f)])),...Object.fromEntries((t=this.editor.extensionManager.extensions.filter(n=>n.type==="node"&&this.serializeNode(n)).map(n=>[n.name,this.serializeNode(n)]))!==null&&t!==void 0?t:[])}}get marks(){var t;return{...Object.fromEntries(Object.keys(this.editor.schema.marks).map(n=>[n,this.serializeMark(L4)])),...Object.fromEntries((t=this.editor.extensionManager.extensions.filter(n=>n.type==="mark"&&this.serializeMark(n)).map(n=>[n.name,this.serializeMark(n)]))!==null&&t!==void 0?t:[])}}serializeNode(t){var n;return(n=xf(t))===null||n===void 0||(n=n.serialize)===null||n===void 0?void 0:n.bind({editor:this.editor,options:t.options})}serializeMark(t){var n;let i=(n=xf(t))===null||n===void 0?void 0:n.serialize;return i?{...i,open:typeof i.open=="function"?i.open.bind({editor:this.editor,options:t.options}):i.open,close:typeof i.close=="function"?i.close.bind({editor:this.editor,options:t.options}):i.close}:null}},Hv=class{constructor(t,n){kf(this,"editor",null),kf(this,"md",null);let{html:i,linkify:r,breaks:o}=n;this.editor=t,this.md=this.withPatchedRenderer(Kr({html:i,linkify:r,breaks:o}))}parse(t){let{inline:n}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(typeof t=="string"){this.editor.extensionManager.extensions.forEach(o=>{var s;return(s=xf(o))===null||s===void 0||(s=s.parse)===null||s===void 0||(s=s.setup)===null||s===void 0?void 0:s.call({editor:this.editor,options:o.options},this.md)});let i=this.md.render(t),r=qv(i);return this.editor.extensionManager.extensions.forEach(o=>{var s;return(s=xf(o))===null||s===void 0||(s=s.parse)===null||s===void 0||(s=s.updateDOM)===null||s===void 0?void 0:s.call({editor:this.editor,options:o.options},r)}),this.normalizeDOM(r,{inline:n,content:t}),r.innerHTML}return t}normalizeDOM(t,n){let{inline:i,content:r}=n;return this.normalizeBlocks(t),t.querySelectorAll("*").forEach(o=>{var s;((s=o.nextSibling)===null||s===void 0?void 0:s.nodeType)===Node.TEXT_NODE&&!o.closest("pre")&&(o.nextSibling.textContent=o.nextSibling.textContent.replace(/^\n/,""))}),i&&this.normalizeInline(t,r),t}normalizeBlocks(t){let i=Object.values(this.editor.schema.nodes).filter(r=>r.isBlock).map(r=>{var o;return(o=r.spec.parseDOM)===null||o===void 0?void 0:o.map(s=>s.tag)}).flat().filter(Boolean).join(",");i&&[...t.querySelectorAll(i)].forEach(r=>{r.parentElement.matches("p")&&kV(r)})}normalizeInline(t,n){var i;if((i=t.firstElementChild)!==null&&i!==void 0&&i.matches("p")){var r,o,s,a;let l=t.firstElementChild,{nextElementSibling:u}=l,c=(r=(o=n.match(/^\s+/))===null||o===void 0?void 0:o[0])!==null&&r!==void 0?r:"",d=u?"":(s=(a=n.match(/\s+$/))===null||a===void 0?void 0:a[0])!==null&&s!==void 0?s:"";if(n.match(/^\n\n/)){l.innerHTML=`${l.innerHTML}${d}`;return}xV(l),t.innerHTML=`${c}${t.innerHTML}${d}`}}withPatchedRenderer(t){let n=i=>function(){let r=i(...arguments);return r===`
273
+ `?r:r[r.length-1]===`
274
+ `?r.slice(0,-1):r};return t.renderer.rules.hardbreak=n(t.renderer.rules.hardbreak),t.renderer.rules.softbreak=n(t.renderer.rules.softbreak),t.renderer.rules.fence=n(t.renderer.rules.fence),t.renderer.rules.code_block=n(t.renderer.rules.code_block),t.renderer.renderToken=n(t.renderer.renderToken.bind(t.renderer)),t}},uK=Te.create({name:"markdownClipboard",addOptions(){return{transformPastedText:!1,transformCopiedText:!1}},addProseMirrorPlugins(){return[new de({key:new we("markdownClipboard"),props:{clipboardTextParser:(e,t,n)=>{if(n||!this.options.transformPastedText)return null;let i=this.editor.storage.markdown.parser.parse(e,{inline:!0});return $n.fromSchema(this.editor.schema).parseSlice(qv(i),{preserveWhitespace:!0,context:t})},clipboardTextSerializer:e=>this.options.transformCopiedText?this.editor.storage.markdown.serializer.serialize(e.content):null}})]}}),U4=Te.create({name:"markdown",priority:50,addOptions(){return{html:!0,tightLists:!0,tightListClass:"tight",bulletListMarker:"-",linkify:!1,breaks:!1,transformPastedText:!1,transformCopiedText:!1}},addCommands(){let e=y6.Commands.config.addCommands();return{setContent:(t,n)=>i=>e.setContent(i.editor.storage.markdown.parser.parse(t),n)(i),insertContentAt:(t,n,i)=>r=>e.insertContentAt(t,r.editor.storage.markdown.parser.parse(n,{inline:!0}),i)(r)}},onBeforeCreate(){this.editor.storage.markdown={options:{...this.options},parser:new Hv(this.editor,this.options),serializer:new Zv(this.editor),getMarkdown:()=>this.editor.storage.markdown.serializer.serialize(this.editor.state.doc)},this.editor.options.initialContent=this.editor.options.content,this.editor.options.content=this.editor.storage.markdown.parser.parse(this.editor.options.content)},onCreate(){this.editor.options.content=this.editor.options.initialContent,delete this.editor.options.initialContent},addStorage(){return{}},addExtensions(){return[mV.configure({tight:this.options.tightLists,tightClass:this.options.tightListClass}),uK.configure({transformPastedText:this.options.transformPastedText,transformCopiedText:this.options.transformCopiedText})]}});function cK(e){let t=e.normalize("NFKD").replace(/[\u0300-\u036f]/g,"").toLowerCase().trim().replace(/[^a-z0-9\s-]/g," ").replace(/\s+/g,"-").replace(/-+/g,"-").replace(/^-+|-+$/g,"");return t.length>0?t:"section"}function Bi(e){return cK(e)}function Ui(){let e=new Map,t=new Set;return n=>{let i=Bi(n),r=e.get(i)??1,o=r===1?i:`${i}-${r}`;for(;t.has(o);)r+=1,o=`${i}-${r}`;return e.set(i,r+1),t.add(o),o}}function Yo(e){return/^[A-Za-z]:[\\/]/.test(e)}function ul(e){return e.replace(/\\/g,"/")}function Jn(e){return ul(e).replace(/\/+/g,"/")}function ll(e){let t=Jn(e);return Yo(t)?t.slice(0,3):t.startsWith("/")?"/":""}function wf(e){let t=Jn(e),n=ll(t);return t.slice(n.length).split("/").filter(Boolean)}function ji(e){let t=ll(e),n=wf(e);return n.length<=1?t||".":`${t}${n.slice(0,-1).join("/")}`}function j4(e){let t=ll(e),n=wf(e),i=[];for(let r=n.length-1;r>=1;r-=1){let o=`${t}${n.slice(0,r).join("/")}`;i.push(o||".")}return t&&i[i.length-1]!==t&&i.push(t),i}function Z4(e,t){let n=Jn(e),i=Jn(t),r=ll(n),o=ll(i);if(r!==o)return i;let s=wf(n),a=wf(i),l=0;for(;l<s.length&&l<a.length&&s[l]===a[l];)l+=1;let u=new Array(Math.max(s.length-l,0)).fill(".."),c=a.slice(l),d=[...u,...c].join("/");return d.length>0?d:"."}var dK=/\[\[([^\]|#]*)(?:#([^\]|]+))?(?:\|([^\]]+))?\]\]/g,fK=/^(`{3,}|~{3,})/;function Ef(e){return encodeURI(ul(e))}function Wv(e){try{return decodeURIComponent(e)}catch{return e}}function W4(e){let t=e.match(/^\[\[([^\]|#]*)(?:#([^\]|]+))?(?:\|([^\]]+))?\]\]$/);return t?{path:(t[1]??"").trim(),anchor:t[2]?.trim(),alias:t[3]?.trim()}:null}function pK(e){return e.alias&&e.alias.length>0?e.alias:e.path&&e.anchor?`${e.path}#${e.anchor}`:e.path?e.path:e.anchor??""}function hK(e){return/\.[A-Za-z0-9_-]+$/.test(e)?e:`${e}.md`}function V4(e){if(!e.path)return e.anchor?`#${Bi(e.anchor)}`:"#";let t=hK(ul(e.path)),n=t.startsWith("./")||t.startsWith("../")||t.startsWith("/")||Yo(t)?t:`./${t}`,i=Ef(n);return e.anchor?`${i}#${Bi(e.anchor)}`:i}function H4(e){return e.replace(dK,t=>{let n=W4(t);if(!n)return t;let i=pK(n),r=V4(n);return`[${i}](${r} "mcp-wiki:${encodeURIComponent(t)}")`})}function mK(e){let t="",n=0;for(;n<e.length;){let i=e.indexOf("`",n);if(i===-1){t+=H4(e.slice(n));break}t+=H4(e.slice(n,i));let r=i;for(;r<e.length&&e[r]==="`";)r+=1;let o=e.slice(i,r),s=e.indexOf(o,r);if(s===-1){t+=e.slice(i);break}t+=e.slice(i,s+o.length),n=s+o.length}return t}function Sf(e){if(!(!e||e.length===0))return Wv(e)}function gK(e){let t=e.indexOf("#");return t===-1?{pathPart:e}:{pathPart:e.slice(0,t),anchorPart:e.slice(t+1)}}function bK(e){let t=Jn(e),n=t.endsWith("/")?t:`${t}/`;return Yo(n)?new URL(`file:///${Ef(n)}`):n.startsWith("/")?new URL(`file://${Ef(n)}`):new URL(`file:///${Ef(n)}`)}function vK(e){let t=Wv(e.pathname);return/^\/[A-Za-z]:\//.test(t)?t.slice(1):t}function yK(e){return/^[A-Za-z][A-Za-z0-9+.-]*:/.test(e)&&!Yo(e)}function q4(e,t){let n=ul(Wv(t));if(n.startsWith("/")||Yo(n))return Jn(n);let i=ji(e);if(i==="."&&!Jn(e).includes("/"))return Jn(n);let r=new URL(encodeURI(n),bK(i));return Jn(vK(r))}function K4(e){return e.replace(/\[([^\]]*)\]\(([^)\s]*)(?:\s+"mcp-wiki:([^"]+)")\)/g,(t,n,i,r)=>{try{return decodeURIComponent(r)}catch{return`[[${r}]]`}})}function cl(e){let t=e.split(`
275
+ `),n=null;return t.map(i=>{let o=i.trimStart().match(fK);if(o){let s=o[1];return n?s[0]===n[0]&&s.length>=n.length&&(n=null):n=s,i}return n?i:mK(i)}).join(`
276
+ `)}function J4(e,t){let n=W4(t);if(n){let o=V4(n);if(o.startsWith("#"))return{kind:"anchor",href:t,anchor:Sf(o.slice(1))};let[s,a]=o.split("#");return{kind:"file",href:t,targetPath:q4(e,s),...a?{anchor:Sf(a)}:{}}}if(yK(t))return{kind:"external",href:t,url:t};if(t.startsWith("#"))return{kind:"anchor",href:t,anchor:Sf(t.slice(1))};let{pathPart:i,anchorPart:r}=gK(t);return{kind:"file",href:t,targetPath:q4(e,i),...r?{anchor:Sf(r)}:{}}}var kK=/^(---\r?\n[\s\S]*?\r?\n---\r?\n)/,xK=/\[([^\]]+)\]\(([^)\s]+)(?:\s+"[^"]*")?\)/g,_K=/\*\*([^*\n]*?`[^`\n]+`[^*\n]*?)\*\*/g,n3="TIPTAPPIPEESCX";function wK(e,t){if(/^`[^`]+`$/.test(e))return!0;let n=/^[a-z][a-z0-9+.-]*:/i.test(t),i=t.startsWith("./")||t.startsWith("../")||t.startsWith("/")||t.startsWith("#");return!!(!n&&!i&&t.includes("/"))}function SK(e){let t=e.includes(`\r
277
+ `)?`\r
278
+ `:`
279
+ `,n=t===`\r
280
+ `?e.replace(/\r\n/g,`
281
+ `):e,i=n.match(kK),r=i?i[0]:"",o=r?n.slice(r.length):n,s=o.match(/^\n*/)?.[0]??"";o=o.slice(s.length);let a=o.endsWith(`
282
+ `)?`
283
+ `:"",l=[],u=o,c=0;u=u.replace(xK,(m,g,b)=>{if(!wK(g,b))return m;let v=`TIPTAPCODELINK${String(c).padStart(4,"0")}`;return l.push({placeholder:v,original:m}),c+=1,v});let d=[],f=0;u=u.replace(_K,m=>{let g=`TIPTAPBOLDCODE${String(f).padStart(4,"0")}`;return d.push({placeholder:g,original:m}),f+=1,g});let p=0;return u=u.replace(/\\\|/g,()=>(p+=1,n3)),{editorInput:cl(u),context:{originalInput:e,frontmatter:r,frontmatterGap:s,trailingNewline:a,eol:t,codeLinks:l,boldCodeRuns:d,pipeEscapeCount:p}}}function EK(e,t){let n=K4(e);for(let{placeholder:i,original:r}of t.codeLinks)n=n.split(i).join(r);for(let{placeholder:i,original:r}of t.boldCodeRuns)n=n.split(i).join(r);return t.pipeEscapeCount>0&&(n=n.split(n3).join("\\|")),n=IK(n,t.originalInput),n=AK(n,t.originalInput),n=MK(n,t.originalInput),n=$K(n,t.originalInput),n=CK(n,t.originalInput),n=n.replace(/^\n+/,""),n=TK(n,t.originalInput),n=zK(n,t.originalInput),n=n.replace(/\n+$/,"")+t.trailingNewline,t.frontmatter&&(n=t.frontmatter+t.frontmatterGap+n),t.eol===`\r
284
+ `&&(n=n.replace(/\n/g,`\r
285
+ `)),n}function $K(e,t){let n=/^\|[\s:\-|]+\|$/,i=t.replace(/\r\n/g,`
286
+ `).split(`
287
+ `).filter(s=>n.test(s));if(i.length===0)return e;let r=e.split(`
288
+ `),o=0;for(let s=0;s<r.length;s+=1)if(n.test(r[s])&&o<i.length){let a=i[o].split("|").length,l=r[s].split("|").length;a===l&&(r[s]=i[o]),o+=1}return r.join(`
289
+ `)}function CK(e,t){let n=/^(\s*)([*\-+])(\s)/,i=t.replace(/\r\n/g,`
290
+ `).split(`
291
+ `),r=[];for(let a of i){let l=a.match(n);l&&r.push(l[2])}if(r.length===0)return e;let o=e.split(`
292
+ `),s=0;for(let a=0;a<o.length;a+=1){let l=o[a].match(n);if(!l)continue;let u=r[s];u&&u!==l[2]&&(o[a]=l[1]+u+l[3]+o[a].slice(l[0].length)),s+=1}return o.join(`
293
+ `)}function TK(e,t){let n=t.replace(/\r\n/g,`
294
+ `).split(`
295
+ `),i=e;for(let r=0;r<n.length-1;r+=1){let o=n[r],s=n[r+1];if(!o||!s)continue;let a=/^\s*([-*+]|\d+\.)\s/.test(o),l=/^ +\S/.test(s)&&!/^\s*([-*+]|\d+\.)\s/.test(s),u=a&&l;if(!u&&(G4(o)||G4(s)))continue;let c=`${o}
296
+ ${s}`;if(i.indexOf(c)!==-1)continue;let d=[{joiner:" ",b:s},{joiner:"",b:s}];if(u){let f=s.replace(/^\s+/,"");d.push({joiner:" ",b:f})}for(let{joiner:f,b:p}of d){let h=`${o}${f}${p}`,m=i.indexOf(h);if(m!==-1){i=i.slice(0,m)+c+i.slice(m+h.length);break}}}return i}function G4(e){return/^\s*(#{1,6}\s|[-*+]\s|\d+\.\s|>\s|```|\|.*\|\s*$|---|\s*$)/.test(e)}function IK(e,t){let n=t.replace(/\r\n/g,`
297
+ `).split(`
298
+ `),i=!1,r=e.split(`
299
+ `);for(let o=0;o<r.length;o+=1){let s=r[o];if(/^\s*```/.test(s)){i=!i;continue}if(i||!/\\[\[\]~]/.test(s))continue;let a=X4(s);if(n.some(u=>X4(u)===a)){if(n.find(c=>c===s)!==void 0)continue;r[o]=a}}return r.join(`
300
+ `)}function X4(e){return e.replace(/\\([\[\]~])/g,"$1")}function AK(e,t){let n=t.replace(/\r\n/g,`
301
+ `).split(`
302
+ `),i=!1,r=e.split(`
303
+ `);for(let o=0;o<r.length;o+=1){let s=r[o];if(/^\s*```/.test(s)){i=!i;continue}if(i||!/&(?:lt|gt|amp);/.test(s))continue;let a=Y4(s);!n.some(c=>Y4(c)===a)||n.find(c=>c===s)!==void 0||(r[o]=a)}return r.join(`
304
+ `)}function Y4(e){return e.replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&amp;/g,"&")}function MK(e,t){let n=t.replace(/\r\n/g,`
305
+ `).split(`
306
+ `),i=[];for(let o of n)/[^ ] $/.test(o)&&i.push(o.slice(0,-2));if(i.length===0)return e;let r=e;for(let o of i){let s=`${o}\\
307
+ `;if(r.includes(s)){r=r.replace(s,`${o}
308
+ `);continue}let a=`${o}
309
+ `,l=r.indexOf(a);l!==-1&&(r=r.slice(0,l)+`${o}
310
+ `+r.slice(l+a.length))}return r}function zK(e,t){let n=t.replace(/\r\n/g,`
311
+ `).split(`
312
+ `),i=new Set;for(let s=0;s<n.length-1;s+=1){let a=n[s],l=n[s+1];a&&l&&i.add(`${a}${l}`)}let r=e.split(`
313
+ `),o=[];for(let s=0;s<r.length;s+=1){let a=r[s];if(a===""&&s>0&&s<r.length-1){let l=r[s-1],u=r[s+1];if(l&&u&&i.has(`${l}${u}`))continue}o.push(a)}return o.join(`
314
+ `)}function DK(){return[OM.configure({heading:{levels:[1,2,3,4,5,6]},codeBlock:{HTMLAttributes:{class:"code-viewer"}},link:{openOnClick:!1,autolink:!0,HTMLAttributes:{"data-markdown-link":"true"}},strike:!1}),RM.configure({allowBase64:!0,inline:!0}),Nb.configure({resizable:!1,HTMLAttributes:{class:"markdown-table"}}),el,Qa,Ya,U4.configure({html:!0,tightLists:!0,bulletListMarker:"-",linkify:!1,breaks:!1,transformPastedText:!0,transformCopiedText:!1})]}function Q4(e,t){if(e===t)return[];let n=e.split(`
315
+ `),i=t.split(`
316
+ `),r=n.length,o=i.length,s=[];if(r*o>1e6)return Kv(n,i,0,r,0,o);let a=Array.from({length:r+1},()=>Array(o+1).fill(0));for(let p=1;p<=r;p+=1)for(let h=1;h<=o;h+=1)a[p][h]=n[p-1]===i[h-1]?a[p-1][h-1]+1:Math.max(a[p-1][h],a[p][h-1]);let l=[],u=r,c=o;for(;u>0&&c>0;)n[u-1]===i[c-1]?(l.unshift([u-1,c-1]),u-=1,c-=1):a[u-1][c]>=a[u][c-1]?u-=1:c-=1;let d=0,f=0;for(let[p,h]of l)(p>d||h>f)&&s.push({fromLine:Math.max(1,f-3),toLine:Math.max(f+1,h+3)}),d=p+1,f=h+1;return(d<r||f<o)&&s.push({fromLine:Math.max(1,f-3),toLine:Math.max(f+1,o+3)}),s}function Kv(e,t,n,i,r,o){for(;n<i&&r<o&&e[n]===t[r];)n++,r++;for(;n<i&&r<o&&e[i-1]===t[o-1];)i--,o--;if(n===i&&r===o)return[];let s=new Map,a=new Map;for(let l=n;l<i;l+=1){let u=s.get(e[l]);s.set(e[l],{count:(u?.count??0)+1,index:l})}for(let l=r;l<o;l+=1){let u=a.get(t[l]);a.set(t[l],{count:(u?.count??0)+1,index:l})}for(let l=n;l<i;l+=1){let u=s.get(e[l]),c=a.get(e[l]);if(u?.count===1&&c?.count===1)return[...Kv(e,t,n,l,r,c.index),...Kv(e,t,l+1,i,c.index+1,o)]}return[{fromLine:Math.max(1,r-3),toLine:Math.max(r+1,o+3)}]}function e3(e,t){let n=t.relatedTarget,i=e?.closest(".tool-shell");return!!(n&&(e?.contains(n)||i?.contains(n)))}function NK(){return`
317
+ <button class="markdown-format-button" type="button" data-format="bold"><strong>B</strong></button>
318
+ <button class="markdown-format-button" type="button" data-format="italic"><em>I</em></button>
319
+ <button class="markdown-format-button" type="button" data-format="strike"><span style="text-decoration:line-through">S</span></button>
320
+ <span class="markdown-format-sep" aria-hidden="true"></span>
321
+ <label class="markdown-format-size" title="Block style" aria-label="Block style">
322
+ <select id="markdown-block-style">
323
+ <option value="p" selected>Normal</option>
324
+ <option value="h1">H1</option>
325
+ <option value="h2">H2</option>
326
+ <option value="h3">H3</option>
327
+ </select>
328
+ </label>
329
+ <span class="markdown-format-sep" aria-hidden="true"></span>
330
+ <button class="markdown-format-button" type="button" data-format="quote" title="Quote" aria-label="Quote">&#10077;</button>
331
+ <button class="markdown-format-button" type="button" data-format="list" title="List" aria-label="List">&#8226;</button>
332
+ <button class="markdown-format-button" type="button" data-format="link" title="Link" aria-label="Link">&#128279;</button>
333
+ <button class="markdown-format-button" type="button" data-format="code" title="Code" aria-label="Code">&lsaquo;&rsaquo;</button>
334
+ `}function t3(e){return e==="raw"?'<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="16 18 22 12 16 6"></polyline><polyline points="8 6 2 12 8 18"></polyline></svg>':'<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4 7h16"></path><path d="M4 12h10"></path><path d="M4 17h7"></path></svg>'}function OK(e,t){return e.filter(i=>i.text===t.text).length<=1?t.text:`${t.text} (#${t.id})`}function r3(){return'<button class="markdown-editor-copy-button" type="button" id="copy-active-markdown" title="Copy" aria-label="Copy"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="9" y="9" width="13" height="13" rx="2" ry="2"/><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"/></svg><span>Copy</span></button>'}function i3(e){return`
335
+ <div class="markdown-editor-mode-toggle" role="tablist" aria-label="Editor mode">
336
+ <div class="markdown-editor-mode-toggle-indicator markdown-editor-mode-toggle-indicator--${e}" aria-hidden="true"></div>
337
+ <button class="markdown-editor-mode-option${e==="raw"?" is-active":""}" type="button" id="markdown-mode-raw" role="tab" aria-selected="${e==="raw"?"true":"false"}" title="Raw" aria-label="Raw">${t3("raw")}<span>Raw</span></button>
338
+ <button class="markdown-editor-mode-option${e==="markdown"?" is-active":""}" type="button" id="markdown-mode-markdown" role="tab" aria-selected="${e==="markdown"?"true":"false"}" title="Preview" aria-label="Preview">${t3("markdown")}<span>Preview</span></button>
339
+ </div>
340
+ `}function o3(e){let t=e.view==="markdown";return`
341
+ <div class="markdown-editor-shell markdown-editor-shell--${e.view}">
342
+ <section class="markdown-editor-pane markdown-editor-pane--${e.view}" aria-label="Markdown editor">
343
+ ${t?`<div id="markdown-editor-context-menu" class="markdown-editor-context-menu" hidden>${NK()}</div><div id="markdown-link-modal" class="markdown-link-modal" hidden><div class="markdown-link-modal-card"><div class="markdown-link-mode-tabs"><button type="button" id="markdown-link-mode-file" class="markdown-link-mode-tab is-active">File</button><button type="button" id="markdown-link-mode-url" class="markdown-link-mode-tab">URL</button></div><div id="markdown-link-file-fields"><label class="markdown-link-modal-label" for="markdown-link-search">Find note</label><input id="markdown-link-search" class="markdown-link-modal-input" type="text" placeholder="Search files..." /><div id="markdown-link-results" class="markdown-link-results"></div><label class="markdown-link-modal-label" for="markdown-link-heading">Heading</label><select id="markdown-link-heading" class="markdown-link-modal-input markdown-link-modal-select"><option value="">None</option></select><label class="markdown-link-modal-label" for="markdown-link-alias">Alias</label><input id="markdown-link-alias" class="markdown-link-modal-input" type="text" placeholder="Optional label" /></div><div id="markdown-link-url-fields" hidden><label class="markdown-link-modal-label" for="markdown-link-input">URL</label><input id="markdown-link-input" class="markdown-link-modal-input" type="url" placeholder="https://example.com" /><label class="markdown-link-modal-label" for="markdown-link-label">Label</label><input id="markdown-link-label" class="markdown-link-modal-input" type="text" placeholder="Optional label" /></div><div class="markdown-link-modal-actions"><button type="button" id="markdown-link-cancel" class="markdown-link-modal-button">Cancel</button><button type="button" id="markdown-link-apply" class="markdown-link-modal-button markdown-link-modal-button--primary">Insert</button></div></div></div>`:""}
344
+ <div id="markdown-editor-root" class="markdown-editor-root"></div>
345
+ </section>
346
+ </div>
347
+ `}function RK(e){let t=e.selectionStart,n=e.selectionEnd,i=`${e.value.slice(0,t)} ${e.value.slice(n)}`;e.value=i,e.selectionStart=t+1,e.selectionEnd=t+1}function Vv(e){let t=Ui(),n=Array.from(e.querySelectorAll("h1, h2, h3, h4, h5, h6"));for(let i of n){let r=i.textContent?.trim()??"";if(!r){i.hasAttribute("id")&&i.removeAttribute("id"),i.hasAttribute("data-heading-id")&&i.removeAttribute("data-heading-id");continue}let o=t(r);i.id!==o&&(i.id=o),i.getAttribute("data-heading-id")!==o&&i.setAttribute("data-heading-id",o)}}function s3(e){let t=e.target.closest(".markdown-editor-shell"),n=t?.querySelector("#markdown-editor-context-menu"),i=t?Array.from(t.querySelectorAll("[data-format]")):[],r=t?.querySelector("#markdown-block-style"),o=t?.querySelector("#markdown-link-modal"),s=t?.querySelector("#markdown-link-mode-file"),a=t?.querySelector("#markdown-link-mode-url"),l=t?.querySelector("#markdown-link-file-fields"),u=t?.querySelector("#markdown-link-url-fields"),c=t?.querySelector("#markdown-link-search"),d=t?.querySelector("#markdown-link-results"),f=t?.querySelector("#markdown-link-heading"),p=t?.querySelector("#markdown-link-alias"),h=t?.querySelector("#markdown-link-input"),m=t?.querySelector("#markdown-link-label"),g=t?.querySelector("#markdown-link-apply"),b=t?.querySelector("#markdown-link-cancel"),v="file",y=[],x=null,C="Search for a file to link",A=0,D=0;if(e.view==="markdown"){e.target.replaceChildren();let se=!1,I=()=>{se=!0},{editorInput:W,context:Z}=SK(e.value),ee=()=>{let N=_.storage.markdown?.getMarkdown()??"";return EK(N,Z)},ue="",_=new k6({element:e.target,extensions:DK(),content:W,editorProps:{attributes:{class:"markdown-editor-surface markdown-editor-surface--markdown markdown markdown-doc",role:"textbox","aria-multiline":"true"}},onUpdate:({editor:E})=>{if(Vv(E.view.dom),!se)return;let N=ee(),U=Q4(ue,N);ue=N,e.onChange(N,U)},onSelectionUpdate:()=>{O()},onBlur:({event:E})=>{e3(t,E)||(n&&(n.hidden=!0),e.onBlur?.())}});ue=ee();let S=_.view.dom;Vv(S);let O=()=>{if(!n)return;let{from:E,to:N,empty:U}=_.state.selection;if(U||!_.isFocused){n.hidden=!0;return}let oe=_.view.coordsAtPos(E),xe=_.view.coordsAtPos(N),st=t;if(!st)return;let On=st.getBoundingClientRect(),Xr=(oe.left+xe.right)/2;n.hidden=!1;let as=Math.max(12,Xr-On.left-n.offsetWidth/2),Nf=Math.max(12,oe.top-On.top-n.offsetHeight-10);n.style.left=`${as}px`,n.style.top=`${Nf}px`},L=(E=[],N="None")=>{if(!f)return;f.replaceChildren();let U=document.createElement("option");U.value="",U.textContent=N,f.appendChild(U);for(let oe of E){let xe=document.createElement("option");xe.value=oe.id,xe.textContent=OK(E,oe),xe.dataset.headingText=oe.text,f.appendChild(xe)}},ne=async E=>{if(!f)return;let N=++D;L([],"Loading\u2026");try{let U=await e.loadHeadings?.(E.path)??[];if(N!==D||x?.path!==E.path)return;L(U)}catch{if(N!==D||x?.path!==E.path)return;L([],"Failed to load headings")}},Y=()=>{if(!d)return;if(y.length===0){let N=document.createElement("div");N.className="markdown-link-results-empty",N.textContent=C,d.replaceChildren(N);return}let E=document.createDocumentFragment();for(let N of y){let U=document.createElement("button");U.type="button",U.className=`markdown-link-result${x?.path===N.path?" is-active":""}`,U.dataset.linkPath=N.path;let oe=document.createElement("span");oe.className="markdown-link-result-title",oe.textContent=N.title;let xe=document.createElement("span");xe.className="markdown-link-result-path",xe.textContent=N.relativePath,U.append(oe,xe),U.addEventListener("click",()=>{x=N,Y(),ne(N)}),E.appendChild(U)}d.replaceChildren(E)},Ee=E=>{v=E,s?.classList.toggle("is-active",E==="file"),a?.classList.toggle("is-active",E==="url"),l&&(l.hidden=E!=="file"),u&&(u.hidden=E!=="url")},dt=async()=>{if(!c||!e.searchLinks)return;let E=c.value.trim();if(E.length===0){A+=1,y=[],x=null,C="Search for a file to link",L(),Y();return}let N=++A;try{let U=await e.searchLinks(E);if(N!==A||E!==c.value.trim())return;y=U,x=U[0]??null,C=U.length===0?"No matching files found":"Search for a file to link",Y(),x?ne(x):L()}catch{if(N!==A)return;y=[],x=null,C="Search failed. Try again.",L(),Y()}},ve=()=>{o?.setAttribute("hidden",""),h&&(h.value=""),m&&(m.value=""),p&&(p.value=""),c&&(c.value=""),L(),y=[],x=null,C="Search for a file to link",Y()},Oe=()=>{if(!o)return;let E=_.state.doc.textBetween(_.state.selection.from,_.state.selection.to," ").trim();o.removeAttribute("hidden"),Ee("url"),m&&(m.value=E),h&&(h.value="",h.focus()),y=[],x=null,C="Search for a file to link",L(),Y()},kt=()=>{if(I(),v==="url"){let E=h?.value?.trim();if(!E){ve();return}let N=m?.value?.trim()||E,{from:U,to:oe,empty:xe}=_.state.selection;xe?_.chain().focus().insertContent({type:"text",text:N,marks:[{type:"link",attrs:{href:E}}]}).run():_.chain().focus().deleteRange({from:U,to:oe}).insertContent({type:"text",text:N,marks:[{type:"link",attrs:{href:E}}]}).run()}else if(x){let E=f?.value?.trim(),N=f?.selectedOptions[0]?.dataset.headingText?.trim(),U=p?.value?.trim(),xe=`[[${x.path===e.currentFilePath?"":x.wikiPath}${E?`#${E}`:""}${U?`|${U}`:""}]]`,st=`${x.relativePath}${E?`#${E}`:""}`,On=U||N||x.title,{from:Xr,to:as,empty:Nf}=_.state.selection,cy=_.chain().focus();Nf||cy.deleteRange({from:Xr,to:as}),cy.insertContent({type:"text",text:On,marks:[{type:"link",attrs:{href:st,title:`mcp-wiki:${encodeURIComponent(xe)}`}}]}).run()}ve()},It=E=>{let U=E.currentTarget.dataset.format;if(U)switch(I(),U){case"bold":_.chain().focus().toggleBold().run();break;case"italic":_.chain().focus().toggleItalic().run();break;case"strike":_.chain().focus().toggleStrike().run();break;case"quote":_.chain().focus().toggleBlockquote().run();break;case"list":_.chain().focus().toggleBulletList().run();break;case"code":_.chain().focus().toggleCode().run();break;case"link":Oe();break}},Ge=()=>{let E=r?.value;if(!E)return;if(E==="p"){I(),_.chain().focus().setParagraph().run();return}let N=/^h([1-6])$/.exec(E);if(N){I();let U=Number.parseInt(N[1],10);_.chain().focus().toggleHeading({level:U}).run()}},De=document.createElement("div");De.className="markdown-link-popover",De.hidden=!0,S.parentElement?.appendChild(De);let Xe=null,Zi=E=>{Xe&&(clearTimeout(Xe),Xe=null);let N=E.getAttribute("href")??"";De.innerHTML='<button class="markdown-link-popover-btn" id="link-popover-edit" type="button" title="Edit link"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"/><path d="M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"/></svg></button><button class="markdown-link-popover-btn" id="link-popover-open" type="button" title="Open link"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"/><polyline points="15 3 21 3 21 9"/><line x1="10" y1="14" x2="21" y2="3"/></svg></button>',De.hidden=!1,De.querySelector("#link-popover-open")?.addEventListener("click",st=>{st.preventDefault(),st.stopPropagation(),De.hidden=!0,E.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!0}))},{once:!0}),De.querySelector("#link-popover-edit")?.addEventListener("click",st=>{if(st.preventDefault(),st.stopPropagation(),De.hidden=!0,!o)return;let On=_.view.posAtDOM(E,0);if(On>=0){let as=On+(E.textContent?.length??0);_.chain().focus().setTextSelection({from:On,to:as}).run()}let Xr=E.textContent?.trim()??"";o.removeAttribute("hidden"),Ee("url"),h&&(h.value=N),m&&(m.value=Xr)},{once:!0});let U=E.getBoundingClientRect(),oe=S.parentElement;if(!oe)return;let xe=oe.getBoundingClientRect();De.style.left=`${Math.max(4,U.left-xe.left)}px`,De.style.top=`${U.bottom-xe.top+4}px`},Dn=()=>{Xe=setTimeout(()=>{De.hidden=!0},200)},ie=E=>{let N=E.target?.closest?.("a[href]");N&&S.contains(N)&&Zi(N)},ss=E=>{E.target?.closest?.("a[href]")&&Dn()},ot=()=>{Xe&&(clearTimeout(Xe),Xe=null)},ze=()=>{Dn()},Gr=()=>Ee("file"),Nn=()=>{Ee("url"),h?.focus()},Hi=()=>{dt()},qi=E=>{E.target===o&&ve()};return S.addEventListener("beforeinput",I),S.addEventListener("paste",I),S.addEventListener("cut",I),S.addEventListener("drop",I),S.addEventListener("mouseover",ie),S.addEventListener("mouseout",ss),De.addEventListener("mouseenter",ot),De.addEventListener("mouseleave",ze),i.forEach(E=>E.addEventListener("click",It)),r?.addEventListener("change",Ge),s?.addEventListener("click",Gr),a?.addEventListener("click",Nn),c?.addEventListener("input",Hi),g?.addEventListener("click",kt),b?.addEventListener("click",ve),o?.addEventListener("click",qi),typeof e.initialScrollTop=="number"&&(S.scrollTop=e.initialScrollTop),Y(),{destroy:()=>{S.removeEventListener("beforeinput",I),S.removeEventListener("paste",I),S.removeEventListener("cut",I),S.removeEventListener("drop",I),S.removeEventListener("mouseover",ie),S.removeEventListener("mouseout",ss),De.removeEventListener("mouseenter",ot),De.removeEventListener("mouseleave",ze),i.forEach(E=>E.removeEventListener("click",It)),r?.removeEventListener("change",Ge),s?.removeEventListener("click",Gr),a?.removeEventListener("click",Nn),c?.removeEventListener("input",Hi),g?.removeEventListener("click",kt),b?.removeEventListener("click",ve),o?.removeEventListener("click",qi),De.remove(),Xe&&clearTimeout(Xe),_.destroy(),e.target.replaceChildren()},focus:()=>{_.commands.focus()},getValue:()=>ee(),setValue:E=>{_.commands.setContent(cl(E),{emitUpdate:!1}),ue=ee(),Vv(S)},revealLine:(E,N)=>{if(N){let U=S.querySelector(`#${CSS.escape(N)}`);if(U){U.scrollIntoView({block:"start",inline:"nearest"}),S.scrollTop=Math.max(S.scrollTop-24,0),U.setAttribute("tabindex","-1"),U.focus({preventScroll:!0});return}}_.commands.focus()},setScrollTop:E=>{S.scrollTop=Math.max(0,E)}}}let M=document.createElement("textarea");M.className="markdown-editor-textarea markdown-editor-textarea--raw",M.spellcheck=!1,M.setAttribute("autocomplete","off"),M.setAttribute("autocorrect","off"),M.setAttribute("autocapitalize","off"),M.placeholder="Edit raw markdown...",M.value=e.value;let V=M.value;e.target.replaceChildren(M);let me=()=>{M.style.height="auto",M.style.height=`${Math.max(M.scrollHeight,640)}px`},et=()=>{let se=M.value,I=Q4(V,se);V=se,e.onChange(se,I)},it=()=>{me(),et()},je=se=>{e3(t,se)||e.onBlur?.()},Me=se=>{se.key==="Tab"&&(se.preventDefault(),RK(M),me(),et())};return M.addEventListener("input",it),M.addEventListener("keydown",Me),M.addEventListener("focusout",je),me(),typeof e.initialScrollTop=="number"&&(M.scrollTop=e.initialScrollTop),{destroy:()=>{M.removeEventListener("input",it),M.removeEventListener("keydown",Me),M.removeEventListener("focusout",je),e.target.replaceChildren()},focus:()=>{M.focus()},getValue:()=>M.value,setValue:se=>{M.value=se,V=se,me()},revealLine:se=>{let I=Math.max(1,Math.floor(se)),W=M.value.split(`
348
+ `),Z=0;for(let ue=1;ue<I&&ue<=W.length;ue+=1)Z+=W[ue-1].length+1;M.focus(),M.setSelectionRange(Z,Z);let ee=Number.parseFloat(window.getComputedStyle(M).lineHeight||"20")||20;M.scrollTop=Math.max(0,(I-1)*ee-ee*2)},setScrollTop:se=>{M.scrollTop=Math.max(0,se)}}}function a3(){return'<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="9" y="9" width="13" height="13" rx="2" ry="2"/><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"/></svg>'}function PK(){return'<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"/></svg>'}function LK(){return'<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M9 14 4 9l5-5"/><path d="M4 9h11a5 5 0 1 1 0 10h-1"/></svg>'}function FK(){return'<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="15 3 21 3 21 9"/><polyline points="9 21 3 21 3 15"/><line x1="21" y1="3" x2="14" y2="10"/><line x1="3" y1="21" x2="10" y2="14"/></svg>'}function BK(e){return e.fileDeleted?'<span class="panel-save-status panel-save-status--saved">File deleted</span>':e.saveIndicator!=="saved"?"":`<span class="panel-save-status panel-save-status--${e.saving?"saving":"saved"}">Saved</span>`}function l3(e){let t=Vt(e.payload.content),n=e.body.notice?`<div class="notice">${e.body.notice}</div>`:"",i=BC(e.payload.filePath),r=t?t.toLine-t.fromLine+1:e0(e.payload.content),o=e.payload.fileType==="markdown"?"MARKDOWN":e.payload.fileType==="html"?"HTML":e.payload.fileType==="image"?"IMAGE":e.payload.fileType==="directory"?"DIRECTORY":e.fileExtension!=="none"?e.fileExtension.toUpperCase():"TEXT",s=t?.isPartial?`View lines ${t.fromLine}\u2013${t.toLine}`:e.payload.fileType==="directory"?"View directory":"View file",a=t?.isPartial?`${o} \u2022 LINES ${t.fromLine}\u2013${t.toLine} OF ${t.totalLines}`:`${o} \u2022 ${r} LINE${r!==1?"S":""}`;if(e.markdownWorkspace){let A=Qe(e.markdownWorkspace.draftContent),D=A.trim().split(/\s+/).filter(Boolean).length,M=e0(A);a=`${o} \u2022 EDIT MODE \u2022 ${M} LINES \u2022 ${D} WORDS`}let l=e.currentDisplayMode==="fullscreen",u=e.payload.fileType==="html"?`<button class="panel-action" id="toggle-html-mode">${e.htmlMode==="rendered"?"Source":"Rendered"}</button>`:"",c=e.hasDirectoryBackButton&&e.payload.fileType!=="directory"?'<button class="panel-action dir-back-btn" id="dir-back" title="Back to directory">\u2190 Back</button>':"",d=e.payload.fileType==="markdown",f=d&&!!e.markdownWorkspace,p=f&&(e.markdownWorkspace.fileDeleted||e.markdownWorkspace.loadingDocument||!e.isMarkdownUndoAvailable),h=f&&e.markdownWorkspace.fileDeleted,m=t?.isPartial&&t.fromLine>1,g=t?.isPartial&&t.toLine<t.totalLines&&t.totalLines-t.toLine>1,b=m?`<button class="load-lines-banner" id="load-before">\u2191 Load lines 1\u2013${t.fromLine-1}</button>`:"",v=g?`<button class="load-lines-banner" id="load-after">\u2193 Load lines ${t.toLine+1}\u2013${t.totalLines}</button>`:"",y=e.isExpanded||l,x=e.capabilities.canOpenInFolder,C=e.capabilities.canCopy;return{effectiveExpanded:y,html:`
349
+ <main id="tool-shell" class="shell tool-shell ${y?"expanded":"collapsed"}${e.hideSummaryRow?" host-framed":""}${l?" fullscreen":""}">
350
+ ${l?"":la({id:"compact-toggle",label:s,filename:e.payload.fileName,variant:"ready",expandable:!0,expanded:e.isExpanded,interactive:!0})}
351
+ <section class="panel">
352
+ <div class="panel-topbar">
353
+ ${c}
354
+ ${e.hideSummaryRow?"":`<span class="panel-breadcrumb" title="${fn(e.payload.filePath)}">${i}</span>`}
355
+ <span class="panel-topbar-actions">
356
+ ${f?BK(e.markdownWorkspace):""}
357
+ ${u}
358
+ ${f&&l?i3(e.markdownWorkspace.editorView):""}
359
+ ${d&&!l&&e.canGoFullscreen?`<button class="panel-action" id="expand-fullscreen" title="Expand" aria-label="Expand">${FK()}</button>`:""}
360
+ ${f?`<button class="panel-action" id="revert-markdown" ${l?"":'title="Undo" aria-label="Undo" '}${p?"disabled":""}>${LK()}${l?" Undo":""}</button>`:""}
361
+ ${f&&l?r3():""}
362
+ ${d&&!l?`<button class="panel-action" id="copy-active-markdown" title="Copy" aria-label="Copy">${a3()}</button>`:""}
363
+ ${C&&e.capabilities.supportsPreview&&!d?`<button class="panel-action" id="copy-source" title="Copy source" aria-label="Copy source">${a3()}</button>`:""}
364
+ ${x&&f&&l?`<button class="panel-action" id="open-in-editor" ${h?"disabled":""}>${e.markdownEditorAppIcon} Open in ${fn(e.defaultMarkdownEditorName??"editor")}</button>`:""}
365
+ ${x&&!(f&&l)?`<button class="panel-action" id="open-in-folder" title="Open in folder" aria-label="Open in folder" ${f&&h?"disabled":""}>${PK()}</button>`:""}
366
+ </span>
367
+ </div>
368
+ ${n}
369
+ <div class="panel-content-wrapper">
370
+ ${b}
371
+ ${e.body.html}
372
+ ${v}
373
+ </div>
374
+ <div class="panel-footer">
375
+ <span>${a}</span>
376
+ </div>
377
+ </section>
378
+ </main>
379
+ `}}var UK={js:"javascript",cjs:"javascript",mjs:"javascript",ts:"typescript",jsx:"javascript",tsx:"typescript",json:"json",yaml:"yaml",yml:"yaml",toml:"toml",ini:"ini",xml:"xml",html:"html",htm:"html",css:"css",scss:"css",less:"css",sh:"bash",bash:"bash",zsh:"bash",py:"python",rb:"ruby",java:"java",go:"go",rs:"rust",sql:"sql",md:"markdown",markdown:"markdown"};function jK(e){let t=e.toLowerCase().match(/\.([a-z0-9]+)$/);return t?t[1]:""}function Jv(e){let t=jK(e);return UK[t]??"text"}function u3(e,t){if(Jv(t)!=="json")return{content:e};try{return{content:`${JSON.stringify(JSON.parse(e),null,2)}
380
+ `}}catch{return{content:e,notice:"Invalid JSON. Showing raw source."}}}function dl(e,t="text",n=1){let o=pc(e,t||"text").split(`
381
+ `);return o.length>0&&o[o.length-1]===""&&o.pop(),`<pre class="code-viewer"><table class="code-table"><tbody>${o.map((a,l)=>{let u=n+l;return`<tr class="code-line" data-line="${u}"><td class="line-num" data-line="${u}">${u}</td><td class="line-content">${a||" "}</td></tr>`}).join(`
382
+ `)}</tbody></table></pre>`}function ZK(){if(typeof window>"u"||typeof document>"u")return{background:"Canvas",text:"CanvasText",fontFamily:"system-ui, sans-serif"};let e=window.getComputedStyle(document.documentElement),t=e.getPropertyValue("--panel").trim()||"Canvas",n=e.getPropertyValue("--text").trim()||"CanvasText",i=e.getPropertyValue("--font-sans").trim()||"system-ui, sans-serif";return{background:t,text:n,fontFamily:i}}function HK(e){let t=ZK(),n=`<!doctype html><html><head><meta charset="utf-8" /><style>html,body{margin:0;padding:0;background:${t.background};color:${t.text};}body{font-family:${t.fontFamily};padding:16px;line-height:1.5;}img{max-width:100%;height:auto;}</style></head><body>${e}</body></html>`;return`<iframe class="html-rendered-frame" title="Rendered HTML preview" sandbox="allow-scripts allow-forms allow-popups" referrerpolicy="no-referrer" srcdoc="${St(n)}"></iframe>`}function c3(e,t){if(t==="source")return{html:`<div class="panel-content source-content">${dl(e,"html")}</div>`};try{return{html:`<div class="panel-content html-content">${HK(e)}</div>`}}catch{return{html:`<div class="panel-content source-content">${dl(e,"html")}</div>`,notice:"HTML renderer failed. Showing source instead."}}}var qK=new Set(["image/png","image/jpeg","image/gif","image/webp","image/bmp","image/svg","image/svg+xml"]);function Gv(e){return e?e.toLowerCase().split(";",1)[0].trim():""}function d3(e){let t=Gv(e);return t.length>0&&qK.has(t)}function f3(e){return`<pre class="code-viewer"><code class="hljs language-text">${St(e)}</code></pre>`}function WK(e){let t=Gv(e.mimeType);if(!d3(t))return{notice:"Preview is unavailable for this image format.",html:'<div class="panel-content source-content"></div>'};if(!e.content||e.content.trim().length===0)return{notice:"Preview is unavailable because image data is missing.",html:'<div class="panel-content source-content"></div>'};let n=`data:${t};base64,${e.content}`;return{html:`<div class="panel-content image-content"><div class="image-preview"><img src="${St(n)}" alt="${St(e.fileName)}" loading="eager" decoding="async"></div></div>`}}function fl(e,t){return{supportsPreview:!0,canCopy:t,canOpenInFolder:!zr(e.filePath)}}var Xv={directory:{getCapabilities:e=>fl(e,!1),renderBody:({payload:e})=>jC(Qe(e.content),e.filePath)},html:{getCapabilities:e=>fl(e,!0),renderBody:({payload:e,htmlMode:t})=>c3(Qe(e.content),t)},image:{getCapabilities:e=>fl(e,!1),renderBody:({payload:e})=>WK(e)},markdown:{getCapabilities:e=>fl(e,!1),renderBody:({payload:e,markdownController:t})=>{try{return t.buildBody(e)}catch{return{notice:"Markdown renderer failed. Showing raw source instead.",html:`<div class="panel-content source-content">${f3(Qe(e.content))}</div>`}}}},text:{getCapabilities:e=>fl(e,!0),renderBody:({payload:e,startLine:t})=>{let n=Qe(e.content),i=Jv(e.filePath),r=u3(n,e.filePath);return{notice:r.notice,html:`<div class="panel-content source-content">${dl(r.content,i,t)}</div>`}}},unsupported:{getCapabilities:e=>{let t=Qe(e.content).trim().length>0;return{supportsPreview:t,canCopy:t,canOpenInFolder:!zr(e.filePath)}},renderBody:({payload:e})=>{let t=Qe(e.content);return t.trim().length===0?{notice:"Preview is not available for this file type.",html:'<div class="panel-content source-content"></div>'}:{html:`<div class="panel-content source-content">${f3(t)}</div>`}}}};function p3(e){return Xv[e.fileType]?.getCapabilities(e)??{supportsPreview:!1,canCopy:!1,canOpenInFolder:!zr(e.filePath)}}function h3(e){return(Xv[e.payload.fileType]??Xv.text).renderBody(e)}function Qo(e){return`'${e.replace(/'/g,"'\\''")}'`}function m3(e){let t=[];for(let i=0;i<e.length;i+=1){let r=e.charCodeAt(i);t.push(r&255,r>>8)}let n="";for(let i of t)n+=String.fromCharCode(i);return btoa(n)}function Yv(e,t){let n=e.trim();if(!n||t(n))return;let i=navigator.userAgent.toLowerCase();if(i.includes("win")){let o=`Start-Process -FilePath explorer.exe -ArgumentList @('/select,','${n.replace(/'/g,"''")}')`;return`powershell.exe -NoProfile -NonInteractive -EncodedCommand ${m3(o)}`}return i.includes("mac")?`open -R ${Qo(n)}`:`xdg-open ${Qo(ji(n))}`}function g3(e,t,n){let i=e.trim();if(!i||t(i))return;let r=n.get(i);if(r?.appPath&&navigator.userAgent.toLowerCase().includes("mac"))return`open -a ${Qo(r.appPath)} ${Qo(i)}`;let o=navigator.userAgent.toLowerCase();if(o.includes("win")){let a=`Start-Process -FilePath '${i.replace(/'/g,"''")}'`;return`powershell.exe -NoProfile -NonInteractive -EncodedCommand ${m3(a)}`}return o.includes("mac")?`open ${Qo(i)}`:`xdg-open ${Qo(i)}`}function b3(){return'<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M12 20h9"/><path d="M16.5 3.5a2.1 2.1 0 1 1 3 3L7 19l-4 1 1-4Z"/></svg>'}function v3(e){if(e.isMarkdownEditing)return e.previousAbortController&&e.previousAbortController.abort(),null;let t=document.querySelector(".panel-content-wrapper");if(!t)return e.previousAbortController;let n=t;e.previousAbortController?.abort();let i=new AbortController,r=null,o="",s=null;function a(d){if(!r)return;let p=d.getRangeAt(0).getBoundingClientRect(),h=n.getBoundingClientRect(),m=p.left+p.width/2-h.left,g=p.top-h.top+n.scrollTop-32,b=r.offsetWidth||200;m=Math.max(8,Math.min(m-b/2,n.clientWidth-b-8)),g=Math.max(4,g),r.style.left=`${m}px`,r.style.top=`${g}px`}function l(d){s&&(clearTimeout(s),s=null),r||(r=document.createElement("div"),r.className="selection-hint",r.textContent="AI can see your selection",n.appendChild(r)),r.classList.add("visible"),a(d)}function u(){r&&(r.classList.remove("visible"),s=setTimeout(()=>{r?.remove(),r=null},200))}function c(d){let f=d.anchorNode?.parentElement?.closest(".code-line"),p=d.focusNode?.parentElement?.closest(".code-line");if(f&&p){let h=parseInt(f.dataset.line??"",10),m=parseInt(p.dataset.line??"",10);if(!isNaN(h)&&!isNaN(m)){let g=Math.min(h,m),b=Math.max(h,m);return g===b?`line ${g}`:`lines ${g}\u2013${b}`}}return""}return document.addEventListener("selectionchange",()=>{let d=document.getSelection();if(!d||d.isCollapsed){o&&(o="",e.updateContext?.(""),u());return}let f=d.toString().trim();if(!f||f===o)return;let p=n.contains(d.anchorNode),h=n.contains(d.focusNode);if(!p&&!h){o&&(o="",e.updateContext?.(""),u());return}o=f;let m=c(d),g=m?` (${m})`:"",b=`User selected text from file ${e.payload.filePath}${g}:
383
+ \`\`\`
384
+ ${f}
385
+ \`\`\``;e.updateContext?.(b),l(d),e.trackUiEvent?.("text_selected",{file_type:e.payload.fileType,file_extension:e.getFileExtensionForAnalytics(e.payload.filePath),char_count:f.length})},{signal:i.signal}),i}function Qv(e,t){Array.from(e.querySelectorAll("[data-toc-id]")).forEach(i=>{let r=i.dataset.tocId===t;i.classList.toggle("is-active",r),i.setAttribute("aria-current",r?"location":"false")})}function y3(e,t){return e.map(n=>`<button class="document-outline-link markdown-toc-link${n.id===t?" is-active":""}" type="button" data-toc-id="${fn(n.id)}" data-level="${n.level}" aria-current="${n.id===t?"location":"false"}">${fn(n.text)}</button>`).join("")}function k3(){return'<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="15 18 9 12 15 6"/></svg>'}function VK(){return'<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="9 18 15 12 9 6"/></svg>'}function x3(e,t){return e.length===0?"":`
386
+ <aside class="document-outline-shell markdown-toc-shell" aria-label="Table of contents">
387
+ <div class="document-outline-header markdown-toc-header">
388
+ <span class="document-outline-title markdown-toc-title">Contents</span>
389
+ <button class="document-outline-toggle" id="toc-toggle" type="button" title="Collapse sidebar" aria-label="Collapse sidebar">${k3()}</button>
390
+ </div>
391
+ <nav class="document-outline-nav markdown-toc-nav">${y3(e,t)}</nav>
392
+ </aside>
393
+ `}function _3(e){let t=e.shell.querySelector(".document-outline-nav");if(!t)return null;let n=e.outline,i=a=>{let c=a.target?.closest("[data-toc-id]")?.dataset.tocId;c&&(e.onSelect(c),Qv(t,c))},r=()=>{let a=n.map(c=>{let d=document.getElementById(c.id);return d?{item:c,element:d}:null}).filter(c=>c!==null);if(a.length===0)return;let l=e.scrollContainer.scrollTop,u=a.reduce((c,d)=>d.element.offsetTop-l<=96?d.item.id:c,a[0].item.id);Qv(t,u)},o=e.shell.querySelector("#toc-toggle"),s=()=>{let a=e.shell.classList.toggle("markdown-toc-collapsed");o&&(o.innerHTML=a?VK():k3(),o.title=a?"Expand sidebar":"Collapse sidebar",o.setAttribute("aria-label",a?"Expand sidebar":"Collapse sidebar"))};return o?.addEventListener("click",s),t.addEventListener("click",i),e.scrollContainer.addEventListener("scroll",r,{passive:!0}),r(),{dispose:()=>{t.removeEventListener("click",i),e.scrollContainer.removeEventListener("scroll",r),o?.removeEventListener("click",s)},refresh:(a,l)=>{n=a,t.innerHTML=y3(n,l),Qv(t,l??null),r()}}}function w3(e){if(!e)return"";let t=Array.isArray(e.children)?e.children:[];return t.length===0?typeof e.content=="string"?e.content:"":t.map(n=>typeof n.content=="string"?n.content:"").join("")}var KK=Kr;function $f(e={}){return new KK({html:!1,linkify:!0,typographer:!1,...e.highlight?{highlight:e.highlight}:{}})}function Cf(e){return cl(e)}function Tf(e,t,n){let i=e[t];if(i?.type!=="heading_open"||typeof i.tag!="string")return null;let r=Number.parseInt(i.tag.replace(/^h/i,""),10);if(!Number.isFinite(r))return null;let o=e[t+1],s=w3(o).trim();if(!s)return null;let a=Array.isArray(i.map)?i.map:void 0;return{id:n(s),text:s,level:r,line:typeof a?.[0]=="number"?a[0]+1:t+1}}var JK=$f();function es(e){let t=JK.parse(Cf(e),{}),n=Ui(),i=[];for(let r=0;r<t.length;r+=1){let o=Tf(t,r,n);o&&i.push(o)}return i}var pl=$f({highlight(e,t){let n=(t||"text").toLowerCase(),i=pc(e,n);return`<pre class="code-viewer"><code class="hljs language-${n}">${i}</code></pre>`}}),S3=pl.renderer.rules.heading_open;pl.renderer.rules.heading_open=(...e)=>{let t=e[0],n=e[1],i=e[2],r=e[3]??{},o=e[4],s=typeof r.nextSlug=="function"?r.nextSlug:Ui();r.nextSlug=s;let a=Tf(t,n,s),l=t[n];return a&&(l.attrSet?.("id",a.id),l.attrSet?.("data-heading-id",a.id)),typeof S3=="function"?S3(...e):o.renderToken(t,n,i)};var E3=pl.renderer.rules.link_open;pl.renderer.rules.link_open=(...e)=>{let t=e[0],n=e[1],i=e[2],r=e[4],o=t[n];o.attrSet?.("data-markdown-link","true");let s=o.attrGet?.("title");if(s?.startsWith("mcp-wiki:")){let a=decodeURIComponent(s.slice(9));o.attrSet?.("data-wiki-link",a),Array.isArray(o.attrs)&&(o.attrs=o.attrs.filter(([l])=>l!=="title"))}return typeof E3=="function"?E3(...e):r.renderToken(t,n,i)};function $3(e){return pl.render(Cf(e),{nextSlug:Ui()})}function C3(e){return $3(e).replace(/<\s*br\s*\/?>/gi,`
394
+ `).replace(/<\/p>/gi,`
395
+
396
+ `).replace(/<\/h[1-6]>/gi,`
397
+
398
+ `).replace(/<\/li>/gi,`
399
+ `).replace(/<li>/gi,"- ").replace(/<[^>]+>/g,"").replace(/&nbsp;/g," ").replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&#39;/g,"'").replace(/&quot;/g,'"').replace(/\n{3,}/g,`
400
+
401
+ `).trim()}var I3=40;function GK(e,t){return e.length!==t.length?!1:e.every((n,i)=>{let r=t[i];return n.id===r.id&&n.text===r.text&&n.level===r.level&&n.line===r.line})}function XK(e){return e.split(`
402
+ `).map(t=>t.trim()).filter(Boolean)}function YK(e){return e.split(`
403
+ `).map(t=>t.trim()).filter(t=>t.startsWith("\u{1F4C1} ")).map(t=>t.slice(3).trim())}function T3(e){return e.replace(/\.md$/i,"")}function QK(e,t){let n=e.length,i=t.length,r=Array.from({length:n+1},()=>Array(i+1).fill(0));for(let d=1;d<=n;d+=1)for(let f=1;f<=i;f+=1)r[d][f]=e[d-1]===t[f-1]?r[d-1][f-1]+1:Math.max(r[d-1][f],r[d][f-1]);let o=[],s=n,a=i;for(;s>0&&a>0;)e[s-1]===t[a-1]?(o.unshift([s-1,a-1]),s-=1,a-=1):r[s-1][a]>=r[s][a-1]?s-=1:a-=1;let l=[],u=0,c=0;for(let[d,f]of o)(d>u||f>c)&&l.push({oldStart:u,oldEnd:d,newStart:c,newEnd:f}),u=d+1,c=f+1;return(u<n||c<i)&&l.push({oldStart:u,oldEnd:n,newStart:c,newEnd:i}),l}function eJ(e,t){if(e.length<=1)return e;let n=[{...e[0]}];for(let i=1;i<e.length;i+=1){let r=n[n.length-1],o=e[i];if(o.oldStart-r.oldEnd<t){r.oldEnd=o.oldEnd,r.newEnd=o.newEnd;continue}n.push({...o})}return n}function A3(e){let t=e.map(i=>({fromLine:Math.max(1,Math.floor(i.fromLine)),toLine:Math.max(1,Math.floor(i.toLine))})).sort((i,r)=>i.fromLine-r.fromLine||i.toLine-r.toLine),n=[];for(let i of t){let r={fromLine:Math.min(i.fromLine,i.toLine),toLine:Math.max(i.fromLine,i.toLine)},o=n[n.length-1];o&&r.fromLine<=o.toLine+1?o.toLine=Math.max(o.toLine,r.toLine):n.push(r)}return n}function tJ(e,t){if(t.length===0)return!0;let n=Math.min(e.oldStart,e.newStart)+1,i=Math.max(e.oldEnd,e.newEnd)+1;return t.some(r=>n<=r.toLine&&i>=r.fromLine)}function nJ(e,t){return ey(e,t,0,e.length,0,t.length)}function ey(e,t,n,i,r,o){for(;n<i&&r<o&&e[n]===t[r];)n++,r++;for(;n<i&&r<o&&e[i-1]===t[o-1];)i--,o--;if(n===i&&r===o)return[];let s=new Map,a=new Map;for(let l=n;l<i;l+=1){let u=s.get(e[l]);s.set(e[l],{count:(u?.count??0)+1,index:l})}for(let l=r;l<o;l+=1){let u=a.get(t[l]);a.set(t[l],{count:(u?.count??0)+1,index:l})}for(let l=n;l<i;l+=1){let u=s.get(e[l]),c=a.get(e[l]);if(u?.count===1&&c?.count===1)return[...ey(e,t,n,l,r,c.index),...ey(e,t,l+1,i,c.index+1,o)]}return[{oldStart:n,oldEnd:i,newStart:r,newEnd:o}]}function M3(e,t){let n=e.split(`
404
+ `),i=t.split(`
405
+ `),r=Math.ceil(Math.max(n.length,i.length)/I3),o=[];for(let s=0;s<r;s+=1){let a=Math.floor(s*n.length/r),l=Math.floor((s+1)*n.length/r),u=Math.floor(s*i.length/r),c=Math.floor((s+1)*i.length/r),d=n.slice(a,l).join(`
406
+ `),f=i.slice(u,c).join(`
407
+ `);d!==f&&o.push({old_string:d,new_string:f})}return o}function rJ(e){return e.flatMap(t=>Math.max(t.old_string.split(`
408
+ `).length,t.new_string.split(`
409
+ `).length)>I3?M3(t.old_string,t.new_string):[t])}function iJ(e,t,n=[]){if(e===t)return[];let i=e.split(`
410
+ `),r=t.split(`
411
+ `),o=i.length*r.length>1e6?nJ(i,r):QK(i,r);if(o.length===0)return[];let s=3,a=A3(n),u=eJ(o,s*2+1).filter(c=>tJ(c,a)).map(c=>{let d=Math.max(0,c.oldStart-s),f=Math.min(i.length,c.oldEnd+s),p=i.slice(d,f).join(`
412
+ `),h=[...i.slice(d,c.oldStart),...r.slice(c.newStart,c.newEnd),...i.slice(c.oldEnd,f)].join(`
413
+ `);return{old_string:p,new_string:h}}).filter(c=>c.old_string!==c.new_string);return u.length===1&&u[0].old_string===e&&u[0].new_string===t?M3(e,t):rJ(u)}function oJ(e,t){return t.reduce((n,i)=>n.replace(i.old_string,i.new_string),e)}function sJ(e){return typeof e=="object"&&e!==null}function aJ(e){if(!sJ(e)||e.isError!==!0)return!1;let t=Kt(e)?.toLowerCase()??"";return t.includes("not found")||t.includes("no such file")||t.includes("enoent")}function z3(e){let t,n,i,r=null,o=1e3;function s(){r!==null&&clearTimeout(r),r=setTimeout(()=>{r=null,I()},o)}function a(){r!==null&&(clearTimeout(r),r=null)}function l(){a(),n?.destroy(),n=void 0,i?.dispose(),i=void 0}function u(){t=void 0,l()}function c(_){return Qe(_.content)}function d(_,S,O={}){let L=O.keepDraft?_.draftContent:S;_.sourceContent=S,_.fullDocumentContent=S,_.draftContent=L,_.outline=es(S),_.dirty=L!==S,_.dirtyLineRanges=[],_.fileDeleted=!1,_.outline.some(ne=>ne.id===_.activeHeadingId)||(_.activeHeadingId=_.outline[0]?.id??null)}async function f(_,S,O){let L=await e.callTool?.("read_file",{path:_,...typeof S=="number"?{offset:O??0,length:S}:{},origin:"ui"});return{rawResult:L,payload:gc(L)??null}}async function p(_,S,O){return(await f(_,S,O)).payload}async function h(_){let S=Vt(_.content);return S?.isPartial?await p(_.filePath,S.totalLines)??_:_}async function m(_){let S=await p(_);return S?h(S):null}function g(_){let S=Qe(_.content);if(!t||t.filePath!==_.filePath||t.sourceContent!==S){let O=es(S);t={filePath:_.filePath,sourceContent:S,fullDocumentContent:S,draftContent:S,outline:O,mode:"edit",dirty:!1,dirtyLineRanges:[],activeHeadingId:O[0]?.id??null,pendingAnchor:null,notice:null,error:null,saving:!1,loadingDocument:!1,editorView:"markdown",editorScrollTop:0,saveIndicator:"idle",fileDeleted:!1}}return t}function b(_){return _.draftContent!==_.fullDocumentContent}function v(_){let S=g(_),O=S.outline,ne=e.getCurrentDisplayMode()==="fullscreen"?x3(O,S.activeHeadingId):"";return!S.activeHeadingId&&O.length>0&&(S.activeHeadingId=O[0].id),{notice:[S.error,S.notice].find(Ee=>typeof Ee=="string"&&Ee.trim().length>0),html:`
414
+ <div class="panel-content markdown-content markdown-content--workspace">
415
+ <div class="markdown-workspace markdown-workspace--edit${ne?" markdown-workspace--with-toc":""}">
416
+ ${ne}
417
+ <section class="markdown-workspace-main markdown-workspace-main--editor">
418
+ ${o3({view:S.editorView})}
419
+ </section>
420
+ </div>
421
+ </div>
422
+ `}}async function y(_){let S=j4(_),O=new Set(["[DIR] .git","[DIR] .obsidian","[FILE] package.json","[FILE] pnpm-workspace.yaml","[FILE] turbo.json"]);for(let L of S)try{let ne=await e.callTool?.("list_directory",{path:L,depth:1,origin:"ui"}),Y=Kt(ne)??"";if(XK(Y).some(dt=>O.has(dt)))return L}catch{}return ji(_)}async function x(_,S){let O=S.trim();if(O.length===0)return[];let L=await y(_),ne=await e.callTool?.("start_search",{path:L,pattern:O,searchType:"files",filePattern:"*.md",maxResults:20,earlyTermination:!1,literalSearch:!0,origin:"ui"}),Y=Kt(ne)??"",Ee=YK(Y),dt=ji(_);return Ee.map(ve=>{let Oe=ve.replace(/\\/g,"/"),kt=Oe.split("/").pop()??Oe,It=T3(kt),Ge=Z4(dt,Oe),De=T3(Ge.startsWith("./")?Ge.slice(2):Ge);return{path:Oe,title:It,wikiPath:De,relativePath:Ge}})}async function C(_,S){if(S===_&&t)return t.outline.map(L=>({id:L.id,text:L.text}));let O=await m(S);return O?es(c(O)).map(L=>({id:L.id,text:L.text})):[]}function A(_){let S=_.trim();return S?document.getElementById(S)??document.getElementById(Bi(S)):null}function D(_){let S=A(_);if(!S)return!1;let O=[],L=S.parentElement;for(;L;){let Ee=window.getComputedStyle(L).overflowY;(Ee==="auto"||Ee==="scroll"||Ee==="overlay")&&L.scrollHeight>L.clientHeight&&O.push(L),L=L.parentElement}S.scrollIntoView({block:"start",inline:"nearest"});for(let Y of O){let Ee=Y.getBoundingClientRect(),dt=S.getBoundingClientRect(),ve=Math.max(Y.scrollTop+(dt.top-Ee.top)-24,0);Y.scrollTop=ve}let ne=document.scrollingElement;if(ne){let Y=S.getBoundingClientRect().top,Ee=Math.max(ne.scrollTop+Y-24,0);ne.scrollTop=Ee}return S.setAttribute("tabindex","-1"),S.focus({preventScroll:!0}),t&&(t.activeHeadingId=S.id||Bi(_)),!0}function M(){let _=t?.pendingAnchor;!t||!_||(t.pendingAnchor=null,D(_)||(t.error=`Heading not found: ${_}`,e.rerender()))}function V(_,S,O,L){e.updateSaveStatus(_,S),window.setTimeout(()=>{L&&!L()||e.updateSaveStatus("","")},O)}async function me(_){try{let S=Vt(_.content),{rawResult:O,payload:L}=S?.isPartial?await f(_.filePath,S.toLine-S.fromLine+1,S.readOffset):await f(_.filePath);if(!L){aJ(O)&&(t&&(t.fileDeleted=!0),e.updateSaveStatus("File deleted","saved"));return}let ne=c(L),Y=c(_);if(ne===Y)return;e.storePayloadOverride(L),t=void 0,e.rerender()}catch{}}async function et(_,S={}){let O=g(_),L=Vt(_.content);if(!L?.isPartial){S.keepEditMode&&(O.mode="edit",O.editorView="markdown",O.notice=null,O.error=null,O.draftContent=O.sourceContent,O.dirty=!1,e.rerender());return}O.loadingDocument=!0,O.notice="Loading full document\u2026",O.error=null,e.rerender();try{let ne=await p(_.filePath,L.totalLines);if(!ne){O.error="Failed to load the full document.",O.notice=null,O.loadingDocument=!1,e.rerender();return}e.syncPayload?.(ne);let Y=g(ne);Y.loadingDocument=!1,Y.notice=null,Y.error=null,d(Y,Y.sourceContent),S.keepEditMode&&(Y.mode="edit",Y.editorView="markdown",e.rerender())}catch{O.loadingDocument=!1,O.notice=null,O.error="Failed to load the full document.",e.rerender()}}async function it(_,S){let O=g(_);if(O.dirty&&!window.confirm("Discard unsaved changes and follow this link?"))return;let L=J4(_.filePath,S);if(O.notice=null,O.error=null,L.kind==="external"&&L.url){if(!await e.openExternalLink?.(L.url))try{window.open(L.url,"_blank","noopener")}catch{}return}if(L.kind==="anchor"&&L.anchor){!D(L.anchor)&&t&&(t.error=`Heading not found: ${L.anchor}`,e.rerender());return}if(L.kind==="file"&&L.targetPath){if(await e.openExternalLink?.(L.targetPath))return;let Y=await p(L.targetPath);if(!Y){t&&(t.error=`Unable to open ${L.targetPath}.`,e.rerender());return}e.syncPayload?.(Y);let Ee=g(Y);Ee.pendingAnchor=L.anchor??null,Ee.error=null,Ee.notice=null,e.rerender()}}async function je(_){let S=g(_);if(S.error=null,S.notice=null,LC(_.content)){await et(_,{keepEditMode:!0});return}S.mode="edit",S.draftContent=S.fullDocumentContent,S.dirty=!1,S.editorView="markdown",e.setExpanded(!0),e.rerender()}async function Me(){return hc({availableDisplayModes:e.getAvailableDisplayModes()}).canFullscreen?await e.requestDisplayMode?.("fullscreen")==="fullscreen":!1}function se(){if(!t)return;let _=t.filePath;t.draftContent=t.fullDocumentContent,t.dirty=!1,t.dirtyLineRanges=[],t.error=null,t.notice=null,e.rerender(),V("Reverted","saved",1500),e.trackUiEvent?.("markdown_reverted",{file_extension:Ut(_)})}async function I(){if(!t||t.saving||!t.dirty||t.fileDeleted)return;a();let _=t;_.saving=!0,_.saveIndicator="saving",_.error=null,_.notice=null;try{let S=iJ(_.fullDocumentContent,_.draftContent,_.dirtyLineRanges);if(S.length===0){_.saving=!1,_.saveIndicator="idle",_.dirty=!1,_.dirtyLineRanges=[];return}let O=0,L=[],ne=null;for(let ve of S)try{let Oe=await e.callTool?.("edit_block",{file_path:_.filePath,old_string:ve.old_string,new_string:ve.new_string,expected_replacements:1,origin:"ui"});FC(Oe),O++}catch(Oe){L.push(ve),ne=Oe}if(L.length>0){let ve=new Error(`${O} of ${S.length} edit${S.length===1?"":"s"} applied; ${L.length} could not land because the text changed on disk.`);throw ve.appliedCount=O,ve.skippedCount=L.length,ve.totalCount=S.length,ve.underlyingError=ne,ve}let Y=oJ(_.fullDocumentContent,S);_.fullDocumentContent=Y,_.sourceContent=Y,_.draftContent=Y,_.outline=es(_.sourceContent),_.dirty=!1,_.dirtyLineRanges=[],_.saving=!1,_.saveIndicator="saved",_.outline.some(ve=>ve.id===_.activeHeadingId)||(_.activeHeadingId=_.outline[0]?.id??null);let Ee=e.getCurrentPayload();if(Ee){let Oe=Ee.content.match(/^(\[Reading [^\]]+\]\r?\n(?:\r?\n)?)/)?.[1]??"";e.storePayloadOverride({...Ee,content:Oe+Y})}let dt=document.getElementById("revert-markdown");dt&&(dt.disabled=!b(_)),V("Saved","saved",1800,()=>!_.dirty&&!_.saving?(_.saveIndicator="idle",!0):!1),e.trackUiEvent?.("markdown_saved",{file_extension:Ut(_.filePath),blocks:S.length})}catch(S){_.saving=!1,_.saveIndicator="idle";let O=S,L=typeof O.appliedCount=="number"?O.appliedCount:0,ne=typeof O.skippedCount=="number"?O.skippedCount:0,Y=typeof O.totalCount=="number"?O.totalCount:0,Ee=L>0&&ne>0,dt=L===0&&ne>0,ve=await m(_.filePath).catch(()=>null),Oe=!1,kt=null;if(ve){let It=c(ve);It!==_.fullDocumentContent&&(d(_,It,{keepDraft:!0}),e.storePayloadOverride(ve),Oe=!0,kt=It)}if(_.notice=null,Ee)_.error=`${L} of ${Y} edit${Y===1?"":"s"} saved. ${ne} ${ne===1?"edit":"edits"} did not apply because that text changed on disk \u2014 your draft still has them; save again to merge.`,e.rerender(),V("Saved (partial)","saved",3e3),e.trackUiEvent?.("markdown_save_partial",{file_extension:Ut(_.filePath),applied:L,skipped:ne,total:Y});else if(dt&&Oe&&e.showConflictDialog&&kt!==null){let It=kt,De=_.filePath.replace(/\\/g,"/").split("/").pop()||_.filePath;_.error=null,e.rerender(),e.trackUiEvent?.("markdown_save_conflict_shown",{file_extension:Ut(_.filePath)}),e.showConflictDialog({fileName:De,onUseDiskVersion:()=>{t===_&&(d(_,It),e.rerender()),e.trackUiEvent?.("markdown_save_conflict_resolved",{file_extension:Ut(_.filePath),action:"use_disk"})},onSaveMyChanges:()=>{e.trackUiEvent?.("markdown_save_conflict_resolved",{file_extension:Ut(_.filePath),action:"save_mine"}),I()},onCancel:()=>{t===_&&(_.error="File changed on disk. Save again to merge your edits, or reopen to discard them.",e.rerender()),e.trackUiEvent?.("markdown_save_conflict_resolved",{file_extension:Ut(_.filePath),action:"dismissed"})}})}else _.error=Oe?"File changed on disk. Save again to merge your edits, or reopen the file to discard them.":S instanceof Error?S.message:"Save failed.",e.rerender(),V("Save failed","saving",3e3);e.trackUiEvent?.("markdown_save_failed",{file_extension:Ut(_.filePath),reloaded_from_disk:Oe,applied:L,skipped:ne,total:Y})}}function W(_,S){let O=g(_),L=document.querySelector(".panel-content-wrapper");O.editorScrollTop=L?.scrollTop??0;let ne=O.editorView;O.editorView=S,O.notice=null,O.error=null,e.rerender(),ne!==S&&e.trackUiEvent?.("markdown_view_toggled",{file_extension:Ut(_.filePath),view:S}),typeof O.editorScrollTop=="number"&&window.requestAnimationFrame(()=>{let Y=document.querySelector(".panel-content-wrapper");Y&&(Y.scrollTop=O.editorScrollTop)})}function Z(_){let S=g(_),O=document.querySelector(".panel-content-wrapper"),L=S.outline,ne=Ut(_.filePath),Y=!1;{let ve=document.getElementById("markdown-editor-root");ve&&(n=s3({target:ve,value:S.draftContent,view:S.editorView,initialScrollTop:S.editorScrollTop,currentFilePath:_.filePath,searchLinks:Ge=>x(_.filePath,Ge),loadHeadings:Ge=>C(_.filePath,Ge),onChange:(Ge,De)=>{if(Ge===S.draftContent)return;if(S.draftContent=Ge,S.dirty=Ge!==S.fullDocumentContent,S.dirty){let Dn=De&&De.length>0?De:[{fromLine:1,toLine:Ge.split(`
423
+ `).length}];S.dirtyLineRanges=A3([...S.dirtyLineRanges,...Dn])}else S.dirtyLineRanges=[];S.dirty&&!Y&&(Y=!0,e.trackUiEvent?.("markdown_edit_started",{file_extension:ne,view:S.editorView})),S.dirty&&s();let Xe=es(Ge);GK(S.outline,Xe)||(S.outline=Xe,S.outline.some(Dn=>Dn.id===S.activeHeadingId)||(S.activeHeadingId=S.outline[0]?.id??null),i?.refresh(S.outline,S.activeHeadingId)),S.dirty&&S.saveIndicator==="saved"&&(S.saveIndicator="idle");let Zi=document.getElementById("revert-markdown");Zi&&(Zi.disabled=!b(S))},onBlur:()=>{S.dirty&&(a(),I())}}),n.focus()),document.getElementById("revert-markdown")?.addEventListener("click",()=>{se()}),document.getElementById("markdown-mode-raw")?.addEventListener("click",()=>{W(_,"raw")}),document.getElementById("markdown-mode-markdown")?.addEventListener("click",()=>{W(_,"markdown")})}document.getElementById("expand-fullscreen")?.addEventListener("click",()=>{Me()}),O&&O.addEventListener("click",ve=>{let kt=ve.target?.closest("a[href]");if(!kt||!kt.closest(".markdown-doc"))return;let It=kt.getAttribute("href");It&&(ve.preventDefault(),it(_,It))});let dt=document.querySelector(".document-outline-shell");dt&&O&&(i=_3({shell:dt,outline:L,scrollContainer:O,onSelect:ve=>{let Oe=S.outline.find(kt=>kt.id===ve);Oe&&typeof Oe.line=="number"&&(n?.revealLine(Oe.line,Oe.id),S.activeHeadingId=Oe.id)}})??void 0),window.setTimeout(()=>{M()},0)}function ee(_){let S=g(_),O=S.draftContent;return S.editorView==="raw"?O:C3(O)||O}async function ue(_){let S=t?.saveIndicator==="saved"||t?.dirty;if(t&&(t.notice=null,t.editorView="markdown"),S&&_){let O=Vt(_.content);if(O?.isPartial){let L=await p(_.filePath,O.toLine-O.fromLine+1,O.readOffset);if(L)return L}}}return{attachHandlers:Z,buildBody:v,clear:u,disposeHandles:l,ensureCompletePayload:h,getCopyText:ee,getState:g,handleInlineExitFromFullscreen:ue,isUndoAvailable:b,readCompletePayload:m,readPayload:p,readPayloadContent:c,refreshFromDisk:me,requestEditMode:je,requestFullscreen:Me,saveDocument:I,setEditorView:W}}function D3(){return`
424
+ <div class="md-conflict-modal" id="md-conflict-modal" role="dialog" aria-modal="true" aria-labelledby="md-conflict-title" aria-describedby="md-conflict-body" hidden>
425
+ <div class="md-conflict-card">
426
+ <header class="md-conflict-header">
427
+ <h3 id="md-conflict-title">\u26A0 This file changed on disk</h3>
428
+ <button type="button" class="md-conflict-close" id="md-conflict-close" aria-label="Close">
429
+ <svg viewBox="0 0 24 24" aria-hidden="true" focusable="false">
430
+ <path d="M7 7l10 10M17 7L7 17" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>
431
+ </svg>
432
+ </button>
433
+ </header>
434
+ <div class="md-conflict-body" id="md-conflict-body">
435
+ <p>
436
+ Something else modified
437
+ <strong class="md-conflict-filename" id="md-conflict-filename"></strong>
438
+ while you were editing. Your unsaved edits are preserved.
439
+ </p>
440
+ <p>If you save now:</p>
441
+ <ul>
442
+ <li>Changes you made to lines the external edit didn't touch will be saved alongside the external changes.</li>
443
+ <li>Changes you made to lines that also changed externally will overwrite the external version on those lines.</li>
444
+ </ul>
445
+ </div>
446
+ <footer class="md-conflict-footer">
447
+ <button type="button" class="md-conflict-btn md-conflict-btn--secondary" id="md-conflict-use-disk">
448
+ Use disk version
449
+ </button>
450
+ <button type="button" class="md-conflict-btn md-conflict-btn--primary" id="md-conflict-save-mine">
451
+ Save my changes
452
+ </button>
453
+ </footer>
454
+ </div>
455
+ </div>
456
+ `}function N3(e){let{container:t}=e,n=t.querySelector("#md-conflict-modal"),i=t.querySelector("#md-conflict-filename"),r=t.querySelector("#md-conflict-use-disk"),o=t.querySelector("#md-conflict-save-mine"),s=t.querySelector("#md-conflict-close"),a=null,l=null,u=()=>{if(!n||n.hidden)return;n.hidden=!0,document.removeEventListener("keydown",c,!0),n.removeEventListener("click",d);let h=a?.onCancel;if(a=null,l&&document.contains(l))try{l.focus()}catch{}l=null,h?.()},c=h=>{if(!(!n||n.hidden)){if(h.key==="Escape"){h.stopPropagation(),h.preventDefault(),u();return}if(h.key==="Tab"){let m=[r,o,s].filter(x=>!!x);if(m.length===0)return;let g=document.activeElement,b=g?m.indexOf(g):-1,v=h.shiftKey?-1:1,y=b===-1?v===1?0:m.length-1:(b+v+m.length)%m.length;h.preventDefault(),m[y].focus()}}},d=h=>{h.target===n&&h.stopPropagation()},f=()=>{let h=a?.onUseDiskVersion;a=null,u(),h?.()},p=()=>{let h=a?.onSaveMyChanges;a=null,u(),h?.()};return r?.addEventListener("click",f),o?.addEventListener("click",p),s?.addEventListener("click",u),{open:h=>{if(!n){h.onCancel?.();return}a=h,i&&(i.textContent=h.fileName),l=document.activeElement??null,n.hidden=!1,document.addEventListener("keydown",c,!0),n.addEventListener("click",d),window.requestAnimationFrame(()=>{o?.focus()})},close:u,isOpen:()=>!!n&&!n.hidden}}function O3(e){let t=b=>e.container.querySelector(`#${b}`),n=b=>{let v=document.createElement("textarea");v.value=b,v.setAttribute("readonly",""),v.style.position="fixed",v.style.top="-9999px",document.body.appendChild(v),v.select();let y=document.execCommand("copy");return document.body.removeChild(v),y},i=(b,v,y,x)=>{b.setAttribute("title",v),b.setAttribute("aria-label",v),b.textContent=v,x&&setTimeout(()=>{b.textContent=y,b.setAttribute("title",y),b.setAttribute("aria-label",y)},x)},r=(b,v,y,x)=>{b.setAttribute("title",v),b.setAttribute("aria-label",v),b.dataset.status=v,x&&setTimeout(()=>{b.setAttribute("title",y),b.setAttribute("aria-label",y),delete b.dataset.status},x)},o=async b=>{try{return navigator.clipboard?.writeText?(await navigator.clipboard.writeText(b),!0):n(b)}catch{return n(b)}},s=e.getFileExtensionForAnalytics(e.payload.filePath),a=t("copy-source");a?.addEventListener("click",async()=>{e.trackUiEvent?.("copy_clicked",{file_type:e.payload.fileType,file_extension:s});let b=await o(Qe(e.payload.content));i(a,b?"Copied!":"Copy failed","Copy",1500)});let l=t("copy-active-markdown");l?.addEventListener("click",async()=>{let b=e.markdownController.getCopyText(e.payload);if(!b)return;let v=await o(b);v&&(e.updateSaveStatus("Copied","saved"),window.setTimeout(()=>e.updateSaveStatus("",""),1500)),r(l,v?"Copied!":"Copy failed","Copy",1500)}),t("toggle-html-mode")?.addEventListener("click",()=>{let b=e.htmlMode==="rendered"?"source":"rendered";e.trackUiEvent?.("html_view_toggled",{file_type:e.payload.fileType,file_extension:s}),e.render(e.payload,b,e.getIsExpanded())});let c=t("open-in-folder");if(c){let b=e.buildOpenInFolderCommand(e.payload.filePath);b?c.addEventListener("click",async()=>{e.trackUiEvent?.("open_in_folder",{file_type:e.payload.fileType,file_extension:s});try{await e.callTool?.("start_process",{command:b,timeout_ms:12e3,origin:"ui"})}catch{}}):c.disabled=!0}let d=t("open-in-editor");if(d){let b=e.buildOpenInEditorCommand(e.payload.filePath);b?d.addEventListener("click",async()=>{e.trackUiEvent?.("open_in_editor",{file_type:e.payload.fileType,file_extension:s});try{await e.callTool?.("start_process",{command:b,timeout_ms:12e3,origin:"ui"})}catch{}}):d.disabled=!0}let f=t("load-before"),p=t("load-after");if(!f&&!p)return;let h=Vt(e.payload.content);if(!h?.isPartial)return;let m=Qe(e.payload.content),g=async(b,v)=>{let y=b.textContent;b.textContent="Loading\u2026",b.disabled=!0,e.trackUiEvent?.(v==="before"?"load_lines_before":"load_lines_after",{file_type:e.payload.fileType,file_extension:s});try{let x=v==="before"?{path:e.payload.filePath,offset:0,length:h.fromLine-1,origin:"ui"}:{path:e.payload.filePath,offset:h.toLine,origin:"ui"},C=await e.callTool?.("read_file",x),A=Kt(C);if(A&&typeof A=="string"){let D=Qe(A),M=v==="before"?`${D}${D.endsWith(`
457
+ `)?"":`
458
+ `}${m}`:`${m}${m.endsWith(`
459
+ `)?"":`
460
+ `}${D}`,V=v==="before"?1:h.fromLine,me=v==="after"?h.totalLines:h.toLine,et=me-V+1,it=h.totalLines-me,Me=V>1||me<h.totalLines?`[Reading ${et} lines from ${V===1?"start":`line ${V}`} (total: ${h.totalLines} lines, ${it} remaining)]
461
+ `:"";e.render({...e.payload,content:Me+M},e.htmlMode,e.getIsExpanded());return}}catch{}b.textContent="Failed to load",setTimeout(()=>{b.textContent=y,b.disabled=!1},2e3)};f?.addEventListener("click",()=>{g(f,"before")}),p?.addEventListener("click",()=>{g(p,"after")})}var _n=!1,Mf=!1,_r,ns,sy,ay,L3,ly,uy,hl,yt,F3="rendered",vl,Af,B3,U3,Jr,ty,ny,ts,rs=null,ry=new Map;function lJ(e){return typeof e?.sourceTool=="string"?e.sourceTool:"read_file"}async function zf(e,t){return ay?ay(e,t):void 0}function j3(){let e=vl?.availableDisplayModes;return Array.isArray(e)?e.filter(t=>typeof t=="string"):[]}function is(){return typeof vl?.displayMode=="string"?vl.displayMode:null}function uJ(e){Jr=e,yt=e,U3?.(e)}function If(e){if(!Jr)return e;if(Jr.filePath!==e.filePath)return Jr=void 0,e;let t=Qe(e.content),n=Qe(Jr.content);return t===n?e:Jr}function Z3(e,t){let n=document.querySelector(".panel-save-status");if(e)if(n)n.textContent=e,n.className=`panel-save-status panel-save-status--${t}`;else{let i=document.querySelector(".panel-topbar-actions");if(i){let r=document.createElement("span");r.className=`panel-save-status panel-save-status--${t}`,r.textContent=e,i.prepend(r)}}else n&&n.remove()}var rn=z3({callTool:zf,openExternalLink:async e=>ly?ly(e):void 0,requestDisplayMode:async e=>uy?uy(e):void 0,getAvailableDisplayModes:j3,getCurrentDisplayMode:is,getCurrentPayload:()=>yt,setExpanded:e=>{_n=e},syncPayload:e=>B3?.(e),storePayloadOverride:uJ,rerender:()=>{Af?.()},updateSaveStatus:Z3,trackUiEvent:(e,t)=>ns?.(e,t),showConflictDialog:e=>{if(sy){sy.open(e);return}console.warn("[file-preview] conflictDialogController not ready; firing onCancel fallback"),e.onCancel?.()}}),cJ=["path","offset","length","sheet","range","isUrl"];function dJ(e){if(!e||typeof e!="object")return;let t=e,n=typeof t.path=="string"?t.path:typeof t.file_path=="string"?t.file_path:void 0;if(!n)return;let i={path:n};for(let r of cJ)r!=="path"&&t[r]!==void 0&&(i[r]=t[r]);return i}function fJ(e){if(!e||typeof e!="object")return;let t=e;if(t.old_string!==void 0||t.new_string!==void 0)return"edit_block";if(t.content!==void 0)return"write_file"}var R3=8e3,iy;async function P3(e,t,n){let i=typeof e.path=="string"?e.path:void 0;if(!i){n();return}if(iy!==i){iy=i;try{let r=await Promise.race([zf("read_file",{...e,origin:"ui"}),new Promise((s,a)=>{setTimeout(()=>a(new Error(`RPC read_file did not respond within ${R3}ms`)),R3)})]),o=gc(r);if(o){t(o);return}}catch{}finally{iy=void 0}n()}}var pJ=1e4,ml;function Df(){ml!==void 0&&(clearTimeout(ml),ml=void 0)}function gl(e,t){Df(),e.innerHTML=`
462
+ <main class="shell">
463
+ ${la({label:t,variant:"status",interactive:!1})}
464
+ </main>
465
+ `,document.body.classList.add("dc-ready")}function oy(e){e.innerHTML=`
466
+ <main class="shell">
467
+ ${la({label:"Preparing preview\u2026",variant:"loading",interactive:!1})}
468
+ </main>
469
+ `,document.body.classList.add("dc-ready"),Df(),ml=setTimeout(()=>{ml=void 0,gl(e,"Unable to generate preview in this environment.")},pJ)}function bl(e,t,n="rendered",i=!1){if(Df(),_n=i,F3=n,hl?.dispose(),hl=void 0,!t||t.fileType!=="markdown"?rn.clear():rn.disposeHandles(),!t){rs?.abort(),rs=null,yt=void 0,gl(e,"No preview available for this response."),_r?.();return}yt=t;let r=p3(t);!r.supportsPreview&&Mf&&(_n=!1);let o=Vt(t.content),s=h3({payload:t,htmlMode:n,startLine:o?.fromLine??1,markdownController:rn}),a=t.fileType==="markdown"?rn.getState(t):void 0,l=Ut(t.filePath),c=!(is()==="fullscreen")&&hc({availableDisplayModes:j3()}).canFullscreen;t.fileType==="markdown"&&t.defaultEditorName&&ry.set(t.filePath,{appName:t.defaultEditorName,appPath:t.defaultEditorPath});let d=t.fileType==="markdown"?ry.get(t.filePath):void 0,f=l3({payload:t,body:s,capabilities:r,fileExtension:l,htmlMode:n,currentDisplayMode:is(),isExpanded:_n,hideSummaryRow:Mf,markdownWorkspace:a,canGoFullscreen:c,isMarkdownUndoAvailable:a?rn.isUndoAvailable(a):!1,defaultMarkdownEditorName:d?.appName,markdownEditorAppIcon:b3(),hasDirectoryBackButton:!!ts});e.innerHTML=f.html,document.body.classList.add("dc-ready"),O3({container:e,payload:t,htmlMode:n,getIsExpanded:()=>_n,callTool:zf,trackUiEvent:ns,getFileExtensionForAnalytics:Ut,buildOpenInFolderCommand:m=>Yv(m,zr),buildOpenInEditorCommand:m=>g3(m,zr,ry),render:(m,g="rendered",b=_n)=>{bl(e,m,g,b)},updateSaveStatus:Z3,markdownController:rn}),t.fileType==="markdown"&&rn.attachHandlers(t),rs=v3({payload:t,isMarkdownEditing:t.fileType==="markdown"&&!!a,updateContext:L3,trackUiEvent:ns,getFileExtensionForAnalytics:Ut,previousAbortController:rs}),t.fileType==="directory"&&ZC({container:e,callTool:zf,buildOpenInFolderCommand:m=>Yv(m,zr),onOpenPayload:m=>{ts=t,bl(e,m,"rendered",!0)}});let p=document.getElementById("dir-back");if(p&&ts){let m=ts;p.addEventListener("click",()=>{ts=void 0,bl(e,m,"rendered",!0)})}t.fileType==="directory"&&(ts=void 0);let h=document.getElementById("compact-toggle");hl=B$({shell:document.getElementById("tool-shell"),compactRow:h,initialExpanded:f.effectiveExpanded,onToggle:m=>{_n=m,ns?.(m?"expand":"collapse",{file_type:t.fileType,file_extension:l})},onScrollAfterExpand:()=>{ns?.("scroll_after_expand",{file_type:t.fileType,file_extension:l})},onRender:_r}),_r?.()}function H3(){let e=document.getElementById("app");if(!e)return;if(oy(e),!document.getElementById("md-conflict-modal")){let b=document.createElement("div");b.innerHTML=D3();let v=b.firstElementChild;v&&document.body.appendChild(v)}sy=N3({container:document});let t=new pu({name:"MCP Device File Preview",version:"1.0.0"},{updateModelContext:{text:{}}},{autoResize:!0}),n={expanded:_n,hideSummaryRow:Mf},i=()=>{_n=n.expanded,Mf=n.hideSummaryRow},r=j$(b=>mc(b)&&typeof b.content=="string"),o=b=>{b&&r.write(b),bl(e,b,"rendered",_n)},s=()=>{let b=r.read();b&&(yt&&yt.filePath===b.filePath&&Qe(yt.content)===Qe(b.content)||o(b))};B3=o,U3=b=>{r.write(b)},Af=()=>{bl(e,yt,F3,_n)};let a,l,u,c=!1,d=!1,f=(b,v)=>{if(!d){if(d=!0,b){ty=b,o(b),b.fileType==="markdown"&&is()==="fullscreen"&&rn.requestEditMode(b),b.fileType==="markdown"&&rn.refreshFromDisk(b);return}gl(e,v??"No preview available for this response."),_r?.()}};_r=()=>{},ay=(b,v)=>t.callServerTool({name:b,arguments:v}),L3=b=>{let v=b?{content:[{type:"text",text:b}]}:{content:[]};t.updateModelContext(v).catch(()=>{})},ly=async b=>(await t.openLink({url:b})).isError!==!0,uy=async b=>{let v=await t.requestDisplayMode({mode:b});return typeof v.mode=="string"?v.mode:null};let p=q$((b,v)=>t.callServerTool({name:b,arguments:v}),{component:"file_preview"});ns=(b,v={})=>p(b,{tool_name:lJ(yt??ty),...v}),t.ontoolinput=b=>{let v=typeof b.arguments?.path=="string"?b.arguments.path:void 0,y=dJ(b.arguments);if(u=fJ(b.arguments),y&&(l=y),!d&&a&&v&&a.filePath===v){let x=a;a=void 0,f(x);return}oy(e),_r?.(),c=!1,y&&!u&&P3(y,x=>{c=!0,d?o(If(x)):f(If(x))},()=>{})},t.ontoolresult=b=>{if(a=void 0,c)return;let v=Kt(b),y=b?.isError===!0,x=l??(yt?.filePath?{path:yt.filePath}:void 0),C=D=>{c=!0;let M=u?{...D,sourceTool:u}:D;d?o(If(M)):f(If(M))},A=()=>{v&&(d?(gl(e,v),_r?.()):f(void 0,v))};if(!y&&x){oy(e),_r?.(),P3(x,C,A);return}A()},t.ontoolcancelled=b=>{f(void 0,b.reason??"Tool was cancelled.")};let h=()=>{document.visibilityState==="visible"&&s()},m=()=>{document.visibilityState!=="visible"&&s()},g=()=>{Df(),hl?.dispose(),hl=void 0,rn.disposeHandles(),rs?.abort(),rs=null,document.removeEventListener("visibilitychange",h),window.removeEventListener("focus",m)};document.addEventListener("visibilitychange",h),window.addEventListener("focus",m),t.onteardown=async()=>(g(),{}),H$({app:t,chrome:n,onContextApplied:()=>{let b=is();i(),vl=t.getHostContext();let v=is(),y=b!==v;if(b==="fullscreen"&&v==="inline"&&yt?.fileType==="markdown"){_n=!0,n.expanded=!0;let x=ny??ty;(x?Vt(x.content)?.isPartial===!0:!1)&&x?(Jr=x,yt=x,r.write(x),rn.handleInlineExitFromFullscreen(x).then(A=>{A&&(yt=A,Jr=A,r.write(A),Af?.())})):rn.handleInlineExitFromFullscreen(),ny=void 0}b!=="fullscreen"&&v==="fullscreen"&&yt?.fileType==="markdown"&&(ny=yt,Vt(yt.content)?.isPartial&&rn.requestEditMode(yt)),d&&y&&Af?.()},onConnected:()=>{vl=t.getHostContext(),a=r.read()??void 0}}).catch(()=>{gl(e,"Failed to connect to host."),_r?.()}),window.addEventListener("beforeunload",()=>{g()},{once:!0})}H3();})();