@genesislcap/foundation-forms 10.3.1 → 11.3.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 (148) hide show
  1. package/dist/dts/form.d.ts +5 -2
  2. package/dist/dts/form.d.ts.map +1 -1
  3. package/dist/dts/jsonforms/json-forms.d.ts.map +1 -1
  4. package/dist/dts/jsonforms/renderers/BooleanControlRenderer.d.ts +1 -1
  5. package/dist/dts/jsonforms/renderers/BooleanControlRenderer.d.ts.map +1 -1
  6. package/dist/dts/jsonforms/renderers/ConnectedMultiselectControlRenderer.d.ts +1 -1
  7. package/dist/dts/jsonforms/renderers/ConnectedMultiselectControlRenderer.d.ts.map +1 -1
  8. package/dist/dts/jsonforms/renderers/ConnectedSelectControlRenderer.d.ts.map +1 -1
  9. package/dist/dts/jsonforms/testers/isOneOfNumber.d.ts.map +1 -1
  10. package/dist/dts/types.d.ts +11 -2
  11. package/dist/dts/types.d.ts.map +1 -1
  12. package/dist/dts/utils/translation.d.ts +1 -0
  13. package/dist/dts/utils/translation.d.ts.map +1 -1
  14. package/dist/dts/utils/validation.d.ts +2 -1
  15. package/dist/dts/utils/validation.d.ts.map +1 -1
  16. package/dist/esm/form.js +6 -6
  17. package/dist/esm/form.styles.js +0 -1
  18. package/dist/esm/form.template.js +0 -1
  19. package/dist/esm/index.federated.js +0 -1
  20. package/dist/esm/index.js +0 -1
  21. package/dist/esm/jsonforms/json-forms.js +1 -7
  22. package/dist/esm/jsonforms/renderers/BooleanControlRenderer.js +1 -2
  23. package/dist/esm/jsonforms/renderers/ConnectedMultiselectControlRenderer.js +0 -1
  24. package/dist/esm/jsonforms/renderers/ConnectedSelectControlRenderer.js +0 -2
  25. package/dist/esm/jsonforms/renderers/ControlWrapperRenderer.js +0 -1
  26. package/dist/esm/jsonforms/renderers/DateControlRenderer.js +1 -2
  27. package/dist/esm/jsonforms/renderers/EnumControlRenderer.js +0 -1
  28. package/dist/esm/jsonforms/renderers/InvisibleControlRenderer.js +0 -1
  29. package/dist/esm/jsonforms/renderers/LayoutRenderer.js +0 -1
  30. package/dist/esm/jsonforms/renderers/LayoutVertical2ColumnsRenderer.js +0 -1
  31. package/dist/esm/jsonforms/renderers/NumberControlRenderer.js +1 -2
  32. package/dist/esm/jsonforms/renderers/RenderersRanks.js +0 -1
  33. package/dist/esm/jsonforms/renderers/StringControlRenderer.js +0 -1
  34. package/dist/esm/jsonforms/renderers/dispatch-renderer.js +0 -1
  35. package/dist/esm/jsonforms/testers/isDate.js +0 -1
  36. package/dist/esm/jsonforms/testers/isInvisible.js +0 -1
  37. package/dist/esm/jsonforms/testers/isOneOfBoolean.js +0 -1
  38. package/dist/esm/jsonforms/testers/isOneOfEnum.js +0 -1
  39. package/dist/esm/jsonforms/testers/isOneOfNumber.js +0 -1
  40. package/dist/esm/jsonforms/testers/isOneOfOptionMultiselect.js +0 -1
  41. package/dist/esm/jsonforms/testers/optionIs.js +0 -1
  42. package/dist/esm/types.js +0 -1
  43. package/dist/esm/utils/index.js +0 -1
  44. package/dist/esm/utils/translation.js +1 -1
  45. package/dist/esm/utils/validation.js +2 -2
  46. package/dist/foundation-forms.api.json +42 -38
  47. package/dist/foundation-forms.d.ts +17 -2
  48. package/docs/api/foundation-forms.form.data.md +1 -1
  49. package/docs/api/foundation-forms.form.md +1 -1
  50. package/docs/api/foundation-forms.genesiserrortranslator.md +1 -0
  51. package/docs/api/foundation-forms.md +1 -1
  52. package/docs/api/foundation-forms.rendererentry.md +1 -0
  53. package/docs/api/{foundation-forms.logger.md → foundation-forms.renderers.md} +4 -3
  54. package/docs/api/foundation-forms.uischema.md +1 -0
  55. package/docs/api/foundation-forms.uischemaelement.md +1 -0
  56. package/docs/api/foundation-forms.uischemaelementoptions.md +4 -0
  57. package/docs/api/foundation-forms.uischemaelementtype.md +1 -0
  58. package/docs/api-report.md +12 -3
  59. package/package.json +14 -9
  60. package/dist/1.0.0.remoteEntry.js +0 -1
  61. package/dist/160.160.124ed2c5959b53210cbd.js +0 -2
  62. package/dist/160.190aff29e1d6cef60fa941e3ecd169b4.js.map +0 -1
  63. package/dist/173.173.72404a543fa554805856.js +0 -317
  64. package/dist/173.a84be468354229f21219811743190e9a.js.map +0 -1
  65. package/dist/191.191.0325d5c8852ae4921bad.js +0 -2
  66. package/dist/191.cfb3865153509ec434d0ee1d06702e06.js.map +0 -1
  67. package/dist/211.211.9bb272a936b1d1e91e6d.js +0 -2
  68. package/dist/211.618f438c5ae26e2eca20a00121c574ad.js.map +0 -1
  69. package/dist/259.259.2d238ae3cf8d8bdeba08.js +0 -2
  70. package/dist/259.550ac263c3f91b2416d000cf2f255ebb.js.map +0 -1
  71. package/dist/338.338.3768ac40171574445388.js +0 -3
  72. package/dist/338.338.3768ac40171574445388.js.LICENSE.txt +0 -1
  73. package/dist/338.b80e69713f188e86ac3d235966bec4b6.js.map +0 -1
  74. package/dist/623.2132bb44d6962138c26ec8c716abfb8c.js.map +0 -1
  75. package/dist/623.623.4eb55ef851cb4acfb42d.js +0 -3
  76. package/dist/623.623.4eb55ef851cb4acfb42d.js.LICENSE.txt +0 -4
  77. package/dist/730.730.d1c0de79e754bac881cb.js +0 -2
  78. package/dist/730.a7dfb868a3009f72a7daed20f5f05cd4.js.map +0 -1
  79. package/dist/755.755.001fb1761db3672074d3.js +0 -2
  80. package/dist/755.ef9ff39a1d56dfd14bc47cd9f22cfc9f.js.map +0 -1
  81. package/dist/817.817.09800be1f64f8771bf91.js +0 -2
  82. package/dist/817.c03de73750c9e91e022d445f10572b93.js.map +0 -1
  83. package/dist/914.3464d6aedd1272b9a7824381f8c69dc5.js.map +0 -1
  84. package/dist/914.914.9c2af15b0145e5b35752.js +0 -3
  85. package/dist/914.914.9c2af15b0145e5b35752.js.LICENSE.txt +0 -4
  86. package/dist/dashboard.json +0 -1
  87. package/dist/esm/form.js.map +0 -1
  88. package/dist/esm/form.styles.js.map +0 -1
  89. package/dist/esm/form.template.js.map +0 -1
  90. package/dist/esm/index.federated.js.map +0 -1
  91. package/dist/esm/index.js.map +0 -1
  92. package/dist/esm/jsonforms/json-forms.js.map +0 -1
  93. package/dist/esm/jsonforms/renderers/BooleanControlRenderer.js.map +0 -1
  94. package/dist/esm/jsonforms/renderers/ConnectedMultiselectControlRenderer.js.map +0 -1
  95. package/dist/esm/jsonforms/renderers/ConnectedSelectControlRenderer.js.map +0 -1
  96. package/dist/esm/jsonforms/renderers/ControlWrapperRenderer.js.map +0 -1
  97. package/dist/esm/jsonforms/renderers/DateControlRenderer.js.map +0 -1
  98. package/dist/esm/jsonforms/renderers/EnumControlRenderer.js.map +0 -1
  99. package/dist/esm/jsonforms/renderers/InvisibleControlRenderer.js.map +0 -1
  100. package/dist/esm/jsonforms/renderers/LayoutRenderer.js.map +0 -1
  101. package/dist/esm/jsonforms/renderers/LayoutVertical2ColumnsRenderer.js.map +0 -1
  102. package/dist/esm/jsonforms/renderers/NumberControlRenderer.js.map +0 -1
  103. package/dist/esm/jsonforms/renderers/RenderersRanks.js.map +0 -1
  104. package/dist/esm/jsonforms/renderers/StringControlRenderer.js.map +0 -1
  105. package/dist/esm/jsonforms/renderers/dispatch-renderer.js.map +0 -1
  106. package/dist/esm/jsonforms/testers/isDate.js.map +0 -1
  107. package/dist/esm/jsonforms/testers/isInvisible.js.map +0 -1
  108. package/dist/esm/jsonforms/testers/isOneOfBoolean.js.map +0 -1
  109. package/dist/esm/jsonforms/testers/isOneOfEnum.js.map +0 -1
  110. package/dist/esm/jsonforms/testers/isOneOfNumber.js.map +0 -1
  111. package/dist/esm/jsonforms/testers/isOneOfOptionMultiselect.js.map +0 -1
  112. package/dist/esm/jsonforms/testers/optionIs.js.map +0 -1
  113. package/dist/esm/types.js.map +0 -1
  114. package/dist/esm/utils/index.js.map +0 -1
  115. package/dist/esm/utils/translation.js.map +0 -1
  116. package/dist/esm/utils/validation.js.map +0 -1
  117. package/dist/favicon.ico +0 -0
  118. package/dist/foundation-forms.iife.min.js +0 -28
  119. package/dist/foundation-forms.js +0 -30840
  120. package/dist/foundation-forms.min.js +0 -26
  121. package/dist/foundationForms.76da734dcb8b5804415dc15f81837c4e.js.map +0 -1
  122. package/dist/index.ejs +0 -23
  123. package/dist/index.html +0 -18
  124. package/dist/info.ejs +0 -13
  125. package/dist/main.3c0082e87729584525356a6468a82555.js.map +0 -1
  126. package/dist/main.8584b1425d55f4af99a6.js +0 -2
  127. package/dist/npm.ajv.213.0edf0dee76a3e8e16fa5.js +0 -8
  128. package/dist/npm.ajv.a70ac538476d2b86b0c95c3cddc46db2.js.map +0 -1
  129. package/dist/npm.analytics.343.c50e91b7d34234ff5598.js +0 -2
  130. package/dist/npm.analytics.9350473da68aa7584e1ffd2293d7eb64.js.map +0 -1
  131. package/dist/npm.consola.713.0a877d79045b2ced4b28.js +0 -2
  132. package/dist/npm.consola.b723f5d54df2d007a63f167647d0db4f.js.map +0 -1
  133. package/dist/npm.finos.690.a9cbfbb544d61a77cb75.js +0 -2
  134. package/dist/npm.finos.d24836382e0fd4c82511da38f1e2d712.js.map +0 -1
  135. package/dist/npm.jsonforms.832.135f578bfa3e3426340a.js +0 -2
  136. package/dist/npm.jsonforms.d742a744d53545575dc0f741c7f95a16.js.map +0 -1
  137. package/dist/npm.lodash.913.2f761568d7b7540de80a.js +0 -2
  138. package/dist/npm.lodash.a3a76c8fca5de460b782c77b99c930c9.js.map +0 -1
  139. package/dist/npm.microsoft.127.c2ce55cc34c771dd0e4f.js +0 -1469
  140. package/dist/npm.microsoft.127.c2ce55cc34c771dd0e4f.js.LICENSE.txt +0 -14
  141. package/dist/npm.microsoft.351f8b8b5cd6f2b1872524cc47c1a893.js.map +0 -1
  142. package/dist/npm.rxjs.271.c9ec2153535d20987f67.js +0 -2
  143. package/dist/npm.rxjs.d2fed746c0fef18592a807dcc82cba1c.js.map +0 -1
  144. package/dist/npm.uri-js.2c30a8d9b49ce1474de4ba46d0bc69a6.js.map +0 -1
  145. package/dist/npm.uri-js.415.4ffa54936c8e552b506d.js +0 -3
  146. package/dist/npm.uri-js.415.4ffa54936c8e552b506d.js.LICENSE.txt +0 -1
  147. package/dist/remoteEntry.js +0 -2
  148. package/dist/serve.json +0 -3
@@ -1,26 +0,0 @@
1
- var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};function t(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}var r=function(){return r=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)};function n(e,t,r,n){var o,s=arguments.length,i=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(i=(s<3?o(i):s>3?o(t,r,i):o(t,r))||i);return s>3&&i&&Object.defineProperty(t,r,i),i}function o(e,t){return function(r,n){t(r,n,e)}}function s(e,t,r,n){return new(r||(r=Promise))((function(o,s){function i(e){try{c(n.next(e))}catch(e){s(e)}}function a(e){try{c(n.throw(e))}catch(e){s(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,a)}c((n=n.apply(e,t||[])).next())}))}function i(e,t){var r,n,o,s,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(c){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&a[0]?n.return:a[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;switch(n=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=t.call(e,i)}catch(e){a=[6,e],n=0}finally{r=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}}function a(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function c(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,s=r.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(n=s.next()).done;)i.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=s.return)&&r.call(s)}finally{if(o)throw o.error}}return i}function l(e,t,r){if(r||2===arguments.length)for(var n,o=0,s=t.length;o<s;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}function u(e){return this instanceof u?(this.v=e,this):new u(e)}function h(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,o=r.apply(e,t||[]),s=[];return n={},i("next"),i("throw"),i("return"),n[Symbol.asyncIterator]=function(){return this},n;function i(e){o[e]&&(n[e]=function(t){return new Promise((function(r,n){s.push([e,t,r,n])>1||a(e,t)}))})}function a(e,t){try{(r=o[e](t)).value instanceof u?Promise.resolve(r.value.v).then(c,l):h(s[0][2],r)}catch(e){h(s[0][3],e)}var r}function c(e){a("next",e)}function l(e){a("throw",e)}function h(e,t){e(t),s.shift(),s.length&&a(s[0][0],s[0][1])}}function d(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=a(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise((function(n,o){(function(e,t,r,n){Promise.resolve(n).then((function(t){e({value:t,done:r})}),t)})(n,o,(t=e[r](t)).done,t.value)}))}}}var f="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function p(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}const m=function(){if("undefined"!=typeof globalThis)return globalThis;if("undefined"!=typeof global)return global;if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;try{return new Function("return this")()}catch(e){return{}}}();void 0===m.trustedTypes&&(m.trustedTypes={createPolicy:(e,t)=>t});const v={configurable:!1,enumerable:!1,writable:!1};void 0===m.FAST&&Reflect.defineProperty(m,"FAST",Object.assign({value:Object.create(null)},v));const g=m.FAST;if(void 0===g.getById){const e=Object.create(null);Reflect.defineProperty(g,"getById",Object.assign({value(t,r){let n=e[t];return void 0===n&&(n=r?e[t]=r():null),n}},v))}const y=Object.freeze([]);function b(){const e=new WeakMap;return function(t){let r=e.get(t);if(void 0===r){let n=Reflect.getPrototypeOf(t);for(;void 0===r&&null!==n;)r=e.get(n),n=Reflect.getPrototypeOf(n);r=void 0===r?[]:r.slice(0),e.set(t,r)}return r}}const _=m.FAST.getById(1,(()=>{const e=[],t=[];function r(){if(t.length)throw t.shift()}function n(e){try{e.call()}catch(e){t.push(e),setTimeout(r,0)}}function o(){let t=0;for(;t<e.length;)if(n(e[t]),t++,t>1024){for(let r=0,n=e.length-t;r<n;r++)e[r]=e[r+t];e.length-=t,t=0}e.length=0}return Object.freeze({enqueue:function(t){e.length<1&&m.requestAnimationFrame(o),e.push(t)},process:o})})),w=m.trustedTypes.createPolicy("fast-html",{createHTML:e=>e});let S=w;const E=`fast-${Math.random().toString(36).substring(2,8)}`,$=`${E}{`,O=`}${E}`,C=Object.freeze({supportsAdoptedStyleSheets:Array.isArray(document.adoptedStyleSheets)&&"replace"in CSSStyleSheet.prototype,setHTMLPolicy(e){if(S!==w)throw new Error("The HTML policy can only be set once.");S=e},createHTML:e=>S.createHTML(e),isMarker:e=>e&&8===e.nodeType&&e.data.startsWith(E),extractDirectiveIndexFromMarker:e=>parseInt(e.data.replace(`${E}:`,"")),createInterpolationPlaceholder:e=>`${$}${e}${O}`,createCustomAttributePlaceholder(e,t){return`${e}="${this.createInterpolationPlaceholder(t)}"`},createBlockPlaceholder:e=>`\x3c!--${E}:${e}--\x3e`,queueUpdate:_.enqueue,processUpdates:_.process,nextUpdate:()=>new Promise(_.enqueue),setAttribute(e,t,r){null==r?e.removeAttribute(t):e.setAttribute(t,r)},setBooleanAttribute(e,t,r){r?e.setAttribute(t,""):e.removeAttribute(t)},removeChildNodes(e){for(let t=e.firstChild;null!==t;t=e.firstChild)e.removeChild(t)},createTemplateWalker:e=>document.createTreeWalker(e,133,null,!1)});class A{constructor(e,t){this.sub1=void 0,this.sub2=void 0,this.spillover=void 0,this.source=e,this.sub1=t}has(e){return void 0===this.spillover?this.sub1===e||this.sub2===e:-1!==this.spillover.indexOf(e)}subscribe(e){const t=this.spillover;if(void 0===t){if(this.has(e))return;if(void 0===this.sub1)return void(this.sub1=e);if(void 0===this.sub2)return void(this.sub2=e);this.spillover=[this.sub1,this.sub2,e],this.sub1=void 0,this.sub2=void 0}else{-1===t.indexOf(e)&&t.push(e)}}unsubscribe(e){const t=this.spillover;if(void 0===t)this.sub1===e?this.sub1=void 0:this.sub2===e&&(this.sub2=void 0);else{const r=t.indexOf(e);-1!==r&&t.splice(r,1)}}notify(e){const t=this.spillover,r=this.source;if(void 0===t){const t=this.sub1,n=this.sub2;void 0!==t&&t.handleChange(r,e),void 0!==n&&n.handleChange(r,e)}else for(let n=0,o=t.length;n<o;++n)t[n].handleChange(r,e)}}class T{constructor(e){this.subscribers={},this.sourceSubscribers=null,this.source=e}notify(e){var t;const r=this.subscribers[e];void 0!==r&&r.notify(e),null===(t=this.sourceSubscribers)||void 0===t||t.notify(e)}subscribe(e,t){var r;if(t){let r=this.subscribers[t];void 0===r&&(this.subscribers[t]=r=new A(this.source)),r.subscribe(e)}else this.sourceSubscribers=null!==(r=this.sourceSubscribers)&&void 0!==r?r:new A(this.source),this.sourceSubscribers.subscribe(e)}unsubscribe(e,t){var r;if(t){const r=this.subscribers[t];void 0!==r&&r.unsubscribe(e)}else null===(r=this.sourceSubscribers)||void 0===r||r.unsubscribe(e)}}const x=g.getById(2,(()=>{const e=/(:|&&|\|\||if)/,t=new WeakMap,r=C.queueUpdate;let n,o=e=>{throw new Error("Must call enableArrayObservation before observing arrays.")};function s(e){let r=e.$fastController||t.get(e);return void 0===r&&(Array.isArray(e)?r=o(e):t.set(e,r=new T(e))),r}const i=b();class a{constructor(e){this.name=e,this.field=`_${e}`,this.callback=`${e}Changed`}getValue(e){return void 0!==n&&n.watch(e,this.name),e[this.field]}setValue(e,t){const r=this.field,n=e[r];if(n!==t){e[r]=t;const o=e[this.callback];"function"==typeof o&&o.call(e,n,t),s(e).notify(this.name)}}}class c extends A{constructor(e,t,r=!1){super(e,t),this.binding=e,this.isVolatileBinding=r,this.needsRefresh=!0,this.needsQueue=!0,this.first=this,this.last=null,this.propertySource=void 0,this.propertyName=void 0,this.notifier=void 0,this.next=void 0}observe(e,t){this.needsRefresh&&null!==this.last&&this.disconnect();const r=n;n=this.needsRefresh?this:void 0,this.needsRefresh=this.isVolatileBinding;const o=this.binding(e,t);return n=r,o}disconnect(){if(null!==this.last){let e=this.first;for(;void 0!==e;)e.notifier.unsubscribe(this,e.propertyName),e=e.next;this.last=null,this.needsRefresh=this.needsQueue=!0}}watch(e,t){const r=this.last,o=s(e),i=null===r?this.first:{};if(i.propertySource=e,i.propertyName=t,i.notifier=o,o.subscribe(this,t),null!==r){if(!this.needsRefresh){let t;n=void 0,t=r.propertySource[r.propertyName],n=this,e===t&&(this.needsRefresh=!0)}r.next=i}this.last=i}handleChange(){this.needsQueue&&(this.needsQueue=!1,r(this))}call(){null!==this.last&&(this.needsQueue=!0,this.notify(this))}records(){let e=this.first;return{next:()=>{const t=e;return void 0===t?{value:void 0,done:!0}:(e=e.next,{value:t,done:!1})},[Symbol.iterator]:function(){return this}}}}return Object.freeze({setArrayObserverFactory(e){o=e},getNotifier:s,track(e,t){void 0!==n&&n.watch(e,t)},trackVolatile(){void 0!==n&&(n.needsRefresh=!0)},notify(e,t){s(e).notify(t)},defineProperty(e,t){"string"==typeof t&&(t=new a(t)),i(e).push(t),Reflect.defineProperty(e,t.name,{enumerable:!0,get:function(){return t.getValue(this)},set:function(e){t.setValue(this,e)}})},getAccessors:i,binding(e,t,r=this.isVolatileBinding(e)){return new c(e,t,r)},isVolatileBinding:t=>e.test(t.toString())})}));function P(e,t){x.defineProperty(e,t)}function j(e,t,r){return Object.assign({},r,{get:function(){return x.trackVolatile(),r.get.apply(this)}})}const N=g.getById(3,(()=>{let e=null;return{get:()=>e,set(t){e=t}}}));class R{constructor(){this.index=0,this.length=0,this.parent=null,this.parentContext=null}get event(){return N.get()}get isEven(){return this.index%2==0}get isOdd(){return this.index%2!=0}get isFirst(){return 0===this.index}get isInMiddle(){return!this.isFirst&&!this.isLast}get isLast(){return this.index===this.length-1}static setEvent(e){N.set(e)}}x.defineProperty(R.prototype,"index"),x.defineProperty(R.prototype,"length");const k=Object.seal(new R);class I{constructor(){this.targetIndex=0}}class M extends I{constructor(){super(...arguments),this.createPlaceholder=C.createInterpolationPlaceholder}}function D(e,t){this.source=e,this.context=t,null===this.bindingObserver&&(this.bindingObserver=x.binding(this.binding,this,this.isBindingVolatile)),this.updateTarget(this.bindingObserver.observe(e,t))}function F(e,t){this.source=e,this.context=t,this.target.addEventListener(this.targetName,this)}function V(){this.bindingObserver.disconnect(),this.source=null,this.context=null}function L(){this.bindingObserver.disconnect(),this.source=null,this.context=null;const e=this.target.$fastView;void 0!==e&&e.isComposed&&(e.unbind(),e.needsBindOnly=!0)}function U(){this.target.removeEventListener(this.targetName,this),this.source=null,this.context=null}function z(e){C.setAttribute(this.target,this.targetName,e)}function B(e){C.setBooleanAttribute(this.target,this.targetName,e)}function G(e){if(null==e&&(e=""),e.create){this.target.textContent="";let t=this.target.$fastView;void 0===t?t=e.create():this.target.$fastTemplate!==e&&(t.isComposed&&(t.remove(),t.unbind()),t=e.create()),t.isComposed?t.needsBindOnly&&(t.needsBindOnly=!1,t.bind(this.source,this.context)):(t.isComposed=!0,t.bind(this.source,this.context),t.insertBefore(this.target),this.target.$fastView=t,this.target.$fastTemplate=e)}else{const t=this.target.$fastView;void 0!==t&&t.isComposed&&(t.isComposed=!1,t.remove(),t.needsBindOnly?t.needsBindOnly=!1:t.unbind()),this.target.textContent=e}}function H(e){this.target[this.targetName]=e}function W(e){const t=this.classVersions||Object.create(null),r=this.target;let n=this.version||0;if(null!=e&&e.length){const o=e.split(/\s+/);for(let e=0,s=o.length;e<s;++e){const s=o[e];""!==s&&(t[s]=n,r.classList.add(s))}}if(this.classVersions=t,this.version=n+1,0!==n){n-=1;for(const e in t)t[e]===n&&r.classList.remove(e)}}class q extends M{constructor(e){super(),this.binding=e,this.bind=D,this.unbind=V,this.updateTarget=z,this.isBindingVolatile=x.isVolatileBinding(this.binding)}get targetName(){return this.originalTargetName}set targetName(e){if(this.originalTargetName=e,void 0!==e)switch(e[0]){case":":if(this.cleanedTargetName=e.substr(1),this.updateTarget=H,"innerHTML"===this.cleanedTargetName){const e=this.binding;this.binding=(t,r)=>C.createHTML(e(t,r))}break;case"?":this.cleanedTargetName=e.substr(1),this.updateTarget=B;break;case"@":this.cleanedTargetName=e.substr(1),this.bind=F,this.unbind=U;break;default:this.cleanedTargetName=e,"class"===e&&(this.updateTarget=W)}}targetAtContent(){this.updateTarget=G,this.unbind=L}createBehavior(e){return new K(e,this.binding,this.isBindingVolatile,this.bind,this.unbind,this.updateTarget,this.cleanedTargetName)}}class K{constructor(e,t,r,n,o,s,i){this.source=null,this.context=null,this.bindingObserver=null,this.target=e,this.binding=t,this.isBindingVolatile=r,this.bind=n,this.unbind=o,this.updateTarget=s,this.targetName=i}handleChange(){this.updateTarget(this.bindingObserver.observe(this.source,this.context))}handleEvent(e){R.setEvent(e);const t=this.binding(this.source,this.context);R.setEvent(null),!0!==t&&e.preventDefault()}}let Y=null;class J{addFactory(e){e.targetIndex=this.targetIndex,this.behaviorFactories.push(e)}captureContentBinding(e){e.targetAtContent(),this.addFactory(e)}reset(){this.behaviorFactories=[],this.targetIndex=-1}release(){Y=this}static borrow(e){const t=Y||new J;return t.directives=e,t.reset(),Y=null,t}}function Q(e){if(1===e.length)return e[0];let t;const r=e.length,n=e.map((e=>"string"==typeof e?()=>e:(t=e.targetName||t,e.binding))),o=new q(((e,t)=>{let o="";for(let s=0;s<r;++s)o+=n[s](e,t);return o}));return o.targetName=t,o}const Z=O.length;function X(e,t){const r=t.split($);if(1===r.length)return null;const n=[];for(let t=0,o=r.length;t<o;++t){const o=r[t],s=o.indexOf(O);let i;if(-1===s)i=o;else{const t=parseInt(o.substring(0,s));n.push(e.directives[t]),i=o.substring(s+Z)}""!==i&&n.push(i)}return n}function ee(e,t,r=!1){const n=t.attributes;for(let o=0,s=n.length;o<s;++o){const i=n[o],a=i.value,c=X(e,a);let l=null;null===c?r&&(l=new q((()=>a)),l.targetName=i.name):l=Q(c),null!==l&&(t.removeAttributeNode(i),o--,s--,e.addFactory(l))}}function te(e,t,r){const n=X(e,t.textContent);if(null!==n){let o=t;for(let s=0,i=n.length;s<i;++s){const i=n[s],a=0===s?t:o.parentNode.insertBefore(document.createTextNode(""),o.nextSibling);"string"==typeof i?a.textContent=i:(a.textContent=" ",e.captureContentBinding(i)),o=a,e.targetIndex++,a!==t&&r.nextNode()}e.targetIndex--}}const re=document.createRange();class ne{constructor(e,t){this.fragment=e,this.behaviors=t,this.source=null,this.context=null,this.firstChild=e.firstChild,this.lastChild=e.lastChild}appendTo(e){e.appendChild(this.fragment)}insertBefore(e){if(this.fragment.hasChildNodes())e.parentNode.insertBefore(this.fragment,e);else{const t=this.lastChild;if(e.previousSibling===t)return;const r=e.parentNode;let n,o=this.firstChild;for(;o!==t;)n=o.nextSibling,r.insertBefore(o,e),o=n;r.insertBefore(t,e)}}remove(){const e=this.fragment,t=this.lastChild;let r,n=this.firstChild;for(;n!==t;)r=n.nextSibling,e.appendChild(n),n=r;e.appendChild(t)}dispose(){const e=this.firstChild.parentNode,t=this.lastChild;let r,n=this.firstChild;for(;n!==t;)r=n.nextSibling,e.removeChild(n),n=r;e.removeChild(t);const o=this.behaviors,s=this.source;for(let e=0,t=o.length;e<t;++e)o[e].unbind(s)}bind(e,t){const r=this.behaviors;if(this.source!==e)if(null!==this.source){const n=this.source;this.source=e,this.context=t;for(let o=0,s=r.length;o<s;++o){const s=r[o];s.unbind(n),s.bind(e,t)}}else{this.source=e,this.context=t;for(let n=0,o=r.length;n<o;++n)r[n].bind(e,t)}}unbind(){if(null===this.source)return;const e=this.behaviors,t=this.source;for(let r=0,n=e.length;r<n;++r)e[r].unbind(t);this.source=null}static disposeContiguousBatch(e){if(0!==e.length){re.setStartBefore(e[0].firstChild),re.setEndAfter(e[e.length-1].lastChild),re.deleteContents();for(let t=0,r=e.length;t<r;++t){const r=e[t],n=r.behaviors,o=r.source;for(let e=0,t=n.length;e<t;++e)n[e].unbind(o)}}}}class oe{constructor(e,t){this.behaviorCount=0,this.hasHostBehaviors=!1,this.fragment=null,this.targetOffset=0,this.viewBehaviorFactories=null,this.hostBehaviorFactories=null,this.html=e,this.directives=t}create(e){if(null===this.fragment){let e;const t=this.html;if("string"==typeof t){e=document.createElement("template"),e.innerHTML=C.createHTML(t);const r=e.content.firstElementChild;null!==r&&"TEMPLATE"===r.tagName&&(e=r)}else e=t;const r=function(e,t){const r=e.content;document.adoptNode(r);const n=J.borrow(t);ee(n,e,!0);const o=n.behaviorFactories;n.reset();const s=C.createTemplateWalker(r);let i;for(;i=s.nextNode();)switch(n.targetIndex++,i.nodeType){case 1:ee(n,i);break;case 3:te(n,i,s);break;case 8:C.isMarker(i)&&n.addFactory(t[C.extractDirectiveIndexFromMarker(i)])}let a=0;(C.isMarker(r.firstChild)||1===r.childNodes.length&&t.length)&&(r.insertBefore(document.createComment(""),r.firstChild),a=-1);const c=n.behaviorFactories;return n.release(),{fragment:r,viewBehaviorFactories:c,hostBehaviorFactories:o,targetOffset:a}}(e,this.directives);this.fragment=r.fragment,this.viewBehaviorFactories=r.viewBehaviorFactories,this.hostBehaviorFactories=r.hostBehaviorFactories,this.targetOffset=r.targetOffset,this.behaviorCount=this.viewBehaviorFactories.length+this.hostBehaviorFactories.length,this.hasHostBehaviors=this.hostBehaviorFactories.length>0}const t=this.fragment.cloneNode(!0),r=this.viewBehaviorFactories,n=new Array(this.behaviorCount),o=C.createTemplateWalker(t);let s=0,i=this.targetOffset,a=o.nextNode();for(let e=r.length;s<e;++s){const e=r[s],t=e.targetIndex;for(;null!==a;){if(i===t){n[s]=e.createBehavior(a);break}a=o.nextNode(),i++}}if(this.hasHostBehaviors){const t=this.hostBehaviorFactories;for(let r=0,o=t.length;r<o;++r,++s)n[s]=t[r].createBehavior(e)}return new ne(t,n)}render(e,t,r){"string"==typeof t&&(t=document.getElementById(t)),void 0===r&&(r=t);const n=this.create(r);return n.bind(e,k),n.appendTo(t),n}}const se=/([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F "'>=/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/;function ie(e,...t){const r=[];let n="";for(let o=0,s=e.length-1;o<s;++o){const s=e[o];let i=t[o];if(n+=s,i instanceof oe){const e=i;i=()=>e}if("function"==typeof i&&(i=new q(i)),i instanceof M){const e=se.exec(s);null!==e&&(i.targetName=e[2])}i instanceof I?(n+=i.createPlaceholder(r.length),r.push(i)):n+=i}return n+=e[e.length-1],new oe(n,r)}class ae{constructor(){this.targets=new WeakSet}addStylesTo(e){this.targets.add(e)}removeStylesFrom(e){this.targets.delete(e)}isAttachedTo(e){return this.targets.has(e)}withBehaviors(...e){return this.behaviors=null===this.behaviors?e:this.behaviors.concat(e),this}}function ce(e){return e.map((e=>e instanceof ae?ce(e.styles):[e])).reduce(((e,t)=>e.concat(t)),[])}function le(e){return e.map((e=>e instanceof ae?e.behaviors:null)).reduce(((e,t)=>null===t?e:(null===e&&(e=[]),e.concat(t))),null)}ae.create=(()=>{if(C.supportsAdoptedStyleSheets){const e=new Map;return t=>new ue(t,e)}return e=>new de(e)})();class ue extends ae{constructor(e,t){super(),this.styles=e,this.styleSheetCache=t,this._styleSheets=void 0,this.behaviors=le(e)}get styleSheets(){if(void 0===this._styleSheets){const e=this.styles,t=this.styleSheetCache;this._styleSheets=ce(e).map((e=>{if(e instanceof CSSStyleSheet)return e;let r=t.get(e);return void 0===r&&(r=new CSSStyleSheet,r.replaceSync(e),t.set(e,r)),r}))}return this._styleSheets}addStylesTo(e){e.adoptedStyleSheets=[...e.adoptedStyleSheets,...this.styleSheets],super.addStylesTo(e)}removeStylesFrom(e){const t=this.styleSheets;e.adoptedStyleSheets=e.adoptedStyleSheets.filter((e=>-1===t.indexOf(e))),super.removeStylesFrom(e)}}let he=0;class de extends ae{constructor(e){super(),this.styles=e,this.behaviors=null,this.behaviors=le(e),this.styleSheets=ce(e),this.styleClass="fast-style-class-"+ ++he}addStylesTo(e){const t=this.styleSheets,r=this.styleClass;e=this.normalizeTarget(e);for(let n=0;n<t.length;n++){const o=document.createElement("style");o.innerHTML=t[n],o.className=r,e.append(o)}super.addStylesTo(e)}removeStylesFrom(e){const t=(e=this.normalizeTarget(e)).querySelectorAll(`.${this.styleClass}`);for(let r=0,n=t.length;r<n;++r)e.removeChild(t[r]);super.removeStylesFrom(e)}isAttachedTo(e){return super.isAttachedTo(this.normalizeTarget(e))}normalizeTarget(e){return e===document?document.body:e}}const fe=Object.freeze({locate:b()}),pe={toView:e=>e?"true":"false",fromView:e=>null!=e&&"false"!==e&&!1!==e&&0!==e};class me{constructor(e,t,r=t.toLowerCase(),n="reflect",o){this.guards=new Set,this.Owner=e,this.name=t,this.attribute=r,this.mode=n,this.converter=o,this.fieldName=`_${t}`,this.callbackName=`${t}Changed`,this.hasCallback=this.callbackName in e.prototype,"boolean"===n&&void 0===o&&(this.converter=pe)}setValue(e,t){const r=e[this.fieldName],n=this.converter;void 0!==n&&(t=n.fromView(t)),r!==t&&(e[this.fieldName]=t,this.tryReflectToAttribute(e),this.hasCallback&&e[this.callbackName](r,t),e.$fastController.notify(this.name))}getValue(e){return x.track(e,this.name),e[this.fieldName]}onAttributeChangedCallback(e,t){this.guards.has(e)||(this.guards.add(e),this.setValue(e,t),this.guards.delete(e))}tryReflectToAttribute(e){const t=this.mode,r=this.guards;r.has(e)||"fromView"===t||C.queueUpdate((()=>{r.add(e);const n=e[this.fieldName];switch(t){case"reflect":const t=this.converter;C.setAttribute(e,this.attribute,void 0!==t?t.toView(n):n);break;case"boolean":C.setBooleanAttribute(e,this.attribute,n)}r.delete(e)}))}static collect(e,...t){const r=[];t.push(fe.locate(e));for(let n=0,o=t.length;n<o;++n){const o=t[n];if(void 0!==o)for(let t=0,n=o.length;t<n;++t){const n=o[t];"string"==typeof n?r.push(new me(e,n)):r.push(new me(e,n.property,n.attribute,n.mode,n.converter))}}return r}}function ve(e,t){let r;function n(e,t){arguments.length>1&&(r.property=t),fe.locate(e.constructor).push(r)}return arguments.length>1?(r={},void n(e,t)):(r=void 0===e?{}:e,n)}const ge={mode:"open"},ye={},be=g.getById(4,(()=>{const e=new Map;return Object.freeze({register:t=>!e.has(t.type)&&(e.set(t.type,t),!0),getByType:t=>e.get(t)})}));class _e{constructor(e,t=e.definition){"string"==typeof t&&(t={name:t}),this.type=e,this.name=t.name,this.template=t.template;const r=me.collect(e,t.attributes),n=new Array(r.length),o={},s={};for(let e=0,t=r.length;e<t;++e){const t=r[e];n[e]=t.attribute,o[t.name]=t,s[t.attribute]=t}this.attributes=r,this.observedAttributes=n,this.propertyLookup=o,this.attributeLookup=s,this.shadowOptions=void 0===t.shadowOptions?ge:null===t.shadowOptions?void 0:Object.assign(Object.assign({},ge),t.shadowOptions),this.elementOptions=void 0===t.elementOptions?ye:Object.assign(Object.assign({},ye),t.elementOptions),this.styles=void 0===t.styles?void 0:Array.isArray(t.styles)?ae.create(t.styles):t.styles instanceof ae?t.styles:ae.create([t.styles])}get isDefined(){return!!be.getByType(this.type)}define(e=customElements){const t=this.type;if(be.register(this)){const e=this.attributes,r=t.prototype;for(let t=0,n=e.length;t<n;++t)x.defineProperty(r,e[t]);Reflect.defineProperty(t,"observedAttributes",{value:this.observedAttributes,enumerable:!0})}return e.get(this.name)||e.define(this.name,t,this.elementOptions),this}}_e.forType=be.getByType;const we=new WeakMap,Se={bubbles:!0,composed:!0,cancelable:!0};function Ee(e){return e.shadowRoot||we.get(e)||null}class $e extends T{constructor(e,t){super(e),this.boundObservables=null,this.behaviors=null,this.needsInitialization=!0,this._template=null,this._styles=null,this._isConnected=!1,this.$fastController=this,this.view=null,this.element=e,this.definition=t;const r=t.shadowOptions;if(void 0!==r){const t=e.attachShadow(r);"closed"===r.mode&&we.set(e,t)}const n=x.getAccessors(e);if(n.length>0){const t=this.boundObservables=Object.create(null);for(let r=0,o=n.length;r<o;++r){const o=n[r].name,s=e[o];void 0!==s&&(delete e[o],t[o]=s)}}}get isConnected(){return x.track(this,"isConnected"),this._isConnected}setIsConnected(e){this._isConnected=e,x.notify(this,"isConnected")}get template(){return this._template}set template(e){this._template!==e&&(this._template=e,this.needsInitialization||this.renderTemplate(e))}get styles(){return this._styles}set styles(e){this._styles!==e&&(null!==this._styles&&this.removeStyles(this._styles),this._styles=e,this.needsInitialization||null===e||this.addStyles(e))}addStyles(e){const t=Ee(this.element)||this.element.getRootNode();if(e instanceof HTMLStyleElement)t.append(e);else if(!e.isAttachedTo(t)){const r=e.behaviors;e.addStylesTo(t),null!==r&&this.addBehaviors(r)}}removeStyles(e){const t=Ee(this.element)||this.element.getRootNode();if(e instanceof HTMLStyleElement)t.removeChild(e);else if(e.isAttachedTo(t)){const r=e.behaviors;e.removeStylesFrom(t),null!==r&&this.removeBehaviors(r)}}addBehaviors(e){const t=this.behaviors||(this.behaviors=new Map),r=e.length,n=[];for(let o=0;o<r;++o){const r=e[o];t.has(r)?t.set(r,t.get(r)+1):(t.set(r,1),n.push(r))}if(this._isConnected){const e=this.element;for(let t=0;t<n.length;++t)n[t].bind(e,k)}}removeBehaviors(e,t=!1){const r=this.behaviors;if(null===r)return;const n=e.length,o=[];for(let s=0;s<n;++s){const n=e[s];if(r.has(n)){const e=r.get(n)-1;0===e||t?r.delete(n)&&o.push(n):r.set(n,e)}}if(this._isConnected){const e=this.element;for(let t=0;t<o.length;++t)o[t].unbind(e)}}onConnectedCallback(){if(this._isConnected)return;const e=this.element;this.needsInitialization?this.finishInitialization():null!==this.view&&this.view.bind(e,k);const t=this.behaviors;if(null!==t)for(const[r]of t)r.bind(e,k);this.setIsConnected(!0)}onDisconnectedCallback(){if(!this._isConnected)return;this.setIsConnected(!1);const e=this.view;null!==e&&e.unbind();const t=this.behaviors;if(null!==t){const e=this.element;for(const[r]of t)r.unbind(e)}}onAttributeChangedCallback(e,t,r){const n=this.definition.attributeLookup[e];void 0!==n&&n.onAttributeChangedCallback(this.element,r)}emit(e,t,r){return!!this._isConnected&&this.element.dispatchEvent(new CustomEvent(e,Object.assign(Object.assign({detail:t},Se),r)))}finishInitialization(){const e=this.element,t=this.boundObservables;if(null!==t){const r=Object.keys(t);for(let n=0,o=r.length;n<o;++n){const o=r[n];e[o]=t[o]}this.boundObservables=null}const r=this.definition;null===this._template&&(this.element.resolveTemplate?this._template=this.element.resolveTemplate():r.template&&(this._template=r.template||null)),null!==this._template&&this.renderTemplate(this._template),null===this._styles&&(this.element.resolveStyles?this._styles=this.element.resolveStyles():r.styles&&(this._styles=r.styles||null)),null!==this._styles&&this.addStyles(this._styles),this.needsInitialization=!1}renderTemplate(e){const t=this.element,r=Ee(t)||t;null!==this.view?(this.view.dispose(),this.view=null):this.needsInitialization||C.removeChildNodes(r),e&&(this.view=e.render(t,r,t))}static forCustomElement(e){const t=e.$fastController;if(void 0!==t)return t;const r=_e.forType(e.constructor);if(void 0===r)throw new Error("Missing FASTElement definition.");return e.$fastController=new $e(e,r)}}function Oe(e){return class extends e{constructor(){super(),$e.forCustomElement(this)}$emit(e,t,r){return this.$fastController.emit(e,t,r)}connectedCallback(){this.$fastController.onConnectedCallback()}disconnectedCallback(){this.$fastController.onDisconnectedCallback()}attributeChangedCallback(e,t,r){this.$fastController.onAttributeChangedCallback(e,t,r)}}}const Ce=Object.assign(Oe(HTMLElement),{from:e=>Oe(e),define:(e,t)=>new _e(e,t).define().type});function Ae(e){return function(t){new _e(t,e).define()}}class Te{createCSS(){return""}createBehavior(){}}function xe(e,...t){const{styles:r,behaviors:n}=function(e,t){const r=[];let n="";const o=[];for(let s=0,i=e.length-1;s<i;++s){n+=e[s];let i=t[s];if(i instanceof Te){const e=i.createBehavior();i=i.createCSS(),e&&o.push(e)}i instanceof ae||i instanceof CSSStyleSheet?(""!==n.trim()&&(r.push(n),n=""),r.push(i)):n+=i}return n+=e[e.length-1],""!==n.trim()&&r.push(n),{styles:r,behaviors:o}}(e,t),o=ae.create(r);return n.length&&o.withBehaviors(...n),o}function Pe(e,t,r){return{index:e,removed:t,addedCount:r}}const je=0,Ne=1,Re=2,ke=3;function Ie(e,t,r,n,o,s){let i=0,a=0;const c=Math.min(r-t,s-o);if(0===t&&0===o&&(i=function(e,t,r){for(let n=0;n<r;++n)if(e[n]!==t[n])return n;return r}(e,n,c)),r===e.length&&s===n.length&&(a=function(e,t,r){let n=e.length,o=t.length,s=0;for(;s<r&&e[--n]===t[--o];)s++;return s}(e,n,c-i)),o+=i,s-=a,(r-=a)-(t+=i)==0&&s-o==0)return y;if(t===r){const e=Pe(t,[],0);for(;o<s;)e.removed.push(n[o++]);return[e]}if(o===s)return[Pe(t,[],r-t)];const l=function(e){let t=e.length-1,r=e[0].length-1,n=e[t][r];const o=[];for(;t>0||r>0;){if(0===t){o.push(Re),r--;continue}if(0===r){o.push(ke),t--;continue}const s=e[t-1][r-1],i=e[t-1][r],a=e[t][r-1];let c;c=i<a?i<s?i:s:a<s?a:s,c===s?(s===n?o.push(je):(o.push(Ne),n=s),t--,r--):c===i?(o.push(ke),t--,n=i):(o.push(Re),r--,n=a)}return o.reverse(),o}(function(e,t,r,n,o,s){const i=s-o+1,a=r-t+1,c=new Array(i);let l,u;for(let e=0;e<i;++e)c[e]=new Array(a),c[e][0]=e;for(let e=0;e<a;++e)c[0][e]=e;for(let r=1;r<i;++r)for(let s=1;s<a;++s)e[t+s-1]===n[o+r-1]?c[r][s]=c[r-1][s-1]:(l=c[r-1][s]+1,u=c[r][s-1]+1,c[r][s]=l<u?l:u);return c}(e,t,r,n,o,s)),u=[];let h,d=t,f=o;for(let e=0;e<l.length;++e)switch(l[e]){case je:void 0!==h&&(u.push(h),h=void 0),d++,f++;break;case Ne:void 0===h&&(h=Pe(d,[],0)),h.addedCount++,d++,h.removed.push(n[f]),f++;break;case Re:void 0===h&&(h=Pe(d,[],0)),h.addedCount++,d++;break;case ke:void 0===h&&(h=Pe(d,[],0)),h.removed.push(n[f]),f++}return void 0!==h&&u.push(h),u}const Me=Array.prototype.push;function De(e,t,r,n){const o=Pe(t,r,n);let s=!1,i=0;for(let t=0;t<e.length;t++){const r=e[t];if(r.index+=i,s)continue;const n=(a=o.index,c=o.index+o.removed.length,l=r.index,u=r.index+r.addedCount,c<l||u<a?-1:c===l||u===a?0:a<l?c<u?c-l:u-l:u<c?u-a:c-a);if(n>=0){e.splice(t,1),t--,i-=r.addedCount-r.removed.length,o.addedCount+=r.addedCount-n;const a=o.removed.length+r.removed.length-n;if(o.addedCount||a){let e=r.removed;if(o.index<r.index){const t=o.removed.slice(0,r.index-o.index);Me.apply(t,e),e=t}if(o.index+o.removed.length>r.index+r.addedCount){const t=o.removed.slice(r.index+r.addedCount-o.index);Me.apply(e,t)}o.removed=e,r.index<o.index&&(o.index=r.index)}else s=!0}else if(o.index<r.index){s=!0,e.splice(t,0,o),t++;const n=o.addedCount-o.removed.length;r.index+=n,i+=n}}var a,c,l,u;s||e.push(o)}function Fe(e,t){let r=[];const n=function(e){const t=[];for(let r=0,n=e.length;r<n;r++){const n=e[r];De(t,n.index,n.removed,n.addedCount)}return t}(t);for(let t=0,o=n.length;t<o;++t){const o=n[t];1!==o.addedCount||1!==o.removed.length?r=r.concat(Ie(e,o.index,o.index+o.addedCount,o.removed,0,o.removed.length)):o.removed[0]!==e[o.index]&&r.push(o)}return r}let Ve=!1;function Le(e,t){let r=e.index;const n=t.length;return r>n?r=n-e.addedCount:r<0&&(r=n+e.removed.length+r-e.addedCount),r<0&&(r=0),e.index=r,e}class Ue extends A{constructor(e){super(e),this.oldCollection=void 0,this.splices=void 0,this.needsQueue=!0,this.call=this.flush,Reflect.defineProperty(e,"$fastController",{value:this,enumerable:!1})}subscribe(e){this.flush(),super.subscribe(e)}addSplice(e){void 0===this.splices?this.splices=[e]:this.splices.push(e),this.needsQueue&&(this.needsQueue=!1,C.queueUpdate(this))}reset(e){this.oldCollection=e,this.needsQueue&&(this.needsQueue=!1,C.queueUpdate(this))}flush(){const e=this.splices,t=this.oldCollection;if(void 0===e&&void 0===t)return;this.needsQueue=!0,this.splices=void 0,this.oldCollection=void 0;const r=void 0===t?Fe(this.source,e):Ie(this.source,0,this.source.length,t,0,t.length);this.notify(r)}}function ze(e,t){const r="function"==typeof t?t:()=>t;return(t,n)=>e(t,n)?r(t,n):null}const Be=Object.freeze({positioning:!1,recycle:!0});function Ge(e,t,r,n){e.bind(t[r],n)}function He(e,t,r,n){const o=Object.create(n);o.index=r,o.length=t.length,e.bind(t[r],o)}class We{constructor(e,t,r,n,o,s){this.location=e,this.itemsBinding=t,this.templateBinding=n,this.options=s,this.source=null,this.views=[],this.items=null,this.itemsObserver=null,this.originalContext=void 0,this.childContext=void 0,this.bindView=Ge,this.itemsBindingObserver=x.binding(t,this,r),this.templateBindingObserver=x.binding(n,this,o),s.positioning&&(this.bindView=He)}bind(e,t){this.source=e,this.originalContext=t,this.childContext=Object.create(t),this.childContext.parent=e,this.childContext.parentContext=this.originalContext,this.items=this.itemsBindingObserver.observe(e,this.originalContext),this.template=this.templateBindingObserver.observe(e,this.originalContext),this.observeItems(!0),this.refreshAllViews()}unbind(){this.source=null,this.items=null,null!==this.itemsObserver&&this.itemsObserver.unsubscribe(this),this.unbindAllViews(),this.itemsBindingObserver.disconnect(),this.templateBindingObserver.disconnect()}handleChange(e,t){e===this.itemsBinding?(this.items=this.itemsBindingObserver.observe(this.source,this.originalContext),this.observeItems(),this.refreshAllViews()):e===this.templateBinding?(this.template=this.templateBindingObserver.observe(this.source,this.originalContext),this.refreshAllViews(!0)):this.updateViews(t)}observeItems(e=!1){if(!this.items)return void(this.items=y);const t=this.itemsObserver,r=this.itemsObserver=x.getNotifier(this.items),n=t!==r;n&&null!==t&&t.unsubscribe(this),(n||e)&&r.subscribe(this)}updateViews(e){const t=this.childContext,r=this.views,n=this.bindView,o=this.items,s=this.template,i=this.options.recycle,a=[];let c=0,l=0;for(let u=0,h=e.length;u<h;++u){const h=e[u],d=h.removed;let f=0,p=h.index;const m=p+h.addedCount,v=r.splice(h.index,d.length),g=l=a.length+v.length;for(;p<m;++p){const e=r[p],u=e?e.firstChild:this.location;let h;i&&l>0?(f<=g&&v.length>0?(h=v[f],f++):(h=a[c],c++),l--):h=s.create(),r.splice(p,0,h),n(h,o,p,t),h.insertBefore(u)}v[f]&&a.push(...v.slice(f))}for(let e=c,t=a.length;e<t;++e)a[e].dispose();if(this.options.positioning)for(let e=0,t=r.length;e<t;++e){const n=r[e].context;n.length=t,n.index=e}}refreshAllViews(e=!1){const t=this.items,r=this.childContext,n=this.template,o=this.location,s=this.bindView;let i=t.length,a=this.views,c=a.length;if(0!==i&&!e&&this.options.recycle||(ne.disposeContiguousBatch(a),c=0),0===c){this.views=a=new Array(i);for(let e=0;e<i;++e){const i=n.create();s(i,t,e,r),a[e]=i,i.insertBefore(o)}}else{let e=0;for(;e<i;++e)if(e<c){s(a[e],t,e,r)}else{const i=n.create();s(i,t,e,r),a.push(i),i.insertBefore(o)}const l=a.splice(e,c-e);for(e=0,i=l.length;e<i;++e)l[e].dispose()}}unbindAllViews(){const e=this.views;for(let t=0,r=e.length;t<r;++t)e[t].unbind()}}class qe extends I{constructor(e,t,r){super(),this.itemsBinding=e,this.templateBinding=t,this.options=r,this.createPlaceholder=C.createBlockPlaceholder,function(){if(Ve)return;Ve=!0,x.setArrayObserverFactory((e=>new Ue(e)));const e=Array.prototype;if(e.$fastPatch)return;Reflect.defineProperty(e,"$fastPatch",{value:1,enumerable:!1});const t=e.pop,r=e.push,n=e.reverse,o=e.shift,s=e.sort,i=e.splice,a=e.unshift;e.pop=function(){const e=this.length>0,r=t.apply(this,arguments),n=this.$fastController;return void 0!==n&&e&&n.addSplice(Pe(this.length,[r],0)),r},e.push=function(){const e=r.apply(this,arguments),t=this.$fastController;return void 0!==t&&t.addSplice(Le(Pe(this.length-arguments.length,[],arguments.length),this)),e},e.reverse=function(){let e;const t=this.$fastController;void 0!==t&&(t.flush(),e=this.slice());const r=n.apply(this,arguments);return void 0!==t&&t.reset(e),r},e.shift=function(){const e=this.length>0,t=o.apply(this,arguments),r=this.$fastController;return void 0!==r&&e&&r.addSplice(Pe(0,[t],0)),t},e.sort=function(){let e;const t=this.$fastController;void 0!==t&&(t.flush(),e=this.slice());const r=s.apply(this,arguments);return void 0!==t&&t.reset(e),r},e.splice=function(){const e=i.apply(this,arguments),t=this.$fastController;return void 0!==t&&t.addSplice(Le(Pe(+arguments[0],e,arguments.length>2?arguments.length-2:0),this)),e},e.unshift=function(){const e=a.apply(this,arguments),t=this.$fastController;return void 0!==t&&t.addSplice(Le(Pe(0,[],arguments.length),this)),e}}(),this.isItemsBindingVolatile=x.isVolatileBinding(e),this.isTemplateBindingVolatile=x.isVolatileBinding(t)}createBehavior(e){return new We(e,this.itemsBinding,this.isItemsBindingVolatile,this.templateBinding,this.isTemplateBindingVolatile,this.options)}}function Ke(e,t,r=Be){return new qe(e,"function"==typeof t?t:()=>t,Object.assign(Object.assign({},Be),r))}
2
- /*! *****************************************************************************
3
- Copyright (c) Microsoft Corporation.
4
-
5
- Permission to use, copy, modify, and/or distribute this software for any
6
- purpose with or without fee is hereby granted.
7
-
8
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
9
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
10
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
11
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
12
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
13
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14
- PERFORMANCE OF THIS SOFTWARE.
15
- ***************************************************************************** */function Ye(e,t,r,n){var o,s=arguments.length,i=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(i=(s<3?o(i):s>3?o(t,r,i):o(t,r))||i);return s>3&&i&&Object.defineProperty(t,r,i),i}const Je=new Map;"metadata"in Reflect||(Reflect.metadata=function(e,t){return function(r){Reflect.defineMetadata(e,t,r)}},Reflect.defineMetadata=function(e,t,r){let n=Je.get(r);void 0===n&&Je.set(r,n=new Map),n.set(e,t)},Reflect.getOwnMetadata=function(e,t){const r=Je.get(t);if(void 0!==r)return r.get(e)});class Qe{constructor(e,t){this.container=e,this.key=t}instance(e){return this.registerResolver(0,e)}singleton(e){return this.registerResolver(1,e)}transient(e){return this.registerResolver(2,e)}callback(e){return this.registerResolver(3,e)}cachedCallback(e){return this.registerResolver(3,wt(e))}aliasTo(e){return this.registerResolver(5,e)}registerResolver(e,t){const{container:r,key:n}=this;return this.container=this.key=void 0,r.registerResolver(n,new lt(n,e,t))}}function Ze(e){const t=e.slice(),r=Object.keys(e),n=r.length;let o;for(let s=0;s<n;++s)o=r[s],xt(o)||(t[o]=e[o]);return t}const Xe=Object.freeze({none(e){throw Error(`${e.toString()} not registered, did you forget to add @singleton()?`)},singleton:e=>new lt(e,1,e),transient:e=>new lt(e,2,e)}),et=Object.freeze({default:Object.freeze({parentLocator:()=>null,responsibleForOwnerRequests:!1,defaultResolver:Xe.singleton})}),tt=new Map;function rt(e){return t=>Reflect.getOwnMetadata(e,t)}let nt=null;const ot=Object.freeze({createContainer:e=>new bt(null,Object.assign({},et.default,e)),findResponsibleContainer(e){const t=e.$$container$$;return t&&t.responsibleForOwnerRequests?t:ot.findParentContainer(e)},findParentContainer(e){const t=new CustomEvent(gt,{bubbles:!0,composed:!0,cancelable:!0,detail:{container:void 0}});return e.dispatchEvent(t),t.detail.container||ot.getOrCreateDOMContainer()},getOrCreateDOMContainer:(e,t)=>e?e.$$container$$||new bt(e,Object.assign({},et.default,t,{parentLocator:ot.findParentContainer})):nt||(nt=new bt(null,Object.assign({},et.default,t,{parentLocator:()=>null}))),getDesignParamtypes:rt("design:paramtypes"),getAnnotationParamtypes:rt("di:paramtypes"),getOrCreateAnnotationParamTypes(e){let t=this.getAnnotationParamtypes(e);return void 0===t&&Reflect.defineMetadata("di:paramtypes",t=[],e),t},getDependencies(e){let t=tt.get(e);if(void 0===t){const r=e.inject;if(void 0===r){const r=ot.getDesignParamtypes(e),n=ot.getAnnotationParamtypes(e);if(void 0===r)if(void 0===n){const r=Object.getPrototypeOf(e);t="function"==typeof r&&r!==Function.prototype?Ze(ot.getDependencies(r)):[]}else t=Ze(n);else if(void 0===n)t=Ze(r);else{t=Ze(r);let e,o=n.length;for(let r=0;r<o;++r)e=n[r],void 0!==e&&(t[r]=e);const s=Object.keys(n);let i;o=s.length;for(let e=0;e<o;++e)i=s[e],xt(i)||(t[i]=n[i])}}else t=Ze(r);tt.set(e,t)}return t},defineProperty(e,t,r,n=!1){const o=`$di_${t}`;Reflect.defineProperty(e,t,{get:function(){let e=this[o];if(void 0===e){const s=this instanceof HTMLElement?ot.findResponsibleContainer(this):ot.getOrCreateDOMContainer();if(e=s.get(r),this[o]=e,n&&this instanceof Ce){const n=this.$fastController,s=()=>{ot.findResponsibleContainer(this).get(r)!==this[o]&&(this[o]=e,n.notify(t))};n.subscribe({handleChange:s},"isConnected")}}return e}})},createInterface(e,t){const r="function"==typeof e?e:t,n="string"==typeof e?e:e&&"friendlyName"in e&&e.friendlyName||Ot,o="string"!=typeof e&&(e&&"respectConnection"in e&&e.respectConnection||!1),s=function(e,t,r){if(null==e||void 0!==new.target)throw new Error(`No registration for interface: '${s.friendlyName}'`);if(t)ot.defineProperty(e,t,s,o);else{ot.getOrCreateAnnotationParamTypes(e)[r]=s}};return s.$isInterface=!0,s.friendlyName=null==n?"(anonymous)":n,null!=r&&(s.register=function(e,t){return r(new Qe(e,null!=t?t:s))}),s.toString=function(){return`InterfaceSymbol<${s.friendlyName}>`},s},inject:(...e)=>function(t,r,n){if("number"==typeof n){const r=ot.getOrCreateAnnotationParamTypes(t),o=e[0];void 0!==o&&(r[n]=o)}else if(r)ot.defineProperty(t,r,e[0]);else{const r=n?ot.getOrCreateAnnotationParamTypes(n.value):ot.getOrCreateAnnotationParamTypes(t);let o;for(let t=0;t<e.length;++t)o=e[t],void 0!==o&&(r[t]=o)}},transient:e=>(e.register=function(t){return St.transient(e,e).register(t)},e.registerInRequestor=!1,e),singleton:(e,t=it)=>(e.register=function(t){return St.singleton(e,e).register(t)},e.registerInRequestor=t.scoped,e)}),st=ot.createInterface("Container");ot.inject;const it={scoped:!1},at=(ct=(e,t,r)=>r.has(e,!0)?r.get(e):void 0,function(e){const t=function(e,r,n){ot.inject(t)(e,r,n)};return t.$isResolver=!0,t.resolve=function(t,r){return ct(e,t,r)},t});var ct;class lt{constructor(e,t,r){this.key=e,this.strategy=t,this.state=r,this.resolving=!1}get $isResolver(){return!0}register(e){return e.registerResolver(this.key,this)}resolve(e,t){switch(this.strategy){case 0:return this.state;case 1:if(this.resolving)throw new Error(`Cyclic dependency found: ${this.state.name}`);return this.resolving=!0,this.state=e.getFactory(this.state).construct(t),this.strategy=0,this.resolving=!1,this.state;case 2:{const r=e.getFactory(this.state);if(null===r)throw new Error(`Resolver for ${String(this.key)} returned a null factory`);return r.construct(t)}case 3:return this.state(e,t,this);case 4:return this.state[0].resolve(e,t);case 5:return t.get(this.state);default:throw new Error(`Invalid resolver strategy specified: ${this.strategy}.`)}}getFactory(e){var t,r,n;switch(this.strategy){case 1:case 2:return e.getFactory(this.state);case 5:return null!==(n=null===(r=null===(t=e.getResolver(this.state))||void 0===t?void 0:t.getFactory)||void 0===r?void 0:r.call(t,e))&&void 0!==n?n:null;default:return null}}}function ut(e){return this.get(e)}function ht(e,t){return t(e)}class dt{constructor(e,t){this.Type=e,this.dependencies=t,this.transformers=null}construct(e,t){let r;return r=void 0===t?new this.Type(...this.dependencies.map(ut,e)):new this.Type(...this.dependencies.map(ut,e),...t),null==this.transformers?r:this.transformers.reduce(ht,r)}registerTransformer(e){(this.transformers||(this.transformers=[])).push(e)}}const ft={$isResolver:!0,resolve:(e,t)=>t};function pt(e){return"function"==typeof e.register}function mt(e){return function(e){return pt(e)&&"boolean"==typeof e.registerInRequestor}(e)&&e.registerInRequestor}const vt=new Set(["Array","ArrayBuffer","Boolean","DataView","Date","Error","EvalError","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Number","Object","Promise","RangeError","ReferenceError","RegExp","Set","SharedArrayBuffer","String","SyntaxError","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","URIError","WeakMap","WeakSet"]),gt="__DI_LOCATE_PARENT__",yt=new Map;class bt{constructor(e,t){this.owner=e,this.config=t,this._parent=void 0,this.registerDepth=0,this.context=null,null!==e&&(e.$$container$$=this),this.resolvers=new Map,this.resolvers.set(st,ft),e instanceof Node&&e.addEventListener(gt,(e=>{e.composedPath()[0]!==this.owner&&(e.detail.container=this,e.stopImmediatePropagation())}))}get parent(){return void 0===this._parent&&(this._parent=this.config.parentLocator(this.owner)),this._parent}get depth(){return null===this.parent?0:this.parent.depth+1}get responsibleForOwnerRequests(){return this.config.responsibleForOwnerRequests}registerWithContext(e,...t){return this.context=e,this.register(...t),this.context=null,this}register(...e){if(100==++this.registerDepth)throw new Error("Unable to autoregister dependency");let t,r,n,o,s;const i=this.context;for(let a=0,c=e.length;a<c;++a)if(t=e[a],Ct(t))if(pt(t))t.register(this,i);else if(void 0!==t.prototype)St.singleton(t,t).register(this);else for(r=Object.keys(t),o=0,s=r.length;o<s;++o)n=t[r[o]],Ct(n)&&(pt(n)?n.register(this,i):this.register(n));return--this.registerDepth,this}registerResolver(e,t){Et(e);const r=this.resolvers,n=r.get(e);return null==n?r.set(e,t):n instanceof lt&&4===n.strategy?n.state.push(t):r.set(e,new lt(e,4,[n,t])),t}registerTransformer(e,t){const r=this.getResolver(e);if(null==r)return!1;if(r.getFactory){const e=r.getFactory(this);return null!=e&&(e.registerTransformer(t),!0)}return!1}getResolver(e,t=!0){if(Et(e),void 0!==e.resolve)return e;let r,n=this;for(;null!=n;){if(r=n.resolvers.get(e),null!=r)return r;if(null==n.parent){const r=mt(e)?this:n;return t?this.jitRegister(e,r):null}n=n.parent}return null}has(e,t=!1){return!!this.resolvers.has(e)||!(!t||null==this.parent)&&this.parent.has(e,!0)}get(e){if(Et(e),e.$isResolver)return e.resolve(this,this);let t,r=this;for(;null!=r;){if(t=r.resolvers.get(e),null!=t)return t.resolve(r,this);if(null==r.parent){const n=mt(e)?this:r;return t=this.jitRegister(e,n),t.resolve(r,this)}r=r.parent}throw new Error(`Unable to resolve key: ${e}`)}getAll(e,t=!1){Et(e);const r=this;let n,o=r;if(t){let t=y;for(;null!=o;)n=o.resolvers.get(e),null!=n&&(t=t.concat($t(n,o,r))),o=o.parent;return t}for(;null!=o;){if(n=o.resolvers.get(e),null!=n)return $t(n,o,r);if(o=o.parent,null==o)return y}return y}getFactory(e){let t=yt.get(e);if(void 0===t){if(At(e))throw new Error(`${e.name} is a native function and therefore cannot be safely constructed by DI. If this is intentional, please use a callback or cachedCallback resolver.`);yt.set(e,t=new dt(e,ot.getDependencies(e)))}return t}registerFactory(e,t){yt.set(e,t)}createChild(e){return new bt(null,Object.assign({},this.config,e,{parentLocator:()=>this}))}jitRegister(e,t){if("function"!=typeof e)throw new Error(`Attempted to jitRegister something that is not a constructor: '${e}'. Did you forget to register this dependency?`);if(vt.has(e.name))throw new Error(`Attempted to jitRegister an intrinsic type: ${e.name}. Did you forget to add @inject(Key)`);if(pt(e)){const r=e.register(t);if(!(r instanceof Object)||null==r.resolve){const r=t.resolvers.get(e);if(null!=r)return r;throw new Error("A valid resolver was not returned from the static register method")}return r}if(e.$isInterface)throw new Error(`Attempted to jitRegister an interface: ${e.friendlyName}`);{const r=this.config.defaultResolver(e,t);return t.resolvers.set(e,r),r}}}const _t=new WeakMap;function wt(e){return function(t,r,n){if(_t.has(n))return _t.get(n);const o=e(t,r,n);return _t.set(n,o),o}}const St=Object.freeze({instance:(e,t)=>new lt(e,0,t),singleton:(e,t)=>new lt(e,1,t),transient:(e,t)=>new lt(e,2,t),callback:(e,t)=>new lt(e,3,t),cachedCallback:(e,t)=>new lt(e,3,wt(t)),aliasTo:(e,t)=>new lt(t,5,e)});function Et(e){if(null==e)throw new Error("key/value cannot be null or undefined. Are you trying to inject/register something that doesn't exist with DI?")}function $t(e,t,r){if(e instanceof lt&&4===e.strategy){const n=e.state;let o=n.length;const s=new Array(o);for(;o--;)s[o]=n[o].resolve(t,r);return s}return[e.resolve(t,r)]}const Ot="(anonymous)";function Ct(e){return"object"==typeof e&&null!==e||"function"==typeof e}const At=function(){const e=new WeakMap;let t=!1,r="",n=0;return function(o){return t=e.get(o),void 0===t&&(r=o.toString(),n=r.length,t=n>=29&&n<=100&&125===r.charCodeAt(n-1)&&r.charCodeAt(n-2)<=32&&93===r.charCodeAt(n-3)&&101===r.charCodeAt(n-4)&&100===r.charCodeAt(n-5)&&111===r.charCodeAt(n-6)&&99===r.charCodeAt(n-7)&&32===r.charCodeAt(n-8)&&101===r.charCodeAt(n-9)&&118===r.charCodeAt(n-10)&&105===r.charCodeAt(n-11)&&116===r.charCodeAt(n-12)&&97===r.charCodeAt(n-13)&&110===r.charCodeAt(n-14)&&88===r.charCodeAt(n-15),e.set(o,t)),t}}(),Tt={};function xt(e){switch(typeof e){case"number":return e>=0&&(0|e)===e;case"string":{const t=Tt[e];if(void 0!==t)return t;const r=e.length;if(0===r)return Tt[e]=!1;let n=0;for(let t=0;t<r;++t)if(n=e.charCodeAt(t),0===t&&48===n&&r>1||n<48||n>57)return Tt[e]=!1;return Tt[e]=!0}default:return!1}}function Pt(e){return`${e.toLowerCase()}:presentation`}const jt=new Map,Nt=Object.freeze({define(e,t,r){const n=Pt(e);void 0===jt.get(n)?jt.set(n,t):jt.set(n,!1),r.register(St.instance(n,t))},forTag(e,t){const r=Pt(e),n=jt.get(r);if(!1===n){return ot.findResponsibleContainer(t).get(r)}return n||null}});class Rt{constructor(e,t){this.template=e||null,this.styles=void 0===t?null:Array.isArray(t)?ae.create(t):t instanceof ae?t:ae.create([t])}applyTo(e){const t=e.$fastController;null===t.template&&(t.template=this.template),null===t.styles&&(t.styles=this.styles)}}class kt extends Ce{constructor(){super(...arguments),this._presentation=void 0}get $presentation(){return void 0===this._presentation&&(this._presentation=Nt.forTag(this.tagName,this)),this._presentation}templateChanged(){void 0!==this.template&&(this.$fastController.template=this.template)}stylesChanged(){void 0!==this.styles&&(this.$fastController.styles=this.styles)}connectedCallback(){null!==this.$presentation&&this.$presentation.applyTo(this),super.connectedCallback()}static compose(e){return(t={})=>new Mt(this===kt?class extends kt{}:this,e,t)}}function It(e,t,r){return"function"==typeof e?e(t,r):e}Ye([P],kt.prototype,"template",void 0),Ye([P],kt.prototype,"styles",void 0);class Mt{constructor(e,t,r){this.type=e,this.elementDefinition=t,this.overrideDefinition=r,this.definition=Object.assign(Object.assign({},this.elementDefinition),this.overrideDefinition)}register(e,t){const r=this.definition,n=this.overrideDefinition,o=`${r.prefix||t.elementPrefix}-${r.baseName}`;t.tryDefineElement({name:o,type:this.type,baseClass:this.elementDefinition.baseClass,callback:e=>{const t=new Rt(It(r.template,e,r),It(r.styles,e,r));e.definePresentation(t);let o=It(r.shadowOptions,e,r);e.shadowRootMode&&(o?n.shadowOptions||(o.mode=e.shadowRootMode):null!==o&&(o={mode:e.shadowRootMode})),e.defineElement({elementOptions:It(r.elementOptions,e,r),shadowOptions:o,attributes:It(r.attributes,e,r)})}})}}var Dt,Ft;function Vt(e){const t=e.parentElement;if(t)return t;{const t=e.getRootNode();if(t.host instanceof HTMLElement)return t.host}return null}!function(e){e.ltr="ltr",e.rtl="rtl"}(Dt||(Dt={})),function(e){e.Canvas="Canvas",e.CanvasText="CanvasText",e.LinkText="LinkText",e.VisitedText="VisitedText",e.ActiveText="ActiveText",e.ButtonFace="ButtonFace",e.ButtonText="ButtonText",e.Field="Field",e.FieldText="FieldText",e.Highlight="Highlight",e.HighlightText="HighlightText",e.GrayText="GrayText"}(Ft||(Ft={}));const Lt=document.createElement("div");class Ut{setProperty(e,t){C.queueUpdate((()=>this.target.setProperty(e,t)))}removeProperty(e){C.queueUpdate((()=>this.target.removeProperty(e)))}}class zt extends Ut{constructor(){super();const e=new CSSStyleSheet;this.target=e.cssRules[e.insertRule(":root{}")].style,document.adoptedStyleSheets=[...document.adoptedStyleSheets,e]}}class Bt extends Ut{constructor(){super(),this.style=document.createElement("style"),document.head.appendChild(this.style);const{sheet:e}=this.style;if(e){const t=e.insertRule(":root{}",e.cssRules.length);this.target=e.cssRules[t].style}}}class Gt{constructor(e){this.store=new Map,this.target=null;const t=e.$fastController;this.style=document.createElement("style"),t.addStyles(this.style),x.getNotifier(t).subscribe(this,"isConnected"),this.handleChange(t,"isConnected")}targetChanged(){if(null!==this.target)for(const[e,t]of this.store.entries())this.target.setProperty(e,t)}setProperty(e,t){this.store.set(e,t),C.queueUpdate((()=>{null!==this.target&&this.target.setProperty(e,t)}))}removeProperty(e){this.store.delete(e),C.queueUpdate((()=>{null!==this.target&&this.target.removeProperty(e)}))}handleChange(e,t){const{sheet:r}=this.style;if(r){const e=r.insertRule(":host{}",r.cssRules.length);this.target=r.cssRules[e].style}else this.target=null}}Ye([P],Gt.prototype,"target",void 0);class Ht{constructor(e){this.target=e.style}setProperty(e,t){C.queueUpdate((()=>this.target.setProperty(e,t)))}removeProperty(e){C.queueUpdate((()=>this.target.removeProperty(e)))}}class Wt{setProperty(e,t){Wt.properties[e]=t;for(const r of Wt.roots.values())Yt.getOrCreate(Wt.normalizeRoot(r)).setProperty(e,t)}removeProperty(e){delete Wt.properties[e];for(const t of Wt.roots.values())Yt.getOrCreate(Wt.normalizeRoot(t)).removeProperty(e)}static registerRoot(e){const{roots:t}=Wt;if(!t.has(e)){t.add(e);const r=Yt.getOrCreate(this.normalizeRoot(e));for(const e in Wt.properties)r.setProperty(e,Wt.properties[e])}}static unregisterRoot(e){const{roots:t}=Wt;if(t.has(e)){t.delete(e);const r=Yt.getOrCreate(Wt.normalizeRoot(e));for(const e in Wt.properties)r.removeProperty(e)}}static normalizeRoot(e){return e===Lt?document:e}}Wt.roots=new Set,Wt.properties={};const qt=new WeakMap,Kt=C.supportsAdoptedStyleSheets?class extends Ut{constructor(e){super();const t=new CSSStyleSheet;this.target=t.cssRules[t.insertRule(":host{}")].style,e.$fastController.addStyles(ae.create([t]))}}:Gt,Yt=Object.freeze({getOrCreate(e){if(qt.has(e))return qt.get(e);let t;return e===Lt?t=new Wt:e instanceof Document?t=C.supportsAdoptedStyleSheets?new zt:new Bt:t=e instanceof Ce?new Kt(e):new Ht(e),qt.set(e,t),t}});class Jt extends Te{constructor(e){super(),this.subscribers=new WeakMap,this._appliedTo=new Set,this.name=e.name,null!==e.cssCustomPropertyName&&(this.cssCustomProperty=`--${e.cssCustomPropertyName}`,this.cssVar=`var(${this.cssCustomProperty})`),this.id=Jt.uniqueId(),Jt.tokensById.set(this.id,this)}get appliedTo(){return[...this._appliedTo]}static from(e){return new Jt({name:"string"==typeof e?e:e.name,cssCustomPropertyName:"string"==typeof e?e:void 0===e.cssCustomPropertyName?e.name:e.cssCustomPropertyName})}static isCSSDesignToken(e){return"string"==typeof e.cssCustomProperty}static isDerivedDesignTokenValue(e){return"function"==typeof e}static getTokenById(e){return Jt.tokensById.get(e)}getOrCreateSubscriberSet(e=this){return this.subscribers.get(e)||this.subscribers.set(e,new Set)&&this.subscribers.get(e)}createCSS(){return this.cssVar||""}getValueFor(e){const t=tr.getOrCreate(e).get(this);if(void 0!==t)return t;throw new Error(`Value could not be retrieved for token named "${this.name}". Ensure the value is set for ${e} or an ancestor of ${e}.`)}setValueFor(e,t){return this._appliedTo.add(e),t instanceof Jt&&(t=this.alias(t)),tr.getOrCreate(e).set(this,t),this}deleteValueFor(e){return this._appliedTo.delete(e),tr.existsFor(e)&&tr.getOrCreate(e).delete(this),this}withDefault(e){return this.setValueFor(Lt,e),this}subscribe(e,t){const r=this.getOrCreateSubscriberSet(t);t&&!tr.existsFor(t)&&tr.getOrCreate(t),r.has(e)||r.add(e)}unsubscribe(e,t){const r=this.subscribers.get(t||this);r&&r.has(e)&&r.delete(e)}notify(e){const t=Object.freeze({token:this,target:e});this.subscribers.has(this)&&this.subscribers.get(this).forEach((e=>e.handleChange(t))),this.subscribers.has(e)&&this.subscribers.get(e).forEach((e=>e.handleChange(t)))}alias(e){return t=>e.getValueFor(t)}}Jt.uniqueId=(()=>{let e=0;return()=>(e++,e.toString(16))})(),Jt.tokensById=new Map;class Qt{constructor(e,t,r){this.source=e,this.token=t,this.node=r,this.dependencies=new Set,this.observer=x.binding(e,this,!1),this.observer.handleChange=this.observer.call,this.handleChange()}disconnect(){this.observer.disconnect()}handleChange(){this.node.store.set(this.token,this.observer.observe(this.node.target,k))}}class Zt{constructor(){this.values=new Map}set(e,t){this.values.get(e)!==t&&(this.values.set(e,t),x.getNotifier(this).notify(e.id))}get(e){return x.track(this,e.id),this.values.get(e)}delete(e){this.values.delete(e)}all(){return this.values.entries()}}const Xt=new WeakMap,er=new WeakMap;class tr{constructor(e){this.target=e,this.store=new Zt,this.children=[],this.assignedValues=new Map,this.reflecting=new Set,this.bindingObservers=new Map,this.tokenValueChangeHandler={handleChange:(e,t)=>{const r=Jt.getTokenById(t);if(r&&(r.notify(this.target),Jt.isCSSDesignToken(r))){const t=this.parent,n=this.isReflecting(r);if(t){const o=t.get(r),s=e.get(r);o===s||n?o===s&&n&&this.stopReflectToCSS(r):this.reflectToCSS(r)}else n||this.reflectToCSS(r)}}},Xt.set(e,this),x.getNotifier(this.store).subscribe(this.tokenValueChangeHandler),e instanceof Ce?e.$fastController.addBehaviors([this]):e.isConnected&&this.bind()}static getOrCreate(e){return Xt.get(e)||new tr(e)}static existsFor(e){return Xt.has(e)}static findParent(e){if(Lt!==e.target){let t=Vt(e.target);for(;null!==t;){if(Xt.has(t))return Xt.get(t);t=Vt(t)}return tr.getOrCreate(Lt)}return null}static findClosestAssignedNode(e,t){let r=t;do{if(r.has(e))return r;r=r.parent?r.parent:r.target!==Lt?tr.getOrCreate(Lt):null}while(null!==r);return null}get parent(){return er.get(this)||null}has(e){return this.assignedValues.has(e)}get(e){const t=this.store.get(e);if(void 0!==t)return t;const r=this.getRaw(e);return void 0!==r?(this.hydrate(e,r),this.get(e)):void 0}getRaw(e){var t;return this.assignedValues.has(e)?this.assignedValues.get(e):null===(t=tr.findClosestAssignedNode(e,this))||void 0===t?void 0:t.getRaw(e)}set(e,t){Jt.isDerivedDesignTokenValue(this.assignedValues.get(e))&&this.tearDownBindingObserver(e),this.assignedValues.set(e,t),Jt.isDerivedDesignTokenValue(t)?this.setupBindingObserver(e,t):this.store.set(e,t)}delete(e){this.assignedValues.delete(e),this.tearDownBindingObserver(e);const t=this.getRaw(e);t?this.hydrate(e,t):this.store.delete(e)}bind(){const e=tr.findParent(this);e&&e.appendChild(this);for(const e of this.assignedValues.keys())e.notify(this.target)}unbind(){if(this.parent){er.get(this).removeChild(this)}}appendChild(e){e.parent&&er.get(e).removeChild(e);const t=this.children.filter((t=>e.contains(t)));er.set(e,this),this.children.push(e),t.forEach((t=>e.appendChild(t))),x.getNotifier(this.store).subscribe(e);for(const[t,r]of this.store.all())e.hydrate(t,this.bindingObservers.has(t)?this.getRaw(t):r)}removeChild(e){const t=this.children.indexOf(e);return-1!==t&&this.children.splice(t,1),x.getNotifier(this.store).unsubscribe(e),e.parent===this&&er.delete(e)}contains(e){return function(e,t){let r=t;for(;null!==r;){if(r===e)return!0;r=Vt(r)}return!1}(this.target,e.target)}reflectToCSS(e){this.isReflecting(e)||(this.reflecting.add(e),tr.cssCustomPropertyReflector.startReflection(e,this.target))}stopReflectToCSS(e){this.isReflecting(e)&&(this.reflecting.delete(e),tr.cssCustomPropertyReflector.stopReflection(e,this.target))}isReflecting(e){return this.reflecting.has(e)}handleChange(e,t){const r=Jt.getTokenById(t);r&&this.hydrate(r,this.getRaw(r))}hydrate(e,t){if(!this.has(e)){const r=this.bindingObservers.get(e);Jt.isDerivedDesignTokenValue(t)?r?r.source!==t&&(this.tearDownBindingObserver(e),this.setupBindingObserver(e,t)):this.setupBindingObserver(e,t):(r&&this.tearDownBindingObserver(e),this.store.set(e,t))}}setupBindingObserver(e,t){const r=new Qt(t,e,this);return this.bindingObservers.set(e,r),r}tearDownBindingObserver(e){return!!this.bindingObservers.has(e)&&(this.bindingObservers.get(e).disconnect(),this.bindingObservers.delete(e),!0)}}tr.cssCustomPropertyReflector=new class{startReflection(e,t){e.subscribe(this,t),this.handleChange({token:e,target:t})}stopReflection(e,t){e.unsubscribe(this,t),this.remove(e,t)}handleChange(e){const{token:t,target:r}=e;this.add(t,r)}add(e,t){Yt.getOrCreate(t).setProperty(e.cssCustomProperty,this.resolveCSSValue(tr.getOrCreate(t).get(e)))}remove(e,t){Yt.getOrCreate(t).removeProperty(e.cssCustomProperty)}resolveCSSValue(e){return e&&"function"==typeof e.createCSS?e.createCSS():e}},Ye([P],tr.prototype,"children",void 0);const rr=Object.freeze({create:function(e){return Jt.from(e)},notifyConnection:e=>!(!e.isConnected||!tr.existsFor(e))&&(tr.getOrCreate(e).bind(),!0),notifyDisconnection:e=>!(e.isConnected||!tr.existsFor(e))&&(tr.getOrCreate(e).unbind(),!0),registerRoot(e=Lt){Wt.registerRoot(e)},unregisterRoot(e=Lt){Wt.unregisterRoot(e)}});class nr{constructor(e){this.listenerCache=new WeakMap,this.query=e}bind(e){const{query:t}=this,r=this.constructListener(e);r.bind(t)(),t.addListener(r),this.listenerCache.set(e,r)}unbind(e){const t=this.listenerCache.get(e);t&&(this.query.removeListener(t),this.listenerCache.delete(e))}}class or extends nr{constructor(e,t){super(e),this.styles=t}static with(e){return t=>new or(e,t)}constructListener(e){let t=!1;const r=this.styles;return function(){const{matches:n}=this;n&&!t?(e.$fastController.addStyles(r),t=n):!n&&t&&(e.$fastController.removeStyles(r),t=n)}}unbind(e){super.unbind(e),e.$fastController.removeStyles(this.styles)}}const sr=or.with(window.matchMedia("(forced-colors)"));or.with(window.matchMedia("(prefers-color-scheme: dark)")),or.with(window.matchMedia("(prefers-color-scheme: light)"));const ir=":host([hidden]){display:none}";const ar={};ar[ar.Fatal=0]="Fatal",ar[ar.Error=0]="Error",ar[ar.Warn=1]="Warn",ar[ar.Log=2]="Log",ar[ar.Info=3]="Info",ar[ar.Success=3]="Success",ar[ar.Debug=4]="Debug",ar[ar.Trace=5]="Trace",ar[ar.Silent=-1/0]="Silent",ar[ar.Verbose=1/0]="Verbose";var cr={silent:{level:-1},fatal:{level:ar.Fatal},error:{level:ar.Error},warn:{level:ar.Warn},log:{level:ar.Log},info:{level:ar.Info},success:{level:ar.Success},debug:{level:ar.Debug},trace:{level:ar.Trace},verbose:{level:ar.Trace},ready:{level:ar.Info},start:{level:ar.Info}};function lr(e){return t=e,"[object Object]"===Object.prototype.toString.call(t)&&(!(!e.message&&!e.args)&&!e.stack);var t}let ur=!1;const hr=[];class dr{constructor(e={}){this._reporters=e.reporters||[],this._types=e.types||cr,this.level=void 0!==e.level?e.level:3,this._defaults=e.defaults||{},this._async=void 0!==e.async?e.async:void 0,this._stdout=e.stdout,this._stderr=e.stderr,this._mockFn=e.mockFn,this._throttle=e.throttle||1e3,this._throttleMin=e.throttleMin||5;for(const e in this._types){const t={type:e,...this._types[e],...this._defaults};this[e]=this._wrapLogFn(t),this[e].raw=this._wrapLogFn(t,!0)}this._mockFn&&this.mockTypes(),this._lastLogSerialized=void 0,this._lastLog=void 0,this._lastLogTime=void 0,this._lastLogCount=0,this._throttleTimeout=void 0}get stdout(){return this._stdout||console._stdout}get stderr(){return this._stderr||console._stderr}create(e){return new dr(Object.assign({reporters:this._reporters,level:this.level,types:this._types,defaults:this._defaults,stdout:this._stdout,stderr:this._stderr,mockFn:this._mockFn},e))}withDefaults(e){return this.create({defaults:Object.assign({},this._defaults,e)})}withTag(e){return this.withDefaults({tag:this._defaults.tag?this._defaults.tag+":"+e:e})}addReporter(e){return this._reporters.push(e),this}removeReporter(e){if(e){const t=this._reporters.indexOf(e);if(t>=0)return this._reporters.splice(t,1)}else this._reporters.splice(0);return this}setReporters(e){return this._reporters=Array.isArray(e)?e:[e],this}wrapAll(){this.wrapConsole(),this.wrapStd()}restoreAll(){this.restoreConsole(),this.restoreStd()}wrapConsole(){for(const e in this._types)console["__"+e]||(console["__"+e]=console[e]),console[e]=this[e].raw}restoreConsole(){for(const e in this._types)console["__"+e]&&(console[e]=console["__"+e],delete console["__"+e])}wrapStd(){this._wrapStream(this.stdout,"log"),this._wrapStream(this.stderr,"log")}_wrapStream(e,t){e&&(e.__write||(e.__write=e.write),e.write=e=>{this[t].raw(String(e).trim())})}restoreStd(){this._restoreStream(this.stdout),this._restoreStream(this.stderr)}_restoreStream(e){e&&e.__write&&(e.write=e.__write,delete e.__write)}pauseLogs(){ur=!0}resumeLogs(){ur=!1;const e=hr.splice(0);for(const t of e)t[0]._logFn(t[1],t[2])}mockTypes(e){if(this._mockFn=e||this._mockFn,"function"==typeof this._mockFn)for(const e in this._types)this[e]=this._mockFn(e,this._types[e])||this[e],this[e].raw=this[e]}_wrapLogFn(e,t){return(...r)=>{if(!ur)return this._logFn(e,r,t);hr.push([this,e,r,t])}}_logFn(e,t,r){if(e.level>this.level)return!!this._async&&Promise.resolve(!1);const n=Object.assign({date:new Date,args:[]},e);!r&&1===t.length&&lr(t[0])?Object.assign(n,t[0]):n.args=Array.from(t),n.message&&(n.args.unshift(n.message),delete n.message),n.additional&&(Array.isArray(n.additional)||(n.additional=n.additional.split("\n")),n.args.push("\n"+n.additional.join("\n")),delete n.additional),n.type="string"==typeof n.type?n.type.toLowerCase():"",n.tag="string"==typeof n.tag?n.tag.toLowerCase():"";const o=(e=!1)=>{const t=this._lastLogCount-this._throttleMin;if(this._lastLog&&t>0){const e=[...this._lastLog.args];t>1&&e.push(`(repeated ${t} times)`),this._log({...this._lastLog,args:e}),this._lastLogCount=1}if(e){if(this._lastLog=n,this._async)return this._logAsync(n);this._log(n)}};clearTimeout(this._throttleTimeout);const s=this._lastLogTime?n.date-this._lastLogTime:0;if(this._lastLogTime=n.date,s<this._throttle)try{const e=JSON.stringify([n.type,n.tag,n.args]),t=this._lastLogSerialized===e;if(this._lastLogSerialized=e,t&&(this._lastLogCount++,this._lastLogCount>this._throttleMin))return void(this._throttleTimeout=setTimeout(o,this._throttle))}catch(e){}o(!0)}_log(e){for(const t of this._reporters)t.log(e,{async:!1,stdout:this.stdout,stderr:this.stderr})}_logAsync(e){return Promise.all(this._reporters.map((t=>t.log(e,{async:!0,stdout:this.stdout,stderr:this.stderr}))))}}dr.prototype.add=dr.prototype.addReporter,dr.prototype.remove=dr.prototype.removeReporter,dr.prototype.clear=dr.prototype.removeReporter,dr.prototype.withScope=dr.prototype.withTag,dr.prototype.mock=dr.prototype.mockTypes,dr.prototype.pause=dr.prototype.pauseLogs,dr.prototype.resume=dr.prototype.resumeLogs;class fr{constructor(e){this.options=Object.assign({},e),this.defaultColor="#7f8c8d",this.levelColorMap={0:"#c0392b",1:"#f39c12",3:"#00BCD4"},this.typeColorMap={success:"#2ecc71"}}log(e){const t=e.level<1?console.__error||console.error:1===e.level&&console.warn?console.__warn||console.warn:console.__log||console.log,r="log"!==e.type?e.type:"",n=e.tag?e.tag:"",o=`\n background: ${this.typeColorMap[e.type]||this.levelColorMap[e.level]||this.defaultColor};\n border-radius: 0.5em;\n color: white;\n font-weight: bold;\n padding: 2px 0.5em;\n `,s=`%c${[n,r].filter(Boolean).join(":")}`;"string"==typeof e.args[0]?t(`${s}%c ${e.args[0]}`,o,"",...e.args.slice(1)):t(s,o,...e.args)}}var pr="undefined"!=typeof window&&window.consola||function(){const e=new dr({reporters:[new fr]});return e.Consola=dr,e.LogLevel=ar,e.BrowserReporter=fr,e}();!function(){function e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function t(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function r(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach((function(t){n(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function i(e){return function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||a(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e,t){if(e){if("string"==typeof e)return c(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(e,t):void 0}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function l(e){if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(e=a(e))){var t=0,r=function(){};return{s:r,n:function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var n,o,s=!0,i=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return s=e.done,e},e:function(e){i=!0,o=e},f:function(){try{s||null==n.return||n.return()}finally{if(i)throw o}}}}var u={};u[u.Fatal=0]="Fatal",u[u.Error=0]="Error",u[u.Warn=1]="Warn",u[u.Log=2]="Log",u[u.Info=3]="Info",u[u.Success=3]="Success",u[u.Debug=4]="Debug",u[u.Trace=5]="Trace",u[u.Silent=-1/0]="Silent",u[u.Verbose=1/0]="Verbose";var h={silent:{level:-1},fatal:{level:u.Fatal},error:{level:u.Error},warn:{level:u.Warn},log:{level:u.Log},info:{level:u.Info},success:{level:u.Success},debug:{level:u.Debug},trace:{level:u.Trace},verbose:{level:u.Trace},ready:{level:u.Info},start:{level:u.Info}};function d(e){return t=e,!("[object Object]"!==Object.prototype.toString.call(t)||!e.message&&!e.args||e.stack);var t}var f=!1,p=[],m=function(){function t(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};for(var n in e(this,t),this._reporters=r.reporters||[],this._types=r.types||h,this.level=void 0!==r.level?r.level:3,this._defaults=r.defaults||{},this._async=void 0!==r.async?r.async:void 0,this._stdout=r.stdout,this._stderr=r.stderr,this._mockFn=r.mockFn,this._throttle=r.throttle||1e3,this._throttleMin=r.throttleMin||5,this._types){var o=s(s({type:n},this._types[n]),this._defaults);this[n]=this._wrapLogFn(o),this[n].raw=this._wrapLogFn(o,!0)}this._mockFn&&this.mockTypes(),this._lastLogSerialized=void 0,this._lastLog=void 0,this._lastLogTime=void 0,this._lastLogCount=0,this._throttleTimeout=void 0}return r(t,[{key:"create",value:function(e){return new t(Object.assign({reporters:this._reporters,level:this.level,types:this._types,defaults:this._defaults,stdout:this._stdout,stderr:this._stderr,mockFn:this._mockFn},e))}},{key:"withDefaults",value:function(e){return this.create({defaults:Object.assign({},this._defaults,e)})}},{key:"withTag",value:function(e){return this.withDefaults({tag:this._defaults.tag?this._defaults.tag+":"+e:e})}},{key:"addReporter",value:function(e){return this._reporters.push(e),this}},{key:"removeReporter",value:function(e){if(e){var t=this._reporters.indexOf(e);if(t>=0)return this._reporters.splice(t,1)}else this._reporters.splice(0);return this}},{key:"setReporters",value:function(e){return this._reporters=Array.isArray(e)?e:[e],this}},{key:"wrapAll",value:function(){this.wrapConsole(),this.wrapStd()}},{key:"restoreAll",value:function(){this.restoreConsole(),this.restoreStd()}},{key:"wrapConsole",value:function(){for(var e in this._types)console["__"+e]||(console["__"+e]=console[e]),console[e]=this[e].raw}},{key:"restoreConsole",value:function(){for(var e in this._types)console["__"+e]&&(console[e]=console["__"+e],delete console["__"+e])}},{key:"wrapStd",value:function(){this._wrapStream(this.stdout,"log"),this._wrapStream(this.stderr,"log")}},{key:"_wrapStream",value:function(e,t){var r=this;e&&(e.__write||(e.__write=e.write),e.write=function(e){r[t].raw(String(e).trim())})}},{key:"restoreStd",value:function(){this._restoreStream(this.stdout),this._restoreStream(this.stderr)}},{key:"_restoreStream",value:function(e){e&&e.__write&&(e.write=e.__write,delete e.__write)}},{key:"pauseLogs",value:function(){f=!0}},{key:"resumeLogs",value:function(){f=!1;var e,t=l(p.splice(0));try{for(t.s();!(e=t.n()).done;){var r=e.value;r[0]._logFn(r[1],r[2])}}catch(e){t.e(e)}finally{t.f()}}},{key:"mockTypes",value:function(e){if(this._mockFn=e||this._mockFn,"function"==typeof this._mockFn)for(var t in this._types)this[t]=this._mockFn(t,this._types[t])||this[t],this[t].raw=this[t]}},{key:"_wrapLogFn",value:function(e,t){var r=this;return function(){for(var n=arguments.length,o=new Array(n),s=0;s<n;s++)o[s]=arguments[s];if(!f)return r._logFn(e,o,t);p.push([r,e,o,t])}}},{key:"_logFn",value:function(e,t,r){var n=this;if(e.level>this.level)return!!this._async&&Promise.resolve(!1);var o=Object.assign({date:new Date,args:[]},e);!r&&1===t.length&&d(t[0])?Object.assign(o,t[0]):o.args=Array.from(t),o.message&&(o.args.unshift(o.message),delete o.message),o.additional&&(Array.isArray(o.additional)||(o.additional=o.additional.split("\n")),o.args.push("\n"+o.additional.join("\n")),delete o.additional),o.type="string"==typeof o.type?o.type.toLowerCase():"",o.tag="string"==typeof o.tag?o.tag.toLowerCase():"";var a=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=n._lastLogCount-n._throttleMin;if(n._lastLog&&t>0){var r=i(n._lastLog.args);t>1&&r.push("(repeated ".concat(t," times)")),n._log(s(s({},n._lastLog),{},{args:r})),n._lastLogCount=1}if(e){if(n._lastLog=o,n._async)return n._logAsync(o);n._log(o)}};clearTimeout(this._throttleTimeout);var c=this._lastLogTime?o.date-this._lastLogTime:0;if(this._lastLogTime=o.date,c<this._throttle)try{var l=JSON.stringify([o.type,o.tag,o.args]),u=this._lastLogSerialized===l;if(this._lastLogSerialized=l,u&&(this._lastLogCount++,this._lastLogCount>this._throttleMin))return void(this._throttleTimeout=setTimeout(a,this._throttle))}catch(e){}a(!0)}},{key:"_log",value:function(e){var t,r=l(this._reporters);try{for(r.s();!(t=r.n()).done;)t.value.log(e,{async:!1,stdout:this.stdout,stderr:this.stderr})}catch(e){r.e(e)}finally{r.f()}}},{key:"_logAsync",value:function(e){var t=this;return Promise.all(this._reporters.map((function(r){return r.log(e,{async:!0,stdout:t.stdout,stderr:t.stderr})})))}},{key:"stdout",get:function(){return this._stdout||console._stdout}},{key:"stderr",get:function(){return this._stderr||console._stderr}}]),t}();m.prototype.add=m.prototype.addReporter,m.prototype.remove=m.prototype.removeReporter,m.prototype.clear=m.prototype.removeReporter,m.prototype.withScope=m.prototype.withTag,m.prototype.mock=m.prototype.mockTypes,m.prototype.pause=m.prototype.pauseLogs,m.prototype.resume=m.prototype.resumeLogs;var v,g=function(){function t(r){e(this,t),this.options=Object.assign({},r),this.defaultColor="#7f8c8d",this.levelColorMap={0:"#c0392b",1:"#f39c12",3:"#00BCD4"},this.typeColorMap={success:"#2ecc71"}}return r(t,[{key:"log",value:function(e){var t=e.level<1?console.__error||console.error:1===e.level&&console.warn?console.__warn||console.warn:console.__log||console.log,r="log"!==e.type?e.type:"",n=e.tag?e.tag:"",o=this.typeColorMap[e.type]||this.levelColorMap[e.level]||this.defaultColor,s="\n background: ".concat(o,";\n border-radius: 0.5em;\n color: white;\n font-weight: bold;\n padding: 2px 0.5em;\n "),a="%c".concat([n,r].filter(Boolean).join(":"));"string"==typeof e.args[0]?t.apply(void 0,["".concat(a,"%c ").concat(e.args[0]),s,""].concat(i(e.args.slice(1)))):t.apply(void 0,[a,s].concat(i(e.args)))}}]),t}();"undefined"!=typeof window&&window.consola||((v=new m({reporters:[new g]})).Consola=m,v.LogLevel=u,v.BrowserReporter=g)}();const mr={level:4};function vr(e,t=mr){return pr.create(t).withTag(e)}const gr=vr("foundation-utils");class yr{constructor(){this.serialize=e=>JSON.stringify(e)}deserialize(e){return e&&e.ok?e.text().then((e=>JSON.parse(e))):(e&&e.data&&(e=e.data),JSON.parse(e))}}const br=ot.createInterface((e=>e.singleton(yr)));function _r(e,t,r){return isNaN(e)||e<=t?t:e>=r?r:e}function wr(e,t,r){return isNaN(e)||e<=t?0:e>=r?1:e/(r-t)}function Sr(e,t,r){return isNaN(e)?t:t+e*(r-t)}function Er(e){return e*(Math.PI/180)}function $r(e,t,r){return isNaN(e)||e<=0?t:e>=1?r:t+e*(r-t)}function Or(e,t,r){if(e<=0)return t%360;if(e>=1)return r%360;const n=(t-r+360)%360;return n<=(r-t+360)%360?(t-n*e+360)%360:(t+n*e+360)%360}function Cr(e,t){const r=Math.pow(10,t);return Math.round(e*r)/r}class Ar{constructor(e,t,r){this.h=e,this.s=t,this.l=r}static fromObject(e){return!e||isNaN(e.h)||isNaN(e.s)||isNaN(e.l)?null:new Ar(e.h,e.s,e.l)}equalValue(e){return this.h===e.h&&this.s===e.s&&this.l===e.l}roundToPrecision(e){return new Ar(Cr(this.h,e),Cr(this.s,e),Cr(this.l,e))}toObject(){return{h:this.h,s:this.s,l:this.l}}}class Tr{constructor(e,t,r){this.h=e,this.s=t,this.v=r}static fromObject(e){return!e||isNaN(e.h)||isNaN(e.s)||isNaN(e.v)?null:new Tr(e.h,e.s,e.v)}equalValue(e){return this.h===e.h&&this.s===e.s&&this.v===e.v}roundToPrecision(e){return new Tr(Cr(this.h,e),Cr(this.s,e),Cr(this.v,e))}toObject(){return{h:this.h,s:this.s,v:this.v}}}class xr{constructor(e,t,r){this.l=e,this.a=t,this.b=r}static fromObject(e){return!e||isNaN(e.l)||isNaN(e.a)||isNaN(e.b)?null:new xr(e.l,e.a,e.b)}equalValue(e){return this.l===e.l&&this.a===e.a&&this.b===e.b}roundToPrecision(e){return new xr(Cr(this.l,e),Cr(this.a,e),Cr(this.b,e))}toObject(){return{l:this.l,a:this.a,b:this.b}}}xr.epsilon=216/24389,xr.kappa=24389/27;class Pr{constructor(e,t,r){this.l=e,this.c=t,this.h=r}static fromObject(e){return!e||isNaN(e.l)||isNaN(e.c)||isNaN(e.h)?null:new Pr(e.l,e.c,e.h)}equalValue(e){return this.l===e.l&&this.c===e.c&&this.h===e.h}roundToPrecision(e){return new Pr(Cr(this.l,e),Cr(this.c,e),Cr(this.h,e))}toObject(){return{l:this.l,c:this.c,h:this.h}}}class jr{constructor(e,t,r,n){this.r=e,this.g=t,this.b=r,this.a="number"!=typeof n||isNaN(n)?1:n}static fromObject(e){return!e||isNaN(e.r)||isNaN(e.g)||isNaN(e.b)?null:new jr(e.r,e.g,e.b,e.a)}equalValue(e){return this.r===e.r&&this.g===e.g&&this.b===e.b&&this.a===e.a}toStringHexRGB(){return"#"+[this.r,this.g,this.b].map(this.formatHexValue).join("")}toStringHexRGBA(){return this.toStringHexRGB()+this.formatHexValue(this.a)}toStringHexARGB(){return"#"+[this.a,this.r,this.g,this.b].map(this.formatHexValue).join("")}toStringWebRGB(){return`rgb(${Math.round(Sr(this.r,0,255))},${Math.round(Sr(this.g,0,255))},${Math.round(Sr(this.b,0,255))})`}toStringWebRGBA(){return`rgba(${Math.round(Sr(this.r,0,255))},${Math.round(Sr(this.g,0,255))},${Math.round(Sr(this.b,0,255))},${_r(this.a,0,1)})`}roundToPrecision(e){return new jr(Cr(this.r,e),Cr(this.g,e),Cr(this.b,e),Cr(this.a,e))}clamp(){return new jr(_r(this.r,0,1),_r(this.g,0,1),_r(this.b,0,1),_r(this.a,0,1))}toObject(){return{r:this.r,g:this.g,b:this.b,a:this.a}}formatHexValue(e){return function(e){const t=Math.round(_r(e,0,255)).toString(16);return 1===t.length?"0"+t:t}(Sr(e,0,255))}}class Nr{constructor(e,t,r){this.x=e,this.y=t,this.z=r}static fromObject(e){return!e||isNaN(e.x)||isNaN(e.y)||isNaN(e.z)?null:new Nr(e.x,e.y,e.z)}equalValue(e){return this.x===e.x&&this.y===e.y&&this.z===e.z}roundToPrecision(e){return new Nr(Cr(this.x,e),Cr(this.y,e),Cr(this.z,e))}toObject(){return{x:this.x,y:this.y,z:this.z}}}function Rr(e){return.2126*e.r+.7152*e.g+.0722*e.b}function kr(e){function t(e){return e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)}return Rr(new jr(t(e.r),t(e.g),t(e.b),1))}Nr.whitePoint=new Nr(.95047,1,1.08883);const Ir=(e,t)=>(e+.05)/(t+.05);function Mr(e,t){const r=kr(e),n=kr(t);return r>n?Ir(r,n):Ir(n,r)}function Dr(e){const t=Math.max(e.r,e.g,e.b),r=Math.min(e.r,e.g,e.b),n=t-r;let o=0;0!==n&&(o=t===e.r?(e.g-e.b)/n%6*60:t===e.g?60*((e.b-e.r)/n+2):60*((e.r-e.g)/n+4)),o<0&&(o+=360);const s=(t+r)/2;let i=0;return 0!==n&&(i=n/(1-Math.abs(2*s-1))),new Ar(o,i,s)}function Fr(e,t=1){const r=(1-Math.abs(2*e.l-1))*e.s,n=r*(1-Math.abs(e.h/60%2-1)),o=e.l-r/2;let s=0,i=0,a=0;return e.h<60?(s=r,i=n,a=0):e.h<120?(s=n,i=r,a=0):e.h<180?(s=0,i=r,a=n):e.h<240?(s=0,i=n,a=r):e.h<300?(s=n,i=0,a=r):e.h<360&&(s=r,i=0,a=n),new jr(s+o,i+o,a+o,t)}function Vr(e){const t=Math.max(e.r,e.g,e.b),r=t-Math.min(e.r,e.g,e.b);let n=0;0!==r&&(n=t===e.r?(e.g-e.b)/r%6*60:t===e.g?60*((e.b-e.r)/r+2):60*((e.r-e.g)/r+4)),n<0&&(n+=360);let o=0;return 0!==t&&(o=r/t),new Tr(n,o,t)}function Lr(e){let t=0;(Math.abs(e.b)>.001||Math.abs(e.a)>.001)&&(t=function(e){return e*(180/Math.PI)}(Math.atan2(e.b,e.a))),t<0&&(t+=360);const r=Math.sqrt(e.a*e.a+e.b*e.b);return new Pr(e.l,r,t)}function Ur(e){function t(e){return e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}const r=t(e.r),n=t(e.g),o=t(e.b);return new Nr(.4124564*r+.3575761*n+.1804375*o,.2126729*r+.7151522*n+.072175*o,.0193339*r+.119192*n+.9503041*o)}function zr(e,t=1){function r(e){return e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055}const n=r(3.2404542*e.x-1.5371385*e.y-.4985314*e.z),o=r(-.969266*e.x+1.8760108*e.y+.041556*e.z),s=r(.0556434*e.x-.2040259*e.y+1.0572252*e.z);return new jr(n,o,s,t)}function Br(e){return function(e){function t(e){return e>xr.epsilon?Math.pow(e,1/3):(xr.kappa*e+16)/116}const r=t(e.x/Nr.whitePoint.x),n=t(e.y/Nr.whitePoint.y),o=t(e.z/Nr.whitePoint.z);return new xr(116*n-16,500*(r-n),200*(n-o))}(Ur(e))}function Gr(e,t=1){return zr(function(e){const t=(e.l+16)/116,r=t+e.a/500,n=t-e.b/200,o=Math.pow(r,3),s=Math.pow(t,3),i=Math.pow(n,3);let a=0;a=o>xr.epsilon?o:(116*r-16)/xr.kappa;let c=0;c=e.l>xr.epsilon*xr.kappa?s:e.l/xr.kappa;let l=0;return l=i>xr.epsilon?i:(116*n-16)/xr.kappa,a=Nr.whitePoint.x*a,c=Nr.whitePoint.y*c,l=Nr.whitePoint.z*l,new Nr(a,c,l)}(e),t)}function Hr(e){return Lr(Br(e))}function Wr(e,t=1){return Gr(function(e){let t=0,r=0;return 0!==e.h&&(t=Math.cos(Er(e.h))*e.c,r=Math.sin(Er(e.h))*e.c),new xr(e.l,t,r)}(e),t)}function qr(e,t,r=18){const n=Hr(e);let o=n.c+t*r;return o<0&&(o=0),Wr(new Pr(n.l,o,n.h))}function Kr(e,t){return e*t}function Yr(e,t){return new jr(Kr(e.r,t.r),Kr(e.g,t.g),Kr(e.b,t.b),1)}function Jr(e,t){return _r(e<.5?2*t*e:1-2*(1-t)*(1-e),0,1)}function Qr(e,t){return new jr(Jr(e.r,t.r),Jr(e.g,t.g),Jr(e.b,t.b),1)}var Zr,Xr;function en(e,t,r,n){if(isNaN(e)||e<=0)return r;if(e>=1)return n;switch(t){case Xr.HSL:return Fr(function(e,t,r){return isNaN(e)||e<=0?t:e>=1?r:new Ar(Or(e,t.h,r.h),$r(e,t.s,r.s),$r(e,t.l,r.l))}(e,Dr(r),Dr(n)));case Xr.HSV:return function(e,t=1){const r=e.s*e.v,n=r*(1-Math.abs(e.h/60%2-1)),o=e.v-r;let s=0,i=0,a=0;return e.h<60?(s=r,i=n,a=0):e.h<120?(s=n,i=r,a=0):e.h<180?(s=0,i=r,a=n):e.h<240?(s=0,i=n,a=r):e.h<300?(s=n,i=0,a=r):e.h<360&&(s=r,i=0,a=n),new jr(s+o,i+o,a+o,t)}(function(e,t,r){return isNaN(e)||e<=0?t:e>=1?r:new Tr(Or(e,t.h,r.h),$r(e,t.s,r.s),$r(e,t.v,r.v))}(e,Vr(r),Vr(n)));case Xr.XYZ:return zr(function(e,t,r){return isNaN(e)||e<=0?t:e>=1?r:new Nr($r(e,t.x,r.x),$r(e,t.y,r.y),$r(e,t.z,r.z))}(e,Ur(r),Ur(n)));case Xr.LAB:return Gr(function(e,t,r){return isNaN(e)||e<=0?t:e>=1?r:new xr($r(e,t.l,r.l),$r(e,t.a,r.a),$r(e,t.b,r.b))}(e,Br(r),Br(n)));case Xr.LCH:return Wr(function(e,t,r){return isNaN(e)||e<=0?t:e>=1?r:new Pr($r(e,t.l,r.l),$r(e,t.c,r.c),Or(e,t.h,r.h))}(e,Hr(r),Hr(n)));default:return function(e,t,r){return isNaN(e)||e<=0?t:e>=1?r:new jr($r(e,t.r,r.r),$r(e,t.g,r.g),$r(e,t.b,r.b),$r(e,t.a,r.a))}(e,r,n)}}!function(e){e[e.Burn=0]="Burn",e[e.Color=1]="Color",e[e.Darken=2]="Darken",e[e.Dodge=3]="Dodge",e[e.Lighten=4]="Lighten",e[e.Multiply=5]="Multiply",e[e.Overlay=6]="Overlay",e[e.Screen=7]="Screen"}(Zr||(Zr={})),function(e){e[e.RGB=0]="RGB",e[e.HSL=1]="HSL",e[e.HSV=2]="HSV",e[e.XYZ=3]="XYZ",e[e.LAB=4]="LAB",e[e.LCH=5]="LCH"}(Xr||(Xr={}));class tn{constructor(e){if(null==e||0===e.length)throw new Error("The stops argument must be non-empty");this.stops=this.sortColorScaleStops(e)}static createBalancedColorScale(e){if(null==e||0===e.length)throw new Error("The colors argument must be non-empty");const t=new Array(e.length);for(let r=0;r<e.length;r++)0===r?t[r]={color:e[r],position:0}:r===e.length-1?t[r]={color:e[r],position:1}:t[r]={color:e[r],position:r*(1/(e.length-1))};return new tn(t)}getColor(e,t=Xr.RGB){if(1===this.stops.length)return this.stops[0].color;if(e<=0)return this.stops[0].color;if(e>=1)return this.stops[this.stops.length-1].color;let r=0;for(let t=0;t<this.stops.length;t++)this.stops[t].position<=e&&(r=t);let n=r+1;n>=this.stops.length&&(n=this.stops.length-1);return en((e-this.stops[r].position)*(1/(this.stops[n].position-this.stops[r].position)),t,this.stops[r].color,this.stops[n].color)}trim(e,t,r=Xr.RGB){if(e<0||t>1||t<e)throw new Error("Invalid bounds");if(e===t)return new tn([{color:this.getColor(e,r),position:0}]);const n=[];for(let r=0;r<this.stops.length;r++)this.stops[r].position>=e&&this.stops[r].position<=t&&n.push(this.stops[r]);if(0===n.length)return new tn([{color:this.getColor(e),position:e},{color:this.getColor(t),position:t}]);n[0].position!==e&&n.unshift({color:this.getColor(e),position:e}),n[n.length-1].position!==t&&n.push({color:this.getColor(t),position:t});const o=t-e,s=new Array(n.length);for(let t=0;t<n.length;t++)s[t]={color:n[t].color,position:(n[t].position-e)/o};return new tn(s)}findNextColor(e,t,r=!1,n=Xr.RGB,o=.005,s=32){isNaN(e)||e<=0?e=0:e>=1&&(e=1);const i=this.getColor(e,n),a=r?0:1;if(Mr(i,this.getColor(a,n))<=t)return a;let c=r?0:e,l=r?e:0,u=a,h=0;for(;h<=s;){u=Math.abs(l-c)/2+c;const e=Mr(i,this.getColor(u,n));if(Math.abs(e-t)<=o)return u;e>t?r?c=u:l=u:r?l=u:c=u,h++}return u}clone(){const e=new Array(this.stops.length);for(let t=0;t<e.length;t++)e[t]={color:this.stops[t].color,position:this.stops[t].position};return new tn(e)}sortColorScaleStops(e){return e.sort(((e,t)=>{const r=e.position,n=t.position;return r<n?-1:r>n?1:0}))}}const rn=/^#((?:[0-9a-f]{6}|[0-9a-f]{3}))$/i;function nn(e){const t=rn.exec(e);if(null===t)return null;let r=t[1];if(3===r.length){const e=r.charAt(0),t=r.charAt(1),n=r.charAt(2);r=e.concat(e,t,t,n,n)}const n=parseInt(r,16);return isNaN(n)?null:new jr(wr((16711680&n)>>>16,0,255),wr((65280&n)>>>8,0,255),wr(255&n,0,255),1)}class on{constructor(e){this.config=Object.assign({},on.defaultPaletteConfig,e),this.palette=[],this.updatePaletteColors()}updatePaletteGenerationValues(e){let t=!1;for(const r in e)this.config[r]&&(this.config[r].equalValue?this.config[r].equalValue(e[r])||(this.config[r]=e[r],t=!0):e[r]!==this.config[r]&&(this.config[r]=e[r],t=!0));return t&&this.updatePaletteColors(),t}updatePaletteColors(){const e=this.generatePaletteColorScale();for(let t=0;t<this.config.steps;t++)this.palette[t]=e.getColor(t/(this.config.steps-1),this.config.interpolationMode)}generatePaletteColorScale(){const e=Dr(this.config.baseColor),t=new tn([{position:0,color:this.config.scaleColorLight},{position:.5,color:this.config.baseColor},{position:1,color:this.config.scaleColorDark}]).trim(this.config.clipLight,1-this.config.clipDark);let r=t.getColor(0),n=t.getColor(1);if(e.s>=this.config.saturationAdjustmentCutoff&&(r=qr(r,this.config.saturationLight),n=qr(n,this.config.saturationDark)),0!==this.config.multiplyLight){const e=Yr(this.config.baseColor,r);r=en(this.config.multiplyLight,this.config.interpolationMode,r,e)}if(0!==this.config.multiplyDark){const e=Yr(this.config.baseColor,n);n=en(this.config.multiplyDark,this.config.interpolationMode,n,e)}if(0!==this.config.overlayLight){const e=Qr(this.config.baseColor,r);r=en(this.config.overlayLight,this.config.interpolationMode,r,e)}if(0!==this.config.overlayDark){const e=Qr(this.config.baseColor,n);n=en(this.config.overlayDark,this.config.interpolationMode,n,e)}return this.config.baseScalePosition?this.config.baseScalePosition<=0?new tn([{position:0,color:this.config.baseColor},{position:1,color:n.clamp()}]):this.config.baseScalePosition>=1?new tn([{position:0,color:r.clamp()},{position:1,color:this.config.baseColor}]):new tn([{position:0,color:r.clamp()},{position:this.config.baseScalePosition,color:this.config.baseColor},{position:1,color:n.clamp()}]):new tn([{position:0,color:r.clamp()},{position:.5,color:this.config.baseColor},{position:1,color:n.clamp()}])}}on.defaultPaletteConfig={baseColor:nn("#808080"),steps:11,interpolationMode:Xr.RGB,scaleColorLight:new jr(1,1,1,1),scaleColorDark:new jr(0,0,0,1),clipLight:.185,clipDark:.16,saturationAdjustmentCutoff:.05,saturationLight:.35,saturationDark:1.25,overlayLight:0,overlayDark:.25,multiplyLight:0,multiplyDark:0,baseScalePosition:.5},on.greyscalePaletteConfig={baseColor:nn("#808080"),steps:11,interpolationMode:Xr.RGB,scaleColorLight:new jr(1,1,1,1),scaleColorDark:new jr(0,0,0,1),clipLight:0,clipDark:0,saturationAdjustmentCutoff:0,saturationLight:0,saturationDark:0,overlayLight:0,overlayDark:0,multiplyLight:0,multiplyDark:0,baseScalePosition:.5},on.defaultPaletteConfig.scaleColorLight,on.defaultPaletteConfig.scaleColorDark;class sn{constructor(e){this.palette=[],this.config=Object.assign({},sn.defaultPaletteConfig,e),this.regenPalettes()}regenPalettes(){let e=this.config.steps;(isNaN(e)||e<3)&&(e=3);const t=.14,r=new jr(t,t,t,1),n=new on(Object.assign(Object.assign({},on.greyscalePaletteConfig),{baseColor:r,baseScalePosition:86/94,steps:e})).palette,o=(Rr(this.config.baseColor)+Dr(this.config.baseColor).l)/2,s=this.matchRelativeLuminanceIndex(o,n)/(e-1),i=this.matchRelativeLuminanceIndex(t,n)/(e-1),a=Dr(this.config.baseColor),c=Fr(Ar.fromObject({h:a.h,s:a.s,l:t})),l=Fr(Ar.fromObject({h:a.h,s:a.s,l:.06})),u=new Array(5);u[0]={position:0,color:new jr(1,1,1,1)},u[1]={position:s,color:this.config.baseColor},u[2]={position:i,color:c},u[3]={position:.99,color:l},u[4]={position:1,color:new jr(0,0,0,1)};const h=new tn(u);this.palette=new Array(e);for(let t=0;t<e;t++){const r=h.getColor(t/(e-1),Xr.RGB);this.palette[t]=r}}matchRelativeLuminanceIndex(e,t){let r=Number.MAX_VALUE,n=0,o=0;const s=t.length;for(;o<s;o++){const s=Math.abs(Rr(t[o])-e);s<r&&(r=s,n=o)}return n}}function an(e,t){const r=e.relativeLuminance>t.relativeLuminance?e:t,n=e.relativeLuminance>t.relativeLuminance?t:e;return(r.relativeLuminance+.05)/(n.relativeLuminance+.05)}sn.defaultPaletteConfig={baseColor:nn("#808080"),steps:94};const cn=Object.freeze({create:(e,t,r)=>new ln(e,t,r),from:e=>new ln(e.r,e.g,e.b)});class ln extends jr{constructor(e,t,r){super(e,t,r,1),this.toColorString=this.toStringHexRGB,this.contrast=an.bind(null,this),this.createCSS=this.toColorString,this.relativeLuminance=kr(this)}static fromObject(e){return new ln(e.r,e.g,e.b)}}function un(e,t,r=0,n=e.length-1){if(n===r)return e[r];const o=Math.floor((n-r)/2)+r;return t(e[o])?un(e,t,r,o):un(e,t,o+1,n)}const hn=(-.1+Math.sqrt(.21))/2;function dn(e){return function(e){return e.relativeLuminance<=hn}(e)?-1:1}const fn=Object.freeze({create:function(e,t,r){return"number"==typeof e?fn.from(cn.create(e,t,r)):fn.from(e)},from:function(e){return function(e){const t={r:0,g:0,b:0,toColorString:()=>"",contrast:()=>0,relativeLuminance:0};for(const r in t)if(typeof t[r]!=typeof e[r])return!1;return!0}(e)?pn.from(e):pn.from(cn.create(e.r,e.g,e.b))}});class pn{constructor(e,t){this.closestIndexCache=new Map,this.source=e,this.swatches=t,this.reversedSwatches=Object.freeze([...this.swatches].reverse()),this.lastIndex=this.swatches.length-1}colorContrast(e,t,r,n){void 0===r&&(r=this.closestIndexOf(e));let o=this.swatches;const s=this.lastIndex;let i=r;void 0===n&&(n=dn(e));return-1===n&&(o=this.reversedSwatches,i=s-i),un(o,(r=>an(e,r)>=t),i,s)}get(e){return this.swatches[e]||this.swatches[_r(e,0,this.lastIndex)]}closestIndexOf(e){if(this.closestIndexCache.has(e.relativeLuminance))return this.closestIndexCache.get(e.relativeLuminance);let t=this.swatches.indexOf(e);if(-1!==t)return this.closestIndexCache.set(e.relativeLuminance,t),t;const r=this.swatches.reduce(((t,r)=>Math.abs(r.relativeLuminance-e.relativeLuminance)<Math.abs(t.relativeLuminance-e.relativeLuminance)?r:t));return t=this.swatches.indexOf(r),this.closestIndexCache.set(e.relativeLuminance,t),t}static from(e){return new pn(e,Object.freeze(new sn({baseColor:jr.fromObject(e)}).palette.map((e=>{const t=nn(e.toStringHexRGB());return cn.create(t.r,t.g,t.b)}))))}}const mn=cn.create(1,1,1),vn=cn.create(0,0,0),gn=cn.from(nn("#808080")),yn=cn.from(nn("#DA1A5F"));function bn(e){return cn.create(e,e,e)}function _n(e,t,r,n,o,s){return Math.max(e.closestIndexOf(bn(t))+r,n,o,s)}const{create:wn}=rr;function Sn(e){return rr.create({name:e,cssCustomPropertyName:null})}wn("body-font").withDefault('aktiv-grotesk, "Segoe UI", Arial, Helvetica, sans-serif');const En=wn("base-height-multiplier").withDefault(10);wn("base-horizontal-spacing-multiplier").withDefault(3);const $n=wn("base-layer-luminance").withDefault(.23),On=wn("control-corner-radius").withDefault(4),Cn=wn("density").withDefault(0),An=wn("design-unit").withDefault(4);wn("direction").withDefault(Dt.ltr),wn("disabled-opacity").withDefault(.3);const Tn=wn("stroke-width").withDefault(1);wn("focus-stroke-width").withDefault(2),wn("type-ramp-base-font-size").withDefault("14px"),wn("type-ramp-base-line-height").withDefault("20px"),wn("type-ramp-minus-1-font-size").withDefault("12px"),wn("type-ramp-minus-1-line-height").withDefault("16px"),wn("type-ramp-minus-2-font-size").withDefault("10px"),wn("type-ramp-minus-2-line-height").withDefault("16px"),wn("type-ramp-plus-1-font-size").withDefault("16px"),wn("type-ramp-plus-1-line-height").withDefault("24px"),wn("type-ramp-plus-2-font-size").withDefault("20px"),wn("type-ramp-plus-2-line-height").withDefault("28px"),wn("type-ramp-plus-3-font-size").withDefault("28px"),wn("type-ramp-plus-3-line-height").withDefault("36px"),wn("type-ramp-plus-4-font-size").withDefault("34px"),wn("type-ramp-plus-4-line-height").withDefault("44px"),wn("type-ramp-plus-5-font-size").withDefault("46px"),wn("type-ramp-plus-5-line-height").withDefault("56px"),wn("type-ramp-plus-6-font-size").withDefault("60px"),wn("type-ramp-plus-6-line-height").withDefault("72px"),Sn("accent-fill-rest-delta").withDefault(0);const xn=Sn("accent-fill-hover-delta").withDefault(4),Pn=Sn("accent-fill-active-delta").withDefault(-5),jn=Sn("accent-fill-focus-delta").withDefault(0),Nn=Sn("accent-foreground-rest-delta").withDefault(0),Rn=Sn("accent-foreground-hover-delta").withDefault(6),kn=Sn("accent-foreground-active-delta").withDefault(-4),In=Sn("accent-foreground-focus-delta").withDefault(0),Mn=Sn("neutral-fill-rest-delta").withDefault(7),Dn=Sn("neutral-fill-hover-delta").withDefault(10),Fn=Sn("neutral-fill-active-delta").withDefault(5),Vn=Sn("neutral-fill-focus-delta").withDefault(0),Ln=Sn("neutral-fill-input-rest-delta").withDefault(0),Un=Sn("neutral-fill-input-hover-delta").withDefault(0),zn=Sn("neutral-fill-input-active-delta").withDefault(0),Bn=Sn("neutral-fill-input-focus-delta").withDefault(0),Gn=Sn("neutral-fill-stealth-rest-delta").withDefault(0),Hn=Sn("neutral-fill-stealth-hover-delta").withDefault(5),Wn=Sn("neutral-fill-stealth-active-delta").withDefault(3),qn=Sn("neutral-fill-stealth-focus-delta").withDefault(0),Kn=Sn("neutral-fill-strong-rest-delta").withDefault(0),Yn=Sn("neutral-fill-strong-hover-delta").withDefault(8),Jn=Sn("neutral-fill-strong-active-delta").withDefault(-5),Qn=Sn("neutral-fill-strong-focus-delta").withDefault(0),Zn=Sn("neutral-fill-layer-rest-delta").withDefault(3),Xn=Sn("neutral-stroke-rest-delta").withDefault(25),eo=Sn("neutral-stroke-hover-delta").withDefault(40),to=Sn("neutral-stroke-active-delta").withDefault(16),ro=Sn("neutral-stroke-focus-delta").withDefault(25),no=Sn("neutral-stroke-divider-rest-delta").withDefault(8),oo=wn("neutral-color").withDefault(gn),so=Sn("neutral-palette").withDefault((e=>fn.from(oo.getValueFor(e)))),io=wn("accent-color").withDefault(yn),ao=Sn("accent-palette").withDefault((e=>fn.from(io.getValueFor(e)))),co=Sn("neutral-layer-card-container-recipe").withDefault({evaluate:e=>{return t=so.getValueFor(e),r=$n.getValueFor(e),n=Zn.getValueFor(e),t.get(t.closestIndexOf(bn(r))+n);var t,r,n}});wn("neutral-layer-card-container").withDefault((e=>co.getValueFor(e).evaluate(e)));const lo=Sn("neutral-layer-floating-recipe").withDefault({evaluate:e=>function(e,t,r){const n=e.closestIndexOf(bn(t))-r;return e.get(n-r)}(so.getValueFor(e),$n.getValueFor(e),Zn.getValueFor(e))});wn("neutral-layer-floating").withDefault((e=>lo.getValueFor(e).evaluate(e)));const uo=Sn("neutral-layer-1-recipe").withDefault({evaluate:e=>function(e,t){return e.get(e.closestIndexOf(bn(t)))}(so.getValueFor(e),$n.getValueFor(e))}),ho=wn("neutral-layer-1").withDefault((e=>uo.getValueFor(e).evaluate(e))),fo=Sn("neutral-layer-2-recipe").withDefault({evaluate:e=>{return t=so.getValueFor(e),r=$n.getValueFor(e),n=Zn.getValueFor(e),o=Mn.getValueFor(e),s=Dn.getValueFor(e),i=Fn.getValueFor(e),t.get(_n(t,r,n,o,s,i));var t,r,n,o,s,i}});wn("neutral-layer-2").withDefault((e=>fo.getValueFor(e).evaluate(e)));const po=Sn("neutral-layer-3-recipe").withDefault({evaluate:e=>{return t=so.getValueFor(e),r=$n.getValueFor(e),n=Zn.getValueFor(e),o=Mn.getValueFor(e),s=Dn.getValueFor(e),i=Fn.getValueFor(e),t.get(_n(t,r,n,o,s,i)+n);var t,r,n,o,s,i}});wn("neutral-layer-3").withDefault((e=>po.getValueFor(e).evaluate(e)));const mo=Sn("neutral-layer-4-recipe").withDefault({evaluate:e=>{return t=so.getValueFor(e),r=$n.getValueFor(e),n=Zn.getValueFor(e),o=Mn.getValueFor(e),s=Dn.getValueFor(e),i=Fn.getValueFor(e),t.get(_n(t,r,n,o,s,i)+2*n);var t,r,n,o,s,i}});wn("neutral-layer-4").withDefault((e=>mo.getValueFor(e).evaluate(e)));const vo=wn("fill-color").withDefault((e=>ho.getValueFor(e)));var go;!function(e){e[e.normal=4.5]="normal",e[e.large=7]="large"}(go||(go={}));const yo=wn({name:"accent-fill-recipe",cssCustomPropertyName:null}).withDefault({evaluate:(e,t)=>function(e,t,r,n,o,s,i,a,c){const l=e.source,u=t.closestIndexOf(r)>=Math.max(i,a,c)?-1:1,h=e.closestIndexOf(l),d=h+-1*u*n,f=d+u*o,p=d+u*s;return{rest:e.get(d),hover:e.get(h),active:e.get(f),focus:e.get(p)}}(ao.getValueFor(e),so.getValueFor(e),t||vo.getValueFor(e),xn.getValueFor(e),Pn.getValueFor(e),jn.getValueFor(e),Mn.getValueFor(e),Dn.getValueFor(e),Fn.getValueFor(e))}),bo=wn("accent-fill-rest").withDefault((e=>yo.getValueFor(e).evaluate(e).rest)),_o=wn("accent-fill-hover").withDefault((e=>yo.getValueFor(e).evaluate(e).hover)),wo=wn("accent-fill-active").withDefault((e=>yo.getValueFor(e).evaluate(e).active)),So=wn("accent-fill-focus").withDefault((e=>yo.getValueFor(e).evaluate(e).focus)),Eo=e=>(t,r)=>function(e,t){return e.contrast(mn)>=t?mn:vn}(r||bo.getValueFor(t),e),$o=Sn("foreground-on-accent-recipe").withDefault({evaluate:(e,t)=>Eo(go.normal)(e,t)});wn("foreground-on-accent-rest").withDefault((e=>$o.getValueFor(e).evaluate(e,bo.getValueFor(e)))),wn("foreground-on-accent-hover").withDefault((e=>$o.getValueFor(e).evaluate(e,_o.getValueFor(e)))),wn("foreground-on-accent-active").withDefault((e=>$o.getValueFor(e).evaluate(e,wo.getValueFor(e)))),wn("foreground-on-accent-focus").withDefault((e=>$o.getValueFor(e).evaluate(e,So.getValueFor(e))));const Oo=Sn("foreground-on-accent-large-recipe").withDefault({evaluate:(e,t)=>Eo(go.large)(e,t)});wn("foreground-on-accent-rest-large").withDefault((e=>Oo.getValueFor(e).evaluate(e,bo.getValueFor(e)))),wn("foreground-on-accent-hover-large").withDefault((e=>Oo.getValueFor(e).evaluate(e,_o.getValueFor(e)))),wn("foreground-on-accent-active-large").withDefault((e=>Oo.getValueFor(e).evaluate(e,wo.getValueFor(e)))),wn("foreground-on-accent-focus-large").withDefault((e=>Oo.getValueFor(e).evaluate(e,So.getValueFor(e))));const Co=e=>(t,r)=>function(e,t,r,n,o,s,i){const a=e.source,c=e.closestIndexOf(a),l=dn(t),u=c+(1===l?Math.min(n,o):Math.max(l*n,l*o)),h=e.colorContrast(t,r,u,l),d=e.closestIndexOf(h),f=d+l*Math.abs(n-o);let p,m;return(1===l?n<o:l*n>l*o)?(p=d,m=f):(p=f,m=d),{rest:e.get(p),hover:e.get(m),active:e.get(p+l*s),focus:e.get(p+l*i)}}(ao.getValueFor(t),r||vo.getValueFor(t),e,Nn.getValueFor(t),Rn.getValueFor(t),kn.getValueFor(t),In.getValueFor(t)),Ao=wn({name:"accent-foreground-recipe",cssCustomPropertyName:null}).withDefault({evaluate:(e,t)=>Co(go.normal)(e,t)});wn("accent-foreground-rest").withDefault((e=>Ao.getValueFor(e).evaluate(e).rest)),wn("accent-foreground-hover").withDefault((e=>Ao.getValueFor(e).evaluate(e).hover)),wn("accent-foreground-active").withDefault((e=>Ao.getValueFor(e).evaluate(e).active)),wn("accent-foreground-focus").withDefault((e=>Ao.getValueFor(e).evaluate(e).focus));const To=wn({name:"neutral-fill-recipe",cssCustomPropertyName:null}).withDefault({evaluate:(e,t)=>function(e,t,r,n,o,s){const i=e.closestIndexOf(t),a=i>=Math.max(r,n,o,s)?-1:1;return{rest:e.get(i+a*r),hover:e.get(i+a*n),active:e.get(i+a*o),focus:e.get(i+a*s)}}(so.getValueFor(e),t||vo.getValueFor(e),Mn.getValueFor(e),Dn.getValueFor(e),Fn.getValueFor(e),Vn.getValueFor(e))});wn("neutral-fill-rest").withDefault((e=>To.getValueFor(e).evaluate(e).rest)),wn("neutral-fill-hover").withDefault((e=>To.getValueFor(e).evaluate(e).hover)),wn("neutral-fill-active").withDefault((e=>To.getValueFor(e).evaluate(e).active)),wn("neutral-fill-focus").withDefault((e=>To.getValueFor(e).evaluate(e).focus));const xo=wn({name:"neutral-fill-input-recipe",cssCustomPropertyName:null}).withDefault({evaluate:(e,t)=>function(e,t,r,n,o,s){const i=dn(t),a=e.closestIndexOf(t);return{rest:e.get(a-i*r),hover:e.get(a-i*n),active:e.get(a-i*o),focus:e.get(a-i*s)}}(so.getValueFor(e),t||vo.getValueFor(e),Ln.getValueFor(e),Un.getValueFor(e),zn.getValueFor(e),Bn.getValueFor(e))});wn("neutral-fill-input-rest").withDefault((e=>xo.getValueFor(e).evaluate(e).rest)),wn("neutral-fill-input-hover").withDefault((e=>xo.getValueFor(e).evaluate(e).hover)),wn("neutral-fill-input-active").withDefault((e=>xo.getValueFor(e).evaluate(e).active)),wn("neutral-fill-input-focus").withDefault((e=>xo.getValueFor(e).evaluate(e).focus));const Po=wn({name:"neutral-fill-stealth-recipe",cssCustomPropertyName:null}).withDefault({evaluate:(e,t)=>function(e,t,r,n,o,s,i,a,c,l){const u=Math.max(r,n,o,s,i,a,c,l),h=e.closestIndexOf(t),d=h>=u?-1:1;return{rest:e.get(h+d*r),hover:e.get(h+d*n),active:e.get(h+d*o),focus:e.get(h+d*s)}}(so.getValueFor(e),t||vo.getValueFor(e),Gn.getValueFor(e),Hn.getValueFor(e),Wn.getValueFor(e),qn.getValueFor(e),Mn.getValueFor(e),Dn.getValueFor(e),Fn.getValueFor(e),Vn.getValueFor(e))});wn("neutral-fill-stealth-rest").withDefault((e=>Po.getValueFor(e).evaluate(e).rest)),wn("neutral-fill-stealth-hover").withDefault((e=>Po.getValueFor(e).evaluate(e).hover)),wn("neutral-fill-stealth-active").withDefault((e=>Po.getValueFor(e).evaluate(e).active)),wn("neutral-fill-stealth-focus").withDefault((e=>Po.getValueFor(e).evaluate(e).focus));const jo=wn({name:"neutral-fill-strong-recipe",cssCustomPropertyName:null}).withDefault({evaluate:(e,t)=>function(e,t,r,n,o,s){const i=dn(t),a=e.closestIndexOf(e.colorContrast(t,4.5)),c=a+i*Math.abs(r-n);let l,u;return(1===i?r<n:i*r>i*n)?(l=a,u=c):(l=c,u=a),{rest:e.get(l),hover:e.get(u),active:e.get(l+i*o),focus:e.get(l+i*s)}}(so.getValueFor(e),t||vo.getValueFor(e),Kn.getValueFor(e),Yn.getValueFor(e),Jn.getValueFor(e),Qn.getValueFor(e))});wn("neutral-fill-strong-rest").withDefault((e=>jo.getValueFor(e).evaluate(e).rest)),wn("neutral-fill-strong-hover").withDefault((e=>jo.getValueFor(e).evaluate(e).hover)),wn("neutral-fill-strong-active").withDefault((e=>jo.getValueFor(e).evaluate(e).active)),wn("neutral-fill-strong-focus").withDefault((e=>jo.getValueFor(e).evaluate(e).focus));const No=Sn("neutral-fill-layer-recipe").withDefault({evaluate:(e,t)=>function(e,t,r){const n=e.closestIndexOf(t);return e.get(n-(n<r?-1*r:r))}(so.getValueFor(e),t||vo.getValueFor(e),Zn.getValueFor(e))});wn("neutral-fill-layer-rest").withDefault((e=>No.getValueFor(e).evaluate(e)));const Ro=Sn("focus-stroke-outer-recipe").withDefault({evaluate:e=>{return t=so.getValueFor(e),r=vo.getValueFor(e),t.colorContrast(r,3.5);var t,r}}),ko=wn("focus-stroke-outer").withDefault((e=>Ro.getValueFor(e).evaluate(e))),Io=Sn("focus-stroke-inner-recipe").withDefault({evaluate:e=>{return t=ao.getValueFor(e),r=vo.getValueFor(e),n=ko.getValueFor(e),t.colorContrast(n,3.5,t.closestIndexOf(t.source),-1*dn(r));var t,r,n}});wn("focus-stroke-inner").withDefault((e=>Io.getValueFor(e).evaluate(e)));const Mo=Sn("neutral-foreground-hint-recipe").withDefault({evaluate:e=>{return t=so.getValueFor(e),r=vo.getValueFor(e),t.colorContrast(r,4.5);var t,r}});wn("neutral-foreground-hint").withDefault((e=>Mo.getValueFor(e).evaluate(e)));const Do=Sn("neutral-foreground-recipe").withDefault({evaluate:e=>{return t=so.getValueFor(e),r=vo.getValueFor(e),t.colorContrast(r,14);var t,r}});wn("neutral-foreground-rest").withDefault((e=>Do.getValueFor(e).evaluate(e)));const Fo=wn({name:"neutral-stroke-recipe",cssCustomPropertyName:null}).withDefault({evaluate:e=>function(e,t,r,n,o,s){const i=e.closestIndexOf(t),a=dn(t),c=i+a*r,l=c+a*(n-r),u=c+a*(o-r),h=c+a*(s-r);return{rest:e.get(c),hover:e.get(l),active:e.get(u),focus:e.get(h)}}(so.getValueFor(e),vo.getValueFor(e),Xn.getValueFor(e),eo.getValueFor(e),to.getValueFor(e),ro.getValueFor(e))});wn("neutral-stroke-rest").withDefault((e=>Fo.getValueFor(e).evaluate(e).rest)),wn("neutral-stroke-hover").withDefault((e=>Fo.getValueFor(e).evaluate(e).hover)),wn("neutral-stroke-active").withDefault((e=>Fo.getValueFor(e).evaluate(e).active)),wn("neutral-stroke-focus").withDefault((e=>Fo.getValueFor(e).evaluate(e).focus));const Vo=Sn("neutral-stroke-divider-recipe").withDefault({evaluate:(e,t)=>function(e,t,r){return e.get(e.closestIndexOf(t)+dn(t)*r)}(so.getValueFor(e),t||vo.getValueFor(e),no.getValueFor(e))});var Lo;wn("neutral-stroke-divider-rest").withDefault((e=>Vo.getValueFor(e).evaluate(e))),rr.create({name:"height-number",cssCustomPropertyName:null}).withDefault((e=>(En.getValueFor(e)+Cn.getValueFor(e))*An.getValueFor(e)));var Uo=new Uint8Array(16);function zo(){if(!Lo&&!(Lo="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Lo(Uo)}var Bo=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;for(var Go=[],Ho=0;Ho<256;++Ho)Go.push((Ho+256).toString(16).substr(1));function Wo(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=(Go[e[t+0]]+Go[e[t+1]]+Go[e[t+2]]+Go[e[t+3]]+"-"+Go[e[t+4]]+Go[e[t+5]]+"-"+Go[e[t+6]]+Go[e[t+7]]+"-"+Go[e[t+8]]+Go[e[t+9]]+"-"+Go[e[t+10]]+Go[e[t+11]]+Go[e[t+12]]+Go[e[t+13]]+Go[e[t+14]]+Go[e[t+15]]).toLowerCase();if(!function(e){return"string"==typeof e&&Bo.test(e)}(r))throw TypeError("Stringified UUID is invalid");return r}function qo(e,t,r){var n=(e=e||{}).random||(e.rng||zo)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){r=r||0;for(var o=0;o<16;++o)t[r+o]=n[o];return t}return Wo(n)}class Ko{constructor(){}createId(e=!1){const t=qo();return e&&gr.debug(`UUID.createID ${t}`),t}createRemoteId(e=!1){return s(this,void 0,void 0,(function*(){const t=qo();return e&&gr.debug(`UUID.createRemoteID ${t}`),t}))}}const Yo=ot.createInterface((e=>e.singleton(Ko))),Jo=vr("foundation-comms"),Qo=new RegExp(/wss?:\/\/[-a-zA-Z0-9@:%._\+~#=]{1,256}\b([-a-zA-Z0-9()@:%_\+.~#?&\/=]*)\b\/*$/,"i");class Zo{constructor(){this.cachedMetadata=new Map}getMetadataFor(e){return this.cachedMetadata.get(e)}hasMetadataFor(e){return this.cachedMetadata.has(e)}setMetadataFor(e,t){this.cachedMetadata.set(e,t)}}n([P],Zo.prototype,"cachedMetadata",void 0);const Xo=ot.createInterface((e=>e.singleton(Zo)));function es(e){return"function"==typeof e}function ts(e){var t=e((function(e){Error.call(e),e.stack=(new Error).stack}));return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}var rs=ts((function(e){return function(t){e(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map((function(e,t){return t+1+") "+e.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=t}}));function ns(e,t){if(e){var r=e.indexOf(t);0<=r&&e.splice(r,1)}}var os=function(){function e(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}var t;return e.prototype.unsubscribe=function(){var e,t,r,n,o;if(!this.closed){this.closed=!0;var s=this._parentage;if(s)if(this._parentage=null,Array.isArray(s))try{for(var i=a(s),u=i.next();!u.done;u=i.next()){u.value.remove(this)}}catch(t){e={error:t}}finally{try{u&&!u.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}else s.remove(this);var h=this.initialTeardown;if(es(h))try{h()}catch(e){o=e instanceof rs?e.errors:[e]}var d=this._finalizers;if(d){this._finalizers=null;try{for(var f=a(d),p=f.next();!p.done;p=f.next()){var m=p.value;try{as(m)}catch(e){o=null!=o?o:[],e instanceof rs?o=l(l([],c(o)),c(e.errors)):o.push(e)}}}catch(e){r={error:e}}finally{try{p&&!p.done&&(n=f.return)&&n.call(f)}finally{if(r)throw r.error}}}if(o)throw new rs(o)}},e.prototype.add=function(t){var r;if(t&&t!==this)if(this.closed)as(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=null!==(r=this._finalizers)&&void 0!==r?r:[]).push(t)}},e.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},e.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},e.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&ns(t,e)},e.prototype.remove=function(t){var r=this._finalizers;r&&ns(r,t),t instanceof e&&t._removeParent(this)},e.EMPTY=((t=new e).closed=!0,t),e}(),ss=os.EMPTY;function is(e){return e instanceof os||e&&"closed"in e&&es(e.remove)&&es(e.add)&&es(e.unsubscribe)}function as(e){es(e)?e():e.unsubscribe()}var cs={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},ls={setTimeout:function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var o=ls.delegate;return(null==o?void 0:o.setTimeout)?o.setTimeout.apply(o,l([e,t],c(r))):setTimeout.apply(void 0,l([e,t],c(r)))},clearTimeout:function(e){var t=ls.delegate;return((null==t?void 0:t.clearTimeout)||clearTimeout)(e)},delegate:void 0};function us(e){ls.setTimeout((function(){throw e}))}function hs(){}var ds=fs("C",void 0,void 0);function fs(e,t,r){return{kind:e,value:t,error:r}}var ps=null;function ms(e){if(cs.useDeprecatedSynchronousErrorHandling){var t=!ps;if(t&&(ps={errorThrown:!1,error:null}),e(),t){var r=ps,n=r.errorThrown,o=r.error;if(ps=null,n)throw o}}else e()}var vs=function(e){function r(t){var r=e.call(this)||this;return r.isStopped=!1,t?(r.destination=t,is(t)&&t.add(r)):r.destination=Es,r}return t(r,e),r.create=function(e,t,r){return new _s(e,t,r)},r.prototype.next=function(e){this.isStopped?Ss(function(e){return fs("N",e,void 0)}(e),this):this._next(e)},r.prototype.error=function(e){this.isStopped?Ss(function(e){return fs("E",void 0,e)}(e),this):(this.isStopped=!0,this._error(e))},r.prototype.complete=function(){this.isStopped?Ss(ds,this):(this.isStopped=!0,this._complete())},r.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},r.prototype._next=function(e){this.destination.next(e)},r.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},r.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},r}(os),gs=Function.prototype.bind;function ys(e,t){return gs.call(e,t)}var bs=function(){function e(e){this.partialObserver=e}return e.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(e){ws(e)}},e.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){ws(e)}else ws(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){ws(e)}},e}(),_s=function(e){function r(t,r,n){var o,s,i=e.call(this)||this;es(t)||!t?o={next:null!=t?t:void 0,error:null!=r?r:void 0,complete:null!=n?n:void 0}:i&&cs.useDeprecatedNextContext?((s=Object.create(t)).unsubscribe=function(){return i.unsubscribe()},o={next:t.next&&ys(t.next,s),error:t.error&&ys(t.error,s),complete:t.complete&&ys(t.complete,s)}):o=t;return i.destination=new bs(o),i}return t(r,e),r}(vs);function ws(e){us(e)}function Ss(e,t){var r=cs.onStoppedNotification;r&&ls.setTimeout((function(){return r(e,t)}))}var Es={closed:!0,next:hs,error:function(e){throw e},complete:hs},$s="function"==typeof Symbol&&Symbol.observable||"@@observable";function Os(e){return e}var Cs=function(){function e(e){e&&(this._subscribe=e)}return e.prototype.lift=function(t){var r=new e;return r.source=this,r.operator=t,r},e.prototype.subscribe=function(e,t,r){var n,o=this,s=(n=e)&&n instanceof vs||function(e){return e&&es(e.next)&&es(e.error)&&es(e.complete)}(n)&&is(n)?e:new _s(e,t,r);return ms((function(){var e=o,t=e.operator,r=e.source;s.add(t?t.call(s,r):r?o._subscribe(s):o._trySubscribe(s))})),s},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},e.prototype.forEach=function(e,t){var r=this;return new(t=As(t))((function(t,n){var o=new _s({next:function(t){try{e(t)}catch(e){n(e),o.unsubscribe()}},error:n,complete:t});r.subscribe(o)}))},e.prototype._subscribe=function(e){var t;return null===(t=this.source)||void 0===t?void 0:t.subscribe(e)},e.prototype[$s]=function(){return this},e.prototype.pipe=function(){for(var e,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return(0===(e=t).length?Os:1===e.length?e[0]:function(t){return e.reduce((function(e,t){return t(e)}),t)})(this)},e.prototype.toPromise=function(e){var t=this;return new(e=As(e))((function(e,r){var n;t.subscribe((function(e){return n=e}),(function(e){return r(e)}),(function(){return e(n)}))}))},e.create=function(t){return new e(t)},e}();function As(e){var t;return null!==(t=null!=e?e:cs.Promise)&&void 0!==t?t:Promise}function Ts(e){return function(t){if(function(e){return es(null==e?void 0:e.lift)}(t))return t.lift((function(t){try{return e(t,this)}catch(e){this.error(e)}}));throw new TypeError("Unable to lift unknown Observable type")}}function xs(e,t,r,n,o){return new Ps(e,t,r,n,o)}var Ps=function(e){function r(t,r,n,o,s,i){var a=e.call(this,t)||this;return a.onFinalize=s,a.shouldUnsubscribe=i,a._next=r?function(e){try{r(e)}catch(e){t.error(e)}}:e.prototype._next,a._error=o?function(e){try{o(e)}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._error,a._complete=n?function(){try{n()}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._complete,a}return t(r,e),r.prototype.unsubscribe=function(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;e.prototype.unsubscribe.call(this),!r&&(null===(t=this.onFinalize)||void 0===t||t.call(this))}},r}(vs),js=ts((function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})),Ns=function(e){function r(){var t=e.call(this)||this;return t.closed=!1,t.currentObservers=null,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return t(r,e),r.prototype.lift=function(e){var t=new Rs(this,this);return t.operator=e,t},r.prototype._throwIfClosed=function(){if(this.closed)throw new js},r.prototype.next=function(e){var t=this;ms((function(){var r,n;if(t._throwIfClosed(),!t.isStopped){t.currentObservers||(t.currentObservers=Array.from(t.observers));try{for(var o=a(t.currentObservers),s=o.next();!s.done;s=o.next()){s.value.next(e)}}catch(e){r={error:e}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}}}))},r.prototype.error=function(e){var t=this;ms((function(){if(t._throwIfClosed(),!t.isStopped){t.hasError=t.isStopped=!0,t.thrownError=e;for(var r=t.observers;r.length;)r.shift().error(e)}}))},r.prototype.complete=function(){var e=this;ms((function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var t=e.observers;t.length;)t.shift().complete()}}))},r.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(r.prototype,"observed",{get:function(){var e;return(null===(e=this.observers)||void 0===e?void 0:e.length)>0},enumerable:!1,configurable:!0}),r.prototype._trySubscribe=function(t){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,t)},r.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},r.prototype._innerSubscribe=function(e){var t=this,r=this,n=r.hasError,o=r.isStopped,s=r.observers;return n||o?ss:(this.currentObservers=null,s.push(e),new os((function(){t.currentObservers=null,ns(s,e)})))},r.prototype._checkFinalizedStatuses=function(e){var t=this,r=t.hasError,n=t.thrownError,o=t.isStopped;r?e.error(n):o&&e.complete()},r.prototype.asObservable=function(){var e=new Cs;return e.source=this,e},r.create=function(e,t){return new Rs(e,t)},r}(Cs),Rs=function(e){function r(t,r){var n=e.call(this)||this;return n.destination=t,n.source=r,n}return t(r,e),r.prototype.next=function(e){var t,r;null===(r=null===(t=this.destination)||void 0===t?void 0:t.next)||void 0===r||r.call(t,e)},r.prototype.error=function(e){var t,r;null===(r=null===(t=this.destination)||void 0===t?void 0:t.error)||void 0===r||r.call(t,e)},r.prototype.complete=function(){var e,t;null===(t=null===(e=this.destination)||void 0===e?void 0:e.complete)||void 0===t||t.call(e)},r.prototype._subscribe=function(e){var t,r;return null!==(r=null===(t=this.source)||void 0===t?void 0:t.subscribe(e))&&void 0!==r?r:ss},r}(Ns),ks=function(e){function r(t){var r=e.call(this)||this;return r._value=t,r}return t(r,e),Object.defineProperty(r.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),r.prototype._subscribe=function(t){var r=e.prototype._subscribe.call(this,t);return!r.closed&&t.next(this._value),r},r.prototype.getValue=function(){var e=this,t=e.hasError,r=e.thrownError,n=e._value;if(t)throw r;return this._throwIfClosed(),n},r.prototype.next=function(t){e.prototype.next.call(this,this._value=t)},r}(Ns),Is={now:function(){return(Is.delegate||Date).now()},delegate:void 0},Ms=function(e){function r(t,r,n){void 0===t&&(t=1/0),void 0===r&&(r=1/0),void 0===n&&(n=Is);var o=e.call(this)||this;return o._bufferSize=t,o._windowTime=r,o._timestampProvider=n,o._buffer=[],o._infiniteTimeWindow=!0,o._infiniteTimeWindow=r===1/0,o._bufferSize=Math.max(1,t),o._windowTime=Math.max(1,r),o}return t(r,e),r.prototype.next=function(t){var r=this,n=r.isStopped,o=r._buffer,s=r._infiniteTimeWindow,i=r._timestampProvider,a=r._windowTime;n||(o.push(t),!s&&o.push(i.now()+a)),this._trimBuffer(),e.prototype.next.call(this,t)},r.prototype._subscribe=function(e){this._throwIfClosed(),this._trimBuffer();for(var t=this._innerSubscribe(e),r=this._infiniteTimeWindow,n=this._buffer.slice(),o=0;o<n.length&&!e.closed;o+=r?1:2)e.next(n[o]);return this._checkFinalizedStatuses(e),t},r.prototype._trimBuffer=function(){var e=this,t=e._bufferSize,r=e._timestampProvider,n=e._buffer,o=e._infiniteTimeWindow,s=(o?1:2)*t;if(t<1/0&&s<n.length&&n.splice(0,n.length-s),!o){for(var i=r.now(),a=0,c=1;c<n.length&&n[c]<=i;c+=2)a=c;a&&n.splice(0,a+1)}},r}(Ns),Ds=function(e){function r(t,r){return e.call(this)||this}return t(r,e),r.prototype.schedule=function(e,t){return this},r}(os),Fs={setInterval:function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var o=Fs.delegate;return(null==o?void 0:o.setInterval)?o.setInterval.apply(o,l([e,t],c(r))):setInterval.apply(void 0,l([e,t],c(r)))},clearInterval:function(e){var t=Fs.delegate;return((null==t?void 0:t.clearInterval)||clearInterval)(e)},delegate:void 0},Vs=function(e){function r(t,r){var n=e.call(this,t,r)||this;return n.scheduler=t,n.work=r,n.pending=!1,n}return t(r,e),r.prototype.schedule=function(e,t){var r;if(void 0===t&&(t=0),this.closed)return this;this.state=e;var n=this.id,o=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(o,n,t)),this.pending=!0,this.delay=t,this.id=null!==(r=this.id)&&void 0!==r?r:this.requestAsyncId(o,this.id,t),this},r.prototype.requestAsyncId=function(e,t,r){return void 0===r&&(r=0),Fs.setInterval(e.flush.bind(e,this),r)},r.prototype.recycleAsyncId=function(e,t,r){if(void 0===r&&(r=0),null!=r&&this.delay===r&&!1===this.pending)return t;null!=t&&Fs.clearInterval(t)},r.prototype.execute=function(e,t){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var r=this._execute(e,t);if(r)return r;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},r.prototype._execute=function(e,t){var r,n=!1;try{this.work(e)}catch(e){n=!0,r=e||new Error("Scheduled action threw falsy error")}if(n)return this.unsubscribe(),r},r.prototype.unsubscribe=function(){if(!this.closed){var t=this.id,r=this.scheduler,n=r.actions;this.work=this.state=this.scheduler=null,this.pending=!1,ns(n,this),null!=t&&(this.id=this.recycleAsyncId(r,t,null)),this.delay=null,e.prototype.unsubscribe.call(this)}},r}(Ds),Ls=function(){function e(t,r){void 0===r&&(r=e.now),this.schedulerActionCtor=t,this.now=r}return e.prototype.schedule=function(e,t,r){return void 0===t&&(t=0),new this.schedulerActionCtor(this,e).schedule(r,t)},e.now=Is.now,e}(),Us=function(e){function r(t,r){void 0===r&&(r=Ls.now);var n=e.call(this,t,r)||this;return n.actions=[],n._active=!1,n}return t(r,e),r.prototype.flush=function(e){var t=this.actions;if(this._active)t.push(e);else{var r;this._active=!0;do{if(r=e.execute(e.state,e.delay))break}while(e=t.shift());if(this._active=!1,r){for(;e=t.shift();)e.unsubscribe();throw r}}},r}(Ls),zs=new Us(Vs),Bs=zs;function Gs(e){return e&&es(e.schedule)}function Hs(e){return Gs((t=e)[t.length-1])?e.pop():void 0;var t}var Ws=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e};function qs(e){return es(null==e?void 0:e.then)}function Ks(e){return es(e[$s])}function Ys(e){return Symbol.asyncIterator&&es(null==e?void 0:e[Symbol.asyncIterator])}function Js(e){return new TypeError("You provided "+(null!==e&&"object"==typeof e?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}var Qs="function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator";function Zs(e){return es(null==e?void 0:e[Qs])}function Xs(e){return h(this,arguments,(function(){var t,r,n;return i(this,(function(o){switch(o.label){case 0:t=e.getReader(),o.label=1;case 1:o.trys.push([1,,9,10]),o.label=2;case 2:return[4,u(t.read())];case 3:return r=o.sent(),n=r.value,r.done?[4,u(void 0)]:[3,5];case 4:return[2,o.sent()];case 5:return[4,u(n)];case 6:return[4,o.sent()];case 7:return o.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}}))}))}function ei(e){return es(null==e?void 0:e.getReader)}function ti(e){if(e instanceof Cs)return e;if(null!=e){if(Ks(e))return o=e,new Cs((function(e){var t=o[$s]();if(es(t.subscribe))return t.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")}));if(Ws(e))return n=e,new Cs((function(e){for(var t=0;t<n.length&&!e.closed;t++)e.next(n[t]);e.complete()}));if(qs(e))return r=e,new Cs((function(e){r.then((function(t){e.closed||(e.next(t),e.complete())}),(function(t){return e.error(t)})).then(null,us)}));if(Ys(e))return ri(e);if(Zs(e))return t=e,new Cs((function(e){var r,n;try{for(var o=a(t),s=o.next();!s.done;s=o.next()){var i=s.value;if(e.next(i),e.closed)return}}catch(e){r={error:e}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}e.complete()}));if(ei(e))return ri(Xs(e))}var t,r,n,o;throw Js(e)}function ri(e){return new Cs((function(t){(function(e,t){var r,n,o,a;return s(this,void 0,void 0,(function(){var s,c;return i(this,(function(i){switch(i.label){case 0:i.trys.push([0,5,6,11]),r=d(e),i.label=1;case 1:return[4,r.next()];case 2:if((n=i.sent()).done)return[3,4];if(s=n.value,t.next(s),t.closed)return[2];i.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return c=i.sent(),o={error:c},[3,11];case 6:return i.trys.push([6,,9,10]),n&&!n.done&&(a=r.return)?[4,a.call(r)]:[3,8];case 7:i.sent(),i.label=8;case 8:return[3,10];case 9:if(o)throw o.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}}))}))})(e,t).catch((function(e){return t.error(e)}))}))}function ni(e,t,r,n,o){void 0===n&&(n=0),void 0===o&&(o=!1);var s=t.schedule((function(){r(),o?e.add(this.schedule(null,n)):this.unsubscribe()}),n);if(e.add(s),!o)return s}function oi(e,t){return void 0===t&&(t=0),Ts((function(r,n){r.subscribe(xs(n,(function(r){return ni(n,e,(function(){return n.next(r)}),t)}),(function(){return ni(n,e,(function(){return n.complete()}),t)}),(function(r){return ni(n,e,(function(){return n.error(r)}),t)})))}))}function si(e,t){return void 0===t&&(t=0),Ts((function(r,n){n.add(e.schedule((function(){return r.subscribe(n)}),t))}))}function ii(e,t){if(!e)throw new Error("Iterable cannot be null");return new Cs((function(r){ni(r,t,(function(){var n=e[Symbol.asyncIterator]();ni(r,t,(function(){n.next().then((function(e){e.done?r.complete():r.next(e.value)}))}),0,!0)}))}))}function ai(e,t){if(null!=e){if(Ks(e))return function(e,t){return ti(e).pipe(si(t),oi(t))}(e,t);if(Ws(e))return function(e,t){return new Cs((function(r){var n=0;return t.schedule((function(){n===e.length?r.complete():(r.next(e[n++]),r.closed||this.schedule())}))}))}(e,t);if(qs(e))return function(e,t){return ti(e).pipe(si(t),oi(t))}(e,t);if(Ys(e))return ii(e,t);if(Zs(e))return function(e,t){return new Cs((function(r){var n;return ni(r,t,(function(){n=e[Qs](),ni(r,t,(function(){var e,t,o;try{t=(e=n.next()).value,o=e.done}catch(e){return void r.error(e)}o?r.complete():r.next(t)}),0,!0)})),function(){return es(null==n?void 0:n.return)&&n.return()}}))}(e,t);if(ei(e))return function(e,t){return ii(Xs(e),t)}(e,t)}throw Js(e)}function ci(e,t){return t?ai(e,t):ti(e)}function li(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return ci(e,Hs(e))}function ui(e,t){var r=es(e)?e:function(){return e},n=function(e){return e.error(r())};return new Cs(t?function(e){return t.schedule(n,0,e)}:n)}function hi(e,t,r){return void 0===r&&(r=1/0),es(t)?hi((function(r,n){return function(e,t){return Ts((function(r,n){var o=0;r.subscribe(xs(n,(function(r){n.next(e.call(t,r,o++))})))}))}((function(e,o){return t(r,e,n,o)}))(ti(e(r,n)))}),r):("number"==typeof t&&(r=t),Ts((function(t,n){return function(e,t,r,n,o,s,i,a){var c=[],l=0,u=0,h=!1,d=function(){!h||c.length||l||t.complete()},f=function(e){return l<n?p(e):c.push(e)},p=function(e){s&&t.next(e),l++;var a=!1;ti(r(e,u++)).subscribe(xs(t,(function(e){null==o||o(e),s?f(e):t.next(e)}),(function(){a=!0}),void 0,(function(){if(a)try{l--;for(var e=function(){var e=c.shift();i?ni(t,i,(function(){return p(e)})):p(e)};c.length&&l<n;)e();d()}catch(e){t.error(e)}})))};return e.subscribe(xs(t,f,(function(){h=!0,d()}))),function(){null==a||a()}}(t,n,e,r)})))}function di(){return void 0===(e=1)&&(e=1/0),hi(Os,e);var e}function fi(e,t,r){void 0===e&&(e=0),void 0===r&&(r=Bs);var n=-1;return null!=t&&(Gs(t)?r=t:n=t),new Cs((function(t){var o,s=(o=e)instanceof Date&&!isNaN(o)?+e-r.now():e;s<0&&(s=0);var i=0;return r.schedule((function(){t.closed||(t.next(i++),0<=n?this.schedule(void 0,n):t.complete())}),s)}))}function pi(e,t){return Ts((function(r,n){var o=null,s=0,i=!1,a=function(){return i&&!o&&n.complete()};r.subscribe(xs(n,(function(r){null==o||o.unsubscribe();var i=0,c=s++;ti(e(r,c)).subscribe(o=xs(n,(function(e){return n.next(t?t(r,e,c,i++):e)}),(function(){o=null,a()})))}),(function(){i=!0,a()})))}))}function mi(e,t){return void 0===t&&(t=!1),Ts((function(r,n){var o=0;r.subscribe(xs(n,(function(r){var s=e(r,o++);(s||t)&&n.next(r),!s&&n.complete()})))}))}class vi{constructor(){this.storageKeyPrefix="",this.returnUrl=this.getSessionStorageItem("returnUrl")||""}deleteUserFromSessionStorage(){["authToken","refreshToken","sessionId","ssoToken"].forEach((e=>this.removeSessionStorageItem(e)))}setStorageKeyPrefix(e){this.storageKeyPrefix=`${e.replace(/\s/g,"")}/`}setAuthResult(e){this.setSessionStorageItem("authToken",e.SESSION_AUTH_TOKEN),this.setSessionStorageItem("refreshToken",e.REFRESH_AUTH_TOKEN),this.setSessionStorageItem("username",e.USER_NAME),this.setSessionStorageItem("sessionId",e.SESSION_ID)}captureReturnUrl(){const{pathname:e,search:t,hash:r}=location;if("/login"===e)return;const n=`${"/"!==e?e:""}`;this.returnUrl=`${n}${t}${r}`,this.setSessionStorageItem("returnUrl",this.returnUrl)}setItem(e,t,r){"local"===r?localStorage.setItem(this.storageKeyPrefix+e,t):sessionStorage.setItem(this.storageKeyPrefix+e,t)}getItem(e,t){return"local"===t?localStorage.getItem(this.storageKeyPrefix+e):sessionStorage.getItem(this.storageKeyPrefix+e)}removeItem(e,t){"local"===t?localStorage.removeItem(this.storageKeyPrefix+e):sessionStorage.removeItem(this.storageKeyPrefix+e)}setLocalStorageItem(e,t){this.setItem(e,t,"local")}setSessionStorageItem(e,t){this.setItem(e,t,"session")}getLocalStorageItem(e){return this.getItem(e,"local")}getSessionStorageItem(e){return this.getItem(e,"session")}removeLocalStorageItem(e){this.removeItem(e,"local")}removeSessionStorageItem(e){this.removeItem(e,"session")}}const gi=ot.createInterface((e=>e.singleton(vi)));class yi{serialize(e){return JSON.stringify(e)}deserialize(e){return e?"string"==typeof e?JSON.parse(e):e.data?JSON.parse(e.data):e.text().then((e=>JSON.parse(e))):Promise.resolve({})}}const bi=ot.createInterface((e=>e.singleton(yi)));let _i=class{constructor(e){this.serializer=e}get(e,t){return s(this,void 0,void 0,(function*(){const r=yield fetch(e,Object.assign(Object.assign({},t),{method:"GET"}));return(t.serializer||this.serializer).deserialize(r)}))}post(e,t){return s(this,void 0,void 0,(function*(){const r=yield fetch(e,Object.assign(Object.assign({},t),{method:"POST"}));return(t.serializer||this.serializer).deserialize(r)}))}};_i=n([o(0,bi)],_i);const wi=ot.createInterface((e=>e.singleton(_i)));var Si,Ei,$i,Oi;!function(e){e.BASIC="BASIC",e.SSO="SSO",e.JWT="JWT",e.REFRESH="REFRESH"}(Si||(Si={})),function(e){e.LOGON_ACK="LOGON_ACK",e.LOGON_NACK="LOGON_NACK",e.LOGOFF_ACK="LOGOFF_ACK",e.LOGOFF_NACK="LOGOFF_NACK",e.HEARTBEAT_PING="HEARTBEAT_PING",e.HEARTBEAT_PONG="HEARTBEAT_PONG",e.MORE_ROWS="MORE_ROWS",e.MSG_ACK="MSG_ACK",e.MSG_NACK="MSG_NACK",e.LOGOUT_ACK="LOGOUT_ACK",e.LOGOUT_NACK="LOGOUT_NACK",e.QUERY_UPDATE="QUERY_UPDATE"}(Ei||(Ei={})),function(e){e.EVENT_LOGIN_AUTH="EVENT_LOGIN_AUTH",e.EVENT_LOGIN_AUTH_ACK="EVENT_LOGIN_AUTH_ACK",e.EVENT_LOGIN_AUTH_NACK="EVENT_LOGIN_AUTH_NACK",e.EVENT_LOGOUT="EVENT_LOGOUT",e.DATA_LOGON="DATA_LOGON",e.DATA_LOGOFF="DATA_LOGOFF",e.META_REQUEST="META_REQUEST",e.JSON_SCHEMA_REQUEST="JSON_SCHEMA_REQUEST",e.RESOURCES_REQUEST="RESOURCES_REQUEST",e.EVENT_CHANGE_USER_PASSWORD="EVENT_CHANGE_USER_PASSWORD",e.EVENT_SELF_SERVICE_PASSWORD_RESET="EVENT_SELF_SERVICE_PASSWORD_RESET",e.EVENT_PASSWORD_RESET_ACTION="EVENT_PASSWORD_RESET_ACTION"}($i||($i={})),function(e){e.SESSION_NOT_FOUND="SESSION_NOT_FOUND",e.UNKNOWN_MESSAGE_TYPE="UNKNOWN_MESSAGE_TYPE"}(Oi||(Oi={}));let Ci=class{constructor(e,t){this.session=e,this.uuid=t}createLoginMessage(e){let t;switch(e.type){case Si.BASIC:t={USER_NAME:e.username,PASSWORD:e.password};break;case Si.REFRESH:t={USER_NAME:e.username,REFRESH_AUTH_TOKEN:e.refreshToken};break;case Si.SSO:t={SSO_TOKEN:e.ssoToken};break;case Si.JWT:t={JWT:e.jwt,DOMAIN:e.domain}}return{DETAILS:t,SOURCE_REF:this.uuid.createId(),MESSAGE_TYPE:$i.EVENT_LOGIN_AUTH}}createLogoutMessage(e){var t,r;return{SOURCE_REF:this.uuid.createId(),MESSAGE_TYPE:$i.EVENT_LOGOUT,SESSION_AUTH_TOKEN:null!==(t=e.authToken)&&void 0!==t?t:this.session.getSessionStorageItem("authToken"),SESSION_ID:null!==(r=e.sessionId)&&void 0!==r?r:this.session.getSessionStorageItem("sessionId")}}createDataLogonMessage(e,t){return{SOURCE_REF:this.uuid.createId(),MESSAGE_TYPE:$i.DATA_LOGON,DETAILS:Object.assign({DATASOURCE_NAME:e},t),SESSION_AUTH_TOKEN:this.session.getSessionStorageItem("authToken")}}createDataLogoffMessage(e){return{SOURCE_REF:e,MESSAGE_TYPE:$i.DATA_LOGOFF,SESSION_AUTH_TOKEN:this.session.getSessionStorageItem("authToken")}}createRequestMessage(e,t){return Object.assign({SOURCE_REF:this.uuid.createId(),SESSION_AUTH_TOKEN:this.session.getSessionStorageItem("authToken"),MESSAGE_TYPE:e.startsWith("REQ_")?e:`REQ_${e}`},t)}createMetaRequestMessage(e,t=$i.META_REQUEST){return{SOURCE_REF:this.uuid.createId(),MESSAGE_TYPE:t,DETAILS:{FEATURE:e},SESSION_AUTH_TOKEN:this.session.getSessionStorageItem("authToken")}}createCommitMessage(e,t){return Object.assign({SOURCE_REF:this.uuid.createId(),SESSION_AUTH_TOKEN:this.session.getSessionStorageItem("authToken"),MESSAGE_TYPE:e},t)}createRefreshTokenMessage(){return{SOURCE_REF:this.uuid.createId(),SESSION_AUTH_TOKEN:this.session.getSessionStorageItem("authToken"),MESSAGE_TYPE:$i.EVENT_LOGIN_AUTH,DETAILS:{REFRESH_AUTH_TOKEN:this.session.getSessionStorageItem("refreshToken")}}}createChangePasswordMessage(e,t,r){return{USER_NAME:e,SOURCE_REF:this.uuid.createId(),MESSAGE_TYPE:$i.EVENT_CHANGE_USER_PASSWORD,DETAILS:{OLD_PASSWORD:t,NEW_PASSWORD:r}}}createForgotPasswordMessage(e,t,r=e){return{USER_NAME:r,SOURCE_REF:this.uuid.createId(),MESSAGE_TYPE:$i.EVENT_SELF_SERVICE_PASSWORD_RESET,DETAILS:{USER_NAME:e,RETURN_URL:t}}}createForgotPasswordTokenMessage(e,t,r,n=e){return{USER_NAME:n,SOURCE_REF:this.uuid.createId(),MESSAGE_TYPE:$i.EVENT_PASSWORD_RESET_ACTION,DETAILS:{USER_NAME:e,RESET_TOKEN:t,NEW_PASSWORD:r}}}createMoreRowsMessage(e){return{SOURCE_REF:this.uuid.createId(),MESSAGE_TYPE:Ei.MORE_ROWS,DETAILS:{SOURCE_REF:e},SESSION_AUTH_TOKEN:this.session.getSessionStorageItem("authToken")}}};Ci=n([o(0,gi),o(1,Yo)],Ci);const Ai=ot.createInterface((e=>e.singleton(Ci))),Ti=ot.createInterface(),xi=ot.createInterface();let Pi,ji;try{Pi=HTTP_CONFIG}catch(e){}try{ji=FORCE_HTTP}catch(e){}const Ni={polling:Object.assign({POLLING_MAP:{EVENT_AMEND_USER:{TEMP_FREQUENCY:500,AMOUNT_OF_POLLS:5,QUERIES:["ALL_USERS"]}},POLLING_INTERVAL_MAP:{ALL_TRADES:5e3,ALL_USERS:5e3,ALL_PROCESSES_STATUS:1e4},POLLING_FREQUENCY:5e3},Pi&&Pi.length?JSON.parse(Pi):{})};let Ri=class e{get isConnected(){return this._isConnected}set isConnected(e){this._isConnected=e,this.isConnectedSubject.next(this._isConnected)}constructor(e,t,r,n,o,s=Ni){this.http=e,this.messageBuilder=t,this.session=r,this.metaCache=n,this.serializer=o,this.config=s,this.isWorking=!1,this._isConnected=!1,this.isConnectedSubject=new ks(this._isConnected),this.ongoingTurbo={},this.streams=new Map}checkHost(){return s(this,void 0,void 0,(function*(){try{return this.getMessage({MESSAGE_TYPE:Ei.HEARTBEAT_PING,SOURCE_REF:"host check"}).then((e=>e.MESSAGE_TYPE===Ei.HEARTBEAT_PONG))}catch(e){return Jo.error(e),!1}}))}send(t,r){return this.http.post(e.getUrl(this.host,t),{body:e.getBody(t),headers:e.getHeaders(t)})}httpMode(){return!0}setValidSession(e){Jo.warn("setValidSession() called while in http polling mode.")}connect(e){return s(this,void 0,void 0,(function*(){return this.host=e,this.host.endsWith("/")||(this.host=this.host.concat("/")),this.checkHost().then((e=>(this.isConnected=e,this.session.setSessionStorageItem("hostUrl",this.host),e)))}))}disconnect(){this.isConnected=!1,this.streams.clear(),this.ongoingTurbo={},this.host=void 0}snapshot(e,t){return s(this,void 0,void 0,(function*(){const r=this.messageBuilder.createDataLogonMessage(e,t);return Jo.debug(`HTTP MODE - ${r.MESSAGE_TYPE} (snapshot) message created -> `,r),this.send(r).then((e=>(this.dataLogoff(r.SOURCE_REF).catch((e=>Jo.error(e))),e)))}))}stream(e,t,r,n){const o=this.messageBuilder.createDataLogonMessage(e,n);Jo.debug(`HTTP MODE - ${o.MESSAGE_TYPE} (stream) message created -> `,o);const s=o.SOURCE_REF;this.streams.set(s,{SOURCE_REF:s,POLLING_FREQUENCY:new ks(this.config.polling.POLLING_FREQUENCY),RESOURCE_NAME:e});const i=this.streams.get(s).POLLING_FREQUENCY,a=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return di()(ci(e,Hs(e)))}(ci(this.send(o)),i.pipe(pi((e=>{return void 0===(t=e)&&(t=0),void 0===r&&(r=zs),t<0&&(t=0),fi(t,t,r);var t,r}))).pipe(pi((()=>ci(this.getMessage(o)))))).pipe(mi((()=>this.streams.has(s))),(c=()=>{Jo.debug(`Terminating stream for ${e} - ${s}`),this.dataLogoff(s)},Ts((function(e,t){try{e.subscribe(t)}finally{t.add(c)}}))));var c;return this.streams.get(s).STREAM=a,a}getMessage(t){return s(this,void 0,void 0,(function*(){return this.http.get(e.getUrl(this.host,t),{headers:e.getHeaders(t)})}))}getMoreRows(e){return s(this,void 0,void 0,(function*(){const t=this.messageBuilder.createMoreRowsMessage(e);return Jo.debug(`HTTP MODE - ${t.MESSAGE_TYPE} message created -> `,t),this.send(t)}))}dataLogoff(e){return s(this,void 0,void 0,(function*(){const t=this.messageBuilder.createDataLogoffMessage(e);return this.send(t).then((t=>(this.streams.has(e)&&(Jo.debug(`Removing stream ${e}`),this.streams.delete(e)),t)))}))}getMetadata(e,t=!0){return s(this,void 0,void 0,(function*(){const t=this.messageBuilder.createMetaRequestMessage(e);return Jo.debug(`HTTP MODE - ${t.MESSAGE_TYPE} (metadata) message created -> `,t),this.send(t).then((e=>e.DETAILS))}))}getJSONSchema(e){return s(this,void 0,void 0,(function*(){const t=this.messageBuilder.createMetaRequestMessage(e,$i.JSON_SCHEMA_REQUEST);return Jo.debug(`HTTP MODE! - ${t.MESSAGE_TYPE} (json schema) message created -> `,t),this.send(t)}))}request(e,t){const r=this.messageBuilder.createRequestMessage(e,t);return Jo.debug(`HTTP MODE! - ${r.MESSAGE_TYPE} (request server) message created -> `,r),this.send(r)}commitEvent(e,t){return s(this,void 0,void 0,(function*(){const r=this.messageBuilder.createCommitMessage(e,t);return Jo.debug(`HTTP MODE! - ${r.MESSAGE_TYPE} (commit) message created -> `,r),this.send(r).then((t=>(this.maybeTurbo(e,t),t)))}))}maybeTurbo(e,t){var r;if(!(null===(r=null==t?void 0:t.MESSAGE_TYPE)||void 0===r?void 0:r.endsWith("_ACK")))return;if(this.ongoingTurbo[e])return void Jo.debug(`${e} polling frequency is already accelerated.`);const n=this.config.polling.POLLING_MAP[e];if(!(null==n?void 0:n.TEMP_FREQUENCY)||!n.AMOUNT_OF_POLLS)return;const o=n.TEMP_FREQUENCY,s=o*n.AMOUNT_OF_POLLS,i=JSON.parse(JSON.stringify(this.config.polling.POLLING_INTERVAL_MAP)),a=JSON.parse(JSON.stringify(this.config.polling.POLLING_INTERVAL_MAP));for(const e of n.QUERIES)a[e]=o,i[e]||(i[e]=this.config.polling.POLLING_FREQUENCY);Jo.debug(`${e} TRIGGERED -> ENFORCING TURBO | FREQUENCY=${o}ms DURATION=${s}`),this.ongoingTurbo[e]=!0,this.updateIntervals({polling:{POLLING_INTERVAL_MAP:a}}),setTimeout((()=>{Jo.debug(`RESTORED ORIGINAL POLLING INTERVALS FOR ${e}`),this.updateIntervals({polling:{POLLING_INTERVAL_MAP:i}}),this.ongoingTurbo[e]=!1}),s)}updateIntervals(e){const{POLLING_INTERVAL_MAP:t}=e.polling;t&&(this.config.polling.POLLING_INTERVAL_MAP=t,this.handlePollingIntervalMapUpdate(t))}handlePollingIntervalMapUpdate(e){if(e)for(const t in e){if(!e.hasOwnProperty(t))continue;const r=e[t];this.config.polling.POLLING_INTERVAL_MAP[t]=r,Jo.debug(`Setting polling frequency for ${t} = ${r}`),[...this.streams.values()].filter((e=>e.RESOURCE_NAME===t)).forEach((e=>{var t;return null===(t=null==e?void 0:e.POLLING_FREQUENCY)||void 0===t?void 0:t.next(r)}))}}static getHeaders(e){const t={"Content-type":"application/json; charset=UTF-8","source-ref":e.SOURCE_REF};return e.SESSION_AUTH_TOKEN&&(t["SESSION-AUTH-TOKEN"]=e.SESSION_AUTH_TOKEN),e.MESSAGE_TYPE===$i.EVENT_LOGOUT&&(t["SESSION-ID"]=e.SESSION_ID),t}static getBody(e){return JSON.stringify(e)}static getUrl(e,t){const r=t.MESSAGE_TYPE;let n=t.MESSAGE_TYPE.replace(/_/g,"-").toLowerCase();return r===$i.DATA_LOGON&&(n=t.DETAILS.DATASOURCE_NAME.replace(/_/g,"-").toLowerCase()),`${e}${n}`}};n([P],Ri.prototype,"host",void 0),n([P],Ri.prototype,"isWorking",void 0),n([P],Ri.prototype,"_isConnected",void 0),n([j],Ri.prototype,"isConnected",null),Ri=n([o(0,wi),o(1,Ai),o(2,gi),o(3,Xo),o(4,br),o(5,at(xi))],Ri);const ki=ot.createInterface((e=>e.singleton(Ri)));var Ii={url:"",deserializer:function(e){return JSON.parse(e.data)},serializer:function(e){return JSON.stringify(e)}},Mi=function(e){function n(t,n){var o=e.call(this)||this;if(o._socket=null,t instanceof Cs)o.destination=n,o.source=t;else{var s=o._config=r({},Ii);if(o._output=new Ns,"string"==typeof t)s.url=t;else for(var i in t)t.hasOwnProperty(i)&&(s[i]=t[i]);if(!s.WebSocketCtor&&WebSocket)s.WebSocketCtor=WebSocket;else if(!s.WebSocketCtor)throw new Error("no WebSocket constructor can be found");o.destination=new Ms}return o}return t(n,e),n.prototype.lift=function(e){var t=new n(this._config,this.destination);return t.operator=e,t.source=this,t},n.prototype._resetState=function(){this._socket=null,this.source||(this.destination=new Ms),this._output=new Ns},n.prototype.multiplex=function(e,t,r){var n=this;return new Cs((function(o){try{n.next(e())}catch(e){o.error(e)}var s=n.subscribe({next:function(e){try{r(e)&&o.next(e)}catch(e){o.error(e)}},error:function(e){return o.error(e)},complete:function(){return o.complete()}});return function(){try{n.next(t())}catch(e){o.error(e)}s.unsubscribe()}}))},n.prototype._connectSocket=function(){var e=this,t=this._config,r=t.WebSocketCtor,n=t.protocol,o=t.url,s=t.binaryType,i=this._output,a=null;try{a=n?new r(o,n):new r(o),this._socket=a,s&&(this._socket.binaryType=s)}catch(e){return void i.error(e)}var c=new os((function(){e._socket=null,a&&1===a.readyState&&a.close()}));a.onopen=function(t){if(!e._socket)return a.close(),void e._resetState();var r=e._config.openObserver;r&&r.next(t);var n=e.destination;e.destination=vs.create((function(t){if(1===a.readyState)try{var r=e._config.serializer;a.send(r(t))}catch(t){e.destination.error(t)}}),(function(t){var r=e._config.closingObserver;r&&r.next(void 0),t&&t.code?a.close(t.code,t.reason):i.error(new TypeError("WebSocketSubject.error must be called with an object with an error code, and an optional reason: { code: number, reason: string }")),e._resetState()}),(function(){var t=e._config.closingObserver;t&&t.next(void 0),a.close(),e._resetState()})),n&&n instanceof Ms&&c.add(n.subscribe(e.destination))},a.onerror=function(t){e._resetState(),i.error(t)},a.onclose=function(t){a===e._socket&&e._resetState();var r=e._config.closeObserver;r&&r.next(t),t.wasClean?i.complete():i.error(t)},a.onmessage=function(t){try{var r=e._config.deserializer;i.next(r(t))}catch(e){i.error(e)}}},n.prototype._subscribe=function(e){var t=this,r=this.source;return r?r.subscribe(e):(this._socket||this._connectSocket(),this._output.subscribe(e),e.add((function(){var e=t._socket;0===t._output.observers.length&&(!e||1!==e.readyState&&0!==e.readyState||e.close(),t._resetState())})),e)},n.prototype.unsubscribe=function(){var t=this._socket;!t||1!==t.readyState&&0!==t.readyState||t.close(),this._resetState(),e.prototype.unsubscribe.call(this)},n}(Rs);const Di=1e4,Fi=6e4;var Vi;!function(e){e.Linear="linear",e.Exponential="exponential"}(Vi||(Vi={}));const Li=(e,t)=>{const{reconnectInterval:r=Di}=e,n=r>Fi?Fi:r,o=Math.round(Math.log2(Fi/n));return n*Math.pow(2,t%o)},Ui=(e,t)=>{const{reconnectInterval:r=Di}=e;return r>Fi?Fi:r};class zi extends Ns{constructor(){super()}}class Bi{constructor(e,t,r,n){this._message=e,this._onMessage=t,this._onError=r,this._isSubscription=n}get sentMessage(){return this._message}get onReceivedMessage(){return this._onMessage}get onReceivedError(){return this._onError}get isSubscription(){return this._isSubscription}}let Gi=class{isConnectedChanged(e,t){this.isConnectedSubject.next(t)}constructor(e,t,r,n){this.messageBuilder=e,this.session=t,this.serializer=r,this.uuid=n,this.defaultInterval=1e4,this.secondsMultiplier=1e3,this.isConnectedSubject=new ks(!1),this.isConnected=!1,this.hasValidSession=!1,this.heartbeatIsEnabled=!0,this.heartbeatInterval=this.defaultInterval,this.isReconnecting=!1,this.socketMessages=()=>this.wsMessages}get heartbeatLoggingIsEnabled(){var e,t;return null!==(t=null===(e=this.connectOptions)||void 0===e?void 0:e.enableHeartbeatLogging)&&void 0!==t&&t}get messageLoggingIsEnabled(){var e,t;return null!==(t=null===(e=this.connectOptions)||void 0===e?void 0:e.enableMessageLogging)&&void 0!==t&&t}connect(e,t,r){return this.url=e,this.connectOptions=t,this.reconnectOptions=r,new Promise((e=>{var t,r,n,o;Jo.info(`${this.isReconnecting?"Reconnecting":"Connecting"} to ${this.url}`);(!this.isReconnecting||!(null===(t=this.reconnectOptions)||void 0===t?void 0:t.reconnectStreams))&&this.cleanMessages(),null===(r=this.socketSubscription)||void 0===r||r.unsubscribe(),this.websocket=new Mi({url:this.url,openObserver:{next:()=>{this.isConnected=!0,this.session.setSessionStorageItem("hostUrl",this.url),this.prepareHeartbeat(),Jo.info("WebSocket connection is now open"),e(this.isConnected)}},closeObserver:{next:t=>{this.disconnectedByServer=!t.wasClean,this.isConnected=!1,Jo.info(`WebSocket connection was closed due an error - Code: ${t.code} ${t.reason?" | Reason: "+t.reason:""}`),e(this.isConnected)}},serializer:this.serializer.serialize,deserializer:this.serializer.deserialize});this.socketSubscription=this.websocket.subscribe(null!==(o=null===(n=this.connectOptions)||void 0===n?void 0:n.connectObserver)&&void 0!==o?o:{next:e=>s(this,void 0,void 0,(function*(){var t;const r=`Response Message received for SourceRef: ${e.SOURCE_REF} | MessageType: ${e.MESSAGE_TYPE}`;this.logMessageTypeFlow(e.MESSAGE_TYPE,Jo.info,r);const{SOURCE_REF:n,MESSAGE_TYPE:o}=e,s=this.getMessageHandler(n,o);if(!s)return;let i=!1;switch(e.MESSAGE_TYPE){case $i.EVENT_LOGIN_AUTH_ACK:{this.hasValidSession=!0;const r=e.DETAILS;r.HEARTBEAT_INTERVAL_SECS&&void 0===(null===(t=this.connectOptions)||void 0===t?void 0:t.heartbeatInterval)&&(this.heartbeatInterval=r.HEARTBEAT_INTERVAL_SECS*this.secondsMultiplier,this.prepareHeartbeat());break}case Ei.LOGOUT_ACK:return this.hasValidSession=!1,s.onReceivedMessage.call(this,e),void this.cleanMessages();case Ei.LOGON_ACK:return;case Ei.LOGOFF_ACK:if(e.LOGGED_OUT&&this.hasValidSession){const e=this.messageBuilder.createRefreshTokenMessage(),t=yield this.send(e);t?t.MESSAGE_TYPE===$i.EVENT_LOGIN_AUTH_ACK&&(this.session.setAuthResult(t),this.wsMessageHandlers.forEach((e=>{e.isSubscription&&(e.sentMessage.SESSION_AUTH_TOKEN=t.SESSION_AUTH_TOKEN,this.websocket.next(e.sentMessage))}))):this.hasValidSession=!1}break;case Ei.QUERY_UPDATE:if(!s.isSubscription){const e=this.messageBuilder.createDataLogoffMessage(n);this.send(e)}break;case Ei.MSG_NACK:i=!0}i?s.onReceivedError.call(this,{receivedMessage:e,sentMessage:s.sentMessage}):s.onReceivedMessage.call(this,e),this.wsMessages.next(e),s.isSubscription||this.removeMessageHandler(n)})),error:e=>{Jo.debug("Error found: ",e),this.reconnect()},complete:()=>{var e;this.disconnectedByServer&&(null===(e=this.connectOptions)||void 0===e?void 0:e.alwaysOn)?this.reconnect():Jo.info("Connection is now closed")}})}))}prepareHeartbeat(){var e,t,r,n;this.heartbeatSubscription&&this.heartbeatSubscription.unsubscribe();const o=()=>s(this,void 0,void 0,(function*(){if(!this.isConnected)return;const e={MESSAGE_TYPE:Ei.HEARTBEAT_PING,SOURCE_REF:this.uuid.createId()},t=yield this.send(e);this.heartbeatIsEnabled=t.MESSAGE_TYPE===Ei.HEARTBEAT_PONG&&t.SOURCE_REF===e.SOURCE_REF}));if(null!==(t=null===(e=this.connectOptions)||void 0===e?void 0:e.enableHeartbeat)&&void 0!==t?t:this.heartbeatIsEnabled){const e=null!==(n=null===(r=this.connectOptions)||void 0===r?void 0:r.heartbeatInterval)&&void 0!==n?n:this.heartbeatInterval;this.heartbeatSubscription=fi(e,e).pipe(mi((()=>this.websocket&&this.isConnected)),function(e,t,r){var n=es(e)||t||r?{next:e,error:t,complete:r}:e;return n?Ts((function(e,t){var r;null===(r=n.subscribe)||void 0===r||r.call(n);var o=!0;e.subscribe(xs(t,(function(e){var r;null===(r=n.next)||void 0===r||r.call(n,e),t.next(e)}),(function(){var e;o=!1,null===(e=n.complete)||void 0===e||e.call(n),t.complete()}),(function(e){var r;o=!1,null===(r=n.error)||void 0===r||r.call(n,e),t.error(e)}),(function(){var e,t;o&&(null===(e=n.unsubscribe)||void 0===e||e.call(n)),null===(t=n.finalize)||void 0===t||t.call(n)})))})):Os}((()=>this.heartbeatLoggingIsEnabled&&Jo.debug(`Sending a heartbeat ping every ${e} ms`)))).subscribe((()=>o()))}}reconnect(){var e,t,r,n,o;const s=!(null===(e=this.connectOptions)||void 0===e?void 0:e.alwaysOn)&&!1===(null===(t=this.connectOptions)||void 0===t?void 0:t.enableHeartbeat);if(this.isReconnecting||s)return;this.isReconnecting=!0;const i=(null===(r=this.reconnectOptions)||void 0===r?void 0:r.reconnectStrategy)===Vi.Exponential?Li:Ui,a=this.isConnectedSubject.asObservable().pipe(pi((e=>e?li(-1):((e,t)=>new Cs((r=>{let n,o=0;return function s(){r.next(o),clearTimeout(n),n=setTimeout(s,t(e,o)),o+=1}(),()=>{clearTimeout(n)}})))(this.reconnectOptions,i).pipe(hi((e=>{var t,r,n;let o;return o=(null===(t=this.connectOptions)||void 0===t?void 0:t.alwaysOn)?e+1:null!==(n=null===(r=this.reconnectOptions)||void 0===r?void 0:r.reconnectAttempts)&&void 0!==n?n:10,e<o?li(e):ui((()=>new Error(`Max reconnect attempts ${o} reached.`)))}))))),mi((()=>this.websocket&&!this.isConnected)));a.subscribe(null!==(o=null===(n=this.reconnectOptions)||void 0===n?void 0:n.reconnectObserver)&&void 0!==o?o:{next:e=>{Jo.debug(`Attempt no. ${e+1} to reconnect`),this.websocket.complete(),this.connect(this.url,this.connectOptions,this.reconnectOptions)},error:e=>{var t;Jo.debug(e),null===(t=this.socketSubscription)||void 0===t||t.unsubscribe(),this.isReconnecting=!1},complete:()=>{Jo.info(this.isConnected?"Reconnected":"Disconnected"),this.isReconnecting=!1,this.wsMessageHandlers.forEach((e=>{e.isSubscription&&this.websocket.next(e.sentMessage)}))}})}reset(){this.isConnected=!1,this.websocket&&this.websocket.complete(),this.websocket=null,this.cleanMessages()}cleanMessages(){this.wsMessages&&this.wsMessages.complete(),this.wsMessages=new zi,this.wsMessageHandlers=new Map}send(e,t=!0){if(!this.isConnected)return void Promise.reject(new Error("WebSocket connection is closed"));const r=`Sending Message for SourceRef: ${e.SOURCE_REF} | MessageType: ${e.MESSAGE_TYPE}`;return this.logMessageTypeFlow(e.MESSAGE_TYPE,Jo.info,r),new Promise(((r,n)=>{const o=e=>{r(e)},s=e=>{n(e)};t&&this.setMessageHandler(e,o,s),this.websocket.next(e)}))}sendForStream(e,t,r){if(!this.isConnected)return ui((()=>new Error("WebSocket connection is closed")));if(!this.hasValidSession)return ui((()=>new Error("WebSocket connection is open but there is no valid/active session, please check your auth flow")));const n=`Sending Message (stream) for SourceRef: ${e.SOURCE_REF} | MessageType: ${e.MESSAGE_TYPE}`;return this.logMessageTypeFlow(e.MESSAGE_TYPE,Jo.info,n),this.setMessageHandler(e,t,r,!0),this.websocket.next(e),ci(this.wsMessages.pipe((o=t=>t.SOURCE_REF===e.SOURCE_REF,Ts((function(e,t){var r=0;e.subscribe(xs(t,(function(e){return o.call(s,e,r++)&&t.next(e)})))})))));var o,s}setMessageHandler(e,t,r,n=!1){const o=`Setting Message Handler for SourceRef: ${e.SOURCE_REF} | MessageType: ${e.MESSAGE_TYPE}`;this.logMessageTypeFlow(e.MESSAGE_TYPE,Jo.debug,o),this.wsMessageHandlers.set(e.SOURCE_REF,new Bi(e,t,r,n))}removeMessageHandler(e){this.wsMessageHandlers.delete(e)}getMessageHandler(e,t){const r=`Getting Message Handler for SourceRef: ${e} | MessageType: ${t}`;return this.logMessageTypeFlow(t,Jo.debug,r),this.wsMessageHandlers.get(e)}logMessageTypeFlow(e,t,r){switch(e){case Ei.HEARTBEAT_PING:case Ei.HEARTBEAT_PONG:this.heartbeatLoggingIsEnabled&&t(r);break;default:this.messageLoggingIsEnabled&&t(r)}}};n([P],Gi.prototype,"websocket",void 0),n([P],Gi.prototype,"wsMessages",void 0),n([P],Gi.prototype,"wsMessageHandlers",void 0),n([P],Gi.prototype,"isConnected",void 0),n([P],Gi.prototype,"disconnectedByServer",void 0),n([P],Gi.prototype,"hasValidSession",void 0),n([P],Gi.prototype,"heartbeatIsEnabled",void 0),n([P],Gi.prototype,"isReconnecting",void 0),Gi=n([o(0,Ai),o(1,gi),o(2,bi),o(3,Yo)],Gi);const Hi=ot.createInterface((e=>e.singleton(Gi))),Wi={connect:{alwaysOn:!1,enableHeartbeat:!0,enableHeartbeatLogging:!1,heartbeatInterval:1e4,enableMessageLogging:!1},reconnect:{reconnectAttempts:10,reconnectInterval:1e4,reconnectStreams:!0}};let qi=class{get isConnected(){return this.socket.isConnected}get isConnectedSubject(){return this.socket.isConnectedSubject}constructor(e,t,r,n=Wi){this.socket=e,this.messageBuilder=t,this.metaCache=r,this.config=n,this.isWorking=!1}httpMode(){return!1}setValidSession(e){this.socket.hasValidSession=e}send(e,t){return this.socket.send(e,t)}connect(e){return s(this,void 0,void 0,(function*(){return this.socket.reset(),Qo.test(e)?this.socket.connect(e,this.config.connect,this.config.reconnect):(Jo.error(`Specified host (${e}) is not valid WebSocket url. Connection will not proceed.`),void Jo.warn("Make sure the host url starts with wss:// or ws://"))}))}disconnect(){this.socket.reset()}snapshot(e,t){return s(this,void 0,void 0,(function*(){const r=this.messageBuilder.createDataLogonMessage(e,t);return Jo.debug(`${r.MESSAGE_TYPE} (snapshot) message created -> `,r),this.socket.send(r)}))}stream(e,t,r,n){const o=this.messageBuilder.createDataLogonMessage(e,n);return Jo.debug(`${o.MESSAGE_TYPE} (stream) message created -> `,o),this.socket.sendForStream(o,t,r)}getMoreRows(e){return s(this,void 0,void 0,(function*(){const t=this.messageBuilder.createMoreRowsMessage(e);return Jo.debug(`${t.MESSAGE_TYPE} message created -> `,t),this.socket.send(t,!1)}))}dataLogoff(e){return s(this,void 0,void 0,(function*(){const t=this.messageBuilder.createDataLogoffMessage(e);return Jo.debug(`${t.MESSAGE_TYPE} message created -> `,t),this.socket.send(t)}))}getMetadata(e,t=!0){var r;return s(this,void 0,void 0,(function*(){if(t&&(yield function(e,t=300){const r=n=>{e()?n():setTimeout((()=>r(n)),t)};return new Promise(r)}((()=>!1===this.isWorking)),this.metaCache.hasMetadataFor(e)))return Jo.debug(`Cached metadata retrieved for ${e}`),this.metaCache.getMetadataFor(e);const n=this.messageBuilder.createMetaRequestMessage(e);let o;Jo.debug(`${n.MESSAGE_TYPE} (metadata) message created -> `,n);try{this.isWorking=!0;const e=yield this.socket.send(n);o=null!==(r=null==e?void 0:e.DETAILS)&&void 0!==r?r:[]}finally{o&&this.metaCache.setMetadataFor(e,o),this.isWorking=!1}return o}))}getJSONSchema(e){return s(this,void 0,void 0,(function*(){const t=this.messageBuilder.createMetaRequestMessage(e,$i.JSON_SCHEMA_REQUEST);return Jo.debug(`${t.MESSAGE_TYPE} (json schema) message created -> `,t),this.socket.send(t)}))}request(e,t){const r=this.messageBuilder.createRequestMessage(e,t);return Jo.debug(`${r.MESSAGE_TYPE} (request server) message created -> `,r),this.socket.send(r)}commitEvent(e,t){return s(this,void 0,void 0,(function*(){const r=this.messageBuilder.createCommitMessage(e,t);return Jo.debug(`${r.MESSAGE_TYPE} (commit) message created -> `,r),this.socket.send(r)}))}};n([P],qi.prototype,"isWorking",void 0),n([j],qi.prototype,"isConnected",null),qi=n([o(0,Hi),o(1,Ai),o(2,Xo),o(3,at(Ti))],qi);const Ki="true"===ji||!1,Yi=ot.createInterface((e=>e.singleton(qi))),Ji=ot.createInterface((e=>Ki?e.aliasTo(ki):e.aliasTo(Yi))),Qi=xe` ${Zi="block",`${ir}:host{display:${Zi}}`} :host{border: calc(${Tn} * 1px) solid transparent;margin: 0;border-radius: calc(${On} * 1px);padding: calc(${An} * 1px);min-width: 64px}.form-controls{display: grid;grid-gap: calc(${An} * 1px);grid-column-gap: calc(${An} * 7px);grid-template-columns: repeat(2, 1fr)}.form-group{display: flex;flex-direction: column}.required::after{content: ' *';color: #f00}.label{font-size: calc(${An} * 1px + 0.7vmin)}.actions{display: flex;align-items: center;justify-content: center;padding: calc(${An} * 2px)}.error{border-bottom: 2px solid red}.errors{color: #f00;font-size: 11px;width: calc(100% - 70px)}.submit-button{width: 70px}`.withBehaviors(sr(xe` :host{background: ${Ft.Canvas};border-color: ${Ft.CanvasText}}`));var Zi,Xi=Object.prototype;var ea=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Xi)};var ta=function(e,t){return function(r){return e(t(r))}},ra=ta(Object.keys,Object),na=ea,oa=ra,sa=Object.prototype.hasOwnProperty;var ia=function(e){if(!na(e))return oa(e);var t=[];for(var r in Object(e))sa.call(e,r)&&"constructor"!=r&&t.push(r);return t},aa="object"==typeof f&&f&&f.Object===Object&&f,ca=aa,la="object"==typeof self&&self&&self.Object===Object&&self,ua=ca||la||Function("return this")(),ha=ua.Symbol,da=ha,fa=Object.prototype,pa=fa.hasOwnProperty,ma=fa.toString,va=da?da.toStringTag:void 0;var ga=function(e){var t=pa.call(e,va),r=e[va];try{e[va]=void 0;var n=!0}catch(e){}var o=ma.call(e);return n&&(t?e[va]=r:delete e[va]),o},ya=Object.prototype.toString;var ba=ga,_a=function(e){return ya.call(e)},wa="[object Null]",Sa="[object Undefined]",Ea=ha?ha.toStringTag:void 0;var $a=function(e){return null==e?void 0===e?Sa:wa:Ea&&Ea in Object(e)?ba(e):_a(e)};var Oa=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},Ca=$a,Aa=Oa,Ta="[object AsyncFunction]",xa="[object Function]",Pa="[object GeneratorFunction]",ja="[object Proxy]";var Na,Ra=function(e){if(!Aa(e))return!1;var t=Ca(e);return t==xa||t==Pa||t==Ta||t==ja},ka=ua["__core-js_shared__"],Ia=(Na=/[^.]+$/.exec(ka&&ka.keys&&ka.keys.IE_PROTO||""))?"Symbol(src)_1."+Na:"";var Ma=function(e){return!!Ia&&Ia in e},Da=Function.prototype.toString;var Fa=function(e){if(null!=e){try{return Da.call(e)}catch(e){}try{return e+""}catch(e){}}return""},Va=Ra,La=Ma,Ua=Oa,za=Fa,Ba=/^\[object .+?Constructor\]$/,Ga=Function.prototype,Ha=Object.prototype,Wa=Ga.toString,qa=Ha.hasOwnProperty,Ka=RegExp("^"+Wa.call(qa).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var Ya=function(e){return!(!Ua(e)||La(e))&&(Va(e)?Ka:Ba).test(za(e))},Ja=function(e,t){return null==e?void 0:e[t]};var Qa=function(e,t){var r=Ja(e,t);return Ya(r)?r:void 0},Za=Qa(ua,"DataView"),Xa=Qa(ua,"Map"),ec=Qa(ua,"Promise"),tc=Qa(ua,"Set"),rc=Qa(ua,"WeakMap"),nc=Za,oc=Xa,sc=ec,ic=tc,ac=rc,cc=$a,lc=Fa,uc="[object Map]",hc="[object Promise]",dc="[object Set]",fc="[object WeakMap]",pc="[object DataView]",mc=lc(nc),vc=lc(oc),gc=lc(sc),yc=lc(ic),bc=lc(ac),_c=cc;(nc&&_c(new nc(new ArrayBuffer(1)))!=pc||oc&&_c(new oc)!=uc||sc&&_c(sc.resolve())!=hc||ic&&_c(new ic)!=dc||ac&&_c(new ac)!=fc)&&(_c=function(e){var t=cc(e),r="[object Object]"==t?e.constructor:void 0,n=r?lc(r):"";if(n)switch(n){case mc:return pc;case vc:return uc;case gc:return hc;case yc:return dc;case bc:return fc}return t});var wc=_c;var Sc=function(e){return null!=e&&"object"==typeof e},Ec=$a,$c=Sc,Oc="[object Arguments]";var Cc=function(e){return $c(e)&&Ec(e)==Oc},Ac=Sc,Tc=Object.prototype,xc=Tc.hasOwnProperty,Pc=Tc.propertyIsEnumerable,jc=Cc(function(){return arguments}())?Cc:function(e){return Ac(e)&&xc.call(e,"callee")&&!Pc.call(e,"callee")},Nc=Array.isArray,Rc=9007199254740991;var kc=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=Rc},Ic=Ra,Mc=kc;var Dc=function(e){return null!=e&&Mc(e.length)&&!Ic(e)},Fc={exports:{}};var Vc=function(){return!1};!function(e,t){var r=ua,n=Vc,o=t&&!t.nodeType&&t,s=o&&e&&!e.nodeType&&e,i=s&&s.exports===o?r.Buffer:void 0,a=(i?i.isBuffer:void 0)||n;e.exports=a}(Fc,Fc.exports);var Lc=$a,Uc=kc,zc=Sc,Bc={};Bc["[object Float32Array]"]=Bc["[object Float64Array]"]=Bc["[object Int8Array]"]=Bc["[object Int16Array]"]=Bc["[object Int32Array]"]=Bc["[object Uint8Array]"]=Bc["[object Uint8ClampedArray]"]=Bc["[object Uint16Array]"]=Bc["[object Uint32Array]"]=!0,Bc["[object Arguments]"]=Bc["[object Array]"]=Bc["[object ArrayBuffer]"]=Bc["[object Boolean]"]=Bc["[object DataView]"]=Bc["[object Date]"]=Bc["[object Error]"]=Bc["[object Function]"]=Bc["[object Map]"]=Bc["[object Number]"]=Bc["[object Object]"]=Bc["[object RegExp]"]=Bc["[object Set]"]=Bc["[object String]"]=Bc["[object WeakMap]"]=!1;var Gc=function(e){return zc(e)&&Uc(e.length)&&!!Bc[Lc(e)]};var Hc=function(e){return function(t){return e(t)}},Wc={exports:{}};!function(e,t){var r=aa,n=t&&!t.nodeType&&t,o=n&&e&&!e.nodeType&&e,s=o&&o.exports===n&&r.process,i=function(){try{var e=o&&o.require&&o.require("util").types;return e||s&&s.binding&&s.binding("util")}catch(e){}}();e.exports=i}(Wc,Wc.exports);var qc=Gc,Kc=Hc,Yc=Wc.exports,Jc=Yc&&Yc.isTypedArray,Qc=Jc?Kc(Jc):qc,Zc=ia,Xc=wc,el=jc,tl=Nc,rl=Dc,nl=Fc.exports,ol=ea,sl=Qc,il="[object Map]",al="[object Set]",cl=Object.prototype.hasOwnProperty;var ll=function(e){if(null==e)return!0;if(rl(e)&&(tl(e)||"string"==typeof e||"function"==typeof e.splice||nl(e)||sl(e)||el(e)))return!e.length;var t=Xc(e);if(t==il||t==al)return!e.size;if(ol(e))return!Zc(e).length;for(var r in e)if(cl.call(e,r))return!1;return!0};var ul=function(e,t,r,n){var o=-1,s=null==e?0:e.length;for(n&&s&&(r=e[++o]);++o<s;)r=t(r,e[o],o,e);return r};var hl=function(e){return function(t){return null==e?void 0:e[t]}}({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"});var dl=function(e,t){for(var r=-1,n=null==e?0:e.length,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o},fl=$a,pl=Sc,ml="[object Symbol]";var vl=function(e){return"symbol"==typeof e||pl(e)&&fl(e)==ml},gl=dl,yl=Nc,bl=vl,_l=1/0,wl=ha?ha.prototype:void 0,Sl=wl?wl.toString:void 0;var El=function e(t){if("string"==typeof t)return t;if(yl(t))return gl(t,e)+"";if(bl(t))return Sl?Sl.call(t):"";var r=t+"";return"0"==r&&1/t==-_l?"-0":r},$l=El;var Ol=function(e){return null==e?"":$l(e)},Cl=hl,Al=Ol,Tl=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,xl=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");var Pl=function(e){return(e=Al(e))&&e.replace(Tl,Cl).replace(xl,"")},jl=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;var Nl=function(e){return e.match(jl)||[]},Rl=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;var kl=function(e){return Rl.test(e)},Il="\\ud800-\\udfff",Ml="\\u2700-\\u27bf",Dl="a-z\\xdf-\\xf6\\xf8-\\xff",Fl="A-Z\\xc0-\\xd6\\xd8-\\xde",Vl="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ll="["+Vl+"]",Ul="\\d+",zl="["+Ml+"]",Bl="["+Dl+"]",Gl="[^"+Il+Vl+Ul+Ml+Dl+Fl+"]",Hl="(?:\\ud83c[\\udde6-\\uddff]){2}",Wl="[\\ud800-\\udbff][\\udc00-\\udfff]",ql="["+Fl+"]",Kl="(?:"+Bl+"|"+Gl+")",Yl="(?:"+ql+"|"+Gl+")",Jl="(?:['’](?:d|ll|m|re|s|t|ve))?",Ql="(?:['’](?:D|LL|M|RE|S|T|VE))?",Zl="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",Xl="[\\ufe0e\\ufe0f]?",eu=Xl+Zl+("(?:\\u200d(?:"+["[^"+Il+"]",Hl,Wl].join("|")+")"+Xl+Zl+")*"),tu="(?:"+[zl,Hl,Wl].join("|")+")"+eu,ru=RegExp([ql+"?"+Bl+"+"+Jl+"(?="+[Ll,ql,"$"].join("|")+")",Yl+"+"+Ql+"(?="+[Ll,ql+Kl,"$"].join("|")+")",ql+"?"+Kl+"+"+Jl,ql+"+"+Ql,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ul,tu].join("|"),"g");var nu=Nl,ou=kl,su=Ol,iu=function(e){return e.match(ru)||[]};var au=function(e,t,r){return e=su(e),void 0===(t=r?void 0:t)?ou(e)?iu(e):nu(e):e.match(t)||[]},cu=ul,lu=Pl,uu=au,hu=RegExp("['’]","g");var du=function(e){return function(t){return cu(uu(lu(t).replace(hu,"")),e,"")}};var fu=function(e,t,r){var n=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(r=r>o?o:r)<0&&(r+=o),o=t>r?0:r-t>>>0,t>>>=0;for(var s=Array(o);++n<o;)s[n]=e[n+t];return s},pu=fu;var mu=function(e,t,r){var n=e.length;return r=void 0===r?n:r,!t&&r>=n?e:pu(e,t,r)},vu=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");var gu=function(e){return vu.test(e)};var yu=function(e){return e.split("")},bu="\\ud800-\\udfff",_u="["+bu+"]",wu="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",Su="\\ud83c[\\udffb-\\udfff]",Eu="[^"+bu+"]",$u="(?:\\ud83c[\\udde6-\\uddff]){2}",Ou="[\\ud800-\\udbff][\\udc00-\\udfff]",Cu="(?:"+wu+"|"+Su+")"+"?",Au="[\\ufe0e\\ufe0f]?",Tu=Au+Cu+("(?:\\u200d(?:"+[Eu,$u,Ou].join("|")+")"+Au+Cu+")*"),xu="(?:"+[Eu+wu+"?",wu,$u,Ou,_u].join("|")+")",Pu=RegExp(Su+"(?="+Su+")|"+xu+Tu,"g");var ju=yu,Nu=gu,Ru=function(e){return e.match(Pu)||[]};var ku=mu,Iu=gu,Mu=function(e){return Nu(e)?Ru(e):ju(e)},Du=Ol;var Fu=function(e){return function(t){t=Du(t);var r=Iu(t)?Mu(t):void 0,n=r?r[0]:t.charAt(0),o=r?ku(r,1).join(""):t.slice(1);return n[e]()+o}}("toUpperCase"),Vu=du((function(e,t,r){return e+(r?" ":"")+Fu(t)})),Lu=Vu;var Uu=function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n},zu=9007199254740991,Bu=/^(?:0|[1-9]\d*)$/;var Gu=function(e,t){var r=typeof e;return!!(t=null==t?zu:t)&&("number"==r||"symbol"!=r&&Bu.test(e))&&e>-1&&e%1==0&&e<t},Hu=Uu,Wu=jc,qu=Nc,Ku=Fc.exports,Yu=Gu,Ju=Qc,Qu=Object.prototype.hasOwnProperty;var Zu=function(e,t){var r=qu(e),n=!r&&Wu(e),o=!r&&!n&&Ku(e),s=!r&&!n&&!o&&Ju(e),i=r||n||o||s,a=i?Hu(e.length,String):[],c=a.length;for(var l in e)!t&&!Qu.call(e,l)||i&&("length"==l||o&&("offset"==l||"parent"==l)||s&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||Yu(l,c))||a.push(l);return a},Xu=Zu,eh=ia,th=Dc;var rh=function(e){return th(e)?Xu(e):eh(e)};var nh=function(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e},oh=jc,sh=Nc,ih=ha?ha.isConcatSpreadable:void 0;var ah=nh,ch=function(e){return sh(e)||oh(e)||!!(ih&&e&&e[ih])};var lh=function e(t,r,n,o,s){var i=-1,a=t.length;for(n||(n=ch),s||(s=[]);++i<a;){var c=t[i];r>0&&n(c)?r>1?e(c,r-1,n,o,s):ah(s,c):o||(s[s.length]=c)}return s};var uh=function(e){return e};var hh=function(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)},dh=hh,fh=Math.max;var ph=function(e,t,r){return t=fh(void 0===t?e.length-1:t,0),function(){for(var n=arguments,o=-1,s=fh(n.length-t,0),i=Array(s);++o<s;)i[o]=n[t+o];o=-1;for(var a=Array(t+1);++o<t;)a[o]=n[o];return a[t]=r(i),dh(e,this,a)}};var mh=function(e){return function(){return e}},vh=Qa,gh=function(){try{var e=vh(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),yh=gh,bh=mh,_h=yh,wh=_h?function(e,t){return _h(e,"toString",{configurable:!0,enumerable:!1,value:bh(t),writable:!0})}:uh,Sh=wh,Eh=800,$h=16,Oh=Date.now;var Ch=function(e){var t=0,r=0;return function(){var n=Oh(),o=$h-(n-r);if(r=n,o>0){if(++t>=Eh)return arguments[0]}else t=0;return e.apply(void 0,arguments)}},Ah=Ch(Sh),Th=uh,xh=ph,Ph=Ah;var jh=function(e,t){return Ph(xh(e,t,Th),e+"")},Nh=Qa(Object,"create"),Rh=Nh;var kh=function(){this.__data__=Rh?Rh(null):{},this.size=0};var Ih=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Mh=Nh,Dh="__lodash_hash_undefined__",Fh=Object.prototype.hasOwnProperty;var Vh=function(e){var t=this.__data__;if(Mh){var r=t[e];return r===Dh?void 0:r}return Fh.call(t,e)?t[e]:void 0},Lh=Nh,Uh=Object.prototype.hasOwnProperty;var zh=Nh,Bh="__lodash_hash_undefined__";var Gh=kh,Hh=Ih,Wh=Vh,qh=function(e){var t=this.__data__;return Lh?void 0!==t[e]:Uh.call(t,e)},Kh=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=zh&&void 0===t?Bh:t,this};function Yh(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Yh.prototype.clear=Gh,Yh.prototype.delete=Hh,Yh.prototype.get=Wh,Yh.prototype.has=qh,Yh.prototype.set=Kh;var Jh=Yh;var Qh=function(){this.__data__=[],this.size=0};var Zh=function(e,t){return e===t||e!=e&&t!=t},Xh=Zh;var ed=function(e,t){for(var r=e.length;r--;)if(Xh(e[r][0],t))return r;return-1},td=ed,rd=Array.prototype.splice;var nd=function(e){var t=this.__data__,r=td(t,e);return!(r<0)&&(r==t.length-1?t.pop():rd.call(t,r,1),--this.size,!0)},od=ed;var sd=function(e){var t=this.__data__,r=od(t,e);return r<0?void 0:t[r][1]},id=ed;var ad=ed;var cd=function(e,t){var r=this.__data__,n=ad(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this},ld=Qh,ud=nd,hd=sd,dd=function(e){return id(this.__data__,e)>-1},fd=cd;function pd(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}pd.prototype.clear=ld,pd.prototype.delete=ud,pd.prototype.get=hd,pd.prototype.has=dd,pd.prototype.set=fd;var md=pd,vd=Jh,gd=md,yd=Xa;var bd=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e},_d=bd;var wd=function(e,t){var r=e.__data__;return _d(t)?r["string"==typeof t?"string":"hash"]:r.map},Sd=wd;var Ed=wd;var $d=wd;var Od=wd;var Cd=function(){this.size=0,this.__data__={hash:new vd,map:new(yd||gd),string:new vd}},Ad=function(e){var t=Sd(this,e).delete(e);return this.size-=t?1:0,t},Td=function(e){return Ed(this,e).get(e)},xd=function(e){return $d(this,e).has(e)},Pd=function(e,t){var r=Od(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this};function jd(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}jd.prototype.clear=Cd,jd.prototype.delete=Ad,jd.prototype.get=Td,jd.prototype.has=xd,jd.prototype.set=Pd;var Nd=jd,Rd="__lodash_hash_undefined__";var kd=Nd,Id=function(e){return this.__data__.set(e,Rd),this},Md=function(e){return this.__data__.has(e)};function Dd(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new kd;++t<r;)this.add(e[t])}Dd.prototype.add=Dd.prototype.push=Id,Dd.prototype.has=Md;var Fd=Dd;var Vd=function(e,t,r,n){for(var o=e.length,s=r+(n?1:-1);n?s--:++s<o;)if(t(e[s],s,e))return s;return-1};var Ld=function(e,t,r){for(var n=r-1,o=e.length;++n<o;)if(e[n]===t)return n;return-1},Ud=Vd,zd=function(e){return e!=e},Bd=Ld;var Gd=function(e,t,r){return t==t?Bd(e,t,r):Ud(e,zd,r)},Hd=Gd;var Wd=function(e,t){return!!(null==e?0:e.length)&&Hd(e,t,0)>-1};var qd=function(e,t,r){for(var n=-1,o=null==e?0:e.length;++n<o;)if(r(t,e[n]))return!0;return!1};var Kd=function(e,t){return e.has(t)};var Yd=function(){};var Jd=function(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=e})),r},Qd=tc,Zd=Yd,Xd=Qd&&1/Jd(new Qd([,-0]))[1]==1/0?function(e){return new Qd(e)}:Zd,ef=Fd,tf=Wd,rf=qd,nf=Kd,of=Xd,sf=Jd,af=200;var cf=function(e,t,r){var n=-1,o=tf,s=e.length,i=!0,a=[],c=a;if(r)i=!1,o=rf;else if(s>=af){var l=t?null:of(e);if(l)return sf(l);i=!1,o=nf,c=new ef}else c=t?[]:a;e:for(;++n<s;){var u=e[n],h=t?t(u):u;if(u=r||0!==u?u:0,i&&h==h){for(var d=c.length;d--;)if(c[d]===h)continue e;t&&c.push(h),a.push(u)}else o(c,h,r)||(c!==a&&c.push(h),a.push(u))}return a},lf=Dc,uf=Sc;var hf=function(e){return uf(e)&&lf(e)},df=lh,ff=cf,pf=hf;jh((function(e){return ff(df(e,1,pf,!0))}));var mf=md;var vf=md,gf=Xa,yf=Nd,bf=200;var _f=md,wf=function(){this.__data__=new mf,this.size=0},Sf=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},Ef=function(e){return this.__data__.get(e)},$f=function(e){return this.__data__.has(e)},Of=function(e,t){var r=this.__data__;if(r instanceof vf){var n=r.__data__;if(!gf||n.length<bf-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new yf(n)}return r.set(e,t),this.size=r.size,this};function Cf(e){var t=this.__data__=new _f(e);this.size=t.size}Cf.prototype.clear=wf,Cf.prototype.delete=Sf,Cf.prototype.get=Ef,Cf.prototype.has=$f,Cf.prototype.set=Of;var Af=Cf,Tf=yh;var xf=function(e,t,r){"__proto__"==t&&Tf?Tf(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r},Pf=xf,jf=Zh;var Nf=function(e,t,r){(void 0!==r&&!jf(e[t],r)||void 0===r&&!(t in e))&&Pf(e,t,r)};var Rf=function(e){return function(t,r,n){for(var o=-1,s=Object(t),i=n(t),a=i.length;a--;){var c=i[e?a:++o];if(!1===r(s[c],c,s))break}return t}},kf=Rf(),If={exports:{}};!function(e,t){var r=ua,n=t&&!t.nodeType&&t,o=n&&e&&!e.nodeType&&e,s=o&&o.exports===n?r.Buffer:void 0,i=s?s.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var r=e.length,n=i?i(r):new e.constructor(r);return e.copy(n),n}}(If,If.exports);var Mf=ua.Uint8Array,Df=Mf;var Ff=function(e){var t=new e.constructor(e.byteLength);return new Df(t).set(new Df(e)),t},Vf=Ff;var Lf=function(e,t){var r=t?Vf(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)};var Uf=function(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t},zf=Oa,Bf=Object.create,Gf=function(){function e(){}return function(t){if(!zf(t))return{};if(Bf)return Bf(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}(),Hf=ta(Object.getPrototypeOf,Object),Wf=Gf,qf=Hf,Kf=ea;var Yf=function(e){return"function"!=typeof e.constructor||Kf(e)?{}:Wf(qf(e))},Jf=$a,Qf=Hf,Zf=Sc,Xf="[object Object]",ep=Function.prototype,tp=Object.prototype,rp=ep.toString,np=tp.hasOwnProperty,op=rp.call(Object);var sp=function(e){if(!Zf(e)||Jf(e)!=Xf)return!1;var t=Qf(e);if(null===t)return!0;var r=np.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&rp.call(r)==op};var ip=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]},ap=xf,cp=Zh,lp=Object.prototype.hasOwnProperty;var up=function(e,t,r){var n=e[t];lp.call(e,t)&&cp(n,r)&&(void 0!==r||t in e)||ap(e,t,r)},hp=up,dp=xf;var fp=function(e,t,r,n){var o=!r;r||(r={});for(var s=-1,i=t.length;++s<i;){var a=t[s],c=n?n(r[a],e[a],a,r,e):void 0;void 0===c&&(c=e[a]),o?dp(r,a,c):hp(r,a,c)}return r};var pp=Oa,mp=ea,vp=function(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t},gp=Object.prototype.hasOwnProperty;var yp=Zu,bp=function(e){if(!pp(e))return vp(e);var t=mp(e),r=[];for(var n in e)("constructor"!=n||!t&&gp.call(e,n))&&r.push(n);return r},_p=Dc;var wp=function(e){return _p(e)?yp(e,!0):bp(e)},Sp=fp,Ep=wp;var $p=Nf,Op=If.exports,Cp=Lf,Ap=Uf,Tp=Yf,xp=jc,Pp=Nc,jp=hf,Np=Fc.exports,Rp=Ra,kp=Oa,Ip=sp,Mp=Qc,Dp=ip,Fp=function(e){return Sp(e,Ep(e))};var Vp=Af,Lp=Nf,Up=kf,zp=function(e,t,r,n,o,s,i){var a=Dp(e,r),c=Dp(t,r),l=i.get(c);if(l)$p(e,r,l);else{var u=s?s(a,c,r+"",e,t,i):void 0,h=void 0===u;if(h){var d=Pp(c),f=!d&&Np(c),p=!d&&!f&&Mp(c);u=c,d||f||p?Pp(a)?u=a:jp(a)?u=Ap(a):f?(h=!1,u=Op(c,!0)):p?(h=!1,u=Cp(c,!0)):u=[]:Ip(c)||xp(c)?(u=a,xp(a)?u=Fp(a):kp(a)&&!Rp(a)||(u=Tp(c))):h=!1}h&&(i.set(c,u),o(u,c,n,s,i),i.delete(c)),$p(e,r,u)}},Bp=Oa,Gp=wp,Hp=ip;var Wp=function e(t,r,n,o,s){t!==r&&Up(r,(function(i,a){if(s||(s=new Vp),Bp(i))zp(t,r,a,n,e,o,s);else{var c=o?o(Hp(t,a),i,a+"",t,r,s):void 0;void 0===c&&(c=i),Lp(t,a,c)}}),Gp)},qp=Zh,Kp=Dc,Yp=Gu,Jp=Oa;var Qp=function(e,t,r){if(!Jp(r))return!1;var n=typeof t;return!!("number"==n?Kp(r)&&Yp(t,r.length):"string"==n&&t in r)&&qp(r[t],e)},Zp=jh,Xp=Qp;var em=function(e){return Zp((function(t,r){var n=-1,o=r.length,s=o>1?r[o-1]:void 0,i=o>2?r[2]:void 0;for(s=e.length>3&&"function"==typeof s?(o--,s):void 0,i&&Xp(r[0],r[1],i)&&(s=o<3?void 0:s,o=1),t=Object(t);++n<o;){var a=r[n];a&&e(t,a,n,s)}return t}))},tm=Wp,rm=em((function(e,t,r){tm(e,t,r)}));var nm=function(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e},om=fp,sm=rh;var im=function(e,t){return e&&om(t,sm(t),e)},am=fp,cm=wp;var lm=function(e,t){return e&&am(t,cm(t),e)};var um=function(e,t){for(var r=-1,n=null==e?0:e.length,o=0,s=[];++r<n;){var i=e[r];t(i,r,e)&&(s[o++]=i)}return s};var hm=function(){return[]},dm=um,fm=hm,pm=Object.prototype.propertyIsEnumerable,mm=Object.getOwnPropertySymbols,vm=mm?function(e){return null==e?[]:(e=Object(e),dm(mm(e),(function(t){return pm.call(e,t)})))}:fm,gm=fp,ym=vm;var bm=function(e,t){return gm(e,ym(e),t)},_m=nh,wm=Hf,Sm=vm,Em=hm,$m=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)_m(t,Sm(e)),e=wm(e);return t}:Em,Om=fp,Cm=$m;var Am=function(e,t){return Om(e,Cm(e),t)},Tm=nh,xm=Nc;var Pm=function(e,t,r){var n=t(e);return xm(e)?n:Tm(n,r(e))},jm=Pm,Nm=vm,Rm=rh;var km=function(e){return jm(e,Rm,Nm)},Im=Pm,Mm=$m,Dm=wp;var Fm=function(e){return Im(e,Dm,Mm)},Vm=Object.prototype.hasOwnProperty;var Lm=function(e){var t=e.length,r=new e.constructor(t);return t&&"string"==typeof e[0]&&Vm.call(e,"index")&&(r.index=e.index,r.input=e.input),r},Um=Ff;var zm=function(e,t){var r=t?Um(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)},Bm=/\w*$/;var Gm=function(e){var t=new e.constructor(e.source,Bm.exec(e));return t.lastIndex=e.lastIndex,t},Hm=ha?ha.prototype:void 0,Wm=Hm?Hm.valueOf:void 0;var qm=Ff,Km=zm,Ym=Gm,Jm=function(e){return Wm?Object(Wm.call(e)):{}},Qm=Lf,Zm="[object Boolean]",Xm="[object Date]",ev="[object Map]",tv="[object Number]",rv="[object RegExp]",nv="[object Set]",ov="[object String]",sv="[object Symbol]",iv="[object ArrayBuffer]",av="[object DataView]",cv="[object Float32Array]",lv="[object Float64Array]",uv="[object Int8Array]",hv="[object Int16Array]",dv="[object Int32Array]",fv="[object Uint8Array]",pv="[object Uint8ClampedArray]",mv="[object Uint16Array]",vv="[object Uint32Array]";var gv=function(e,t,r){var n=e.constructor;switch(t){case iv:return qm(e);case Zm:case Xm:return new n(+e);case av:return Km(e,r);case cv:case lv:case uv:case hv:case dv:case fv:case pv:case mv:case vv:return Qm(e,r);case ev:return new n;case tv:case ov:return new n(e);case rv:return Ym(e);case nv:return new n;case sv:return Jm(e)}},yv=wc,bv=Sc,_v="[object Map]";var wv=function(e){return bv(e)&&yv(e)==_v},Sv=Hc,Ev=Wc.exports,$v=Ev&&Ev.isMap,Ov=$v?Sv($v):wv,Cv=wc,Av=Sc,Tv="[object Set]";var xv=function(e){return Av(e)&&Cv(e)==Tv},Pv=Hc,jv=Wc.exports,Nv=jv&&jv.isSet,Rv=Nv?Pv(Nv):xv,kv=Af,Iv=nm,Mv=up,Dv=im,Fv=lm,Vv=If.exports,Lv=Uf,Uv=bm,zv=Am,Bv=km,Gv=Fm,Hv=wc,Wv=Lm,qv=gv,Kv=Yf,Yv=Nc,Jv=Fc.exports,Qv=Ov,Zv=Oa,Xv=Rv,eg=rh,tg=wp,rg=1,ng=2,og=4,sg="[object Arguments]",ig="[object Function]",ag="[object GeneratorFunction]",cg="[object Object]",lg={};lg[sg]=lg["[object Array]"]=lg["[object ArrayBuffer]"]=lg["[object DataView]"]=lg["[object Boolean]"]=lg["[object Date]"]=lg["[object Float32Array]"]=lg["[object Float64Array]"]=lg["[object Int8Array]"]=lg["[object Int16Array]"]=lg["[object Int32Array]"]=lg["[object Map]"]=lg["[object Number]"]=lg[cg]=lg["[object RegExp]"]=lg["[object Set]"]=lg["[object String]"]=lg["[object Symbol]"]=lg["[object Uint8Array]"]=lg["[object Uint8ClampedArray]"]=lg["[object Uint16Array]"]=lg["[object Uint32Array]"]=!0,lg["[object Error]"]=lg[ig]=lg["[object WeakMap]"]=!1;var ug=function e(t,r,n,o,s,i){var a,c=r&rg,l=r&ng,u=r&og;if(n&&(a=s?n(t,o,s,i):n(t)),void 0!==a)return a;if(!Zv(t))return t;var h=Yv(t);if(h){if(a=Wv(t),!c)return Lv(t,a)}else{var d=Hv(t),f=d==ig||d==ag;if(Jv(t))return Vv(t,c);if(d==cg||d==sg||f&&!s){if(a=l||f?{}:Kv(t),!c)return l?zv(t,Fv(a,t)):Uv(t,Dv(a,t))}else{if(!lg[d])return s?t:{};a=qv(t,d,c)}}i||(i=new kv);var p=i.get(t);if(p)return p;i.set(t,a),Xv(t)?t.forEach((function(o){a.add(e(o,r,n,o,t,i))})):Qv(t)&&t.forEach((function(o,s){a.set(s,e(o,r,n,s,t,i))}));var m=h?void 0:(u?l?Gv:Bv:l?tg:eg)(t);return Iv(m||t,(function(o,s){m&&(o=t[s=o]),Mv(a,s,e(o,r,n,s,t,i))})),a},hg=ug,dg=1,fg=4;var pg,mg=function(e){return hg(e,dg|fg)},vg={};(pg=vg).aliasToReal={each:"forEach",eachRight:"forEachRight",entries:"toPairs",entriesIn:"toPairsIn",extend:"assignIn",extendAll:"assignInAll",extendAllWith:"assignInAllWith",extendWith:"assignInWith",first:"head",conforms:"conformsTo",matches:"isMatch",property:"get",__:"placeholder",F:"stubFalse",T:"stubTrue",all:"every",allPass:"overEvery",always:"constant",any:"some",anyPass:"overSome",apply:"spread",assoc:"set",assocPath:"set",complement:"negate",compose:"flowRight",contains:"includes",dissoc:"unset",dissocPath:"unset",dropLast:"dropRight",dropLastWhile:"dropRightWhile",equals:"isEqual",identical:"eq",indexBy:"keyBy",init:"initial",invertObj:"invert",juxt:"over",omitAll:"omit",nAry:"ary",path:"get",pathEq:"matchesProperty",pathOr:"getOr",paths:"at",pickAll:"pick",pipe:"flow",pluck:"map",prop:"get",propEq:"matchesProperty",propOr:"getOr",props:"at",symmetricDifference:"xor",symmetricDifferenceBy:"xorBy",symmetricDifferenceWith:"xorWith",takeLast:"takeRight",takeLastWhile:"takeRightWhile",unapply:"rest",unnest:"flatten",useWith:"overArgs",where:"conformsTo",whereEq:"isMatch",zipObj:"zipObject"},pg.aryMethod={1:["assignAll","assignInAll","attempt","castArray","ceil","create","curry","curryRight","defaultsAll","defaultsDeepAll","floor","flow","flowRight","fromPairs","invert","iteratee","memoize","method","mergeAll","methodOf","mixin","nthArg","over","overEvery","overSome","rest","reverse","round","runInContext","spread","template","trim","trimEnd","trimStart","uniqueId","words","zipAll"],2:["add","after","ary","assign","assignAllWith","assignIn","assignInAllWith","at","before","bind","bindAll","bindKey","chunk","cloneDeepWith","cloneWith","concat","conformsTo","countBy","curryN","curryRightN","debounce","defaults","defaultsDeep","defaultTo","delay","difference","divide","drop","dropRight","dropRightWhile","dropWhile","endsWith","eq","every","filter","find","findIndex","findKey","findLast","findLastIndex","findLastKey","flatMap","flatMapDeep","flattenDepth","forEach","forEachRight","forIn","forInRight","forOwn","forOwnRight","get","groupBy","gt","gte","has","hasIn","includes","indexOf","intersection","invertBy","invoke","invokeMap","isEqual","isMatch","join","keyBy","lastIndexOf","lt","lte","map","mapKeys","mapValues","matchesProperty","maxBy","meanBy","merge","mergeAllWith","minBy","multiply","nth","omit","omitBy","overArgs","pad","padEnd","padStart","parseInt","partial","partialRight","partition","pick","pickBy","propertyOf","pull","pullAll","pullAt","random","range","rangeRight","rearg","reject","remove","repeat","restFrom","result","sampleSize","some","sortBy","sortedIndex","sortedIndexOf","sortedLastIndex","sortedLastIndexOf","sortedUniqBy","split","spreadFrom","startsWith","subtract","sumBy","take","takeRight","takeRightWhile","takeWhile","tap","throttle","thru","times","trimChars","trimCharsEnd","trimCharsStart","truncate","union","uniqBy","uniqWith","unset","unzipWith","without","wrap","xor","zip","zipObject","zipObjectDeep"],3:["assignInWith","assignWith","clamp","differenceBy","differenceWith","findFrom","findIndexFrom","findLastFrom","findLastIndexFrom","getOr","includesFrom","indexOfFrom","inRange","intersectionBy","intersectionWith","invokeArgs","invokeArgsMap","isEqualWith","isMatchWith","flatMapDepth","lastIndexOfFrom","mergeWith","orderBy","padChars","padCharsEnd","padCharsStart","pullAllBy","pullAllWith","rangeStep","rangeStepRight","reduce","reduceRight","replace","set","slice","sortedIndexBy","sortedLastIndexBy","transform","unionBy","unionWith","update","xorBy","xorWith","zipWith"],4:["fill","setWith","updateWith"]},pg.aryRearg={2:[1,0],3:[2,0,1],4:[3,2,0,1]},pg.iterateeAry={dropRightWhile:1,dropWhile:1,every:1,filter:1,find:1,findFrom:1,findIndex:1,findIndexFrom:1,findKey:1,findLast:1,findLastFrom:1,findLastIndex:1,findLastIndexFrom:1,findLastKey:1,flatMap:1,flatMapDeep:1,flatMapDepth:1,forEach:1,forEachRight:1,forIn:1,forInRight:1,forOwn:1,forOwnRight:1,map:1,mapKeys:1,mapValues:1,partition:1,reduce:2,reduceRight:2,reject:1,remove:1,some:1,takeRightWhile:1,takeWhile:1,times:1,transform:2},pg.iterateeRearg={mapKeys:[1],reduceRight:[1,0]},pg.methodRearg={assignInAllWith:[1,0],assignInWith:[1,2,0],assignAllWith:[1,0],assignWith:[1,2,0],differenceBy:[1,2,0],differenceWith:[1,2,0],getOr:[2,1,0],intersectionBy:[1,2,0],intersectionWith:[1,2,0],isEqualWith:[1,2,0],isMatchWith:[2,1,0],mergeAllWith:[1,0],mergeWith:[1,2,0],padChars:[2,1,0],padCharsEnd:[2,1,0],padCharsStart:[2,1,0],pullAllBy:[2,1,0],pullAllWith:[2,1,0],rangeStep:[1,2,0],rangeStepRight:[1,2,0],setWith:[3,1,2,0],sortedIndexBy:[2,1,0],sortedLastIndexBy:[2,1,0],unionBy:[1,2,0],unionWith:[1,2,0],updateWith:[3,1,2,0],xorBy:[1,2,0],xorWith:[1,2,0],zipWith:[1,2,0]},pg.methodSpread={assignAll:{start:0},assignAllWith:{start:0},assignInAll:{start:0},assignInAllWith:{start:0},defaultsAll:{start:0},defaultsDeepAll:{start:0},invokeArgs:{start:2},invokeArgsMap:{start:2},mergeAll:{start:0},mergeAllWith:{start:0},partial:{start:1},partialRight:{start:1},without:{start:1},zipAll:{start:0}},pg.mutate={array:{fill:!0,pull:!0,pullAll:!0,pullAllBy:!0,pullAllWith:!0,pullAt:!0,remove:!0,reverse:!0},object:{assign:!0,assignAll:!0,assignAllWith:!0,assignIn:!0,assignInAll:!0,assignInAllWith:!0,assignInWith:!0,assignWith:!0,defaults:!0,defaultsAll:!0,defaultsDeep:!0,defaultsDeepAll:!0,merge:!0,mergeAll:!0,mergeAllWith:!0,mergeWith:!0},set:{set:!0,setWith:!0,unset:!0,update:!0,updateWith:!0}},pg.realToAlias=function(){var e=Object.prototype.hasOwnProperty,t=pg.aliasToReal,r={};for(var n in t){var o=t[n];e.call(r,o)?r[o].push(n):r[o]=[n]}return r}(),pg.remap={assignAll:"assign",assignAllWith:"assignWith",assignInAll:"assignIn",assignInAllWith:"assignInWith",curryN:"curry",curryRightN:"curryRight",defaultsAll:"defaults",defaultsDeepAll:"defaultsDeep",findFrom:"find",findIndexFrom:"findIndex",findLastFrom:"findLast",findLastIndexFrom:"findLastIndex",getOr:"get",includesFrom:"includes",indexOfFrom:"indexOf",invokeArgs:"invoke",invokeArgsMap:"invokeMap",lastIndexOfFrom:"lastIndexOf",mergeAll:"merge",mergeAllWith:"mergeWith",padChars:"pad",padCharsEnd:"padEnd",padCharsStart:"padStart",propertyOf:"get",rangeStep:"range",rangeStepRight:"rangeRight",restFrom:"rest",spreadFrom:"spread",trimChars:"trim",trimCharsEnd:"trimEnd",trimCharsStart:"trimStart",zipAll:"zip"},pg.skipFixed={castArray:!0,flow:!0,flowRight:!0,iteratee:!0,mixin:!0,rearg:!0,runInContext:!0},pg.skipRearg={add:!0,assign:!0,assignIn:!0,bind:!0,bindKey:!0,concat:!0,difference:!0,divide:!0,eq:!0,gt:!0,gte:!0,isEqual:!0,lt:!0,lte:!0,matchesProperty:!0,merge:!0,multiply:!0,overArgs:!0,partial:!0,partialRight:!0,propertyOf:!0,random:!0,range:!0,rangeRight:!0,subtract:!0,zip:!0,zipObject:!0,zipObjectDeep:!0};var gg={},yg=vg,bg=gg,_g=Array.prototype.push;function wg(e,t){return 2==t?function(t,r){return e(t,r)}:function(t){return e(t)}}function Sg(e){for(var t=e?e.length:0,r=Array(t);t--;)r[t]=e[t];return r}function Eg(e,t){return function(){var r=arguments.length;if(r){for(var n=Array(r);r--;)n[r]=arguments[r];var o=n[0]=t.apply(void 0,n);return e.apply(void 0,n),o}}}var $g=function e(t,r,n,o){var s="function"==typeof r,i=r===Object(r);if(i&&(o=n,n=r,r=void 0),null==n)throw new TypeError;o||(o={});var a={cap:!("cap"in o)||o.cap,curry:!("curry"in o)||o.curry,fixed:!("fixed"in o)||o.fixed,immutable:!("immutable"in o)||o.immutable,rearg:!("rearg"in o)||o.rearg},c=s?n:bg,l="curry"in o&&o.curry,u="fixed"in o&&o.fixed,h="rearg"in o&&o.rearg,d=s?n.runInContext():void 0,f=s?n:{ary:t.ary,assign:t.assign,clone:t.clone,curry:t.curry,forEach:t.forEach,isArray:t.isArray,isError:t.isError,isFunction:t.isFunction,isWeakMap:t.isWeakMap,iteratee:t.iteratee,keys:t.keys,rearg:t.rearg,toInteger:t.toInteger,toPath:t.toPath},p=f.ary,m=f.assign,v=f.clone,g=f.curry,y=f.forEach,b=f.isArray,_=f.isError,w=f.isFunction,S=f.isWeakMap,E=f.keys,$=f.rearg,O=f.toInteger,C=f.toPath,A=E(yg.aryMethod),T={castArray:function(e){return function(){var t=arguments[0];return b(t)?e(Sg(t)):e.apply(void 0,arguments)}},iteratee:function(e){return function(){var t=arguments[1],r=e(arguments[0],t),n=r.length;return a.cap&&"number"==typeof t?(t=t>2?t-2:1,n&&n<=t?r:wg(r,t)):r}},mixin:function(e){return function(t){var r=this;if(!w(r))return e(r,Object(t));var n=[];return y(E(t),(function(e){w(t[e])&&n.push([e,r.prototype[e]])})),e(r,Object(t)),y(n,(function(e){var t=e[1];w(t)?r.prototype[e[0]]=t:delete r.prototype[e[0]]})),r}},nthArg:function(e){return function(t){var r=t<0?1:O(t)+1;return g(e(t),r)}},rearg:function(e){return function(t,r){var n=r?r.length:0;return g(e(t,r),n)}},runInContext:function(r){return function(n){return e(t,r(n),o)}}};function x(e,t){if(a.cap){var r=yg.iterateeRearg[e];if(r)return function(e,t){return k(e,(function(e){var r=t.length;return function(e,t){return 2==t?function(t,r){return e.apply(void 0,arguments)}:function(t){return e.apply(void 0,arguments)}}($(wg(e,r),t),r)}))}(t,r);var n=!s&&yg.iterateeAry[e];if(n)return function(e,t){return k(e,(function(e){return"function"==typeof e?wg(e,t):e}))}(t,n)}return t}function P(e,t,r){if(a.fixed&&(u||!yg.skipFixed[e])){var n=yg.methodSpread[e],o=n&&n.start;return void 0===o?p(t,r):function(e,t){return function(){for(var r=arguments.length,n=r-1,o=Array(r);r--;)o[r]=arguments[r];var s=o[t],i=o.slice(0,t);return s&&_g.apply(i,s),t!=n&&_g.apply(i,o.slice(t+1)),e.apply(this,i)}}(t,o)}return t}function j(e,t,r){return a.rearg&&r>1&&(h||!yg.skipRearg[e])?$(t,yg.methodRearg[e]||yg.aryRearg[r]):t}function N(e,t){for(var r=-1,n=(t=C(t)).length,o=n-1,s=v(Object(e)),i=s;null!=i&&++r<n;){var a=t[r],c=i[a];null==c||w(c)||_(c)||S(c)||(i[a]=v(r==o?c:Object(c))),i=i[a]}return s}function R(t,r){var n=yg.aliasToReal[t]||t,i=yg.remap[n]||n,a=o;return function(t){var o=s?d:f,c=s?d[i]:r,l=m(m({},a),t);return e(o,n,c,l)}}function k(e,t){return function(){var r=arguments.length;if(!r)return e();for(var n=Array(r);r--;)n[r]=arguments[r];var o=a.rearg?0:r-1;return n[o]=t(n[o]),e.apply(void 0,n)}}function I(e,t,r){var n,o=yg.aliasToReal[e]||e,s=t,i=T[o];return i?s=i(t):a.immutable&&(yg.mutate.array[o]?s=Eg(t,Sg):yg.mutate.object[o]?s=Eg(t,function(e){return function(t){return e({},t)}}(t)):yg.mutate.set[o]&&(s=Eg(t,N))),y(A,(function(e){return y(yg.aryMethod[e],(function(t){if(o==t){var r=yg.methodSpread[o],i=r&&r.afterRearg;return n=i?P(o,j(o,s,e),e):j(o,P(o,s,e),e),n=function(e,t,r){return l||a.curry&&r>1?g(t,r):t}(0,n=x(o,n),e),!1}})),!n})),n||(n=s),n==t&&(n=l?g(n,1):function(){return t.apply(this,arguments)}),n.convert=R(o,t),n.placeholder=t.placeholder=r,n}if(!i)return I(r,n,c);var M=n,D=[];return y(A,(function(e){y(yg.aryMethod[e],(function(e){var t=M[yg.remap[e]||e];t&&D.push([e,I(e,t,M)])}))})),y(E(M),(function(e){var t=M[e];if("function"==typeof t){for(var r=D.length;r--;)if(D[r][0]==e)return;t.convert=R(e,t),D.push([e,t])}})),y(D,(function(e){M[e[0]]=e[1]})),M.convert=function(e){return M.runInContext.convert(e)(void 0)},M.placeholder=M,y(E(M),(function(e){y(yg.realToAlias[e]||[],(function(t){M[t]=M[e]}))})),M},Og=rc&&new rc,Cg=Og,Ag=Cg?function(e,t){return Cg.set(e,t),e}:uh,Tg=Ag,xg=Gf,Pg=Oa;var jg=function(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var r=xg(e.prototype),n=e.apply(r,t);return Pg(n)?n:r}},Ng=jg,Rg=ua,kg=1;var Ig=function(e,t,r){var n=t&kg,o=Ng(e);return function t(){return(this&&this!==Rg&&this instanceof t?o:e).apply(n?r:this,arguments)}},Mg=Math.max;var Dg=function(e,t,r,n){for(var o=-1,s=e.length,i=r.length,a=-1,c=t.length,l=Mg(s-i,0),u=Array(c+l),h=!n;++a<c;)u[a]=t[a];for(;++o<i;)(h||o<s)&&(u[r[o]]=e[o]);for(;l--;)u[a++]=e[o++];return u},Fg=Math.max;var Vg=function(e,t,r,n){for(var o=-1,s=e.length,i=-1,a=r.length,c=-1,l=t.length,u=Fg(s-a,0),h=Array(u+l),d=!n;++o<u;)h[o]=e[o];for(var f=o;++c<l;)h[f+c]=t[c];for(;++i<a;)(d||o<s)&&(h[f+r[i]]=e[o++]);return h};var Lg=function(e,t){for(var r=e.length,n=0;r--;)e[r]===t&&++n;return n};var Ug=function(){},zg=Gf,Bg=Ug,Gg=4294967295;function Hg(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Gg,this.__views__=[]}Hg.prototype=zg(Bg.prototype),Hg.prototype.constructor=Hg;var Wg=Hg,qg=Og,Kg=qg?function(e){return qg.get(e)}:Yd,Yg=Kg,Jg={},Qg=Object.prototype.hasOwnProperty;var Zg=function(e){for(var t=e.name+"",r=Jg[t],n=Qg.call(Jg,t)?r.length:0;n--;){var o=r[n],s=o.func;if(null==s||s==e)return o.name}return t},Xg=Gf,ey=Ug;function ty(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=void 0}ty.prototype=Xg(ey.prototype),ty.prototype.constructor=ty;var ry=Wg,ny=ty,oy=Uf;var sy=Wg,iy=ty,ay=Ug,cy=Nc,ly=Sc,uy=function(e){if(e instanceof ry)return e.clone();var t=new ny(e.__wrapped__,e.__chain__);return t.__actions__=oy(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t},hy=Object.prototype.hasOwnProperty;function dy(e){if(ly(e)&&!cy(e)&&!(e instanceof sy)){if(e instanceof iy)return e;if(hy.call(e,"__wrapped__"))return uy(e)}return new iy(e)}dy.prototype=ay.prototype,dy.prototype.constructor=dy;var fy=Wg,py=Yg,my=Zg,vy=dy;var gy=function(e){var t=my(e),r=vy[t];if("function"!=typeof r||!(t in fy.prototype))return!1;if(e===r)return!0;var n=py(r);return!!n&&e===n[0]},yy=Ch(Tg),by=/\{\n\/\* \[wrapped with (.+)\] \*/,_y=/,? & /;var wy=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;var Sy=nm,Ey=Wd,$y=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]];var Oy=function(e){var t=e.match(by);return t?t[1].split(_y):[]},Cy=function(e,t){var r=t.length;if(!r)return e;var n=r-1;return t[n]=(r>1?"& ":"")+t[n],t=t.join(r>2?", ":" "),e.replace(wy,"{\n/* [wrapped with "+t+"] */\n")},Ay=Ah,Ty=function(e,t){return Sy($y,(function(r){var n="_."+r[0];t&r[1]&&!Ey(e,n)&&e.push(n)})),e.sort()};var xy=function(e,t,r){var n=t+"";return Ay(e,Cy(n,Ty(Oy(n),r)))},Py=gy,jy=yy,Ny=xy,Ry=1,ky=2,Iy=4,My=8,Dy=32,Fy=64;var Vy=function(e,t,r,n,o,s,i,a,c,l){var u=t&My;t|=u?Dy:Fy,(t&=~(u?Fy:Dy))&Iy||(t&=~(Ry|ky));var h=[e,t,o,u?s:void 0,u?i:void 0,u?void 0:s,u?void 0:i,a,c,l],d=r.apply(void 0,h);return Py(e)&&jy(d,h),d.placeholder=n,Ny(d,e,t)};var Ly=function(e){return e.placeholder},Uy=Uf,zy=Gu,By=Math.min;var Gy=function(e,t){for(var r=e.length,n=By(t.length,r),o=Uy(e);n--;){var s=t[n];e[n]=zy(s,r)?o[s]:void 0}return e},Hy="__lodash_placeholder__";var Wy=function(e,t){for(var r=-1,n=e.length,o=0,s=[];++r<n;){var i=e[r];i!==t&&i!==Hy||(e[r]=Hy,s[o++]=r)}return s},qy=Dg,Ky=Vg,Yy=Lg,Jy=jg,Qy=Vy,Zy=Ly,Xy=Gy,eb=Wy,tb=ua,rb=1,nb=2,ob=8,sb=16,ib=128,ab=512;var cb=function e(t,r,n,o,s,i,a,c,l,u){var h=r&ib,d=r&rb,f=r&nb,p=r&(ob|sb),m=r&ab,v=f?void 0:Jy(t);return function g(){for(var y=arguments.length,b=Array(y),_=y;_--;)b[_]=arguments[_];if(p)var w=Zy(g),S=Yy(b,w);if(o&&(b=qy(b,o,s,p)),i&&(b=Ky(b,i,a,p)),y-=S,p&&y<u){var E=eb(b,w);return Qy(t,r,e,g.placeholder,n,b,E,c,l,u-y)}var $=d?n:this,O=f?$[t]:t;return y=b.length,c?b=Xy(b,c):m&&y>1&&b.reverse(),h&&l<y&&(b.length=l),this&&this!==tb&&this instanceof g&&(O=v||Jy(O)),O.apply($,b)}},lb=hh,ub=jg,hb=cb,db=Vy,fb=Ly,pb=Wy,mb=ua;var vb=function(e,t,r){var n=ub(e);return function o(){for(var s=arguments.length,i=Array(s),a=s,c=fb(o);a--;)i[a]=arguments[a];var l=s<3&&i[0]!==c&&i[s-1]!==c?[]:pb(i,c);return(s-=l.length)<r?db(e,t,hb,o.placeholder,void 0,i,l,void 0,void 0,r-s):lb(this&&this!==mb&&this instanceof o?n:e,this,i)}},gb=hh,yb=jg,bb=ua,_b=1;var wb=function(e,t,r,n){var o=t&_b,s=yb(e);return function t(){for(var i=-1,a=arguments.length,c=-1,l=n.length,u=Array(l+a),h=this&&this!==bb&&this instanceof t?s:e;++c<l;)u[c]=n[c];for(;a--;)u[c++]=arguments[++i];return gb(h,o?r:this,u)}},Sb=Dg,Eb=Vg,$b=Wy,Ob="__lodash_placeholder__",Cb=1,Ab=2,Tb=4,xb=8,Pb=128,jb=256,Nb=Math.min;var Rb=/\s/;var kb=function(e){for(var t=e.length;t--&&Rb.test(e.charAt(t)););return t},Ib=kb,Mb=/^\s+/;var Db=function(e){return e?e.slice(0,Ib(e)+1).replace(Mb,""):e},Fb=Oa,Vb=vl,Lb=NaN,Ub=/^[-+]0x[0-9a-f]+$/i,zb=/^0b[01]+$/i,Bb=/^0o[0-7]+$/i,Gb=parseInt;var Hb=function(e){if("number"==typeof e)return e;if(Vb(e))return Lb;if(Fb(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Fb(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Db(e);var r=zb.test(e);return r||Bb.test(e)?Gb(e.slice(2),r?2:8):Ub.test(e)?Lb:+e},Wb=1/0,qb=17976931348623157e292;var Kb=function(e){return e?(e=Hb(e))===Wb||e===-Wb?(e<0?-1:1)*qb:e==e?e:0:0===e?e:0},Yb=Kb;var Jb=function(e){var t=Yb(e),r=t%1;return t==t?r?t-r:t:0},Qb=Tg,Zb=Ig,Xb=vb,e_=cb,t_=wb,r_=Yg,n_=function(e,t){var r=e[1],n=t[1],o=r|n,s=o<(Cb|Ab|Pb),i=n==Pb&&r==xb||n==Pb&&r==jb&&e[7].length<=t[8]||n==(Pb|jb)&&t[7].length<=t[8]&&r==xb;if(!s&&!i)return e;n&Cb&&(e[2]=t[2],o|=r&Cb?0:Tb);var a=t[3];if(a){var c=e[3];e[3]=c?Sb(c,a,t[4]):a,e[4]=c?$b(e[3],Ob):t[4]}return(a=t[5])&&(c=e[5],e[5]=c?Eb(c,a,t[6]):a,e[6]=c?$b(e[5],Ob):t[6]),(a=t[7])&&(e[7]=a),n&Pb&&(e[8]=null==e[8]?t[8]:Nb(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=o,e},o_=yy,s_=xy,i_=Jb,a_="Expected a function",c_=1,l_=2,u_=8,h_=16,d_=32,f_=64,p_=Math.max;var m_=function(e,t,r,n,o,s,i,a){var c=t&l_;if(!c&&"function"!=typeof e)throw new TypeError(a_);var l=n?n.length:0;if(l||(t&=~(d_|f_),n=o=void 0),i=void 0===i?i:p_(i_(i),0),a=void 0===a?a:i_(a),l-=o?o.length:0,t&f_){var u=n,h=o;n=o=void 0}var d=c?void 0:r_(e),f=[e,t,r,n,o,u,h,s,i,a];if(d&&n_(f,d),e=f[0],t=f[1],r=f[2],n=f[3],o=f[4],!(a=f[9]=void 0===f[9]?c?0:e.length:p_(f[9]-l,0))&&t&(u_|h_)&&(t&=~(u_|h_)),t&&t!=c_)p=t==u_||t==h_?Xb(e,t,a):t!=d_&&t!=(c_|d_)||o.length?e_.apply(void 0,f):t_(e,t,r,n);else var p=Zb(e,t,r);return s_((d?Qb:o_)(p,f),e,t)},v_=m_,g_=128;var y_=function(e,t,r){return t=r?void 0:t,t=e&&null==t?e.length:t,v_(e,g_,void 0,void 0,void 0,void 0,t)},b_=ug,__=4;var w_=function(e){return b_(e,__)},S_=m_,E_=8;function $_(e,t,r){var n=S_(e,E_,void 0,void 0,void 0,void 0,void 0,t=r?void 0:t);return n.placeholder=$_.placeholder,n}$_.placeholder={};var O_=$_,C_=$a,A_=Sc,T_=sp,x_="[object DOMException]",P_="[object Error]";var j_=function(e){if(!A_(e))return!1;var t=C_(e);return t==P_||t==x_||"string"==typeof e.message&&"string"==typeof e.name&&!T_(e)},N_=wc,R_=Sc,k_="[object WeakMap]";var I_=function(e){return R_(e)&&N_(e)==k_};var M_=function(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1},D_=Fd,F_=M_,V_=Kd,L_=1,U_=2;var z_=function(e,t,r,n,o,s){var i=r&L_,a=e.length,c=t.length;if(a!=c&&!(i&&c>a))return!1;var l=s.get(e),u=s.get(t);if(l&&u)return l==t&&u==e;var h=-1,d=!0,f=r&U_?new D_:void 0;for(s.set(e,t),s.set(t,e);++h<a;){var p=e[h],m=t[h];if(n)var v=i?n(m,p,h,t,e,s):n(p,m,h,e,t,s);if(void 0!==v){if(v)continue;d=!1;break}if(f){if(!F_(t,(function(e,t){if(!V_(f,t)&&(p===e||o(p,e,r,n,s)))return f.push(t)}))){d=!1;break}}else if(p!==m&&!o(p,m,r,n,s)){d=!1;break}}return s.delete(e),s.delete(t),d};var B_=function(e){var t=-1,r=Array(e.size);return e.forEach((function(e,n){r[++t]=[n,e]})),r},G_=Mf,H_=Zh,W_=z_,q_=B_,K_=Jd,Y_=1,J_=2,Q_="[object Boolean]",Z_="[object Date]",X_="[object Error]",ew="[object Map]",tw="[object Number]",rw="[object RegExp]",nw="[object Set]",ow="[object String]",sw="[object Symbol]",iw="[object ArrayBuffer]",aw="[object DataView]",cw=ha?ha.prototype:void 0,lw=cw?cw.valueOf:void 0;var uw=function(e,t,r,n,o,s,i){switch(r){case aw:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case iw:return!(e.byteLength!=t.byteLength||!s(new G_(e),new G_(t)));case Q_:case Z_:case tw:return H_(+e,+t);case X_:return e.name==t.name&&e.message==t.message;case rw:case ow:return e==t+"";case ew:var a=q_;case nw:var c=n&Y_;if(a||(a=K_),e.size!=t.size&&!c)return!1;var l=i.get(e);if(l)return l==t;n|=J_,i.set(e,t);var u=W_(a(e),a(t),n,o,s,i);return i.delete(e),u;case sw:if(lw)return lw.call(e)==lw.call(t)}return!1},hw=km,dw=1,fw=Object.prototype.hasOwnProperty;var pw=function(e,t,r,n,o,s){var i=r&dw,a=hw(e),c=a.length;if(c!=hw(t).length&&!i)return!1;for(var l=c;l--;){var u=a[l];if(!(i?u in t:fw.call(t,u)))return!1}var h=s.get(e),d=s.get(t);if(h&&d)return h==t&&d==e;var f=!0;s.set(e,t),s.set(t,e);for(var p=i;++l<c;){var m=e[u=a[l]],v=t[u];if(n)var g=i?n(v,m,u,t,e,s):n(m,v,u,e,t,s);if(!(void 0===g?m===v||o(m,v,r,n,s):g)){f=!1;break}p||(p="constructor"==u)}if(f&&!p){var y=e.constructor,b=t.constructor;y==b||!("constructor"in e)||!("constructor"in t)||"function"==typeof y&&y instanceof y&&"function"==typeof b&&b instanceof b||(f=!1)}return s.delete(e),s.delete(t),f},mw=Af,vw=z_,gw=uw,yw=pw,bw=wc,_w=Nc,ww=Fc.exports,Sw=Qc,Ew=1,$w="[object Arguments]",Ow="[object Array]",Cw="[object Object]",Aw=Object.prototype.hasOwnProperty;var Tw=function(e,t,r,n,o,s){var i=_w(e),a=_w(t),c=i?Ow:bw(e),l=a?Ow:bw(t),u=(c=c==$w?Cw:c)==Cw,h=(l=l==$w?Cw:l)==Cw,d=c==l;if(d&&ww(e)){if(!ww(t))return!1;i=!0,u=!1}if(d&&!u)return s||(s=new mw),i||Sw(e)?vw(e,t,r,n,o,s):gw(e,t,c,r,n,o,s);if(!(r&Ew)){var f=u&&Aw.call(e,"__wrapped__"),p=h&&Aw.call(t,"__wrapped__");if(f||p){var m=f?e.value():e,v=p?t.value():t;return s||(s=new mw),o(m,v,r,n,s)}}return!!d&&(s||(s=new mw),yw(e,t,r,n,o,s))},xw=Sc;var Pw=function e(t,r,n,o,s){return t===r||(null==t||null==r||!xw(t)&&!xw(r)?t!=t&&r!=r:Tw(t,r,n,o,e,s))},jw=Af,Nw=Pw,Rw=1,kw=2;var Iw=function(e,t,r,n){var o=r.length,s=o,i=!n;if(null==e)return!s;for(e=Object(e);o--;){var a=r[o];if(i&&a[2]?a[1]!==e[a[0]]:!(a[0]in e))return!1}for(;++o<s;){var c=(a=r[o])[0],l=e[c],u=a[1];if(i&&a[2]){if(void 0===l&&!(c in e))return!1}else{var h=new jw;if(n)var d=n(l,u,c,e,t,h);if(!(void 0===d?Nw(u,l,Rw|kw,n,h):d))return!1}}return!0},Mw=Oa;var Dw=function(e){return e==e&&!Mw(e)},Fw=Dw,Vw=rh;var Lw=function(e,t){return function(r){return null!=r&&(r[e]===t&&(void 0!==t||e in Object(r)))}},Uw=Iw,zw=function(e){for(var t=Vw(e),r=t.length;r--;){var n=t[r],o=e[n];t[r]=[n,o,Fw(o)]}return t},Bw=Lw;var Gw=function(e){var t=zw(e);return 1==t.length&&t[0][2]?Bw(t[0][0],t[0][1]):function(r){return r===e||Uw(r,e,t)}},Hw=Nc,Ww=vl,qw=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Kw=/^\w*$/;var Yw=function(e,t){if(Hw(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!Ww(e))||(Kw.test(e)||!qw.test(e)||null!=t&&e in Object(t))},Jw=Nd,Qw="Expected a function";function Zw(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError(Qw);var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],s=r.cache;if(s.has(o))return s.get(o);var i=e.apply(this,n);return r.cache=s.set(o,i)||s,i};return r.cache=new(Zw.Cache||Jw),r}Zw.Cache=Jw;var Xw=Zw,eS=500;var tS=function(e){var t=Xw(e,(function(e){return r.size===eS&&r.clear(),e})),r=t.cache;return t},rS=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,nS=/\\(\\)?/g,oS=tS((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(rS,(function(e,r,n,o){t.push(n?o.replace(nS,"$1"):r||e)})),t})),sS=Nc,iS=Yw,aS=oS,cS=Ol;var lS=function(e,t){return sS(e)?e:iS(e,t)?[e]:aS(cS(e))},uS=vl,hS=1/0;var dS=function(e){if("string"==typeof e||uS(e))return e;var t=e+"";return"0"==t&&1/e==-hS?"-0":t},fS=lS,pS=dS;var mS=function(e,t){for(var r=0,n=(t=fS(t,e)).length;null!=e&&r<n;)e=e[pS(t[r++])];return r&&r==n?e:void 0},vS=mS;var gS=function(e,t,r){var n=null==e?void 0:vS(e,t);return void 0===n?r:n};var yS=lS,bS=jc,_S=Nc,wS=Gu,SS=kc,ES=dS;var $S=function(e,t,r){for(var n=-1,o=(t=yS(t,e)).length,s=!1;++n<o;){var i=ES(t[n]);if(!(s=null!=e&&r(e,i)))break;e=e[i]}return s||++n!=o?s:!!(o=null==e?0:e.length)&&SS(o)&&wS(i,o)&&(_S(e)||bS(e))},OS=function(e,t){return null!=e&&t in Object(e)},CS=$S;var AS=Pw,TS=gS,xS=function(e,t){return null!=e&&CS(e,t,OS)},PS=Yw,jS=Dw,NS=Lw,RS=dS,kS=1,IS=2;var MS=mS;var DS=function(e){return function(t){return null==t?void 0:t[e]}},FS=function(e){return function(t){return MS(t,e)}},VS=Yw,LS=dS;var US=Gw,zS=function(e,t){return PS(e)&&jS(t)?NS(RS(e),t):function(r){var n=TS(r,e);return void 0===n&&n===t?xS(r,e):AS(t,n,kS|IS)}},BS=uh,GS=Nc,HS=function(e){return VS(e)?DS(LS(e)):FS(e)};var WS=function(e){return"function"==typeof e?e:null==e?BS:"object"==typeof e?GS(e)?zS(e[0],e[1]):US(e):HS(e)},qS=ug,KS=WS,YS=1;var JS=function(e){return KS("function"==typeof e?e:qS(e,YS))},QS=lh;var ZS=function(e){return(null==e?0:e.length)?QS(e,1):[]},XS=ph,eE=Ah;var tE=function(e){return eE(XS(e,void 0,ZS),e+"")},rE=m_,nE=tE((function(e,t){return rE(e,256,void 0,void 0,void 0,t)})),oE=dl,sE=Uf,iE=Nc,aE=vl,cE=oS,lE=dS,uE=Ol;var hE=$g,dE={ary:y_,assign:im,clone:w_,curry:O_,forEach:nm,isArray:Nc,isError:j_,isFunction:Ra,isWeakMap:I_,iteratee:JS,keys:ia,rearg:nE,toInteger:Jb,toPath:function(e){return iE(e)?oE(e,lE):aE(e)?[e]:sE(cE(uE(e)))}};var fE=function(e,t,r){return hE(dE,e,t,r)},pE=up,mE=lS,vE=Gu,gE=Oa,yE=dS;var bE=function(e,t,r,n){if(!gE(e))return e;for(var o=-1,s=(t=mE(t,e)).length,i=s-1,a=e;null!=a&&++o<s;){var c=yE(t[o]),l=r;if("__proto__"===c||"constructor"===c||"prototype"===c)return e;if(o!=i){var u=a[c];void 0===(l=n?n(u,c,a):void 0)&&(l=gE(u)?u:vE(t[o+1])?[]:{})}pE(a,c,l),a=a[c]}return e},_E=bE;var wE=fE("set",(function(e,t,r){return null==e?e:_E(e,t,r)}));wE.placeholder=gg;var SE=wE,EE=kf,$E=rh;var OE=function(e,t){return e&&EE(e,t,$E)},CE=Dc;var AE=function(e,t){return function(r,n){if(null==r)return r;if(!CE(r))return e(r,n);for(var o=r.length,s=t?o:-1,i=Object(r);(t?s--:++s<o)&&!1!==n(i[s],s,i););return r}},TE=AE(OE);var xE=function(e,t){var r=[];return TE(e,(function(e,n,o){t(e,n,o)&&r.push(e)})),r},PE=um,jE=xE,NE=WS,RE=Nc;var kE=function(e,t){return(RE(e)?PE:jE)(e,NE(t))},IE=Pw;var ME=function(e,t){return IE(e,t)},DE=vl;var FE=function(e,t,r){for(var n=-1,o=e.length;++n<o;){var s=e[n],i=t(s);if(null!=i&&(void 0===a?i==i&&!DE(i):r(i,a)))var a=i,c=s}return c};var VE=FE,LE=function(e,t){return e>t},UE=WS;var zE=function(e,t){return e&&e.length?VE(e,UE(t),LE):void 0},BE=$a,GE=Nc,HE=Sc,WE="[object String]";var qE=dl;var KE=function(e,t){return qE(t,(function(t){return e[t]}))},YE=rh;var JE=Gd,QE=Dc,ZE=function(e){return"string"==typeof e||!GE(e)&&HE(e)&&BE(e)==WE},XE=Jb,e$=function(e){return null==e?[]:KE(e,YE(e))},t$=Math.max;var r$=function(e,t,r,n){e=QE(e)?e:e$(e),r=r&&!n?XE(r):0;var o=e.length;return r<0&&(r=t$(o+r,0)),ZE(e)?r<=o&&e.indexOf(t,r)>-1:!!o&&JE(e,t,r)>-1},n$=WS,o$=Dc,s$=rh;var i$=function(e){return function(t,r,n){var o=Object(t);if(!o$(t)){var s=n$(r);t=s$(t),r=function(e){return s(o[e],e,o)}}var i=e(t,r,n);return i>-1?o[s?t[i]:i]:void 0}},a$=Vd,c$=WS,l$=Jb,u$=Math.max;var h$=function(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var o=null==r?0:l$(r);return o<0&&(o=u$(n+o,0)),a$(e,c$(t),o)},d$=i$(h$),f$=Math.ceil,p$=Math.max;var m$=function(e,t,r,n){for(var o=-1,s=p$(f$((t-e)/(r||1)),0),i=Array(s);s--;)i[n?s:++o]=e,e+=r;return i},v$=m$,g$=Qp,y$=Kb;var b$=function(e){return function(t,r,n){return n&&"number"!=typeof n&&g$(t,r,n)&&(r=n=void 0),t=y$(t),void 0===r?(r=t,t=0):r=y$(r),n=void 0===n?t<r?1:-1:y$(n),v$(t,r,n,e)}}(),_$=Object.prototype.hasOwnProperty;var w$=function(e,t){return null!=e&&_$.call(e,t)},S$=$S;var E$=function(e,t){return null!=e&&S$(e,t,w$)},$$={exports:{}},O$={},C$={},A$={},T$={},x$={},P$={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;class t{}e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class r extends t{constructor(t){if(super(),!e.IDENTIFIER.test(t))throw new Error("CodeGen: name must be a valid identifier");this.str=t}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}e.Name=r;class n extends t{constructor(e){super(),this._items="string"==typeof e?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const e=this._items[0];return""===e||'""'===e}get str(){var e;return null!==(e=this._str)&&void 0!==e?e:this._str=this._items.reduce(((e,t)=>`${e}${t}`),"")}get names(){var e;return null!==(e=this._names)&&void 0!==e?e:this._names=this._items.reduce(((e,t)=>(t instanceof r&&(e[t.str]=(e[t.str]||0)+1),e)),{})}}function o(e,...t){const r=[e[0]];let o=0;for(;o<t.length;)a(r,t[o]),r.push(e[++o]);return new n(r)}e._Code=n,e.nil=new n(""),e._=o;const s=new n("+");function i(e,...t){const r=[l(e[0])];let o=0;for(;o<t.length;)r.push(s),a(r,t[o]),r.push(s,l(e[++o]));return function(e){let t=1;for(;t<e.length-1;){if(e[t]===s){const r=c(e[t-1],e[t+1]);if(void 0!==r){e.splice(t-1,3,r);continue}e[t++]="+"}t++}}(r),new n(r)}function a(e,t){var o;t instanceof n?e.push(...t._items):t instanceof r?e.push(t):e.push("number"==typeof(o=t)||"boolean"==typeof o||null===o?o:l(Array.isArray(o)?o.join(","):o))}function c(e,t){if('""'===t)return e;if('""'===e)return t;if("string"==typeof e){if(t instanceof r||'"'!==e[e.length-1])return;return"string"!=typeof t?`${e.slice(0,-1)}${t}"`:'"'===t[0]?e.slice(0,-1)+t.slice(1):void 0}return"string"!=typeof t||'"'!==t[0]||e instanceof r?void 0:`"${e}${t.slice(1)}`}function l(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.str=i,e.addCodeArg=a,e.strConcat=function(e,t){return t.emptyStr()?e:e.emptyStr()?t:i`${e}${t}`},e.stringify=function(e){return new n(l(e))},e.safeStringify=l,e.getProperty=function(t){return"string"==typeof t&&e.IDENTIFIER.test(t)?new n(`.${t}`):o`[${t}]`},e.getEsmExportName=function(t){if("string"==typeof t&&e.IDENTIFIER.test(t))return new n(`${t}`);throw new Error(`CodeGen: invalid export name: ${t}, use explicit $id name mapping`)},e.regexpCode=function(e){return new n(e.toString())}}(P$);var j$={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;const t=P$;class r extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}}var n;!function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"}(n=e.UsedValueState||(e.UsedValueState={})),e.varKinds={const:new t.Name("const"),let:new t.Name("let"),var:new t.Name("var")};class o{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof t.Name?e:this.name(e)}name(e){return new t.Name(this._newName(e))}_newName(e){return`${e}${(this._names[e]||this._nameGroup(e)).index++}`}_nameGroup(e){var t,r;if((null===(r=null===(t=this._parent)||void 0===t?void 0:t._prefixes)||void 0===r?void 0:r.has(e))||this._prefixes&&!this._prefixes.has(e))throw new Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}}e.Scope=o;class s extends t.Name{constructor(e,t){super(t),this.prefix=e}setValue(e,{property:r,itemIndex:n}){this.value=e,this.scopePath=t._`.${new t.Name(r)}[${n}]`}}e.ValueScopeName=s;const i=t._`\n`;e.ValueScope=class extends o{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?i:t.nil}}get(){return this._scope}name(e){return new s(e,this._newName(e))}value(e,t){var r;if(void 0===t.ref)throw new Error("CodeGen: ref must be passed in value");const n=this.toName(e),{prefix:o}=n,s=null!==(r=t.key)&&void 0!==r?r:t.ref;let i=this._values[o];if(i){const e=i.get(s);if(e)return e}else i=this._values[o]=new Map;i.set(s,n);const a=this._scope[o]||(this._scope[o]=[]),c=a.length;return a[c]=t.ref,n.setValue(t,{property:o,itemIndex:c}),n}getValue(e,t){const r=this._values[e];if(r)return r.get(t)}scopeRefs(e,r=this._values){return this._reduceValues(r,(r=>{if(void 0===r.scopePath)throw new Error(`CodeGen: name "${r}" has no value`);return t._`${e}${r.scopePath}`}))}scopeCode(e=this._values,t,r){return this._reduceValues(e,(e=>{if(void 0===e.value)throw new Error(`CodeGen: name "${e}" has no value`);return e.value.code}),t,r)}_reduceValues(o,s,i={},a){let c=t.nil;for(const l in o){const u=o[l];if(!u)continue;const h=i[l]=i[l]||new Map;u.forEach((o=>{if(h.has(o))return;h.set(o,n.Started);let i=s(o);if(i){const r=this.opts.es5?e.varKinds.var:e.varKinds.const;c=t._`${c}${r} ${o} = ${i};${this.opts._n}`}else{if(!(i=null==a?void 0:a(o)))throw new r(o);c=t._`${c}${i}${this.opts._n}`}h.set(o,n.Completed)}))}return c}}}(j$),function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;const t=P$,r=j$;var n=P$;Object.defineProperty(e,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return n.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return n.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return n.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return n.Name}});var o=j$;Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return o.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return o.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return o.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return o.varKinds}}),e.operators={GT:new t._Code(">"),GTE:new t._Code(">="),LT:new t._Code("<"),LTE:new t._Code("<="),EQ:new t._Code("==="),NEQ:new t._Code("!=="),NOT:new t._Code("!"),OR:new t._Code("||"),AND:new t._Code("&&"),ADD:new t._Code("+")};class s{optimizeNodes(){return this}optimizeNames(e,t){return this}}class i extends s{constructor(e,t,r){super(),this.varKind=e,this.name=t,this.rhs=r}render({es5:e,_n:t}){const n=e?r.varKinds.var:this.varKind,o=void 0===this.rhs?"":` = ${this.rhs}`;return`${n} ${this.name}${o};`+t}optimizeNames(e,t){if(e[this.name.str])return this.rhs&&(this.rhs=x(this.rhs,e,t)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}}class a extends s{constructor(e,t,r){super(),this.lhs=e,this.rhs=t,this.sideEffects=r}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,r){if(!(this.lhs instanceof t.Name)||e[this.lhs.str]||this.sideEffects)return this.rhs=x(this.rhs,e,r),this}get names(){return T(this.lhs instanceof t.Name?{}:{...this.lhs.names},this.rhs)}}class c extends a{constructor(e,t,r,n){super(e,r,n),this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}}class l extends s{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}}class u extends s{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}}class h extends s{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}}class d extends s{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,t){return this.code=x(this.code,e,t),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}}class f extends s{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce(((t,r)=>t+r.render(e)),"")}optimizeNodes(){const{nodes:e}=this;let t=e.length;for(;t--;){const r=e[t].optimizeNodes();Array.isArray(r)?e.splice(t,1,...r):r?e[t]=r:e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){const{nodes:r}=this;let n=r.length;for(;n--;){const o=r[n];o.optimizeNames(e,t)||(P(e,o.names),r.splice(n,1))}return r.length>0?this:void 0}get names(){return this.nodes.reduce(((e,t)=>A(e,t.names)),{})}}class p extends f{render(e){return"{"+e._n+super.render(e)+"}"+e._n}}class m extends f{}class v extends p{}v.kind="else";class g extends p{constructor(e,t){super(t),this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);return this.else&&(t+="else "+this.else.render(e)),t}optimizeNodes(){super.optimizeNodes();const e=this.condition;if(!0===e)return this.nodes;let t=this.else;if(t){const e=t.optimizeNodes();t=this.else=Array.isArray(e)?new v(e):e}return t?!1===e?t instanceof g?t:t.nodes:this.nodes.length?this:new g(j(e),t instanceof g?[t]:t.nodes):!1!==e&&this.nodes.length?this:void 0}optimizeNames(e,t){var r;if(this.else=null===(r=this.else)||void 0===r?void 0:r.optimizeNames(e,t),super.optimizeNames(e,t)||this.else)return this.condition=x(this.condition,e,t),this}get names(){const e=super.names;return T(e,this.condition),this.else&&A(e,this.else.names),e}}g.kind="if";class y extends p{}y.kind="for";class b extends y{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iteration=x(this.iteration,e,t),this}get names(){return A(super.names,this.iteration.names)}}class _ extends y{constructor(e,t,r,n){super(),this.varKind=e,this.name=t,this.from=r,this.to=n}render(e){const t=e.es5?r.varKinds.var:this.varKind,{name:n,from:o,to:s}=this;return`for(${t} ${n}=${o}; ${n}<${s}; ${n}++)`+super.render(e)}get names(){const e=T(super.names,this.from);return T(e,this.to)}}class w extends y{constructor(e,t,r,n){super(),this.loop=e,this.varKind=t,this.name=r,this.iterable=n}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iterable=x(this.iterable,e,t),this}get names(){return A(super.names,this.iterable.names)}}class S extends p{constructor(e,t,r){super(),this.name=e,this.args=t,this.async=r}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}}S.kind="func";class E extends f{render(e){return"return "+super.render(e)}}E.kind="return";class $ extends p{render(e){let t="try"+super.render(e);return this.catch&&(t+=this.catch.render(e)),this.finally&&(t+=this.finally.render(e)),t}optimizeNodes(){var e,t;return super.optimizeNodes(),null===(e=this.catch)||void 0===e||e.optimizeNodes(),null===(t=this.finally)||void 0===t||t.optimizeNodes(),this}optimizeNames(e,t){var r,n;return super.optimizeNames(e,t),null===(r=this.catch)||void 0===r||r.optimizeNames(e,t),null===(n=this.finally)||void 0===n||n.optimizeNames(e,t),this}get names(){const e=super.names;return this.catch&&A(e,this.catch.names),this.finally&&A(e,this.finally.names),e}}class O extends p{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}}O.kind="catch";class C extends p{render(e){return"finally"+super.render(e)}}C.kind="finally";function A(e,t){for(const r in t)e[r]=(e[r]||0)+(t[r]||0);return e}function T(e,r){return r instanceof t._CodeOrName?A(e,r.names):e}function x(e,r,n){return e instanceof t.Name?s(e):(o=e)instanceof t._Code&&o._items.some((e=>e instanceof t.Name&&1===r[e.str]&&void 0!==n[e.str]))?new t._Code(e._items.reduce(((e,r)=>(r instanceof t.Name&&(r=s(r)),r instanceof t._Code?e.push(...r._items):e.push(r),e)),[])):e;var o;function s(e){const t=n[e.str];return void 0===t||1!==r[e.str]?e:(delete r[e.str],t)}}function P(e,t){for(const r in t)e[r]=(e[r]||0)-(t[r]||0)}function j(e){return"boolean"==typeof e||"number"==typeof e||null===e?!e:t._`!${I(e)}`}e.CodeGen=class{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?"\n":""},this._extScope=e,this._scope=new r.Scope({parent:e}),this._nodes=[new m]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,t){const r=this._extScope.value(e,t);return(this._values[r.prefix]||(this._values[r.prefix]=new Set)).add(r),r}getScopeValue(e,t){return this._extScope.getValue(e,t)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,t,r,n){const o=this._scope.toName(t);return void 0!==r&&n&&(this._constants[o.str]=r),this._leafNode(new i(e,o,r)),o}const(e,t,n){return this._def(r.varKinds.const,e,t,n)}let(e,t,n){return this._def(r.varKinds.let,e,t,n)}var(e,t,n){return this._def(r.varKinds.var,e,t,n)}assign(e,t,r){return this._leafNode(new a(e,t,r))}add(t,r){return this._leafNode(new c(t,e.operators.ADD,r))}code(e){return"function"==typeof e?e():e!==t.nil&&this._leafNode(new d(e)),this}object(...e){const r=["{"];for(const[n,o]of e)r.length>1&&r.push(","),r.push(n),(n!==o||this.opts.es5)&&(r.push(":"),(0,t.addCodeArg)(r,o));return r.push("}"),new t._Code(r)}if(e,t,r){if(this._blockNode(new g(e)),t&&r)this.code(t).else().code(r).endIf();else if(t)this.code(t).endIf();else if(r)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new g(e))}else(){return this._elseNode(new v)}endIf(){return this._endBlockNode(g,v)}_for(e,t){return this._blockNode(e),t&&this.code(t).endFor(),this}for(e,t){return this._for(new b(e),t)}forRange(e,t,n,o,s=(this.opts.es5?r.varKinds.var:r.varKinds.let)){const i=this._scope.toName(e);return this._for(new _(s,i,t,n),(()=>o(i)))}forOf(e,n,o,s=r.varKinds.const){const i=this._scope.toName(e);if(this.opts.es5){const e=n instanceof t.Name?n:this.var("_arr",n);return this.forRange("_i",0,t._`${e}.length`,(r=>{this.var(i,t._`${e}[${r}]`),o(i)}))}return this._for(new w("of",s,i,n),(()=>o(i)))}forIn(e,n,o,s=(this.opts.es5?r.varKinds.var:r.varKinds.const)){if(this.opts.ownProperties)return this.forOf(e,t._`Object.keys(${n})`,o);const i=this._scope.toName(e);return this._for(new w("in",s,i,n),(()=>o(i)))}endFor(){return this._endBlockNode(y)}label(e){return this._leafNode(new l(e))}break(e){return this._leafNode(new u(e))}return(e){const t=new E;if(this._blockNode(t),this.code(e),1!==t.nodes.length)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(E)}try(e,t,r){if(!t&&!r)throw new Error('CodeGen: "try" without "catch" and "finally"');const n=new $;if(this._blockNode(n),this.code(e),t){const e=this.name("e");this._currNode=n.catch=new O(e),t(e)}return r&&(this._currNode=n.finally=new C,this.code(r)),this._endBlockNode(O,C)}throw(e){return this._leafNode(new h(e))}block(e,t){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(t),this}endBlock(e){const t=this._blockStarts.pop();if(void 0===t)throw new Error("CodeGen: not in self-balancing block");const r=this._nodes.length-t;if(r<0||void 0!==e&&r!==e)throw new Error(`CodeGen: wrong number of nodes: ${r} vs ${e} expected`);return this._nodes.length=t,this}func(e,r=t.nil,n,o){return this._blockNode(new S(e,r,n)),o&&this.code(o).endFunc(),this}endFunc(){return this._endBlockNode(S)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,t){const r=this._currNode;if(r instanceof e||t&&r instanceof t)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){const t=this._currNode;if(!(t instanceof g))throw new Error('CodeGen: "else" without "if"');return this._currNode=t.else=e,this}get _root(){return this._nodes[0]}get _currNode(){const e=this._nodes;return e[e.length-1]}set _currNode(e){const t=this._nodes;t[t.length-1]=e}},e.not=j;const N=k(e.operators.AND);e.and=function(...e){return e.reduce(N)};const R=k(e.operators.OR);function k(e){return(r,n)=>r===t.nil?n:n===t.nil?r:t._`${I(r)} ${e} ${I(n)}`}function I(e){return e instanceof t.Name?e:t._`(${e})`}e.or=function(...e){return e.reduce(R)}}(x$);var N$={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.checkStrictMode=e.getErrorPath=e.Type=e.useFunc=e.setEvaluated=e.evaluatedPropsToName=e.mergeEvaluated=e.eachItem=e.unescapeJsonPointer=e.escapeJsonPointer=e.escapeFragment=e.unescapeFragment=e.schemaRefOrVal=e.schemaHasRulesButRef=e.schemaHasRules=e.checkUnknownRules=e.alwaysValidSchema=e.toHash=void 0;const t=x$,r=P$;function n(e,t=e.schema){const{opts:r,self:n}=e;if(!r.strictSchema)return;if("boolean"==typeof t)return;const o=n.RULES.keywords;for(const r in t)o[r]||d(e,`unknown keyword: "${r}"`)}function o(e,t){if("boolean"==typeof e)return!e;for(const r in e)if(t[r])return!0;return!1}function s(e){return"number"==typeof e?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}function i(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function a({mergeNames:e,mergeToName:r,mergeValues:n,resultToName:o}){return(s,i,a,c)=>{const l=void 0===a?i:a instanceof t.Name?(i instanceof t.Name?e(s,i,a):r(s,i,a),a):i instanceof t.Name?(r(s,a,i),i):n(i,a);return c!==t.Name||l instanceof t.Name?l:o(s,l)}}function c(e,r){if(!0===r)return e.var("props",!0);const n=e.var("props",t._`{}`);return void 0!==r&&l(e,n,r),n}function l(e,r,n){Object.keys(n).forEach((n=>e.assign(t._`${r}${(0,t.getProperty)(n)}`,!0)))}e.toHash=function(e){const t={};for(const r of e)t[r]=!0;return t},e.alwaysValidSchema=function(e,t){return"boolean"==typeof t?t:0===Object.keys(t).length||(n(e,t),!o(t,e.self.RULES.all))},e.checkUnknownRules=n,e.schemaHasRules=o,e.schemaHasRulesButRef=function(e,t){if("boolean"==typeof e)return!e;for(const r in e)if("$ref"!==r&&t.all[r])return!0;return!1},e.schemaRefOrVal=function({topSchemaRef:e,schemaPath:r},n,o,s){if(!s){if("number"==typeof n||"boolean"==typeof n)return n;if("string"==typeof n)return t._`${n}`}return t._`${e}${r}${(0,t.getProperty)(o)}`},e.unescapeFragment=function(e){return i(decodeURIComponent(e))},e.escapeFragment=function(e){return encodeURIComponent(s(e))},e.escapeJsonPointer=s,e.unescapeJsonPointer=i,e.eachItem=function(e,t){if(Array.isArray(e))for(const r of e)t(r);else t(e)},e.mergeEvaluated={props:a({mergeNames:(e,r,n)=>e.if(t._`${n} !== true && ${r} !== undefined`,(()=>{e.if(t._`${r} === true`,(()=>e.assign(n,!0)),(()=>e.assign(n,t._`${n} || {}`).code(t._`Object.assign(${n}, ${r})`)))})),mergeToName:(e,r,n)=>e.if(t._`${n} !== true`,(()=>{!0===r?e.assign(n,!0):(e.assign(n,t._`${n} || {}`),l(e,n,r))})),mergeValues:(e,t)=>!0===e||{...e,...t},resultToName:c}),items:a({mergeNames:(e,r,n)=>e.if(t._`${n} !== true && ${r} !== undefined`,(()=>e.assign(n,t._`${r} === true ? true : ${n} > ${r} ? ${n} : ${r}`))),mergeToName:(e,r,n)=>e.if(t._`${n} !== true`,(()=>e.assign(n,!0===r||t._`${n} > ${r} ? ${n} : ${r}`))),mergeValues:(e,t)=>!0===e||Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})},e.evaluatedPropsToName=c,e.setEvaluated=l;const u={};var h;function d(e,t,r=e.opts.strictSchema){if(r){if(t=`strict mode: ${t}`,!0===r)throw new Error(t);e.self.logger.warn(t)}}e.useFunc=function(e,t){return e.scopeValue("func",{ref:t,code:u[t.code]||(u[t.code]=new r._Code(t.code))})},function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"}(h=e.Type||(e.Type={})),e.getErrorPath=function(e,r,n){if(e instanceof t.Name){const o=r===h.Num;return n?o?t._`"[" + ${e} + "]"`:t._`"['" + ${e} + "']"`:o?t._`"/" + ${e}`:t._`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return n?(0,t.getProperty)(e).toString():"/"+s(e)},e.checkStrictMode=d}(N$);var R$={};Object.defineProperty(R$,"__esModule",{value:!0});const k$=x$,I$={data:new k$.Name("data"),valCxt:new k$.Name("valCxt"),instancePath:new k$.Name("instancePath"),parentData:new k$.Name("parentData"),parentDataProperty:new k$.Name("parentDataProperty"),rootData:new k$.Name("rootData"),dynamicAnchors:new k$.Name("dynamicAnchors"),vErrors:new k$.Name("vErrors"),errors:new k$.Name("errors"),this:new k$.Name("this"),self:new k$.Name("self"),scope:new k$.Name("scope"),json:new k$.Name("json"),jsonPos:new k$.Name("jsonPos"),jsonLen:new k$.Name("jsonLen"),jsonPart:new k$.Name("jsonPart")};R$.default=I$,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;const t=x$,r=N$,n=R$;function o(e,r){const o=e.const("err",r);e.if(t._`${n.default.vErrors} === null`,(()=>e.assign(n.default.vErrors,t._`[${o}]`)),t._`${n.default.vErrors}.push(${o})`),e.code(t._`${n.default.errors}++`)}function s(e,r){const{gen:n,validateName:o,schemaEnv:s}=e;s.$async?n.throw(t._`new ${e.ValidationError}(${r})`):(n.assign(t._`${o}.errors`,r),n.return(!1))}e.keywordError={message:({keyword:e})=>t.str`must pass "${e}" keyword validation`},e.keyword$DataError={message:({keyword:e,schemaType:r})=>r?t.str`"${e}" keyword must be ${r} ($data)`:t.str`"${e}" keyword is invalid ($data)`},e.reportError=function(r,n=e.keywordError,i,c){const{it:l}=r,{gen:u,compositeRule:h,allErrors:d}=l,f=a(r,n,i);(null!=c?c:h||d)?o(u,f):s(l,t._`[${f}]`)},e.reportExtraError=function(t,r=e.keywordError,i){const{it:c}=t,{gen:l,compositeRule:u,allErrors:h}=c;o(l,a(t,r,i)),u||h||s(c,n.default.vErrors)},e.resetErrorsCount=function(e,r){e.assign(n.default.errors,r),e.if(t._`${n.default.vErrors} !== null`,(()=>e.if(r,(()=>e.assign(t._`${n.default.vErrors}.length`,r)),(()=>e.assign(n.default.vErrors,null)))))},e.extendErrors=function({gen:e,keyword:r,schemaValue:o,data:s,errsCount:i,it:a}){if(void 0===i)throw new Error("ajv implementation error");const c=e.name("err");e.forRange("i",i,n.default.errors,(i=>{e.const(c,t._`${n.default.vErrors}[${i}]`),e.if(t._`${c}.instancePath === undefined`,(()=>e.assign(t._`${c}.instancePath`,(0,t.strConcat)(n.default.instancePath,a.errorPath)))),e.assign(t._`${c}.schemaPath`,t.str`${a.errSchemaPath}/${r}`),a.opts.verbose&&(e.assign(t._`${c}.schema`,o),e.assign(t._`${c}.data`,s))}))};const i={keyword:new t.Name("keyword"),schemaPath:new t.Name("schemaPath"),params:new t.Name("params"),propertyName:new t.Name("propertyName"),message:new t.Name("message"),schema:new t.Name("schema"),parentSchema:new t.Name("parentSchema")};function a(e,r,o){const{createErrors:s}=e.it;return!1===s?t._`{}`:function(e,r,o={}){const{gen:s,it:a}=e,u=[c(a,o),l(e,o)];return function(e,{params:r,message:o},s){const{keyword:a,data:c,schemaValue:l,it:u}=e,{opts:h,propertyName:d,topSchemaRef:f,schemaPath:p}=u;s.push([i.keyword,a],[i.params,"function"==typeof r?r(e):r||t._`{}`]),h.messages&&s.push([i.message,"function"==typeof o?o(e):o]);h.verbose&&s.push([i.schema,l],[i.parentSchema,t._`${f}${p}`],[n.default.data,c]);d&&s.push([i.propertyName,d])}(e,r,u),s.object(...u)}(e,r,o)}function c({errorPath:e},{instancePath:o}){const s=o?t.str`${e}${(0,r.getErrorPath)(o,r.Type.Str)}`:e;return[n.default.instancePath,(0,t.strConcat)(n.default.instancePath,s)]}function l({keyword:e,it:{errSchemaPath:n}},{schemaPath:o,parentSchema:s}){let a=s?n:t.str`${n}/${e}`;return o&&(a=t.str`${a}${(0,r.getErrorPath)(o,r.Type.Str)}`),[i.schemaPath,a]}}(T$),Object.defineProperty(A$,"__esModule",{value:!0}),A$.boolOrEmptySchema=A$.topBoolOrEmptySchema=void 0;const M$=T$,D$=x$,F$=R$,V$={message:"boolean schema is false"};function L$(e,t){const{gen:r,data:n}=e,o={gen:r,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,M$.reportError)(o,V$,void 0,t)}A$.topBoolOrEmptySchema=function(e){const{gen:t,schema:r,validateName:n}=e;!1===r?L$(e,!1):"object"==typeof r&&!0===r.$async?t.return(F$.default.data):(t.assign(D$._`${n}.errors`,null),t.return(!0))},A$.boolOrEmptySchema=function(e,t){const{gen:r,schema:n}=e;!1===n?(r.var(t,!1),L$(e)):r.var(t,!0)};var U$={},z$={};Object.defineProperty(z$,"__esModule",{value:!0}),z$.getRules=z$.isJSONType=void 0;const B$=new Set(["string","number","integer","boolean","null","object","array"]);z$.isJSONType=function(e){return"string"==typeof e&&B$.has(e)},z$.getRules=function(){const e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}};var G$={};function H$(e,t){return t.rules.some((t=>W$(e,t)))}function W$(e,t){var r;return void 0!==e[t.keyword]||(null===(r=t.definition.implements)||void 0===r?void 0:r.some((t=>void 0!==e[t])))}Object.defineProperty(G$,"__esModule",{value:!0}),G$.shouldUseRule=G$.shouldUseGroup=G$.schemaHasRulesForType=void 0,G$.schemaHasRulesForType=function({schema:e,self:t},r){const n=t.RULES.types[r];return n&&!0!==n&&H$(e,n)},G$.shouldUseGroup=H$,G$.shouldUseRule=W$,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.reportTypeError=e.checkDataTypes=e.checkDataType=e.coerceAndCheckDataType=e.getJSONTypes=e.getSchemaTypes=e.DataType=void 0;const t=z$,r=G$,n=T$,o=x$,s=N$;var i;function a(e){const r=Array.isArray(e)?e:e?[e]:[];if(r.every(t.isJSONType))return r;throw new Error("type must be JSONType or JSONType[]: "+r.join(","))}!function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"}(i=e.DataType||(e.DataType={})),e.getSchemaTypes=function(e){const t=a(e.type);if(t.includes("null")){if(!1===e.nullable)throw new Error("type: null contradicts nullable: false")}else{if(!t.length&&void 0!==e.nullable)throw new Error('"nullable" cannot be used without "type"');!0===e.nullable&&t.push("null")}return t},e.getJSONTypes=a,e.coerceAndCheckDataType=function(e,t){const{gen:n,data:s,opts:a}=e,l=function(e,t){return t?e.filter((e=>c.has(e)||"array"===t&&"array"===e)):[]}(t,a.coerceTypes),h=t.length>0&&!(0===l.length&&1===t.length&&(0,r.schemaHasRulesForType)(e,t[0]));if(h){const r=u(t,s,a.strictNumbers,i.Wrong);n.if(r,(()=>{l.length?function(e,t,r){const{gen:n,data:s,opts:i}=e,a=n.let("dataType",o._`typeof ${s}`),l=n.let("coerced",o._`undefined`);"array"===i.coerceTypes&&n.if(o._`${a} == 'object' && Array.isArray(${s}) && ${s}.length == 1`,(()=>n.assign(s,o._`${s}[0]`).assign(a,o._`typeof ${s}`).if(u(t,s,i.strictNumbers),(()=>n.assign(l,s)))));n.if(o._`${l} !== undefined`);for(const e of r)(c.has(e)||"array"===e&&"array"===i.coerceTypes)&&h(e);function h(e){switch(e){case"string":return void n.elseIf(o._`${a} == "number" || ${a} == "boolean"`).assign(l,o._`"" + ${s}`).elseIf(o._`${s} === null`).assign(l,o._`""`);case"number":return void n.elseIf(o._`${a} == "boolean" || ${s} === null
16
- || (${a} == "string" && ${s} && ${s} == +${s})`).assign(l,o._`+${s}`);case"integer":return void n.elseIf(o._`${a} === "boolean" || ${s} === null
17
- || (${a} === "string" && ${s} && ${s} == +${s} && !(${s} % 1))`).assign(l,o._`+${s}`);case"boolean":return void n.elseIf(o._`${s} === "false" || ${s} === 0 || ${s} === null`).assign(l,!1).elseIf(o._`${s} === "true" || ${s} === 1`).assign(l,!0);case"null":return n.elseIf(o._`${s} === "" || ${s} === 0 || ${s} === false`),void n.assign(l,null);case"array":n.elseIf(o._`${a} === "string" || ${a} === "number"
18
- || ${a} === "boolean" || ${s} === null`).assign(l,o._`[${s}]`)}}n.else(),d(e),n.endIf(),n.if(o._`${l} !== undefined`,(()=>{n.assign(s,l),function({gen:e,parentData:t,parentDataProperty:r},n){e.if(o._`${t} !== undefined`,(()=>e.assign(o._`${t}[${r}]`,n)))}(e,l)}))}(e,t,l):d(e)}))}return h};const c=new Set(["string","number","integer","boolean","null"]);function l(e,t,r,n=i.Correct){const s=n===i.Correct?o.operators.EQ:o.operators.NEQ;let a;switch(e){case"null":return o._`${t} ${s} null`;case"array":a=o._`Array.isArray(${t})`;break;case"object":a=o._`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":a=c(o._`!(${t} % 1) && !isNaN(${t})`);break;case"number":a=c();break;default:return o._`typeof ${t} ${s} ${e}`}return n===i.Correct?a:(0,o.not)(a);function c(e=o.nil){return(0,o.and)(o._`typeof ${t} == "number"`,e,r?o._`isFinite(${t})`:o.nil)}}function u(e,t,r,n){if(1===e.length)return l(e[0],t,r,n);let i;const a=(0,s.toHash)(e);if(a.array&&a.object){const e=o._`typeof ${t} != "object"`;i=a.null?e:o._`!${t} || ${e}`,delete a.null,delete a.array,delete a.object}else i=o.nil;a.number&&delete a.integer;for(const e in a)i=(0,o.and)(i,l(e,t,r,n));return i}e.checkDataType=l,e.checkDataTypes=u;const h={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>"string"==typeof e?o._`{type: ${e}}`:o._`{type: ${t}}`};function d(e){const t=function(e){const{gen:t,data:r,schema:n}=e,o=(0,s.schemaRefOrVal)(e,n,"type");return{gen:t,keyword:"type",data:r,schema:n.type,schemaCode:o,schemaValue:o,parentSchema:n,params:{},it:e}}(e);(0,n.reportError)(t,h)}e.reportTypeError=d}(U$);var q$={};Object.defineProperty(q$,"__esModule",{value:!0}),q$.assignDefaults=void 0;const K$=x$,Y$=N$;function J$(e,t,r){const{gen:n,compositeRule:o,data:s,opts:i}=e;if(void 0===r)return;const a=K$._`${s}${(0,K$.getProperty)(t)}`;if(o)return void(0,Y$.checkStrictMode)(e,`default is ignored for: ${a}`);let c=K$._`${a} === undefined`;"empty"===i.useDefaults&&(c=K$._`${c} || ${a} === null || ${a} === ""`),n.if(c,K$._`${a} = ${(0,K$.stringify)(r)}`)}q$.assignDefaults=function(e,t){const{properties:r,items:n}=e.schema;if("object"===t&&r)for(const t in r)J$(e,t,r[t].default);else"array"===t&&Array.isArray(n)&&n.forEach(((t,r)=>J$(e,r,t.default)))};var Q$={},Z$={};Object.defineProperty(Z$,"__esModule",{value:!0}),Z$.validateUnion=Z$.validateArray=Z$.usePattern=Z$.callValidateCode=Z$.schemaProperties=Z$.allSchemaProperties=Z$.noPropertyInData=Z$.propertyInData=Z$.isOwnProperty=Z$.hasPropFunc=Z$.reportMissingProp=Z$.checkMissingProp=Z$.checkReportMissingProp=void 0;const X$=x$,eO=N$,tO=R$,rO=N$;function nO(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:X$._`Object.prototype.hasOwnProperty`})}function oO(e,t,r){return X$._`${nO(e)}.call(${t}, ${r})`}function sO(e,t,r,n){const o=X$._`${t}${(0,X$.getProperty)(r)} === undefined`;return n?(0,X$.or)(o,(0,X$.not)(oO(e,t,r))):o}function iO(e){return e?Object.keys(e).filter((e=>"__proto__"!==e)):[]}Z$.checkReportMissingProp=function(e,t){const{gen:r,data:n,it:o}=e;r.if(sO(r,n,t,o.opts.ownProperties),(()=>{e.setParams({missingProperty:X$._`${t}`},!0),e.error()}))},Z$.checkMissingProp=function({gen:e,data:t,it:{opts:r}},n,o){return(0,X$.or)(...n.map((n=>(0,X$.and)(sO(e,t,n,r.ownProperties),X$._`${o} = ${n}`))))},Z$.reportMissingProp=function(e,t){e.setParams({missingProperty:t},!0),e.error()},Z$.hasPropFunc=nO,Z$.isOwnProperty=oO,Z$.propertyInData=function(e,t,r,n){const o=X$._`${t}${(0,X$.getProperty)(r)} !== undefined`;return n?X$._`${o} && ${oO(e,t,r)}`:o},Z$.noPropertyInData=sO,Z$.allSchemaProperties=iO,Z$.schemaProperties=function(e,t){return iO(t).filter((r=>!(0,eO.alwaysValidSchema)(e,t[r])))},Z$.callValidateCode=function({schemaCode:e,data:t,it:{gen:r,topSchemaRef:n,schemaPath:o,errorPath:s},it:i},a,c,l){const u=l?X$._`${e}, ${t}, ${n}${o}`:t,h=[[tO.default.instancePath,(0,X$.strConcat)(tO.default.instancePath,s)],[tO.default.parentData,i.parentData],[tO.default.parentDataProperty,i.parentDataProperty],[tO.default.rootData,tO.default.rootData]];i.opts.dynamicRef&&h.push([tO.default.dynamicAnchors,tO.default.dynamicAnchors]);const d=X$._`${u}, ${r.object(...h)}`;return c!==X$.nil?X$._`${a}.call(${c}, ${d})`:X$._`${a}(${d})`};const aO=X$._`new RegExp`;Z$.usePattern=function({gen:e,it:{opts:t}},r){const n=t.unicodeRegExp?"u":"",{regExp:o}=t.code,s=o(r,n);return e.scopeValue("pattern",{key:s.toString(),ref:s,code:X$._`${"new RegExp"===o.code?aO:(0,rO.useFunc)(e,o)}(${r}, ${n})`})},Z$.validateArray=function(e){const{gen:t,data:r,keyword:n,it:o}=e,s=t.name("valid");if(o.allErrors){const e=t.let("valid",!0);return i((()=>t.assign(e,!1))),e}return t.var(s,!0),i((()=>t.break())),s;function i(o){const i=t.const("len",X$._`${r}.length`);t.forRange("i",0,i,(r=>{e.subschema({keyword:n,dataProp:r,dataPropType:eO.Type.Num},s),t.if((0,X$.not)(s),o)}))}},Z$.validateUnion=function(e){const{gen:t,schema:r,keyword:n,it:o}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some((e=>(0,eO.alwaysValidSchema)(o,e)))&&!o.opts.unevaluated)return;const s=t.let("valid",!1),i=t.name("_valid");t.block((()=>r.forEach(((r,o)=>{const a=e.subschema({keyword:n,schemaProp:o,compositeRule:!0},i);t.assign(s,X$._`${s} || ${i}`);e.mergeValidEvaluated(a,i)||t.if((0,X$.not)(s))})))),e.result(s,(()=>e.reset()),(()=>e.error(!0)))},Object.defineProperty(Q$,"__esModule",{value:!0}),Q$.validateKeywordUsage=Q$.validSchemaType=Q$.funcKeywordCode=Q$.macroKeywordCode=void 0;const cO=x$,lO=R$,uO=Z$,hO=T$;function dO(e){const{gen:t,data:r,it:n}=e;t.if(n.parentData,(()=>t.assign(r,cO._`${n.parentData}[${n.parentDataProperty}]`)))}function fO(e,t,r){if(void 0===r)throw new Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword","function"==typeof r?{ref:r}:{ref:r,code:(0,cO.stringify)(r)})}Q$.macroKeywordCode=function(e,t){const{gen:r,keyword:n,schema:o,parentSchema:s,it:i}=e,a=t.macro.call(i.self,o,s,i),c=fO(r,n,a);!1!==i.opts.validateSchema&&i.self.validateSchema(a,!0);const l=r.name("valid");e.subschema({schema:a,schemaPath:cO.nil,errSchemaPath:`${i.errSchemaPath}/${n}`,topSchemaRef:c,compositeRule:!0},l),e.pass(l,(()=>e.error(!0)))},Q$.funcKeywordCode=function(e,t){var r;const{gen:n,keyword:o,schema:s,parentSchema:i,$data:a,it:c}=e;!function({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}(c,t);const l=!a&&t.compile?t.compile.call(c.self,s,i,c):t.validate,u=fO(n,o,l),h=n.let("valid");function d(r=(t.async?cO._`await `:cO.nil)){const o=c.opts.passContext?lO.default.this:lO.default.self,s=!("compile"in t&&!a||!1===t.schema);n.assign(h,cO._`${r}${(0,uO.callValidateCode)(e,u,o,s)}`,t.modifying)}function f(e){var r;n.if((0,cO.not)(null!==(r=t.valid)&&void 0!==r?r:h),e)}e.block$data(h,(function(){if(!1===t.errors)d(),t.modifying&&dO(e),f((()=>e.error()));else{const r=t.async?function(){const e=n.let("ruleErrs",null);return n.try((()=>d(cO._`await `)),(t=>n.assign(h,!1).if(cO._`${t} instanceof ${c.ValidationError}`,(()=>n.assign(e,cO._`${t}.errors`)),(()=>n.throw(t))))),e}():function(){const e=cO._`${u}.errors`;return n.assign(e,null),d(cO.nil),e}();t.modifying&&dO(e),f((()=>function(e,t){const{gen:r}=e;r.if(cO._`Array.isArray(${t})`,(()=>{r.assign(lO.default.vErrors,cO._`${lO.default.vErrors} === null ? ${t} : ${lO.default.vErrors}.concat(${t})`).assign(lO.default.errors,cO._`${lO.default.vErrors}.length`),(0,hO.extendErrors)(e)}),(()=>e.error()))}(e,r)))}})),e.ok(null!==(r=t.valid)&&void 0!==r?r:h)},Q$.validSchemaType=function(e,t,r=!1){return!t.length||t.some((t=>"array"===t?Array.isArray(e):"object"===t?e&&"object"==typeof e&&!Array.isArray(e):typeof e==t||r&&void 0===e))},Q$.validateKeywordUsage=function({schema:e,opts:t,self:r,errSchemaPath:n},o,s){if(Array.isArray(o.keyword)?!o.keyword.includes(s):o.keyword!==s)throw new Error("ajv implementation error");const i=o.dependencies;if(null==i?void 0:i.some((t=>!Object.prototype.hasOwnProperty.call(e,t))))throw new Error(`parent schema must have dependencies of ${s}: ${i.join(",")}`);if(o.validateSchema){if(!o.validateSchema(e[s])){const e=`keyword "${s}" value is invalid at path "${n}": `+r.errorsText(o.validateSchema.errors);if("log"!==t.validateSchema)throw new Error(e);r.logger.error(e)}}};var pO={};Object.defineProperty(pO,"__esModule",{value:!0}),pO.extendSubschemaMode=pO.extendSubschemaData=pO.getSubschema=void 0;const mO=x$,vO=N$;pO.getSubschema=function(e,{keyword:t,schemaProp:r,schema:n,schemaPath:o,errSchemaPath:s,topSchemaRef:i}){if(void 0!==t&&void 0!==n)throw new Error('both "keyword" and "schema" passed, only one allowed');if(void 0!==t){const n=e.schema[t];return void 0===r?{schema:n,schemaPath:mO._`${e.schemaPath}${(0,mO.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:n[r],schemaPath:mO._`${e.schemaPath}${(0,mO.getProperty)(t)}${(0,mO.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,vO.escapeFragment)(r)}`}}if(void 0!==n){if(void 0===o||void 0===s||void 0===i)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:n,schemaPath:o,topSchemaRef:i,errSchemaPath:s}}throw new Error('either "keyword" or "schema" must be passed')},pO.extendSubschemaData=function(e,t,{dataProp:r,dataPropType:n,data:o,dataTypes:s,propertyName:i}){if(void 0!==o&&void 0!==r)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:a}=t;if(void 0!==r){const{errorPath:o,dataPathArr:s,opts:i}=t;c(a.let("data",mO._`${t.data}${(0,mO.getProperty)(r)}`,!0)),e.errorPath=mO.str`${o}${(0,vO.getErrorPath)(r,n,i.jsPropertySyntax)}`,e.parentDataProperty=mO._`${r}`,e.dataPathArr=[...s,e.parentDataProperty]}if(void 0!==o){c(o instanceof mO.Name?o:a.let("data",o,!0)),void 0!==i&&(e.propertyName=i)}function c(r){e.data=r,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,r]}s&&(e.dataTypes=s)},pO.extendSubschemaMode=function(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:n,createErrors:o,allErrors:s}){void 0!==n&&(e.compositeRule=n),void 0!==o&&(e.createErrors=o),void 0!==s&&(e.allErrors=s),e.jtdDiscriminator=t,e.jtdMetadata=r};var gO={},yO=function e(t,r){if(t===r)return!0;if(t&&r&&"object"==typeof t&&"object"==typeof r){if(t.constructor!==r.constructor)return!1;var n,o,s;if(Array.isArray(t)){if((n=t.length)!=r.length)return!1;for(o=n;0!=o--;)if(!e(t[o],r[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if((n=(s=Object.keys(t)).length)!==Object.keys(r).length)return!1;for(o=n;0!=o--;)if(!Object.prototype.hasOwnProperty.call(r,s[o]))return!1;for(o=n;0!=o--;){var i=s[o];if(!e(t[i],r[i]))return!1}return!0}return t!=t&&r!=r},bO={exports:{}},_O=bO.exports=function(e,t,r){"function"==typeof t&&(r=t,t={}),wO(t,"function"==typeof(r=t.cb||r)?r:r.pre||function(){},r.post||function(){},e,"",e)};function wO(e,t,r,n,o,s,i,a,c,l){if(n&&"object"==typeof n&&!Array.isArray(n)){for(var u in t(n,o,s,i,a,c,l),n){var h=n[u];if(Array.isArray(h)){if(u in _O.arrayKeywords)for(var d=0;d<h.length;d++)wO(e,t,r,h[d],o+"/"+u+"/"+d,s,o,u,n,d)}else if(u in _O.propsKeywords){if(h&&"object"==typeof h)for(var f in h)wO(e,t,r,h[f],o+"/"+u+"/"+f.replace(/~/g,"~0").replace(/\//g,"~1"),s,o,u,n,f)}else(u in _O.keywords||e.allKeys&&!(u in _O.skipKeywords))&&wO(e,t,r,h,o+"/"+u,s,o,u,n)}r(n,o,s,i,a,c,l)}}_O.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},_O.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},_O.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},_O.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0},Object.defineProperty(gO,"__esModule",{value:!0}),gO.getSchemaRefs=gO.resolveUrl=gO.normalizeId=gO._getFullPath=gO.getFullPath=gO.inlineRef=void 0;const SO=N$,EO=yO,$O=bO.exports,OO=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);gO.inlineRef=function(e,t=!0){return"boolean"==typeof e||(!0===t?!AO(e):!!t&&TO(e)<=t)};const CO=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function AO(e){for(const t in e){if(CO.has(t))return!0;const r=e[t];if(Array.isArray(r)&&r.some(AO))return!0;if("object"==typeof r&&AO(r))return!0}return!1}function TO(e){let t=0;for(const r in e){if("$ref"===r)return 1/0;if(t++,!OO.has(r)&&("object"==typeof e[r]&&(0,SO.eachItem)(e[r],(e=>t+=TO(e))),t===1/0))return 1/0}return t}function xO(e,t="",r){!1!==r&&(t=NO(t));const n=e.parse(t);return PO(e,n)}function PO(e,t){return e.serialize(t).split("#")[0]+"#"}gO.getFullPath=xO,gO._getFullPath=PO;const jO=/#\/?$/;function NO(e){return e?e.replace(jO,""):""}gO.normalizeId=NO,gO.resolveUrl=function(e,t,r){return r=NO(r),e.resolve(t,r)};const RO=/^[a-z_][-a-z0-9._]*$/i;gO.getSchemaRefs=function(e,t){if("boolean"==typeof e)return{};const{schemaId:r,uriResolver:n}=this.opts,o=NO(e[r]||t),s={"":o},i=xO(n,o,!1),a={},c=new Set;return $O(e,{allKeys:!0},((e,t,n,o)=>{if(void 0===o)return;const h=i+t;let d=s[o];function f(t){const r=this.opts.uriResolver.resolve;if(t=NO(d?r(d,t):t),c.has(t))throw u(t);c.add(t);let n=this.refs[t];return"string"==typeof n&&(n=this.refs[n]),"object"==typeof n?l(e,n.schema,t):t!==NO(h)&&("#"===t[0]?(l(e,a[t],t),a[t]=e):this.refs[t]=h),t}function p(e){if("string"==typeof e){if(!RO.test(e))throw new Error(`invalid anchor "${e}"`);f.call(this,`#${e}`)}}"string"==typeof e[r]&&(d=f.call(this,e[r])),p.call(this,e.$anchor),p.call(this,e.$dynamicAnchor),s[t]=d})),a;function l(e,t,r){if(void 0!==t&&!EO(e,t))throw u(r)}function u(e){return new Error(`reference "${e}" resolves to more than one schema`)}},Object.defineProperty(C$,"__esModule",{value:!0}),C$.getData=C$.KeywordCxt=C$.validateFunctionCode=void 0;const kO=A$,IO=U$,MO=G$,DO=U$,FO=q$,VO=Q$,LO=pO,UO=x$,zO=R$,BO=gO,GO=N$,HO=T$;function WO({gen:e,validateName:t,schema:r,schemaEnv:n,opts:o},s){o.code.es5?e.func(t,UO._`${zO.default.data}, ${zO.default.valCxt}`,n.$async,(()=>{e.code(UO._`"use strict"; ${qO(r,o)}`),function(e,t){e.if(zO.default.valCxt,(()=>{e.var(zO.default.instancePath,UO._`${zO.default.valCxt}.${zO.default.instancePath}`),e.var(zO.default.parentData,UO._`${zO.default.valCxt}.${zO.default.parentData}`),e.var(zO.default.parentDataProperty,UO._`${zO.default.valCxt}.${zO.default.parentDataProperty}`),e.var(zO.default.rootData,UO._`${zO.default.valCxt}.${zO.default.rootData}`),t.dynamicRef&&e.var(zO.default.dynamicAnchors,UO._`${zO.default.valCxt}.${zO.default.dynamicAnchors}`)}),(()=>{e.var(zO.default.instancePath,UO._`""`),e.var(zO.default.parentData,UO._`undefined`),e.var(zO.default.parentDataProperty,UO._`undefined`),e.var(zO.default.rootData,zO.default.data),t.dynamicRef&&e.var(zO.default.dynamicAnchors,UO._`{}`)}))}(e,o),e.code(s)})):e.func(t,UO._`${zO.default.data}, ${function(e){return UO._`{${zO.default.instancePath}="", ${zO.default.parentData}, ${zO.default.parentDataProperty}, ${zO.default.rootData}=${zO.default.data}${e.dynamicRef?UO._`, ${zO.default.dynamicAnchors}={}`:UO.nil}}={}`}(o)}`,n.$async,(()=>e.code(qO(r,o)).code(s)))}function qO(e,t){const r="object"==typeof e&&e[t.schemaId];return r&&(t.code.source||t.code.process)?UO._`/*# sourceURL=${r} */`:UO.nil}function KO(e,t){JO(e)&&(QO(e),YO(e))?function(e,t){const{schema:r,gen:n,opts:o}=e;o.$comment&&r.$comment&&XO(e);(function(e){const t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,BO.resolveUrl)(e.opts.uriResolver,e.baseId,t))})(e),function(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}(e);const s=n.const("_errs",zO.default.errors);ZO(e,s),n.var(t,UO._`${s} === ${zO.default.errors}`)}(e,t):(0,kO.boolOrEmptySchema)(e,t)}function YO({schema:e,self:t}){if("boolean"==typeof e)return!e;for(const r in e)if(t.RULES.all[r])return!0;return!1}function JO(e){return"boolean"!=typeof e.schema}function QO(e){(0,GO.checkUnknownRules)(e),function(e){const{schema:t,errSchemaPath:r,opts:n,self:o}=e;t.$ref&&n.ignoreKeywordsWithRef&&(0,GO.schemaHasRulesButRef)(t,o.RULES)&&o.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}(e)}function ZO(e,t){if(e.opts.jtd)return eC(e,[],!1,t);const r=(0,IO.getSchemaTypes)(e.schema);eC(e,r,!(0,IO.coerceAndCheckDataType)(e,r),t)}function XO({gen:e,schemaEnv:t,schema:r,errSchemaPath:n,opts:o}){const s=r.$comment;if(!0===o.$comment)e.code(UO._`${zO.default.self}.logger.log(${s})`);else if("function"==typeof o.$comment){const r=UO.str`${n}/$comment`,o=e.scopeValue("root",{ref:t.root});e.code(UO._`${zO.default.self}.opts.$comment(${s}, ${r}, ${o}.schema)`)}}function eC(e,t,r,n){const{gen:o,schema:s,data:i,allErrors:a,opts:c,self:l}=e,{RULES:u}=l;function h(l){(0,MO.shouldUseGroup)(s,l)&&(l.type?(o.if((0,DO.checkDataType)(l.type,i,c.strictNumbers)),tC(e,l),1===t.length&&t[0]===l.type&&r&&(o.else(),(0,DO.reportTypeError)(e)),o.endIf()):tC(e,l),a||o.if(UO._`${zO.default.errors} === ${n||0}`))}!s.$ref||!c.ignoreKeywordsWithRef&&(0,GO.schemaHasRulesButRef)(s,u)?(c.jtd||function(e,t){if(e.schemaEnv.meta||!e.opts.strictTypes)return;(function(e,t){if(!t.length)return;if(!e.dataTypes.length)return void(e.dataTypes=t);t.forEach((t=>{nC(e.dataTypes,t)||oC(e,`type "${t}" not allowed by context "${e.dataTypes.join(",")}"`)})),function(e,t){const r=[];for(const n of e.dataTypes)nC(t,n)?r.push(n):t.includes("integer")&&"number"===n&&r.push("integer");e.dataTypes=r}(e,t)})(e,t),e.opts.allowUnionTypes||function(e,t){t.length>1&&(2!==t.length||!t.includes("null"))&&oC(e,"use allowUnionTypes to allow union type keyword")}(e,t);!function(e,t){const r=e.self.RULES.all;for(const n in r){const o=r[n];if("object"==typeof o&&(0,MO.shouldUseRule)(e.schema,o)){const{type:r}=o.definition;r.length&&!r.some((e=>rC(t,e)))&&oC(e,`missing type "${r.join(",")}" for keyword "${n}"`)}}}(e,e.dataTypes)}(e,t),o.block((()=>{for(const e of u.rules)h(e);h(u.post)}))):o.block((()=>iC(e,"$ref",u.all.$ref.definition)))}function tC(e,t){const{gen:r,schema:n,opts:{useDefaults:o}}=e;o&&(0,FO.assignDefaults)(e,t.type),r.block((()=>{for(const r of t.rules)(0,MO.shouldUseRule)(n,r)&&iC(e,r.keyword,r.definition,t.type)}))}function rC(e,t){return e.includes(t)||"number"===t&&e.includes("integer")}function nC(e,t){return e.includes(t)||"integer"===t&&e.includes("number")}function oC(e,t){t+=` at "${e.schemaEnv.baseId+e.errSchemaPath}" (strictTypes)`,(0,GO.checkStrictMode)(e,t,e.opts.strictTypes)}C$.validateFunctionCode=function(e){JO(e)&&(QO(e),YO(e))?function(e){const{schema:t,opts:r,gen:n}=e;WO(e,(()=>{r.$comment&&t.$comment&&XO(e),function(e){const{schema:t,opts:r}=e;void 0!==t.default&&r.useDefaults&&r.strictSchema&&(0,GO.checkStrictMode)(e,"default is ignored in the schema root")}(e),n.let(zO.default.vErrors,null),n.let(zO.default.errors,0),r.unevaluated&&function(e){const{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",UO._`${r}.evaluated`),t.if(UO._`${e.evaluated}.dynamicProps`,(()=>t.assign(UO._`${e.evaluated}.props`,UO._`undefined`))),t.if(UO._`${e.evaluated}.dynamicItems`,(()=>t.assign(UO._`${e.evaluated}.items`,UO._`undefined`)))}(e),ZO(e),function(e){const{gen:t,schemaEnv:r,validateName:n,ValidationError:o,opts:s}=e;r.$async?t.if(UO._`${zO.default.errors} === 0`,(()=>t.return(zO.default.data)),(()=>t.throw(UO._`new ${o}(${zO.default.vErrors})`))):(t.assign(UO._`${n}.errors`,zO.default.vErrors),s.unevaluated&&function({gen:e,evaluated:t,props:r,items:n}){r instanceof UO.Name&&e.assign(UO._`${t}.props`,r);n instanceof UO.Name&&e.assign(UO._`${t}.items`,n)}(e),t.return(UO._`${zO.default.errors} === 0`))}(e)}))}(e):WO(e,(()=>(0,kO.topBoolOrEmptySchema)(e)))};class sC{constructor(e,t,r){if((0,VO.validateKeywordUsage)(e,t,r),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=r,this.data=e.data,this.schema=e.schema[r],this.$data=t.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,GO.schemaRefOrVal)(e,this.schema,r,this.$data),this.schemaType=t.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=t,this.$data)this.schemaCode=e.gen.const("vSchema",lC(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,VO.validSchemaType)(this.schema,t.schemaType,t.allowUndefined))throw new Error(`${r} value must be ${JSON.stringify(t.schemaType)}`);("code"in t?t.trackErrors:!1!==t.errors)&&(this.errsCount=e.gen.const("_errs",zO.default.errors))}result(e,t,r){this.failResult((0,UO.not)(e),t,r)}failResult(e,t,r){this.gen.if(e),r?r():this.error(),t?(this.gen.else(),t(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,t){this.failResult((0,UO.not)(e),void 0,t)}fail(e){if(void 0===e)return this.error(),void(this.allErrors||this.gen.if(!1));this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);const{schemaCode:t}=this;this.fail(UO._`${t} !== undefined && (${(0,UO.or)(this.invalid$data(),e)})`)}error(e,t,r){if(t)return this.setParams(t),this._error(e,r),void this.setParams({});this._error(e,r)}_error(e,t){(e?HO.reportExtraError:HO.reportError)(this,this.def.error,t)}$dataError(){(0,HO.reportError)(this,this.def.$dataError||HO.keyword$DataError)}reset(){if(void 0===this.errsCount)throw new Error('add "trackErrors" to keyword definition');(0,HO.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,t){t?Object.assign(this.params,e):this.params=e}block$data(e,t,r=UO.nil){this.gen.block((()=>{this.check$data(e,r),t()}))}check$data(e=UO.nil,t=UO.nil){if(!this.$data)return;const{gen:r,schemaCode:n,schemaType:o,def:s}=this;r.if((0,UO.or)(UO._`${n} === undefined`,t)),e!==UO.nil&&r.assign(e,!0),(o.length||s.validateSchema)&&(r.elseIf(this.invalid$data()),this.$dataError(),e!==UO.nil&&r.assign(e,!1)),r.else()}invalid$data(){const{gen:e,schemaCode:t,schemaType:r,def:n,it:o}=this;return(0,UO.or)(function(){if(r.length){if(!(t instanceof UO.Name))throw new Error("ajv implementation error");const e=Array.isArray(r)?r:[r];return UO._`${(0,DO.checkDataTypes)(e,t,o.opts.strictNumbers,DO.DataType.Wrong)}`}return UO.nil}(),function(){if(n.validateSchema){const r=e.scopeValue("validate$data",{ref:n.validateSchema});return UO._`!${r}(${t})`}return UO.nil}())}subschema(e,t){const r=(0,LO.getSubschema)(this.it,e);(0,LO.extendSubschemaData)(r,this.it,e),(0,LO.extendSubschemaMode)(r,e);const n={...this.it,...r,items:void 0,props:void 0};return KO(n,t),n}mergeEvaluated(e,t){const{it:r,gen:n}=this;r.opts.unevaluated&&(!0!==r.props&&void 0!==e.props&&(r.props=GO.mergeEvaluated.props(n,e.props,r.props,t)),!0!==r.items&&void 0!==e.items&&(r.items=GO.mergeEvaluated.items(n,e.items,r.items,t)))}mergeValidEvaluated(e,t){const{it:r,gen:n}=this;if(r.opts.unevaluated&&(!0!==r.props||!0!==r.items))return n.if(t,(()=>this.mergeEvaluated(e,UO.Name))),!0}}function iC(e,t,r,n){const o=new sC(e,r,t);"code"in r?r.code(o,n):o.$data&&r.validate?(0,VO.funcKeywordCode)(o,r):"macro"in r?(0,VO.macroKeywordCode)(o,r):(r.compile||r.validate)&&(0,VO.funcKeywordCode)(o,r)}C$.KeywordCxt=sC;const aC=/^\/(?:[^~]|~0|~1)*$/,cC=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function lC(e,{dataLevel:t,dataNames:r,dataPathArr:n}){let o,s;if(""===e)return zO.default.rootData;if("/"===e[0]){if(!aC.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);o=e,s=zO.default.rootData}else{const i=cC.exec(e);if(!i)throw new Error(`Invalid JSON-pointer: ${e}`);const a=+i[1];if(o=i[2],"#"===o){if(a>=t)throw new Error(c("property/index",a));return n[t-a]}if(a>t)throw new Error(c("data",a));if(s=r[t-a],!o)return s}let i=s;const a=o.split("/");for(const e of a)e&&(s=UO._`${s}${(0,UO.getProperty)((0,GO.unescapeJsonPointer)(e))}`,i=UO._`${i} && ${s}`);return i;function c(e,r){return`Cannot access ${e} ${r} levels up, current level is ${t}`}}C$.getData=lC;var uC={};Object.defineProperty(uC,"__esModule",{value:!0});class hC extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}}uC.default=hC;var dC={};Object.defineProperty(dC,"__esModule",{value:!0});const fC=gO;class pC extends Error{constructor(e,t,r,n){super(n||`can't resolve reference ${r} from id ${t}`),this.missingRef=(0,fC.resolveUrl)(e,t,r),this.missingSchema=(0,fC.normalizeId)((0,fC.getFullPath)(e,this.missingRef))}}dC.default=pC;var mC={};Object.defineProperty(mC,"__esModule",{value:!0}),mC.resolveSchema=mC.getCompilingSchema=mC.resolveRef=mC.compileSchema=mC.SchemaEnv=void 0;const vC=x$,gC=uC,yC=R$,bC=gO,_C=N$,wC=C$;class SC{constructor(e){var t;let r;this.refs={},this.dynamicAnchors={},"object"==typeof e.schema&&(r=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=null!==(t=e.baseId)&&void 0!==t?t:(0,bC.normalizeId)(null==r?void 0:r[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=null==r?void 0:r.$async,this.refs={}}}function EC(e){const t=OC.call(this,e);if(t)return t;const r=(0,bC.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:n,lines:o}=this.opts.code,{ownProperties:s}=this.opts,i=new vC.CodeGen(this.scope,{es5:n,lines:o,ownProperties:s});let a;e.$async&&(a=i.scopeValue("Error",{ref:gC.default,code:vC._`require("ajv/dist/runtime/validation_error").default`}));const c=i.scopeName("validate");e.validateName=c;const l={gen:i,allErrors:this.opts.allErrors,data:yC.default.data,parentData:yC.default.parentData,parentDataProperty:yC.default.parentDataProperty,dataNames:[yC.default.data],dataPathArr:[vC.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:i.scopeValue("schema",!0===this.opts.code.source?{ref:e.schema,code:(0,vC.stringify)(e.schema)}:{ref:e.schema}),validateName:c,ValidationError:a,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:vC.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:vC._`""`,opts:this.opts,self:this};let u;try{this._compilations.add(e),(0,wC.validateFunctionCode)(l),i.optimize(this.opts.code.optimize);const t=i.toString();u=`${i.scopeRefs(yC.default.scope)}return ${t}`,this.opts.code.process&&(u=this.opts.code.process(u,e));const r=new Function(`${yC.default.self}`,`${yC.default.scope}`,u)(this,this.scope.get());if(this.scope.value(c,{ref:r}),r.errors=null,r.schema=e.schema,r.schemaEnv=e,e.$async&&(r.$async=!0),!0===this.opts.code.source&&(r.source={validateName:c,validateCode:t,scopeValues:i._values}),this.opts.unevaluated){const{props:e,items:t}=l;r.evaluated={props:e instanceof vC.Name?void 0:e,items:t instanceof vC.Name?void 0:t,dynamicProps:e instanceof vC.Name,dynamicItems:t instanceof vC.Name},r.source&&(r.source.evaluated=(0,vC.stringify)(r.evaluated))}return e.validate=r,e}catch(t){throw delete e.validate,delete e.validateName,u&&this.logger.error("Error compiling schema, function code:",u),t}finally{this._compilations.delete(e)}}function $C(e){return(0,bC.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:EC.call(this,e)}function OC(e){for(const n of this._compilations)if(r=e,(t=n).schema===r.schema&&t.root===r.root&&t.baseId===r.baseId)return n;var t,r}function CC(e,t){let r;for(;"string"==typeof(r=this.refs[t]);)t=r;return r||this.schemas[t]||AC.call(this,e,t)}function AC(e,t){const r=this.opts.uriResolver.parse(t),n=(0,bC._getFullPath)(this.opts.uriResolver,r);let o=(0,bC.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&n===o)return xC.call(this,r,e);const s=(0,bC.normalizeId)(n),i=this.refs[s]||this.schemas[s];if("string"==typeof i){const t=AC.call(this,e,i);if("object"!=typeof(null==t?void 0:t.schema))return;return xC.call(this,r,t)}if("object"==typeof(null==i?void 0:i.schema)){if(i.validate||EC.call(this,i),s===(0,bC.normalizeId)(t)){const{schema:t}=i,{schemaId:r}=this.opts,n=t[r];return n&&(o=(0,bC.resolveUrl)(this.opts.uriResolver,o,n)),new SC({schema:t,schemaId:r,root:e,baseId:o})}return xC.call(this,r,i)}}mC.SchemaEnv=SC,mC.compileSchema=EC,mC.resolveRef=function(e,t,r){var n;r=(0,bC.resolveUrl)(this.opts.uriResolver,t,r);const o=e.refs[r];if(o)return o;let s=CC.call(this,e,r);if(void 0===s){const o=null===(n=e.localRefs)||void 0===n?void 0:n[r],{schemaId:i}=this.opts;o&&(s=new SC({schema:o,schemaId:i,root:e,baseId:t}))}return void 0!==s?e.refs[r]=$C.call(this,s):void 0},mC.getCompilingSchema=OC,mC.resolveSchema=AC;const TC=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function xC(e,{baseId:t,schema:r,root:n}){var o;if("/"!==(null===(o=e.fragment)||void 0===o?void 0:o[0]))return;for(const n of e.fragment.slice(1).split("/")){if("boolean"==typeof r)return;const e=r[(0,_C.unescapeFragment)(n)];if(void 0===e)return;const o="object"==typeof(r=e)&&r[this.opts.schemaId];!TC.has(n)&&o&&(t=(0,bC.resolveUrl)(this.opts.uriResolver,t,o))}let s;if("boolean"!=typeof r&&r.$ref&&!(0,_C.schemaHasRulesButRef)(r,this.RULES)){const e=(0,bC.resolveUrl)(this.opts.uriResolver,t,r.$ref);s=AC.call(this,n,e)}const{schemaId:i}=this.opts;return s=s||new SC({schema:r,schemaId:i,root:n,baseId:t}),s.schema!==s.root.schema?s:void 0}var PC={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1},jC={},NC={exports:{}};!function(e){function t(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];if(t.length>1){t[0]=t[0].slice(0,-1);for(var n=t.length-1,o=1;o<n;++o)t[o]=t[o].slice(1,-1);return t[n]=t[n].slice(1),t.join("")}return t[0]}function r(e){return"(?:"+e+")"}function n(e){return void 0===e?"undefined":null===e?"null":Object.prototype.toString.call(e).split(" ").pop().split("]").shift().toLowerCase()}function o(e){return e.toUpperCase()}function s(e){return null!=e?e instanceof Array?e:"number"!=typeof e.length||e.split||e.setInterval||e.call?[e]:Array.prototype.slice.call(e):[]}function i(e,t){var r=e;if(t)for(var n in t)r[n]=t[n];return r}function a(e){var n="[A-Za-z]",o="[0-9]",s=t(o,"[A-Fa-f]"),i=r(r("%[EFef]"+s+"%"+s+s+"%"+s+s)+"|"+r("%[89A-Fa-f]"+s+"%"+s+s)+"|"+r("%"+s+s)),a="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",c=t("[\\:\\/\\?\\#\\[\\]\\@]",a),l=e?"[\\uE000-\\uF8FF]":"[]",u=t(n,o,"[\\-\\.\\_\\~]",e?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]");r(n+t(n,o,"[\\+\\-\\.]")+"*"),r(r(i+"|"+t(u,a,"[\\:]"))+"*");var h=r(r("25[0-5]")+"|"+r("2[0-4]"+o)+"|"+r("1"+o+o)+"|"+r("0?[1-9]"+o)+"|0?0?"+o),d=r(h+"\\."+h+"\\."+h+"\\."+h),f=r(s+"{1,4}"),p=r(r(f+"\\:"+f)+"|"+d),m=r(r(f+"\\:")+"{6}"+p),v=r("\\:\\:"+r(f+"\\:")+"{5}"+p),g=r(r(f)+"?\\:\\:"+r(f+"\\:")+"{4}"+p),y=r(r(r(f+"\\:")+"{0,1}"+f)+"?\\:\\:"+r(f+"\\:")+"{3}"+p),b=r(r(r(f+"\\:")+"{0,2}"+f)+"?\\:\\:"+r(f+"\\:")+"{2}"+p),_=r(r(r(f+"\\:")+"{0,3}"+f)+"?\\:\\:"+f+"\\:"+p),w=r(r(r(f+"\\:")+"{0,4}"+f)+"?\\:\\:"+p),S=r(r(r(f+"\\:")+"{0,5}"+f)+"?\\:\\:"+f),E=r(r(r(f+"\\:")+"{0,6}"+f)+"?\\:\\:"),$=r([m,v,g,y,b,_,w,S,E].join("|")),O=r(r(u+"|"+i)+"+");r("[vV]"+s+"+\\."+t(u,a,"[\\:]")+"+"),r(r(i+"|"+t(u,a))+"*");var C=r(i+"|"+t(u,a,"[\\:\\@]"));return r(r(i+"|"+t(u,a,"[\\@]"))+"+"),r(r(C+"|"+t("[\\/\\?]",l))+"*"),{NOT_SCHEME:new RegExp(t("[^]",n,o,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(t("[^\\%\\:]",u,a),"g"),NOT_HOST:new RegExp(t("[^\\%\\[\\]\\:]",u,a),"g"),NOT_PATH:new RegExp(t("[^\\%\\/\\:\\@]",u,a),"g"),NOT_PATH_NOSCHEME:new RegExp(t("[^\\%\\/\\@]",u,a),"g"),NOT_QUERY:new RegExp(t("[^\\%]",u,a,"[\\:\\@\\/\\?]",l),"g"),NOT_FRAGMENT:new RegExp(t("[^\\%]",u,a,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(t("[^]",u,a),"g"),UNRESERVED:new RegExp(u,"g"),OTHER_CHARS:new RegExp(t("[^\\%]",u,c),"g"),PCT_ENCODED:new RegExp(i,"g"),IPV4ADDRESS:new RegExp("^("+d+")$"),IPV6ADDRESS:new RegExp("^\\[?("+$+")"+r(r("\\%25|\\%(?!"+s+"{2})")+"("+O+")")+"?\\]?$")}}var c=a(!1),l=a(!0),u=function(){function e(e,t){var r=[],n=!0,o=!1,s=void 0;try{for(var i,a=e[Symbol.iterator]();!(n=(i=a.next()).done)&&(r.push(i.value),!t||r.length!==t);n=!0);}catch(e){o=!0,s=e}finally{try{!n&&a.return&&a.return()}finally{if(o)throw s}}return r}return function(t,r){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),h=function(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)},d=2147483647,f=36,p=1,m=26,v=38,g=700,y=72,b=128,_="-",w=/^xn--/,S=/[^\0-\x7E]/,E=/[\x2E\u3002\uFF0E\uFF61]/g,$={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},O=f-p,C=Math.floor,A=String.fromCharCode;function T(e){throw new RangeError($[e])}function x(e,t){for(var r=[],n=e.length;n--;)r[n]=t(e[n]);return r}function P(e,t){var r=e.split("@"),n="";return r.length>1&&(n=r[0]+"@",e=r[1]),n+x((e=e.replace(E,".")).split("."),t).join(".")}function j(e){for(var t=[],r=0,n=e.length;r<n;){var o=e.charCodeAt(r++);if(o>=55296&&o<=56319&&r<n){var s=e.charCodeAt(r++);56320==(64512&s)?t.push(((1023&o)<<10)+(1023&s)+65536):(t.push(o),r--)}else t.push(o)}return t}var N=function(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:f},R=function(e,t){return e+22+75*(e<26)-((0!=t)<<5)},k=function(e,t,r){var n=0;for(e=r?C(e/g):e>>1,e+=C(e/t);e>O*m>>1;n+=f)e=C(e/O);return C(n+(O+1)*e/(e+v))},I=function(e){var t=[],r=e.length,n=0,o=b,s=y,i=e.lastIndexOf(_);i<0&&(i=0);for(var a=0;a<i;++a)e.charCodeAt(a)>=128&&T("not-basic"),t.push(e.charCodeAt(a));for(var c=i>0?i+1:0;c<r;){for(var l=n,u=1,h=f;;h+=f){c>=r&&T("invalid-input");var v=N(e.charCodeAt(c++));(v>=f||v>C((d-n)/u))&&T("overflow"),n+=v*u;var g=h<=s?p:h>=s+m?m:h-s;if(v<g)break;var w=f-g;u>C(d/w)&&T("overflow"),u*=w}var S=t.length+1;s=k(n-l,S,0==l),C(n/S)>d-o&&T("overflow"),o+=C(n/S),n%=S,t.splice(n++,0,o)}return String.fromCodePoint.apply(String,t)},M=function(e){var t=[],r=(e=j(e)).length,n=b,o=0,s=y,i=!0,a=!1,c=void 0;try{for(var l,u=e[Symbol.iterator]();!(i=(l=u.next()).done);i=!0){var h=l.value;h<128&&t.push(A(h))}}catch(e){a=!0,c=e}finally{try{!i&&u.return&&u.return()}finally{if(a)throw c}}var v=t.length,g=v;for(v&&t.push(_);g<r;){var w=d,S=!0,E=!1,$=void 0;try{for(var O,x=e[Symbol.iterator]();!(S=(O=x.next()).done);S=!0){var P=O.value;P>=n&&P<w&&(w=P)}}catch(e){E=!0,$=e}finally{try{!S&&x.return&&x.return()}finally{if(E)throw $}}var N=g+1;w-n>C((d-o)/N)&&T("overflow"),o+=(w-n)*N,n=w;var I=!0,M=!1,D=void 0;try{for(var F,V=e[Symbol.iterator]();!(I=(F=V.next()).done);I=!0){var L=F.value;if(L<n&&++o>d&&T("overflow"),L==n){for(var U=o,z=f;;z+=f){var B=z<=s?p:z>=s+m?m:z-s;if(U<B)break;var G=U-B,H=f-B;t.push(A(R(B+G%H,0))),U=C(G/H)}t.push(A(R(U,0))),s=k(o,N,g==v),o=0,++g}}}catch(e){M=!0,D=e}finally{try{!I&&V.return&&V.return()}finally{if(M)throw D}}++o,++n}return t.join("")},D=function(e){return P(e,(function(e){return w.test(e)?I(e.slice(4).toLowerCase()):e}))},F=function(e){return P(e,(function(e){return S.test(e)?"xn--"+M(e):e}))},V={version:"2.1.0",ucs2:{decode:j,encode:function(e){return String.fromCodePoint.apply(String,h(e))}},decode:I,encode:M,toASCII:F,toUnicode:D},L={};function U(e){var t=e.charCodeAt(0);return t<16?"%0"+t.toString(16).toUpperCase():t<128?"%"+t.toString(16).toUpperCase():t<2048?"%"+(t>>6|192).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase():"%"+(t>>12|224).toString(16).toUpperCase()+"%"+(t>>6&63|128).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase()}function z(e){for(var t="",r=0,n=e.length;r<n;){var o=parseInt(e.substr(r+1,2),16);if(o<128)t+=String.fromCharCode(o),r+=3;else if(o>=194&&o<224){if(n-r>=6){var s=parseInt(e.substr(r+4,2),16);t+=String.fromCharCode((31&o)<<6|63&s)}else t+=e.substr(r,6);r+=6}else if(o>=224){if(n-r>=9){var i=parseInt(e.substr(r+4,2),16),a=parseInt(e.substr(r+7,2),16);t+=String.fromCharCode((15&o)<<12|(63&i)<<6|63&a)}else t+=e.substr(r,9);r+=9}else t+=e.substr(r,3),r+=3}return t}function B(e,t){function r(e){var r=z(e);return r.match(t.UNRESERVED)?r:e}return e.scheme&&(e.scheme=String(e.scheme).replace(t.PCT_ENCODED,r).toLowerCase().replace(t.NOT_SCHEME,"")),void 0!==e.userinfo&&(e.userinfo=String(e.userinfo).replace(t.PCT_ENCODED,r).replace(t.NOT_USERINFO,U).replace(t.PCT_ENCODED,o)),void 0!==e.host&&(e.host=String(e.host).replace(t.PCT_ENCODED,r).toLowerCase().replace(t.NOT_HOST,U).replace(t.PCT_ENCODED,o)),void 0!==e.path&&(e.path=String(e.path).replace(t.PCT_ENCODED,r).replace(e.scheme?t.NOT_PATH:t.NOT_PATH_NOSCHEME,U).replace(t.PCT_ENCODED,o)),void 0!==e.query&&(e.query=String(e.query).replace(t.PCT_ENCODED,r).replace(t.NOT_QUERY,U).replace(t.PCT_ENCODED,o)),void 0!==e.fragment&&(e.fragment=String(e.fragment).replace(t.PCT_ENCODED,r).replace(t.NOT_FRAGMENT,U).replace(t.PCT_ENCODED,o)),e}function G(e){return e.replace(/^0*(.*)/,"$1")||"0"}function H(e,t){var r=e.match(t.IPV4ADDRESS)||[],n=u(r,2)[1];return n?n.split(".").map(G).join("."):e}function W(e,t){var r=e.match(t.IPV6ADDRESS)||[],n=u(r,3),o=n[1],s=n[2];if(o){for(var i=o.toLowerCase().split("::").reverse(),a=u(i,2),c=a[0],l=a[1],h=l?l.split(":").map(G):[],d=c.split(":").map(G),f=t.IPV4ADDRESS.test(d[d.length-1]),p=f?7:8,m=d.length-p,v=Array(p),g=0;g<p;++g)v[g]=h[g]||d[m+g]||"";f&&(v[p-1]=H(v[p-1],t));var y=v.reduce((function(e,t,r){if(!t||"0"===t){var n=e[e.length-1];n&&n.index+n.length===r?n.length++:e.push({index:r,length:1})}return e}),[]),b=y.sort((function(e,t){return t.length-e.length}))[0],_=void 0;if(b&&b.length>1){var w=v.slice(0,b.index),S=v.slice(b.index+b.length);_=w.join(":")+"::"+S.join(":")}else _=v.join(":");return s&&(_+="%"+s),_}return e}var q=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,K=void 0==="".match(/(){0}/)[1];function Y(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={},n=!1!==t.iri?l:c;"suffix"===t.reference&&(e=(t.scheme?t.scheme+":":"")+"//"+e);var o=e.match(q);if(o){K?(r.scheme=o[1],r.userinfo=o[3],r.host=o[4],r.port=parseInt(o[5],10),r.path=o[6]||"",r.query=o[7],r.fragment=o[8],isNaN(r.port)&&(r.port=o[5])):(r.scheme=o[1]||void 0,r.userinfo=-1!==e.indexOf("@")?o[3]:void 0,r.host=-1!==e.indexOf("//")?o[4]:void 0,r.port=parseInt(o[5],10),r.path=o[6]||"",r.query=-1!==e.indexOf("?")?o[7]:void 0,r.fragment=-1!==e.indexOf("#")?o[8]:void 0,isNaN(r.port)&&(r.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?o[4]:void 0)),r.host&&(r.host=W(H(r.host,n),n)),void 0!==r.scheme||void 0!==r.userinfo||void 0!==r.host||void 0!==r.port||r.path||void 0!==r.query?void 0===r.scheme?r.reference="relative":void 0===r.fragment?r.reference="absolute":r.reference="uri":r.reference="same-document",t.reference&&"suffix"!==t.reference&&t.reference!==r.reference&&(r.error=r.error||"URI is not a "+t.reference+" reference.");var s=L[(t.scheme||r.scheme||"").toLowerCase()];if(t.unicodeSupport||s&&s.unicodeSupport)B(r,n);else{if(r.host&&(t.domainHost||s&&s.domainHost))try{r.host=V.toASCII(r.host.replace(n.PCT_ENCODED,z).toLowerCase())}catch(e){r.error=r.error||"Host's domain name can not be converted to ASCII via punycode: "+e}B(r,c)}s&&s.parse&&s.parse(r,t)}else r.error=r.error||"URI can not be parsed.";return r}function J(e,t){var r=!1!==t.iri?l:c,n=[];return void 0!==e.userinfo&&(n.push(e.userinfo),n.push("@")),void 0!==e.host&&n.push(W(H(String(e.host),r),r).replace(r.IPV6ADDRESS,(function(e,t,r){return"["+t+(r?"%25"+r:"")+"]"}))),"number"!=typeof e.port&&"string"!=typeof e.port||(n.push(":"),n.push(String(e.port))),n.length?n.join(""):void 0}var Q=/^\.\.?\//,Z=/^\/\.(\/|$)/,X=/^\/\.\.(\/|$)/,ee=/^\/?(?:.|\n)*?(?=\/|$)/;function te(e){for(var t=[];e.length;)if(e.match(Q))e=e.replace(Q,"");else if(e.match(Z))e=e.replace(Z,"/");else if(e.match(X))e=e.replace(X,"/"),t.pop();else if("."===e||".."===e)e="";else{var r=e.match(ee);if(!r)throw new Error("Unexpected dot segment condition");var n=r[0];e=e.slice(n.length),t.push(n)}return t.join("")}function re(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.iri?l:c,n=[],o=L[(t.scheme||e.scheme||"").toLowerCase()];if(o&&o.serialize&&o.serialize(e,t),e.host)if(r.IPV6ADDRESS.test(e.host));else if(t.domainHost||o&&o.domainHost)try{e.host=t.iri?V.toUnicode(e.host):V.toASCII(e.host.replace(r.PCT_ENCODED,z).toLowerCase())}catch(r){e.error=e.error||"Host's domain name can not be converted to "+(t.iri?"Unicode":"ASCII")+" via punycode: "+r}B(e,r),"suffix"!==t.reference&&e.scheme&&(n.push(e.scheme),n.push(":"));var s=J(e,t);if(void 0!==s&&("suffix"!==t.reference&&n.push("//"),n.push(s),e.path&&"/"!==e.path.charAt(0)&&n.push("/")),void 0!==e.path){var i=e.path;t.absolutePath||o&&o.absolutePath||(i=te(i)),void 0===s&&(i=i.replace(/^\/\//,"/%2F")),n.push(i)}return void 0!==e.query&&(n.push("?"),n.push(e.query)),void 0!==e.fragment&&(n.push("#"),n.push(e.fragment)),n.join("")}function ne(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n={};return arguments[3]||(e=Y(re(e,r),r),t=Y(re(t,r),r)),!(r=r||{}).tolerant&&t.scheme?(n.scheme=t.scheme,n.userinfo=t.userinfo,n.host=t.host,n.port=t.port,n.path=te(t.path||""),n.query=t.query):(void 0!==t.userinfo||void 0!==t.host||void 0!==t.port?(n.userinfo=t.userinfo,n.host=t.host,n.port=t.port,n.path=te(t.path||""),n.query=t.query):(t.path?("/"===t.path.charAt(0)?n.path=te(t.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?n.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:n.path=t.path:n.path="/"+t.path,n.path=te(n.path)),n.query=t.query):(n.path=e.path,void 0!==t.query?n.query=t.query:n.query=e.query),n.userinfo=e.userinfo,n.host=e.host,n.port=e.port),n.scheme=e.scheme),n.fragment=t.fragment,n}function oe(e,t,r){var n=i({scheme:"null"},r);return re(ne(Y(e,n),Y(t,n),n,!0),n)}function se(e,t){return"string"==typeof e?e=re(Y(e,t),t):"object"===n(e)&&(e=Y(re(e,t),t)),e}function ie(e,t,r){return"string"==typeof e?e=re(Y(e,r),r):"object"===n(e)&&(e=re(e,r)),"string"==typeof t?t=re(Y(t,r),r):"object"===n(t)&&(t=re(t,r)),e===t}function ae(e,t){return e&&e.toString().replace(t&&t.iri?l.ESCAPE:c.ESCAPE,U)}function ce(e,t){return e&&e.toString().replace(t&&t.iri?l.PCT_ENCODED:c.PCT_ENCODED,z)}var le={scheme:"http",domainHost:!0,parse:function(e,t){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e},serialize:function(e,t){var r="https"===String(e.scheme).toLowerCase();return e.port!==(r?443:80)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}},ue={scheme:"https",domainHost:le.domainHost,parse:le.parse,serialize:le.serialize};function he(e){return"boolean"==typeof e.secure?e.secure:"wss"===String(e.scheme).toLowerCase()}var de={scheme:"ws",domainHost:!0,parse:function(e,t){var r=e;return r.secure=he(r),r.resourceName=(r.path||"/")+(r.query?"?"+r.query:""),r.path=void 0,r.query=void 0,r},serialize:function(e,t){if(e.port!==(he(e)?443:80)&&""!==e.port||(e.port=void 0),"boolean"==typeof e.secure&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){var r=e.resourceName.split("?"),n=u(r,2),o=n[0],s=n[1];e.path=o&&"/"!==o?o:void 0,e.query=s,e.resourceName=void 0}return e.fragment=void 0,e}},fe={scheme:"wss",domainHost:de.domainHost,parse:de.parse,serialize:de.serialize},pe={},me="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",ve="[0-9A-Fa-f]",ge=r(r("%[EFef]"+ve+"%"+ve+ve+"%"+ve+ve)+"|"+r("%[89A-Fa-f]"+ve+"%"+ve+ve)+"|"+r("%"+ve+ve)),ye="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",be=t("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),_e="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",we=new RegExp(me,"g"),Se=new RegExp(ge,"g"),Ee=new RegExp(t("[^]",ye,"[\\.]",'[\\"]',be),"g"),$e=new RegExp(t("[^]",me,_e),"g"),Oe=$e;function Ce(e){var t=z(e);return t.match(we)?t:e}var Ae={scheme:"mailto",parse:function(e,t){var r=e,n=r.to=r.path?r.path.split(","):[];if(r.path=void 0,r.query){for(var o=!1,s={},i=r.query.split("&"),a=0,c=i.length;a<c;++a){var l=i[a].split("=");switch(l[0]){case"to":for(var u=l[1].split(","),h=0,d=u.length;h<d;++h)n.push(u[h]);break;case"subject":r.subject=ce(l[1],t);break;case"body":r.body=ce(l[1],t);break;default:o=!0,s[ce(l[0],t)]=ce(l[1],t)}}o&&(r.headers=s)}r.query=void 0;for(var f=0,p=n.length;f<p;++f){var m=n[f].split("@");if(m[0]=ce(m[0]),t.unicodeSupport)m[1]=ce(m[1],t).toLowerCase();else try{m[1]=V.toASCII(ce(m[1],t).toLowerCase())}catch(e){r.error=r.error||"Email address's domain name can not be converted to ASCII via punycode: "+e}n[f]=m.join("@")}return r},serialize:function(e,t){var r=e,n=s(e.to);if(n){for(var i=0,a=n.length;i<a;++i){var c=String(n[i]),l=c.lastIndexOf("@"),u=c.slice(0,l).replace(Se,Ce).replace(Se,o).replace(Ee,U),h=c.slice(l+1);try{h=t.iri?V.toUnicode(h):V.toASCII(ce(h,t).toLowerCase())}catch(e){r.error=r.error||"Email address's domain name can not be converted to "+(t.iri?"Unicode":"ASCII")+" via punycode: "+e}n[i]=u+"@"+h}r.path=n.join(",")}var d=e.headers=e.headers||{};e.subject&&(d.subject=e.subject),e.body&&(d.body=e.body);var f=[];for(var p in d)d[p]!==pe[p]&&f.push(p.replace(Se,Ce).replace(Se,o).replace($e,U)+"="+d[p].replace(Se,Ce).replace(Se,o).replace(Oe,U));return f.length&&(r.query=f.join("&")),r}},Te=/^([^\:]+)\:(.*)/,xe={scheme:"urn",parse:function(e,t){var r=e.path&&e.path.match(Te),n=e;if(r){var o=t.scheme||n.scheme||"urn",s=r[1].toLowerCase(),i=r[2],a=o+":"+(t.nid||s),c=L[a];n.nid=s,n.nss=i,n.path=void 0,c&&(n=c.parse(n,t))}else n.error=n.error||"URN can not be parsed.";return n},serialize:function(e,t){var r=t.scheme||e.scheme||"urn",n=e.nid,o=r+":"+(t.nid||n),s=L[o];s&&(e=s.serialize(e,t));var i=e,a=e.nss;return i.path=(n||t.nid)+":"+a,i}},Pe=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,je={scheme:"urn:uuid",parse:function(e,t){var r=e;return r.uuid=r.nss,r.nss=void 0,t.tolerant||r.uuid&&r.uuid.match(Pe)||(r.error=r.error||"UUID is not valid."),r},serialize:function(e,t){var r=e;return r.nss=(e.uuid||"").toLowerCase(),r}};L[le.scheme]=le,L[ue.scheme]=ue,L[de.scheme]=de,L[fe.scheme]=fe,L[Ae.scheme]=Ae,L[xe.scheme]=xe,L[je.scheme]=je,e.SCHEMES=L,e.pctEncChar=U,e.pctDecChars=z,e.parse=Y,e.removeDotSegments=te,e.serialize=re,e.resolveComponents=ne,e.resolve=oe,e.normalize=se,e.equal=ie,e.escapeComponent=ae,e.unescapeComponent=ce,Object.defineProperty(e,"__esModule",{value:!0})}(NC.exports),Object.defineProperty(jC,"__esModule",{value:!0});const RC=NC.exports;RC.code='require("ajv/dist/runtime/uri").default',jC.default=RC,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var t=C$;Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var r=x$;Object.defineProperty(e,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return r.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return r.CodeGen}});const n=uC,o=dC,s=z$,i=mC,a=x$,c=gO,l=U$,u=N$,h=PC,d=jC,f=(e,t)=>new RegExp(e,t);f.code="new RegExp";const p=["removeAdditional","useDefaults","coerceTypes"],m=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),v={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},g={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},y=200;function b(e){var t,r,n,o,s,i,a,c,l,u,h,p,m,v,g,b,_,w,S,E,$,O,C,A,T;const x=e.strict,P=null===(t=e.code)||void 0===t?void 0:t.optimize,j=!0===P||void 0===P?1:P||0,N=null!==(n=null===(r=e.code)||void 0===r?void 0:r.regExp)&&void 0!==n?n:f,R=null!==(o=e.uriResolver)&&void 0!==o?o:d.default;return{strictSchema:null===(i=null!==(s=e.strictSchema)&&void 0!==s?s:x)||void 0===i||i,strictNumbers:null===(c=null!==(a=e.strictNumbers)&&void 0!==a?a:x)||void 0===c||c,strictTypes:null!==(u=null!==(l=e.strictTypes)&&void 0!==l?l:x)&&void 0!==u?u:"log",strictTuples:null!==(p=null!==(h=e.strictTuples)&&void 0!==h?h:x)&&void 0!==p?p:"log",strictRequired:null!==(v=null!==(m=e.strictRequired)&&void 0!==m?m:x)&&void 0!==v&&v,code:e.code?{...e.code,optimize:j,regExp:N}:{optimize:j,regExp:N},loopRequired:null!==(g=e.loopRequired)&&void 0!==g?g:y,loopEnum:null!==(b=e.loopEnum)&&void 0!==b?b:y,meta:null===(_=e.meta)||void 0===_||_,messages:null===(w=e.messages)||void 0===w||w,inlineRefs:null===(S=e.inlineRefs)||void 0===S||S,schemaId:null!==(E=e.schemaId)&&void 0!==E?E:"$id",addUsedSchema:null===($=e.addUsedSchema)||void 0===$||$,validateSchema:null===(O=e.validateSchema)||void 0===O||O,validateFormats:null===(C=e.validateFormats)||void 0===C||C,unicodeRegExp:null===(A=e.unicodeRegExp)||void 0===A||A,int32range:null===(T=e.int32range)||void 0===T||T,uriResolver:R}}class _{constructor(e={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...b(e)};const{es5:t,lines:r}=this.opts.code;this.scope=new a.ValueScope({scope:{},prefixes:m,es5:t,lines:r}),this.logger=function(e){if(!1===e)return A;if(void 0===e)return console;if(e.log&&e.warn&&e.error)return e;throw new Error("logger must implement log, warn and error methods")}(e.logger);const n=e.validateFormats;e.validateFormats=!1,this.RULES=(0,s.getRules)(),w.call(this,v,e,"NOT SUPPORTED"),w.call(this,g,e,"DEPRECATED","warn"),this._metaOpts=C.call(this),e.formats&&$.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&O.call(this,e.keywords),"object"==typeof e.meta&&this.addMetaSchema(e.meta),E.call(this),e.validateFormats=n}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:e,meta:t,schemaId:r}=this.opts;let n=h;"id"===r&&(n={...h},n.id=n.$id,delete n.$id),t&&e&&this.addMetaSchema(n,n[r],!1)}defaultMeta(){const{meta:e,schemaId:t}=this.opts;return this.opts.defaultMeta="object"==typeof e?e[t]||e:void 0}validate(e,t){let r;if("string"==typeof e){if(r=this.getSchema(e),!r)throw new Error(`no schema with key or ref "${e}"`)}else r=this.compile(e);const n=r(t);return"$async"in r||(this.errors=r.errors),n}compile(e,t){const r=this._addSchema(e,t);return r.validate||this._compileSchemaEnv(r)}compileAsync(e,t){if("function"!=typeof this.opts.loadSchema)throw new Error("options.loadSchema should be a function");const{loadSchema:r}=this.opts;return n.call(this,e,t);async function n(e,t){await s.call(this,e.$schema);const r=this._addSchema(e,t);return r.validate||i.call(this,r)}async function s(e){e&&!this.getSchema(e)&&await n.call(this,{$ref:e},!0)}async function i(e){try{return this._compileSchemaEnv(e)}catch(t){if(!(t instanceof o.default))throw t;return a.call(this,t),await c.call(this,t.missingSchema),i.call(this,e)}}function a({missingSchema:e,missingRef:t}){if(this.refs[e])throw new Error(`AnySchema ${e} is loaded but ${t} cannot be resolved`)}async function c(e){const r=await l.call(this,e);this.refs[e]||await s.call(this,r.$schema),this.refs[e]||this.addSchema(r,e,t)}async function l(e){const t=this._loading[e];if(t)return t;try{return await(this._loading[e]=r(e))}finally{delete this._loading[e]}}}addSchema(e,t,r,n=this.opts.validateSchema){if(Array.isArray(e)){for(const t of e)this.addSchema(t,void 0,r,n);return this}let o;if("object"==typeof e){const{schemaId:t}=this.opts;if(o=e[t],void 0!==o&&"string"!=typeof o)throw new Error(`schema ${t} must be string`)}return t=(0,c.normalizeId)(t||o),this._checkUnique(t),this.schemas[t]=this._addSchema(e,r,t,n,!0),this}addMetaSchema(e,t,r=this.opts.validateSchema){return this.addSchema(e,t,!0,r),this}validateSchema(e,t){if("boolean"==typeof e)return!0;let r;if(r=e.$schema,void 0!==r&&"string"!=typeof r)throw new Error("$schema must be a string");if(r=r||this.opts.defaultMeta||this.defaultMeta(),!r)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const n=this.validate(r,e);if(!n&&t){const e="schema is invalid: "+this.errorsText();if("log"!==this.opts.validateSchema)throw new Error(e);this.logger.error(e)}return n}getSchema(e){let t;for(;"string"==typeof(t=S.call(this,e));)e=t;if(void 0===t){const{schemaId:r}=this.opts,n=new i.SchemaEnv({schema:{},schemaId:r});if(t=i.resolveSchema.call(this,n,e),!t)return;this.refs[e]=t}return t.validate||this._compileSchemaEnv(t)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const t=S.call(this,e);return"object"==typeof t&&this._cache.delete(t.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{const t=e;this._cache.delete(t);let r=e[this.opts.schemaId];return r&&(r=(0,c.normalizeId)(r),delete this.schemas[r],delete this.refs[r]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(const t of e)this.addKeyword(t);return this}addKeyword(e,t){let r;if("string"==typeof e)r=e,"object"==typeof t&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),t.keyword=r);else{if("object"!=typeof e||void 0!==t)throw new Error("invalid addKeywords parameters");if(r=(t=e).keyword,Array.isArray(r)&&!r.length)throw new Error("addKeywords: keyword must be string or non-empty array")}if(x.call(this,r,t),!t)return(0,u.eachItem)(r,(e=>P.call(this,e))),this;N.call(this,t);const n={...t,type:(0,l.getJSONTypes)(t.type),schemaType:(0,l.getJSONTypes)(t.schemaType)};return(0,u.eachItem)(r,0===n.type.length?e=>P.call(this,e,n):e=>n.type.forEach((t=>P.call(this,e,n,t)))),this}getKeyword(e){const t=this.RULES.all[e];return"object"==typeof t?t.definition:!!t}removeKeyword(e){const{RULES:t}=this;delete t.keywords[e],delete t.all[e];for(const r of t.rules){const t=r.rules.findIndex((t=>t.keyword===e));t>=0&&r.rules.splice(t,1)}return this}addFormat(e,t){return"string"==typeof t&&(t=new RegExp(t)),this.formats[e]=t,this}errorsText(e=this.errors,{separator:t=", ",dataVar:r="data"}={}){return e&&0!==e.length?e.map((e=>`${r}${e.instancePath} ${e.message}`)).reduce(((e,r)=>e+t+r)):"No errors"}$dataMetaSchema(e,t){const r=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(const n of t){const t=n.split("/").slice(1);let o=e;for(const e of t)o=o[e];for(const e in r){const t=r[e];if("object"!=typeof t)continue;const{$data:n}=t.definition,s=o[e];n&&s&&(o[e]=k(s))}}return e}_removeAllSchemas(e,t){for(const r in e){const n=e[r];t&&!t.test(r)||("string"==typeof n?delete e[r]:n&&!n.meta&&(this._cache.delete(n.schema),delete e[r]))}}_addSchema(e,t,r,n=this.opts.validateSchema,o=this.opts.addUsedSchema){let s;const{schemaId:a}=this.opts;if("object"==typeof e)s=e[a];else{if(this.opts.jtd)throw new Error("schema must be object");if("boolean"!=typeof e)throw new Error("schema must be object or boolean")}let l=this._cache.get(e);if(void 0!==l)return l;r=(0,c.normalizeId)(s||r);const u=c.getSchemaRefs.call(this,e,r);return l=new i.SchemaEnv({schema:e,schemaId:a,meta:t,baseId:r,localRefs:u}),this._cache.set(l.schema,l),o&&!r.startsWith("#")&&(r&&this._checkUnique(r),this.refs[r]=l),n&&this.validateSchema(e,!0),l}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw new Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):i.compileSchema.call(this,e),!e.validate)throw new Error("ajv implementation error");return e.validate}_compileMetaSchema(e){const t=this.opts;this.opts=this._metaOpts;try{i.compileSchema.call(this,e)}finally{this.opts=t}}}function w(e,t,r,n="error"){for(const o in e){const s=o;s in t&&this.logger[n](`${r}: option ${o}. ${e[s]}`)}}function S(e){return e=(0,c.normalizeId)(e),this.schemas[e]||this.refs[e]}function E(){const e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(const t in e)this.addSchema(e[t],t)}function $(){for(const e in this.opts.formats){const t=this.opts.formats[e];t&&this.addFormat(e,t)}}function O(e){if(Array.isArray(e))this.addVocabulary(e);else{this.logger.warn("keywords option as map is deprecated, pass array");for(const t in e){const r=e[t];r.keyword||(r.keyword=t),this.addKeyword(r)}}}function C(){const e={...this.opts};for(const t of p)delete e[t];return e}e.default=_,_.ValidationError=n.default,_.MissingRefError=o.default;const A={log(){},warn(){},error(){}};const T=/^[a-z_$][a-z0-9_$:-]*$/i;function x(e,t){const{RULES:r}=this;if((0,u.eachItem)(e,(e=>{if(r.keywords[e])throw new Error(`Keyword ${e} is already defined`);if(!T.test(e))throw new Error(`Keyword ${e} has invalid name`)})),t&&t.$data&&!("code"in t)&&!("validate"in t))throw new Error('$data keyword must have "code" or "validate" function')}function P(e,t,r){var n;const o=null==t?void 0:t.post;if(r&&o)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:s}=this;let i=o?s.post:s.rules.find((({type:e})=>e===r));if(i||(i={type:r,rules:[]},s.rules.push(i)),s.keywords[e]=!0,!t)return;const a={keyword:e,definition:{...t,type:(0,l.getJSONTypes)(t.type),schemaType:(0,l.getJSONTypes)(t.schemaType)}};t.before?j.call(this,i,a,t.before):i.rules.push(a),s.all[e]=a,null===(n=t.implements)||void 0===n||n.forEach((e=>this.addKeyword(e)))}function j(e,t,r){const n=e.rules.findIndex((e=>e.keyword===r));n>=0?e.rules.splice(n,0,t):(e.rules.push(t),this.logger.warn(`rule ${r} is not defined`))}function N(e){let{metaSchema:t}=e;void 0!==t&&(e.$data&&this.opts.$data&&(t=k(t)),e.validateSchema=this.compile(t,!0))}const R={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function k(e){return{anyOf:[e,R]}}}(O$);var kC={},IC={},MC={};Object.defineProperty(MC,"__esModule",{value:!0});const DC={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};MC.default=DC;var FC={};Object.defineProperty(FC,"__esModule",{value:!0}),FC.callRef=FC.getValidate=void 0;const VC=dC,LC=Z$,UC=x$,zC=R$,BC=mC,GC=N$,HC={keyword:"$ref",schemaType:"string",code(e){const{gen:t,schema:r,it:n}=e,{baseId:o,schemaEnv:s,validateName:i,opts:a,self:c}=n,{root:l}=s;if(("#"===r||"#/"===r)&&o===l.baseId)return function(){if(s===l)return qC(e,i,s,s.$async);const r=t.scopeValue("root",{ref:l});return qC(e,UC._`${r}.validate`,l,l.$async)}();const u=BC.resolveRef.call(c,l,o,r);if(void 0===u)throw new VC.default(n.opts.uriResolver,o,r);return u instanceof BC.SchemaEnv?function(t){const r=WC(e,t);qC(e,r,t,t.$async)}(u):function(n){const o=t.scopeValue("schema",!0===a.code.source?{ref:n,code:(0,UC.stringify)(n)}:{ref:n}),s=t.name("valid"),i=e.subschema({schema:n,dataTypes:[],schemaPath:UC.nil,topSchemaRef:o,errSchemaPath:r},s);e.mergeEvaluated(i),e.ok(s)}(u)}};function WC(e,t){const{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):UC._`${r.scopeValue("wrapper",{ref:t})}.validate`}function qC(e,t,r,n){const{gen:o,it:s}=e,{allErrors:i,schemaEnv:a,opts:c}=s,l=c.passContext?zC.default.this:UC.nil;function u(e){const t=UC._`${e}.errors`;o.assign(zC.default.vErrors,UC._`${zC.default.vErrors} === null ? ${t} : ${zC.default.vErrors}.concat(${t})`),o.assign(zC.default.errors,UC._`${zC.default.vErrors}.length`)}function h(e){var t;if(!s.opts.unevaluated)return;const n=null===(t=null==r?void 0:r.validate)||void 0===t?void 0:t.evaluated;if(!0!==s.props)if(n&&!n.dynamicProps)void 0!==n.props&&(s.props=GC.mergeEvaluated.props(o,n.props,s.props));else{const t=o.var("props",UC._`${e}.evaluated.props`);s.props=GC.mergeEvaluated.props(o,t,s.props,UC.Name)}if(!0!==s.items)if(n&&!n.dynamicItems)void 0!==n.items&&(s.items=GC.mergeEvaluated.items(o,n.items,s.items));else{const t=o.var("items",UC._`${e}.evaluated.items`);s.items=GC.mergeEvaluated.items(o,t,s.items,UC.Name)}}n?function(){if(!a.$async)throw new Error("async schema referenced by sync schema");const r=o.let("valid");o.try((()=>{o.code(UC._`await ${(0,LC.callValidateCode)(e,t,l)}`),h(t),i||o.assign(r,!0)}),(e=>{o.if(UC._`!(${e} instanceof ${s.ValidationError})`,(()=>o.throw(e))),u(e),i||o.assign(r,!1)})),e.ok(r)}():e.result((0,LC.callValidateCode)(e,t,l),(()=>h(t)),(()=>u(t)))}FC.getValidate=WC,FC.callRef=qC,FC.default=HC,Object.defineProperty(IC,"__esModule",{value:!0});const KC=FC,YC=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",MC.default,KC.default];IC.default=YC;var JC={},QC={};Object.defineProperty(QC,"__esModule",{value:!0});const ZC=x$,XC=ZC.operators,eA={maximum:{okStr:"<=",ok:XC.LTE,fail:XC.GT},minimum:{okStr:">=",ok:XC.GTE,fail:XC.LT},exclusiveMaximum:{okStr:"<",ok:XC.LT,fail:XC.GTE},exclusiveMinimum:{okStr:">",ok:XC.GT,fail:XC.LTE}},tA={message:({keyword:e,schemaCode:t})=>ZC.str`must be ${eA[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>ZC._`{comparison: ${eA[e].okStr}, limit: ${t}}`},rA={keyword:Object.keys(eA),type:"number",schemaType:"number",$data:!0,error:tA,code(e){const{keyword:t,data:r,schemaCode:n}=e;e.fail$data(ZC._`${r} ${eA[t].fail} ${n} || isNaN(${r})`)}};QC.default=rA;var nA={};Object.defineProperty(nA,"__esModule",{value:!0});const oA=x$,sA={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:e})=>oA.str`must be multiple of ${e}`,params:({schemaCode:e})=>oA._`{multipleOf: ${e}}`},code(e){const{gen:t,data:r,schemaCode:n,it:o}=e,s=o.opts.multipleOfPrecision,i=t.let("res"),a=s?oA._`Math.abs(Math.round(${i}) - ${i}) > 1e-${s}`:oA._`${i} !== parseInt(${i})`;e.fail$data(oA._`(${n} === 0 || (${i} = ${r}/${n}, ${a}))`)}};nA.default=sA;var iA={},aA={};function cA(e){const t=e.length;let r,n=0,o=0;for(;o<t;)n++,r=e.charCodeAt(o++),r>=55296&&r<=56319&&o<t&&(r=e.charCodeAt(o),56320==(64512&r)&&o++);return n}Object.defineProperty(aA,"__esModule",{value:!0}),aA.default=cA,cA.code='require("ajv/dist/runtime/ucs2length").default',Object.defineProperty(iA,"__esModule",{value:!0});const lA=x$,uA=N$,hA=aA,dA={message:({keyword:e,schemaCode:t})=>lA.str`must NOT have ${"maxLength"===e?"more":"fewer"} than ${t} characters`,params:({schemaCode:e})=>lA._`{limit: ${e}}`},fA={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:dA,code(e){const{keyword:t,data:r,schemaCode:n,it:o}=e,s="maxLength"===t?lA.operators.GT:lA.operators.LT,i=!1===o.opts.unicode?lA._`${r}.length`:lA._`${(0,uA.useFunc)(e.gen,hA.default)}(${r})`;e.fail$data(lA._`${i} ${s} ${n}`)}};iA.default=fA;var pA={};Object.defineProperty(pA,"__esModule",{value:!0});const mA=Z$,vA=x$,gA={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>vA.str`must match pattern "${e}"`,params:({schemaCode:e})=>vA._`{pattern: ${e}}`},code(e){const{data:t,$data:r,schema:n,schemaCode:o,it:s}=e,i=s.opts.unicodeRegExp?"u":"",a=r?vA._`(new RegExp(${o}, ${i}))`:(0,mA.usePattern)(e,n);e.fail$data(vA._`!${a}.test(${t})`)}};pA.default=gA;var yA={};Object.defineProperty(yA,"__esModule",{value:!0});const bA=x$,_A={message:({keyword:e,schemaCode:t})=>bA.str`must NOT have ${"maxProperties"===e?"more":"fewer"} than ${t} properties`,params:({schemaCode:e})=>bA._`{limit: ${e}}`},wA={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:_A,code(e){const{keyword:t,data:r,schemaCode:n}=e,o="maxProperties"===t?bA.operators.GT:bA.operators.LT;e.fail$data(bA._`Object.keys(${r}).length ${o} ${n}`)}};yA.default=wA;var SA={};Object.defineProperty(SA,"__esModule",{value:!0});const EA=Z$,$A=x$,OA=N$,CA={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:e}})=>$A.str`must have required property '${e}'`,params:({params:{missingProperty:e}})=>$A._`{missingProperty: ${e}}`},code(e){const{gen:t,schema:r,schemaCode:n,data:o,$data:s,it:i}=e,{opts:a}=i;if(!s&&0===r.length)return;const c=r.length>=a.loopRequired;if(i.allErrors?function(){if(c||s)e.block$data($A.nil,l);else for(const t of r)(0,EA.checkReportMissingProp)(e,t)}():function(){const i=t.let("missing");if(c||s){const r=t.let("valid",!0);e.block$data(r,(()=>function(r,s){e.setParams({missingProperty:r}),t.forOf(r,n,(()=>{t.assign(s,(0,EA.propertyInData)(t,o,r,a.ownProperties)),t.if((0,$A.not)(s),(()=>{e.error(),t.break()}))}),$A.nil)}(i,r))),e.ok(r)}else t.if((0,EA.checkMissingProp)(e,r,i)),(0,EA.reportMissingProp)(e,i),t.else()}(),a.strictRequired){const t=e.parentSchema.properties,{definedProperties:n}=e.it;for(const e of r)if(void 0===(null==t?void 0:t[e])&&!n.has(e)){const t=i.schemaEnv.baseId+i.errSchemaPath;(0,OA.checkStrictMode)(i,`required property "${e}" is not defined at "${t}" (strictRequired)`,i.opts.strictRequired)}}function l(){t.forOf("prop",n,(r=>{e.setParams({missingProperty:r}),t.if((0,EA.noPropertyInData)(t,o,r,a.ownProperties),(()=>e.error()))}))}}};SA.default=CA;var AA={};Object.defineProperty(AA,"__esModule",{value:!0});const TA=x$,xA={message:({keyword:e,schemaCode:t})=>TA.str`must NOT have ${"maxItems"===e?"more":"fewer"} than ${t} items`,params:({schemaCode:e})=>TA._`{limit: ${e}}`},PA={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:xA,code(e){const{keyword:t,data:r,schemaCode:n}=e,o="maxItems"===t?TA.operators.GT:TA.operators.LT;e.fail$data(TA._`${r}.length ${o} ${n}`)}};AA.default=PA;var jA={},NA={};Object.defineProperty(NA,"__esModule",{value:!0});const RA=yO;RA.code='require("ajv/dist/runtime/equal").default',NA.default=RA,Object.defineProperty(jA,"__esModule",{value:!0});const kA=U$,IA=x$,MA=N$,DA=NA,FA={message:({params:{i:e,j:t}})=>IA.str`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>IA._`{i: ${e}, j: ${t}}`},VA={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:FA,code(e){const{gen:t,data:r,$data:n,schema:o,parentSchema:s,schemaCode:i,it:a}=e;if(!n&&!o)return;const c=t.let("valid"),l=s.items?(0,kA.getSchemaTypes)(s.items):[];function u(n,o){const s=t.name("item"),i=(0,kA.checkDataTypes)(l,s,a.opts.strictNumbers,kA.DataType.Wrong),u=t.const("indices",IA._`{}`);t.for(IA._`;${n}--;`,(()=>{t.let(s,IA._`${r}[${n}]`),t.if(i,IA._`continue`),l.length>1&&t.if(IA._`typeof ${s} == "string"`,IA._`${s} += "_"`),t.if(IA._`typeof ${u}[${s}] == "number"`,(()=>{t.assign(o,IA._`${u}[${s}]`),e.error(),t.assign(c,!1).break()})).code(IA._`${u}[${s}] = ${n}`)}))}function h(n,o){const s=(0,MA.useFunc)(t,DA.default),i=t.name("outer");t.label(i).for(IA._`;${n}--;`,(()=>t.for(IA._`${o} = ${n}; ${o}--;`,(()=>t.if(IA._`${s}(${r}[${n}], ${r}[${o}])`,(()=>{e.error(),t.assign(c,!1).break(i)}))))))}e.block$data(c,(function(){const n=t.let("i",IA._`${r}.length`),o=t.let("j");e.setParams({i:n,j:o}),t.assign(c,!0),t.if(IA._`${n} > 1`,(()=>(l.length>0&&!l.some((e=>"object"===e||"array"===e))?u:h)(n,o)))}),IA._`${i} === false`),e.ok(c)}};jA.default=VA;var LA={};Object.defineProperty(LA,"__esModule",{value:!0});const UA=x$,zA=N$,BA=NA,GA={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:e})=>UA._`{allowedValue: ${e}}`},code(e){const{gen:t,data:r,$data:n,schemaCode:o,schema:s}=e;n||s&&"object"==typeof s?e.fail$data(UA._`!${(0,zA.useFunc)(t,BA.default)}(${r}, ${o})`):e.fail(UA._`${s} !== ${r}`)}};LA.default=GA;var HA={};Object.defineProperty(HA,"__esModule",{value:!0});const WA=x$,qA=N$,KA=NA,YA={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:e})=>WA._`{allowedValues: ${e}}`},code(e){const{gen:t,data:r,$data:n,schema:o,schemaCode:s,it:i}=e;if(!n&&0===o.length)throw new Error("enum must have non-empty array");const a=o.length>=i.opts.loopEnum;let c;const l=()=>null!=c?c:c=(0,qA.useFunc)(t,KA.default);let u;if(a||n)u=t.let("valid"),e.block$data(u,(function(){t.assign(u,!1),t.forOf("v",s,(e=>t.if(WA._`${l()}(${r}, ${e})`,(()=>t.assign(u,!0).break()))))}));else{if(!Array.isArray(o))throw new Error("ajv implementation error");const e=t.const("vSchema",s);u=(0,WA.or)(...o.map(((t,n)=>function(e,t){const n=o[t];return"object"==typeof n&&null!==n?WA._`${l()}(${r}, ${e}[${t}])`:WA._`${r} === ${n}`}(e,n))))}e.pass(u)}};HA.default=YA,Object.defineProperty(JC,"__esModule",{value:!0});const JA=nA,QA=iA,ZA=pA,XA=yA,eT=SA,tT=AA,rT=jA,nT=LA,oT=HA,sT=[QC.default,JA.default,QA.default,ZA.default,XA.default,eT.default,tT.default,rT.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},nT.default,oT.default];JC.default=sT;var iT={},aT={};Object.defineProperty(aT,"__esModule",{value:!0}),aT.validateAdditionalItems=void 0;const cT=x$,lT=N$,uT={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:e}})=>cT.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>cT._`{limit: ${e}}`},code(e){const{parentSchema:t,it:r}=e,{items:n}=t;Array.isArray(n)?hT(e,n):(0,lT.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas')}};function hT(e,t){const{gen:r,schema:n,data:o,keyword:s,it:i}=e;i.items=!0;const a=r.const("len",cT._`${o}.length`);if(!1===n)e.setParams({len:t.length}),e.pass(cT._`${a} <= ${t.length}`);else if("object"==typeof n&&!(0,lT.alwaysValidSchema)(i,n)){const n=r.var("valid",cT._`${a} <= ${t.length}`);r.if((0,cT.not)(n),(()=>function(n){r.forRange("i",t.length,a,(t=>{e.subschema({keyword:s,dataProp:t,dataPropType:lT.Type.Num},n),i.allErrors||r.if((0,cT.not)(n),(()=>r.break()))}))}(n))),e.ok(n)}}aT.validateAdditionalItems=hT,aT.default=uT;var dT={},fT={};Object.defineProperty(fT,"__esModule",{value:!0}),fT.validateTuple=void 0;const pT=x$,mT=N$,vT=Z$,gT={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){const{schema:t,it:r}=e;if(Array.isArray(t))return yT(e,"additionalItems",t);r.items=!0,(0,mT.alwaysValidSchema)(r,t)||e.ok((0,vT.validateArray)(e))}};function yT(e,t,r=e.schema){const{gen:n,parentSchema:o,data:s,keyword:i,it:a}=e;!function(e){const{opts:n,errSchemaPath:o}=a,s=r.length,c=s===e.minItems&&(s===e.maxItems||!1===e[t]);if(n.strictTuples&&!c){const e=`"${i}" is ${s}-tuple, but minItems or maxItems/${t} are not specified or different at path "${o}"`;(0,mT.checkStrictMode)(a,e,n.strictTuples)}}(o),a.opts.unevaluated&&r.length&&!0!==a.items&&(a.items=mT.mergeEvaluated.items(n,r.length,a.items));const c=n.name("valid"),l=n.const("len",pT._`${s}.length`);r.forEach(((t,r)=>{(0,mT.alwaysValidSchema)(a,t)||(n.if(pT._`${l} > ${r}`,(()=>e.subschema({keyword:i,schemaProp:r,dataProp:r},c))),e.ok(c))}))}fT.validateTuple=yT,fT.default=gT,Object.defineProperty(dT,"__esModule",{value:!0});const bT=fT,_T={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,bT.validateTuple)(e,"items")};dT.default=_T;var wT={};Object.defineProperty(wT,"__esModule",{value:!0});const ST=x$,ET=N$,$T=Z$,OT=aT,CT={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:e}})=>ST.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>ST._`{limit: ${e}}`},code(e){const{schema:t,parentSchema:r,it:n}=e,{prefixItems:o}=r;n.items=!0,(0,ET.alwaysValidSchema)(n,t)||(o?(0,OT.validateAdditionalItems)(e,o):e.ok((0,$T.validateArray)(e)))}};wT.default=CT;var AT={};Object.defineProperty(AT,"__esModule",{value:!0});const TT=x$,xT=N$,PT={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:e,max:t}})=>void 0===t?TT.str`must contain at least ${e} valid item(s)`:TT.str`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>void 0===t?TT._`{minContains: ${e}}`:TT._`{minContains: ${e}, maxContains: ${t}}`},code(e){const{gen:t,schema:r,parentSchema:n,data:o,it:s}=e;let i,a;const{minContains:c,maxContains:l}=n;s.opts.next?(i=void 0===c?1:c,a=l):i=1;const u=t.const("len",TT._`${o}.length`);if(e.setParams({min:i,max:a}),void 0===a&&0===i)return void(0,xT.checkStrictMode)(s,'"minContains" == 0 without "maxContains": "contains" keyword ignored');if(void 0!==a&&i>a)return(0,xT.checkStrictMode)(s,'"minContains" > "maxContains" is always invalid'),void e.fail();if((0,xT.alwaysValidSchema)(s,r)){let t=TT._`${u} >= ${i}`;return void 0!==a&&(t=TT._`${t} && ${u} <= ${a}`),void e.pass(t)}s.items=!0;const h=t.name("valid");function d(){const e=t.name("_valid"),r=t.let("count",0);f(e,(()=>t.if(e,(()=>function(e){t.code(TT._`${e}++`),void 0===a?t.if(TT._`${e} >= ${i}`,(()=>t.assign(h,!0).break())):(t.if(TT._`${e} > ${a}`,(()=>t.assign(h,!1).break())),1===i?t.assign(h,!0):t.if(TT._`${e} >= ${i}`,(()=>t.assign(h,!0))))}(r)))))}function f(r,n){t.forRange("i",0,u,(t=>{e.subschema({keyword:"contains",dataProp:t,dataPropType:xT.Type.Num,compositeRule:!0},r),n()}))}void 0===a&&1===i?f(h,(()=>t.if(h,(()=>t.break())))):0===i?(t.let(h,!0),void 0!==a&&t.if(TT._`${o}.length > 0`,d)):(t.let(h,!1),d()),e.result(h,(()=>e.reset()))}};AT.default=PT;var jT={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;const t=x$,r=N$,n=Z$;e.error={message:({params:{property:e,depsCount:r,deps:n}})=>{const o=1===r?"property":"properties";return t.str`must have ${o} ${n} when property ${e} is present`},params:({params:{property:e,depsCount:r,deps:n,missingProperty:o}})=>t._`{property: ${e},
19
- missingProperty: ${o},
20
- depsCount: ${r},
21
- deps: ${n}}`};const o={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(e){const[t,r]=function({schema:e}){const t={},r={};for(const n in e){if("__proto__"===n)continue;(Array.isArray(e[n])?t:r)[n]=e[n]}return[t,r]}(e);s(e,t),i(e,r)}};function s(e,r=e.schema){const{gen:o,data:s,it:i}=e;if(0===Object.keys(r).length)return;const a=o.let("missing");for(const c in r){const l=r[c];if(0===l.length)continue;const u=(0,n.propertyInData)(o,s,c,i.opts.ownProperties);e.setParams({property:c,depsCount:l.length,deps:l.join(", ")}),i.allErrors?o.if(u,(()=>{for(const t of l)(0,n.checkReportMissingProp)(e,t)})):(o.if(t._`${u} && (${(0,n.checkMissingProp)(e,l,a)})`),(0,n.reportMissingProp)(e,a),o.else())}}function i(e,t=e.schema){const{gen:o,data:s,keyword:i,it:a}=e,c=o.name("valid");for(const l in t)(0,r.alwaysValidSchema)(a,t[l])||(o.if((0,n.propertyInData)(o,s,l,a.opts.ownProperties),(()=>{const t=e.subschema({keyword:i,schemaProp:l},c);e.mergeValidEvaluated(t,c)}),(()=>o.var(c,!0))),e.ok(c))}e.validatePropertyDeps=s,e.validateSchemaDeps=i,e.default=o}(jT);var NT={};Object.defineProperty(NT,"__esModule",{value:!0});const RT=x$,kT=N$,IT={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:e})=>RT._`{propertyName: ${e.propertyName}}`},code(e){const{gen:t,schema:r,data:n,it:o}=e;if((0,kT.alwaysValidSchema)(o,r))return;const s=t.name("valid");t.forIn("key",n,(r=>{e.setParams({propertyName:r}),e.subschema({keyword:"propertyNames",data:r,dataTypes:["string"],propertyName:r,compositeRule:!0},s),t.if((0,RT.not)(s),(()=>{e.error(!0),o.allErrors||t.break()}))})),e.ok(s)}};NT.default=IT;var MT={};Object.defineProperty(MT,"__esModule",{value:!0});const DT=Z$,FT=x$,VT=R$,LT=N$,UT={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:e})=>FT._`{additionalProperty: ${e.additionalProperty}}`},code(e){const{gen:t,schema:r,parentSchema:n,data:o,errsCount:s,it:i}=e;if(!s)throw new Error("ajv implementation error");const{allErrors:a,opts:c}=i;if(i.props=!0,"all"!==c.removeAdditional&&(0,LT.alwaysValidSchema)(i,r))return;const l=(0,DT.allSchemaProperties)(n.properties),u=(0,DT.allSchemaProperties)(n.patternProperties);function h(e){t.code(FT._`delete ${o}[${e}]`)}function d(n){if("all"===c.removeAdditional||c.removeAdditional&&!1===r)h(n);else{if(!1===r)return e.setParams({additionalProperty:n}),e.error(),void(a||t.break());if("object"==typeof r&&!(0,LT.alwaysValidSchema)(i,r)){const r=t.name("valid");"failing"===c.removeAdditional?(f(n,r,!1),t.if((0,FT.not)(r),(()=>{e.reset(),h(n)}))):(f(n,r),a||t.if((0,FT.not)(r),(()=>t.break())))}}}function f(t,r,n){const o={keyword:"additionalProperties",dataProp:t,dataPropType:LT.Type.Str};!1===n&&Object.assign(o,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(o,r)}t.forIn("key",o,(r=>{l.length||u.length?t.if(function(r){let o;if(l.length>8){const e=(0,LT.schemaRefOrVal)(i,n.properties,"properties");o=(0,DT.isOwnProperty)(t,e,r)}else o=l.length?(0,FT.or)(...l.map((e=>FT._`${r} === ${e}`))):FT.nil;return u.length&&(o=(0,FT.or)(o,...u.map((t=>FT._`${(0,DT.usePattern)(e,t)}.test(${r})`)))),(0,FT.not)(o)}(r),(()=>d(r))):d(r)})),e.ok(FT._`${s} === ${VT.default.errors}`)}};MT.default=UT;var zT={};Object.defineProperty(zT,"__esModule",{value:!0});const BT=C$,GT=Z$,HT=N$,WT=MT,qT={keyword:"properties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,parentSchema:n,data:o,it:s}=e;"all"===s.opts.removeAdditional&&void 0===n.additionalProperties&&WT.default.code(new BT.KeywordCxt(s,WT.default,"additionalProperties"));const i=(0,GT.allSchemaProperties)(r);for(const e of i)s.definedProperties.add(e);s.opts.unevaluated&&i.length&&!0!==s.props&&(s.props=HT.mergeEvaluated.props(t,(0,HT.toHash)(i),s.props));const a=i.filter((e=>!(0,HT.alwaysValidSchema)(s,r[e])));if(0===a.length)return;const c=t.name("valid");for(const r of a)l(r)?u(r):(t.if((0,GT.propertyInData)(t,o,r,s.opts.ownProperties)),u(r),s.allErrors||t.else().var(c,!0),t.endIf()),e.it.definedProperties.add(r),e.ok(c);function l(e){return s.opts.useDefaults&&!s.compositeRule&&void 0!==r[e].default}function u(t){e.subschema({keyword:"properties",schemaProp:t,dataProp:t},c)}}};zT.default=qT;var KT={};Object.defineProperty(KT,"__esModule",{value:!0});const YT=Z$,JT=x$,QT=N$,ZT=N$,XT={keyword:"patternProperties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,data:n,parentSchema:o,it:s}=e,{opts:i}=s,a=(0,YT.allSchemaProperties)(r),c=a.filter((e=>(0,QT.alwaysValidSchema)(s,r[e])));if(0===a.length||c.length===a.length&&(!s.opts.unevaluated||!0===s.props))return;const l=i.strictSchema&&!i.allowMatchingProperties&&o.properties,u=t.name("valid");!0===s.props||s.props instanceof JT.Name||(s.props=(0,ZT.evaluatedPropsToName)(t,s.props));const{props:h}=s;function d(e){for(const t in l)new RegExp(e).test(t)&&(0,QT.checkStrictMode)(s,`property ${t} matches pattern ${e} (use allowMatchingProperties)`)}function f(r){t.forIn("key",n,(n=>{t.if(JT._`${(0,YT.usePattern)(e,r)}.test(${n})`,(()=>{const o=c.includes(r);o||e.subschema({keyword:"patternProperties",schemaProp:r,dataProp:n,dataPropType:ZT.Type.Str},u),s.opts.unevaluated&&!0!==h?t.assign(JT._`${h}[${n}]`,!0):o||s.allErrors||t.if((0,JT.not)(u),(()=>t.break()))}))}))}!function(){for(const e of a)l&&d(e),s.allErrors?f(e):(t.var(u,!0),f(e),t.if(u))}()}};KT.default=XT;var ex={};Object.defineProperty(ex,"__esModule",{value:!0});const tx=N$,rx={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){const{gen:t,schema:r,it:n}=e;if((0,tx.alwaysValidSchema)(n,r))return void e.fail();const o=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},o),e.failResult(o,(()=>e.reset()),(()=>e.error()))},error:{message:"must NOT be valid"}};ex.default=rx;var nx={};Object.defineProperty(nx,"__esModule",{value:!0});const ox={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:Z$.validateUnion,error:{message:"must match a schema in anyOf"}};nx.default=ox;var sx={};Object.defineProperty(sx,"__esModule",{value:!0});const ix=x$,ax=N$,cx={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:e})=>ix._`{passingSchemas: ${e.passing}}`},code(e){const{gen:t,schema:r,parentSchema:n,it:o}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(o.opts.discriminator&&n.discriminator)return;const s=r,i=t.let("valid",!1),a=t.let("passing",null),c=t.name("_valid");e.setParams({passing:a}),t.block((function(){s.forEach(((r,n)=>{let s;(0,ax.alwaysValidSchema)(o,r)?t.var(c,!0):s=e.subschema({keyword:"oneOf",schemaProp:n,compositeRule:!0},c),n>0&&t.if(ix._`${c} && ${i}`).assign(i,!1).assign(a,ix._`[${a}, ${n}]`).else(),t.if(c,(()=>{t.assign(i,!0),t.assign(a,n),s&&e.mergeEvaluated(s,ix.Name)}))}))})),e.result(i,(()=>e.reset()),(()=>e.error(!0)))}};sx.default=cx;var lx={};Object.defineProperty(lx,"__esModule",{value:!0});const ux=N$,hx={keyword:"allOf",schemaType:"array",code(e){const{gen:t,schema:r,it:n}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");const o=t.name("valid");r.forEach(((t,r)=>{if((0,ux.alwaysValidSchema)(n,t))return;const s=e.subschema({keyword:"allOf",schemaProp:r},o);e.ok(o),e.mergeEvaluated(s)}))}};lx.default=hx;var dx={};Object.defineProperty(dx,"__esModule",{value:!0});const fx=x$,px=N$,mx={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:e})=>fx.str`must match "${e.ifClause}" schema`,params:({params:e})=>fx._`{failingKeyword: ${e.ifClause}}`},code(e){const{gen:t,parentSchema:r,it:n}=e;void 0===r.then&&void 0===r.else&&(0,px.checkStrictMode)(n,'"if" without "then" and "else" is ignored');const o=vx(n,"then"),s=vx(n,"else");if(!o&&!s)return;const i=t.let("valid",!0),a=t.name("_valid");if(function(){const t=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},a);e.mergeEvaluated(t)}(),e.reset(),o&&s){const r=t.let("ifClause");e.setParams({ifClause:r}),t.if(a,c("then",r),c("else",r))}else o?t.if(a,c("then")):t.if((0,fx.not)(a),c("else"));function c(r,n){return()=>{const o=e.subschema({keyword:r},a);t.assign(i,a),e.mergeValidEvaluated(o,i),n?t.assign(n,fx._`${r}`):e.setParams({ifClause:r})}}e.pass(i,(()=>e.error(!0)))}};function vx(e,t){const r=e.schema[t];return void 0!==r&&!(0,px.alwaysValidSchema)(e,r)}dx.default=mx;var gx={};Object.defineProperty(gx,"__esModule",{value:!0});const yx=N$,bx={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){void 0===t.if&&(0,yx.checkStrictMode)(r,`"${e}" without "if" is ignored`)}};gx.default=bx,Object.defineProperty(iT,"__esModule",{value:!0});const _x=aT,wx=dT,Sx=fT,Ex=wT,$x=AT,Ox=jT,Cx=NT,Ax=MT,Tx=zT,xx=KT,Px=ex,jx=nx,Nx=sx,Rx=lx,kx=dx,Ix=gx;iT.default=function(e=!1){const t=[Px.default,jx.default,Nx.default,Rx.default,kx.default,Ix.default,Cx.default,Ax.default,Ox.default,Tx.default,xx.default];return e?t.push(wx.default,Ex.default):t.push(_x.default,Sx.default),t.push($x.default),t};var Mx={},Dx={};Object.defineProperty(Dx,"__esModule",{value:!0});const Fx=x$,Vx={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>Fx.str`must match format "${e}"`,params:({schemaCode:e})=>Fx._`{format: ${e}}`},code(e,t){const{gen:r,data:n,$data:o,schema:s,schemaCode:i,it:a}=e,{opts:c,errSchemaPath:l,schemaEnv:u,self:h}=a;c.validateFormats&&(o?function(){const o=r.scopeValue("formats",{ref:h.formats,code:c.code.formats}),s=r.const("fDef",Fx._`${o}[${i}]`),a=r.let("fType"),l=r.let("format");r.if(Fx._`typeof ${s} == "object" && !(${s} instanceof RegExp)`,(()=>r.assign(a,Fx._`${s}.type || "string"`).assign(l,Fx._`${s}.validate`)),(()=>r.assign(a,Fx._`"string"`).assign(l,s))),e.fail$data((0,Fx.or)(!1===c.strictSchema?Fx.nil:Fx._`${i} && !${l}`,function(){const e=u.$async?Fx._`(${s}.async ? await ${l}(${n}) : ${l}(${n}))`:Fx._`${l}(${n})`,r=Fx._`(typeof ${l} == "function" ? ${e} : ${l}.test(${n}))`;return Fx._`${l} && ${l} !== true && ${a} === ${t} && !${r}`}()))}():function(){const o=h.formats[s];if(!o)return void function(){if(!1===c.strictSchema)return void h.logger.warn(e());throw new Error(e());function e(){return`unknown format "${s}" ignored in schema at path "${l}"`}}();if(!0===o)return;const[i,a,d]=function(e){const t=e instanceof RegExp?(0,Fx.regexpCode)(e):c.code.formats?Fx._`${c.code.formats}${(0,Fx.getProperty)(s)}`:void 0,n=r.scopeValue("formats",{key:s,ref:e,code:t});if("object"==typeof e&&!(e instanceof RegExp))return[e.type||"string",e.validate,Fx._`${n}.validate`];return["string",e,n]}(o);i===t&&e.pass(function(){if("object"==typeof o&&!(o instanceof RegExp)&&o.async){if(!u.$async)throw new Error("async format in sync schema");return Fx._`await ${d}(${n})`}return"function"==typeof a?Fx._`${d}(${n})`:Fx._`${d}.test(${n})`}())}())}};Dx.default=Vx,Object.defineProperty(Mx,"__esModule",{value:!0});const Lx=[Dx.default];Mx.default=Lx;var Ux={};Object.defineProperty(Ux,"__esModule",{value:!0}),Ux.contentVocabulary=Ux.metadataVocabulary=void 0,Ux.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],Ux.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"],Object.defineProperty(kC,"__esModule",{value:!0});const zx=JC,Bx=iT,Gx=Mx,Hx=Ux,Wx=[IC.default,zx.default,(0,Bx.default)(),Gx.default,Hx.metadataVocabulary,Hx.contentVocabulary];kC.default=Wx;var qx={},Kx={};!function(e){var t;Object.defineProperty(e,"__esModule",{value:!0}),e.DiscrError=void 0,(t=e.DiscrError||(e.DiscrError={})).Tag="tag",t.Mapping="mapping"}(Kx),Object.defineProperty(qx,"__esModule",{value:!0});const Yx=x$,Jx=Kx,Qx=mC,Zx=N$,Xx={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:e,tagName:t}})=>e===Jx.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>Yx._`{error: ${e}, tag: ${r}, tagValue: ${t}}`},code(e){const{gen:t,data:r,schema:n,parentSchema:o,it:s}=e,{oneOf:i}=o;if(!s.opts.discriminator)throw new Error("discriminator: requires discriminator option");const a=n.propertyName;if("string"!=typeof a)throw new Error("discriminator: requires propertyName");if(n.mapping)throw new Error("discriminator: mapping is not supported");if(!i)throw new Error("discriminator: requires oneOf keyword");const c=t.let("valid",!1),l=t.const("tag",Yx._`${r}${(0,Yx.getProperty)(a)}`);function u(r){const n=t.name("valid"),o=e.subschema({keyword:"oneOf",schemaProp:r},n);return e.mergeEvaluated(o,Yx.Name),n}t.if(Yx._`typeof ${l} == "string"`,(()=>function(){const r=function(){var e;const t={},r=c(o);let n=!0;for(let t=0;t<i.length;t++){let o=i[t];(null==o?void 0:o.$ref)&&!(0,Zx.schemaHasRulesButRef)(o,s.self.RULES)&&(o=Qx.resolveRef.call(s.self,s.schemaEnv.root,s.baseId,null==o?void 0:o.$ref),o instanceof Qx.SchemaEnv&&(o=o.schema));const u=null===(e=null==o?void 0:o.properties)||void 0===e?void 0:e[a];if("object"!=typeof u)throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${a}"`);n=n&&(r||c(o)),l(u,t)}if(!n)throw new Error(`discriminator: "${a}" must be required`);return t;function c({required:e}){return Array.isArray(e)&&e.includes(a)}function l(e,t){if(e.const)u(e.const,t);else{if(!e.enum)throw new Error(`discriminator: "properties/${a}" must have "const" or "enum"`);for(const r of e.enum)u(r,t)}}function u(e,r){if("string"!=typeof e||e in t)throw new Error(`discriminator: "${a}" values must be unique strings`);t[e]=r}}();t.if(!1);for(const e in r)t.elseIf(Yx._`${l} === ${e}`),t.assign(c,u(r[e]));t.else(),e.error(!1,{discrError:Jx.DiscrError.Mapping,tag:l,tagName:a}),t.endIf()}()),(()=>e.error(!1,{discrError:Jx.DiscrError.Tag,tag:l,tagName:a}))),e.ok(c)}};qx.default=Xx;var eP={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0};!function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;const r=O$,n=kC,o=qx,s=eP,i=["/properties"],a="http://json-schema.org/draft-07/schema";class c extends r.default{_addVocabularies(){super._addVocabularies(),n.default.forEach((e=>this.addVocabulary(e))),this.opts.discriminator&&this.addKeyword(o.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const e=this.opts.$data?this.$dataMetaSchema(s,i):s;this.addMetaSchema(e,a,!1),this.refs["http://json-schema.org/schema"]=a}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(a)?a:void 0)}}e.exports=t=c,Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;var l=C$;Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return l.KeywordCxt}});var u=x$;Object.defineProperty(t,"_",{enumerable:!0,get:function(){return u._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return u.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return u.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return u.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return u.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return u.CodeGen}});var h=uC;Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return h.default}});var d=dC;Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return d.default}})}($$,$$.exports);var tP=p($$.exports),rP={exports:{}},nP={};!function(e){function t(e,t){return{validate:e,compare:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.formatNames=e.fastFormats=e.fullFormats=void 0,e.fullFormats={date:t(o,s),time:t(a,c),"date-time":t((function(e){const t=e.split(l);return 2===t.length&&o(t[0])&&a(t[1],!0)}),u),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:function(e){return h.test(e)&&d.test(e)},"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:function(e){if(g.test(e))return!1;try{return new RegExp(e),!0}catch(e){return!1}},uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:function(e){return f.lastIndex=0,f.test(e)},int32:{type:"number",validate:function(e){return Number.isInteger(e)&&e<=m&&e>=p}},int64:{type:"number",validate:function(e){return Number.isInteger(e)}},float:{type:"number",validate:v},double:{type:"number",validate:v},password:!0,binary:!0},e.fastFormats={...e.fullFormats,date:t(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,s),time:t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,c),"date-time":t(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,u),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},e.formatNames=Object.keys(e.fullFormats);const r=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,n=[0,31,28,31,30,31,30,31,31,30,31,30,31];function o(e){const t=r.exec(e);if(!t)return!1;const o=+t[1],s=+t[2],i=+t[3];return s>=1&&s<=12&&i>=1&&i<=(2===s&&function(e){return e%4==0&&(e%100!=0||e%400==0)}(o)?29:n[s])}function s(e,t){if(e&&t)return e>t?1:e<t?-1:0}const i=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i;function a(e,t){const r=i.exec(e);if(!r)return!1;const n=+r[1],o=+r[2],s=+r[3],a=r[5];return(n<=23&&o<=59&&s<=59||23===n&&59===o&&60===s)&&(!t||""!==a)}function c(e,t){if(!e||!t)return;const r=i.exec(e),n=i.exec(t);return r&&n?(e=r[1]+r[2]+r[3]+(r[4]||""))>(t=n[1]+n[2]+n[3]+(n[4]||""))?1:e<t?-1:0:void 0}const l=/t|\s/i;function u(e,t){if(!e||!t)return;const[r,n]=e.split(l),[o,i]=t.split(l),a=s(r,o);return void 0!==a?a||c(n,i):void 0}const h=/\/|:/,d=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;const f=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;const p=-(2**31),m=2**31-1;function v(){return!0}const g=/[^\\]\\Z/}(nP);var oP={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatLimitDefinition=void 0;const t=$$.exports,r=x$,n=r.operators,o={formatMaximum:{okStr:"<=",ok:n.LTE,fail:n.GT},formatMinimum:{okStr:">=",ok:n.GTE,fail:n.LT},formatExclusiveMaximum:{okStr:"<",ok:n.LT,fail:n.GTE},formatExclusiveMinimum:{okStr:">",ok:n.GT,fail:n.LTE}},s={message:({keyword:e,schemaCode:t})=>r.str`should be ${o[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>r._`{comparison: ${o[e].okStr}, limit: ${t}}`};e.formatLimitDefinition={keyword:Object.keys(o),type:"string",schemaType:"string",$data:!0,error:s,code(e){const{gen:n,data:s,schemaCode:i,keyword:a,it:c}=e,{opts:l,self:u}=c;if(!l.validateFormats)return;const h=new t.KeywordCxt(c,u.RULES.all.format.definition,"format");function d(e){return r._`${e}.compare(${s}, ${i}) ${o[a].fail} 0`}h.$data?function(){const t=n.scopeValue("formats",{ref:u.formats,code:l.code.formats}),o=n.const("fmt",r._`${t}[${h.schemaCode}]`);e.fail$data(r.or(r._`typeof ${o} != "object"`,r._`${o} instanceof RegExp`,r._`typeof ${o}.compare != "function"`,d(o)))}():function(){const t=h.schema,o=u.formats[t];if(!o||!0===o)return;if("object"!=typeof o||o instanceof RegExp||"function"!=typeof o.compare)throw new Error(`"${a}": format "${t}" does not define "compare" function`);const s=n.scopeValue("formats",{key:t,ref:o,code:l.code.formats?r._`${l.code.formats}${r.getProperty(t)}`:void 0});e.fail$data(d(s))}()},dependencies:["format"]};e.default=t=>(t.addKeyword(e.formatLimitDefinition),t)}(oP),function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const r=nP,n=oP,o=x$,s=new o.Name("fullFormats"),i=new o.Name("fastFormats"),a=(e,t={keywords:!0})=>{if(Array.isArray(t))return c(e,t,r.fullFormats,s),e;const[o,a]="fast"===t.mode?[r.fastFormats,i]:[r.fullFormats,s];return c(e,t.formats||r.formatNames,o,a),t.keywords&&n.default(e),e};function c(e,t,r,n){var s,i;null!==(s=(i=e.opts.code).formats)&&void 0!==s||(i.formats=o._`require("ajv-formats/dist/formats").${n}`);for(const n of t)e.addFormat(n,r[n])}a.get=(e,t="full")=>{const n=("fast"===t?r.fastFormats:r.fullFormats)[e];if(!n)throw new Error(`Unknown format "${e}"`);return n},e.exports=t=a,Object.defineProperty(t,"__esModule",{value:!0}),t.default=a}(rP,rP.exports);var sP=p(rP.exports);const iP="additionalProperties",aP="required";class cP{constructor(e){this.findOption=e,this.schemaObject=e=>{const t=this.properties(e),r={type:"object",properties:t,additionalProperties:this.findOption(t)(iP)},n=this.findOption(t)(aP);return n.length>0&&(r.required=n),r},this.properties=e=>Object.keys(e).reduce(((t,r)=>(t[r]=this.property(e[r]),t)),{}),this.property=e=>{switch(typeof e){case"string":return{type:"string"};case"boolean":return{type:"boolean"};case"number":return Number.isInteger(e)?{type:"integer"}:{type:"number"};case"object":return null==e?{type:"null"}:this.schemaObjectOrArray(e);default:return{}}},this.schemaObjectOrArray=e=>e instanceof Array?this.schemaArray(e):this.schemaObject(e),this.schemaArray=e=>{if(e.length>0){const t=((e,t)=>{const r={};return e.filter((e=>{const n=t(e);return!r.hasOwnProperty(n)&&(r[n]=!0,!0)}))})(e.map(this.property),(e=>JSON.stringify(e)));return 1===t.length?{type:"array",items:t[0]}:{type:"array",items:{oneOf:t}}}return{type:"array",items:{}}}}}const lP=(e,t={})=>new cP((e=>r=>{switch(r){case iP:return!t.hasOwnProperty(iP)||t[iP];case aP:return t.hasOwnProperty(aP)?t[aP](e):Object.keys(e);default:return}})).schemaObject(e);var uP;!function(e){e.HIDE="HIDE",e.SHOW="SHOW",e.ENABLE="ENABLE",e.DISABLE="DISABLE"}(uP||(uP={}));const hP=e=>"object"==typeof e&&null!==e&&"string"==typeof e.i18n,dP=e=>void 0!==e.elements,fP={restrict:!1,trim:!1,showUnfocusedDescription:!1,hideRequiredAsterisk:!1},pP=(e={})=>rm({},fP,e),mP=(e=pP(),t)=>t.type===Uj?pP(t.config):e,vP=(e,t)=>{if(void 0===e)return[];return e(t)?[]:e.errors},gP={data:{},schema:{},uischema:void 0,errors:[],validator:void 0,ajv:void 0,validationMode:"ValidateAndShow",additionalErrors:[]},yP=(e,t)=>((t.hasOwnProperty("id")||t.hasOwnProperty("$id"))&&e.removeSchema(t),e),bP=(e,t)=>{if(t){if(_P(t.options))return t.options.ajv;if(void 0!==t.options&&Ra(t.options.compile))return t.options}return e.ajv?t?.schema?yP(e.ajv,t.schema):e.ajv:Cj()},_P=e=>!!e&&void 0!==e.ajv,wP=(e,t)=>t&&SP(t.options)?t.options.validationMode:e.validationMode,SP=e=>!!e&&void 0!==e.validationMode,EP=(e,t)=>{return t&&((r=t.options)&&void 0!==r.additionalErrors)?t.options.additionalErrors:e.additionalErrors;var r},$P=(e=gP,t)=>{switch(t.type){case Nj:{const r=bP(e,t),n=wP(e,t),o="NoValidation"===n?void 0:r.compile(t.schema),s=vP(o,t.data),i=EP(e,t);return{...e,data:t.data,schema:t.schema,uischema:t.uischema,additionalErrors:i,errors:s,validator:o,ajv:r,validationMode:n}}case Rj:{const r=bP(e,t),n=wP(e,t);let o=e.validator,s=e.errors;e.schema!==t.schema||e.validationMode!==n||e.ajv!==r?(o="NoValidation"===n?void 0:r.compile(t.schema),s=vP(o,t.data)):e.data!==t.data&&(s=vP(o,t.data));const i=EP(e,t);return e.data!==t.data||e.schema!==t.schema||e.uischema!==t.uischema||e.ajv!==r||e.errors!==s||e.validator!==o||e.validationMode!==n||e.additionalErrors!==i?{...e,data:t.data,schema:t.schema,uischema:t.uischema,ajv:r,errors:ME(s,e.errors)?e.errors:s,validator:o,validationMode:n,additionalErrors:i}:e}case kj:{const r=t.ajv,n="NoValidation"===e.validationMode?void 0:r.compile(e.schema),o=vP(n,e.data);return{...e,validator:n,errors:o}}case Gj:{const r=t.schema&&e.ajv&&"NoValidation"!==e.validationMode?yP(e.ajv,t.schema).compile(t.schema):e.validator,n=vP(r,e.data);return{...e,validator:r,schema:t.schema,errors:n}}case Hj:return{...e,uischema:t.uischema};case Ij:if(void 0===t.path||null===t.path)return e;if(""===t.path){const r=t.updater(mg(e.data)),n=vP(e.validator,r);return{...e,data:r,errors:n}}{const r=gS(e.data,t.path),n=t.updater(mg(r)),o=SE(t.path,n,void 0===e.data?{}:e.data),s=vP(e.validator,o);return{...e,data:o,errors:s}}case Mj:return{...e,errors:t.errors};case Wj:if(e.validationMode===t.validationMode)return e;if("NoValidation"===t.validationMode){const r=vP(void 0,e.data);return{...e,errors:r,validationMode:t.validationMode}}if("NoValidation"===e.validationMode){const r=yP(e.ajv,e.schema).compile(e.schema),n=vP(r,e.data);return{...e,validator:r,errors:n,validationMode:t.validationMode}}return{...e,validationMode:t.validationMode};default:return e}},OP=e=>{const t=e.dataPath;if(t)return t.replace(/\//g,".").substr(1);var r=e.instancePath;r=r.replace(/\//g,".");const n=(e=>{switch(e.keyword){case"required":case"dependencies":return e.params.missingProperty;case"additionalProperties":return e.params.additionalProperty;default:return}})(e);return void 0===n||r.endsWith(n)||(r=`${r}.${n}`),r=r.replace(/^./,"")},CP=e=>"object"===e?.type||!!e?.properties,AP=["additionalProperties","allOf","anyOf","oneOf"],TP=(e,t,r)=>n=>{const o=n.errors??[],s=n.additionalErrors??[];return((e,t,r)=>n=>{const o=kE(n,(e=>"oneOf"===e.keyword||"anyOf"===e.keyword)).map((e=>OP(e)));return kE(n,(n=>{if(-1!==AP.indexOf(n.keyword))return!1;const s=OP(n);let i=r(s);const a=n.parentSchema;return i&&!CP(a)&&-1!==o.findIndex((t=>e.startsWith(t)))&&(i=i&&ME(a,t)),i}))})(e,t,r)("ValidateAndHide"===n.validationMode?s:[...o,...s])},xP=(e,t)=>hP(t)?t.i18n:e?.i18n??void 0,PP=(e,t,r)=>xP(e,t)??(e=>e?.split(".").filter((e=>!/^\d+$/.test(e))).join(".")||"root")(r),jP=(e,t,r,n)=>`${PP(e,t,r)}.${n}`,NP=(e,t)=>t,RP=(e,t,r)=>{const n=t(jP(e.parentSchema,r,OP(e),`error.${e.keyword}`),void 0,{error:e});if(void 0!==n)return n;const o=t(`error.${e.keyword}`,void 0,{error:e});if(void 0!==o)return o;const s=t(e.message,void 0,{error:e});return void 0!==s?s:"required"===e.keyword&&e.message?.startsWith("must have required property")?t("is a required property","is a required property",{error:e}):e.message},kP={locale:"en",translate:NP,translateError:RP},IP=(e=kP,t)=>{switch(t.type){case Yj:{const r=t.locale??kP.locale,n=t.translator??kP.translate,o=t.errorTranslator??kP.translateError;return r!==e.locale||n!==e.translate||o!==e.translateError?{...e,locale:r,translate:n,translateError:o}:e}case Kj:return{...e,translate:t.translator??NP,translateError:t.errorTranslator??RP};case qj:return{...e,locale:t.locale??navigator.languages[0]};default:return e}},MP=e=>!ll(e)&&void 0!==e.scope,DP=e=>(t,r,n)=>{if(ll(t)||!MP(t))return!1;if(ll(r))return!1;const o=t.scope;if(ll(o))return!1;let s=r;return mj(r,"object")&&(s=sj(r,o,n?.rootSchema)),void 0!==s&&e(s,n?.rootSchema)},FP=e=>DP((t=>!ll(t)&&mj(t,e))),VP=e=>t=>!ll(t)&&t.type===e,LP=(...e)=>(t,r,n)=>e.reduce(((e,o)=>e&&o(t,r,n)),!0),UP=(...e)=>(t,r,n)=>e.reduce(((e,o)=>e||o(t,r,n)),!1),zP=(e,t)=>(r,n,o)=>t(r,n,o)?e:-1,BP=LP(VP("Control"),FP("boolean")),GP=LP(VP("Control"),UP(DP((e=>e.hasOwnProperty("enum"))),DP((e=>e.hasOwnProperty("const"))))),HP=LP(VP("Control"),FP("string")),WP=(e,t)=>r=>((e,t)=>TP(e,t,(t=>t===e)))(e,t)(r.jsonforms.core),qP=e=>e.jsonforms.config,KP=()=>e=>(e=>void 0===e?NP:e.translate)(gS(e,"jsonforms.i18n")),YP=()=>e=>(e=>void 0===e?RP:e.translateError)(gS(e,"jsonforms.i18n")),JP=e=>(e=>gS(e,"data"))(gS(e,"jsonforms.core")),QP=e=>(e=>gS(e,"schema"))(gS(e,"jsonforms.core")),ZP=e=>(e=>gS(e,"uischema"))(gS(e,"jsonforms.core")),XP=e=>(e=>gS(e,"ajv"))(gS(e,"jsonforms.core")),ej=e=>gS(e,"jsonforms.renderers"),tj=e=>gS(e,"jsonforms.cells"),rj=(e,t)=>{if(!(e=>!!e&&"object"==typeof e)(r=e)||"string"!=typeof r.scope)return t??"";var r;const n=(e=>{const t=e.replace(/(anyOf|allOf|oneOf)\/[\d]\//g,"").replace(/(then|else)\//g,"").split("/").map(nj),r="#"===t[0]||""===t[0];return b$(r?2:1,t.length,2).map((e=>t[e]))})(e.scope);return ll(n)?t??"":((e,t)=>{let r=e;return ll(e)||ll(t)||t.startsWith("[")||(r=e+"."),ll(r)?t:ll(t)?r:`${r}${t}`})(t,n.join("."))},nj=e=>e?.replace(/~1/g,"/").replace(/~0/,"~"),oj=(e,t)=>{if(ll(t))return e;return t.split(".").map((e=>decodeURIComponent(e))).reduce(((e,t)=>{if(e&&e.hasOwnProperty(t))return e[t]}),e)},sj=(e,t,r)=>{const n=t?.split("/").map(nj);return ij(e,n,r)},ij=(e,t,r)=>{if(ll(e))return;if(e.$ref&&(e=sj(r,e.$ref,r)),!t||0===t.length)return e;const[n,...o]=t;if("#"===(s=n)||void 0===s||""===s)return ij(e,o,r);var s;const i=gS(e,n),a=ij(i,o,r);if(a)return a;if("properties"===n||"items"===n){let t;const s=[].concat(e.oneOf??[],e.allOf??[],e.anyOf??[],e.then??[],e.else??[]);for(const e of s)if(t=ij(e,[n,...o],r),t)break;return t}},aj=(e,t)=>rj(e,t),cj=(e,t,r,n)=>{if((e=>"AND"===e.type)(t))return t.conditions.reduce(((t,o)=>t&&cj(e,o,r,n)),!0);if((e=>"OR"===e.type)(t))return t.conditions.reduce(((t,o)=>t||cj(e,o,r,n)),!1);if((e=>"LEAF"===e.type)(t)){return oj(e,aj(t,r))===t.expectedValue}if((e=>E$(e,"schema"))(t)){const o=oj(e,aj(t,r));return n.validate(t.schema,o)}return!0},lj=(e,t,r,n)=>{const o=e.rule.condition;return cj(t,o,r,n)},uj=e=>!(!e.rule||e.rule.effect!==uP.SHOW&&e.rule.effect!==uP.HIDE),hj=(e,t,r=undefined,n)=>!e.rule||((e,t,r=undefined,n)=>{const o=lj(e,t,r,n);switch(e.rule.effect){case uP.HIDE:return!o;case uP.SHOW:return o;default:return!0}})(e,t,r,n),dj=(e,t,r=undefined,n)=>!e.rule||((e,t,r=undefined,n)=>{const o=lj(e,t,r,n);switch(e.rule.effect){case uP.DISABLE:return!o;case uP.ENABLE:return o;default:return!0}})(e,t,r,n),fj=(e,t,r,n,o,s)=>!e?.jsonforms?.readonly&&(r&&(e=>!(!e.rule||e.rule.effect!==uP.ENABLE&&e.rule.effect!==uP.DISABLE))(r)?dj(r,o,t?.path,XP(e)):"boolean"==typeof r?.options?.readonly?!r.options.readonly:"boolean"==typeof r?.options?.readOnly?!r.options.readOnly:"boolean"==typeof s?.readonly?!s.readonly:"boolean"==typeof s?.readOnly?!s.readOnly:!0!==n?.readOnly&&("boolean"!=typeof t?.enabled||t.enabled)),pj=e=>null==e?"":e.join("\n"),mj=(e,t)=>r$(vj(e),t),vj=e=>{if(ll(e))return[];if(!ll(e.type)&&"string"==typeof e.type)return[e.type];if(Nc(e.type))return e.type;if(!ll(e.properties)||!ll(e.additionalProperties))return["object"];if(!ll(e.items))return["array"];if(!ll(e.allOf)){const t=d$(e.allOf,(e=>0!==vj(e).length));if(t)return vj(t)}return[]},gj={schema:sj,data:oj},yj=(e,t)=>{if(t&&"string"==typeof t.title)return t.title;if("string"==typeof e.scope){const t=e.scope,r=nj(t.substr(t.lastIndexOf("/")+1));return Lu(r)}return""},bj=(e,t)=>({text:e,show:t}),_j=(e,t,r)=>{let n="string"==typeof e?e:JSON.stringify(e);return t&&(n=t(r?`${r}.${n}`:n,n)),{label:n,value:e}},wj=(e,t)=>{const{uischema:r}=t,n=JP(e),o=rj(r,t.path),s=void 0===t.visible||uj(r)?hj(r,n,t.path,XP(e)):t.visible,i=r,a=t.id,c=QP(e),l=void 0!==i.scope&&((e,t,r)=>{const n=t.split("/"),o=n[n.length-1],s=n.slice(0,n.length-2).join("/"),i=gj.schema(e,s,r);return void 0!==i&&void 0!==i.required&&-1!==i.required.indexOf(o)})(t.schema,i.scope,c),u=gj.schema(t.schema||c,i.scope,c),h=WP(o,u)(e),d=void 0!==u?u.description:"",f=gj.data(n,o),p=((e,t)=>{const r=e.label;if("boolean"==typeof r)return bj(yj(e,t),r);if("string"==typeof r)return bj(r,!0);if("object"==typeof r){const n="string"==typeof r.text?r.text:yj(e,t),o="boolean"!=typeof r.show||r.show;return bj(n,o)}return bj(yj(e,t),!0)})(r,u),m=p.show?p.text:"",v=qP(e),g=fj(e,t,r,u||c,n,v),y=u??c,b=KP()(e),_=YP()(e),w=b(jP(y,r,o,"label"),m,{schema:y,uischema:r,path:o,errors:h}),S=b(jP(y,r,o,"description"),d,{schema:y,uischema:r,path:o,errors:h}),E=((e,t,r,n,o,s)=>{if(e.length>0&&r){const t=jP(n,o,s,"error.custom"),i=r(t,void 0,{schema:n,uischema:o,path:s,errors:e});if(void 0!==i)return i}return pj(e.map((e=>t(e,r,o))))})(h,_,b,y,r,o);return{data:f,description:S,errors:E,label:w,visible:s,enabled:g,id:a,path:o,required:l,uischema:r,schema:y,config:qP(e),cells:t.cells||e.jsonforms.cells,rootSchema:c}},Sj=e=>({handleChange(t,r){e(Zj(t,(()=>r)))}}),Ej={visible:!0,enabled:!0,path:"",direction:"column"},$j=e=>"HorizontalLayout"===e.type?"row":"VerticalLayout"===e.type?"column":Ej.direction,Oj=(e,t)=>{const r=JP(e),{uischema:n}=t,o=void 0===t.visible||uj(n)?hj(t.uischema,r,t.path,XP(e)):t.visible,s=gj.data(r,t.path),i=qP(e),a=fj(e,t,n,void 0,r,i),c=KP()(e),l=(u=n)&&"object"==typeof u?((e,t)=>{if(!1===e.label)return;if((void 0===e.label||null===e.label||!0===e.label)&&!hP(e))return;const r="string"==typeof e.label?e.label:JSON.stringify(e.label),n=xP(void 0,e);return t("string"==typeof n?`${n}.label`:r,r,{uischema:e})})(n,c):void 0;var u;return{...Ej,renderers:t.renderers||ej(e),cells:t.cells||tj(e),visible:o,enabled:a,path:t.path,data:s,uischema:t.uischema,schema:t.schema,direction:t.direction??$j(n),config:i,label:l}},Cj=e=>{const t=new tP({allErrors:!0,verbose:!0,strict:!1,...e});return sP(t),t},Aj=e=>({type:e,elements:[]}),Tj=e=>({type:"Control",scope:e}),xj=(e,t,r,n,o,s)=>{if(!ll(e)&&void 0!==e.$ref)return xj(sj(s,e.$ref,s),t,r,n,o,s);if((e=>!(ll(e)||ll(e.oneOf)&&ll(e.anyOf)&&ll(e.allOf)))(e)){const e=Tj(r);return t.push(e),e}const i=vj(e);if(0===i.length)return null;if(i.length>1){const e=Tj(r);return t.push(e),e}if("#"===r&&"object"===i[0]){const i=Aj(o);if(t.push(i),e.properties&&rh(e.properties).length>1&&((e,t)=>{if(!ll(t)){const r=Lu(t);if((e=>"Group"===e.type)(e))e.label=r;else{const t={type:"Label",text:r};e.elements.push(t)}}})(i,n),!ll(e.properties)){const t=r+"/properties";Object.keys(e.properties).map((r=>{let n=e.properties[r];const a=`${t}/${c=r,c?.replace(/~/g,"~0").replace(/\//g,"~1")}`;var c;void 0!==n.$ref&&(n=sj(s,n.$ref,s)),xj(n,i.elements,a,r,o,s)}))}return i}switch(i[0]){case"object":case"array":case"string":case"number":case"integer":case"boolean":const n=Tj(r);return t.push(n),n;default:throw new Error("Unknown type: "+JSON.stringify(e))}},Pj=(e,t="VerticalLayout",r="#",n=e)=>((e,t)=>{if(!ll(e)&&!dP(e)){const r=Aj(t);return r.elements.push(e),r}return e})(xj(e,[],r,"",t,n),t),jj=Pj,Nj="jsonforms/INIT",Rj="jsonforms/UPDATE_CORE",kj="jsonforms/SET_AJV",Ij="jsonforms/UPDATE",Mj="jsonforms/UPDATE_ERRORS",Dj="jsonforms/ADD_RENDERER",Fj="jsonforms/REMOVE_RENDERER",Vj="jsonforms/ADD_CELL",Lj="jsonforms/REMOVE_CELL",Uj="jsonforms/SET_CONFIG",zj="jsonforms/ADD_UI_SCHEMA",Bj="jsonforms/REMOVE_UI_SCHEMA",Gj="jsonforms/SET_SCHEMA",Hj="jsonforms/SET_UISCHEMA",Wj="jsonforms/SET_VALIDATION_MODE",qj="jsonforms/SET_LOCALE",Kj="jsonforms/SET_TRANSLATOR",Yj="jsonforms/UPDATE_I18N",Jj="jsonforms/ADD_DEFAULT_DATA",Qj="jsonforms/REMOVE_DEFAULT_DATA",Zj=(e,t)=>({type:Ij,path:e,updater:t});var Xj=Object.freeze({__proto__:null,INIT:Nj,UPDATE_CORE:Rj,SET_AJV:kj,UPDATE_DATA:Ij,UPDATE_ERRORS:Mj,VALIDATE:"jsonforms/VALIDATE",ADD_RENDERER:Dj,REMOVE_RENDERER:Fj,ADD_CELL:Vj,REMOVE_CELL:Lj,SET_CONFIG:Uj,ADD_UI_SCHEMA:zj,REMOVE_UI_SCHEMA:Bj,SET_SCHEMA:Gj,SET_UISCHEMA:Hj,SET_VALIDATION_MODE:Wj,SET_LOCALE:qj,SET_TRANSLATOR:Kj,UPDATE_I18N:Yj,ADD_DEFAULT_DATA:Jj,REMOVE_DEFAULT_DATA:Qj,init:(e,t=lP(e),r,n)=>({type:Nj,data:e,schema:t,uischema:"object"==typeof r?r:Pj(t),options:n}),updateCore:(e,t,r,n)=>({type:Rj,data:e,schema:t,uischema:r,options:n}),registerDefaultData:(e,t)=>({type:Jj,schemaPath:e,data:t}),unregisterDefaultData:e=>({type:Qj,schemaPath:e}),setAjv:e=>({type:kj,ajv:e}),update:Zj,updateErrors:e=>({type:Mj,errors:e}),registerRenderer:(e,t)=>({type:Dj,tester:e,renderer:t}),registerCell:(e,t)=>({type:Vj,tester:e,cell:t}),unregisterCell:(e,t)=>({type:Lj,tester:e,cell:t}),unregisterRenderer:(e,t)=>({type:Fj,tester:e,renderer:t}),setConfig:e=>({type:Uj,config:e}),setValidationMode:e=>({type:Wj,validationMode:e}),registerUISchema:(e,t)=>({type:zj,tester:e,uischema:t}),unregisterUISchema:e=>({type:Bj,tester:e}),setLocale:e=>({type:qj,locale:e}),setSchema:e=>({type:Gj,schema:e}),setTranslator:(e,t)=>({type:Kj,translator:e,errorTranslator:t}),updateI18n:(e,t,r)=>({type:Yj,locale:e,translator:t,errorTranslator:r}),setUISchema:e=>({type:Hj,uischema:e})});const eN={"^[\\+]?[(]?[0-9]{3}[)]?[-\\s\\.]?[0-9]{3}[-\\s\\.]?[0-9]{4,6}$":"Invalid phone number. Must match +###-###-######"},tN=(e,t,r)=>{var n;return"pattern"===(null==e?void 0:e.keyword)?null!==(n=eN[e.params.pattern])&&void 0!==n?n:"Invalid pattern.":RP(e,t,r)},rN=ie`<template>${ze((e=>e.jsonforms&&e.dispatch&&e.props),ie`<dispatch-renderer :jsonforms=${e=>e.jsonforms}:dispatch=${e=>e.dispatch}:props=${e=>e.props}?submitted=${e=>e.submitted}/>`)}</template>`,nN=xe``,oN=(e,t,r)=>{var n,o,s,i;return null!==(i=null===(s=null===(o=null===(n=null==r?void 0:r.options)||void 0===n?void 0:n.i18n)||void 0===o?void 0:o.error)||void 0===s?void 0:s[e.keyword])&&void 0!==i?i:tN(e,t,r)};let sN=class extends Ce{constructor(){super(...arguments),this.dispatch=e=>{this.jsonforms=Object.assign(Object.assign({},this.jsonforms),{core:$P(this.jsonforms.core,e)}),this.$emit("data-change",{data:this.jsonforms.core.data,errors:this.jsonforms.core.errors})},this.validate=e=>{var t,r,n;const o=null===(r=null===(t=this.jsonforms)||void 0===t?void 0:t.core)||void 0===r?void 0:r.data;if(!o)return[];const s=[];return null===(n=null==e?void 0:e.elements)||void 0===n||n.forEach((e=>{var t,r,n,i;const a=null===(t=null==e?void 0:e.options)||void 0===t?void 0:t.validateFn;if("function"!=typeof a)return;const c=null===(n=null===(r=null==e?void 0:e.scope)||void 0===r?void 0:r.split("/"))||void 0===n?void 0:n.pop(),l=null==e?void 0:e.label;let u=null!==(i=a(o,c,l))&&void 0!==i?i:[];Array.isArray(u)||(u=[u]),s.push(...u)})),s}}schemaChanged(){var e,t,r,n;if(!this.schema)return;const o=null!==(e=this.uischema)&&void 0!==e?e:jj(this.schema);this.uischema||console.log("UI schema not provided. Auto generated schema:",o);const s=this.validate(o);this.jsonforms={core:(()=>{const e={data:this.data,schema:this.schema,uischema:o};return $P(e,Xj.init(this.data,this.schema,o,{validationMode:this.validationMode||"ValidateAndShow",ajv:this.ajv,additionalErrors:s}))})(),config:mP(void 0,Xj.setConfig(this.config)),i18n:IP(this.i18n,Xj.updateI18n(null===(t=this.i18n)||void 0===t?void 0:t.locale,null===(r=this.i18n)||void 0===r?void 0:r.translate,(null===(n=this.i18n)||void 0===n?void 0:n.translateError)||oN)),renderers:this.renderers,readonly:this.readonly},this.$emit("data-change",{data:this.jsonforms.core.data,errors:this.jsonforms.core.errors})}uischemaChanged(){this.schemaChanged()}dataChanged(){this.schemaChanged()}renderersChanged(){this.schemaChanged()}validationModeChanged(){this.schemaChanged()}ajvChanged(){this.schemaChanged()}readonlyChanged(){this.schemaChanged()}configChanged(){this.schemaChanged()}get props(){var e;if(!this.schema&&!this.uischema)return;return{uischema:null!==(e=this.uischema)&&void 0!==e?e:jj(this.schema),schema:this.schema,path:"",enabled:!0,visible:!0}}};n([ve({mode:"boolean"})],sN.prototype,"submitted",void 0),n([P],sN.prototype,"jsonforms",void 0),n([P],sN.prototype,"i18n",void 0),n([P],sN.prototype,"schema",void 0),n([P],sN.prototype,"uischema",void 0),n([P],sN.prototype,"data",void 0),n([P],sN.prototype,"renderers",void 0),n([P],sN.prototype,"validationMode",void 0),n([P],sN.prototype,"ajv",void 0),n([ve({mode:"boolean"})],sN.prototype,"readonly",void 0),n([P],sN.prototype,"config",void 0),sN=n([Ae({name:"json-forms",template:rN,styles:nN})],sN);const iN=ie`<template>${ze((e=>{var t;return null===(t=e.control)||void 0===t?void 0:t.visible}),ie`<div class="wrapperRoot" id=${e=>e.control.id+e.control.uischema.scope}><div for="${e=>e.control.id+"-input"}" class="label">${e=>e.computedLabel}</div><div class="wrapper"><slot></slot></div><div class="${e=>e.control.errors&&e.touched?"error":"description"}">${e=>e.control.errors&&e.touched?e.control.errors:e.showDescription?e.control.description:""}</div></div>`)}</template>`,aN=xe` .wrapperRoot{margin-bottom: 20px}.label{color: rgb(135, 155, 166);font-family: Roboto-Medium, sans-serif;font-style: normal;margin-bottom: 4px;display: flex;justify-content: space-between}.error{font-size: 12px;color: #f9644d;margin-left: 10px}.wrapper{display: flex;width: 100%}`;let cN=class extends Ce{get showDescription(){return!((e,t,r,n)=>void 0===t||void 0!==t&&!e||!n&&!r)(this.control.visible,this.control.description,this.control.isFocused,!!this.control.config.showUnfocusedDescription)}get computedLabel(){return((e,t,r)=>`${e??""}${t&&!r?"*":""}`)(this.control.label,this.control.required,!!this.control.config.hideRequiredAsterisk)}};n([P],cN.prototype,"control",void 0),n([P],cN.prototype,"touched",void 0),n([j],cN.prototype,"showDescription",null),n([j],cN.prototype,"computedLabel",null),cN=n([Ae({name:"control-wrapper",styles:aN,template:iN})],cN);const lN=ie`<template>${e=>e.determinedRenderer.renderer}</template>`,uN=xe``;let hN=class extends Ce{constructor(){super(...arguments),this.createRenderer=()=>{if(!this.jsonforms||!this.dispatch||!this.props)return;var e,t;const r=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}((e={jsonforms:this.jsonforms},{renderers:(t=this.props).renderers||gS(e.jsonforms,"renderers"),cells:t.cells||gS(e.jsonforms,"cells"),schema:t.schema||QP(e),rootSchema:QP(e),uischema:t.uischema||ZP(e),path:t.path,enabled:t.enabled,config:qP(e)}),["rootSchema"]);this.renderer=r,this.control=((e,t,r,n)=>{const o=Object.assign({},n({jsonforms:t},e)),s=null==Sj?void 0:Sj(r);return Object.assign(Object.assign({},o),s)})(this.props,this.jsonforms,this.dispatch,this.determinedRenderer.mapper)}}jsonformsChanged(){this.createRenderer()}propsChanged(){this.createRenderer()}submittedChanged(){this.touched=!!this.submitted}onBlur(){this.touched=!0}get determinedRenderer(){const e=zE(this.renderer.renderers,(e=>e.tester(this.renderer.uischema,this.renderer.schema)));return void 0===e||-1===e.tester(this.renderer.uischema,this.renderer.schema)?(console.error("UnknownRenderer this.renderer.uischema",this.renderer.uischema),{renderer:"UnknownRenderer"}):e}disconnectedCallback(){super.disconnectedCallback(),this.touched=!1,this.submitted=!1}};n([P],hN.prototype,"jsonforms",void 0),n([P],hN.prototype,"props",void 0),n([P],hN.prototype,"touched",void 0),n([ve({mode:"boolean"})],hN.prototype,"submitted",void 0),n([P],hN.prototype,"dispatch",void 0),n([P],hN.prototype,"control",void 0),n([P],hN.prototype,"renderer",void 0),hN=n([Ae({name:"dispatch-renderer",template:lN,styles:uN})],hN);const dN=ie`<template><json-forms ?readonly=${e=>e.readonly}?submitted=${e=>e.submitted}:renderers=${e=>e.renderers}:uischema=${e=>e.uischema}:schema=${e=>e.jsonSchema}:data=${e=>e.data}@data-change=${(e,t)=>e.onChange(t.event)}></json-forms>${ze((e=>!e.readonly),ie`<div class="actions"><div class="errors">${e=>e.submissionErrors}</div><fast-button @click="${e=>e._submit()}" ?disable=${e=>!e.submitting}class="submit-button" appearance="accent">
22
- Submit </fast-button></div>`)}</template>`,fN={renderer:ie`<template><control-wrapper :control=${e=>e.control}:touched=${e=>e.touched}?submitted=${e=>e.submitted}><zero-checkbox :checked=${e=>e.control.data}?disabled=${e=>!e.control.enabled}:autofocus=${e=>e.control.config.focus}:placeholder=${e=>e.control.config.placeholder}@change=${(e,t)=>{e.control.handleChange(e.control.path,t.event.target.checked),e.onBlur()}}></zero-checkbox></control-wrapper></template>`,tester:zP(3,UP(BP,DP((e=>e.hasOwnProperty("oneOf")&&e.oneOf.some((e=>mj(e,"boolean"))))))),mapper:wj},pN=e=>t=>{if(!t||!MP(t))return!1;const r=t.options;return!(!r||!r[e])},mN={renderer:ie`<template><control-wrapper :control=${e=>e.control}:touched=${e=>e.touched}?submitted=${e=>e.submitted}><zero-multiselect style="width: 100%" :selectedOptions=${e=>e.control.data||[]}@selectionChange=${(e,t)=>{e.control.handleChange(e.control.path,t.event.detail),e.onBlur()}}><multiselect-datasource resourceName=${e=>{var t;return null===(t=e.control.uischema.options)||void 0===t?void 0:t.allOptionsResourceName}}value-field=${e=>{var t;return null===(t=e.control.uischema.options)||void 0===t?void 0:t.valueField}}label-field=${e=>{var t;return null===(t=e.control.uischema.options)||void 0===t?void 0:t.labelField}}></multiselect-datasource></zero-multiselect></control-wrapper></template>`,tester:zP(4,LP(pN("allOptionsResourceName"),UP(DP((e=>mj(e,"array"))),DP((e=>e.hasOwnProperty("oneOf")&&e.oneOf.some((e=>mj(e,"array")))))))),mapper:wj},vN={renderer:ie`<template><control-wrapper :control=${e=>e.control}:touched=${e=>e.touched}?submitted=${e=>e.submitted}><zero-combobox style="width: 100%" placeholder=${e=>e.control.label}?disabled=${e=>!e.control.enabled}:value=${e=>e.control.data||""}@value-change=${(e,t)=>{var r;const n=null===(r=t.event.detail)||void 0===r?void 0:r.value;e.control.handleChange(e.control.path,n),e.onBlur()}}><options-datasource resourceName=${e=>{var t;return null===(t=e.control.uischema.options)||void 0===t?void 0:t.allOptionsResourceName}}value-field=${e=>{var t;return null===(t=e.control.uischema.options)||void 0===t?void 0:t.valueField}}label-field=${e=>{var t;return null===(t=e.control.uischema.options)||void 0===t?void 0:t.labelField}}:data=${e=>{var t;return null===(t=e.control.uischema.options)||void 0===t?void 0:t.data}}:initialSelectedValue=${e=>e.control.data}></options-datasource></zero-combobox></control-wrapper></template>`,tester:zP(4,UP(pN("allOptionsResourceName"),pN("data"))),mapper:wj},gN={renderer:ie`<template><control-wrapper :control=${e=>e.control}:touched=${e=>e.touched}?submitted=${e=>e.submitted}><zero-text-field :value=${e=>void 0===e.control.data||null===e.control.data?"":new Intl.DateTimeFormat("fr-CA",{year:"numeric",month:"2-digit",day:"2-digit"}).format(e.control.data)}@change="${(e,t)=>e.control.handleChange(e.control.path,t.event.target.control.valueAsNumber)}}" id=${e=>e.control.path}type="date" data-test-id=${e=>e.control.path}?required=${e=>e.control.required}?disabled=${e=>!e.control.enabled}@blur=${e=>e.onBlur()}style="width: 100%"></zero-text-field></control-wrapper></template>`,tester:zP(4,DP((e=>"org.joda.time.DateTime"===e.description))),mapper:wj},yN=UP(GP,DP((e=>e.hasOwnProperty("oneOf")&&e.oneOf.some((e=>e.hasOwnProperty("enum")))))),bN={renderer:ie`<template><control-wrapper :control=${e=>e.control}:touched=${e=>e.touched}?submitted=${e=>e.submitted}><zero-combobox style="width: 100%" ?disabled=${e=>!e.control.enabled}:value=${e=>{var t;return(null===(t=e.control.options.find((t=>t.value===e.control.data)))||void 0===t?void 0:t.label)||""}}@change=${(e,t)=>{var r;e.control.handleChange(e.control.path,null===(r=e.control.options.find((e=>e.label===t.event.target.value)))||void 0===r?void 0:r.value),e.onBlur()}}>${Ke((e=>e.control.options),ie`<zero-option>${e=>e.label}</zero-option>`)}</zero-combobox></control-wrapper></template>`,tester:zP(3,yN),mapper:(e,t)=>{const r=wj(e,t),n=t.options||(r.schema.enum||r.schema.oneOf.find((e=>e.hasOwnProperty("enum"))).enum).map((t=>_j(t,KP()(e),PP(r.schema,r.uischema,r.path))))||r.schema.const&&[_j(r.schema.const,KP()(e),PP(r.schema,r.uischema,r.path))];return Object.assign(Object.assign({},r),{options:n})}},_N={renderer:ie`<template><pre :value=${e=>e.control.data||""}id=${e=>e.control.path}data-test-id=${e=>e.control.path}style="display: none"></pre></template>`,tester:zP(5,((e,t,r)=>{var n,o;return null!==(o=null===(n=null==e?void 0:e.options)||void 0===n?void 0:n.hidden)&&void 0!==o&&o})),mapper:wj},wN={renderer:ie`<template><div>${Ke((e=>e.control.uischema.elements),ie`<dispatch-renderer ?submitted=${(e,t)=>t.parent.submitted}:dispatch=${(e,t)=>t.parent.dispatch}:jsonforms=${(e,t)=>t.parent.jsonforms}:props=${(e,t)=>({uischema:e,schema:t.parent.control.schema,renderers:t.parent.control.renderers,path:t.parent.control.path,enabled:t.parent.control.enabled})}></dispatch-renderer>`)}</div></template>`,tester:zP(2,dP),mapper:Oj},SN={renderer:ie`<template><div style="max-width:600px;
23
- display: flex;
24
- flex-direction: row;
25
- flex-wrap: wrap;
26
- justify-content: space-between;">${Ke((e=>e.control.uischema.elements),ie`<div style="width: 49%"><dispatch-renderer ?submitted=${(e,t)=>t.parent.submitted}:dispatch=${(e,t)=>t.parent.dispatch}:jsonforms=${(e,t)=>t.parent.jsonforms}:props=${(e,t)=>({uischema:e,schema:t.parent.control.schema,renderers:t.parent.control.renderers,path:t.parent.control.path,enabled:t.parent.control.enabled})}></dispatch-renderer></div>`)}</div></template>`,tester:zP(2,(e=>"LayoutVertical2Columns"===e.type)),mapper:Oj},EN=e=>mj(e,"number")||mj(e,"integer"),$N={renderer:ie`<template><control-wrapper :control=${e=>e.control}:touched=${e=>e.touched}?submitted=${e=>e.submitted}><zero-text-field :value=${e=>void 0===e.control.data?"":e.control.data}@change=${(e,t)=>{const r=parseFloat(t.event.target.value);return e.control.handleChange(e.control.path,isNaN(r)?void 0:r)}}placeholder=${e=>e.control.label}id=${e=>e.control.path}data-test-id=${e=>e.control.path}?required=${e=>e.control.required}?disabled=${e=>!e.control.enabled}@blur=${e=>e.onBlur()}style="width: 100%"></zero-text-field></control-wrapper></template>`,tester:zP(3,DP((e=>EN(e)||e.hasOwnProperty("oneOf")&&e.oneOf.some((e=>EN(e)))))),mapper:wj},ON=ie`<template><control-wrapper :control=${e=>e.control}:touched=${e=>e.touched}?submitted=${e=>e.submitted}><zero-text-field type=${e=>{var t,r;return(null===(r=null===(t=e.control.uischema)||void 0===t?void 0:t.options)||void 0===r?void 0:r.isPassword)?"password":"text"}}:value=${e=>e.control.data||""}@change=${(e,t)=>e.control.handleChange(e.control.path,t.event.target.value)}placeholder=${e=>e.control.label}id=${e=>e.control.path}data-test-id=${e=>e.control.path}?required=${e=>e.control.required}?disabled=${e=>!e.control.enabled}style="width: 100%" @blur=${e=>e.onBlur()}></zero-text-field></control-wrapper></template>`,CN=vr("foundation-form"),AN={renderer:ON,tester:zP(2,HP),mapper:wj},TN=[{renderer:ON,tester:zP(1,MP),mapper:wj},AN,fN,SN,wN,$N,mN,bN,vN,gN,_N];let xN=class extends kt{constructor(){super(...arguments),this.renderers=TN,this.errors=[],this.data={}}resourceNameChanged(){var e,t;return s(this,void 0,void 0,(function*(){if(this.resourceName){const r=yield this.connect.getJSONSchema(this.resourceName);this.jsonSchema=null===(t=null===(e=null==r?void 0:r.INBOUND)||void 0===e?void 0:e.properties)||void 0===t?void 0:t.DETAILS}this.removeDataProperties()}))}removeDataProperties(){if(!this.jsonSchema||!this.data)return;const e=Object.keys(this.jsonSchema.properties);Object.keys(this.data).forEach((t=>{e.includes(t)||(delete this.data[t],CN.debug("Removing key ",t,"from provided data because it is not part of the payload"))}))}_submit(){return s(this,void 0,void 0,(function*(){const e=Object.assign({},this.data);if(this.submissionErrors="",this.submitted=!0,CN.debug({payload:e,errors:this.errors}),this.$emit("submit",{payload:e,errors:this.errors}),0!==Object.entries(e).length&&!this.errors.length&&this.resourceName){this.submitting=!0;const t=yield this.connect.commitEvent(this.resourceName,{DETAILS:e});this.submitting=!1,t.ERROR?(this.$emit("submit-failure",{payload:e,errors:t.ERROR}),this.submissionErrors=t.ERROR.map((e=>e.CODE+": "+e.TEXT)).toString()):this.$emit("submit-success",{payload:e})}}))}onChange(e){CN.debug({event:e}),e.detail&&(this.data=e.detail.data,this.errors=e.detail.errors)}disconnectedCallback(){super.disconnectedCallback(),this.submitted=!1,this.submissionErrors="",this.jsonSchema=void 0,this.resourceName=void 0,this.data={}}};n([ve],xN.prototype,"resourceName",void 0),n([P],xN.prototype,"uischema",void 0),n([P],xN.prototype,"renderers",void 0),n([P],xN.prototype,"jsonSchema",void 0),n([Ji],xN.prototype,"connect",void 0),n([P],xN.prototype,"data",void 0),n([P],xN.prototype,"submitting",void 0),n([P],xN.prototype,"submitted",void 0),n([P],xN.prototype,"submissionErrors",void 0),n([ve({mode:"boolean"})],xN.prototype,"readonly",void 0),xN=n([Ae({name:"foundation-form",template:dN,styles:Qi})],xN);const PN=e=>(t,r,n)=>{if(!(null==r?void 0:r.length)||!(null==e?void 0:e.length)||!t)return[];const o=null==t?void 0:t[e],s=null==t?void 0:t[r];return(null==o?void 0:o.length)&&(null==s?void 0:s.length)&&o!==s?[{instancePath:`/${r}`,message:`Needs to match ${e}`,schemaPath:"",keyword:"",params:{}}]:[]};export{xN as Form,tN as genesisErrorTranslator,CN as logger,PN as mustMatch};