@likec4/mcp 1.55.1 → 1.56.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 (159) hide show
  1. package/README.md +2 -2
  2. package/bin/likec4-mcp.mjs +3 -0
  3. package/dist/chunks/libs/@chevrotain/gast.mjs +1 -0
  4. package/dist/chunks/libs/@chevrotain/regexp-to-ast.mjs +9 -0
  5. package/dist/chunks/libs/@chevrotain/utils.mjs +1 -0
  6. package/dist/chunks/libs/@hono/mcp.mjs +45 -0
  7. package/dist/chunks/libs/@hono/node-server.mjs +1 -0
  8. package/dist/chunks/libs/@logtape/logtape.mjs +4 -0
  9. package/dist/chunks/libs/@lume/kiwi.mjs +1 -0
  10. package/dist/chunks/libs/@modelcontextprotocol/sdk.mjs +12 -0
  11. package/dist/chunks/libs/@radix-ui/colors.mjs +1 -0
  12. package/dist/chunks/libs/@ungap/structured-clone.mjs +1 -0
  13. package/dist/chunks/libs/bail.mjs +1 -0
  14. package/dist/chunks/libs/ccount.mjs +1 -0
  15. package/dist/chunks/libs/chevrotain-allstar.mjs +2 -0
  16. package/dist/chunks/libs/chevrotain.mjs +58 -0
  17. package/dist/chunks/libs/chokidar.mjs +3 -0
  18. package/dist/chunks/libs/chroma-js.mjs +15 -0
  19. package/dist/chunks/libs/citty.mjs +5 -0
  20. package/dist/chunks/libs/comma-separated-tokens.mjs +1 -0
  21. package/dist/chunks/libs/decode-named-character-reference.mjs +1 -0
  22. package/dist/chunks/libs/defu.mjs +1 -0
  23. package/dist/chunks/libs/destr.mjs +1 -0
  24. package/dist/chunks/libs/devlop.mjs +1 -0
  25. package/dist/chunks/libs/escape-string-regexp.mjs +1 -0
  26. package/dist/chunks/libs/eventemitter3.mjs +1 -0
  27. package/dist/chunks/libs/extend.mjs +1 -0
  28. package/dist/chunks/libs/fdir.mjs +1 -0
  29. package/dist/chunks/libs/graphology-dag.mjs +1 -0
  30. package/dist/chunks/libs/graphology.mjs +1 -0
  31. package/dist/chunks/libs/hast-util-sanitize.mjs +1 -0
  32. package/dist/chunks/libs/hast-util-to-html.mjs +9 -0
  33. package/dist/chunks/libs/hono.mjs +1 -0
  34. package/dist/chunks/libs/immer.mjs +1 -0
  35. package/dist/chunks/libs/is-error-instance.mjs +1 -0
  36. package/dist/chunks/libs/is-plain-obj.mjs +1 -0
  37. package/dist/chunks/libs/isexe.mjs +1 -0
  38. package/dist/chunks/libs/json5.mjs +14 -0
  39. package/dist/chunks/libs/khroma.mjs +1 -0
  40. package/dist/chunks/libs/langium.mjs +29 -0
  41. package/dist/chunks/libs/longest-streak.mjs +1 -0
  42. package/dist/chunks/libs/markdown-table.mjs +2 -0
  43. package/dist/chunks/libs/mdast-util-find-and-replace.mjs +1 -0
  44. package/dist/chunks/libs/mdast-util-from-markdown.mjs +3 -0
  45. package/dist/chunks/libs/mdast-util-gfm.mjs +15 -0
  46. package/dist/chunks/libs/mdast-util-to-hast.mjs +11 -0
  47. package/dist/chunks/libs/merge-error-cause.mjs +2 -0
  48. package/dist/chunks/libs/micromark-extension-gfm.mjs +1 -0
  49. package/dist/chunks/libs/mnemonist.mjs +1 -0
  50. package/dist/chunks/libs/nano-spawn.mjs +3 -0
  51. package/dist/chunks/libs/natural-compare-lite.mjs +9 -0
  52. package/dist/chunks/libs/ohash.mjs +1 -0
  53. package/dist/chunks/libs/p-limit.mjs +1 -0
  54. package/dist/chunks/libs/p-queue.mjs +1 -0
  55. package/dist/chunks/libs/p-timeout.mjs +1 -0
  56. package/dist/chunks/libs/parse-ms.mjs +1 -0
  57. package/dist/chunks/libs/pathe.mjs +1 -0
  58. package/dist/chunks/libs/pretty-ms.mjs +1 -0
  59. package/dist/chunks/libs/rehype-sanitize.mjs +1 -0
  60. package/dist/chunks/libs/rehype-stringify.mjs +1 -0
  61. package/dist/chunks/libs/remark-gfm.mjs +1 -0
  62. package/dist/chunks/libs/remark-github-blockquote-alert.mjs +3 -0
  63. package/dist/chunks/libs/remark-parse.mjs +1 -0
  64. package/dist/chunks/libs/remark-rehype.mjs +1 -0
  65. package/dist/chunks/libs/remeda.mjs +1 -0
  66. package/dist/chunks/libs/safe-stringify.mjs +1 -0
  67. package/dist/chunks/libs/strip-indent.mjs +1 -0
  68. package/dist/chunks/libs/tinyrainbow.mjs +1 -0
  69. package/dist/chunks/libs/trough.mjs +1 -0
  70. package/dist/chunks/libs/ts-graphviz.mjs +4 -0
  71. package/dist/chunks/libs/ufo.mjs +1 -0
  72. package/dist/chunks/libs/unified.mjs +1 -0
  73. package/dist/chunks/libs/unstorage.mjs +1 -0
  74. package/dist/chunks/libs/which.mjs +1 -0
  75. package/dist/chunks/libs/word-wrap.mjs +12 -0
  76. package/dist/chunks/rolldown-runtime.mjs +1 -0
  77. package/dist/chunks/src.mjs +1228 -0
  78. package/dist/cli.mjs +1 -1
  79. package/dist/index.mjs +1 -1
  80. package/package.json +21 -17
  81. package/dist/THIRD-PARTY-LICENSES.md +0 -2318
  82. package/dist/_chunks/libs/@chevrotain/cst-dts-gen.mjs +0 -30
  83. package/dist/_chunks/libs/@chevrotain/regexp-to-ast.mjs +0 -9
  84. package/dist/_chunks/libs/@chevrotain/utils.mjs +0 -1
  85. package/dist/_chunks/libs/@hono/mcp.mjs +0 -45
  86. package/dist/_chunks/libs/@hono/node-server.mjs +0 -1
  87. package/dist/_chunks/libs/@logtape/logtape.mjs +0 -4
  88. package/dist/_chunks/libs/@lume/kiwi.mjs +0 -1
  89. package/dist/_chunks/libs/@mantine/colors-generator.mjs +0 -15
  90. package/dist/_chunks/libs/@modelcontextprotocol/sdk.mjs +0 -12
  91. package/dist/_chunks/libs/@radix-ui/colors.mjs +0 -1
  92. package/dist/_chunks/libs/@ungap/structured-clone.mjs +0 -1
  93. package/dist/_chunks/libs/bail.mjs +0 -1
  94. package/dist/_chunks/libs/ccount.mjs +0 -1
  95. package/dist/_chunks/libs/chevrotain-allstar.mjs +0 -2
  96. package/dist/_chunks/libs/chevrotain.mjs +0 -58
  97. package/dist/_chunks/libs/chokidar.mjs +0 -3
  98. package/dist/_chunks/libs/citty.mjs +0 -5
  99. package/dist/_chunks/libs/comma-separated-tokens.mjs +0 -1
  100. package/dist/_chunks/libs/decode-named-character-reference.mjs +0 -1
  101. package/dist/_chunks/libs/defu.mjs +0 -1
  102. package/dist/_chunks/libs/destr.mjs +0 -1
  103. package/dist/_chunks/libs/devlop.mjs +0 -1
  104. package/dist/_chunks/libs/escape-string-regexp.mjs +0 -1
  105. package/dist/_chunks/libs/eventemitter3.mjs +0 -1
  106. package/dist/_chunks/libs/extend.mjs +0 -1
  107. package/dist/_chunks/libs/fast-equals.mjs +0 -1
  108. package/dist/_chunks/libs/fdir.mjs +0 -1
  109. package/dist/_chunks/libs/graphology-dag.mjs +0 -1
  110. package/dist/_chunks/libs/graphology.mjs +0 -1
  111. package/dist/_chunks/libs/hast-util-sanitize.mjs +0 -1
  112. package/dist/_chunks/libs/hast-util-to-html.mjs +0 -9
  113. package/dist/_chunks/libs/immer.mjs +0 -1
  114. package/dist/_chunks/libs/is-error-instance.mjs +0 -1
  115. package/dist/_chunks/libs/is-plain-obj.mjs +0 -1
  116. package/dist/_chunks/libs/isexe.mjs +0 -1
  117. package/dist/_chunks/libs/json5.mjs +0 -14
  118. package/dist/_chunks/libs/khroma.mjs +0 -1
  119. package/dist/_chunks/libs/langium.mjs +0 -30
  120. package/dist/_chunks/libs/longest-streak.mjs +0 -1
  121. package/dist/_chunks/libs/markdown-table.mjs +0 -2
  122. package/dist/_chunks/libs/mdast-util-find-and-replace.mjs +0 -1
  123. package/dist/_chunks/libs/mdast-util-from-markdown.mjs +0 -3
  124. package/dist/_chunks/libs/mdast-util-gfm.mjs +0 -15
  125. package/dist/_chunks/libs/mdast-util-to-hast.mjs +0 -11
  126. package/dist/_chunks/libs/merge-error-cause.mjs +0 -2
  127. package/dist/_chunks/libs/micromark-extension-gfm.mjs +0 -1
  128. package/dist/_chunks/libs/mnemonist.mjs +0 -1
  129. package/dist/_chunks/libs/nano-spawn.mjs +0 -3
  130. package/dist/_chunks/libs/natural-compare-lite.mjs +0 -9
  131. package/dist/_chunks/libs/ohash.mjs +0 -1
  132. package/dist/_chunks/libs/p-limit.mjs +0 -1
  133. package/dist/_chunks/libs/p-queue.mjs +0 -1
  134. package/dist/_chunks/libs/p-timeout.mjs +0 -1
  135. package/dist/_chunks/libs/parse-ms.mjs +0 -1
  136. package/dist/_chunks/libs/pathe.mjs +0 -1
  137. package/dist/_chunks/libs/pretty-ms.mjs +0 -1
  138. package/dist/_chunks/libs/rehype-sanitize.mjs +0 -1
  139. package/dist/_chunks/libs/rehype-stringify.mjs +0 -1
  140. package/dist/_chunks/libs/remark-gfm.mjs +0 -1
  141. package/dist/_chunks/libs/remark-github-blockquote-alert.mjs +0 -3
  142. package/dist/_chunks/libs/remark-parse.mjs +0 -1
  143. package/dist/_chunks/libs/remark-rehype.mjs +0 -1
  144. package/dist/_chunks/libs/remeda.mjs +0 -2
  145. package/dist/_chunks/libs/safe-stringify.mjs +0 -1
  146. package/dist/_chunks/libs/strip-indent.mjs +0 -1
  147. package/dist/_chunks/libs/tinyrainbow.mjs +0 -1
  148. package/dist/_chunks/libs/trough.mjs +0 -1
  149. package/dist/_chunks/libs/ts-graphviz.mjs +0 -4
  150. package/dist/_chunks/libs/ufo.mjs +0 -1
  151. package/dist/_chunks/libs/unified.mjs +0 -1
  152. package/dist/_chunks/libs/unstorage.mjs +0 -1
  153. package/dist/_chunks/libs/which.mjs +0 -1
  154. package/dist/_chunks/libs/word-wrap.mjs +0 -12
  155. package/dist/_chunks/rolldown-runtime.mjs +0 -1
  156. package/dist/_chunks/src.mjs +0 -1228
  157. /package/dist/{_chunks → chunks}/libs/character-entities-html4.mjs +0 -0
  158. /package/dist/{_chunks → chunks}/libs/character-entities-legacy.mjs +0 -0
  159. /package/dist/{_chunks → chunks}/libs/character-entities.mjs +0 -0
@@ -1 +0,0 @@
1
- import{EventEmitter as e}from"events";function t(){let e=arguments[0];for(let t=1,n=arguments.length;t<n;t++)if(arguments[t])for(let n in arguments[t])e[n]=arguments[t][n];return e}let n=t;typeof Object.assign==`function`&&(n=Object.assign);function r(e,t,n,r){let i=e._nodes.get(t),a=null;return i&&(a=r===`mixed`?i.out&&i.out[n]||i.undirected&&i.undirected[n]:r===`directed`?i.out&&i.out[n]:i.undirected&&i.undirected[n]),a}function i(e){return typeof e==`object`&&!!e}function a(e){let t;for(t in e)return!1;return!0}function o(e,t,n){Object.defineProperty(e,t,{enumerable:!1,configurable:!1,writable:!0,value:n})}function s(e,t,n){let r={enumerable:!0,configurable:!0};typeof n==`function`?r.get=n:(r.value=n,r.writable=!1),Object.defineProperty(e,t,r)}function c(e){return!(!i(e)||e.attributes&&!Array.isArray(e.attributes))}function l(){let e=Math.floor(Math.random()*256)&255;return()=>e++}function u(){let e=arguments,t=null,n=-1;return{[Symbol.iterator](){return this},next(){let r=null;do{if(t===null){if(n++,n>=e.length)return{done:!0};t=e[n][Symbol.iterator]()}if(r=t.next(),r.done){t=null;continue}break}while(!0);return r}}}function d(){return{[Symbol.iterator](){return this},next(){return{done:!0}}}}var f=class extends Error{constructor(e){super(),this.name=`GraphError`,this.message=e}},p=class e extends f{constructor(t){super(t),this.name=`InvalidArgumentsGraphError`,typeof Error.captureStackTrace==`function`&&Error.captureStackTrace(this,e.prototype.constructor)}},m=class e extends f{constructor(t){super(t),this.name=`NotFoundGraphError`,typeof Error.captureStackTrace==`function`&&Error.captureStackTrace(this,e.prototype.constructor)}},h=class e extends f{constructor(t){super(t),this.name=`UsageGraphError`,typeof Error.captureStackTrace==`function`&&Error.captureStackTrace(this,e.prototype.constructor)}};function g(e,t){this.key=e,this.attributes=t,this.clear()}g.prototype.clear=function(){this.inDegree=0,this.outDegree=0,this.undirectedDegree=0,this.undirectedLoops=0,this.directedLoops=0,this.in={},this.out={},this.undirected={}};function _(e,t){this.key=e,this.attributes=t,this.clear()}_.prototype.clear=function(){this.inDegree=0,this.outDegree=0,this.directedLoops=0,this.in={},this.out={}};function v(e,t){this.key=e,this.attributes=t,this.clear()}v.prototype.clear=function(){this.undirectedDegree=0,this.undirectedLoops=0,this.undirected={}};function y(e,t,n,r,i){this.key=t,this.attributes=i,this.undirected=e,this.source=n,this.target=r}y.prototype.attach=function(){let e=`out`,t=`in`;this.undirected&&(e=t=`undirected`);let n=this.source.key,r=this.target.key;this.source[e][r]=this,!(this.undirected&&n===r)&&(this.target[t][n]=this)},y.prototype.attachMulti=function(){let e=`out`,t=`in`,n=this.source.key,r=this.target.key;this.undirected&&(e=t=`undirected`);let i=this.source[e],a=i[r];if(a===void 0){i[r]=this,this.undirected&&n===r||(this.target[t][n]=this);return}a.previous=this,this.next=a,i[r]=this,this.target[t][n]=this},y.prototype.detach=function(){let e=this.source.key,t=this.target.key,n=`out`,r=`in`;this.undirected&&(n=r=`undirected`),delete this.source[n][t],delete this.target[r][e]},y.prototype.detachMulti=function(){let e=this.source.key,t=this.target.key,n=`out`,r=`in`;this.undirected&&(n=r=`undirected`),this.previous===void 0?this.next===void 0?(delete this.source[n][t],delete this.target[r][e]):(this.next.previous=void 0,this.source[n][t]=this.next,this.target[r][e]=this.next):(this.previous.next=this.next,this.next!==void 0&&(this.next.previous=this.previous))};function b(e,t,n,r,i,a,o){let s,c,l,u;if(r=``+r,n===0){if(s=e._nodes.get(r),!s)throw new m(`Graph.${t}: could not find the "${r}" node in the graph.`);l=i,u=a}else if(n===3){if(i=``+i,c=e._edges.get(i),!c)throw new m(`Graph.${t}: could not find the "${i}" edge in the graph.`);let n=c.source.key,d=c.target.key;if(r===n)s=c.target;else if(r===d)s=c.source;else throw new m(`Graph.${t}: the "${r}" node is not attached to the "${i}" edge (${n}, ${d}).`);l=a,u=o}else{if(c=e._edges.get(r),!c)throw new m(`Graph.${t}: could not find the "${r}" edge in the graph.`);s=n===1?c.source:c.target,l=i,u=a}return[s,l,u]}function x(e,t,n){e.prototype[t]=function(e,r,i){let[a,o]=b(this,t,n,e,r,i);return a.attributes[o]}}function S(e,t,n){e.prototype[t]=function(e,r){let[i]=b(this,t,n,e,r);return i.attributes}}function C(e,t,n){e.prototype[t]=function(e,r,i){let[a,o]=b(this,t,n,e,r,i);return a.attributes.hasOwnProperty(o)}}function w(e,t,n){e.prototype[t]=function(e,r,i,a){let[o,s,c]=b(this,t,n,e,r,i,a);return o.attributes[s]=c,this.emit(`nodeAttributesUpdated`,{key:o.key,type:`set`,attributes:o.attributes,name:s}),this}}function T(e,t,n){e.prototype[t]=function(e,r,i,a){let[o,s,c]=b(this,t,n,e,r,i,a);if(typeof c!=`function`)throw new p(`Graph.${t}: updater should be a function.`);let l=o.attributes;return l[s]=c(l[s]),this.emit(`nodeAttributesUpdated`,{key:o.key,type:`set`,attributes:o.attributes,name:s}),this}}function ee(e,t,n){e.prototype[t]=function(e,r,i){let[a,o]=b(this,t,n,e,r,i);return delete a.attributes[o],this.emit(`nodeAttributesUpdated`,{key:a.key,type:`remove`,attributes:a.attributes,name:o}),this}}function te(e,t,n){e.prototype[t]=function(e,r,a){let[o,s]=b(this,t,n,e,r,a);if(!i(s))throw new p(`Graph.${t}: provided attributes are not a plain object.`);return o.attributes=s,this.emit(`nodeAttributesUpdated`,{key:o.key,type:`replace`,attributes:o.attributes}),this}}function ne(e,t,r){e.prototype[t]=function(e,a,o){let[s,c]=b(this,t,r,e,a,o);if(!i(c))throw new p(`Graph.${t}: provided attributes are not a plain object.`);return n(s.attributes,c),this.emit(`nodeAttributesUpdated`,{key:s.key,type:`merge`,attributes:s.attributes,data:c}),this}}function re(e,t,n){e.prototype[t]=function(e,r,i){let[a,o]=b(this,t,n,e,r,i);if(typeof o!=`function`)throw new p(`Graph.${t}: provided updater is not a function.`);return a.attributes=o(a.attributes),this.emit(`nodeAttributesUpdated`,{key:a.key,type:`update`,attributes:a.attributes}),this}}const ie=[{name:e=>`get${e}Attribute`,attacher:x},{name:e=>`get${e}Attributes`,attacher:S},{name:e=>`has${e}Attribute`,attacher:C},{name:e=>`set${e}Attribute`,attacher:w},{name:e=>`update${e}Attribute`,attacher:T},{name:e=>`remove${e}Attribute`,attacher:ee},{name:e=>`replace${e}Attributes`,attacher:te},{name:e=>`merge${e}Attributes`,attacher:ne},{name:e=>`update${e}Attributes`,attacher:re}];function ae(e){ie.forEach(function({name:t,attacher:n}){n(e,t(`Node`),0),n(e,t(`Source`),1),n(e,t(`Target`),2),n(e,t(`Opposite`),3)})}function oe(e,t,n){e.prototype[t]=function(e,i){let a;if(this.type!==`mixed`&&n!==`mixed`&&n!==this.type)throw new h(`Graph.${t}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new h(`Graph.${t}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);let o=``+e,s=``+i;if(i=arguments[2],a=r(this,o,s,n),!a)throw new m(`Graph.${t}: could not find an edge for the given path ("${o}" - "${s}").`)}else{if(n!==`mixed`)throw new h(`Graph.${t}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(e=``+e,a=this._edges.get(e),!a)throw new m(`Graph.${t}: could not find the "${e}" edge in the graph.`)}return a.attributes[i]}}function se(e,t,n){e.prototype[t]=function(e){let i;if(this.type!==`mixed`&&n!==`mixed`&&n!==this.type)throw new h(`Graph.${t}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>1){if(this.multi)throw new h(`Graph.${t}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);let a=``+e,o=``+arguments[1];if(i=r(this,a,o,n),!i)throw new m(`Graph.${t}: could not find an edge for the given path ("${a}" - "${o}").`)}else{if(n!==`mixed`)throw new h(`Graph.${t}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(e=``+e,i=this._edges.get(e),!i)throw new m(`Graph.${t}: could not find the "${e}" edge in the graph.`)}return i.attributes}}function ce(e,t,n){e.prototype[t]=function(e,i){let a;if(this.type!==`mixed`&&n!==`mixed`&&n!==this.type)throw new h(`Graph.${t}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new h(`Graph.${t}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);let o=``+e,s=``+i;if(i=arguments[2],a=r(this,o,s,n),!a)throw new m(`Graph.${t}: could not find an edge for the given path ("${o}" - "${s}").`)}else{if(n!==`mixed`)throw new h(`Graph.${t}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(e=``+e,a=this._edges.get(e),!a)throw new m(`Graph.${t}: could not find the "${e}" edge in the graph.`)}return a.attributes.hasOwnProperty(i)}}function le(e,t,n){e.prototype[t]=function(e,i,a){let o;if(this.type!==`mixed`&&n!==`mixed`&&n!==this.type)throw new h(`Graph.${t}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>3){if(this.multi)throw new h(`Graph.${t}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);let s=``+e,c=``+i;if(i=arguments[2],a=arguments[3],o=r(this,s,c,n),!o)throw new m(`Graph.${t}: could not find an edge for the given path ("${s}" - "${c}").`)}else{if(n!==`mixed`)throw new h(`Graph.${t}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(e=``+e,o=this._edges.get(e),!o)throw new m(`Graph.${t}: could not find the "${e}" edge in the graph.`)}return o.attributes[i]=a,this.emit(`edgeAttributesUpdated`,{key:o.key,type:`set`,attributes:o.attributes,name:i}),this}}function ue(e,t,n){e.prototype[t]=function(e,i,a){let o;if(this.type!==`mixed`&&n!==`mixed`&&n!==this.type)throw new h(`Graph.${t}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>3){if(this.multi)throw new h(`Graph.${t}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);let s=``+e,c=``+i;if(i=arguments[2],a=arguments[3],o=r(this,s,c,n),!o)throw new m(`Graph.${t}: could not find an edge for the given path ("${s}" - "${c}").`)}else{if(n!==`mixed`)throw new h(`Graph.${t}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(e=``+e,o=this._edges.get(e),!o)throw new m(`Graph.${t}: could not find the "${e}" edge in the graph.`)}if(typeof a!=`function`)throw new p(`Graph.${t}: updater should be a function.`);return o.attributes[i]=a(o.attributes[i]),this.emit(`edgeAttributesUpdated`,{key:o.key,type:`set`,attributes:o.attributes,name:i}),this}}function de(e,t,n){e.prototype[t]=function(e,i){let a;if(this.type!==`mixed`&&n!==`mixed`&&n!==this.type)throw new h(`Graph.${t}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new h(`Graph.${t}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);let o=``+e,s=``+i;if(i=arguments[2],a=r(this,o,s,n),!a)throw new m(`Graph.${t}: could not find an edge for the given path ("${o}" - "${s}").`)}else{if(n!==`mixed`)throw new h(`Graph.${t}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(e=``+e,a=this._edges.get(e),!a)throw new m(`Graph.${t}: could not find the "${e}" edge in the graph.`)}return delete a.attributes[i],this.emit(`edgeAttributesUpdated`,{key:a.key,type:`remove`,attributes:a.attributes,name:i}),this}}function E(e,t,n){e.prototype[t]=function(e,a){let o;if(this.type!==`mixed`&&n!==`mixed`&&n!==this.type)throw new h(`Graph.${t}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new h(`Graph.${t}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);let i=``+e,s=``+a;if(a=arguments[2],o=r(this,i,s,n),!o)throw new m(`Graph.${t}: could not find an edge for the given path ("${i}" - "${s}").`)}else{if(n!==`mixed`)throw new h(`Graph.${t}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(e=``+e,o=this._edges.get(e),!o)throw new m(`Graph.${t}: could not find the "${e}" edge in the graph.`)}if(!i(a))throw new p(`Graph.${t}: provided attributes are not a plain object.`);return o.attributes=a,this.emit(`edgeAttributesUpdated`,{key:o.key,type:`replace`,attributes:o.attributes}),this}}function fe(e,t,a){e.prototype[t]=function(e,o){let s;if(this.type!==`mixed`&&a!==`mixed`&&a!==this.type)throw new h(`Graph.${t}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new h(`Graph.${t}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);let n=``+e,i=``+o;if(o=arguments[2],s=r(this,n,i,a),!s)throw new m(`Graph.${t}: could not find an edge for the given path ("${n}" - "${i}").`)}else{if(a!==`mixed`)throw new h(`Graph.${t}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(e=``+e,s=this._edges.get(e),!s)throw new m(`Graph.${t}: could not find the "${e}" edge in the graph.`)}if(!i(o))throw new p(`Graph.${t}: provided attributes are not a plain object.`);return n(s.attributes,o),this.emit(`edgeAttributesUpdated`,{key:s.key,type:`merge`,attributes:s.attributes,data:o}),this}}function pe(e,t,n){e.prototype[t]=function(e,i){let a;if(this.type!==`mixed`&&n!==`mixed`&&n!==this.type)throw new h(`Graph.${t}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new h(`Graph.${t}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);let o=``+e,s=``+i;if(i=arguments[2],a=r(this,o,s,n),!a)throw new m(`Graph.${t}: could not find an edge for the given path ("${o}" - "${s}").`)}else{if(n!==`mixed`)throw new h(`Graph.${t}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(e=``+e,a=this._edges.get(e),!a)throw new m(`Graph.${t}: could not find the "${e}" edge in the graph.`)}if(typeof i!=`function`)throw new p(`Graph.${t}: provided updater is not a function.`);return a.attributes=i(a.attributes),this.emit(`edgeAttributesUpdated`,{key:a.key,type:`update`,attributes:a.attributes}),this}}const me=[{name:e=>`get${e}Attribute`,attacher:oe},{name:e=>`get${e}Attributes`,attacher:se},{name:e=>`has${e}Attribute`,attacher:ce},{name:e=>`set${e}Attribute`,attacher:le},{name:e=>`update${e}Attribute`,attacher:ue},{name:e=>`remove${e}Attribute`,attacher:de},{name:e=>`replace${e}Attributes`,attacher:E},{name:e=>`merge${e}Attributes`,attacher:fe},{name:e=>`update${e}Attributes`,attacher:pe}];function he(e){me.forEach(function({name:t,attacher:n}){n(e,t(`Edge`),`mixed`),n(e,t(`DirectedEdge`),`directed`),n(e,t(`UndirectedEdge`),`undirected`)})}const ge=[{name:`edges`,type:`mixed`},{name:`inEdges`,type:`directed`,direction:`in`},{name:`outEdges`,type:`directed`,direction:`out`},{name:`inboundEdges`,type:`mixed`,direction:`in`},{name:`outboundEdges`,type:`mixed`,direction:`out`},{name:`directedEdges`,type:`directed`},{name:`undirectedEdges`,type:`undirected`}];function _e(e,t,n,r){let i=!1;for(let a in t){if(a===r)continue;let o=t[a];if(i=n(o.key,o.attributes,o.source.key,o.target.key,o.source.attributes,o.target.attributes,o.undirected),e&&i)return o.key}}function ve(e,t,n,r){let i,a,o,s=!1;for(let c in t)if(c!==r){i=t[c];do{if(a=i.source,o=i.target,s=n(i.key,i.attributes,a.key,o.key,a.attributes,o.attributes,i.undirected),e&&s)return i.key;i=i.next}while(i!==void 0)}}function D(e,t){let n=Object.keys(e),r=n.length,i,a=0;return{[Symbol.iterator](){return this},next(){do if(i)i=i.next;else{if(a>=r)return{done:!0};let o=n[a++];if(o===t){i=void 0;continue}i=e[o]}while(!i);return{done:!1,value:{edge:i.key,attributes:i.attributes,source:i.source.key,target:i.target.key,sourceAttributes:i.source.attributes,targetAttributes:i.target.attributes,undirected:i.undirected}}}}}function O(e,t,n,r){let i=t[n];if(!i)return;let a=i.source,o=i.target;if(r(i.key,i.attributes,a.key,o.key,a.attributes,o.attributes,i.undirected)&&e)return i.key}function k(e,t,n,r){let i=t[n];if(!i)return;let a=!1;do{if(a=r(i.key,i.attributes,i.source.key,i.target.key,i.source.attributes,i.target.attributes,i.undirected),e&&a)return i.key;i=i.next}while(i!==void 0)}function A(e,t){let n=e[t];if(n.next!==void 0)return{[Symbol.iterator](){return this},next(){if(!n)return{done:!0};let e={edge:n.key,attributes:n.attributes,source:n.source.key,target:n.target.key,sourceAttributes:n.source.attributes,targetAttributes:n.target.attributes,undirected:n.undirected};return n=n.next,{done:!1,value:e}}};let r=!1;return{[Symbol.iterator](){return this},next(){return r===!0?{done:!0}:(r=!0,{done:!1,value:{edge:n.key,attributes:n.attributes,source:n.source.key,target:n.target.key,sourceAttributes:n.source.attributes,targetAttributes:n.target.attributes,undirected:n.undirected}})}}}function j(e,t){if(e.size===0)return[];if(t===`mixed`||t===e.type)return Array.from(e._edges.keys());let n=t===`undirected`?e.undirectedSize:e.directedSize,r=Array(n),i=t===`undirected`,a=e._edges.values(),o=0,s,c;for(;s=a.next(),s.done!==!0;)c=s.value,c.undirected===i&&(r[o++]=c.key);return r}function M(e,t,n,r){if(t.size===0)return;let i=n!==`mixed`&&n!==t.type,a=n===`undirected`,o,s,c=!1,l=t._edges.values();for(;o=l.next(),o.done!==!0;){if(s=o.value,i&&s.undirected!==a)continue;let{key:t,attributes:n,source:l,target:u}=s;if(c=r(t,n,l.key,u.key,l.attributes,u.attributes,s.undirected),e&&c)return t}}function N(e,t){if(e.size===0)return d();let n=t!==`mixed`&&t!==e.type,r=t===`undirected`,i=e._edges.values();return{[Symbol.iterator](){return this},next(){let e,t;for(;;){if(e=i.next(),e.done)return e;if(t=e.value,!(n&&t.undirected!==r))break}return{value:{edge:t.key,attributes:t.attributes,source:t.source.key,target:t.target.key,sourceAttributes:t.source.attributes,targetAttributes:t.target.attributes,undirected:t.undirected},done:!1}}}}function P(e,t,n,r,i,a){let o=t?ve:_e,s;if(n!==`undirected`&&(r!==`out`&&(s=o(e,i.in,a),e&&s)||r!==`in`&&(s=o(e,i.out,a,r?void 0:i.key),e&&s))||n!==`directed`&&(s=o(e,i.undirected,a),e&&s))return s}function F(e,t,n,r){let i=[];return P(!1,e,t,n,r,function(e){i.push(e)}),i}function ye(e,t,n){let r=d();return e!==`undirected`&&(t!==`out`&&n.in!==void 0&&(r=u(r,D(n.in))),t!==`in`&&n.out!==void 0&&(r=u(r,D(n.out,t?void 0:n.key)))),e!==`directed`&&n.undirected!==void 0&&(r=u(r,D(n.undirected))),r}function I(e,t,n,r,i,a,o){let s=n?k:O,c;if(t!==`undirected`&&(i.in!==void 0&&r!==`out`&&(c=s(e,i.in,a,o),e&&c)||i.out!==void 0&&r!==`in`&&(r||i.key!==a)&&(c=s(e,i.out,a,o),e&&c))||t!==`directed`&&i.undirected!==void 0&&(c=s(e,i.undirected,a,o),e&&c))return c}function be(e,t,n,r,i){let a=[];return I(!1,e,t,n,r,i,function(e){a.push(e)}),a}function xe(e,t,n,r){let i=d();return e!==`undirected`&&(n.in!==void 0&&t!==`out`&&r in n.in&&(i=u(i,A(n.in,r))),n.out!==void 0&&t!==`in`&&r in n.out&&(t||n.key!==r)&&(i=u(i,A(n.out,r)))),e!==`directed`&&n.undirected!==void 0&&r in n.undirected&&(i=u(i,A(n.undirected,r))),i}function Se(e,t){let{name:n,type:r,direction:i}=t;e.prototype[n]=function(e,t){if(r!==`mixed`&&this.type!==`mixed`&&r!==this.type)return[];if(!arguments.length)return j(this,r);if(arguments.length===1){e=``+e;let t=this._nodes.get(e);if(t===void 0)throw new m(`Graph.${n}: could not find the "${e}" node in the graph.`);return F(this.multi,r===`mixed`?this.type:r,i,t)}if(arguments.length===2){e=``+e,t=``+t;let a=this._nodes.get(e);if(!a)throw new m(`Graph.${n}: could not find the "${e}" source node in the graph.`);if(!this._nodes.has(t))throw new m(`Graph.${n}: could not find the "${t}" target node in the graph.`);return be(r,this.multi,i,a,t)}throw new p(`Graph.${n}: too many arguments (expecting 0, 1 or 2 and got ${arguments.length}).`)}}function Ce(e,t){let{name:n,type:r,direction:i}=t,a=`forEach`+n[0].toUpperCase()+n.slice(1,-1);e.prototype[a]=function(e,t,n){if(!(r!==`mixed`&&this.type!==`mixed`&&r!==this.type)){if(arguments.length===1)return n=e,M(!1,this,r,n);if(arguments.length===2){e=``+e,n=t;let o=this._nodes.get(e);if(o===void 0)throw new m(`Graph.${a}: could not find the "${e}" node in the graph.`);return P(!1,this.multi,r===`mixed`?this.type:r,i,o,n)}if(arguments.length===3){e=``+e,t=``+t;let o=this._nodes.get(e);if(!o)throw new m(`Graph.${a}: could not find the "${e}" source node in the graph.`);if(!this._nodes.has(t))throw new m(`Graph.${a}: could not find the "${t}" target node in the graph.`);return I(!1,r,this.multi,i,o,t,n)}throw new p(`Graph.${a}: too many arguments (expecting 1, 2 or 3 and got ${arguments.length}).`)}};let o=`map`+n[0].toUpperCase()+n.slice(1);e.prototype[o]=function(){let e=Array.prototype.slice.call(arguments),t=e.pop(),n;if(e.length===0){let i=0;r!==`directed`&&(i+=this.undirectedSize),r!==`undirected`&&(i+=this.directedSize),n=Array(i);let a=0;e.push((e,r,i,o,s,c,l)=>{n[a++]=t(e,r,i,o,s,c,l)})}else n=[],e.push((e,r,i,a,o,s,c)=>{n.push(t(e,r,i,a,o,s,c))});return this[a].apply(this,e),n};let s=`filter`+n[0].toUpperCase()+n.slice(1);e.prototype[s]=function(){let e=Array.prototype.slice.call(arguments),t=e.pop(),n=[];return e.push((e,r,i,a,o,s,c)=>{t(e,r,i,a,o,s,c)&&n.push(e)}),this[a].apply(this,e),n};let c=`reduce`+n[0].toUpperCase()+n.slice(1);e.prototype[c]=function(){let e=Array.prototype.slice.call(arguments);if(e.length<2||e.length>4)throw new p(`Graph.${c}: invalid number of arguments (expecting 2, 3 or 4 and got ${e.length}).`);if(typeof e[e.length-1]==`function`&&typeof e[e.length-2]!=`function`)throw new p(`Graph.${c}: missing initial value. You must provide it because the callback takes more than one argument and we cannot infer the initial value from the first iteration, as you could with a simple array.`);let t,n;e.length===2?(t=e[0],n=e[1],e=[]):e.length===3?(t=e[1],n=e[2],e=[e[0]]):e.length===4&&(t=e[2],n=e[3],e=[e[0],e[1]]);let r=n;return e.push((e,n,i,a,o,s,c)=>{r=t(r,e,n,i,a,o,s,c)}),this[a].apply(this,e),r}}function we(e,t){let{name:n,type:r,direction:i}=t,a=`find`+n[0].toUpperCase()+n.slice(1,-1);e.prototype[a]=function(e,t,n){if(r!==`mixed`&&this.type!==`mixed`&&r!==this.type)return!1;if(arguments.length===1)return n=e,M(!0,this,r,n);if(arguments.length===2){e=``+e,n=t;let o=this._nodes.get(e);if(o===void 0)throw new m(`Graph.${a}: could not find the "${e}" node in the graph.`);return P(!0,this.multi,r===`mixed`?this.type:r,i,o,n)}if(arguments.length===3){e=``+e,t=``+t;let o=this._nodes.get(e);if(!o)throw new m(`Graph.${a}: could not find the "${e}" source node in the graph.`);if(!this._nodes.has(t))throw new m(`Graph.${a}: could not find the "${t}" target node in the graph.`);return I(!0,r,this.multi,i,o,t,n)}throw new p(`Graph.${a}: too many arguments (expecting 1, 2 or 3 and got ${arguments.length}).`)};let o=`some`+n[0].toUpperCase()+n.slice(1,-1);e.prototype[o]=function(){let e=Array.prototype.slice.call(arguments),t=e.pop();return e.push((e,n,r,i,a,o,s)=>t(e,n,r,i,a,o,s)),!!this[a].apply(this,e)};let s=`every`+n[0].toUpperCase()+n.slice(1,-1);e.prototype[s]=function(){let e=Array.prototype.slice.call(arguments),t=e.pop();return e.push((e,n,r,i,a,o,s)=>!t(e,n,r,i,a,o,s)),!this[a].apply(this,e)}}function Te(e,t){let{name:n,type:r,direction:i}=t,a=n.slice(0,-1)+`Entries`;e.prototype[a]=function(e,t){if(r!==`mixed`&&this.type!==`mixed`&&r!==this.type)return d();if(!arguments.length)return N(this,r);if(arguments.length===1){e=``+e;let t=this._nodes.get(e);if(!t)throw new m(`Graph.${a}: could not find the "${e}" node in the graph.`);return ye(r,i,t)}if(arguments.length===2){e=``+e,t=``+t;let n=this._nodes.get(e);if(!n)throw new m(`Graph.${a}: could not find the "${e}" source node in the graph.`);if(!this._nodes.has(t))throw new m(`Graph.${a}: could not find the "${t}" target node in the graph.`);return xe(r,i,n,t)}throw new p(`Graph.${a}: too many arguments (expecting 0, 1 or 2 and got ${arguments.length}).`)}}function Ee(e){ge.forEach(t=>{Se(e,t),Ce(e,t),we(e,t),Te(e,t)})}const L=[{name:`neighbors`,type:`mixed`},{name:`inNeighbors`,type:`directed`,direction:`in`},{name:`outNeighbors`,type:`directed`,direction:`out`},{name:`inboundNeighbors`,type:`mixed`,direction:`in`},{name:`outboundNeighbors`,type:`mixed`,direction:`out`},{name:`directedNeighbors`,type:`directed`},{name:`undirectedNeighbors`,type:`undirected`}];function R(){this.A=null,this.B=null}R.prototype.wrap=function(e){this.A===null?this.A=e:this.B===null&&(this.B=e)},R.prototype.has=function(e){return this.A!==null&&e in this.A||this.B!==null&&e in this.B};function z(e,t,n,r,i){for(let a in r){let o=r[a],s=o.source,c=o.target,l=s===n?c:s;if(t&&t.has(l.key))continue;let u=i(l.key,l.attributes);if(e&&u)return l.key}}function B(e,t,n,r,i){if(t!==`mixed`){if(t===`undirected`)return z(e,null,r,r.undirected,i);if(typeof n==`string`)return z(e,null,r,r[n],i)}let a=new R,o;if(t!==`undirected`){if(n!==`out`){if(o=z(e,null,r,r.in,i),e&&o)return o;a.wrap(r.in)}if(n!==`in`){if(o=z(e,a,r,r.out,i),e&&o)return o;a.wrap(r.out)}}if(t!==`directed`&&(o=z(e,a,r,r.undirected,i),e&&o))return o}function De(e,t,n){if(e!==`mixed`){if(e===`undirected`)return Object.keys(n.undirected);if(typeof t==`string`)return Object.keys(n[t])}let r=[];return B(!1,e,t,n,function(e){r.push(e)}),r}function V(e,t,n){let r=Object.keys(n),i=r.length,a=0;return{[Symbol.iterator](){return this},next(){let o=null;do{if(a>=i)return e&&e.wrap(n),{done:!0};let s=n[r[a++]],c=s.source,l=s.target;if(o=c===t?l:c,e&&e.has(o.key)){o=null;continue}}while(o===null);return{done:!1,value:{neighbor:o.key,attributes:o.attributes}}}}}function Oe(e,t,n){if(e!==`mixed`){if(e===`undirected`)return V(null,n,n.undirected);if(typeof t==`string`)return V(null,n,n[t])}let r=d(),i=new R;return e!==`undirected`&&(t!==`out`&&(r=u(r,V(i,n,n.in))),t!==`in`&&(r=u(r,V(i,n,n.out)))),e!==`directed`&&(r=u(r,V(i,n,n.undirected))),r}function ke(e,t){let{name:n,type:r,direction:i}=t;e.prototype[n]=function(e){if(r!==`mixed`&&this.type!==`mixed`&&r!==this.type)return[];e=``+e;let t=this._nodes.get(e);if(t===void 0)throw new m(`Graph.${n}: could not find the "${e}" node in the graph.`);return De(r===`mixed`?this.type:r,i,t)}}function Ae(e,t){let{name:n,type:r,direction:i}=t,a=`forEach`+n[0].toUpperCase()+n.slice(1,-1);e.prototype[a]=function(e,t){if(r!==`mixed`&&this.type!==`mixed`&&r!==this.type)return;e=``+e;let n=this._nodes.get(e);if(n===void 0)throw new m(`Graph.${a}: could not find the "${e}" node in the graph.`);B(!1,r===`mixed`?this.type:r,i,n,t)};let o=`map`+n[0].toUpperCase()+n.slice(1);e.prototype[o]=function(e,t){let n=[];return this[a](e,(e,r)=>{n.push(t(e,r))}),n};let s=`filter`+n[0].toUpperCase()+n.slice(1);e.prototype[s]=function(e,t){let n=[];return this[a](e,(e,r)=>{t(e,r)&&n.push(e)}),n};let c=`reduce`+n[0].toUpperCase()+n.slice(1);e.prototype[c]=function(e,t,n){if(arguments.length<3)throw new p(`Graph.${c}: missing initial value. You must provide it because the callback takes more than one argument and we cannot infer the initial value from the first iteration, as you could with a simple array.`);let r=n;return this[a](e,(e,n)=>{r=t(r,e,n)}),r}}function je(e,t){let{name:n,type:r,direction:i}=t,a=n[0].toUpperCase()+n.slice(1,-1),o=`find`+a;e.prototype[o]=function(e,t){if(r!==`mixed`&&this.type!==`mixed`&&r!==this.type)return;e=``+e;let n=this._nodes.get(e);if(n===void 0)throw new m(`Graph.${o}: could not find the "${e}" node in the graph.`);return B(!0,r===`mixed`?this.type:r,i,n,t)};let s=`some`+a;e.prototype[s]=function(e,t){return!!this[o](e,t)};let c=`every`+a;e.prototype[c]=function(e,t){return!this[o](e,(e,n)=>!t(e,n))}}function Me(e,t){let{name:n,type:r,direction:i}=t,a=n.slice(0,-1)+`Entries`;e.prototype[a]=function(e){if(r!==`mixed`&&this.type!==`mixed`&&r!==this.type)return d();e=``+e;let t=this._nodes.get(e);if(t===void 0)throw new m(`Graph.${a}: could not find the "${e}" node in the graph.`);return Oe(r===`mixed`?this.type:r,i,t)}}function Ne(e){L.forEach(t=>{ke(e,t),Ae(e,t),je(e,t),Me(e,t)})}function H(e,t,n,r,i){let a=r._nodes.values(),o=r.type,s,c,l,u,d,f,p;for(;s=a.next(),s.done!==!0;){let r=!1;if(c=s.value,o!==`undirected`)for(l in u=c.out,u){d=u[l];do{if(f=d.target,r=!0,p=i(c.key,f.key,c.attributes,f.attributes,d.key,d.attributes,d.undirected),e&&p)return d;d=d.next}while(d)}if(o!==`directed`){for(l in u=c.undirected,u)if(!(t&&c.key>l)){d=u[l];do{if(f=d.target,f.key!==l&&(f=d.source),r=!0,p=i(c.key,f.key,c.attributes,f.attributes,d.key,d.attributes,d.undirected),e&&p)return d;d=d.next}while(d)}}if(n&&!r&&(p=i(c.key,null,c.attributes,null,null,null,null),e&&p))return null}}function Pe(e,t){let r={key:e};return a(t.attributes)||(r.attributes=n({},t.attributes)),r}function Fe(e,t,r){let i={key:t,source:r.source.key,target:r.target.key};return a(r.attributes)||(i.attributes=n({},r.attributes)),e===`mixed`&&r.undirected&&(i.undirected=!0),i}function Ie(e){if(!i(e))throw new p(`Graph.import: invalid serialized node. A serialized node should be a plain object with at least a "key" property.`);if(!(`key`in e))throw new p(`Graph.import: serialized node is missing its key.`);if(`attributes`in e&&(!i(e.attributes)||e.attributes===null))throw new p(`Graph.import: invalid attributes. Attributes should be a plain object, null or omitted.`)}function Le(e){if(!i(e))throw new p(`Graph.import: invalid serialized edge. A serialized edge should be a plain object with at least a "source" & "target" property.`);if(!(`source`in e))throw new p(`Graph.import: serialized edge is missing its source.`);if(!(`target`in e))throw new p(`Graph.import: serialized edge is missing its target.`);if(`attributes`in e&&(!i(e.attributes)||e.attributes===null))throw new p(`Graph.import: invalid attributes. Attributes should be a plain object, null or omitted.`);if(`undirected`in e&&typeof e.undirected!=`boolean`)throw new p(`Graph.import: invalid undirectedness information. Undirected should be boolean or omitted.`)}const Re=l(),ze=new Set([`directed`,`undirected`,`mixed`]),U=new Set([`domain`,`_events`,`_eventsCount`,`_maxListeners`]),Be=[{name:e=>`${e}Edge`,generateKey:!0},{name:e=>`${e}DirectedEdge`,generateKey:!0,type:`directed`},{name:e=>`${e}UndirectedEdge`,generateKey:!0,type:`undirected`},{name:e=>`${e}EdgeWithKey`},{name:e=>`${e}DirectedEdgeWithKey`,type:`directed`},{name:e=>`${e}UndirectedEdgeWithKey`,type:`undirected`}],Ve={allowSelfLoops:!0,multi:!1,type:`mixed`};function He(e,t,n){if(n&&!i(n))throw new p(`Graph.addNode: invalid attributes. Expecting an object but got "${n}"`);if(t=``+t,n||={},e._nodes.has(t))throw new h(`Graph.addNode: the "${t}" node already exist in the graph.`);let r=new e.NodeDataClass(t,n);return e._nodes.set(t,r),e.emit(`nodeAdded`,{key:t,attributes:n}),r}function W(e,t,n){let r=new e.NodeDataClass(t,n);return e._nodes.set(t,r),e.emit(`nodeAdded`,{key:t,attributes:n}),r}function G(e,t,n,r,a,o,s,c){if(!r&&e.type===`undirected`)throw new h(`Graph.${t}: you cannot add a directed edge to an undirected graph. Use the #.addEdge or #.addUndirectedEdge instead.`);if(r&&e.type===`directed`)throw new h(`Graph.${t}: you cannot add an undirected edge to a directed graph. Use the #.addEdge or #.addDirectedEdge instead.`);if(c&&!i(c))throw new p(`Graph.${t}: invalid attributes. Expecting an object but got "${c}"`);if(o=``+o,s=``+s,c||={},!e.allowSelfLoops&&o===s)throw new h(`Graph.${t}: source & target are the same ("${o}"), thus creating a loop explicitly forbidden by this graph 'allowSelfLoops' option set to false.`);let l=e._nodes.get(o),u=e._nodes.get(s);if(!l)throw new m(`Graph.${t}: source node "${o}" not found.`);if(!u)throw new m(`Graph.${t}: target node "${s}" not found.`);let d={key:null,undirected:r,source:o,target:s,attributes:c};if(n)a=e._edgeKeyGenerator();else if(a=``+a,e._edges.has(a))throw new h(`Graph.${t}: the "${a}" edge already exists in the graph.`);if(!e.multi&&(r?l.undirected[s]!==void 0:l.out[s]!==void 0))throw new h(`Graph.${t}: an edge linking "${o}" to "${s}" already exists. If you really want to add multiple edges linking those nodes, you should create a multi graph by using the 'multi' option.`);let f=new y(r,a,l,u,c);e._edges.set(a,f);let g=o===s;return r?(l.undirectedDegree++,u.undirectedDegree++,g&&(l.undirectedLoops++,e._undirectedSelfLoopCount++)):(l.outDegree++,u.inDegree++,g&&(l.directedLoops++,e._directedSelfLoopCount++)),e.multi?f.attachMulti():f.attach(),r?e._undirectedSize++:e._directedSize++,d.key=a,e.emit(`edgeAdded`,d),a}function Ue(e,t,r,a,o,s,c,l,u){if(!a&&e.type===`undirected`)throw new h(`Graph.${t}: you cannot merge/update a directed edge to an undirected graph. Use the #.mergeEdge/#.updateEdge or #.addUndirectedEdge instead.`);if(a&&e.type===`directed`)throw new h(`Graph.${t}: you cannot merge/update an undirected edge to a directed graph. Use the #.mergeEdge/#.updateEdge or #.addDirectedEdge instead.`);if(l){if(u){if(typeof l!=`function`)throw new p(`Graph.${t}: invalid updater function. Expecting a function but got "${l}"`)}else if(!i(l))throw new p(`Graph.${t}: invalid attributes. Expecting an object but got "${l}"`)}s=``+s,c=``+c;let d;if(u&&(d=l,l=void 0),!e.allowSelfLoops&&s===c)throw new h(`Graph.${t}: source & target are the same ("${s}"), thus creating a loop explicitly forbidden by this graph 'allowSelfLoops' option set to false.`);let f=e._nodes.get(s),m=e._nodes.get(c),g,_;if(!r&&(g=e._edges.get(o),g)){if((g.source.key!==s||g.target.key!==c)&&(!a||g.source.key!==c||g.target.key!==s))throw new h(`Graph.${t}: inconsistency detected when attempting to merge the "${o}" edge with "${s}" source & "${c}" target vs. ("${g.source.key}", "${g.target.key}").`);_=g}if(!_&&!e.multi&&f&&(_=a?f.undirected[c]:f.out[c]),_){let t=[_.key,!1,!1,!1];if(u?!d:!l)return t;if(u){let t=_.attributes;_.attributes=d(t),e.emit(`edgeAttributesUpdated`,{type:`replace`,key:_.key,attributes:_.attributes})}else n(_.attributes,l),e.emit(`edgeAttributesUpdated`,{type:`merge`,key:_.key,attributes:_.attributes,data:l});return t}l||={},u&&d&&(l=d(l));let v={key:null,undirected:a,source:s,target:c,attributes:l};if(r)o=e._edgeKeyGenerator();else if(o=``+o,e._edges.has(o))throw new h(`Graph.${t}: the "${o}" edge already exists in the graph.`);let b=!1,x=!1;f||(f=W(e,s,{}),b=!0,s===c&&(m=f,x=!0)),m||(m=W(e,c,{}),x=!0),g=new y(a,o,f,m,l),e._edges.set(o,g);let S=s===c;return a?(f.undirectedDegree++,m.undirectedDegree++,S&&(f.undirectedLoops++,e._undirectedSelfLoopCount++)):(f.outDegree++,m.inDegree++,S&&(f.directedLoops++,e._directedSelfLoopCount++)),e.multi?g.attachMulti():g.attach(),a?e._undirectedSize++:e._directedSize++,v.key=o,e.emit(`edgeAdded`,v),[o,!0,b,x]}function K(e,t){e._edges.delete(t.key);let{source:n,target:r,attributes:i}=t,a=t.undirected,o=n===r;a?(n.undirectedDegree--,r.undirectedDegree--,o&&(n.undirectedLoops--,e._undirectedSelfLoopCount--)):(n.outDegree--,r.inDegree--,o&&(n.directedLoops--,e._directedSelfLoopCount--)),e.multi?t.detachMulti():t.detach(),a?e._undirectedSize--:e._directedSize--,e.emit(`edgeDropped`,{key:t.key,attributes:i,source:n.key,target:r.key,undirected:a})}var q=class t extends e{constructor(e){if(super(),e=n({},Ve,e),typeof e.multi!=`boolean`)throw new p(`Graph.constructor: invalid 'multi' option. Expecting a boolean but got "${e.multi}".`);if(!ze.has(e.type))throw new p(`Graph.constructor: invalid 'type' option. Should be one of "mixed", "directed" or "undirected" but got "${e.type}".`);if(typeof e.allowSelfLoops!=`boolean`)throw new p(`Graph.constructor: invalid 'allowSelfLoops' option. Expecting a boolean but got "${e.allowSelfLoops}".`);let t=e.type===`mixed`?g:e.type===`directed`?_:v;o(this,`NodeDataClass`,t);let r=`geid_`+Re()+`_`,i=0;o(this,`_attributes`,{}),o(this,`_nodes`,new Map),o(this,`_edges`,new Map),o(this,`_directedSize`,0),o(this,`_undirectedSize`,0),o(this,`_directedSelfLoopCount`,0),o(this,`_undirectedSelfLoopCount`,0),o(this,`_edgeKeyGenerator`,()=>{let e;do e=r+ i++;while(this._edges.has(e));return e}),o(this,`_options`,e),U.forEach(e=>o(this,e,this[e])),s(this,`order`,()=>this._nodes.size),s(this,`size`,()=>this._edges.size),s(this,`directedSize`,()=>this._directedSize),s(this,`undirectedSize`,()=>this._undirectedSize),s(this,`selfLoopCount`,()=>this._directedSelfLoopCount+this._undirectedSelfLoopCount),s(this,`directedSelfLoopCount`,()=>this._directedSelfLoopCount),s(this,`undirectedSelfLoopCount`,()=>this._undirectedSelfLoopCount),s(this,`multi`,this._options.multi),s(this,`type`,this._options.type),s(this,`allowSelfLoops`,this._options.allowSelfLoops),s(this,`implementation`,()=>`graphology`)}_resetInstanceCounters(){this._directedSize=0,this._undirectedSize=0,this._directedSelfLoopCount=0,this._undirectedSelfLoopCount=0}hasNode(e){return this._nodes.has(``+e)}hasDirectedEdge(e,t){if(this.type===`undirected`)return!1;if(arguments.length===1){let t=``+e,n=this._edges.get(t);return!!n&&!n.undirected}else if(arguments.length===2){e=``+e,t=``+t;let n=this._nodes.get(e);return n?n.out.hasOwnProperty(t):!1}throw new p(`Graph.hasDirectedEdge: invalid arity (${arguments.length}, instead of 1 or 2). You can either ask for an edge id or for the existence of an edge between a source & a target.`)}hasUndirectedEdge(e,t){if(this.type===`directed`)return!1;if(arguments.length===1){let t=``+e,n=this._edges.get(t);return!!n&&n.undirected}else if(arguments.length===2){e=``+e,t=``+t;let n=this._nodes.get(e);return n?n.undirected.hasOwnProperty(t):!1}throw new p(`Graph.hasDirectedEdge: invalid arity (${arguments.length}, instead of 1 or 2). You can either ask for an edge id or for the existence of an edge between a source & a target.`)}hasEdge(e,t){if(arguments.length===1){let t=``+e;return this._edges.has(t)}else if(arguments.length===2){e=``+e,t=``+t;let n=this._nodes.get(e);return n?n.out!==void 0&&n.out.hasOwnProperty(t)||n.undirected!==void 0&&n.undirected.hasOwnProperty(t):!1}throw new p(`Graph.hasEdge: invalid arity (${arguments.length}, instead of 1 or 2). You can either ask for an edge id or for the existence of an edge between a source & a target.`)}directedEdge(e,t){if(this.type===`undirected`)return;if(e=``+e,t=``+t,this.multi)throw new h(`Graph.directedEdge: this method is irrelevant with multigraphs since there might be multiple edges between source & target. See #.directedEdges instead.`);let n=this._nodes.get(e);if(!n)throw new m(`Graph.directedEdge: could not find the "${e}" source node in the graph.`);if(!this._nodes.has(t))throw new m(`Graph.directedEdge: could not find the "${t}" target node in the graph.`);let r=n.out&&n.out[t]||void 0;if(r)return r.key}undirectedEdge(e,t){if(this.type===`directed`)return;if(e=``+e,t=``+t,this.multi)throw new h(`Graph.undirectedEdge: this method is irrelevant with multigraphs since there might be multiple edges between source & target. See #.undirectedEdges instead.`);let n=this._nodes.get(e);if(!n)throw new m(`Graph.undirectedEdge: could not find the "${e}" source node in the graph.`);if(!this._nodes.has(t))throw new m(`Graph.undirectedEdge: could not find the "${t}" target node in the graph.`);let r=n.undirected&&n.undirected[t]||void 0;if(r)return r.key}edge(e,t){if(this.multi)throw new h(`Graph.edge: this method is irrelevant with multigraphs since there might be multiple edges between source & target. See #.edges instead.`);e=``+e,t=``+t;let n=this._nodes.get(e);if(!n)throw new m(`Graph.edge: could not find the "${e}" source node in the graph.`);if(!this._nodes.has(t))throw new m(`Graph.edge: could not find the "${t}" target node in the graph.`);let r=n.out&&n.out[t]||n.undirected&&n.undirected[t]||void 0;if(r)return r.key}areDirectedNeighbors(e,t){e=``+e,t=``+t;let n=this._nodes.get(e);if(!n)throw new m(`Graph.areDirectedNeighbors: could not find the "${e}" node in the graph.`);return this.type===`undirected`?!1:t in n.in||t in n.out}areOutNeighbors(e,t){e=``+e,t=``+t;let n=this._nodes.get(e);if(!n)throw new m(`Graph.areOutNeighbors: could not find the "${e}" node in the graph.`);return this.type===`undirected`?!1:t in n.out}areInNeighbors(e,t){e=``+e,t=``+t;let n=this._nodes.get(e);if(!n)throw new m(`Graph.areInNeighbors: could not find the "${e}" node in the graph.`);return this.type===`undirected`?!1:t in n.in}areUndirectedNeighbors(e,t){e=``+e,t=``+t;let n=this._nodes.get(e);if(!n)throw new m(`Graph.areUndirectedNeighbors: could not find the "${e}" node in the graph.`);return this.type===`directed`?!1:t in n.undirected}areNeighbors(e,t){e=``+e,t=``+t;let n=this._nodes.get(e);if(!n)throw new m(`Graph.areNeighbors: could not find the "${e}" node in the graph.`);return this.type!==`undirected`&&(t in n.in||t in n.out)||this.type!==`directed`&&t in n.undirected}areInboundNeighbors(e,t){e=``+e,t=``+t;let n=this._nodes.get(e);if(!n)throw new m(`Graph.areInboundNeighbors: could not find the "${e}" node in the graph.`);return this.type!==`undirected`&&t in n.in||this.type!==`directed`&&t in n.undirected}areOutboundNeighbors(e,t){e=``+e,t=``+t;let n=this._nodes.get(e);if(!n)throw new m(`Graph.areOutboundNeighbors: could not find the "${e}" node in the graph.`);return this.type!==`undirected`&&t in n.out||this.type!==`directed`&&t in n.undirected}inDegree(e){e=``+e;let t=this._nodes.get(e);if(!t)throw new m(`Graph.inDegree: could not find the "${e}" node in the graph.`);return this.type===`undirected`?0:t.inDegree}outDegree(e){e=``+e;let t=this._nodes.get(e);if(!t)throw new m(`Graph.outDegree: could not find the "${e}" node in the graph.`);return this.type===`undirected`?0:t.outDegree}directedDegree(e){e=``+e;let t=this._nodes.get(e);if(!t)throw new m(`Graph.directedDegree: could not find the "${e}" node in the graph.`);return this.type===`undirected`?0:t.inDegree+t.outDegree}undirectedDegree(e){e=``+e;let t=this._nodes.get(e);if(!t)throw new m(`Graph.undirectedDegree: could not find the "${e}" node in the graph.`);return this.type===`directed`?0:t.undirectedDegree}inboundDegree(e){e=``+e;let t=this._nodes.get(e);if(!t)throw new m(`Graph.inboundDegree: could not find the "${e}" node in the graph.`);let n=0;return this.type!==`directed`&&(n+=t.undirectedDegree),this.type!==`undirected`&&(n+=t.inDegree),n}outboundDegree(e){e=``+e;let t=this._nodes.get(e);if(!t)throw new m(`Graph.outboundDegree: could not find the "${e}" node in the graph.`);let n=0;return this.type!==`directed`&&(n+=t.undirectedDegree),this.type!==`undirected`&&(n+=t.outDegree),n}degree(e){e=``+e;let t=this._nodes.get(e);if(!t)throw new m(`Graph.degree: could not find the "${e}" node in the graph.`);let n=0;return this.type!==`directed`&&(n+=t.undirectedDegree),this.type!==`undirected`&&(n+=t.inDegree+t.outDegree),n}inDegreeWithoutSelfLoops(e){e=``+e;let t=this._nodes.get(e);if(!t)throw new m(`Graph.inDegreeWithoutSelfLoops: could not find the "${e}" node in the graph.`);return this.type===`undirected`?0:t.inDegree-t.directedLoops}outDegreeWithoutSelfLoops(e){e=``+e;let t=this._nodes.get(e);if(!t)throw new m(`Graph.outDegreeWithoutSelfLoops: could not find the "${e}" node in the graph.`);return this.type===`undirected`?0:t.outDegree-t.directedLoops}directedDegreeWithoutSelfLoops(e){e=``+e;let t=this._nodes.get(e);if(!t)throw new m(`Graph.directedDegreeWithoutSelfLoops: could not find the "${e}" node in the graph.`);return this.type===`undirected`?0:t.inDegree+t.outDegree-t.directedLoops*2}undirectedDegreeWithoutSelfLoops(e){e=``+e;let t=this._nodes.get(e);if(!t)throw new m(`Graph.undirectedDegreeWithoutSelfLoops: could not find the "${e}" node in the graph.`);return this.type===`directed`?0:t.undirectedDegree-t.undirectedLoops*2}inboundDegreeWithoutSelfLoops(e){e=``+e;let t=this._nodes.get(e);if(!t)throw new m(`Graph.inboundDegreeWithoutSelfLoops: could not find the "${e}" node in the graph.`);let n=0,r=0;return this.type!==`directed`&&(n+=t.undirectedDegree,r+=t.undirectedLoops*2),this.type!==`undirected`&&(n+=t.inDegree,r+=t.directedLoops),n-r}outboundDegreeWithoutSelfLoops(e){e=``+e;let t=this._nodes.get(e);if(!t)throw new m(`Graph.outboundDegreeWithoutSelfLoops: could not find the "${e}" node in the graph.`);let n=0,r=0;return this.type!==`directed`&&(n+=t.undirectedDegree,r+=t.undirectedLoops*2),this.type!==`undirected`&&(n+=t.outDegree,r+=t.directedLoops),n-r}degreeWithoutSelfLoops(e){e=``+e;let t=this._nodes.get(e);if(!t)throw new m(`Graph.degreeWithoutSelfLoops: could not find the "${e}" node in the graph.`);let n=0,r=0;return this.type!==`directed`&&(n+=t.undirectedDegree,r+=t.undirectedLoops*2),this.type!==`undirected`&&(n+=t.inDegree+t.outDegree,r+=t.directedLoops*2),n-r}source(e){e=``+e;let t=this._edges.get(e);if(!t)throw new m(`Graph.source: could not find the "${e}" edge in the graph.`);return t.source.key}target(e){e=``+e;let t=this._edges.get(e);if(!t)throw new m(`Graph.target: could not find the "${e}" edge in the graph.`);return t.target.key}extremities(e){e=``+e;let t=this._edges.get(e);if(!t)throw new m(`Graph.extremities: could not find the "${e}" edge in the graph.`);return[t.source.key,t.target.key]}opposite(e,t){e=``+e,t=``+t;let n=this._edges.get(t);if(!n)throw new m(`Graph.opposite: could not find the "${t}" edge in the graph.`);let r=n.source.key,i=n.target.key;if(e===r)return i;if(e===i)return r;throw new m(`Graph.opposite: the "${e}" node is not attached to the "${t}" edge (${r}, ${i}).`)}hasExtremity(e,t){e=``+e,t=``+t;let n=this._edges.get(e);if(!n)throw new m(`Graph.hasExtremity: could not find the "${e}" edge in the graph.`);return n.source.key===t||n.target.key===t}isUndirected(e){e=``+e;let t=this._edges.get(e);if(!t)throw new m(`Graph.isUndirected: could not find the "${e}" edge in the graph.`);return t.undirected}isDirected(e){e=``+e;let t=this._edges.get(e);if(!t)throw new m(`Graph.isDirected: could not find the "${e}" edge in the graph.`);return!t.undirected}isSelfLoop(e){e=``+e;let t=this._edges.get(e);if(!t)throw new m(`Graph.isSelfLoop: could not find the "${e}" edge in the graph.`);return t.source===t.target}addNode(e,t){return He(this,e,t).key}mergeNode(e,t){if(t&&!i(t))throw new p(`Graph.mergeNode: invalid attributes. Expecting an object but got "${t}"`);e=``+e,t||={};let r=this._nodes.get(e);return r?(t&&(n(r.attributes,t),this.emit(`nodeAttributesUpdated`,{type:`merge`,key:e,attributes:r.attributes,data:t})),[e,!1]):(r=new this.NodeDataClass(e,t),this._nodes.set(e,r),this.emit(`nodeAdded`,{key:e,attributes:t}),[e,!0])}updateNode(e,t){if(t&&typeof t!=`function`)throw new p(`Graph.updateNode: invalid updater function. Expecting a function but got "${t}"`);e=``+e;let n=this._nodes.get(e);if(n){if(t){let r=n.attributes;n.attributes=t(r),this.emit(`nodeAttributesUpdated`,{type:`replace`,key:e,attributes:n.attributes})}return[e,!1]}let r=t?t({}):{};return n=new this.NodeDataClass(e,r),this._nodes.set(e,n),this.emit(`nodeAdded`,{key:e,attributes:r}),[e,!0]}dropNode(e){e=``+e;let t=this._nodes.get(e);if(!t)throw new m(`Graph.dropNode: could not find the "${e}" node in the graph.`);let n;if(this.type!==`undirected`){for(let e in t.out){n=t.out[e];do K(this,n),n=n.next;while(n)}for(let e in t.in){n=t.in[e];do K(this,n),n=n.next;while(n)}}if(this.type!==`directed`)for(let e in t.undirected){n=t.undirected[e];do K(this,n),n=n.next;while(n)}this._nodes.delete(e),this.emit(`nodeDropped`,{key:e,attributes:t.attributes})}dropEdge(e){let t;if(arguments.length>1){let e=``+arguments[0],n=``+arguments[1];if(t=r(this,e,n,this.type),!t)throw new m(`Graph.dropEdge: could not find the "${e}" -> "${n}" edge in the graph.`)}else if(e=``+e,t=this._edges.get(e),!t)throw new m(`Graph.dropEdge: could not find the "${e}" edge in the graph.`);return K(this,t),this}dropDirectedEdge(e,t){if(arguments.length<2)throw new h(`Graph.dropDirectedEdge: it does not make sense to try and drop a directed edge by key. What if the edge with this key is undirected? Use #.dropEdge for this purpose instead.`);if(this.multi)throw new h(`Graph.dropDirectedEdge: cannot use a {source,target} combo when dropping an edge in a MultiGraph since we cannot infer the one you want to delete as there could be multiple ones.`);e=``+e,t=``+t;let n=r(this,e,t,`directed`);if(!n)throw new m(`Graph.dropDirectedEdge: could not find a "${e}" -> "${t}" edge in the graph.`);return K(this,n),this}dropUndirectedEdge(e,t){if(arguments.length<2)throw new h(`Graph.dropUndirectedEdge: it does not make sense to drop a directed edge by key. What if the edge with this key is undirected? Use #.dropEdge for this purpose instead.`);if(this.multi)throw new h(`Graph.dropUndirectedEdge: cannot use a {source,target} combo when dropping an edge in a MultiGraph since we cannot infer the one you want to delete as there could be multiple ones.`);let n=r(this,e,t,`undirected`);if(!n)throw new m(`Graph.dropUndirectedEdge: could not find a "${e}" -> "${t}" edge in the graph.`);return K(this,n),this}clear(){this._edges.clear(),this._nodes.clear(),this._resetInstanceCounters(),this.emit(`cleared`)}clearEdges(){let e=this._nodes.values(),t;for(;t=e.next(),t.done!==!0;)t.value.clear();this._edges.clear(),this._resetInstanceCounters(),this.emit(`edgesCleared`)}getAttribute(e){return this._attributes[e]}getAttributes(){return this._attributes}hasAttribute(e){return this._attributes.hasOwnProperty(e)}setAttribute(e,t){return this._attributes[e]=t,this.emit(`attributesUpdated`,{type:`set`,attributes:this._attributes,name:e}),this}updateAttribute(e,t){if(typeof t!=`function`)throw new p(`Graph.updateAttribute: updater should be a function.`);let n=this._attributes[e];return this._attributes[e]=t(n),this.emit(`attributesUpdated`,{type:`set`,attributes:this._attributes,name:e}),this}removeAttribute(e){return delete this._attributes[e],this.emit(`attributesUpdated`,{type:`remove`,attributes:this._attributes,name:e}),this}replaceAttributes(e){if(!i(e))throw new p(`Graph.replaceAttributes: provided attributes are not a plain object.`);return this._attributes=e,this.emit(`attributesUpdated`,{type:`replace`,attributes:this._attributes}),this}mergeAttributes(e){if(!i(e))throw new p(`Graph.mergeAttributes: provided attributes are not a plain object.`);return n(this._attributes,e),this.emit(`attributesUpdated`,{type:`merge`,attributes:this._attributes,data:e}),this}updateAttributes(e){if(typeof e!=`function`)throw new p(`Graph.updateAttributes: provided updater is not a function.`);return this._attributes=e(this._attributes),this.emit(`attributesUpdated`,{type:`update`,attributes:this._attributes}),this}updateEachNodeAttributes(e,t){if(typeof e!=`function`)throw new p(`Graph.updateEachNodeAttributes: expecting an updater function.`);if(t&&!c(t))throw new p(`Graph.updateEachNodeAttributes: invalid hints. Expecting an object having the following shape: {attributes?: [string]}`);let n=this._nodes.values(),r,i;for(;r=n.next(),r.done!==!0;)i=r.value,i.attributes=e(i.key,i.attributes);this.emit(`eachNodeAttributesUpdated`,{hints:t||null})}updateEachEdgeAttributes(e,t){if(typeof e!=`function`)throw new p(`Graph.updateEachEdgeAttributes: expecting an updater function.`);if(t&&!c(t))throw new p(`Graph.updateEachEdgeAttributes: invalid hints. Expecting an object having the following shape: {attributes?: [string]}`);let n=this._edges.values(),r,i,a,o;for(;r=n.next(),r.done!==!0;)i=r.value,a=i.source,o=i.target,i.attributes=e(i.key,i.attributes,a.key,o.key,a.attributes,o.attributes,i.undirected);this.emit(`eachEdgeAttributesUpdated`,{hints:t||null})}forEachAdjacencyEntry(e){if(typeof e!=`function`)throw new p(`Graph.forEachAdjacencyEntry: expecting a callback.`);H(!1,!1,!1,this,e)}forEachAdjacencyEntryWithOrphans(e){if(typeof e!=`function`)throw new p(`Graph.forEachAdjacencyEntryWithOrphans: expecting a callback.`);H(!1,!1,!0,this,e)}forEachAssymetricAdjacencyEntry(e){if(typeof e!=`function`)throw new p(`Graph.forEachAssymetricAdjacencyEntry: expecting a callback.`);H(!1,!0,!1,this,e)}forEachAssymetricAdjacencyEntryWithOrphans(e){if(typeof e!=`function`)throw new p(`Graph.forEachAssymetricAdjacencyEntryWithOrphans: expecting a callback.`);H(!1,!0,!0,this,e)}nodes(){return Array.from(this._nodes.keys())}forEachNode(e){if(typeof e!=`function`)throw new p(`Graph.forEachNode: expecting a callback.`);let t=this._nodes.values(),n,r;for(;n=t.next(),n.done!==!0;)r=n.value,e(r.key,r.attributes)}findNode(e){if(typeof e!=`function`)throw new p(`Graph.findNode: expecting a callback.`);let t=this._nodes.values(),n,r;for(;n=t.next(),n.done!==!0;)if(r=n.value,e(r.key,r.attributes))return r.key}mapNodes(e){if(typeof e!=`function`)throw new p(`Graph.mapNode: expecting a callback.`);let t=this._nodes.values(),n,r,i=Array(this.order),a=0;for(;n=t.next(),n.done!==!0;)r=n.value,i[a++]=e(r.key,r.attributes);return i}someNode(e){if(typeof e!=`function`)throw new p(`Graph.someNode: expecting a callback.`);let t=this._nodes.values(),n,r;for(;n=t.next(),n.done!==!0;)if(r=n.value,e(r.key,r.attributes))return!0;return!1}everyNode(e){if(typeof e!=`function`)throw new p(`Graph.everyNode: expecting a callback.`);let t=this._nodes.values(),n,r;for(;n=t.next(),n.done!==!0;)if(r=n.value,!e(r.key,r.attributes))return!1;return!0}filterNodes(e){if(typeof e!=`function`)throw new p(`Graph.filterNodes: expecting a callback.`);let t=this._nodes.values(),n,r,i=[];for(;n=t.next(),n.done!==!0;)r=n.value,e(r.key,r.attributes)&&i.push(r.key);return i}reduceNodes(e,t){if(typeof e!=`function`)throw new p(`Graph.reduceNodes: expecting a callback.`);if(arguments.length<2)throw new p(`Graph.reduceNodes: missing initial value. You must provide it because the callback takes more than one argument and we cannot infer the initial value from the first iteration, as you could with a simple array.`);let n=t,r=this._nodes.values(),i,a;for(;i=r.next(),i.done!==!0;)a=i.value,n=e(n,a.key,a.attributes);return n}nodeEntries(){let e=this._nodes.values();return{[Symbol.iterator](){return this},next(){let t=e.next();if(t.done)return t;let n=t.value;return{value:{node:n.key,attributes:n.attributes},done:!1}}}}export(){let e=Array(this._nodes.size),t=0;this._nodes.forEach((n,r)=>{e[t++]=Pe(r,n)});let n=Array(this._edges.size);return t=0,this._edges.forEach((e,r)=>{n[t++]=Fe(this.type,r,e)}),{options:{type:this.type,multi:this.multi,allowSelfLoops:this.allowSelfLoops},attributes:this.getAttributes(),nodes:e,edges:n}}import(e,n=!1){if(e instanceof t)return e.forEachNode((e,t)=>{n?this.mergeNode(e,t):this.addNode(e,t)}),e.forEachEdge((e,t,r,i,a,o,s)=>{n?s?this.mergeUndirectedEdgeWithKey(e,r,i,t):this.mergeDirectedEdgeWithKey(e,r,i,t):s?this.addUndirectedEdgeWithKey(e,r,i,t):this.addDirectedEdgeWithKey(e,r,i,t)}),this;if(!i(e))throw new p(`Graph.import: invalid argument. Expecting a serialized graph or, alternatively, a Graph instance.`);if(e.attributes){if(!i(e.attributes))throw new p(`Graph.import: invalid attributes. Expecting a plain object.`);n?this.mergeAttributes(e.attributes):this.replaceAttributes(e.attributes)}let r,a,o,s,c;if(e.nodes){if(o=e.nodes,!Array.isArray(o))throw new p(`Graph.import: invalid nodes. Expecting an array.`);for(r=0,a=o.length;r<a;r++){s=o[r],Ie(s);let{key:e,attributes:t}=s;n?this.mergeNode(e,t):this.addNode(e,t)}}if(e.edges){let t=!1;if(this.type===`undirected`&&(t=!0),o=e.edges,!Array.isArray(o))throw new p(`Graph.import: invalid edges. Expecting an array.`);for(r=0,a=o.length;r<a;r++){c=o[r],Le(c);let{source:e,target:i,attributes:a,undirected:s=t}=c,l;`key`in c?(l=n?s?this.mergeUndirectedEdgeWithKey:this.mergeDirectedEdgeWithKey:s?this.addUndirectedEdgeWithKey:this.addDirectedEdgeWithKey,l.call(this,c.key,e,i,a)):(l=n?s?this.mergeUndirectedEdge:this.mergeDirectedEdge:s?this.addUndirectedEdge:this.addDirectedEdge,l.call(this,e,i,a))}}return this}nullCopy(e){let r=new t(n({},this._options,e));return r.replaceAttributes(n({},this.getAttributes())),r}emptyCopy(e){let t=this.nullCopy(e);return this._nodes.forEach((e,r)=>{let i=n({},e.attributes);e=new t.NodeDataClass(r,i),t._nodes.set(r,e)}),t}copy(e){if(e||={},typeof e.type==`string`&&e.type!==this.type&&e.type!==`mixed`)throw new h(`Graph.copy: cannot create an incompatible copy from "${this.type}" type to "${e.type}" because this would mean losing information about the current graph.`);if(typeof e.multi==`boolean`&&e.multi!==this.multi&&e.multi!==!0)throw new h(`Graph.copy: cannot create an incompatible copy by downgrading a multi graph to a simple one because this would mean losing information about the current graph.`);if(typeof e.allowSelfLoops==`boolean`&&e.allowSelfLoops!==this.allowSelfLoops&&e.allowSelfLoops!==!0)throw new h(`Graph.copy: cannot create an incompatible copy from a graph allowing self loops to one that does not because this would mean losing information about the current graph.`);let t=this.emptyCopy(e),r=this._edges.values(),i,a;for(;i=r.next(),i.done!==!0;)a=i.value,G(t,`copy`,!1,a.undirected,a.key,a.source.key,a.target.key,n({},a.attributes));return t}toJSON(){return this.export()}toString(){return`[object Graph]`}inspect(){let e={};this._nodes.forEach((t,n)=>{e[n]=t.attributes});let t={},n={};this._edges.forEach((e,r)=>{let i=e.undirected?`--`:`->`,a=``,o=e.source.key,s=e.target.key,c;e.undirected&&o>s&&(c=o,o=s,s=c);let l=`(${o})${i}(${s})`;r.startsWith(`geid_`)?this.multi&&(n[l]===void 0?n[l]=0:n[l]++,a+=`${n[l]}. `):a+=`[${r}]: `,a+=l,t[a]=e.attributes});let r={};for(let e in this)this.hasOwnProperty(e)&&!U.has(e)&&typeof this[e]!=`function`&&typeof e!=`symbol`&&(r[e]=this[e]);return r.attributes=this._attributes,r.nodes=e,r.edges=t,o(r,`constructor`,this.constructor),r}};typeof Symbol<`u`&&(q.prototype[Symbol.for(`nodejs.util.inspect.custom`)]=q.prototype.inspect),Be.forEach(e=>{[`add`,`merge`,`update`].forEach(t=>{let n=e.name(t),r=t===`add`?G:Ue;e.generateKey?q.prototype[n]=function(i,a,o){return r(this,n,!0,(e.type||this.type)===`undirected`,null,i,a,o,t===`update`)}:q.prototype[n]=function(i,a,o,s){return r(this,n,!1,(e.type||this.type)===`undirected`,i,a,o,s,t===`update`)}})}),ae(q),he(q),Ee(q),Ne(q);var J=class extends q{constructor(e){let t=n({type:`directed`},e);if(`multi`in t&&t.multi!==!1)throw new p(`DirectedGraph.from: inconsistent indication that the graph should be multi in given options!`);if(t.type!==`directed`)throw new p(`DirectedGraph.from: inconsistent "`+t.type+`" type in given options!`);super(t)}},Y=class extends q{constructor(e){let t=n({type:`undirected`},e);if(`multi`in t&&t.multi!==!1)throw new p(`UndirectedGraph.from: inconsistent indication that the graph should be multi in given options!`);if(t.type!==`undirected`)throw new p(`UndirectedGraph.from: inconsistent "`+t.type+`" type in given options!`);super(t)}},X=class extends q{constructor(e){let t=n({multi:!0},e);if(`multi`in t&&t.multi!==!0)throw new p(`MultiGraph.from: inconsistent indication that the graph should be simple in given options!`);super(t)}},Z=class extends q{constructor(e){let t=n({type:`directed`,multi:!0},e);if(`multi`in t&&t.multi!==!0)throw new p(`MultiDirectedGraph.from: inconsistent indication that the graph should be simple in given options!`);if(t.type!==`directed`)throw new p(`MultiDirectedGraph.from: inconsistent "`+t.type+`" type in given options!`);super(t)}},Q=class extends q{constructor(e){let t=n({type:`undirected`,multi:!0},e);if(`multi`in t&&t.multi!==!0)throw new p(`MultiUndirectedGraph.from: inconsistent indication that the graph should be simple in given options!`);if(t.type!==`undirected`)throw new p(`MultiUndirectedGraph.from: inconsistent "`+t.type+`" type in given options!`);super(t)}};function $(e){e.from=function(t,r){let i=new e(n({},t.options,r));return i.import(t),i}}$(q),$(J),$(Y),$(X),$(Z),$(Q),q.Graph=q,q.DirectedGraph=J,q.UndirectedGraph=Y,q.MultiGraph=X,q.MultiDirectedGraph=Z,q.MultiUndirectedGraph=Q,q.InvalidArgumentsGraphError=p,q.NotFoundGraphError=m,q.UsageGraphError=h;export{q as t};
@@ -1 +0,0 @@
1
- import{t as e}from"./@ungap/structured-clone.mjs";const t=r(`end`),n=r(`start`);function r(e){return t;function t(t){let n=t&&t.position&&t.position[e]||{};if(typeof n.line==`number`&&n.line>0&&typeof n.column==`number`&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset==`number`&&n.offset>-1?n.offset:void 0}}}function i(e){let r=n(e),i=t(e);if(r&&i)return{start:r,end:i}}const a=[`ariaDescribedBy`,`ariaLabel`,`ariaLabelledBy`],o={ancestors:{tbody:[`table`],td:[`table`],th:[`table`],thead:[`table`],tfoot:[`table`],tr:[`table`]},attributes:{a:[...a,`dataFootnoteBackref`,`dataFootnoteRef`,[`className`,`data-footnote-backref`],`href`],blockquote:[`cite`],code:[[`className`,/^language-./]],del:[`cite`],div:[`itemScope`,`itemType`],dl:[...a],h2:[[`className`,`sr-only`]],img:[...a,`longDesc`,`src`],input:[[`disabled`,!0],[`type`,`checkbox`]],ins:[`cite`],li:[[`className`,`task-list-item`]],ol:[...a,[`className`,`contains-task-list`]],q:[`cite`],section:[`dataFootnotes`,[`className`,`footnotes`]],source:[`srcSet`],summary:[...a],table:[...a],ul:[...a,[`className`,`contains-task-list`]],"*":`abbr.accept.acceptCharset.accessKey.action.align.alt.axis.border.cellPadding.cellSpacing.char.charOff.charSet.checked.clear.colSpan.color.cols.compact.coords.dateTime.dir.encType.frame.hSpace.headers.height.hrefLang.htmlFor.id.isMap.itemProp.label.lang.maxLength.media.method.multiple.name.noHref.noShade.noWrap.open.prompt.readOnly.rev.rowSpan.rows.rules.scope.selected.shape.size.span.start.summary.tabIndex.title.useMap.vAlign.value.width`.split(`.`)},clobber:[`ariaDescribedBy`,`ariaLabelledBy`,`id`,`name`],clobberPrefix:`user-content-`,protocols:{cite:[`http`,`https`],href:[`http`,`https`,`irc`,`ircs`,`mailto`,`xmpp`],longDesc:[`http`,`https`],src:[`http`,`https`]},required:{input:{disabled:!0,type:`checkbox`}},strip:[`script`],tagNames:`a.b.blockquote.br.code.dd.del.details.div.dl.dt.em.h1.h2.h3.h4.h5.h6.hr.i.img.input.ins.kbd.li.ol.p.picture.pre.q.rp.rt.ruby.s.samp.section.source.span.strike.strong.sub.summary.sup.table.tbody.td.tfoot.th.thead.tr.tt.ul.var`.split(`.`)},s={}.hasOwnProperty;function c(e,t){let n={type:`root`,children:[]},r=l({schema:t?{...o,...t}:o,stack:[]},e);return r&&(Array.isArray(r)?r.length===1?n=r[0]:n.children=r:n=r),n}function l(e,t){if(t&&typeof t==`object`){let n=t;switch(typeof n.type==`string`?n.type:``){case`comment`:return u(e,n);case`doctype`:return d(e,n);case`element`:return f(e,n);case`root`:return p(e,n);case`text`:return m(e,n);default:}}}function u(e,t){if(e.schema.allowComments){let e=typeof t.value==`string`?t.value:``,n=e.indexOf(`-->`),r={type:`comment`,value:n<0?e:e.slice(0,n)};return x(r,t),r}}function d(e,t){if(e.schema.allowDoctypes){let e={type:`doctype`};return x(e,t),e}}function f(e,t){let n=typeof t.tagName==`string`?t.tagName:``;e.stack.push(n);let r=h(e,t.children),i=g(e,t.properties);e.stack.pop();let a=!1;if(n&&n!==`*`&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(a=!0,e.schema.ancestors&&s.call(e.schema.ancestors,n))){let t=e.schema.ancestors[n],r=-1;for(a=!1;++r<t.length;)e.stack.includes(t[r])&&(a=!0)}if(!a)return e.schema.strip&&!e.schema.strip.includes(n)?r:void 0;let o={type:`element`,tagName:n,properties:i,children:r};return x(o,t),o}function p(e,t){let n={type:`root`,children:h(e,t.children)};return x(n,t),n}function m(e,t){let n={type:`text`,value:typeof t.value==`string`?t.value:``};return x(n,t),n}function h(e,t){let n=[];if(Array.isArray(t)){let r=t,i=-1;for(;++i<r.length;){let t=l(e,r[i]);t&&(Array.isArray(t)?n.push(...t):n.push(t))}}return n}function g(e,t){let n=e.stack[e.stack.length-1],r=e.schema.attributes,i=e.schema.required,a=r&&s.call(r,n)?r[n]:void 0,o=r&&s.call(r,`*`)?r[`*`]:void 0,c=t&&typeof t==`object`?t:{},l={},u;for(u in c)if(s.call(c,u)){let t=c[u],n=_(e,S(a,u),u,t);n??=_(e,S(o,u),u,t),n!=null&&(l[u]=n)}if(i&&s.call(i,n)){let e=i[n];for(u in e)s.call(e,u)&&!s.call(l,u)&&(l[u]=e[u])}return l}function _(e,t,n,r){return t?Array.isArray(r)?v(e,t,n,r):y(e,t,n,r):void 0}function v(e,t,n,r){let i=-1,a=[];for(;++i<r.length;){let o=y(e,t,n,r[i]);(typeof o==`number`||typeof o==`string`)&&a.push(o)}return a}function y(e,t,n,r){if(!(typeof r!=`boolean`&&typeof r!=`number`&&typeof r!=`string`)&&b(e,n,r)){if(typeof t==`object`&&t.length>1){let e=!1,n=0;for(;++n<t.length;){let i=t[n];if(i&&typeof i==`object`&&`flags`in i){if(i.test(String(r))){e=!0;break}}else if(i===r){e=!0;break}}if(!e)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+r:r}}function b(e,t,n){let r=e.schema.protocols&&s.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||r.length===0)return!0;let i=String(n),a=i.indexOf(`:`),o=i.indexOf(`?`),c=i.indexOf(`#`),l=i.indexOf(`/`);if(a<0||l>-1&&a>l||o>-1&&a>o||c>-1&&a>c)return!0;let u=-1;for(;++u<r.length;){let e=r[u];if(a===e.length&&i.slice(0,e.length)===e)return!0}return!1}function x(t,n){let r=i(n);n.data&&(t.data=e(n.data)),r&&(t.position=r)}function S(e,t){let n,r=-1;if(e)for(;++r<e.length;){let i=e[r],a=typeof i==`string`?i:i[0];if(a===t)return i;a===`data*`&&(n=i)}if(t.length>4&&t.slice(0,4).toLowerCase()===`data`)return n}export{i as a,n as i,o as n,t as r,c as t};
@@ -1,9 +0,0 @@
1
- import{r as e}from"../rolldown-runtime.mjs";import{t}from"./character-entities-legacy.mjs";import{t as n}from"./character-entities-html4.mjs";import{t as r}from"./ccount.mjs";import{t as i}from"./comma-separated-tokens.mjs";const a=[`area`,`base`,`basefont`,`bgsound`,`br`,`col`,`command`,`embed`,`frame`,`hr`,`image`,`img`,`input`,`keygen`,`link`,`meta`,`param`,`source`,`track`,`wbr`];var o=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};o.prototype.normal={},o.prototype.property={},o.prototype.space=void 0;function s(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new o(n,r,t)}function c(e){return e.toLowerCase()}var l=class{constructor(e,t){this.attribute=t,this.property=e}};l.prototype.attribute=``,l.prototype.booleanish=!1,l.prototype.boolean=!1,l.prototype.commaOrSpaceSeparated=!1,l.prototype.commaSeparated=!1,l.prototype.defined=!1,l.prototype.mustUseProperty=!1,l.prototype.number=!1,l.prototype.overloadedBoolean=!1,l.prototype.property=``,l.prototype.spaceSeparated=!1,l.prototype.space=void 0;var u=e({boolean:()=>d,booleanish:()=>f,commaOrSpaceSeparated:()=>_,commaSeparated:()=>g,number:()=>m,overloadedBoolean:()=>p,spaceSeparated:()=>h});let ee=0;const d=v(),f=v(),p=v(),m=v(),h=v(),g=v(),_=v();function v(){return 2**++ee}const y=Object.keys(u);var b=class extends l{constructor(e,t,n,r){let i=-1;if(super(e,t),x(this,`space`,r),typeof n==`number`)for(;++i<y.length;){let e=y[i];x(this,y[i],(n&u[e])===u[e])}}};b.prototype.defined=!0;function x(e,t,n){n&&(e[t]=n)}function S(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new b(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[c(r)]=r,n[c(a.attribute)]=r}return new o(t,n,e.space)}const C=S({properties:{ariaActiveDescendant:null,ariaAtomic:f,ariaAutoComplete:null,ariaBusy:f,ariaChecked:f,ariaColCount:m,ariaColIndex:m,ariaColSpan:m,ariaControls:h,ariaCurrent:null,ariaDescribedBy:h,ariaDetails:null,ariaDisabled:f,ariaDropEffect:h,ariaErrorMessage:null,ariaExpanded:f,ariaFlowTo:h,ariaGrabbed:f,ariaHasPopup:null,ariaHidden:f,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:h,ariaLevel:m,ariaLive:null,ariaModal:f,ariaMultiLine:f,ariaMultiSelectable:f,ariaOrientation:null,ariaOwns:h,ariaPlaceholder:null,ariaPosInSet:m,ariaPressed:f,ariaReadOnly:f,ariaRelevant:null,ariaRequired:f,ariaRoleDescription:h,ariaRowCount:m,ariaRowIndex:m,ariaRowSpan:m,ariaSelected:f,ariaSetSize:m,ariaSort:null,ariaValueMax:m,ariaValueMin:m,ariaValueNow:m,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function w(e,t){return t in e?e[t]:t}function T(e,t){return w(e,t.toLowerCase())}const te=S({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:g,acceptCharset:h,accessKey:h,action:null,allow:null,allowFullScreen:d,allowPaymentRequest:d,allowUserMedia:d,alt:null,as:null,async:d,autoCapitalize:null,autoComplete:h,autoFocus:d,autoPlay:d,blocking:h,capture:null,charSet:null,checked:d,cite:null,className:h,cols:m,colSpan:null,content:null,contentEditable:f,controls:d,controlsList:h,coords:m|g,crossOrigin:null,data:null,dateTime:null,decoding:null,default:d,defer:d,dir:null,dirName:null,disabled:d,download:p,draggable:f,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:d,formTarget:null,headers:h,height:m,hidden:d,high:m,href:null,hrefLang:null,htmlFor:h,httpEquiv:h,id:null,imageSizes:null,imageSrcSet:null,inert:d,inputMode:null,integrity:null,is:null,isMap:d,itemId:null,itemProp:h,itemRef:h,itemScope:d,itemType:h,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:d,low:m,manifest:null,max:null,maxLength:m,media:null,method:null,min:null,minLength:m,multiple:d,muted:d,name:null,nonce:null,noModule:d,noValidate:d,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:d,optimum:m,pattern:null,ping:h,placeholder:null,playsInline:d,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:d,referrerPolicy:null,rel:h,required:d,reversed:d,rows:m,rowSpan:m,sandbox:h,scope:null,scoped:d,seamless:d,selected:d,shadowRootClonable:d,shadowRootDelegatesFocus:d,shadowRootMode:null,shape:null,size:m,sizes:null,slot:null,span:m,spellCheck:f,src:null,srcDoc:null,srcLang:null,srcSet:null,start:m,step:null,style:null,tabIndex:m,target:null,title:null,translate:null,type:null,typeMustMatch:d,useMap:null,value:f,width:m,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:h,axis:null,background:null,bgColor:null,border:m,borderColor:null,bottomMargin:m,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:d,declare:d,event:null,face:null,frame:null,frameBorder:null,hSpace:m,leftMargin:m,link:null,longDesc:null,lowSrc:null,marginHeight:m,marginWidth:m,noResize:d,noHref:d,noShade:d,noWrap:d,object:null,profile:null,prompt:null,rev:null,rightMargin:m,rules:null,scheme:null,scrolling:f,standby:null,summary:null,text:null,topMargin:m,valueType:null,version:null,vAlign:null,vLink:null,vSpace:m,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:d,disableRemotePlayback:d,prefix:null,property:null,results:m,security:null,unselectable:null},space:`html`,transform:T}),ne=S({attributes:{accentHeight:`accent-height`,alignmentBaseline:`alignment-baseline`,arabicForm:`arabic-form`,baselineShift:`baseline-shift`,capHeight:`cap-height`,className:`class`,clipPath:`clip-path`,clipRule:`clip-rule`,colorInterpolation:`color-interpolation`,colorInterpolationFilters:`color-interpolation-filters`,colorProfile:`color-profile`,colorRendering:`color-rendering`,crossOrigin:`crossorigin`,dataType:`datatype`,dominantBaseline:`dominant-baseline`,enableBackground:`enable-background`,fillOpacity:`fill-opacity`,fillRule:`fill-rule`,floodColor:`flood-color`,floodOpacity:`flood-opacity`,fontFamily:`font-family`,fontSize:`font-size`,fontSizeAdjust:`font-size-adjust`,fontStretch:`font-stretch`,fontStyle:`font-style`,fontVariant:`font-variant`,fontWeight:`font-weight`,glyphName:`glyph-name`,glyphOrientationHorizontal:`glyph-orientation-horizontal`,glyphOrientationVertical:`glyph-orientation-vertical`,hrefLang:`hreflang`,horizAdvX:`horiz-adv-x`,horizOriginX:`horiz-origin-x`,horizOriginY:`horiz-origin-y`,imageRendering:`image-rendering`,letterSpacing:`letter-spacing`,lightingColor:`lighting-color`,markerEnd:`marker-end`,markerMid:`marker-mid`,markerStart:`marker-start`,navDown:`nav-down`,navDownLeft:`nav-down-left`,navDownRight:`nav-down-right`,navLeft:`nav-left`,navNext:`nav-next`,navPrev:`nav-prev`,navRight:`nav-right`,navUp:`nav-up`,navUpLeft:`nav-up-left`,navUpRight:`nav-up-right`,onAbort:`onabort`,onActivate:`onactivate`,onAfterPrint:`onafterprint`,onBeforePrint:`onbeforeprint`,onBegin:`onbegin`,onCancel:`oncancel`,onCanPlay:`oncanplay`,onCanPlayThrough:`oncanplaythrough`,onChange:`onchange`,onClick:`onclick`,onClose:`onclose`,onCopy:`oncopy`,onCueChange:`oncuechange`,onCut:`oncut`,onDblClick:`ondblclick`,onDrag:`ondrag`,onDragEnd:`ondragend`,onDragEnter:`ondragenter`,onDragExit:`ondragexit`,onDragLeave:`ondragleave`,onDragOver:`ondragover`,onDragStart:`ondragstart`,onDrop:`ondrop`,onDurationChange:`ondurationchange`,onEmptied:`onemptied`,onEnd:`onend`,onEnded:`onended`,onError:`onerror`,onFocus:`onfocus`,onFocusIn:`onfocusin`,onFocusOut:`onfocusout`,onHashChange:`onhashchange`,onInput:`oninput`,onInvalid:`oninvalid`,onKeyDown:`onkeydown`,onKeyPress:`onkeypress`,onKeyUp:`onkeyup`,onLoad:`onload`,onLoadedData:`onloadeddata`,onLoadedMetadata:`onloadedmetadata`,onLoadStart:`onloadstart`,onMessage:`onmessage`,onMouseDown:`onmousedown`,onMouseEnter:`onmouseenter`,onMouseLeave:`onmouseleave`,onMouseMove:`onmousemove`,onMouseOut:`onmouseout`,onMouseOver:`onmouseover`,onMouseUp:`onmouseup`,onMouseWheel:`onmousewheel`,onOffline:`onoffline`,onOnline:`ononline`,onPageHide:`onpagehide`,onPageShow:`onpageshow`,onPaste:`onpaste`,onPause:`onpause`,onPlay:`onplay`,onPlaying:`onplaying`,onPopState:`onpopstate`,onProgress:`onprogress`,onRateChange:`onratechange`,onRepeat:`onrepeat`,onReset:`onreset`,onResize:`onresize`,onScroll:`onscroll`,onSeeked:`onseeked`,onSeeking:`onseeking`,onSelect:`onselect`,onShow:`onshow`,onStalled:`onstalled`,onStorage:`onstorage`,onSubmit:`onsubmit`,onSuspend:`onsuspend`,onTimeUpdate:`ontimeupdate`,onToggle:`ontoggle`,onUnload:`onunload`,onVolumeChange:`onvolumechange`,onWaiting:`onwaiting`,onZoom:`onzoom`,overlinePosition:`overline-position`,overlineThickness:`overline-thickness`,paintOrder:`paint-order`,panose1:`panose-1`,pointerEvents:`pointer-events`,referrerPolicy:`referrerpolicy`,renderingIntent:`rendering-intent`,shapeRendering:`shape-rendering`,stopColor:`stop-color`,stopOpacity:`stop-opacity`,strikethroughPosition:`strikethrough-position`,strikethroughThickness:`strikethrough-thickness`,strokeDashArray:`stroke-dasharray`,strokeDashOffset:`stroke-dashoffset`,strokeLineCap:`stroke-linecap`,strokeLineJoin:`stroke-linejoin`,strokeMiterLimit:`stroke-miterlimit`,strokeOpacity:`stroke-opacity`,strokeWidth:`stroke-width`,tabIndex:`tabindex`,textAnchor:`text-anchor`,textDecoration:`text-decoration`,textRendering:`text-rendering`,transformOrigin:`transform-origin`,typeOf:`typeof`,underlinePosition:`underline-position`,underlineThickness:`underline-thickness`,unicodeBidi:`unicode-bidi`,unicodeRange:`unicode-range`,unitsPerEm:`units-per-em`,vAlphabetic:`v-alphabetic`,vHanging:`v-hanging`,vIdeographic:`v-ideographic`,vMathematical:`v-mathematical`,vectorEffect:`vector-effect`,vertAdvY:`vert-adv-y`,vertOriginX:`vert-origin-x`,vertOriginY:`vert-origin-y`,wordSpacing:`word-spacing`,writingMode:`writing-mode`,xHeight:`x-height`,playbackOrder:`playbackorder`,timelineBegin:`timelinebegin`},properties:{about:_,accentHeight:m,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:m,amplitude:m,arabicForm:null,ascent:m,attributeName:null,attributeType:null,azimuth:m,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:m,by:null,calcMode:null,capHeight:m,className:h,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:m,diffuseConstant:m,direction:null,display:null,dur:null,divisor:m,dominantBaseline:null,download:d,dx:null,dy:null,edgeMode:null,editable:null,elevation:m,enableBackground:null,end:null,event:null,exponent:m,externalResourcesRequired:null,fill:null,fillOpacity:m,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:g,g2:g,glyphName:g,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:m,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:m,horizOriginX:m,horizOriginY:m,id:null,ideographic:m,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:m,k:m,k1:m,k2:m,k3:m,k4:m,kernelMatrix:_,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:m,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:m,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:m,overlineThickness:m,paintOrder:null,panose1:null,path:null,pathLength:m,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:h,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:m,pointsAtY:m,pointsAtZ:m,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:_,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:_,rev:_,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:_,requiredFeatures:_,requiredFonts:_,requiredFormats:_,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:m,specularExponent:m,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:m,strikethroughThickness:m,string:null,stroke:null,strokeDashArray:_,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:m,strokeOpacity:m,strokeWidth:null,style:null,surfaceScale:m,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:_,tabIndex:m,tableValues:null,target:null,targetX:m,targetY:m,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:_,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:m,underlineThickness:m,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:m,values:null,vAlphabetic:m,vMathematical:m,vectorEffect:null,vHanging:m,vIdeographic:m,version:null,vertAdvY:m,vertOriginX:m,vertOriginY:m,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:m,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:w}),E=S({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:`xlink`,transform(e,t){return`xlink:`+t.slice(5).toLowerCase()}}),D=S({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:T}),O=S({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),re=/[A-Z]/g,k=/-[a-z]/g,ie=/^data[-\w.:]+$/i;function ae(e,t){let n=c(t),r=t,i=l;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&ie.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(k,se);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!k.test(e)){let n=e.replace(re,oe);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=b}return new i(r,t)}function oe(e){return`-`+e.toLowerCase()}function se(e){return e.charAt(1).toUpperCase()}const ce=s([C,te,E,D,O],`html`),A=s([C,ne,E,D,O],`svg`),j={}.hasOwnProperty;function le(e,t){let n=t||{};function r(t,...n){let i=r.invalid,a=r.handlers;if(t&&j.call(t,e)){let n=String(t[e]);i=j.call(a,n)?a[n]:r.unknown}if(i)return i.call(this,t,...n)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const ue=/["&'<>`]/g,de=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,fe=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,pe=/[|\\{}()[\]^$+*?.]/g,M=new WeakMap;function me(e,t){if(e=e.replace(t.subset?he(t.subset):ue,r),t.subset||t.escapeOnly)return e;return e.replace(de,n).replace(fe,r);function n(e,n,r){return t.format((e.charCodeAt(0)-55296)*1024+e.charCodeAt(1)-56320+65536,r.charCodeAt(n+2),t)}function r(e,n,r){return t.format(e.charCodeAt(0),r.charCodeAt(n+1),t)}}function he(e){let t=M.get(e);return t||(t=ge(e),M.set(e,t)),t}function ge(e){let t=[],n=-1;for(;++n<e.length;)t.push(e[n].replace(pe,`\\$&`));return RegExp(`(?:`+t.join(`|`)+`)`,`g`)}const _e=/[\dA-Fa-f]/;function N(e,t,n){let r=`&#x`+e.toString(16).toUpperCase();return n&&t&&!_e.test(String.fromCharCode(t))?r:r+`;`}const P=/\d/;function F(e,t,n){let r=`&#`+String(e);return n&&t&&!P.test(String.fromCharCode(t))?r:r+`;`}const I=[`cent`,`copy`,`divide`,`gt`,`lt`,`not`,`para`,`times`],L={}.hasOwnProperty,R={};let z;for(z in n)L.call(n,z)&&(R[n[z]]=z);const ve=/[^\dA-Za-z]/;function ye(e,n,r,i){let a=String.fromCharCode(e);if(L.call(R,a)){let e=R[a],o=`&`+e;return r&&t.includes(e)&&!I.includes(e)&&(!i||n&&n!==61&&ve.test(String.fromCharCode(n)))?o:o+`;`}return``}function be(e,t,n){let r=N(e,t,n.omitOptionalSemicolons),i;if((n.useNamedReferences||n.useShortestReferences)&&(i=ye(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!i)&&n.useShortestReferences){let i=F(e,t,n.omitOptionalSemicolons);i.length<r.length&&(r=i)}return i&&(!n.useShortestReferences||i.length<r.length)?i:r}function B(e,t){return me(e,Object.assign({format:be},t))}const xe=/^>|^->|<!--|-->|--!>|<!-$/g,Se=[`>`],Ce=[`<`,`>`];function we(e,t,n,r){return r.settings.bogusComments?`<?`+B(e.value,Object.assign({},r.settings.characterReferences,{subset:Se}))+`>`:`<!--`+e.value.replace(xe,i)+`-->`;function i(e){return B(e,Object.assign({},r.settings.characterReferences,{subset:Ce}))}}function Te(e,t,n,r){return`<!`+(r.settings.upperDoctype?`DOCTYPE`:`doctype`)+(r.settings.tightDoctype?``:` `)+`html>`}function Ee(e){return e.join(` `).trim()}const De=/[ \t\n\f\r]/g;function V(e){return typeof e==`object`?e.type===`text`?H(e.value):!1:H(e)}function H(e){return e.replace(De,``)===``}const U=G(1),W=G(-1),Oe=[];function G(e){return t;function t(t,n,r){let i=t?t.children:Oe,a=(n||0)+e,o=i[a];if(!r)for(;o&&V(o);)a+=e,o=i[a];return o}}const ke={}.hasOwnProperty;function K(e){return t;function t(t,n,r){return ke.call(e,t.tagName)&&e[t.tagName](t,n,r)}}const q=K({body:je,caption:J,colgroup:J,dd:Fe,dt:Pe,head:J,html:Ae,li:Ne,optgroup:Ie,option:Le,p:Me,rp:Y,rt:Y,tbody:ze,td:X,tfoot:Be,th:X,thead:Re,tr:Ve});function J(e,t,n){let r=U(n,t,!0);return!r||r.type!==`comment`&&!(r.type===`text`&&V(r.value.charAt(0)))}function Ae(e,t,n){let r=U(n,t);return!r||r.type!==`comment`}function je(e,t,n){let r=U(n,t);return!r||r.type!==`comment`}function Me(e,t,n){let r=U(n,t);return r?r.type===`element`&&(r.tagName===`address`||r.tagName===`article`||r.tagName===`aside`||r.tagName===`blockquote`||r.tagName===`details`||r.tagName===`div`||r.tagName===`dl`||r.tagName===`fieldset`||r.tagName===`figcaption`||r.tagName===`figure`||r.tagName===`footer`||r.tagName===`form`||r.tagName===`h1`||r.tagName===`h2`||r.tagName===`h3`||r.tagName===`h4`||r.tagName===`h5`||r.tagName===`h6`||r.tagName===`header`||r.tagName===`hgroup`||r.tagName===`hr`||r.tagName===`main`||r.tagName===`menu`||r.tagName===`nav`||r.tagName===`ol`||r.tagName===`p`||r.tagName===`pre`||r.tagName===`section`||r.tagName===`table`||r.tagName===`ul`):!n||!(n.type===`element`&&(n.tagName===`a`||n.tagName===`audio`||n.tagName===`del`||n.tagName===`ins`||n.tagName===`map`||n.tagName===`noscript`||n.tagName===`video`))}function Ne(e,t,n){let r=U(n,t);return!r||r.type===`element`&&r.tagName===`li`}function Pe(e,t,n){let r=U(n,t);return!!(r&&r.type===`element`&&(r.tagName===`dt`||r.tagName===`dd`))}function Fe(e,t,n){let r=U(n,t);return!r||r.type===`element`&&(r.tagName===`dt`||r.tagName===`dd`)}function Y(e,t,n){let r=U(n,t);return!r||r.type===`element`&&(r.tagName===`rp`||r.tagName===`rt`)}function Ie(e,t,n){let r=U(n,t);return!r||r.type===`element`&&r.tagName===`optgroup`}function Le(e,t,n){let r=U(n,t);return!r||r.type===`element`&&(r.tagName===`option`||r.tagName===`optgroup`)}function Re(e,t,n){let r=U(n,t);return!!(r&&r.type===`element`&&(r.tagName===`tbody`||r.tagName===`tfoot`))}function ze(e,t,n){let r=U(n,t);return!r||r.type===`element`&&(r.tagName===`tbody`||r.tagName===`tfoot`)}function Be(e,t,n){return!U(n,t)}function Ve(e,t,n){let r=U(n,t);return!r||r.type===`element`&&r.tagName===`tr`}function X(e,t,n){let r=U(n,t);return!r||r.type===`element`&&(r.tagName===`td`||r.tagName===`th`)}const He=K({body:Ge,colgroup:Ke,head:We,html:Ue,tbody:qe});function Ue(e){let t=U(e,-1);return!t||t.type!==`comment`}function We(e){let t=new Set;for(let n of e.children)if(n.type===`element`&&(n.tagName===`base`||n.tagName===`title`)){if(t.has(n.tagName))return!1;t.add(n.tagName)}let n=e.children[0];return!n||n.type===`element`}function Ge(e){let t=U(e,-1,!0);return!t||t.type!==`comment`&&!(t.type===`text`&&V(t.value.charAt(0)))&&!(t.type===`element`&&(t.tagName===`meta`||t.tagName===`link`||t.tagName===`script`||t.tagName===`style`||t.tagName===`template`))}function Ke(e,t,n){let r=W(n,t),i=U(e,-1,!0);return n&&r&&r.type===`element`&&r.tagName===`colgroup`&&q(r,n.children.indexOf(r),n)?!1:!!(i&&i.type===`element`&&i.tagName===`col`)}function qe(e,t,n){let r=W(n,t),i=U(e,-1);return n&&r&&r.type===`element`&&(r.tagName===`thead`||r.tagName===`tbody`)&&q(r,n.children.indexOf(r),n)?!1:!!(i&&i.type===`element`&&i.tagName===`tr`)}const Z={name:[[`
2
- \f\r &/=>`.split(``),`
3
- \f\r "&'/=>\``.split(``)],[`\0
4
- \f\r "&'/<=>`.split(``),`\0
5
- \f\r "&'/<=>\``.split(``)]],unquoted:[[`
6
- \f\r &>`.split(``),`\0
7
- \f\r "&'<=>\``.split(``)],[`\0
8
- \f\r "&'<=>\``.split(``),`\0
9
- \f\r "&'<=>\``.split(``)]],single:[[`&'`.split(``),`"&'\``.split(``)],[`\0&'`.split(``),`\0"&'\``.split(``)]],double:[[`"&`.split(``),`"&'\``.split(``)],[`\0"&`.split(``),`\0"&'\``.split(``)]]};function Je(e,t,n,r){let i=r.schema,a=i.space===`svg`?!1:r.settings.omitOptionalTags,o=i.space===`svg`?r.settings.closeEmptyElements:r.settings.voids.includes(e.tagName.toLowerCase()),s=[],c;i.space===`html`&&e.tagName===`svg`&&(r.schema=A);let l=Ye(r,e.properties),u=r.all(i.space===`html`&&e.tagName===`template`?e.content:e);return r.schema=i,u&&(o=!1),(l||!a||!He(e,t,n))&&(s.push(`<`,e.tagName,l?` `+l:``),o&&(i.space===`svg`||r.settings.closeSelfClosing)&&(c=l.charAt(l.length-1),(!r.settings.tightSelfClosing||c===`/`||c&&c!==`"`&&c!==`'`)&&s.push(` `),s.push(`/`)),s.push(`>`)),s.push(u),!o&&(!a||!q(e,t,n))&&s.push(`</`+e.tagName+`>`),s.join(``)}function Ye(e,t){let n=[],r=-1,i;if(t){for(i in t)if(t[i]!==null&&t[i]!==void 0){let r=Q(e,i,t[i]);r&&n.push(r)}}for(;++r<n.length;){let t=e.settings.tightAttributes?n[r].charAt(n[r].length-1):void 0;r!==n.length-1&&t!==`"`&&t!==`'`&&(n[r]+=` `)}return n.join(``)}function Q(e,t,n){let a=ae(e.schema,t),o=e.settings.allowParseErrors&&e.schema.space===`html`?0:1,s=e.settings.allowDangerousCharacters?0:1,c=e.quote,l;if(a.overloadedBoolean&&(n===a.attribute||n===``)?n=!0:(a.boolean||a.overloadedBoolean)&&(typeof n!=`string`||n===a.attribute||n===``)&&(n=!!n),n==null||n===!1||typeof n==`number`&&Number.isNaN(n))return``;let u=B(a.attribute,Object.assign({},e.settings.characterReferences,{subset:Z.name[o][s]}));return n===!0||(n=Array.isArray(n)?(a.commaSeparated?i:Ee)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?u:(e.settings.preferUnquoted&&(l=B(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:Z.unquoted[o][s]}))),l!==n&&(e.settings.quoteSmart&&r(n,c)>r(n,e.alternative)&&(c=e.alternative),l=c+B(n,Object.assign({},e.settings.characterReferences,{subset:(c===`'`?Z.single:Z.double)[o][s],attribute:!0}))+c),u+(l&&`=`+l))}const Xe=[`<`,`&`];function $(e,t,n,r){return n&&n.type===`element`&&(n.tagName===`script`||n.tagName===`style`)?e.value:B(e.value,Object.assign({},r.settings.characterReferences,{subset:Xe}))}function Ze(e,t,n,r){return r.settings.allowDangerousHtml?e.value:$(e,t,n,r)}function Qe(e,t,n,r){return r.all(e)}const $e=le(`type`,{invalid:et,unknown:tt,handlers:{comment:we,doctype:Te,element:Je,raw:Ze,root:Qe,text:$}});function et(e){throw Error("Expected node, not `"+e+"`")}function tt(e){let t=e;throw Error("Cannot compile unknown node `"+t.type+"`")}const nt={},rt={},it=[];function at(e,t){let n=t||nt,r=n.quote||`"`,i=r===`"`?`'`:`"`;if(r!==`"`&&r!==`'`)throw Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:ot,all:st,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||a,characterReferences:n.characterReferences||rt,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space===`svg`?A:ce,quote:r,alternative:i}.one(Array.isArray(e)?{type:`root`,children:e}:e,void 0,void 0)}function ot(e,t,n){return $e(e,t,n,this)}function st(e){let t=[],n=e&&e.children||it,r=-1;for(;++r<n.length;)t[r]=this.one(n[r],r,e);return t.join(``)}export{at as t};
@@ -1 +0,0 @@
1
- var e=Symbol.for(`immer-nothing`),t=Symbol.for(`immer-draftable`),n=Symbol.for(`immer-state`),r=process.env.NODE_ENV===`production`?[]:[function(e){return`The plugin for '${e}' has not been loaded into Immer. To enable the plugin, import and call \`enable${e}()\` when initializing your application.`},function(e){return`produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '${e}'`},`This object has been frozen and should not be mutated`,function(e){return`Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? `+e},`An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.`,`Immer forbids circular references`,"The first or second argument to `produce` must be a function","The third argument to `produce` must be a function or undefined","First argument to `createDraft` must be a plain object, an array, or an immerable object","First argument to `finishDraft` must be a draft returned by `createDraft`",function(e){return`'current' expects a draft, got: ${e}`},`Object.defineProperty() cannot be used on an Immer draft`,`Object.setPrototypeOf() cannot be used on an Immer draft`,`Immer only supports deleting array indices`,`Immer only supports setting array indices and the 'length' property`,function(e){return`'original' expects a draft, got: ${e}`}];function i(e,...t){if(process.env.NODE_ENV!==`production`){let n=r[e],i=T(n)?n.apply(null,t):n;throw Error(`[Immer] ${i}`)}throw Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var a=Object,o=a.getPrototypeOf,s=`constructor`,c=`prototype`,l=`configurable`,u=`enumerable`,d=`writable`,f=`value`,p=e=>!!e&&!!e[n];function m(e){return e?te(e)||x(e)||!!e[t]||!!e[s]?.[t]||S(e)||C(e):!1}var ee=a[c][s].toString(),h=new WeakMap;function te(e){if(!e||!w(e))return!1;let t=o(e);if(t===null||t===a[c])return!0;let n=a.hasOwnProperty.call(t,s)&&t[s];if(n===Object)return!0;if(!T(n))return!1;let r=h.get(n);return r===void 0&&(r=Function.toString.call(n),h.set(n,r)),r===ee}function g(e,t,n=!0){_(e)===0?(n?Reflect.ownKeys(e):a.keys(e)).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function _(e){let t=e[n];return t?t.type_:x(e)?1:S(e)?2:C(e)?3:0}var v=(e,t,n=_(e))=>n===2?e.has(t):a[c].hasOwnProperty.call(e,t),y=(e,t,n=_(e))=>n===2?e.get(t):e[t],b=(e,t,n,r=_(e))=>{r===2?e.set(t,n):r===3?e.add(n):e[t]=n};function ne(e,t){return e===t?e!==0||1/e==1/t:e!==e&&t!==t}var x=Array.isArray,S=e=>e instanceof Map,C=e=>e instanceof Set,w=e=>typeof e==`object`,T=e=>typeof e==`function`,E=e=>typeof e==`boolean`;function re(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var D=e=>e.copy_||e.base_,O=e=>e.modified_?e.copy_:e.base_;function k(e,t){if(S(e))return new Map(e);if(C(e))return new Set(e);if(x(e))return Array[c].slice.call(e);let r=te(e);if(t===!0||t===`class_only`&&!r){let t=a.getOwnPropertyDescriptors(e);delete t[n];let r=Reflect.ownKeys(t);for(let n=0;n<r.length;n++){let i=r[n],a=t[i];a[d]===!1&&(a[d]=!0,a[l]=!0),(a.get||a.set)&&(t[i]={[l]:!0,[d]:!0,[u]:a[u],[f]:e[i]})}return a.create(o(e),t)}else{let t=o(e);if(t!==null&&r)return{...e};let n=a.create(t);return a.assign(n,e)}}function A(e,t=!1){return M(e)||p(e)||!m(e)?e:(_(e)>1&&a.defineProperties(e,{set:j,add:j,clear:j,delete:j}),a.freeze(e),t&&g(e,(e,t)=>{A(t,!0)},!1),e)}function ie(){i(2)}var j={[f]:ie};function M(e){return e===null||!w(e)?!0:a.isFrozen(e)}var N=`MapSet`,P=`Patches`,ae=`ArrayMethods`,oe={};function F(e){let t=oe[e];return t||i(0,e),t}var I=e=>!!oe[e],L,se=()=>L,ce=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:I(N)?F(N):void 0,arrayMethodsPlugin_:I(ae)?F(ae):void 0});function R(e,t){t&&(e.patchPlugin_=F(P),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function z(e){B(e),e.drafts_.forEach(le),e.drafts_=null}function B(e){e===L&&(L=e.parent_)}var V=e=>L=ce(L,e);function le(e){let t=e[n];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function H(t,r){r.unfinalizedDrafts_=r.drafts_.length;let a=r.drafts_[0];if(t!==void 0&&t!==a){a[n].modified_&&(z(r),i(4)),m(t)&&(t=U(r,t));let{patchPlugin_:e}=r;e&&e.generateReplacementPatches_(a[n].base_,t,r)}else t=U(r,a);return ue(r,t,!0),z(r),r.patches_&&r.patchListener_(r.patches_,r.inversePatches_),t===e?void 0:t}function U(e,t){if(M(t))return t;let r=t[n];if(!r)return q(t,e.handledSet_,e);if(!G(r,e))return t;if(!r.modified_)return r.base_;if(!r.finalized_){let{callbacks_:t}=r;if(t)for(;t.length>0;)t.pop()(e);pe(r,e)}return r.copy_}function ue(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&A(t,n)}function W(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var G=(e,t)=>e.scope_===t,de=[];function K(e,t,n,r){let i=D(e),a=e.type_;if(r!==void 0&&y(i,r,a)===t){b(i,r,n,a);return}if(!e.draftLocations_){let t=e.draftLocations_=new Map;g(i,(e,n)=>{if(p(n)){let r=t.get(n)||[];r.push(e),t.set(n,r)}})}let o=e.draftLocations_.get(t)??de;for(let e of o)b(i,e,n,a)}function fe(e,t,n){e.callbacks_.push(function(r){let i=t;if(!i||!G(i,r))return;r.mapSetPlugin_?.fixSetContents(i);let a=O(i);K(e,i.draft_??i,a,n),pe(i,r)})}function pe(e,t){if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){let{patchPlugin_:n}=t;if(n){let r=n.getPath(e);r&&n.generatePatches_(e,r,t)}W(e)}}function me(e,t,r){let{scope_:i}=e;if(p(r)){let a=r[n];G(a,i)&&a.callbacks_.push(function(){Q(e),K(e,r,O(a),t)})}else m(r)&&e.callbacks_.push(function(){let n=D(e);e.type_===3?n.has(r)&&q(r,i.handledSet_,i):y(n,t,e.type_)===r&&i.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&q(y(e.copy_,t,e.type_),i.handledSet_,i)})}function q(e,t,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||p(e)||t.has(e)||!m(e)||M(e)?e:(t.add(e),g(e,(i,a)=>{if(p(a)){let t=a[n];G(t,r)&&(b(e,i,O(t),e.type_),W(t))}else m(a)&&q(a,t,r)}),e)}function he(e,t){let n=x(e),r={type_:n?1:0,scope_:t?t.scope_:se(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},i=r,a=J;n&&(i=[r],a=Y);let{revoke:o,proxy:s}=Proxy.revocable(i,a);return r.draft_=s,r.revoke_=o,[s,r]}var J={get(e,t){if(t===n)return e;let r=e.scope_.arrayMethodsPlugin_,i=e.type_===1&&typeof t==`string`;if(i&&r?.isArrayOperationMethod(t))return r.createMethodInterceptor(e,t);let a=D(e);if(!v(a,t,e.type_))return ge(e,a,t);let o=a[t];if(e.finalized_||!m(o)||i&&e.operationMethod&&r?.isMutatingArrayMethod(e.operationMethod)&&re(t))return o;if(o===X(e.base_,t)){Q(e);let n=e.type_===1?+t:t,r=$(e.scope_,o,e,n);return e.copy_[n]=r}return o},has(e,t){return t in D(e)},ownKeys(e){return Reflect.ownKeys(D(e))},set(e,t,r){let i=_e(D(e),t);if(i?.set)return i.set.call(e.draft_,r),!0;if(!e.modified_){let i=X(D(e),t),a=i?.[n];if(a&&a.base_===r)return e.copy_[t]=r,e.assigned_.set(t,!1),!0;if(ne(r,i)&&(r!==void 0||v(e.base_,t,e.type_)))return!0;Q(e),Z(e)}return e.copy_[t]===r&&(r!==void 0||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t])?!0:(e.copy_[t]=r,e.assigned_.set(t,!0),me(e,t,r),!0)},deleteProperty(e,t){return Q(e),X(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),Z(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let n=D(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{[d]:!0,[l]:e.type_!==1||t!==`length`,[u]:r[u],[f]:n[t]}},defineProperty(){i(11)},getPrototypeOf(e){return o(e.base_)},setPrototypeOf(){i(12)}},Y={};for(let e in J){let t=J[e];Y[e]=function(){let e=arguments;return e[0]=e[0][0],t.apply(this,e)}}Y.deleteProperty=function(e,t){return process.env.NODE_ENV!==`production`&&isNaN(parseInt(t))&&i(13),Y.set.call(this,e,t,void 0)},Y.set=function(e,t,n){return process.env.NODE_ENV!==`production`&&t!==`length`&&isNaN(parseInt(t))&&i(14),J.set.call(this,e[0],t,n,e[0])};function X(e,t){let r=e[n];return(r?D(r):e)[t]}function ge(e,t,n){let r=_e(t,n);return r?f in r?r[f]:r.get?.call(e.draft_):void 0}function _e(e,t){if(!(t in e))return;let n=o(e);for(;n;){let e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=o(n)}}function Z(e){e.modified_||(e.modified_=!0,e.parent_&&Z(e.parent_))}function Q(e){e.copy_||=(e.assigned_=new Map,k(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var ve=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(t,n,r)=>{if(T(t)&&!T(n)){let e=n;n=t;let r=this;return function(t=e,...i){return r.produce(t,e=>n.call(this,e,...i))}}T(n)||i(6),r!==void 0&&!T(r)&&i(7);let a;if(m(t)){let e=V(this),i=$(e,t,void 0),o=!0;try{a=n(i),o=!1}finally{o?z(e):B(e)}return R(e,r),H(a,e)}else if(!t||!w(t)){if(a=n(t),a===void 0&&(a=t),a===e&&(a=void 0),this.autoFreeze_&&A(a,!0),r){let e=[],n=[];F(P).generateReplacementPatches_(t,a,{patches_:e,inversePatches_:n}),r(e,n)}return a}else i(1,t)},this.produceWithPatches=(e,t)=>{if(T(e))return(t,...n)=>this.produceWithPatches(t,t=>e(t,...n));let n,r;return[this.produce(e,t,(e,t)=>{n=e,r=t}),n,r]},E(t?.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),E(t?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(t.useStrictShallowCopy),E(t?.useStrictIteration)&&this.setUseStrictIteration(t.useStrictIteration)}createDraft(e){m(e)||i(8),p(e)&&(e=ye(e));let t=V(this),r=$(t,e,void 0);return r[n].isManual_=!0,B(t),r}finishDraft(e,t){let r=e&&e[n];(!r||!r.isManual_)&&i(9);let{scope_:a}=r;return R(a,t),H(void 0,a)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){let r=t[n];if(r.path.length===0&&r.op===`replace`){e=r.value;break}}n>-1&&(t=t.slice(n+1));let r=F(P).applyPatches_;return p(e)?r(e,t):this.produce(e,e=>r(e,t))}};function $(e,t,n,r){let[i,a]=S(t)?F(N).proxyMap_(t,n):C(t)?F(N).proxySet_(t,n):he(t,n);return(n?.scope_??se()).drafts_.push(i),a.callbacks_=n?.callbacks_??[],a.key_=r,n&&r!==void 0?fe(n,a,r):a.callbacks_.push(function(e){e.mapSetPlugin_?.fixSetContents(a);let{patchPlugin_:t}=e;a.modified_&&t&&t.generatePatches_(a,[],e)}),i}function ye(e){return p(e)||i(10,e),be(e)}function be(e){if(!m(e)||M(e))return e;let t=e[n],r,i=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=k(e,t.scope_.immer_.useStrictShallowCopy_),i=t.scope_.immer_.shouldUseStrictIteration()}else r=k(e,!0);return g(r,(e,t)=>{b(r,e,be(t))},i),t&&(t.finalized_=!1),r}var xe=new ve().produce,Se=e=>e;export{xe as n,Se as t};
@@ -1 +0,0 @@
1
- const e=e=>t(e)||n(e),t=e=>{try{return e instanceof Error}catch{return!1}},n=e=>{try{return r.has(Object.prototype.toString.call(e))}catch{return!1}},r=new Set([`[object Error]`,`[object DOMException]`,`[object DOMError]`,`[object Exception]`]);export{e as t};
@@ -1 +0,0 @@
1
- function e(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}export{e as t};
@@ -1 +0,0 @@
1
- import{n as e,r as t}from"../rolldown-runtime.mjs";import{statSync as n}from"fs";import{stat as r}from"fs/promises";var i=t({isexe:()=>a,sync:()=>o}),a,o,s,c,l=e((()=>{a=async(e,t={})=>{let{ignoreErrors:n=!1}=t;try{return s(await r(e),t)}catch(e){let t=e;if(n||t.code===`EACCES`)return!1;throw t}},o=(e,t={})=>{let{ignoreErrors:r=!1}=t;try{return s(n(e),t)}catch(e){let t=e;if(r||t.code===`EACCES`)return!1;throw t}},s=(e,t)=>e.isFile()&&c(e,t),c=(e,t)=>{let n=t.uid??process.getuid?.(),r=t.groups??process.getgroups?.()??[],i=t.gid??process.getgid?.()??r[0];if(n===void 0||i===void 0)throw Error(`cannot get uid or gid`);let a=new Set([i,...r]),o=e.mode,s=e.uid,c=e.gid;return!!(o&1||o&8&&a.has(c)||o&64&&s===n||o&72&&n===0)}})),u=t({isexe:()=>d,sync:()=>f}),d,f,p,m,h=e((()=>{d=async(e,t={})=>{let{ignoreErrors:n=!1}=t;try{return m(await r(e),e,t)}catch(e){let t=e;if(n||t.code===`EACCES`)return!1;throw t}},f=(e,t={})=>{let{ignoreErrors:r=!1}=t;try{return m(n(e),e,t)}catch(e){let t=e;if(r||t.code===`EACCES`)return!1;throw t}},p=(e,t)=>{let{pathExt:n=process.env.PATHEXT||``}=t,r=n.split(`;`);if(r.indexOf(``)!==-1)return!0;for(let t=0;t<r.length;t++){let n=r[t].toLowerCase(),i=e.substring(e.length-n.length).toLowerCase();if(n&&i===n)return!0}return!1},m=(e,t,n)=>e.isFile()&&p(t,n)})),g=e((()=>{})),_=t({isexe:()=>y,posix:()=>i,sync:()=>b,win32:()=>u}),v,y,b,x=e((()=>{l(),h(),g(),v=(process.env._ISEXE_TEST_PLATFORM_||process.platform)===`win32`?u:i,y=v.isexe,b=v.sync}));export{_ as n,x as t};
@@ -1,14 +0,0 @@
1
- var e={Space_Separator:/[\u1680\u2000-\u200A\u202F\u205F\u3000]/,ID_Start:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/,ID_Continue:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/},t={isSpaceSeparator(t){return typeof t==`string`&&e.Space_Separator.test(t)},isIdStartChar(t){return typeof t==`string`&&(t>=`a`&&t<=`z`||t>=`A`&&t<=`Z`||t===`$`||t===`_`||e.ID_Start.test(t))},isIdContinueChar(t){return typeof t==`string`&&(t>=`a`&&t<=`z`||t>=`A`&&t<=`Z`||t>=`0`&&t<=`9`||t===`$`||t===`_`||t===`‌`||t===`‍`||e.ID_Continue.test(t))},isDigit(e){return typeof e==`string`&&/[0-9]/.test(e)},isHexDigit(e){return typeof e==`string`&&/[0-9A-Fa-f]/.test(e)}};let n,r,i,a,o,s,c,l,u;var d=function(e,t){n=String(e),r=`start`,i=[],a=0,o=1,s=0,c=void 0,l=void 0,u=void 0;do c=v(),D[r]();while(c.type!==`eof`);return typeof t==`function`?f({"":u},``,t):u};function f(e,t,n){let r=e[t];if(typeof r==`object`&&r)if(Array.isArray(r))for(let e=0;e<r.length;e++){let t=String(e),i=f(r,t,n);i===void 0?delete r[t]:Object.defineProperty(r,t,{value:i,writable:!0,enumerable:!0,configurable:!0})}else for(let e in r){let t=f(r,e,n);t===void 0?delete r[e]:Object.defineProperty(r,e,{value:t,writable:!0,enumerable:!0,configurable:!0})}return n.call(e,t,r)}let p,m,h,g,_;function v(){for(p=`default`,m=``,h=!1,g=1;;){_=y();let e=x[p]();if(e)return e}}function y(){if(n[a])return String.fromCodePoint(n.codePointAt(a))}function b(){let e=y();return e===`
2
- `?(o++,s=0):e?s+=e.length:s++,e&&(a+=e.length),e}const x={default(){switch(_){case` `:case`\v`:case`\f`:case` `:case`\xA0`:case``:case`
3
- `:case`\r`:case`\u2028`:case`\u2029`:b();return;case`/`:b(),p=`comment`;return;case void 0:return b(),S(`eof`)}if(t.isSpaceSeparator(_)){b();return}return x[r]()},comment(){switch(_){case`*`:b(),p=`multiLineComment`;return;case`/`:b(),p=`singleLineComment`;return}throw A(b())},multiLineComment(){switch(_){case`*`:b(),p=`multiLineCommentAsterisk`;return;case void 0:throw A(b())}b()},multiLineCommentAsterisk(){switch(_){case`*`:b();return;case`/`:b(),p=`default`;return;case void 0:throw A(b())}b(),p=`multiLineComment`},singleLineComment(){switch(_){case`
4
- `:case`\r`:case`\u2028`:case`\u2029`:b(),p=`default`;return;case void 0:return b(),S(`eof`)}b()},value(){switch(_){case`{`:case`[`:return S(`punctuator`,b());case`n`:return b(),C(`ull`),S(`null`,null);case`t`:return b(),C(`rue`),S(`boolean`,!0);case`f`:return b(),C(`alse`),S(`boolean`,!1);case`-`:case`+`:b()===`-`&&(g=-1),p=`sign`;return;case`.`:m=b(),p=`decimalPointLeading`;return;case`0`:m=b(),p=`zero`;return;case`1`:case`2`:case`3`:case`4`:case`5`:case`6`:case`7`:case`8`:case`9`:m=b(),p=`decimalInteger`;return;case`I`:return b(),C(`nfinity`),S(`numeric`,1/0);case`N`:return b(),C(`aN`),S(`numeric`,NaN);case`"`:case`'`:h=b()===`"`,m=``,p=`string`;return}throw A(b())},identifierNameStartEscape(){if(_!==`u`)throw A(b());b();let e=E();switch(e){case`$`:case`_`:break;default:if(!t.isIdStartChar(e))throw M();break}m+=e,p=`identifierName`},identifierName(){switch(_){case`$`:case`_`:case`‌`:case`‍`:m+=b();return;case`\\`:b(),p=`identifierNameEscape`;return}if(t.isIdContinueChar(_)){m+=b();return}return S(`identifier`,m)},identifierNameEscape(){if(_!==`u`)throw A(b());b();let e=E();switch(e){case`$`:case`_`:case`‌`:case`‍`:break;default:if(!t.isIdContinueChar(e))throw M();break}m+=e,p=`identifierName`},sign(){switch(_){case`.`:m=b(),p=`decimalPointLeading`;return;case`0`:m=b(),p=`zero`;return;case`1`:case`2`:case`3`:case`4`:case`5`:case`6`:case`7`:case`8`:case`9`:m=b(),p=`decimalInteger`;return;case`I`:return b(),C(`nfinity`),S(`numeric`,g*(1/0));case`N`:return b(),C(`aN`),S(`numeric`,NaN)}throw A(b())},zero(){switch(_){case`.`:m+=b(),p=`decimalPoint`;return;case`e`:case`E`:m+=b(),p=`decimalExponent`;return;case`x`:case`X`:m+=b(),p=`hexadecimal`;return}return S(`numeric`,g*0)},decimalInteger(){switch(_){case`.`:m+=b(),p=`decimalPoint`;return;case`e`:case`E`:m+=b(),p=`decimalExponent`;return}if(t.isDigit(_)){m+=b();return}return S(`numeric`,g*Number(m))},decimalPointLeading(){if(t.isDigit(_)){m+=b(),p=`decimalFraction`;return}throw A(b())},decimalPoint(){switch(_){case`e`:case`E`:m+=b(),p=`decimalExponent`;return}if(t.isDigit(_)){m+=b(),p=`decimalFraction`;return}return S(`numeric`,g*Number(m))},decimalFraction(){switch(_){case`e`:case`E`:m+=b(),p=`decimalExponent`;return}if(t.isDigit(_)){m+=b();return}return S(`numeric`,g*Number(m))},decimalExponent(){switch(_){case`+`:case`-`:m+=b(),p=`decimalExponentSign`;return}if(t.isDigit(_)){m+=b(),p=`decimalExponentInteger`;return}throw A(b())},decimalExponentSign(){if(t.isDigit(_)){m+=b(),p=`decimalExponentInteger`;return}throw A(b())},decimalExponentInteger(){if(t.isDigit(_)){m+=b();return}return S(`numeric`,g*Number(m))},hexadecimal(){if(t.isHexDigit(_)){m+=b(),p=`hexadecimalInteger`;return}throw A(b())},hexadecimalInteger(){if(t.isHexDigit(_)){m+=b();return}return S(`numeric`,g*Number(m))},string(){switch(_){case`\\`:b(),m+=w();return;case`"`:if(h)return b(),S(`string`,m);m+=b();return;case`'`:if(!h)return b(),S(`string`,m);m+=b();return;case`
5
- `:case`\r`:throw A(b());case`\u2028`:case`\u2029`:N(_);break;case void 0:throw A(b())}m+=b()},start(){switch(_){case`{`:case`[`:return S(`punctuator`,b())}p=`value`},beforePropertyName(){switch(_){case`$`:case`_`:m=b(),p=`identifierName`;return;case`\\`:b(),p=`identifierNameStartEscape`;return;case`}`:return S(`punctuator`,b());case`"`:case`'`:h=b()===`"`,p=`string`;return}if(t.isIdStartChar(_)){m+=b(),p=`identifierName`;return}throw A(b())},afterPropertyName(){if(_===`:`)return S(`punctuator`,b());throw A(b())},beforePropertyValue(){p=`value`},afterPropertyValue(){switch(_){case`,`:case`}`:return S(`punctuator`,b())}throw A(b())},beforeArrayValue(){if(_===`]`)return S(`punctuator`,b());p=`value`},afterArrayValue(){switch(_){case`,`:case`]`:return S(`punctuator`,b())}throw A(b())},end(){throw A(b())}};function S(e,t){return{type:e,value:t,line:o,column:s}}function C(e){for(let t of e){if(y()!==t)throw A(b());b()}}function w(){switch(y()){case`b`:return b(),`\b`;case`f`:return b(),`\f`;case`n`:return b(),`
6
- `;case`r`:return b(),`\r`;case`t`:return b(),` `;case`v`:return b(),`\v`;case`0`:if(b(),t.isDigit(y()))throw A(b());return`\0`;case`x`:return b(),T();case`u`:return b(),E();case`
7
- `:case`\u2028`:case`\u2029`:return b(),``;case`\r`:return b(),y()===`
8
- `&&b(),``;case`1`:case`2`:case`3`:case`4`:case`5`:case`6`:case`7`:case`8`:case`9`:throw A(b());case void 0:throw A(b())}return b()}function T(){let e=``,n=y();if(!t.isHexDigit(n)||(e+=b(),n=y(),!t.isHexDigit(n)))throw A(b());return e+=b(),String.fromCodePoint(parseInt(e,16))}function E(){let e=``,n=4;for(;n-- >0;){let n=y();if(!t.isHexDigit(n))throw A(b());e+=b()}return String.fromCodePoint(parseInt(e,16))}const D={start(){if(c.type===`eof`)throw j();O()},beforePropertyName(){switch(c.type){case`identifier`:case`string`:l=c.value,r=`afterPropertyName`;return;case`punctuator`:k();return;case`eof`:throw j()}},afterPropertyName(){if(c.type===`eof`)throw j();r=`beforePropertyValue`},beforePropertyValue(){if(c.type===`eof`)throw j();O()},beforeArrayValue(){if(c.type===`eof`)throw j();if(c.type===`punctuator`&&c.value===`]`){k();return}O()},afterPropertyValue(){if(c.type===`eof`)throw j();switch(c.value){case`,`:r=`beforePropertyName`;return;case`}`:k()}},afterArrayValue(){if(c.type===`eof`)throw j();switch(c.value){case`,`:r=`beforeArrayValue`;return;case`]`:k()}},end(){}};function O(){let e;switch(c.type){case`punctuator`:switch(c.value){case`{`:e={};break;case`[`:e=[];break}break;case`null`:case`boolean`:case`numeric`:case`string`:e=c.value;break}if(u===void 0)u=e;else{let t=i[i.length-1];Array.isArray(t)?t.push(e):Object.defineProperty(t,l,{value:e,writable:!0,enumerable:!0,configurable:!0})}if(typeof e==`object`&&e)i.push(e),r=Array.isArray(e)?`beforeArrayValue`:`beforePropertyName`;else{let e=i[i.length-1];r=e==null?`end`:Array.isArray(e)?`afterArrayValue`:`afterPropertyValue`}}function k(){i.pop();let e=i[i.length-1];r=e==null?`end`:Array.isArray(e)?`afterArrayValue`:`afterPropertyValue`}function A(e){return F(e===void 0?`JSON5: invalid end of input at ${o}:${s}`:`JSON5: invalid character '${P(e)}' at ${o}:${s}`)}function j(){return F(`JSON5: invalid end of input at ${o}:${s}`)}function M(){return s-=5,F(`JSON5: invalid identifier character at ${o}:${s}`)}function N(e){console.warn(`JSON5: '${P(e)}' in strings is not valid ECMAScript; consider escaping`)}function P(e){let t={"'":`\\'`,'"':`\\"`,"\\":`\\\\`,"\b":`\\b`,"\f":`\\f`,"\n":`\\n`,"\r":`\\r`," ":`\\t`,"\v":`\\v`,"\0":`\\0`,"\u2028":`\\u2028`,"\u2029":`\\u2029`};if(t[e])return t[e];if(e<` `){let t=e.charCodeAt(0).toString(16);return`\\x`+(`00`+t).substring(t.length)}return e}function F(e){let t=SyntaxError(e);return t.lineNumber=o,t.columnNumber=s,t}var I={parse:d,stringify:function(e,n,r){let i=[],a=``,o,s,c=``,l;if(typeof n==`object`&&n&&!Array.isArray(n)&&(r=n.space,l=n.quote,n=n.replacer),typeof n==`function`)s=n;else if(Array.isArray(n)){o=[];for(let e of n){let t;typeof e==`string`?t=e:(typeof e==`number`||e instanceof String||e instanceof Number)&&(t=String(e)),t!==void 0&&o.indexOf(t)<0&&o.push(t)}}return r instanceof Number?r=Number(r):r instanceof String&&(r=String(r)),typeof r==`number`?r>0&&(r=Math.min(10,Math.floor(r)),c=` `.substr(0,r)):typeof r==`string`&&(c=r.substr(0,10)),u(``,{"":e});function u(e,t){let n=t[e];switch(n!=null&&(typeof n.toJSON5==`function`?n=n.toJSON5(e):typeof n.toJSON==`function`&&(n=n.toJSON(e))),s&&(n=s.call(t,e,n)),n instanceof Number?n=Number(n):n instanceof String?n=String(n):n instanceof Boolean&&(n=n.valueOf()),n){case null:return`null`;case!0:return`true`;case!1:return`false`}if(typeof n==`string`)return d(n,!1);if(typeof n==`number`)return String(n);if(typeof n==`object`)return Array.isArray(n)?m(n):f(n)}function d(e){let n={"'":.1,'"':.2},r={"'":`\\'`,'"':`\\"`,"\\":`\\\\`,"\b":`\\b`,"\f":`\\f`,"\n":`\\n`,"\r":`\\r`," ":`\\t`,"\v":`\\v`,"\0":`\\0`,"\u2028":`\\u2028`,"\u2029":`\\u2029`},i=``;for(let a=0;a<e.length;a++){let o=e[a];switch(o){case`'`:case`"`:n[o]++,i+=o;continue;case`\0`:if(t.isDigit(e[a+1])){i+=`\\x00`;continue}}if(r[o]){i+=r[o];continue}if(o<` `){let e=o.charCodeAt(0).toString(16);i+=`\\x`+(`00`+e).substring(e.length);continue}i+=o}let a=l||Object.keys(n).reduce((e,t)=>n[e]<n[t]?e:t);return i=i.replace(new RegExp(a,`g`),r[a]),a+i+a}function f(e){if(i.indexOf(e)>=0)throw TypeError(`Converting circular structure to JSON5`);i.push(e);let t=a;a+=c;let n=o||Object.keys(e),r=[];for(let t of n){let n=u(t,e);if(n!==void 0){let e=p(t)+`:`;c!==``&&(e+=` `),e+=n,r.push(e)}}let s;if(r.length===0)s=`{}`;else{let e;if(c===``)e=r.join(`,`),s=`{`+e+`}`;else{let n=`,
9
- `+a;e=r.join(n),s=`{
10
- `+a+e+`,
11
- `+t+`}`}}return i.pop(),a=t,s}function p(e){if(e.length===0)return d(e,!0);let n=String.fromCodePoint(e.codePointAt(0));if(!t.isIdStartChar(n))return d(e,!0);for(let r=n.length;r<e.length;r++)if(!t.isIdContinueChar(String.fromCodePoint(e.codePointAt(r))))return d(e,!0);return e}function m(e){if(i.indexOf(e)>=0)throw TypeError(`Converting circular structure to JSON5`);i.push(e);let t=a;a+=c;let n=[];for(let t=0;t<e.length;t++){let r=u(String(t),e);n.push(r===void 0?`null`:r)}let r;if(n.length===0)r=`[]`;else if(c===``)r=`[`+n.join(`,`)+`]`;else{let e=`,
12
- `+a,i=n.join(e);r=`[
13
- `+a+i+`,
14
- `+t+`]`}return i.pop(),a=t,r}}};export{I as t};
@@ -1 +0,0 @@
1
- const e={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:e=>e>=255?255:e<0?0:e,g:e=>e>=255?255:e<0?0:e,b:e=>e>=255?255:e<0?0:e,h:e=>e%360,s:e=>e>=100?100:e<0?0:e,l:e=>e>=100?100:e<0?0:e,a:e=>e>=1?1:e<0?0:e},toLinear:e=>{let t=e/255;return e>.03928?((t+.055)/1.055)**2.4:t/12.92},hue2rgb:(e,t,n)=>(n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e),hsl2rgb:({h:t,s:n,l:r},i)=>{if(!n)return r*2.55;t/=360,n/=100,r/=100;let a=r<.5?r*(1+n):r+n-r*n,o=2*r-a;switch(i){case`r`:return e.hue2rgb(o,a,t+1/3)*255;case`g`:return e.hue2rgb(o,a,t)*255;case`b`:return e.hue2rgb(o,a,t-1/3)*255}},rgb2hsl:({r:e,g:t,b:n},r)=>{e/=255,t/=255,n/=255;let i=Math.max(e,t,n),a=Math.min(e,t,n),o=(i+a)/2;if(r===`l`)return o*100;if(i===a)return 0;let s=i-a,c=o>.5?s/(2-i-a):s/(i+a);if(r===`s`)return c*100;switch(i){case e:return((t-n)/s+(t<n?6:0))*60;case t:return((n-e)/s+2)*60;case n:return((e-t)/s+4)*60;default:return-1}}},t={channel:e,lang:{clamp:(e,t,n)=>t>n?Math.min(t,Math.max(n,e)):Math.min(n,Math.max(t,e)),round:e=>Math.round(e*1e10)/1e10},unit:{dec2hex:e=>{let t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}}},n={};for(let e=0;e<=255;e++)n[e]=t.unit.dec2hex(e);const r={ALL:0,RGB:1,HSL:2};var i=class{constructor(){this.type=r.ALL}get(){return this.type}set(e){if(this.type&&this.type!==e)throw Error(`Cannot change both RGB and HSL channels at the same time`);this.type=e}reset(){this.type=r.ALL}is(e){return this.type===e}};const a=new class{constructor(e,t){this.color=t,this.changed=!1,this.data=e,this.type=new i}set(e,t){return this.color=t,this.changed=!1,this.data=e,this.type.type=r.ALL,this}_ensureHSL(){let e=this.data,{h:n,s:r,l:i}=e;n===void 0&&(e.h=t.channel.rgb2hsl(e,`h`)),r===void 0&&(e.s=t.channel.rgb2hsl(e,`s`)),i===void 0&&(e.l=t.channel.rgb2hsl(e,`l`))}_ensureRGB(){let e=this.data,{r:n,g:r,b:i}=e;n===void 0&&(e.r=t.channel.hsl2rgb(e,`r`)),r===void 0&&(e.g=t.channel.hsl2rgb(e,`g`)),i===void 0&&(e.b=t.channel.hsl2rgb(e,`b`))}get r(){let e=this.data,n=e.r;return!this.type.is(r.HSL)&&n!==void 0?n:(this._ensureHSL(),t.channel.hsl2rgb(e,`r`))}get g(){let e=this.data,n=e.g;return!this.type.is(r.HSL)&&n!==void 0?n:(this._ensureHSL(),t.channel.hsl2rgb(e,`g`))}get b(){let e=this.data,n=e.b;return!this.type.is(r.HSL)&&n!==void 0?n:(this._ensureHSL(),t.channel.hsl2rgb(e,`b`))}get h(){let e=this.data,n=e.h;return!this.type.is(r.RGB)&&n!==void 0?n:(this._ensureRGB(),t.channel.rgb2hsl(e,`h`))}get s(){let e=this.data,n=e.s;return!this.type.is(r.RGB)&&n!==void 0?n:(this._ensureRGB(),t.channel.rgb2hsl(e,`s`))}get l(){let e=this.data,n=e.l;return!this.type.is(r.RGB)&&n!==void 0?n:(this._ensureRGB(),t.channel.rgb2hsl(e,`l`))}get a(){return this.data.a}set r(e){this.type.set(r.RGB),this.changed=!0,this.data.r=e}set g(e){this.type.set(r.RGB),this.changed=!0,this.data.g=e}set b(e){this.type.set(r.RGB),this.changed=!0,this.data.b=e}set h(e){this.type.set(r.HSL),this.changed=!0,this.data.h=e}set s(e){this.type.set(r.HSL),this.changed=!0,this.data.s=e}set l(e){this.type.set(r.HSL),this.changed=!0,this.data.l=e}set a(e){this.changed=!0,this.data.a=e}}({r:0,g:0,b:0,a:0},`transparent`),o={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;let t=e.match(o.re);if(!t)return;let n=t[1],r=parseInt(n,16),i=n.length,s=i%4==0,c=i>4,l=c?1:17,u=c?8:4,d=s?0:-1,f=c?255:15;return a.set({r:(r>>u*(d+3)&f)*l,g:(r>>u*(d+2)&f)*l,b:(r>>u*(d+1)&f)*l,a:s?(r&f)*l/255:1},e)},stringify:e=>{let{r:t,g:r,b:i,a}=e;return a<1?`#${n[Math.round(t)]}${n[Math.round(r)]}${n[Math.round(i)]}${n[Math.round(a*255)]}`:`#${n[Math.round(t)]}${n[Math.round(r)]}${n[Math.round(i)]}`}},s={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:e=>{let n=e.match(s.hueRe);if(n){let[,e,r]=n;switch(r){case`grad`:return t.channel.clamp.h(parseFloat(e)*.9);case`rad`:return t.channel.clamp.h(parseFloat(e)*180/Math.PI);case`turn`:return t.channel.clamp.h(parseFloat(e)*360)}}return t.channel.clamp.h(parseFloat(e))},parse:e=>{let n=e.charCodeAt(0);if(n!==104&&n!==72)return;let r=e.match(s.re);if(!r)return;let[,i,o,c,l,u]=r;return a.set({h:s._hue2deg(i),s:t.channel.clamp.s(parseFloat(o)),l:t.channel.clamp.l(parseFloat(c)),a:l?t.channel.clamp.a(u?parseFloat(l)/100:parseFloat(l)):1},e)},stringify:e=>{let{h:n,s:r,l:i,a}=e;return a<1?`hsla(${t.lang.round(n)}, ${t.lang.round(r)}%, ${t.lang.round(i)}%, ${a})`:`hsl(${t.lang.round(n)}, ${t.lang.round(r)}%, ${t.lang.round(i)}%)`}},c={colors:{aliceblue:`#f0f8ff`,antiquewhite:`#faebd7`,aqua:`#00ffff`,aquamarine:`#7fffd4`,azure:`#f0ffff`,beige:`#f5f5dc`,bisque:`#ffe4c4`,black:`#000000`,blanchedalmond:`#ffebcd`,blue:`#0000ff`,blueviolet:`#8a2be2`,brown:`#a52a2a`,burlywood:`#deb887`,cadetblue:`#5f9ea0`,chartreuse:`#7fff00`,chocolate:`#d2691e`,coral:`#ff7f50`,cornflowerblue:`#6495ed`,cornsilk:`#fff8dc`,crimson:`#dc143c`,cyanaqua:`#00ffff`,darkblue:`#00008b`,darkcyan:`#008b8b`,darkgoldenrod:`#b8860b`,darkgray:`#a9a9a9`,darkgreen:`#006400`,darkgrey:`#a9a9a9`,darkkhaki:`#bdb76b`,darkmagenta:`#8b008b`,darkolivegreen:`#556b2f`,darkorange:`#ff8c00`,darkorchid:`#9932cc`,darkred:`#8b0000`,darksalmon:`#e9967a`,darkseagreen:`#8fbc8f`,darkslateblue:`#483d8b`,darkslategray:`#2f4f4f`,darkslategrey:`#2f4f4f`,darkturquoise:`#00ced1`,darkviolet:`#9400d3`,deeppink:`#ff1493`,deepskyblue:`#00bfff`,dimgray:`#696969`,dimgrey:`#696969`,dodgerblue:`#1e90ff`,firebrick:`#b22222`,floralwhite:`#fffaf0`,forestgreen:`#228b22`,fuchsia:`#ff00ff`,gainsboro:`#dcdcdc`,ghostwhite:`#f8f8ff`,gold:`#ffd700`,goldenrod:`#daa520`,gray:`#808080`,green:`#008000`,greenyellow:`#adff2f`,grey:`#808080`,honeydew:`#f0fff0`,hotpink:`#ff69b4`,indianred:`#cd5c5c`,indigo:`#4b0082`,ivory:`#fffff0`,khaki:`#f0e68c`,lavender:`#e6e6fa`,lavenderblush:`#fff0f5`,lawngreen:`#7cfc00`,lemonchiffon:`#fffacd`,lightblue:`#add8e6`,lightcoral:`#f08080`,lightcyan:`#e0ffff`,lightgoldenrodyellow:`#fafad2`,lightgray:`#d3d3d3`,lightgreen:`#90ee90`,lightgrey:`#d3d3d3`,lightpink:`#ffb6c1`,lightsalmon:`#ffa07a`,lightseagreen:`#20b2aa`,lightskyblue:`#87cefa`,lightslategray:`#778899`,lightslategrey:`#778899`,lightsteelblue:`#b0c4de`,lightyellow:`#ffffe0`,lime:`#00ff00`,limegreen:`#32cd32`,linen:`#faf0e6`,magenta:`#ff00ff`,maroon:`#800000`,mediumaquamarine:`#66cdaa`,mediumblue:`#0000cd`,mediumorchid:`#ba55d3`,mediumpurple:`#9370db`,mediumseagreen:`#3cb371`,mediumslateblue:`#7b68ee`,mediumspringgreen:`#00fa9a`,mediumturquoise:`#48d1cc`,mediumvioletred:`#c71585`,midnightblue:`#191970`,mintcream:`#f5fffa`,mistyrose:`#ffe4e1`,moccasin:`#ffe4b5`,navajowhite:`#ffdead`,navy:`#000080`,oldlace:`#fdf5e6`,olive:`#808000`,olivedrab:`#6b8e23`,orange:`#ffa500`,orangered:`#ff4500`,orchid:`#da70d6`,palegoldenrod:`#eee8aa`,palegreen:`#98fb98`,paleturquoise:`#afeeee`,palevioletred:`#db7093`,papayawhip:`#ffefd5`,peachpuff:`#ffdab9`,peru:`#cd853f`,pink:`#ffc0cb`,plum:`#dda0dd`,powderblue:`#b0e0e6`,purple:`#800080`,rebeccapurple:`#663399`,red:`#ff0000`,rosybrown:`#bc8f8f`,royalblue:`#4169e1`,saddlebrown:`#8b4513`,salmon:`#fa8072`,sandybrown:`#f4a460`,seagreen:`#2e8b57`,seashell:`#fff5ee`,sienna:`#a0522d`,silver:`#c0c0c0`,skyblue:`#87ceeb`,slateblue:`#6a5acd`,slategray:`#708090`,slategrey:`#708090`,snow:`#fffafa`,springgreen:`#00ff7f`,tan:`#d2b48c`,teal:`#008080`,thistle:`#d8bfd8`,transparent:`#00000000`,turquoise:`#40e0d0`,violet:`#ee82ee`,wheat:`#f5deb3`,white:`#ffffff`,whitesmoke:`#f5f5f5`,yellow:`#ffff00`,yellowgreen:`#9acd32`},parse:e=>{e=e.toLowerCase();let t=c.colors[e];if(t)return o.parse(t)},stringify:e=>{let t=o.stringify(e);for(let e in c.colors)if(c.colors[e]===t)return e}},l={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:e=>{let n=e.charCodeAt(0);if(n!==114&&n!==82)return;let r=e.match(l.re);if(!r)return;let[,i,o,s,c,u,d,f,p]=r;return a.set({r:t.channel.clamp.r(o?parseFloat(i)*2.55:parseFloat(i)),g:t.channel.clamp.g(c?parseFloat(s)*2.55:parseFloat(s)),b:t.channel.clamp.b(d?parseFloat(u)*2.55:parseFloat(u)),a:f?t.channel.clamp.a(p?parseFloat(f)/100:parseFloat(f)):1},e)},stringify:e=>{let{r:n,g:r,b:i,a}=e;return a<1?`rgba(${t.lang.round(n)}, ${t.lang.round(r)}, ${t.lang.round(i)}, ${t.lang.round(a)})`:`rgb(${t.lang.round(n)}, ${t.lang.round(r)}, ${t.lang.round(i)})`}},u={format:{keyword:c,hex:o,rgb:l,rgba:l,hsl:s,hsla:s},parse:e=>{if(typeof e!=`string`)return e;let t=o.parse(e)||l.parse(e)||s.parse(e)||c.parse(e);if(t)return t;throw Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(r.HSL)||e.data.r===void 0?s.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?l.stringify(e):o.stringify(e)},d=(e,n)=>{let r=u.parse(e);for(let e in n)r[e]=t.channel.clamp[e](n[e]);return u.stringify(r)},f=e=>u.format.hex.stringify(u.parse(e)),p=(e,n,r)=>{let i=u.parse(e),a=i[n],o=t.channel.clamp[n](a+r);return a!==o&&(i[n]=o),u.stringify(i)},m=(e,t)=>p(e,`a`,-t),h=(e,t)=>{let n=u.parse(e),r={};for(let e in t)t[e]&&(r[e]=n[e]+t[e]);return d(e,r)},g=(e,n)=>{let r=u.parse(e),i={},a=(e,t,n)=>t>0?(n-e)*t/100:e*t/100;for(let e in n)i[e]=a(r[e],n[e],t.channel.max[e]);return h(e,i)};export{m as n,f as r,g as t};