chapkit 2.2.0__tar.gz → 2.3.0__tar.gz

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 (95) hide show
  1. {chapkit-2.2.0 → chapkit-2.3.0}/PKG-INFO +5 -4
  2. {chapkit-2.2.0 → chapkit-2.3.0}/README.md +3 -3
  3. {chapkit-2.2.0 → chapkit-2.3.0}/pyproject.toml +3 -1
  4. {chapkit-2.2.0 → chapkit-2.3.0}/pyproject.toml.orig +3 -1
  5. chapkit-2.2.0/src/chapkit/api/apps/console/assets/dist-B8seCrSS.js → chapkit-2.3.0/src/chapkit/api/apps/console/assets/dist-Bd60saQK.js +1 -1
  6. chapkit-2.3.0/src/chapkit/api/apps/console/assets/index-CFWL4GpM.js +127 -0
  7. {chapkit-2.2.0 → chapkit-2.3.0}/src/chapkit/api/apps/console/index.html +1 -1
  8. {chapkit-2.2.0 → chapkit-2.3.0}/src/chapkit/api/apps/console/manifest.json +1 -1
  9. {chapkit-2.2.0 → chapkit-2.3.0}/src/chapkit/api/service_builder.py +2 -0
  10. {chapkit-2.2.0 → chapkit-2.3.0}/src/chapkit/cli/cli.py +1 -1
  11. {chapkit-2.2.0 → chapkit-2.3.0}/src/chapkit/cli/migrate.py +66 -55
  12. chapkit-2.3.0/src/chapkit/cli/mlproject.py +1158 -0
  13. {chapkit-2.2.0 → chapkit-2.3.0}/src/chapkit/cli/run.py +124 -50
  14. {chapkit-2.2.0 → chapkit-2.3.0}/src/chapkit/cli/templates/migrate/main_migrate.py.jinja2 +17 -0
  15. {chapkit-2.2.0 → chapkit-2.3.0}/src/chapkit/ml/runner.py +70 -0
  16. chapkit-2.2.0/src/chapkit/api/apps/console/assets/index-BXTIRDCJ.js +0 -127
  17. chapkit-2.2.0/src/chapkit/cli/mlproject.py +0 -330
  18. {chapkit-2.2.0 → chapkit-2.3.0}/src/chapkit/__init__.py +0 -0
  19. {chapkit-2.2.0 → chapkit-2.3.0}/src/chapkit/alembic/__init__.py +0 -0
  20. {chapkit-2.2.0 → chapkit-2.3.0}/src/chapkit/alembic/env.py +0 -0
  21. {chapkit-2.2.0 → chapkit-2.3.0}/src/chapkit/alembic/script.py.mako +0 -0
  22. {chapkit-2.2.0 → chapkit-2.3.0}/src/chapkit/alembic/versions/20251010_0927_4d869b5fb06e_initial_schema.py +0 -0
  23. {chapkit-2.2.0 → chapkit-2.3.0}/src/chapkit/alembic/versions/__init__.py +0 -0
  24. {chapkit-2.2.0 → chapkit-2.3.0}/src/chapkit/alembic_helpers.py +0 -0
  25. {chapkit-2.2.0 → chapkit-2.3.0}/src/chapkit/api/__init__.py +0 -0
  26. {chapkit-2.2.0 → chapkit-2.3.0}/src/chapkit/api/apps/console/assets/index-HY9NoZeE.css +0 -0
  27. {chapkit-2.2.0 → chapkit-2.3.0}/src/chapkit/api/apps/console/assets/javascript-CppQSorr.js +0 -0
  28. {chapkit-2.2.0 → chapkit-2.3.0}/src/chapkit/api/apps/console/assets/roboto-cyrillic-ext-wght-normal-BCp_3N7R.woff2 +0 -0
  29. {chapkit-2.2.0 → chapkit-2.3.0}/src/chapkit/api/apps/console/assets/roboto-cyrillic-wght-normal-fOt7epNf.woff2 +0 -0
  30. {chapkit-2.2.0 → chapkit-2.3.0}/src/chapkit/api/apps/console/assets/roboto-greek-ext-wght-normal-Bgw4czJT.woff2 +0 -0
  31. {chapkit-2.2.0 → chapkit-2.3.0}/src/chapkit/api/apps/console/assets/roboto-greek-wght-normal-DlT9XTxE.woff2 +0 -0
  32. {chapkit-2.2.0 → chapkit-2.3.0}/src/chapkit/api/apps/console/assets/roboto-latin-ext-wght-normal-DYIxWhlt.woff2 +0 -0
  33. {chapkit-2.2.0 → chapkit-2.3.0}/src/chapkit/api/apps/console/assets/roboto-latin-wght-normal-ccAYIvAh.woff2 +0 -0
  34. {chapkit-2.2.0 → chapkit-2.3.0}/src/chapkit/api/apps/console/assets/roboto-math-wght-normal-4a3xuzGk.woff2 +0 -0
  35. {chapkit-2.2.0 → chapkit-2.3.0}/src/chapkit/api/apps/console/assets/roboto-symbols-wght-normal-B7iHSfaG.woff2 +0 -0
  36. {chapkit-2.2.0 → chapkit-2.3.0}/src/chapkit/api/apps/console/assets/roboto-vietnamese-wght-normal-_f1XEJpo.woff2 +0 -0
  37. {chapkit-2.2.0 → chapkit-2.3.0}/src/chapkit/api/apps/console/assets/vitesse-dark-BZCL-v6S.js +0 -0
  38. {chapkit-2.2.0 → chapkit-2.3.0}/src/chapkit/api/apps/console/assets/vitesse-light-VbXTXTou.js +0 -0
  39. {chapkit-2.2.0 → chapkit-2.3.0}/src/chapkit/api/apps/console/favicon.svg +0 -0
  40. {chapkit-2.2.0 → chapkit-2.3.0}/src/chapkit/api/apps/console/icons.svg +0 -0
  41. {chapkit-2.2.0 → chapkit-2.3.0}/src/chapkit/api/dependencies.py +0 -0
  42. {chapkit-2.2.0 → chapkit-2.3.0}/src/chapkit/artifact/__init__.py +0 -0
  43. {chapkit-2.2.0 → chapkit-2.3.0}/src/chapkit/artifact/manager.py +0 -0
  44. {chapkit-2.2.0 → chapkit-2.3.0}/src/chapkit/artifact/models.py +0 -0
  45. {chapkit-2.2.0 → chapkit-2.3.0}/src/chapkit/artifact/repository.py +0 -0
  46. {chapkit-2.2.0 → chapkit-2.3.0}/src/chapkit/artifact/router.py +0 -0
  47. {chapkit-2.2.0 → chapkit-2.3.0}/src/chapkit/artifact/schemas.py +0 -0
  48. {chapkit-2.2.0 → chapkit-2.3.0}/src/chapkit/cli/__init__.py +0 -0
  49. {chapkit-2.2.0 → chapkit-2.3.0}/src/chapkit/cli/__main__.py +0 -0
  50. {chapkit-2.2.0 → chapkit-2.3.0}/src/chapkit/cli/artifact.py +0 -0
  51. {chapkit-2.2.0 → chapkit-2.3.0}/src/chapkit/cli/init.py +0 -0
  52. {chapkit-2.2.0 → chapkit-2.3.0}/src/chapkit/cli/requirements.py +0 -0
  53. {chapkit-2.2.0 → chapkit-2.3.0}/src/chapkit/cli/templates/.dockerignore +0 -0
  54. {chapkit-2.2.0 → chapkit-2.3.0}/src/chapkit/cli/templates/.gitignore +0 -0
  55. {chapkit-2.2.0 → chapkit-2.3.0}/src/chapkit/cli/templates/.python-version +0 -0
  56. {chapkit-2.2.0 → chapkit-2.3.0}/src/chapkit/cli/templates/Dockerfile.jinja2 +0 -0
  57. {chapkit-2.2.0 → chapkit-2.3.0}/src/chapkit/cli/templates/README.md.jinja2 +0 -0
  58. {chapkit-2.2.0 → chapkit-2.3.0}/src/chapkit/cli/templates/compose.yml.jinja2 +0 -0
  59. {chapkit-2.2.0 → chapkit-2.3.0}/src/chapkit/cli/templates/main.py.jinja2 +0 -0
  60. {chapkit-2.2.0 → chapkit-2.3.0}/src/chapkit/cli/templates/main_shell.py.jinja2 +0 -0
  61. {chapkit-2.2.0 → chapkit-2.3.0}/src/chapkit/cli/templates/migrate/CHAPKIT_migrate.md.jinja2 +0 -0
  62. {chapkit-2.2.0 → chapkit-2.3.0}/src/chapkit/cli/templates/migrate/Dockerfile_migrate.jinja2 +0 -0
  63. {chapkit-2.2.0 → chapkit-2.3.0}/src/chapkit/cli/templates/migrate/Makefile_migrate.jinja2 +0 -0
  64. {chapkit-2.2.0 → chapkit-2.3.0}/src/chapkit/cli/templates/migrate/README_migrate.md.jinja2 +0 -0
  65. {chapkit-2.2.0 → chapkit-2.3.0}/src/chapkit/cli/templates/migrate/dockerignore_migrate.jinja2 +0 -0
  66. {chapkit-2.2.0 → chapkit-2.3.0}/src/chapkit/cli/templates/migrate/gitignore_migrate.jinja2 +0 -0
  67. {chapkit-2.2.0 → chapkit-2.3.0}/src/chapkit/cli/templates/migrate/pyproject_migrate.toml.jinja2 +0 -0
  68. {chapkit-2.2.0 → chapkit-2.3.0}/src/chapkit/cli/templates/migrate/requirements_migrate.txt.jinja2 +0 -0
  69. {chapkit-2.2.0 → chapkit-2.3.0}/src/chapkit/cli/templates/publish-docker.yml.jinja2 +0 -0
  70. {chapkit-2.2.0 → chapkit-2.3.0}/src/chapkit/cli/templates/pyproject.toml.jinja2 +0 -0
  71. {chapkit-2.2.0 → chapkit-2.3.0}/src/chapkit/cli/templates/scripts/predict.R.jinja2 +0 -0
  72. {chapkit-2.2.0 → chapkit-2.3.0}/src/chapkit/cli/templates/scripts/predict_model.py.jinja2 +0 -0
  73. {chapkit-2.2.0 → chapkit-2.3.0}/src/chapkit/cli/templates/scripts/train.R.jinja2 +0 -0
  74. {chapkit-2.2.0 → chapkit-2.3.0}/src/chapkit/cli/templates/scripts/train_model.py.jinja2 +0 -0
  75. {chapkit-2.2.0 → chapkit-2.3.0}/src/chapkit/cli/test/__init__.py +0 -0
  76. {chapkit-2.2.0 → chapkit-2.3.0}/src/chapkit/cli/test/command.py +0 -0
  77. {chapkit-2.2.0 → chapkit-2.3.0}/src/chapkit/cli/test/runner.py +0 -0
  78. {chapkit-2.2.0 → chapkit-2.3.0}/src/chapkit/cli/test/utils.py +0 -0
  79. {chapkit-2.2.0 → chapkit-2.3.0}/src/chapkit/config/__init__.py +0 -0
  80. {chapkit-2.2.0 → chapkit-2.3.0}/src/chapkit/config/manager.py +0 -0
  81. {chapkit-2.2.0 → chapkit-2.3.0}/src/chapkit/config/models.py +0 -0
  82. {chapkit-2.2.0 → chapkit-2.3.0}/src/chapkit/config/repository.py +0 -0
  83. {chapkit-2.2.0 → chapkit-2.3.0}/src/chapkit/config/router.py +0 -0
  84. {chapkit-2.2.0 → chapkit-2.3.0}/src/chapkit/config/schemas.py +0 -0
  85. {chapkit-2.2.0 → chapkit-2.3.0}/src/chapkit/data/__init__.py +0 -0
  86. {chapkit-2.2.0 → chapkit-2.3.0}/src/chapkit/data/dataframe.py +0 -0
  87. {chapkit-2.2.0 → chapkit-2.3.0}/src/chapkit/data/generator.py +0 -0
  88. {chapkit-2.2.0 → chapkit-2.3.0}/src/chapkit/data/geo.py +0 -0
  89. {chapkit-2.2.0 → chapkit-2.3.0}/src/chapkit/ml/__init__.py +0 -0
  90. {chapkit-2.2.0 → chapkit-2.3.0}/src/chapkit/ml/manager.py +0 -0
  91. {chapkit-2.2.0 → chapkit-2.3.0}/src/chapkit/ml/router.py +0 -0
  92. {chapkit-2.2.0 → chapkit-2.3.0}/src/chapkit/ml/schemas.py +0 -0
  93. {chapkit-2.2.0 → chapkit-2.3.0}/src/chapkit/py.typed +0 -0
  94. {chapkit-2.2.0 → chapkit-2.3.0}/src/chapkit/scheduler.py +0 -0
  95. {chapkit-2.2.0 → chapkit-2.3.0}/src/chapkit/utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: chapkit
3
- Version: 2.2.0
3
+ Version: 2.3.0
4
4
  Summary: ML and data service modules built on servicekit - config, artifacts, and ML workflows
5
5
  Keywords: ml,machine-learning,data-science,artifacts,config,servicekit
6
6
  Author: Morten Hansen
@@ -18,6 +18,7 @@ Requires-Dist: typer>=0.24.2
18
18
  Requires-Dist: jinja2>=3.1.6
19
19
  Requires-Dist: servicekit>=3.0.0,<4
20
20
  Requires-Dist: httpx>=0.28.1
21
+ Requires-Dist: jsonschema>=4.26.0
21
22
  Requires-Dist: pandas>=2.3.3 ; extra == 'dataframe'
22
23
  Requires-Dist: polars>=1.34.0 ; extra == 'dataframe'
23
24
  Requires-Dist: xarray>=2025.10.1 ; extra == 'dataframe'
@@ -114,12 +115,12 @@ This creates a ready-to-run service with configuration, artifacts, and API endpo
114
115
 
115
116
  ### `chapkit mlproject run` - Serve an existing MLproject
116
117
 
117
- If you already have an MLflow-style `MLproject` directory (R, Python, or mixed), `chapkit mlproject run` stands it up as a chapkit service with no code generation:
118
+ If you already have an MLflow-style `MLproject` (R, Python, or mixed), `chapkit mlproject run` stands it up as a chapkit service with no code generation and no files written. The service serves the MLproject's model contract (metadata, period type, covariates, horizon bounds) and turns its `user_options` into a typed config schema:
118
119
 
119
120
  ```bash
120
- chapkit mlproject run # serve the MLproject in the current directory
121
- chapkit mlproject run . # same
121
+ chapkit mlproject run # serve the MLproject in the current directory
122
122
  chapkit mlproject run /path/to/mlproject
123
+ chapkit mlproject run /path/to/mlproject/MLproject.yaml --port 9091
123
124
  ```
124
125
 
125
126
  ### `chapkit mlproject migrate` - Adopt an existing MLproject as a chapkit project
@@ -76,12 +76,12 @@ This creates a ready-to-run service with configuration, artifacts, and API endpo
76
76
 
77
77
  ### `chapkit mlproject run` - Serve an existing MLproject
78
78
 
79
- If you already have an MLflow-style `MLproject` directory (R, Python, or mixed), `chapkit mlproject run` stands it up as a chapkit service with no code generation:
79
+ If you already have an MLflow-style `MLproject` (R, Python, or mixed), `chapkit mlproject run` stands it up as a chapkit service with no code generation and no files written. The service serves the MLproject's model contract (metadata, period type, covariates, horizon bounds) and turns its `user_options` into a typed config schema:
80
80
 
81
81
  ```bash
82
- chapkit mlproject run # serve the MLproject in the current directory
83
- chapkit mlproject run . # same
82
+ chapkit mlproject run # serve the MLproject in the current directory
84
83
  chapkit mlproject run /path/to/mlproject
84
+ chapkit mlproject run /path/to/mlproject/MLproject.yaml --port 9091
85
85
  ```
86
86
 
87
87
  ### `chapkit mlproject migrate` - Adopt an existing MLproject as a chapkit project
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "chapkit"
3
- version = "2.2.0"
3
+ version = "2.3.0"
4
4
  description = "ML and data service modules built on servicekit - config, artifacts, and ML workflows"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.13"
@@ -27,6 +27,7 @@ dependencies = [
27
27
  "jinja2>=3.1.6",
28
28
  "servicekit>=3.0.0,<4",
29
29
  "httpx>=0.28.1",
30
+ "jsonschema>=4.26.0",
30
31
  ]
31
32
 
32
33
  [[project.authors]]
@@ -76,6 +77,7 @@ dev = [
76
77
  "pandas>=3.0.2",
77
78
  "numpy>=2.4.4",
78
79
  "httpx2>=2.4.0",
80
+ "types-jsonschema>=4.26.0.20261006",
79
81
  ]
80
82
 
81
83
  [build-system]
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "chapkit"
3
- version = "2.2.0"
3
+ version = "2.3.0"
4
4
  description = "ML and data service modules built on servicekit - config, artifacts, and ML workflows"
5
5
  readme = "README.md"
6
6
  authors = [{ name = "Morten Hansen", email = "morten@dhis2.org" }]
@@ -29,6 +29,7 @@ dependencies = [
29
29
  "jinja2>=3.1.6",
30
30
  "servicekit>=3.0.0,<4",
31
31
  "httpx>=0.28.1",
32
+ "jsonschema>=4.26.0",
32
33
  ]
33
34
 
34
35
  [project.optional-dependencies]
@@ -64,6 +65,7 @@ dev = [
64
65
  "pandas>=3.0.2",
65
66
  "numpy>=2.4.4",
66
67
  "httpx2>=2.4.0",
68
+ "types-jsonschema>=4.26.0.20261006",
67
69
  ]
68
70
 
69
71
  [build-system]
@@ -1,4 +1,4 @@
1
- import{a as e,c as t,d as n,f as r,i,l as a,n as o,o as s,p as c,r as l,s as u,t as d,u as f}from"./index-BXTIRDCJ.js";var p=c(n(((e,t)=>{(function(e,n){typeof define==`function`&&define.amd?define(n):typeof t==`object`&&t.exports?t.exports=n():e.log=n()})(e,function(){var e=function(){},t=`undefined`,n=typeof window!==t&&typeof window.navigator!==t&&/Trident\/|MSIE /.test(window.navigator.userAgent),r=[`trace`,`debug`,`info`,`warn`,`error`],i={},a=null;function o(e,t){var n=e[t];if(typeof n.bind==`function`)return n.bind(e);try{return Function.prototype.bind.call(n,e)}catch{return function(){return Function.prototype.apply.apply(n,[e,arguments])}}}function s(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function c(r){return r===`debug`&&(r=`log`),typeof console===t?!1:r===`trace`&&n?s:console[r]===void 0?console.log===void 0?e:o(console,`log`):o(console,r)}function l(){for(var n=this.getLevel(),i=0;i<r.length;i++){var a=r[i];this[a]=i<n?e:this.methodFactory(a,n,this.name)}if(this.log=this.debug,typeof console===t&&n<this.levels.SILENT)return`No console available for logging`}function u(e){return function(){typeof console!==t&&(l.call(this),this[e].apply(this,arguments))}}function d(e,t,n){return c(e)||u.apply(this,arguments)}function f(e,n){var o=this,s,c,u,f=`loglevel`;typeof e==`string`?f+=`:`+e:typeof e==`symbol`&&(f=void 0);function p(e){var n=(r[e]||`silent`).toUpperCase();if(typeof window!==t&&f){try{window.localStorage[f]=n;return}catch{}try{window.document.cookie=encodeURIComponent(f)+`=`+n+`;`}catch{}}}function m(){var e;if(typeof window!==t&&f){try{e=window.localStorage[f]}catch{}if(typeof e===t)try{var n=window.document.cookie,r=encodeURIComponent(f),i=n.indexOf(r+`=`);i!==-1&&(e=/^([^;]+)/.exec(n.slice(i+r.length+1))[1])}catch{}return o.levels[e]===void 0&&(e=void 0),e}}function h(){if(typeof window!==t&&f){try{window.localStorage.removeItem(f)}catch{}try{window.document.cookie=encodeURIComponent(f)+`=; expires=Thu, 01 Jan 1970 00:00:00 UTC`}catch{}}}function g(e){var t=e;if(typeof t==`string`&&o.levels[t.toUpperCase()]!==void 0&&(t=o.levels[t.toUpperCase()]),typeof t==`number`&&t>=0&&t<=o.levels.SILENT)return t;throw TypeError(`log.setLevel() called with invalid level: `+e)}o.name=e,o.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},o.methodFactory=n||d,o.getLevel=function(){return u??c??s},o.setLevel=function(e,t){return u=g(e),t!==!1&&p(u),l.call(o)},o.setDefaultLevel=function(e){c=g(e),m()||o.setLevel(e,!1)},o.resetLevel=function(){u=null,h(),l.call(o)},o.enableAll=function(e){o.setLevel(o.levels.TRACE,e)},o.disableAll=function(e){o.setLevel(o.levels.SILENT,e)},o.rebuild=function(){if(a!==o&&(s=g(a.getLevel())),l.call(o),a===o)for(var e in i)i[e].rebuild()},s=g(a?a.getLevel():`WARN`);var _=m();_!=null&&(u=g(_)),l.call(o)}a=new f,a.getLogger=function(e){if(typeof e!=`symbol`&&typeof e!=`string`||e===``)throw TypeError(`You must supply a name when creating a logger.`);var t=i[e];return t||=i[e]=new f(e,a.methodFactory),t};var p=typeof window===t?void 0:window.log;return a.noConflict=function(){return typeof window!==t&&window.log===a&&(window.log=p),a},a.getLoggers=function(){return i},a.default=a,a})}))(),1);p.default.setLevel(`silent`);var m=p.default,h={STRING:`String`,NUMBER:`Number`,TRUE:`True`,FALSE:`False`,NULL:`Null`,OBJECT:`Object`,ARRAY:`Array`,PROPERTY:`Property`,PROPERTY_NAME:`PropertyName`,PROPERTY_COLON:`PropertyColon`,ITEM:`Item`,JSON_TEXT:`JsonText`,INVALID:`⚠`},g={Pair:h.PROPERTY,Key:h.PROPERTY_NAME,BlockSequence:h.ARRAY,BlockMapping:h.OBJECT,FlowSequence:h.ARRAY,FlowMapping:h.OBJECT,QuotedLiteral:h.STRING,Literal:h.STRING,Stream:h.JSON_TEXT,Document:h.OBJECT},_={File:h.JSON_TEXT},v=[h.STRING,h.NUMBER,h.TRUE,h.FALSE,h.NULL],y=[h.OBJECT,h.ARRAY,h.ITEM],b={JSON5:`json5`,JSON:`json4`,YAML:`yaml`},x=(e,t)=>{switch(t){case b.YAML:return g[e]??e;case b.JSON5:return _[e]??e;default:return e}};function S(e,t,n){let r=[];for(let i=t;i?.parent;i=i.parent)switch(x(i.parent.name,n)){case h.PROPERTY:{let t=de(i.parent,h.PROPERTY_NAME,n);if(t){let n=ie(e,t).replace(/[/~]/g,e=>e===`~`?`~0`:`~1`);r.unshift(n)}break}case h.ARRAY:if(se(i,n)){let e=me(i.parent,i,n);r.unshift(`${e}`)}}return r.length===0?``:`/`+r.join(`/`)}var ee=(e,t,n=-1,r)=>S(e.doc,s(e).resolve(t,n),r),te=(e,t)=>{let n=s(e),r=new Map;return n.iterate({enter:n=>{if([h.PROPERTY_NAME,h.OBJECT].includes(x(n.name,t))){let i=S(e.doc,n.node,t),{from:a,to:o}=n.node;if(!n.node?.nextSibling?.node)return r.set(i,{keyFrom:a,keyTo:o}),!0;let s=t===b.JSON?n.node?.nextSibling?.node:n.node?.nextSibling?.node?.nextSibling?.node;if(!s)return r.set(i,{keyFrom:a,keyTo:o}),!0;let{from:c,to:l}=s;return r.set(i,{keyFrom:a,keyTo:o,valueFrom:c,valueTo:l}),!0}}}),r},ne=(e,t,n=-1)=>s(e).resolveInner(t,n),C=e=>e.replace(/^"(.*)"$/,`$1`).replace(/^'(.*)'$/,`$1`),re=e=>e.replace(/^"(.*)"$/,`'$1'`),ie=(e,t,n=!0,r=!0)=>{let i=t?e.sliceString(t.from,t.to):``;return n?r?C(i):i.replace(/(^["'])|(["']$)/g,``):i},ae=(e,t)=>x(e.name,t)===h.INVALID&&(x(e.prevSibling?.name??``,t)===h.PROPERTY_NAME||x(e.prevSibling?.name??``,t)===h.PROPERTY_COLON),oe=(e,t)=>v.includes(x(e.name,t))||ae(e,t),se=(e,t)=>[...v,...y].includes(x(e.name,t))||ae(e,t),ce=(e,t)=>x(e.name,t)===h.PROPERTY_NAME||x(e.name,t)===h.INVALID&&(x(e.prevSibling?.name??``,t)===h.PROPERTY||x(e.prevSibling?.name??``,t)===`{`)||t===b.YAML&&x(e.parent?.name??``,t)===h.OBJECT,le=e=>{let t=[],n=e.firstChild;for(;n;)n&&t.push(n),n=n?.nextSibling;return t},ue=(e,t,n)=>le(e).filter(e=>x(e.name,n)===t),de=(e,t,n)=>le(e).find(e=>x(e.name,n)===t)??null,fe=(e,t)=>le(e).find(e=>oe(e,t)),pe=(e,t)=>le(e).filter(e=>v.includes(x(e.name,t))||y.includes(x(e.name,t))),me=(e,t,n)=>pe(e,n).findIndex(e=>e.from===t.from&&e.to===t.to),w=(e,t,n,r=1/0)=>{let i=e;for(;i&&r>0;){if(x(i.name,n)===t)return i;i=i.parent,r--}return null},he=t.define(),ge=a.define({create(){},update(e,t){for(let e of t.effects)if(e.is(he))return e.value;return e}}),_e=e=>e.field(ge),ve=e=>[ge.init(()=>e)],ye={AdditionalItemsError:"Array at `{{pointer}}` may not have an additional item `{{key}}`",AdditionalPropertiesError:"Additional property `{{property}}` on `{{pointer}}` does not match schema `{{schema}}`",AllOfError:"Value `{{value}}` at `{{pointer}}` does not match schema of `{{allOf}}`",AnyOfError:"Value `{{value}}` at `{{pointer}}` does not match any schema of `{{anyOf}}`",ConstError:"Expected value at `{{pointer}}` to be `{{expected}}`, but value given is `{{value}}`",containsAnyError:"The array at `{{pointer}}` must contain at least one item",ContainsArrayError:"The property at `{{pointer}}` must not be an array",ContainsError:"The array at `{{pointer}}` must contain an element that matches `{{schema}}`",EnumError:"Expected given value `{{value}}` in `{{pointer}}` to be one of `{{values}}`",ForbiddenPropertyError:"Property name `{{property}}` at `{{pointer}}` is not allowed",FormatDateError:"Value `{{value}}` at `{{pointer}}` is not a valid date",FormatDateTimeError:"Value `{{value}}` at `{{pointer}}` is not a valid date-time",FormatEmailError:"Value `{{value}}` at `{{pointer}}` is not a valid email",FormatHostnameError:"Value `{{value}}` at `{{pointer}}` is not a valid hostname",FormatIPV4Error:"Value `{{value}}` at `{{pointer}}` is not a valid IPv4 address",FormatIPV4LeadingZeroError:`IPv4 addresses starting with zero are invalid, since they are interpreted as octals`,FormatIPV6Error:"Value `{{value}}` at `{{pointer}}` is not a valid IPv6 address",FormatIPV6LeadingZeroError:`IPv6 addresses starting with zero are invalid, since they are interpreted as octals`,FormatJsonPointerError:"Value `{{value}}` at `{{pointer}}` is not a valid json-pointer",FormatRegExError:"Value `{{value}}` at `{{pointer}}` is not a valid regular expression",FormatTimeError:"Value `{{value}}` at `{{pointer}}` is not a valid time",FormatURIError:"Value `{{value}}` at `{{pointer}}` is not a valid uri",FormatURIReferenceError:"Value `{{value}}` at `{{pointer}}` is not a valid uri-reference",FormatURITemplateError:"Value `{{value}}` at `{{pointer}}` is not a valid uri-template",FormatURLError:"Value `{{value}}` at `{{pointer}}` is not a valid url",InvalidDataError:"No value may be specified in `{{pointer}}`",InvalidPropertyNameError:"Invalid property name `{{property}}` at `{{pointer}}`",MaximumError:"Value in `{{pointer}}` is `{{length}}`, but should be `{{maximum}}` at maximum",MaxItemsError:"Too many items in `{{pointer}}`, should be `{{maximum}}` at most, but got `{{length}}`",MaxLengthError:"Value `{{pointer}}` should have a maximum length of `{{maxLength}}`, but got `{{length}}`.",MaxPropertiesError:"Too many properties in `{{pointer}}`, should be `{{maximum}}` at most, but got `{{length}}`",MinimumError:"Value in `{{pointer}}` is `{{length}}`, but should be `{{minimum}}` at minimum",MinItemsError:"Too few items in `{{pointer}}`, should be at least `{{minItems}}`, but got `{{length}}`",MinItemsOneError:"At least one item is required in `{{pointer}}`",MinLengthError:"Value `{{pointer}}` should have a minimum length of `{{minLength}}`, but got `{{length}}`.",MinLengthOneError:"A value is required in `{{pointer}}`",MinPropertiesError:"Too few properties in `{{pointer}}`, should be at least `{{minimum}}`, but got `{{length}}`",MissingDependencyError:"The required propery '{{missingProperty}}' in `{{pointer}}` is missing",MissingOneOfPropertyError:"Value at `{{pointer}}` property: `{{property}}`",MultipleOfError:"Expected `{{value}}` in `{{pointer}}` to be multiple of `{{multipleOf}}`",MultipleOneOfError:"Value `{{value}}` should not match multiple schemas in oneOf `{{matches}}`",NoAdditionalPropertiesError:"Additional property `{{property}}` in `{{pointer}}` is not allowed",NotError:"Value `{{value}}` at pointer should not match schema `{{not}}`",OneOfError:"Value `{{value}}` in `{{pointer}}` does not match any given oneof schema",OneOfPropertyError:"Failed finding a matching oneOfProperty schema in `{{pointer}}` where `{{property}}` matches `{{value}}`",PatternError:"Value in `{{pointer}}` should match `{{description}}`, but received `{{received}}`",PatternPropertiesError:"Property `{{key}}` does not match any patterns in `{{pointer}}`. Valid patterns are: {{patterns}}",RequiredPropertyError:"The required property `{{key}}` is missing at `{{pointer}}`",SchemaWarning:`Failed retrieving a schema from '{{pointer}}' to key '{{key}}'`,TypeError:"Expected `{{value}}` ({{received}}) in `{{pointer}}` to be of type `{{expected}}`",UndefinedValueError:"Value must not be undefined in `{{pointer}}`",UniqueItemsError:"Items in array must be unique. Value `{{value}}` in `{{pointer}}` is a duplicate of {{duplicatePointer}}.",UnknownPropertyError:"Could not find a valid schema for property `{{pointer}}` within object",ValueNotEmptyError:"A value for `{{property}}` is required at `{{pointer}}`"},be=Object.prototype.toString;function T(e){let t=be.call(e).match(/\s([^\]]+)\]/).pop().toLowerCase();return t===`file`?`object`:t}var xe=`object`,Se=`array`;function Ce(e,t={}){return e.replace(/\{\{\w+\}\}/g,e=>{let n=t[e.replace(/[{}]/g,``)],r=T(n);return r===xe||r===Se?JSON.stringify(n):n})}function we(e,t,n=e){return Ce(ye[e]??n,t)}function E(e){return e.replace(/([a-z])([A-Z])/g,`$1-$2`).toLowerCase()}function D(e,t){return{type:`error`,name:e,code:E(e),message:we(e,t),data:t}}function O(e){return D.bind(null,e)}function k(e,t=[]){for(let n=0;n<e.length;n+=1){let r=e[n];Array.isArray(r)?k(r,t):t.push(r)}return t}var A={DECLARATOR_ONEOF:`oneOfProperty`,GET_TEMPLATE_RECURSION_LIMIT:1,propertyBlacklist:[`_id`],templateDefaultOptions:{addOptionalProps:!1,removeInvalidData:!1,extendDefaults:!0}};function Te(e,t,n){let r={...t};return Object.defineProperty(r,"getOneOfOrigin",{enumerable:!1,value:()=>({index:n,schema:e})}),r}function j(e){return e?.type===`error`}function M(e){return e instanceof Promise}function Ee(e){return j(e)||M(e)}var{DECLARATOR_ONEOF:N}=A;function De(e,t,n=e.rootSchema,r=`#`){if(t!=null&&n[N]){let i=[],a=n[N],o=t[n[N]];if(o===void 0)return e.errors.missingOneOfPropertyError({property:a,pointer:r,schema:n,value:t});for(let s=0;s<n.oneOf.length;s+=1){let c=e.resolveRef(n.oneOf[s]),l=e.step(a,c,t,r);if(j(l))return l;let u=k(e.validate(o,l,r));if(u=u.filter(Ee),u.length>0)i.push(...u);else return Te(n,c,s)}return e.errors.oneOfPropertyError({property:a,value:o,pointer:r,schema:n,errors:i})}let i=[],a=[];for(let o=0;o<n.oneOf.length;o+=1){let s=e.resolveRef(n.oneOf[o]),c=k(e.validate(t,s,r));c=c.filter(Ee),c.length>0?a.push(...c):i.push({index:o,schema:s})}return i.length===1?Te(n,i[0].schema,i[0].index):i.length>1?e.errors.multipleOneOfError({value:t,pointer:r,schema:n,matches:i}):e.errors.oneOfError({value:JSON.stringify(t),pointer:r,schema:n,oneOf:n.oneOf,errors:a})}function Oe(e,t,n,r){if(n==null||t.properties==null)return-1;let i=0,a=Object.keys(t.properties);for(let o=0;o<a.length;o+=1){let s=a[o];n[s]!=null&&e.isValid(n[s],t.properties[s],r)&&(i+=1)}return i}function ke(e,t,n=e.rootSchema,r=`#`){if(t!=null&&n[N]){let i=[],a=n[N],o=t[n[N]];if(o===void 0)return e.errors.missingOneOfPropertyError({property:a,pointer:r,schema:n,value:t});for(let s=0;s<n.oneOf.length;s+=1){let c=e.resolveRef(n.oneOf[s]),l=e.step(a,c,t,r);if(j(l))return l;let u=k(e.validate(o,l,r));if(u=u.filter(Ee),u.length>0)i.push(...u);else return Te(n,c,s)}return e.errors.oneOfPropertyError({property:a,value:o,pointer:r,schema:n,errors:i})}let i=[];for(let a=0;a<n.oneOf.length;a+=1){let o=e.resolveRef(n.oneOf[a]);e.isValid(t,o,r)&&i.push({schema:o,index:a})}if(i.length===1)return Te(n,i[0].schema,i[0].index);if(T(t)===`object`){let i,a=-1,o=0;for(let r=0;r<n.oneOf.length;r+=1){let s=Oe(e,e.resolveRef(n.oneOf[r]),t);o<s&&(o=s,i=n.oneOf[r],a=r)}return i===void 0?e.errors.oneOfError({value:JSON.stringify(t),pointer:r,schema:n,oneOf:n.oneOf}):Te(n,i,a)}return i.length>1?e.errors.multipleOneOfError({matches:i,pointer:r,schema:n,value:t}):e.errors.oneOfError({value:JSON.stringify(t),pointer:r,schema:n,oneOf:n.oneOf})}var Ae=(e,t,n,r)=>{if(Array.isArray(t.oneOf)){let i=e.resolveOneOf(n,t,r);if(j(i))return i}},je=c(n(((e,t)=>{var n=function(e){return r(e)&&!i(e)};function r(e){return!!e&&typeof e==`object`}function i(e){var t=Object.prototype.toString.call(e);return t===`[object RegExp]`||t===`[object Date]`||o(e)}var a=typeof Symbol==`function`&&Symbol.for?Symbol.for(`react.element`):60103;function o(e){return e.$$typeof===a}function s(e){return Array.isArray(e)?[]:{}}function c(e,t){return t.clone!==!1&&t.isMergeableObject(e)?g(s(e),e,t):e}function l(e,t,n){return e.concat(t).map(function(e){return c(e,n)})}function u(e,t){if(!t.customMerge)return g;var n=t.customMerge(e);return typeof n==`function`?n:g}function d(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}function f(e){return Object.keys(e).concat(d(e))}function p(e,t){try{return t in e}catch{return!1}}function m(e,t){return p(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))}function h(e,t,n){var r={};return n.isMergeableObject(e)&&f(e).forEach(function(t){r[t]=c(e[t],n)}),f(t).forEach(function(i){m(e,i)||(r[i]=p(e,i)&&n.isMergeableObject(t[i])?u(i,n)(e[i],t[i],n):c(t[i],n))}),r}function g(e,t,r){r||={},r.arrayMerge=r.arrayMerge||l,r.isMergeableObject=r.isMergeableObject||n,r.cloneUnlessOtherwiseSpecified=c;var i=Array.isArray(t);return i===Array.isArray(e)?i?r.arrayMerge(e,t,r):h(e,t,r):c(t,r)}g.all=function(e,t){if(!Array.isArray(e))throw Error(`first argument should be an array`);return e.reduce(function(e,n){return g(e,n,t)},{})},t.exports=g}))()),Me=(e,t)=>t,Ne=(e,t)=>(0,je.default)(e,t,{arrayMerge:Me}),P=(e,t)=>{let n=e.concat(t);return n.filter((e,t)=>n.indexOf(e)===t)},Pe=(e,t)=>(0,je.default)(e,t,{arrayMerge:P});function F(e,t){if(T(e)!==T(t))return e;let n=Pe(e,t);return e.getOneOfOrigin?Object.defineProperty(n,"getOneOfOrigin",{enumerable:!1,value:e.getOneOfOrigin}):t.getOneOfOrigin&&Object.defineProperty(n,"getOneOfOrigin",{enumerable:!1,value:t.getOneOfOrigin}),n}function Fe(e,...t){let n={};return Object.keys(e).forEach(r=>{t.includes(r)||(n[r]=e[r])}),e.getOneOfOrigin&&Object.defineProperty(n,"getOneOfOrigin",{enumerable:!1,value:e.getOneOfOrigin}),n}var Ie=function(e,t){return Ie=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},Ie(e,t)};function Le(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Class extends value `+String(t)+` is not a constructor or null`);Ie(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Re=Object.create,ze=Function.prototype.toString,Be=Object.prototype.toString,Ve=Object.setPrototypeOf,He=function(e){Le(t,e);function t(n){var r=e.call(this,`Maximum copy depth of `+String(n)+` exceeded; the value copied is nested too deeply.`)||this;return Ve&&Ve(r,t.prototype),r.maxDepth=n,r.name=`MaxDepthExceededError`,r}return t}(RangeError),Ue=function(){function e(){this._keys=[],this._values=[]}return e.prototype.has=function(e){return!!~this._keys.indexOf(e)},e.prototype.get=function(e){return this._values[this._keys.indexOf(e)]},e.prototype.set=function(e,t){this._keys.push(e),this._values.push(t)},e}();function We(){return new Ue}function Ge(){return new WeakMap}var Ke=typeof WeakMap<`u`?Ge:We;function qe(e){if(!e)return Re(null);var t=e.constructor;if(t===Object)return e===Object.prototype?{}:Re(e);if(t&&~ze.call(t).indexOf(`[native code]`))try{return new t}catch{}return Re(e)}function Je(e){var t=``;return e.global&&(t+=`g`),e.ignoreCase&&(t+=`i`),e.multiline&&(t+=`m`),e.unicode&&(t+=`u`),e.sticky&&(t+=`y`),t}function Ye(e){return e.flags}var Xe=/test/g.flags===`g`?Ye:Je;function Ze(e){var t=Be.call(e);return t.substring(8,t.length-1)}function Qe(e){return e[Symbol.toStringTag]||Ze(e)}var $e=typeof Symbol<`u`?Qe:Ze,et=Object.defineProperty,tt=Object.getOwnPropertyDescriptor,nt=Object.getOwnPropertyNames,rt=Object.getOwnPropertySymbols,it=Object.prototype,at=it.hasOwnProperty,ot=it.propertyIsEnumerable,st=typeof rt==`function`;function ct(e){return nt(e).concat(rt(e))}var lt=st?ct:nt;function ut(e,t,n){for(var r=lt(e),i=0,a=r.length,o=void 0,s=void 0;i<a;++i)if(o=r[i],o!==`callee`&&o!==`caller`){if(s=tt(e,o),!s){t[o]=n.copier(e[o],n);continue}!s.get&&!s.set&&(s.value=n.copier(s.value,n));try{et(t,o,s)}catch{t[o]=s.value}}return t}function dt(e,t){var n=new t.Constructor;t.cache.set(e,n);for(var r=0,i=e.length;r<i;++r)n[r]=t.copier(e[r],t);return n}function ft(e,t){var n=new t.Constructor;return t.cache.set(e,n),ut(e,n,t)}function pt(e,t){return e.slice(0)}function mt(e,t){return e.slice(0,e.size,e.type)}function ht(e,t){return new t.Constructor(pt(e.buffer))}function gt(e,t){return new t.Constructor(e.getTime())}function _t(e,t){var n=new t.Constructor;return t.cache.set(e,n),e.forEach(function(e,r){n.set(r,t.copier(e,t))}),n}function vt(e,t){return ut(e,_t(e,t),t)}function yt(e,t){var n=qe(t.prototype);for(var r in t.cache.set(e,n),e)at.call(e,r)&&(n[r]=t.copier(e[r],t));return n}function bt(e,t){var n=qe(t.prototype);for(var r in t.cache.set(e,n),e)at.call(e,r)&&(n[r]=t.copier(e[r],t));for(var i=rt(e),a=0,o=i.length,s=void 0;a<o;++a)s=i[a],ot.call(e,s)&&(n[s]=t.copier(e[s],t));return n}var xt=st?bt:yt;function St(e,t){var n=qe(t.prototype);return t.cache.set(e,n),ut(e,n,t)}function Ct(e,t){return new t.Constructor(e.valueOf())}function wt(e,t){var n=new t.Constructor(e.source,Xe(e));return n.lastIndex=e.lastIndex,n}function Tt(e,t){return e}function Et(e,t){var n=new t.Constructor;return t.cache.set(e,n),e.forEach(function(e){n.add(t.copier(e,t))}),n}function Dt(e,t){return ut(e,Et(e,t),t)}var Ot=Array.isArray,kt=Object.assign,At=Object.getPrototypeOf||(function(e){return e.__proto__}),jt={array:dt,arrayBuffer:pt,blob:mt,dataView:ht,date:gt,error:Tt,map:_t,object:xt,regExp:wt,set:Et,maxDepth:1e3},Mt=kt({},jt,{array:ft,map:vt,object:St,set:Dt});function Nt(e){return{Arguments:e.object,Array:e.array,ArrayBuffer:e.arrayBuffer,Blob:e.blob,Boolean:Ct,DataView:e.dataView,Date:e.date,Error:e.error,Float32Array:e.arrayBuffer,Float64Array:e.arrayBuffer,Int8Array:e.arrayBuffer,Int16Array:e.arrayBuffer,Int32Array:e.arrayBuffer,Map:e.map,Number:Ct,Object:e.object,Promise:Tt,RegExp:e.regExp,Set:e.set,String:Ct,WeakMap:Tt,WeakSet:Tt,Uint8Array:e.arrayBuffer,Uint8ClampedArray:e.arrayBuffer,Uint16Array:e.arrayBuffer,Uint32Array:e.arrayBuffer,Uint64Array:e.arrayBuffer}}function Pt(e){var t=kt({},jt,e),n=Nt(t);if(!n.Object||!n.Array)throw Error(`An object and array copier must be provided.`);var r=n.Array,i=n.Object,a=t.maxDepth;function o(e,t){if(t.prototype=t.Constructor=void 0,!e||typeof e!=`object`)return e;if(t.cache.has(e))return t.cache.get(e);if(++t.depth>a)throw new He(a);t.prototype=At(e),t.Constructor=t.prototype&&t.prototype.constructor;var o;if(!t.Constructor||t.Constructor===Object)o=i(e,t);else if(Ot(e))o=r(e,t);else{var s=n[$e(e)];o=s?s(e,t):typeof e.then==`function`?e:i(e,t)}return--t.depth,o}return function(e){return o(e,{Constructor:void 0,cache:Ke(),copier:o,depth:0,prototype:void 0})}}function Ft(e){return Pt(kt({},Mt,e))}Ft({});var It=Pt({});function Lt(e,t,n){if(t.if!=null){if(t.if===!1)return t.else;if(t.if&&(t.then||t.else)){let r=e.validate(n,e.resolveRef(t.if));if(r.length===0&&t.then)return e.resolveRef(t.then);if(r.length!==0&&t.else)return e.resolveRef(t.else)}}}var Rt=(e,t,n,r)=>{let i=Lt(e,t,n);if(i)return e.validate(n,i,r)};function zt(e,t,n){let r={...e.resolveRef(t)??{}};return Lt(e,r,n)||Fe(r,`if`,`then`,`else`)}function Bt(e,t,n=e.rootSchema){let r=It(n);for(let i=0;i<n.allOf.length;i+=1){let a=zt(e,n.allOf[i],t);r=F(r,a)}return delete r.allOf,r}function Vt(e,t){let{allOf:n}=t;if(!Array.isArray(n)||n.length===0)return;let r={};return n.forEach(t=>{r=F(r,e.resolveRef(t))}),r}var Ht=(e,t,n,r)=>{let{allOf:i}=t;if(!Array.isArray(i)||i.length===0)return;let a=[];return t.allOf.forEach(t=>{a.push(...e.validate(n,t,r))}),a};function Ut(e,t){return e==null||e.$ref==null?e:e.getRoot?e.getRoot().getRef(e):t.getRef(e)}function Wt(e){return e.filter((t,n)=>e.indexOf(t)===n)}function Gt(e){return T(e)===`object`}function Kt(e,t,n){let{dependencies:r}=t;if(!Gt(r)||!Gt(n))return;let i=!1,a={required:[]};if(Object.keys(r).forEach(o=>{if(n[o]==null&&!(t.required?.includes(o)||a.required?.includes(o)))return;let s=r[o];if(Array.isArray(s)){i=!0,a.required.push(...s);return}if(Gt(s)){i=!0,a=F(a,e.resolveRef(s));return}}),i)return a.required=Wt(a.required),a}var qt=(e,t,n,r)=>{if(T(t.dependencies)!==`object`)return;let i=[];return Object.keys(n).forEach(a=>{if(t.dependencies[a]===void 0||t.dependencies[a]===!0)return;if(t.dependencies[a]===!1){i.push(e.errors.missingDependencyError({pointer:r,schema:t,value:n}));return}let o,s=T(t.dependencies[a]);if(s===`array`)o=t.dependencies[a].filter(e=>n[e]===void 0).map(i=>e.errors.missingDependencyError({missingProperty:i,pointer:r,schema:t,value:n}));else if(s===`object`)o=e.validate(n,t.dependencies[a],r);else throw Error(`Invalid dependency definition for ${r}/${a}. Must be string[] or schema`);i.push(...o)}),i.length>0?i:void 0};function Jt(e,t,n){if(!Array.isArray(t.anyOf)||t.anyOf.length===0)return;let r;return t.anyOf.forEach(t=>{t=e.resolveRef(t),e.isValid(n,t)&&(r=r?F(r,t):t)}),r}function Yt(e,t,n=e.rootSchema,r=`#`){let{anyOf:i}=n;if(!Array.isArray(i)||i.length===0)return n;let a=Jt(e,n,t);return a==null?e.errors.anyOfError({pointer:r,schema:n,value:t,anyOf:JSON.stringify(i)}):Fe(F(n,a),`anyOf`)}var Xt=(e,t,n,r)=>{if(Array.isArray(t.anyOf)&&t.anyOf.length!==0){for(let r=0;r<t.anyOf.length;r+=1)if(e.isValid(n,t.anyOf[r]))return;return e.errors.anyOfError({pointer:r,schema:t,value:n,anyOf:t.anyOf})}},Zt=[`allOf`,`anyOf`,`oneOf`,`dependencies`,`if`,`then`,`else`],Qt=[`allOf`,`anyOf`,`oneOf`,`dependencies`,`if`];function $t(e){let t=Object.keys(e);return Qt.findIndex(e=>t.includes(e))!==-1}function en(e,t,n,r){let i,a;if(t=e.resolveRef(t),t.oneOf){let o=ke(e,n,t,r);j(o)?a=o:o&&(i=F(i??{},o))}if(Array.isArray(t.allOf)){let a=t.allOf.map(t=>{if($t(t)){let i=en(e,t,n,r);return i?(i=F(t,i),Fe(i,...Zt)):void 0}return t});if(a.length>0){let t=Vt(e,{allOf:a});i=F(i??{},t)}}let o=Jt(e,t,n);o&&(i=F(i??{},o));let s=Kt(e,t,n);s&&(i=F(i??{},s));let c=Lt(e,t,n);if(c&&(i=F(i??{},c)),i==null)return a;let l=en(e,i,n,r);return l&&(i=F(i,l)),Fe(i,...Zt)}var tn=[`allOf`,`anyOf`,`oneOf`,`dependencies`,`if`,`then`,`else`];function nn(e,t,n,r){let i=en(e,t,n,r);return i?(i=F(t,i),Fe(i,...tn)):t}var rn=class{constructor(e,t){this.remotes={},this.errors={},this.typeKeywords={},this.validateKeyword={},this.validateType={},this.validateFormat={},this.config=e,this.typeKeywords=It(e.typeKeywords),this.validateKeyword=Object.assign({},e.validateKeyword),this.validateType=Object.assign({},e.validateType),this.validateFormat=Object.assign({},e.validateFormat),this.errors=Object.assign({},e.errors),this.setSchema(t)}get rootSchema(){return this.__rootSchema}set rootSchema(e){e!=null&&(this.__rootSchema=this.config.compileSchema(this,e))}addRemoteSchema(e,t){this.config.addRemoteSchema(this,e,t)}compileSchema(e){return this.config.compileSchema(this,e,this.rootSchema??e)}createSchemaOf(e){return this.config.createSchemaOf(e)}each(e,t,n,r){return this.config.each(this,e,t,n,r)}eachSchema(e,t=this.rootSchema){return this.config.eachSchema(t,e)}getChildSchemaSelection(e,t){return this.config.getChildSchemaSelection(this,e,t)}getSchema(e){return this.config.getSchema(this,e)}getTemplate(e,t,n=this.config.templateDefaultOptions){return this.config.getTemplate(this,e,t,n)}isValid(e,t,n){return this.config.isValid(this,e,t,n)}resolveAnyOf(e,t,n){return this.config.resolveAnyOf(this,e,t,n)}resolveAllOf(e,t){return this.config.resolveAllOf(this,e,t)}resolveRef(e){return this.config.resolveRef(e,this.rootSchema)}resolveOneOf(e,t,n){return this.config.resolveOneOf(this,e,t,n)}setSchema(e){this.rootSchema=e}step(e,t,n,r){return this.config.step(this,e,t,n,r)}validate(e,t,n){return this.config.validate(this,e,t,n)}};function an(e,t,n){n.id=n.id||t,e.remotes[t]=e.compileSchema(n)}var on=n(((e,t)=>{(function(n,r){typeof e==`object`&&typeof t==`object`?t.exports=r():typeof define==`function`&&define.amd?define(`jsonPointer`,[],r):typeof e==`object`?e.jsonPointer=r():n.jsonPointer=r()})(typeof self<`u`?self:e,(()=>(()=>{var e={d:(t,n)=>{for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{typeof Symbol<`u`&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:`Module`}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};function n(e){return e===`#`||e===``||Array.isArray(e)&&e.length===0||!1}e.r(t),e.d(t,{default:()=>C,get:()=>u,isRoot:()=>n,join:()=>te,remove:()=>y,removeUndefinedItems:()=>v,set:()=>h,split:()=>l,splitLast:()=>ne});let r=/~1/g,i=/~0/g,a=/\/+/g,o=/(^[#/]*|\/+$)/g;function s(e){return e.replace(r,`/`).replace(i,`~`)}function c(e){return s(decodeURIComponent(e))}function l(e){if(e==null||typeof e!=`string`||n(e))return Array.isArray(e)?e:[];let t=e.indexOf(`#`)>=0?c:s,r=(e=(e=e.replace(a,`/`)).replace(o,``)).split(`/`);for(let e=0,n=r.length;e<n;e+=1)r[e]=t(r[e]);return r}function u(e,t,r=void 0){if(t==null||e==null)return r;if(n(t))return e;let i=d(e,l(t));return i===void 0?r:i}function d(e,t){let n=t.shift();if(e!==void 0)return n===void 0?e:d(e[n],t)}let f=/^\[.*\]$/,p=/^\[(.+)\]$/;function m(e,t){return e===`__proto__`||e==`constructor`&&t.length>0&&t[0]==`prototype`}function h(e,t,n){if(t==null)return e;let r=l(t);if(r.length===0)return e;e??=f.test(r[0])?[]:{};let i,a,o=e;for(;r.length>1;)i=r.shift(),a=f.test(r[0]),m(i,r)||(o=_(o,i,a));return i=r.pop(),g(o,i,n),e}function g(e,t,n){let r,i=t.match(p);t===`[]`&&Array.isArray(e)?e.push(n):i?(r=i.pop(),e[r]=n):e[t]=n}function _(e,t,n){if(e[t]!=null)return e[t];let r=n?[]:{};return g(e,t,r),r}function v(e){let t=0,n=0;for(;t+n<e.length;)e[t+n]===void 0&&(n+=1),e[t]=e[t+n],t+=1;return e.length-=n,e}function y(e,t,n){let r=l(t),i=r.pop(),a=u(e,r);return a&&delete a[i],Array.isArray(a)&&!0!==n&&v(a),e}let b=/\/+/g,x=/~/g,S=/\//g;function ee(e,t){if(e.length===0)return t?`#`:``;for(let n=0,r=e.length;n<r;n+=1)e[n]=e[n].replace(x,`~0`).replace(S,`~1`),t&&(e[n]=encodeURIComponent(e[n]));return((t?`#/`:`/`)+e.join(`/`)).replace(b,`/`)}function te(e,...t){let n=[];if(Array.isArray(e))return ee(e,!0===arguments[1]);let r=arguments[arguments.length-1],i=typeof r==`boolean`?r:e&&e[0]===`#`;for(let e=0,t=arguments.length;e<t;e+=1)n.push.apply(n,l(arguments[e]));let a=[];for(let e=0,t=n.length;e<t;e+=1)if(n[e]===`..`){if(a.length===0)return i?`#`:``;a.pop()}else a.push(n[e]);return ee(a,i)}function ne(e){let t=l(e);if(t.length===0)return typeof e==`string`&&e[0]===`#`?[`#`,t[0]]:[``,void 0];if(t.length===1)return e[0]===`#`?[`#`,t[0]]:[``,t[0]];let n=t.pop();return[te(t,e[0]===`#`),n]}let C={get:u,set:h,remove:y,join:te,split:l,splitLast:ne,isRoot:n,removeUndefinedItems:v};return t})()))})),sn=n((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.TokenError=void 0,e.TokenError=class extends Error{constructor(e,t){if(super(e),this.message=e,this.token=t,t&&t.errors)t.errors.push(this);else throw this}inspect(){return`SyntaxError: `+this.message}}})),cn=n((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Parser=e.findRuleByName=e.parseRuleName=e.escapeRegExp=e.readToken=void 0;var t=/^[A-Z0-9_]+$/,n=/(\?|\+|\*)$/,r=/^(@|&|!)/,i=`WS`,a=sn();function o(e,t){let n=t.exec(e);return n&&n.index==0?n[0].length==0&&t.source.length>0?null:{type:null,text:n[0],rest:e.substr(n[0].length),start:0,end:n[0].length-1,fullText:n[0],errors:[],children:[],parent:null}:null}e.readToken=o;function s(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,`\\$&`)}e.escapeRegExp=s;function c(e){e.rest=``,e.children&&e.children.forEach(e=>c(e))}function l(e,t){e.start+=t,e.end+=t,e.children&&e.children.forEach(t=>l(t,e.start))}function u(e,t){t.errors&&t.errors.length&&t.errors.forEach(t=>e.push(t)),t.children&&t.children.forEach(t=>u(e,t))}function d(e){let t=n.exec(e),i=r.exec(e),a=t&&t[0]||``,o=i&&i[0]||``,s={raw:e,name:e.replace(n,``).replace(r,``),isOptional:a==`?`||a==`*`,allowRepetition:a==`+`||a==`*`,atLeastOne:a==`+`,lookupPositive:o==`&`,lookupNegative:o==`!`,pinned:o==`@`,lookup:!1,isLiteral:!1};return s.isLiteral=s.name[0]==`'`||s.name[0]==`"`,s.lookup=s.lookupNegative||s.lookupPositive,s}e.parseRuleName=d;function f(e,t){let n=d(e);return t.cachedRules[n.name]||null}e.findRuleByName=f;function p(e,t){if(e.children){let n=e.children.filter(e=>e.type&&t.test(e.type));for(let t=0;t<n.length;t++){let r=e.children.indexOf(n[t]);r!=-1&&e.children.splice(r,1)}e.children.forEach(e=>p(e,t))}}var m=[`EOF`],h=class{constructor(e,t){this.grammarRules=e,this.options=t,this.cachedRules={},this.debug=t?t.debug===!0:!1;let n=[],r=[];if(e.forEach(e=>{let t=d(e.name);if(t.name in this.cachedRules){n.push(`Duplicated rule `+t.name);return}if(this.cachedRules[t.name]=e,!e.bnf||!e.bnf.length){let t=`Missing rule content, rule: `+e.name;n.indexOf(t)==-1&&n.push(t)}else e.bnf.forEach(t=>{if(typeof t[0]==`string`&&d(t[0]).name==e.name){let t=`Left recursion is not allowed, rule: `+e.name;n.indexOf(t)==-1&&n.push(t)}t.forEach(e=>{if(typeof e==`string`){let t=d(e);!t.isLiteral&&r.indexOf(t.name)==-1&&m.indexOf(t.name)==-1&&r.push(t.name)}})});i==e.name&&(e.implicitWs=!1),e.implicitWs&&r.indexOf(i)==-1&&r.push(i),e.recover&&r.indexOf(e.recover)==-1&&r.push(e.recover)}),r.forEach(e=>{e in this.cachedRules||n.push(`Missing rule `+e)}),n.length)throw Error(n.join(`
1
+ import{a as e,c as t,d as n,f as r,i,l as a,n as o,o as s,p as c,r as l,s as u,t as d,u as f}from"./index-CFWL4GpM.js";var p=c(n(((e,t)=>{(function(e,n){typeof define==`function`&&define.amd?define(n):typeof t==`object`&&t.exports?t.exports=n():e.log=n()})(e,function(){var e=function(){},t=`undefined`,n=typeof window!==t&&typeof window.navigator!==t&&/Trident\/|MSIE /.test(window.navigator.userAgent),r=[`trace`,`debug`,`info`,`warn`,`error`],i={},a=null;function o(e,t){var n=e[t];if(typeof n.bind==`function`)return n.bind(e);try{return Function.prototype.bind.call(n,e)}catch{return function(){return Function.prototype.apply.apply(n,[e,arguments])}}}function s(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function c(r){return r===`debug`&&(r=`log`),typeof console===t?!1:r===`trace`&&n?s:console[r]===void 0?console.log===void 0?e:o(console,`log`):o(console,r)}function l(){for(var n=this.getLevel(),i=0;i<r.length;i++){var a=r[i];this[a]=i<n?e:this.methodFactory(a,n,this.name)}if(this.log=this.debug,typeof console===t&&n<this.levels.SILENT)return`No console available for logging`}function u(e){return function(){typeof console!==t&&(l.call(this),this[e].apply(this,arguments))}}function d(e,t,n){return c(e)||u.apply(this,arguments)}function f(e,n){var o=this,s,c,u,f=`loglevel`;typeof e==`string`?f+=`:`+e:typeof e==`symbol`&&(f=void 0);function p(e){var n=(r[e]||`silent`).toUpperCase();if(typeof window!==t&&f){try{window.localStorage[f]=n;return}catch{}try{window.document.cookie=encodeURIComponent(f)+`=`+n+`;`}catch{}}}function m(){var e;if(typeof window!==t&&f){try{e=window.localStorage[f]}catch{}if(typeof e===t)try{var n=window.document.cookie,r=encodeURIComponent(f),i=n.indexOf(r+`=`);i!==-1&&(e=/^([^;]+)/.exec(n.slice(i+r.length+1))[1])}catch{}return o.levels[e]===void 0&&(e=void 0),e}}function h(){if(typeof window!==t&&f){try{window.localStorage.removeItem(f)}catch{}try{window.document.cookie=encodeURIComponent(f)+`=; expires=Thu, 01 Jan 1970 00:00:00 UTC`}catch{}}}function g(e){var t=e;if(typeof t==`string`&&o.levels[t.toUpperCase()]!==void 0&&(t=o.levels[t.toUpperCase()]),typeof t==`number`&&t>=0&&t<=o.levels.SILENT)return t;throw TypeError(`log.setLevel() called with invalid level: `+e)}o.name=e,o.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},o.methodFactory=n||d,o.getLevel=function(){return u??c??s},o.setLevel=function(e,t){return u=g(e),t!==!1&&p(u),l.call(o)},o.setDefaultLevel=function(e){c=g(e),m()||o.setLevel(e,!1)},o.resetLevel=function(){u=null,h(),l.call(o)},o.enableAll=function(e){o.setLevel(o.levels.TRACE,e)},o.disableAll=function(e){o.setLevel(o.levels.SILENT,e)},o.rebuild=function(){if(a!==o&&(s=g(a.getLevel())),l.call(o),a===o)for(var e in i)i[e].rebuild()},s=g(a?a.getLevel():`WARN`);var _=m();_!=null&&(u=g(_)),l.call(o)}a=new f,a.getLogger=function(e){if(typeof e!=`symbol`&&typeof e!=`string`||e===``)throw TypeError(`You must supply a name when creating a logger.`);var t=i[e];return t||=i[e]=new f(e,a.methodFactory),t};var p=typeof window===t?void 0:window.log;return a.noConflict=function(){return typeof window!==t&&window.log===a&&(window.log=p),a},a.getLoggers=function(){return i},a.default=a,a})}))(),1);p.default.setLevel(`silent`);var m=p.default,h={STRING:`String`,NUMBER:`Number`,TRUE:`True`,FALSE:`False`,NULL:`Null`,OBJECT:`Object`,ARRAY:`Array`,PROPERTY:`Property`,PROPERTY_NAME:`PropertyName`,PROPERTY_COLON:`PropertyColon`,ITEM:`Item`,JSON_TEXT:`JsonText`,INVALID:`⚠`},g={Pair:h.PROPERTY,Key:h.PROPERTY_NAME,BlockSequence:h.ARRAY,BlockMapping:h.OBJECT,FlowSequence:h.ARRAY,FlowMapping:h.OBJECT,QuotedLiteral:h.STRING,Literal:h.STRING,Stream:h.JSON_TEXT,Document:h.OBJECT},_={File:h.JSON_TEXT},v=[h.STRING,h.NUMBER,h.TRUE,h.FALSE,h.NULL],y=[h.OBJECT,h.ARRAY,h.ITEM],b={JSON5:`json5`,JSON:`json4`,YAML:`yaml`},x=(e,t)=>{switch(t){case b.YAML:return g[e]??e;case b.JSON5:return _[e]??e;default:return e}};function S(e,t,n){let r=[];for(let i=t;i?.parent;i=i.parent)switch(x(i.parent.name,n)){case h.PROPERTY:{let t=de(i.parent,h.PROPERTY_NAME,n);if(t){let n=ie(e,t).replace(/[/~]/g,e=>e===`~`?`~0`:`~1`);r.unshift(n)}break}case h.ARRAY:if(se(i,n)){let e=me(i.parent,i,n);r.unshift(`${e}`)}}return r.length===0?``:`/`+r.join(`/`)}var ee=(e,t,n=-1,r)=>S(e.doc,s(e).resolve(t,n),r),te=(e,t)=>{let n=s(e),r=new Map;return n.iterate({enter:n=>{if([h.PROPERTY_NAME,h.OBJECT].includes(x(n.name,t))){let i=S(e.doc,n.node,t),{from:a,to:o}=n.node;if(!n.node?.nextSibling?.node)return r.set(i,{keyFrom:a,keyTo:o}),!0;let s=t===b.JSON?n.node?.nextSibling?.node:n.node?.nextSibling?.node?.nextSibling?.node;if(!s)return r.set(i,{keyFrom:a,keyTo:o}),!0;let{from:c,to:l}=s;return r.set(i,{keyFrom:a,keyTo:o,valueFrom:c,valueTo:l}),!0}}}),r},ne=(e,t,n=-1)=>s(e).resolveInner(t,n),C=e=>e.replace(/^"(.*)"$/,`$1`).replace(/^'(.*)'$/,`$1`),re=e=>e.replace(/^"(.*)"$/,`'$1'`),ie=(e,t,n=!0,r=!0)=>{let i=t?e.sliceString(t.from,t.to):``;return n?r?C(i):i.replace(/(^["'])|(["']$)/g,``):i},ae=(e,t)=>x(e.name,t)===h.INVALID&&(x(e.prevSibling?.name??``,t)===h.PROPERTY_NAME||x(e.prevSibling?.name??``,t)===h.PROPERTY_COLON),oe=(e,t)=>v.includes(x(e.name,t))||ae(e,t),se=(e,t)=>[...v,...y].includes(x(e.name,t))||ae(e,t),ce=(e,t)=>x(e.name,t)===h.PROPERTY_NAME||x(e.name,t)===h.INVALID&&(x(e.prevSibling?.name??``,t)===h.PROPERTY||x(e.prevSibling?.name??``,t)===`{`)||t===b.YAML&&x(e.parent?.name??``,t)===h.OBJECT,le=e=>{let t=[],n=e.firstChild;for(;n;)n&&t.push(n),n=n?.nextSibling;return t},ue=(e,t,n)=>le(e).filter(e=>x(e.name,n)===t),de=(e,t,n)=>le(e).find(e=>x(e.name,n)===t)??null,fe=(e,t)=>le(e).find(e=>oe(e,t)),pe=(e,t)=>le(e).filter(e=>v.includes(x(e.name,t))||y.includes(x(e.name,t))),me=(e,t,n)=>pe(e,n).findIndex(e=>e.from===t.from&&e.to===t.to),w=(e,t,n,r=1/0)=>{let i=e;for(;i&&r>0;){if(x(i.name,n)===t)return i;i=i.parent,r--}return null},he=t.define(),ge=a.define({create(){},update(e,t){for(let e of t.effects)if(e.is(he))return e.value;return e}}),_e=e=>e.field(ge),ve=e=>[ge.init(()=>e)],ye={AdditionalItemsError:"Array at `{{pointer}}` may not have an additional item `{{key}}`",AdditionalPropertiesError:"Additional property `{{property}}` on `{{pointer}}` does not match schema `{{schema}}`",AllOfError:"Value `{{value}}` at `{{pointer}}` does not match schema of `{{allOf}}`",AnyOfError:"Value `{{value}}` at `{{pointer}}` does not match any schema of `{{anyOf}}`",ConstError:"Expected value at `{{pointer}}` to be `{{expected}}`, but value given is `{{value}}`",containsAnyError:"The array at `{{pointer}}` must contain at least one item",ContainsArrayError:"The property at `{{pointer}}` must not be an array",ContainsError:"The array at `{{pointer}}` must contain an element that matches `{{schema}}`",EnumError:"Expected given value `{{value}}` in `{{pointer}}` to be one of `{{values}}`",ForbiddenPropertyError:"Property name `{{property}}` at `{{pointer}}` is not allowed",FormatDateError:"Value `{{value}}` at `{{pointer}}` is not a valid date",FormatDateTimeError:"Value `{{value}}` at `{{pointer}}` is not a valid date-time",FormatEmailError:"Value `{{value}}` at `{{pointer}}` is not a valid email",FormatHostnameError:"Value `{{value}}` at `{{pointer}}` is not a valid hostname",FormatIPV4Error:"Value `{{value}}` at `{{pointer}}` is not a valid IPv4 address",FormatIPV4LeadingZeroError:`IPv4 addresses starting with zero are invalid, since they are interpreted as octals`,FormatIPV6Error:"Value `{{value}}` at `{{pointer}}` is not a valid IPv6 address",FormatIPV6LeadingZeroError:`IPv6 addresses starting with zero are invalid, since they are interpreted as octals`,FormatJsonPointerError:"Value `{{value}}` at `{{pointer}}` is not a valid json-pointer",FormatRegExError:"Value `{{value}}` at `{{pointer}}` is not a valid regular expression",FormatTimeError:"Value `{{value}}` at `{{pointer}}` is not a valid time",FormatURIError:"Value `{{value}}` at `{{pointer}}` is not a valid uri",FormatURIReferenceError:"Value `{{value}}` at `{{pointer}}` is not a valid uri-reference",FormatURITemplateError:"Value `{{value}}` at `{{pointer}}` is not a valid uri-template",FormatURLError:"Value `{{value}}` at `{{pointer}}` is not a valid url",InvalidDataError:"No value may be specified in `{{pointer}}`",InvalidPropertyNameError:"Invalid property name `{{property}}` at `{{pointer}}`",MaximumError:"Value in `{{pointer}}` is `{{length}}`, but should be `{{maximum}}` at maximum",MaxItemsError:"Too many items in `{{pointer}}`, should be `{{maximum}}` at most, but got `{{length}}`",MaxLengthError:"Value `{{pointer}}` should have a maximum length of `{{maxLength}}`, but got `{{length}}`.",MaxPropertiesError:"Too many properties in `{{pointer}}`, should be `{{maximum}}` at most, but got `{{length}}`",MinimumError:"Value in `{{pointer}}` is `{{length}}`, but should be `{{minimum}}` at minimum",MinItemsError:"Too few items in `{{pointer}}`, should be at least `{{minItems}}`, but got `{{length}}`",MinItemsOneError:"At least one item is required in `{{pointer}}`",MinLengthError:"Value `{{pointer}}` should have a minimum length of `{{minLength}}`, but got `{{length}}`.",MinLengthOneError:"A value is required in `{{pointer}}`",MinPropertiesError:"Too few properties in `{{pointer}}`, should be at least `{{minimum}}`, but got `{{length}}`",MissingDependencyError:"The required propery '{{missingProperty}}' in `{{pointer}}` is missing",MissingOneOfPropertyError:"Value at `{{pointer}}` property: `{{property}}`",MultipleOfError:"Expected `{{value}}` in `{{pointer}}` to be multiple of `{{multipleOf}}`",MultipleOneOfError:"Value `{{value}}` should not match multiple schemas in oneOf `{{matches}}`",NoAdditionalPropertiesError:"Additional property `{{property}}` in `{{pointer}}` is not allowed",NotError:"Value `{{value}}` at pointer should not match schema `{{not}}`",OneOfError:"Value `{{value}}` in `{{pointer}}` does not match any given oneof schema",OneOfPropertyError:"Failed finding a matching oneOfProperty schema in `{{pointer}}` where `{{property}}` matches `{{value}}`",PatternError:"Value in `{{pointer}}` should match `{{description}}`, but received `{{received}}`",PatternPropertiesError:"Property `{{key}}` does not match any patterns in `{{pointer}}`. Valid patterns are: {{patterns}}",RequiredPropertyError:"The required property `{{key}}` is missing at `{{pointer}}`",SchemaWarning:`Failed retrieving a schema from '{{pointer}}' to key '{{key}}'`,TypeError:"Expected `{{value}}` ({{received}}) in `{{pointer}}` to be of type `{{expected}}`",UndefinedValueError:"Value must not be undefined in `{{pointer}}`",UniqueItemsError:"Items in array must be unique. Value `{{value}}` in `{{pointer}}` is a duplicate of {{duplicatePointer}}.",UnknownPropertyError:"Could not find a valid schema for property `{{pointer}}` within object",ValueNotEmptyError:"A value for `{{property}}` is required at `{{pointer}}`"},be=Object.prototype.toString;function T(e){let t=be.call(e).match(/\s([^\]]+)\]/).pop().toLowerCase();return t===`file`?`object`:t}var xe=`object`,Se=`array`;function Ce(e,t={}){return e.replace(/\{\{\w+\}\}/g,e=>{let n=t[e.replace(/[{}]/g,``)],r=T(n);return r===xe||r===Se?JSON.stringify(n):n})}function we(e,t,n=e){return Ce(ye[e]??n,t)}function E(e){return e.replace(/([a-z])([A-Z])/g,`$1-$2`).toLowerCase()}function D(e,t){return{type:`error`,name:e,code:E(e),message:we(e,t),data:t}}function O(e){return D.bind(null,e)}function k(e,t=[]){for(let n=0;n<e.length;n+=1){let r=e[n];Array.isArray(r)?k(r,t):t.push(r)}return t}var A={DECLARATOR_ONEOF:`oneOfProperty`,GET_TEMPLATE_RECURSION_LIMIT:1,propertyBlacklist:[`_id`],templateDefaultOptions:{addOptionalProps:!1,removeInvalidData:!1,extendDefaults:!0}};function Te(e,t,n){let r={...t};return Object.defineProperty(r,"getOneOfOrigin",{enumerable:!1,value:()=>({index:n,schema:e})}),r}function j(e){return e?.type===`error`}function M(e){return e instanceof Promise}function Ee(e){return j(e)||M(e)}var{DECLARATOR_ONEOF:N}=A;function De(e,t,n=e.rootSchema,r=`#`){if(t!=null&&n[N]){let i=[],a=n[N],o=t[n[N]];if(o===void 0)return e.errors.missingOneOfPropertyError({property:a,pointer:r,schema:n,value:t});for(let s=0;s<n.oneOf.length;s+=1){let c=e.resolveRef(n.oneOf[s]),l=e.step(a,c,t,r);if(j(l))return l;let u=k(e.validate(o,l,r));if(u=u.filter(Ee),u.length>0)i.push(...u);else return Te(n,c,s)}return e.errors.oneOfPropertyError({property:a,value:o,pointer:r,schema:n,errors:i})}let i=[],a=[];for(let o=0;o<n.oneOf.length;o+=1){let s=e.resolveRef(n.oneOf[o]),c=k(e.validate(t,s,r));c=c.filter(Ee),c.length>0?a.push(...c):i.push({index:o,schema:s})}return i.length===1?Te(n,i[0].schema,i[0].index):i.length>1?e.errors.multipleOneOfError({value:t,pointer:r,schema:n,matches:i}):e.errors.oneOfError({value:JSON.stringify(t),pointer:r,schema:n,oneOf:n.oneOf,errors:a})}function Oe(e,t,n,r){if(n==null||t.properties==null)return-1;let i=0,a=Object.keys(t.properties);for(let o=0;o<a.length;o+=1){let s=a[o];n[s]!=null&&e.isValid(n[s],t.properties[s],r)&&(i+=1)}return i}function ke(e,t,n=e.rootSchema,r=`#`){if(t!=null&&n[N]){let i=[],a=n[N],o=t[n[N]];if(o===void 0)return e.errors.missingOneOfPropertyError({property:a,pointer:r,schema:n,value:t});for(let s=0;s<n.oneOf.length;s+=1){let c=e.resolveRef(n.oneOf[s]),l=e.step(a,c,t,r);if(j(l))return l;let u=k(e.validate(o,l,r));if(u=u.filter(Ee),u.length>0)i.push(...u);else return Te(n,c,s)}return e.errors.oneOfPropertyError({property:a,value:o,pointer:r,schema:n,errors:i})}let i=[];for(let a=0;a<n.oneOf.length;a+=1){let o=e.resolveRef(n.oneOf[a]);e.isValid(t,o,r)&&i.push({schema:o,index:a})}if(i.length===1)return Te(n,i[0].schema,i[0].index);if(T(t)===`object`){let i,a=-1,o=0;for(let r=0;r<n.oneOf.length;r+=1){let s=Oe(e,e.resolveRef(n.oneOf[r]),t);o<s&&(o=s,i=n.oneOf[r],a=r)}return i===void 0?e.errors.oneOfError({value:JSON.stringify(t),pointer:r,schema:n,oneOf:n.oneOf}):Te(n,i,a)}return i.length>1?e.errors.multipleOneOfError({matches:i,pointer:r,schema:n,value:t}):e.errors.oneOfError({value:JSON.stringify(t),pointer:r,schema:n,oneOf:n.oneOf})}var Ae=(e,t,n,r)=>{if(Array.isArray(t.oneOf)){let i=e.resolveOneOf(n,t,r);if(j(i))return i}},je=c(n(((e,t)=>{var n=function(e){return r(e)&&!i(e)};function r(e){return!!e&&typeof e==`object`}function i(e){var t=Object.prototype.toString.call(e);return t===`[object RegExp]`||t===`[object Date]`||o(e)}var a=typeof Symbol==`function`&&Symbol.for?Symbol.for(`react.element`):60103;function o(e){return e.$$typeof===a}function s(e){return Array.isArray(e)?[]:{}}function c(e,t){return t.clone!==!1&&t.isMergeableObject(e)?g(s(e),e,t):e}function l(e,t,n){return e.concat(t).map(function(e){return c(e,n)})}function u(e,t){if(!t.customMerge)return g;var n=t.customMerge(e);return typeof n==`function`?n:g}function d(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}function f(e){return Object.keys(e).concat(d(e))}function p(e,t){try{return t in e}catch{return!1}}function m(e,t){return p(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))}function h(e,t,n){var r={};return n.isMergeableObject(e)&&f(e).forEach(function(t){r[t]=c(e[t],n)}),f(t).forEach(function(i){m(e,i)||(r[i]=p(e,i)&&n.isMergeableObject(t[i])?u(i,n)(e[i],t[i],n):c(t[i],n))}),r}function g(e,t,r){r||={},r.arrayMerge=r.arrayMerge||l,r.isMergeableObject=r.isMergeableObject||n,r.cloneUnlessOtherwiseSpecified=c;var i=Array.isArray(t);return i===Array.isArray(e)?i?r.arrayMerge(e,t,r):h(e,t,r):c(t,r)}g.all=function(e,t){if(!Array.isArray(e))throw Error(`first argument should be an array`);return e.reduce(function(e,n){return g(e,n,t)},{})},t.exports=g}))()),Me=(e,t)=>t,Ne=(e,t)=>(0,je.default)(e,t,{arrayMerge:Me}),P=(e,t)=>{let n=e.concat(t);return n.filter((e,t)=>n.indexOf(e)===t)},Pe=(e,t)=>(0,je.default)(e,t,{arrayMerge:P});function F(e,t){if(T(e)!==T(t))return e;let n=Pe(e,t);return e.getOneOfOrigin?Object.defineProperty(n,"getOneOfOrigin",{enumerable:!1,value:e.getOneOfOrigin}):t.getOneOfOrigin&&Object.defineProperty(n,"getOneOfOrigin",{enumerable:!1,value:t.getOneOfOrigin}),n}function Fe(e,...t){let n={};return Object.keys(e).forEach(r=>{t.includes(r)||(n[r]=e[r])}),e.getOneOfOrigin&&Object.defineProperty(n,"getOneOfOrigin",{enumerable:!1,value:e.getOneOfOrigin}),n}var Ie=function(e,t){return Ie=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},Ie(e,t)};function Le(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Class extends value `+String(t)+` is not a constructor or null`);Ie(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Re=Object.create,ze=Function.prototype.toString,Be=Object.prototype.toString,Ve=Object.setPrototypeOf,He=function(e){Le(t,e);function t(n){var r=e.call(this,`Maximum copy depth of `+String(n)+` exceeded; the value copied is nested too deeply.`)||this;return Ve&&Ve(r,t.prototype),r.maxDepth=n,r.name=`MaxDepthExceededError`,r}return t}(RangeError),Ue=function(){function e(){this._keys=[],this._values=[]}return e.prototype.has=function(e){return!!~this._keys.indexOf(e)},e.prototype.get=function(e){return this._values[this._keys.indexOf(e)]},e.prototype.set=function(e,t){this._keys.push(e),this._values.push(t)},e}();function We(){return new Ue}function Ge(){return new WeakMap}var Ke=typeof WeakMap<`u`?Ge:We;function qe(e){if(!e)return Re(null);var t=e.constructor;if(t===Object)return e===Object.prototype?{}:Re(e);if(t&&~ze.call(t).indexOf(`[native code]`))try{return new t}catch{}return Re(e)}function Je(e){var t=``;return e.global&&(t+=`g`),e.ignoreCase&&(t+=`i`),e.multiline&&(t+=`m`),e.unicode&&(t+=`u`),e.sticky&&(t+=`y`),t}function Ye(e){return e.flags}var Xe=/test/g.flags===`g`?Ye:Je;function Ze(e){var t=Be.call(e);return t.substring(8,t.length-1)}function Qe(e){return e[Symbol.toStringTag]||Ze(e)}var $e=typeof Symbol<`u`?Qe:Ze,et=Object.defineProperty,tt=Object.getOwnPropertyDescriptor,nt=Object.getOwnPropertyNames,rt=Object.getOwnPropertySymbols,it=Object.prototype,at=it.hasOwnProperty,ot=it.propertyIsEnumerable,st=typeof rt==`function`;function ct(e){return nt(e).concat(rt(e))}var lt=st?ct:nt;function ut(e,t,n){for(var r=lt(e),i=0,a=r.length,o=void 0,s=void 0;i<a;++i)if(o=r[i],o!==`callee`&&o!==`caller`){if(s=tt(e,o),!s){t[o]=n.copier(e[o],n);continue}!s.get&&!s.set&&(s.value=n.copier(s.value,n));try{et(t,o,s)}catch{t[o]=s.value}}return t}function dt(e,t){var n=new t.Constructor;t.cache.set(e,n);for(var r=0,i=e.length;r<i;++r)n[r]=t.copier(e[r],t);return n}function ft(e,t){var n=new t.Constructor;return t.cache.set(e,n),ut(e,n,t)}function pt(e,t){return e.slice(0)}function mt(e,t){return e.slice(0,e.size,e.type)}function ht(e,t){return new t.Constructor(pt(e.buffer))}function gt(e,t){return new t.Constructor(e.getTime())}function _t(e,t){var n=new t.Constructor;return t.cache.set(e,n),e.forEach(function(e,r){n.set(r,t.copier(e,t))}),n}function vt(e,t){return ut(e,_t(e,t),t)}function yt(e,t){var n=qe(t.prototype);for(var r in t.cache.set(e,n),e)at.call(e,r)&&(n[r]=t.copier(e[r],t));return n}function bt(e,t){var n=qe(t.prototype);for(var r in t.cache.set(e,n),e)at.call(e,r)&&(n[r]=t.copier(e[r],t));for(var i=rt(e),a=0,o=i.length,s=void 0;a<o;++a)s=i[a],ot.call(e,s)&&(n[s]=t.copier(e[s],t));return n}var xt=st?bt:yt;function St(e,t){var n=qe(t.prototype);return t.cache.set(e,n),ut(e,n,t)}function Ct(e,t){return new t.Constructor(e.valueOf())}function wt(e,t){var n=new t.Constructor(e.source,Xe(e));return n.lastIndex=e.lastIndex,n}function Tt(e,t){return e}function Et(e,t){var n=new t.Constructor;return t.cache.set(e,n),e.forEach(function(e){n.add(t.copier(e,t))}),n}function Dt(e,t){return ut(e,Et(e,t),t)}var Ot=Array.isArray,kt=Object.assign,At=Object.getPrototypeOf||(function(e){return e.__proto__}),jt={array:dt,arrayBuffer:pt,blob:mt,dataView:ht,date:gt,error:Tt,map:_t,object:xt,regExp:wt,set:Et,maxDepth:1e3},Mt=kt({},jt,{array:ft,map:vt,object:St,set:Dt});function Nt(e){return{Arguments:e.object,Array:e.array,ArrayBuffer:e.arrayBuffer,Blob:e.blob,Boolean:Ct,DataView:e.dataView,Date:e.date,Error:e.error,Float32Array:e.arrayBuffer,Float64Array:e.arrayBuffer,Int8Array:e.arrayBuffer,Int16Array:e.arrayBuffer,Int32Array:e.arrayBuffer,Map:e.map,Number:Ct,Object:e.object,Promise:Tt,RegExp:e.regExp,Set:e.set,String:Ct,WeakMap:Tt,WeakSet:Tt,Uint8Array:e.arrayBuffer,Uint8ClampedArray:e.arrayBuffer,Uint16Array:e.arrayBuffer,Uint32Array:e.arrayBuffer,Uint64Array:e.arrayBuffer}}function Pt(e){var t=kt({},jt,e),n=Nt(t);if(!n.Object||!n.Array)throw Error(`An object and array copier must be provided.`);var r=n.Array,i=n.Object,a=t.maxDepth;function o(e,t){if(t.prototype=t.Constructor=void 0,!e||typeof e!=`object`)return e;if(t.cache.has(e))return t.cache.get(e);if(++t.depth>a)throw new He(a);t.prototype=At(e),t.Constructor=t.prototype&&t.prototype.constructor;var o;if(!t.Constructor||t.Constructor===Object)o=i(e,t);else if(Ot(e))o=r(e,t);else{var s=n[$e(e)];o=s?s(e,t):typeof e.then==`function`?e:i(e,t)}return--t.depth,o}return function(e){return o(e,{Constructor:void 0,cache:Ke(),copier:o,depth:0,prototype:void 0})}}function Ft(e){return Pt(kt({},Mt,e))}Ft({});var It=Pt({});function Lt(e,t,n){if(t.if!=null){if(t.if===!1)return t.else;if(t.if&&(t.then||t.else)){let r=e.validate(n,e.resolveRef(t.if));if(r.length===0&&t.then)return e.resolveRef(t.then);if(r.length!==0&&t.else)return e.resolveRef(t.else)}}}var Rt=(e,t,n,r)=>{let i=Lt(e,t,n);if(i)return e.validate(n,i,r)};function zt(e,t,n){let r={...e.resolveRef(t)??{}};return Lt(e,r,n)||Fe(r,`if`,`then`,`else`)}function Bt(e,t,n=e.rootSchema){let r=It(n);for(let i=0;i<n.allOf.length;i+=1){let a=zt(e,n.allOf[i],t);r=F(r,a)}return delete r.allOf,r}function Vt(e,t){let{allOf:n}=t;if(!Array.isArray(n)||n.length===0)return;let r={};return n.forEach(t=>{r=F(r,e.resolveRef(t))}),r}var Ht=(e,t,n,r)=>{let{allOf:i}=t;if(!Array.isArray(i)||i.length===0)return;let a=[];return t.allOf.forEach(t=>{a.push(...e.validate(n,t,r))}),a};function Ut(e,t){return e==null||e.$ref==null?e:e.getRoot?e.getRoot().getRef(e):t.getRef(e)}function Wt(e){return e.filter((t,n)=>e.indexOf(t)===n)}function Gt(e){return T(e)===`object`}function Kt(e,t,n){let{dependencies:r}=t;if(!Gt(r)||!Gt(n))return;let i=!1,a={required:[]};if(Object.keys(r).forEach(o=>{if(n[o]==null&&!(t.required?.includes(o)||a.required?.includes(o)))return;let s=r[o];if(Array.isArray(s)){i=!0,a.required.push(...s);return}if(Gt(s)){i=!0,a=F(a,e.resolveRef(s));return}}),i)return a.required=Wt(a.required),a}var qt=(e,t,n,r)=>{if(T(t.dependencies)!==`object`)return;let i=[];return Object.keys(n).forEach(a=>{if(t.dependencies[a]===void 0||t.dependencies[a]===!0)return;if(t.dependencies[a]===!1){i.push(e.errors.missingDependencyError({pointer:r,schema:t,value:n}));return}let o,s=T(t.dependencies[a]);if(s===`array`)o=t.dependencies[a].filter(e=>n[e]===void 0).map(i=>e.errors.missingDependencyError({missingProperty:i,pointer:r,schema:t,value:n}));else if(s===`object`)o=e.validate(n,t.dependencies[a],r);else throw Error(`Invalid dependency definition for ${r}/${a}. Must be string[] or schema`);i.push(...o)}),i.length>0?i:void 0};function Jt(e,t,n){if(!Array.isArray(t.anyOf)||t.anyOf.length===0)return;let r;return t.anyOf.forEach(t=>{t=e.resolveRef(t),e.isValid(n,t)&&(r=r?F(r,t):t)}),r}function Yt(e,t,n=e.rootSchema,r=`#`){let{anyOf:i}=n;if(!Array.isArray(i)||i.length===0)return n;let a=Jt(e,n,t);return a==null?e.errors.anyOfError({pointer:r,schema:n,value:t,anyOf:JSON.stringify(i)}):Fe(F(n,a),`anyOf`)}var Xt=(e,t,n,r)=>{if(Array.isArray(t.anyOf)&&t.anyOf.length!==0){for(let r=0;r<t.anyOf.length;r+=1)if(e.isValid(n,t.anyOf[r]))return;return e.errors.anyOfError({pointer:r,schema:t,value:n,anyOf:t.anyOf})}},Zt=[`allOf`,`anyOf`,`oneOf`,`dependencies`,`if`,`then`,`else`],Qt=[`allOf`,`anyOf`,`oneOf`,`dependencies`,`if`];function $t(e){let t=Object.keys(e);return Qt.findIndex(e=>t.includes(e))!==-1}function en(e,t,n,r){let i,a;if(t=e.resolveRef(t),t.oneOf){let o=ke(e,n,t,r);j(o)?a=o:o&&(i=F(i??{},o))}if(Array.isArray(t.allOf)){let a=t.allOf.map(t=>{if($t(t)){let i=en(e,t,n,r);return i?(i=F(t,i),Fe(i,...Zt)):void 0}return t});if(a.length>0){let t=Vt(e,{allOf:a});i=F(i??{},t)}}let o=Jt(e,t,n);o&&(i=F(i??{},o));let s=Kt(e,t,n);s&&(i=F(i??{},s));let c=Lt(e,t,n);if(c&&(i=F(i??{},c)),i==null)return a;let l=en(e,i,n,r);return l&&(i=F(i,l)),Fe(i,...Zt)}var tn=[`allOf`,`anyOf`,`oneOf`,`dependencies`,`if`,`then`,`else`];function nn(e,t,n,r){let i=en(e,t,n,r);return i?(i=F(t,i),Fe(i,...tn)):t}var rn=class{constructor(e,t){this.remotes={},this.errors={},this.typeKeywords={},this.validateKeyword={},this.validateType={},this.validateFormat={},this.config=e,this.typeKeywords=It(e.typeKeywords),this.validateKeyword=Object.assign({},e.validateKeyword),this.validateType=Object.assign({},e.validateType),this.validateFormat=Object.assign({},e.validateFormat),this.errors=Object.assign({},e.errors),this.setSchema(t)}get rootSchema(){return this.__rootSchema}set rootSchema(e){e!=null&&(this.__rootSchema=this.config.compileSchema(this,e))}addRemoteSchema(e,t){this.config.addRemoteSchema(this,e,t)}compileSchema(e){return this.config.compileSchema(this,e,this.rootSchema??e)}createSchemaOf(e){return this.config.createSchemaOf(e)}each(e,t,n,r){return this.config.each(this,e,t,n,r)}eachSchema(e,t=this.rootSchema){return this.config.eachSchema(t,e)}getChildSchemaSelection(e,t){return this.config.getChildSchemaSelection(this,e,t)}getSchema(e){return this.config.getSchema(this,e)}getTemplate(e,t,n=this.config.templateDefaultOptions){return this.config.getTemplate(this,e,t,n)}isValid(e,t,n){return this.config.isValid(this,e,t,n)}resolveAnyOf(e,t,n){return this.config.resolveAnyOf(this,e,t,n)}resolveAllOf(e,t){return this.config.resolveAllOf(this,e,t)}resolveRef(e){return this.config.resolveRef(e,this.rootSchema)}resolveOneOf(e,t,n){return this.config.resolveOneOf(this,e,t,n)}setSchema(e){this.rootSchema=e}step(e,t,n,r){return this.config.step(this,e,t,n,r)}validate(e,t,n){return this.config.validate(this,e,t,n)}};function an(e,t,n){n.id=n.id||t,e.remotes[t]=e.compileSchema(n)}var on=n(((e,t)=>{(function(n,r){typeof e==`object`&&typeof t==`object`?t.exports=r():typeof define==`function`&&define.amd?define(`jsonPointer`,[],r):typeof e==`object`?e.jsonPointer=r():n.jsonPointer=r()})(typeof self<`u`?self:e,(()=>(()=>{var e={d:(t,n)=>{for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{typeof Symbol<`u`&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:`Module`}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};function n(e){return e===`#`||e===``||Array.isArray(e)&&e.length===0||!1}e.r(t),e.d(t,{default:()=>C,get:()=>u,isRoot:()=>n,join:()=>te,remove:()=>y,removeUndefinedItems:()=>v,set:()=>h,split:()=>l,splitLast:()=>ne});let r=/~1/g,i=/~0/g,a=/\/+/g,o=/(^[#/]*|\/+$)/g;function s(e){return e.replace(r,`/`).replace(i,`~`)}function c(e){return s(decodeURIComponent(e))}function l(e){if(e==null||typeof e!=`string`||n(e))return Array.isArray(e)?e:[];let t=e.indexOf(`#`)>=0?c:s,r=(e=(e=e.replace(a,`/`)).replace(o,``)).split(`/`);for(let e=0,n=r.length;e<n;e+=1)r[e]=t(r[e]);return r}function u(e,t,r=void 0){if(t==null||e==null)return r;if(n(t))return e;let i=d(e,l(t));return i===void 0?r:i}function d(e,t){let n=t.shift();if(e!==void 0)return n===void 0?e:d(e[n],t)}let f=/^\[.*\]$/,p=/^\[(.+)\]$/;function m(e,t){return e===`__proto__`||e==`constructor`&&t.length>0&&t[0]==`prototype`}function h(e,t,n){if(t==null)return e;let r=l(t);if(r.length===0)return e;e??=f.test(r[0])?[]:{};let i,a,o=e;for(;r.length>1;)i=r.shift(),a=f.test(r[0]),m(i,r)||(o=_(o,i,a));return i=r.pop(),g(o,i,n),e}function g(e,t,n){let r,i=t.match(p);t===`[]`&&Array.isArray(e)?e.push(n):i?(r=i.pop(),e[r]=n):e[t]=n}function _(e,t,n){if(e[t]!=null)return e[t];let r=n?[]:{};return g(e,t,r),r}function v(e){let t=0,n=0;for(;t+n<e.length;)e[t+n]===void 0&&(n+=1),e[t]=e[t+n],t+=1;return e.length-=n,e}function y(e,t,n){let r=l(t),i=r.pop(),a=u(e,r);return a&&delete a[i],Array.isArray(a)&&!0!==n&&v(a),e}let b=/\/+/g,x=/~/g,S=/\//g;function ee(e,t){if(e.length===0)return t?`#`:``;for(let n=0,r=e.length;n<r;n+=1)e[n]=e[n].replace(x,`~0`).replace(S,`~1`),t&&(e[n]=encodeURIComponent(e[n]));return((t?`#/`:`/`)+e.join(`/`)).replace(b,`/`)}function te(e,...t){let n=[];if(Array.isArray(e))return ee(e,!0===arguments[1]);let r=arguments[arguments.length-1],i=typeof r==`boolean`?r:e&&e[0]===`#`;for(let e=0,t=arguments.length;e<t;e+=1)n.push.apply(n,l(arguments[e]));let a=[];for(let e=0,t=n.length;e<t;e+=1)if(n[e]===`..`){if(a.length===0)return i?`#`:``;a.pop()}else a.push(n[e]);return ee(a,i)}function ne(e){let t=l(e);if(t.length===0)return typeof e==`string`&&e[0]===`#`?[`#`,t[0]]:[``,void 0];if(t.length===1)return e[0]===`#`?[`#`,t[0]]:[``,t[0]];let n=t.pop();return[te(t,e[0]===`#`),n]}let C={get:u,set:h,remove:y,join:te,split:l,splitLast:ne,isRoot:n,removeUndefinedItems:v};return t})()))})),sn=n((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.TokenError=void 0,e.TokenError=class extends Error{constructor(e,t){if(super(e),this.message=e,this.token=t,t&&t.errors)t.errors.push(this);else throw this}inspect(){return`SyntaxError: `+this.message}}})),cn=n((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Parser=e.findRuleByName=e.parseRuleName=e.escapeRegExp=e.readToken=void 0;var t=/^[A-Z0-9_]+$/,n=/(\?|\+|\*)$/,r=/^(@|&|!)/,i=`WS`,a=sn();function o(e,t){let n=t.exec(e);return n&&n.index==0?n[0].length==0&&t.source.length>0?null:{type:null,text:n[0],rest:e.substr(n[0].length),start:0,end:n[0].length-1,fullText:n[0],errors:[],children:[],parent:null}:null}e.readToken=o;function s(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,`\\$&`)}e.escapeRegExp=s;function c(e){e.rest=``,e.children&&e.children.forEach(e=>c(e))}function l(e,t){e.start+=t,e.end+=t,e.children&&e.children.forEach(t=>l(t,e.start))}function u(e,t){t.errors&&t.errors.length&&t.errors.forEach(t=>e.push(t)),t.children&&t.children.forEach(t=>u(e,t))}function d(e){let t=n.exec(e),i=r.exec(e),a=t&&t[0]||``,o=i&&i[0]||``,s={raw:e,name:e.replace(n,``).replace(r,``),isOptional:a==`?`||a==`*`,allowRepetition:a==`+`||a==`*`,atLeastOne:a==`+`,lookupPositive:o==`&`,lookupNegative:o==`!`,pinned:o==`@`,lookup:!1,isLiteral:!1};return s.isLiteral=s.name[0]==`'`||s.name[0]==`"`,s.lookup=s.lookupNegative||s.lookupPositive,s}e.parseRuleName=d;function f(e,t){let n=d(e);return t.cachedRules[n.name]||null}e.findRuleByName=f;function p(e,t){if(e.children){let n=e.children.filter(e=>e.type&&t.test(e.type));for(let t=0;t<n.length;t++){let r=e.children.indexOf(n[t]);r!=-1&&e.children.splice(r,1)}e.children.forEach(e=>p(e,t))}}var m=[`EOF`],h=class{constructor(e,t){this.grammarRules=e,this.options=t,this.cachedRules={},this.debug=t?t.debug===!0:!1;let n=[],r=[];if(e.forEach(e=>{let t=d(e.name);if(t.name in this.cachedRules){n.push(`Duplicated rule `+t.name);return}if(this.cachedRules[t.name]=e,!e.bnf||!e.bnf.length){let t=`Missing rule content, rule: `+e.name;n.indexOf(t)==-1&&n.push(t)}else e.bnf.forEach(t=>{if(typeof t[0]==`string`&&d(t[0]).name==e.name){let t=`Left recursion is not allowed, rule: `+e.name;n.indexOf(t)==-1&&n.push(t)}t.forEach(e=>{if(typeof e==`string`){let t=d(e);!t.isLiteral&&r.indexOf(t.name)==-1&&m.indexOf(t.name)==-1&&r.push(t.name)}})});i==e.name&&(e.implicitWs=!1),e.implicitWs&&r.indexOf(i)==-1&&r.push(i),e.recover&&r.indexOf(e.recover)==-1&&r.push(e.recover)}),r.forEach(e=>{e in this.cachedRules||n.push(`Missing rule `+e)}),n.length)throw Error(n.join(`
2
2
  `))}getAST(e,n){n||=this.grammarRules.filter(e=>!e.fragment&&e.name.indexOf(`%`)!=0)[0].name;let r=this.parse(e,n);if(r){u(r.errors,r),l(r,0),p(r,/^%/),(!this.options||!this.options.keepUpperRules)&&p(r,t);let e=r.rest;e&&new a.TokenError(`Unexpected end of input:
3
3
  `+e,r),c(r),r.rest=e}return r}emitSource(){return`CANNOT EMIT SOURCE FROM BASE Parser`}parse(e,n,r=0){let c=null,l=d(n),u,p=this.debug&&!t.test(l.name);p&&console.log(Array(r).join(`│ `)+`Trying to get `+n+` from `+JSON.stringify(e.split(`
4
4
  `)[0]));let m=l.name,h=f(l.name,this);if(l.name==`EOF`){if(e.length)return null;if(e.length==0)return{type:`EOF`,text:``,rest:``,start:0,end:0,fullText:``,errors:[],children:[],parent:null}}try{if(!h&&l.isLiteral){let t=l.name.trim();if(t.startsWith(`"`)?t=JSON.parse(t):t.startsWith(`'`)&&(t=t.replace(/^'(.+)'$/,`$1`).replace(/\\'/g,`'`)),t===``)return{type:`%%EMPTY%%`,text:``,rest:e,start:0,end:0,fullText:``,errors:[],children:[],parent:null};u=new RegExp(s(t)),m=null}}catch(e){return e instanceof ReferenceError&&console.error(e),null}if(u){let t=o(e,u);if(t)return t.type=m,t}else{let t=h.bnf;t instanceof Array&&t.forEach(t=>{if(c)return;let n=null,s={type:l.name,text:``,children:[],end:0,errors:[],fullText:``,parent:null,start:0,rest:e};h.fragment&&(s.fragment=!0);let u=e,f=0,m=t.length>0,g=!1;for(let e=0;e<t.length;e++)if(typeof t[e]==`string`){let o=d(t[e]);m&&=o.isOptional;let l,_=!1;do{if(l=null,h.implicitWs&&(l=this.parse(u,o.name,r+1),!l)){let e;do if(e=this.parse(u,i,r+1),e)s.text+=e.text,s.end=s.text.length,e.parent=s,s.children.push(e),u=u.substr(e.text.length),f+=e.text.length;else break;while(e&&e.text.length)}if(l||=this.parse(u,o.name,r+1),o.lookupNegative){if(l)return;break}if(o.lookupPositive&&!l)return;if(!l&&(o.isOptional||o.atLeastOne&&_))break;if(l&&h.pinned==e+1&&(n=l,p&&console.log(Array(r+1).join(`│ `)+`└─ `+l.type+` PINNED`)),l||=this.parseRecovery(h,u,r+1),!l){if(n)c=s,l={type:`SyntaxError`,text:u,children:[],end:u.length,errors:[],fullText:``,parent:null,start:0,rest:``},u.length?new a.TokenError(`Unexpected end of input. Expecting ${o.name} Got: ${u}`,l):new a.TokenError(`Unexpected end of input. Missing ${o.name}`,l),p&&console.log(Array(r+1).join(`│ `)+`└─ `+l.type+` `+JSON.stringify(l.text));else return}if(_=!0,g=!0,l.type==`%%EMPTY%%`)break;l.start+=f,l.end+=f,!o.lookupPositive&&l.type&&(l.fragment?l.children&&l.children.forEach(e=>{e.start+=f,e.end+=f,e.parent=s,s.children.push(e)}):(l.parent=s,s.children.push(l))),o.lookup&&(l.lookup=!0),p&&console.log(Array(r+1).join(`│ `)+`└─ `+l.type+` `+JSON.stringify(l.text)),!o.lookup&&!l.lookup&&(s.text+=l.text,s.end=s.text.length,u=u.substr(l.text.length),f+=l.text.length),s.rest=u}while(l&&o.allowRepetition&&u.length&&!l.lookup)}else{let n=o(u,t[e]);if(!n)return;p&&console.log(Array(r+1).join(`│ `)+`└> `+JSON.stringify(n.text)+t[e].source),g=!0,n.start+=f,n.end+=f,s.text+=n.text,s.end=s.text.length,u=u.substr(n.text.length),f+=n.text.length,s.rest=u}g&&(c=s,p&&console.log(Array(r).join(`│ `)+`├<─┴< PUSHING `+c.type+` `+JSON.stringify(c.text)))}),c&&h.simplifyWhenOneChildren&&c.children.length==1&&(c=c.children[0])}return c||p&&console.log(n+` NOT RESOLVED FROM `+e),c}parseRecovery(e,t,n){if(e.recover&&t.length){let r=this.debug;r&&console.log(Array(n+1).join(`│ `)+`Trying to recover until token `+e.recover+` from `+JSON.stringify(t.split(`